diff --git a/main.c b/main.c index 5fc02cd..fbe159d 100644 --- a/main.c +++ b/main.c @@ -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 -} + +