Remove UART Read Functions

This commit is contained in:
Uttam Bhavimani Bhavimani 2024-11-29 14:52:52 +05:30
parent 3e0c47f9f1
commit 2b539ed0b9
1 changed files with 5 additions and 7 deletions

12
main.c
View File

@ -30,12 +30,10 @@ void GPIO_PORT_B_init(void)
UART1_LCRH_R = 0x60; // 8-bit, No parity, 1 stop bit
UART1_CC_R = 0x00; // Use system clock
UART1_CTL_R |= 0x301; // Enable UART1, RX, and TX
UART1_CTL_R |= 0x301; // Enable UART1, RX, and TX0
UART1_IM_R |= 0x10;
NVIC_EN0_R |= (1 << 6);
}
char UART1_READ(void)
{
while (UART1_FR_R & 0x10); // Wait until RX FIFO is not empty
return (char)UART1_DR_R; // Return received data
}