From 7e4508436fa5cfe6f18d3a679e5b4955e854816d Mon Sep 17 00:00:00 2001 From: cloudwindy Date: Fri, 20 Oct 2023 20:25:24 +0800 Subject: [PATCH] Fix can't compile with UART off. --- app/app.c | 2 ++ main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/app.c b/app/app.c index fae7ba9..34c24ac 100644 --- a/app/app.c +++ b/app/app.c @@ -1538,12 +1538,14 @@ void APP_time_slice_10ms(void) { g_flash_light_blink_counter++; +#ifdef ENABLE_UART if (UART_IsCommandAvailable()) { __disable_irq(); UART_HandleCommand(); __enable_irq(); } +#endif // *********** diff --git a/main.c b/main.c index e50386f..2a4c193 100644 --- a/main.c +++ b/main.c @@ -65,7 +65,9 @@ void Main(void) | SYSCON_DEV_CLK_GATE_AES_BITS_ENABLE; SYSTICK_Init(); +#ifdef ENABLE_UART UART_Init(); +#endif BOARD_Init(); #if defined(ENABLE_UART)