diff options
| author | Zhihong Chen <[email protected]> | 2024-08-21 17:35:52 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-08-23 13:57:45 +0800 |
| commit | 2726e2e7b697f2e072f918623578903bd9eddf37 (patch) | |
| tree | 1474e729905e09fef552db260e4ac7c06585b346 | |
| parent | e8b22163bb925d758e003b13bf23d42fb629920e (diff) | |
port: hpmicro: add USBH_USE_CUSTOM_ISR add USBD_USE_CUSTOM_ISR to control isr
- add USBH_USE_CUSTOM_ISR add USBD_USE_CUSTOM_ISR to control isr
Signed-off-by: Zhihong Chen <[email protected]>
| -rw-r--r-- | port/ehci/usb_glue_hpm.c | 4 | ||||
| -rw-r--r-- | port/hpm/usb_dc_hpm.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/port/ehci/usb_glue_hpm.c b/port/ehci/usb_glue_hpm.c index f616f2cf..17724008 100644 --- a/port/ehci/usb_glue_hpm.c +++ b/port/ehci/usb_glue_hpm.c @@ -82,6 +82,8 @@ uint8_t usbh_get_port_speed(struct usbh_bus *bus, const uint8_t port) return 0; } +#if !defined(USBH_USE_CUSTOM_ISR) || !USBH_USE_CUSTOM_ISR + extern void USBH_IRQHandler(uint8_t busid); void isr_usbh0(void) @@ -97,3 +99,5 @@ void isr_usbh1(void) } SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbh1) #endif + +#endif diff --git a/port/hpm/usb_dc_hpm.c b/port/hpm/usb_dc_hpm.c index 7cde98ac..f3210f5e 100644 --- a/port/hpm/usb_dc_hpm.c +++ b/port/hpm/usb_dc_hpm.c @@ -359,6 +359,8 @@ void USBD_IRQHandler(uint8_t busid) } } +#if !defined(USBD_USE_CUSTOM_ISR) || !USBD_USE_CUSTOM_ISR + void isr_usbd0(void) { USBD_IRQHandler(_dcd_busid[0]); @@ -371,4 +373,6 @@ void isr_usbd1(void) USBD_IRQHandler(_dcd_busid[1]); } SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbd1) -#endif
\ No newline at end of file +#endif + +#endif |
