@ -39,3 +39,9 @@ void GPIO_PORT_B_init(void)
UART1_CTL_R |= 0x301; // Enable UART1, RX, and TX
}
char UART1_READ(void)
{
while (UART1_FR_R & 0x10); // Wait until RX FIFO is not empty
return (char)UART1_DR_R; // Return received data