Преглед изворни кода

call tud_irq_handler() for all nrf5x board

hathach пре 6 година
родитељ
комит
4179334aca

+ 9 - 0
hw/bsp/adafruit_clue/adafruit_clue.c

@@ -35,6 +35,15 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/arduino_nano33_ble/arduino_nano33_ble.c

@@ -36,6 +36,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/circuitplayground_bluefruit/circuitplayground_bluefruit.c

@@ -35,6 +35,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/feather_nrf52840_express/feather_nrf52840_express.c

@@ -36,6 +36,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/feather_nrf52840_sense/feather_nrf52840_sense.c

@@ -35,6 +35,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/nrf52840_mdk_dongle/nrf52840_mdk_dongle.c

@@ -35,6 +35,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/pca10056/pca10056.c

@@ -36,6 +36,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/pca10059/pca10059.c

@@ -35,6 +35,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/pca10100/pca10100.c

@@ -36,6 +36,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 8 - 0
hw/bsp/raytac_mdbt50q_rx/raytac_mdbt50q_rx.c

@@ -35,6 +35,14 @@
 #include "nrf_soc.h"
 #endif
 
+//--------------------------------------------------------------------+
+// Forward USB interrupt events to TinyUSB IRQ Handler
+//--------------------------------------------------------------------+
+void USBD_IRQHandler(void)
+{
+  tud_irq_handler(0);
+}
+
 /*------------------------------------------------------------------*/
 /* MACRO TYPEDEF CONSTANT ENUM
  *------------------------------------------------------------------*/

+ 1 - 1
src/device/dcd.h

@@ -89,7 +89,7 @@ typedef struct TU_ATTR_ALIGNED(4)
 void dcd_init       (uint8_t rhport);
 
 // Interrupt Handler
-void dcd_irq_handler        (uint8_t rhport) TU_ATTR_USED;
+void dcd_irq_handler(uint8_t rhport) TU_ATTR_USED;
 
 // Enable device interrupt
 void dcd_int_enable (uint8_t rhport);

+ 3 - 1
src/portable/nordic/nrf5x/dcd_nrf5x.c

@@ -359,8 +359,10 @@ void bus_reset(void)
   _dcd.xfer[0][TUSB_DIR_OUT].mps = MAX_PACKET_SIZE;
 }
 
-void USBD_IRQHandler(void)
+void dcd_irq_handler(uint8_t rhport)
 {
+  (void) rhport;
+
   uint32_t const inten  = NRF_USBD->INTEN;
   uint32_t int_status = 0;