diff --git a/main.c b/main.c index 45781cd..3447a4e 100644 --- a/main.c +++ b/main.c @@ -17,3 +17,9 @@ void GPIO_PORT_F_init(void) GPIO_PORTF_IEV_R = 0x00; // Falling edge event GPIO_PORTF_IM_R |= 0x11; // Unmask interrupts for PF0 and PF4 } + +void UART1_WRITE(char data) +{ + while (UART1_FR_R & 0x20); // Wait until TX FIFO is not full + UART1_DR_R = data; // Write data to UART data register +}