drivers/serial/uart_nrfx_uart.c
static int uart_nrfx_poll_in(struct device *dev, unsigned char *c)
{
	if (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXDRDY)) {
		return -1;
	}

	/* Clear the interrupt */
	nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY);

	/* got a character */
	*c = nrf_uart_rxd_get(NRF_UART0);

	return 0;
}
/**
 * @brief Poll the device for input.
 *
 * @param dev UART device struct
 * @param c Pointer to character
 *
 * @return 0 if a character arrived, -1 if the input buffer if empty.
 */
@brief Poll the device for input.
@param dev UART device struct
@param c Pointer to character

@return 0 if a character arrived, -1 if the input buffer if empty.
@brief Poll the device for input . @param dev UART device struct @param c Pointer to character @return 0 if a character arrived - 1 if the input buffer if empty .
static int uart_nrfx_poll_in(struct device *dev, unsigned char *c)
{
	if (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_RXDRDY)) {
		return -1;
	}
	nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY);
	*c = nrf_uart_rxd_get(NRF_UART0);
	return 0;
}
static int uart_nrfx_poll_in ( struct device * dev , unsigned char * c ) { if ( ! nrf_uart_event_check ( NRF_UART0 , NRF_UART_EVENT_RXDRDY ) ) { return -1 ; } nrf_uart_event_clear ( NRF_UART0 , NRF_UART_EVENT_RXDRDY ) ; * c = nrf_uart_rxd_get ( NRF_UART0 ) ; return 0 ; }
@brief Poll the device for input.
@brief Poll the device for input .
/* Clear the interrupt */ /* got a character */