drivers/serial/uart_nrfx_uart.c
static unsigned char uart_nrfx_poll_out(struct device *dev,
					unsigned char c)
{
	/* The UART API dictates that poll_out should wait for the transmitter
	 * to be empty before sending a character. However, without locking,
	 * this introduces a rare yet possible race condition if the thread is
	 * preempted between sending the byte and checking for completion.

	 * Because of this race condition, the while loop has to be placed
	 * after the write to TXD, and we can't wait for an empty transmitter
	 * before writing. This is a trade-off between losing a byte once in a
	 * blue moon against hanging up the whole thread permanently
	 */

	/* reset transmitter ready state */
	nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY);

	/* send a character */
	nrf_uart_txd_set(NRF_UART0, (u8_t)c);

	/* Wait for transmitter to be ready */
	while (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_TXDRDY)) {
	}

	return c;
}
/**
 * @brief Output a character in polled mode.
 *
 * @param dev UART device struct
 * @param c Character to send
 *
 * @return Sent character
 */
@brief Output a character in polled mode.
@param dev UART device struct
@param c Character to send

@return Sent character
@brief Output a character in polled mode . @param dev UART device struct @param c Character to send @return Sent character
static unsigned char uart_nrfx_poll_out(struct device *dev,
					unsigned char c)
{
	nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY);
	nrf_uart_txd_set(NRF_UART0, (u8_t)c);
	while (!nrf_uart_event_check(NRF_UART0, NRF_UART_EVENT_TXDRDY)) {
	}
	return c;
}
static unsigned char uart_nrfx_poll_out ( struct device * dev , unsigned char c ) { nrf_uart_event_clear ( NRF_UART0 , NRF_UART_EVENT_TXDRDY ) ; nrf_uart_txd_set ( NRF_UART0 , ( u8_t ) c ) ; while ( ! nrf_uart_event_check ( NRF_UART0 , NRF_UART_EVENT_TXDRDY ) ) { } return c ; }
@brief Output a character in polled mode.
@brief Output a character in polled mode .
/* The UART API dictates that poll_out should wait for the transmitter
	 * to be empty before sending a character. However, without locking,
	 * this introduces a rare yet possible race condition if the thread is
	 * preempted between sending the byte and checking for completion.

	 * Because of this race condition, the while loop has to be placed
	 * after the write to TXD, and we can't wait for an empty transmitter
	 * before writing. This is a trade-off between losing a byte once in a
	 * blue moon against hanging up the whole thread permanently
	 */ /* reset transmitter ready state */ /* send a character */ /* Wait for transmitter to be ready */