From 2b539ed0b98ab38bf2d540cb3f1510dd0e270fc4 Mon Sep 17 00:00:00 2001 From: Uttam Bhavimani Bhavimani Date: Fri, 29 Nov 2024 14:52:52 +0530 Subject: [PATCH] Remove UART Read Functions --- main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 -} + +