drivers/serial/uart_stellaris.c
/**
 * @brief Read data from FIFO
 *
 * @param dev UART device struct
 * @param rx_data Pointer to data container
 * @param size Container size
 *
 * @return Number of bytes read
 */
@brief Read data from FIFO
@param dev UART device struct
@param rx_data Pointer to data container
@param size Container size

@return Number of bytes read
@brief Read data from FIFO @param dev UART device struct @param rx_data Pointer to data container @param size Container size @return Number of bytes read
static int uart_stellaris_fifo_read(struct device *dev, u8_t *rx_data,
				    const int size)
{
	volatile struct _uart *uart = UART_STRUCT(dev);
	u8_t num_rx = 0;
	while ((size - num_rx > 0) && ((uart->fr & UARTFR_RXFE) == 0)) {
		rx_data[num_rx++] = (u8_t)uart->dr;
	}
	return num_rx;
}
static int uart_stellaris_fifo_read ( struct device * dev , u8_t * rx_data , const int size ) { volatile struct _uart * uart = UART_STRUCT ( dev ) ; u8_t num_rx = 0 ; while ( ( size - num_rx > 0 ) && ( ( uart -> fr & UARTFR_RXFE ) == 0 ) ) { rx_data [ num_rx ++ ] = ( u8_t ) uart -> dr ; } return num_rx ; }
@brief Read data from FIFO
 @param dev UART device struct
 @param rx_data Pointer to data container
 @param size Container size
@brief Read data from FIFO @param dev UART device struct @param rx_data Pointer to data container @param size Container size