repair the problem of irq and add mode judge for zigbee
This commit is contained in:
@@ -39,13 +39,12 @@ struct SerialHardwareDevice serial_device_1;
|
||||
|
||||
void LPUART1_IRQHandler(int irqn, void *arg)
|
||||
{
|
||||
x_base lock = 0;
|
||||
// KPrintf("LPUART1_IRQHandler \n");
|
||||
lock = DISABLE_INTERRUPT();
|
||||
|
||||
DisableIRQ(UART1_IRQn);
|
||||
|
||||
UartIsr(&serial_bus_1, &serial_driver_1, &serial_device_1);
|
||||
EnableIRQ(UART1_IRQn);
|
||||
|
||||
ENABLE_INTERRUPT(lock);
|
||||
}
|
||||
DECLARE_HW_IRQ(UART1_IRQn, LPUART1_IRQHandler, NONE);
|
||||
#endif
|
||||
@@ -57,12 +56,12 @@ struct SerialHardwareDevice serial_device_2;
|
||||
|
||||
void LPUART2_IRQHandler(int irqn, void *arg)
|
||||
{
|
||||
x_base lock = 0;
|
||||
lock = DISABLE_INTERRUPT();
|
||||
|
||||
DisableIRQ(UART2_IRQn);
|
||||
|
||||
UartIsr(&serial_bus_2, &serial_driver_2, &serial_device_2);
|
||||
EnableIRQ(UART2_IRQn);
|
||||
|
||||
ENABLE_INTERRUPT(lock);
|
||||
}
|
||||
DECLARE_HW_IRQ(UART2_IRQn, LPUART2_IRQHandler, NONE);
|
||||
#endif
|
||||
|
||||
@@ -41,12 +41,12 @@ extern usb_status_t USB_HostMsdWriteApi(usb_host_msd_command_instance_t *msdComm
|
||||
//USB HOST ISR
|
||||
void UsbOtg2IrqHandler(int irqn, void *arg)
|
||||
{
|
||||
x_base lock = 0;
|
||||
lock = DISABLE_INTERRUPT();
|
||||
|
||||
DisableIRQ(USB2_IRQn);
|
||||
|
||||
USB_HostEhciIsrFunction(g_HostHandle);
|
||||
EnableIRQ(USB2_IRQn);
|
||||
|
||||
ENABLE_INTERRUPT(lock);
|
||||
}
|
||||
DECLARE_HW_IRQ(USB2_IRQn, UsbOtg2IrqHandler, NONE);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ __attribute__((aligned(MEM_ALIGN_SIZE)))
|
||||
void RunningIntoLowPowerMode()
|
||||
{
|
||||
#ifdef ARCH_ARM
|
||||
__asm volatile("WFI");
|
||||
// __asm volatile("WFI");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_RISCV
|
||||
|
||||
Reference in New Issue
Block a user