pub unsafe extern "C" fn uart_poll_in_u16(
dev: *const device,
p_u16: *mut u16,
) -> c_intExpand description
@brief Read a 16-bit datum from the device for input.
This routine checks if the receiver has valid data. When the receiver has valid data, it reads a 16-bit datum from the device, stores to the location pointed to by p_u16, and returns 0 to the calling thread. It returns -1, otherwise. This function is a non-blocking call.
@param dev UART device instance. @param p_u16 Pointer to 16-bit data.
@retval 0 Data arrived. @retval -1 No data was available to read (i.e., the UART input buffer was empty). @retval -ENOTSUP API is not enabled. @retval -ENOSYS The function is not implemented. @retval -EBUSY Async reception was enabled using @ref uart_rx_enable.