diff options
| author | hathach <[email protected]> | 2020-04-06 14:11:45 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-04-06 14:11:45 +0700 |
| commit | 2d6d298302be2d39374c36e7889341dee944d542 (patch) | |
| tree | 1e935941eca71d06b84ad781a45144b1c88b4464 /hw/bsp/ea4088qs | |
| parent | 4430ea61e20844726cdce33602e60f40a136a99e (diff) | |
move irqhandler to application
tud_isr() must be called by application to forward the irqhandle to the
stack
Diffstat (limited to 'hw/bsp/ea4088qs')
| -rw-r--r-- | hw/bsp/ea4088qs/ea4088qs.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/hw/bsp/ea4088qs/ea4088qs.c b/hw/bsp/ea4088qs/ea4088qs.c index 83b2d6b1e..3d4ce0367 100644 --- a/hw/bsp/ea4088qs/ea4088qs.c +++ b/hw/bsp/ea4088qs/ea4088qs.c @@ -27,6 +27,23 @@ #include "chip.h" #include "../board.h" +//--------------------------------------------------------------------+ +// USB Interrupt Handler +//--------------------------------------------------------------------+ +void USB_IRQHandler(void) +{ + #if CFG_TUSB_RHPORT0_MODE & OPT_MODE_HOST + tuh_isr(0); + #endif + + #if CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE + tud_isr(0); + #endif +} + +//--------------------------------------------------------------------+ +// MACRO TYPEDEF CONSTANT ENUM DECLARATION +//--------------------------------------------------------------------+ #define LED_PORT 2 #define LED_PIN 19 @@ -114,21 +131,6 @@ void board_init(void) } //--------------------------------------------------------------------+ -// USB Interrupt Handler -//--------------------------------------------------------------------+ -void USB_IRQHandler(void) -{ - #if CFG_TUSB_RHPORT0_MODE & OPT_MODE_HOST - tuh_isr(0); - #endif - - #if CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE - tud_isr(0); - #endif -} - - -//--------------------------------------------------------------------+ // Board porting API //--------------------------------------------------------------------+ |
