uart_fifo_fill_u16

Function uart_fifo_fill_u16 

Source
pub unsafe extern "C" fn uart_fifo_fill_u16(
    dev: *const device,
    tx_data: *const u16,
    size: i32,
) -> i32
Expand description

@brief Fill FIFO with wide data.

@details This function is expected to be called from UART interrupt handler (ISR), if uart_irq_tx_ready() returns true. Result of calling this function not from an ISR is undefined (hardware-dependent). Likewise, not calling this function from an ISR if uart_irq_tx_ready() returns true may lead to undefined behavior, e.g. infinite interrupt loops. It’s mandatory to test return value of this function, as different hardware has different FIFO depth (oftentimes just 1).

@param dev UART device instance. @param tx_data Wide data to transmit. @param size Number of datum to send.

@return Number of datum sent. @retval -ENOSYS If this function is not implemented @retval -ENOTSUP If API is not enabled.