diff --git a/examples/shell/CMakeLists.txt b/examples/shell/CMakeLists.txt index 273cfe95..c3159783 100644 --- a/examples/shell/CMakeLists.txt +++ b/examples/shell/CMakeLists.txt @@ -6,4 +6,4 @@ find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE}) sdk_set_main_file(main.c) -project(helloworld) +project(shell) diff --git a/examples/shell/main.c b/examples/shell/main.c index 3a2e0bd5..7c75c637 100644 --- a/examples/shell/main.c +++ b/examples/shell/main.c @@ -9,16 +9,16 @@ static struct bflb_device_s *uart0; void uart_isr(int irq, void *arg) { uint32_t intstatus = bflb_uart_get_intstatus(uart0); - if (intstatus & UART_URX_FIFO_INT) { + if (intstatus & UART_INTSTS_RX_FIFO) { while (bflb_uart_rxavailable(uart0)) { shell_handler(bflb_uart_getchar(uart0)); } } - if (intstatus & UART_URX_RTO_INT) { + if (intstatus & UART_INTSTS_RTO) { while (bflb_uart_rxavailable(uart0)) { shell_handler(bflb_uart_getchar(uart0)); } - bflb_uart_int_clear(uart0, UART_CR_URX_RTO_CLR); + bflb_uart_int_clear(uart0, UART_INTCLR_RTO); } }