pub unsafe extern "C" fn uart_poll_in(
dev: *const device,
p_char: *mut c_uchar,
) -> c_intExpand description
@brief Read a character from the device for input.
This routine checks if the receiver has valid data. When the receiver has valid data, it reads a character from the device, stores to the location pointed to by p_char, 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_char Pointer to character.
@retval 0 A character arrived. @retval -1 No character was available to read (i.e. the UART input buffer was empty). @retval -ENOSYS The operation is not implemented. @retval -EBUSY Async reception was enabled using @ref uart_rx_enable.