[fix][shell] fix uart macro
This commit is contained in:
parent
39fc0d73c8
commit
7c8010e3d1
@ -6,4 +6,4 @@ find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})
|
||||
|
||||
sdk_set_main_file(main.c)
|
||||
|
||||
project(helloworld)
|
||||
project(shell)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user