pub unsafe extern "C" fn uart_write_bytes(
    uart_num: uart_port_t,
    src: *const c_void,
    size: usize
) -> c_int
Expand description

@brief Send data to the UART port from a given buffer and length,

If the UART driver’s parameter ‘tx_buffer_size’ is set to zero: This function will not return until all the data have been sent out, or at least pushed into TX FIFO.

Otherwise, if the ‘tx_buffer_size’ > 0, this function will return after copying all the data to tx ring buffer, UART ISR will then move data from the ring buffer to TX FIFO gradually.

@param uart_num UART port number, the max port number is (UART_NUM_MAX -1). @param src data buffer address @param size data length to send

@return - (-1) Parameter error - OTHERS (>=0) The number of bytes pushed to the TX FIFO