pub unsafe extern "C" fn uart_tx(
dev: *const device,
buf: *const u8,
len: usize,
timeout: i32,
) -> i32Expand description
@brief Send given number of bytes from buffer through UART.
Function returns immediately and event handler, set using @ref uart_callback_set, is called after transfer is finished.
@param dev UART device instance. @param buf Pointer to transmit buffer. @param len Length of transmit buffer. @param timeout Timeout in microseconds. Valid only if flow control is enabled. @ref SYS_FOREVER_US disables timeout.
@retval 0 If successful. @retval -ENOTSUP If API is not enabled. @retval -EBUSY If There is already an ongoing transfer. @retval -errno Other negative errno value in case of failure.