[fix][shell] fix uart macro

This commit is contained in:
jzlv 2022-10-24 19:19:45 +08:00
parent 39fc0d73c8
commit 7c8010e3d1
2 changed files with 4 additions and 4 deletions

View File

@ -6,4 +6,4 @@ find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})
sdk_set_main_file(main.c)
project(helloworld)
project(shell)

View File

@ -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);
}
}