Code for UART 7 read

This commit is contained in:
Rajput R Vikramsingh Vikramsingh 2024-10-29 00:52:40 +05:30
parent c8e45ff5c9
commit f7bff77f4e
1 changed files with 4 additions and 1 deletions

5
main.c
View File

@ -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
}