call tud_irq_handler() for all nrf5x board

This commit is contained in:
hathach 2020-04-06 17:35:11 +07:00
parent a61d34e09c
commit 4179334aca
12 changed files with 85 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -89,7 +89,7 @@ typedef struct TU_ATTR_ALIGNED(4)
void dcd_init (uint8_t rhport); void dcd_init (uint8_t rhport);
// Interrupt Handler // 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 // Enable device interrupt
void dcd_int_enable (uint8_t rhport); void dcd_int_enable (uint8_t rhport);

View File

@ -359,8 +359,10 @@ void bus_reset(void)
_dcd.xfer[0][TUSB_DIR_OUT].mps = MAX_PACKET_SIZE; _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 const inten = NRF_USBD->INTEN;
uint32_t int_status = 0; uint32_t int_status = 0;