uart_fifo_read_u16

Function uart_fifo_read_u16 

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

@brief Read wide data from FIFO.

@details This function is expected to be called from UART interrupt handler (ISR), if uart_irq_rx_ready() returns true. Result of calling this function not from an ISR is undefined (hardware-dependent). It’s unspecified whether “RX ready” condition as returned by uart_irq_rx_ready() is level- or edge- triggered. That means that once uart_irq_rx_ready() is detected, uart_fifo_read() must be called until it reads all available data in the FIFO (i.e. until it returns less data than was requested).

@param dev UART device instance. @param rx_data Wide data container. @param size Container size.

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