예제 #1
0
파일: uart.c 프로젝트: mytbk/coreboot
/**
 * \brief Read a single byte from the UART.
 *
 * Blocks until at least a byte is available.
 */
u8 a10_uart_rx_blocking(void *uart_base)
{
	struct a10_uart *uart = uart_base;

	while (rx_fifo_empty(uart)) ;

	return read32(&uart->rbr);
}
예제 #2
0
파일: main.c 프로젝트: ruffner/rc-truck
uint8_t data_ready() {
  uint8_t status = get_status();
  if ( status & (1 << RX_DR) ) return 1;
  return !rx_fifo_empty();
}
예제 #3
0
파일: uart.c 프로젝트: lkundrak/coreboot
/**
 * \brief Read a single byte from the UART.
 *
 * Blocks until at least a byte is available.
 */
static u8 a10_uart_rx_blocking(struct a10_uart *uart)
{
	while (rx_fifo_empty(uart));

	return read32(&uart->rbr);
}