diff --git a/main.c b/main.c index 6f2b4be..e12522e 100644 --- a/main.c +++ b/main.c @@ -50,7 +50,10 @@ void UART7_init(void) } - +char UART0_Read(void) { + while((UART0_FR_R & 0x10) != 0); // Wait until RXFE is 0 (receive FIFO not empty) + return UART0_DR_R & 0xFF; // Read the received character +}