Parcourir la source

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 <zhihong.chen@hpmicro.com>
Zhihong Chen il y a 1 an
Parent
commit
2726e2e7b6
2 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 4 0
      port/ehci/usb_glue_hpm.c
  2. 5 1
      port/hpm/usb_dc_hpm.c

+ 4 - 0
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

+ 5 - 1
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
+#endif
+
+#endif