drivers/serial/uart_stellaris.c
/**
 * @brief Fill FIFO with data
 *
 * @param dev UART device struct
 * @param tx_data Data to transmit
 * @param len Number of bytes to send
 *
 * @return Number of bytes sent
 */
@brief Fill FIFO with data
@param dev UART device struct
@param tx_data Data to transmit
@param len Number of bytes to send

@return Number of bytes sent
@brief Fill FIFO with data @param dev UART device struct @param tx_data Data to transmit @param len Number of bytes to send @return Number of bytes sent
static int uart_stellaris_fifo_fill(struct device *dev, const u8_t *tx_data,
				    int len)
{
	volatile struct _uart *uart = UART_STRUCT(dev);
	u8_t num_tx = 0;
	while ((len - num_tx > 0) && ((uart->fr & UARTFR_TXFF) == 0)) {
		uart->dr = (u32_t)tx_data[num_tx++];
	}
	return (int)num_tx;
}
static int uart_stellaris_fifo_fill ( struct device * dev , const u8_t * tx_data , int len ) { volatile struct _uart * uart = UART_STRUCT ( dev ) ; u8_t num_tx = 0 ; while ( ( len - num_tx > 0 ) && ( ( uart -> fr & UARTFR_TXFF ) == 0 ) ) { uart -> dr = ( u32_t ) tx_data [ num_tx ++ ] ; } return ( int ) num_tx ; }
@brief Fill FIFO with data
 @param dev UART device struct
 @param tx_data Data to transmit
 @param len Number of bytes to send
@brief Fill FIFO with data @param dev UART device struct @param tx_data Data to transmit @param len Number of bytes to send