Listing 6

#define UART_RX_BYTES 0x0e
uint32_t uart_read()
{
    while ((*UART_RXCTL & UART_RX_BYTES) == 0) // manipulate here
    {
        ; // wait
    }
    return *UART_RXBUF;
}