/* Read from UART Receive Holding Register. Before reading user should check if rx is ready.  */
uint32_t uart_read(Uart *p_uart, uint8_t *puc_data)
/* Read from UART Receive Holding Register. Before reading user should check if rx is ready.  */
uint32_t uart_read(Uart *p_uart, uint8_t *puc_data)
{
	if ((p_uart->UART_SR & UART_SR_RXRDY) == 0)
		return 1;
	*puc_data = (uint8_t) p_uart->UART_RHR;
	return 0;
}