add tud_irq_handler() to all NUC board
This commit is contained in:
parent
4179334aca
commit
138965d1d1
|
@ -29,6 +29,17 @@
|
||||||
#include "clk.h"
|
#include "clk.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
void USBD_IRQHandler(void)
|
||||||
|
{
|
||||||
|
tud_irq_handler(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// MACRO TYPEDEF CONSTANT ENUM
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
#define LED_PORT PB
|
#define LED_PORT PB
|
||||||
#define LED_PIN 4
|
#define LED_PIN 4
|
||||||
#define LED_PIN_IO PB4
|
#define LED_PIN_IO PB4
|
||||||
|
|
|
@ -29,6 +29,17 @@
|
||||||
#include "clk.h"
|
#include "clk.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
void USBD_IRQHandler(void)
|
||||||
|
{
|
||||||
|
tud_irq_handler(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// MACRO TYPEDEF CONSTANT ENUM
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
#define LED_PORT PB
|
#define LED_PORT PB
|
||||||
#define LED_PIN 4
|
#define LED_PIN 4
|
||||||
#define LED_PIN_IO PB4
|
#define LED_PIN_IO PB4
|
||||||
|
|
|
@ -29,6 +29,18 @@
|
||||||
#include "clk.h"
|
#include "clk.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
void USBD_IRQHandler(void)
|
||||||
|
{
|
||||||
|
tud_irq_handler(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// MACRO TYPEDEF CONSTANT ENUM
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
#define LED_PORT PC
|
#define LED_PORT PC
|
||||||
#define LED_PIN 9
|
#define LED_PIN 9
|
||||||
#define LED_PIN_IO PC9
|
#define LED_PIN_IO PC9
|
||||||
|
|
|
@ -29,6 +29,17 @@
|
||||||
#include "clk.h"
|
#include "clk.h"
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
void USBD_IRQHandler(void)
|
||||||
|
{
|
||||||
|
tud_irq_handler(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// MACRO TYPEDEF CONSTANT ENUM
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
#define LED_PORT PB
|
#define LED_PORT PB
|
||||||
#define LED_PIN 0
|
#define LED_PIN 0
|
||||||
#define LED_PIN_IO PB0
|
#define LED_PIN_IO PB0
|
||||||
|
|
|
@ -27,6 +27,17 @@
|
||||||
#include "bsp/board.h"
|
#include "bsp/board.h"
|
||||||
#include "NUC505Series.h"
|
#include "NUC505Series.h"
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// Forward USB interrupt events to TinyUSB IRQ Handler
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
void USBD_IRQHandler(void)
|
||||||
|
{
|
||||||
|
tud_irq_handler(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
|
// MACRO TYPEDEF CONSTANT ENUM
|
||||||
|
//--------------------------------------------------------------------+
|
||||||
#define LED_PORT PC
|
#define LED_PORT PC
|
||||||
#define LED_PIN 3
|
#define LED_PIN 3
|
||||||
#define LED_STATE_ON 0
|
#define LED_STATE_ON 0
|
||||||
|
|
|
@ -306,8 +306,10 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
|
||||||
ep->CFG |= USBD_CFG_CSTALL_Msk;
|
ep->CFG |= USBD_CFG_CSTALL_Msk;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USBD_IRQHandler(void)
|
void dcd_irq_handler(uint8_t rhport)
|
||||||
{
|
{
|
||||||
|
(void) rhport;
|
||||||
|
|
||||||
uint32_t status = USBD->INTSTS;
|
uint32_t status = USBD->INTSTS;
|
||||||
uint32_t state = USBD->ATTR & 0xf;
|
uint32_t state = USBD->ATTR & 0xf;
|
||||||
|
|
||||||
|
@ -424,10 +426,4 @@ void USBD_IRQHandler(void)
|
||||||
USBD->INTSTS = status & enabled_irqs;
|
USBD->INTSTS = status & enabled_irqs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcd_irq_handler(uint8_t rhport)
|
|
||||||
{
|
|
||||||
(void) rhport;
|
|
||||||
USBD_IRQHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -312,8 +312,10 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
|
||||||
ep->CFG |= USBD_CFG_CSTALL_Msk;
|
ep->CFG |= USBD_CFG_CSTALL_Msk;
|
||||||
}
|
}
|
||||||
|
|
||||||
void USBD_IRQHandler(void)
|
void dcd_irq_handler(uint8_t rhport)
|
||||||
{
|
{
|
||||||
|
(void) rhport;
|
||||||
|
|
||||||
uint32_t status = USBD->INTSTS;
|
uint32_t status = USBD->INTSTS;
|
||||||
#ifdef SUPPORT_LPM
|
#ifdef SUPPORT_LPM
|
||||||
uint32_t state = USBD->ATTR & 0x300f;
|
uint32_t state = USBD->ATTR & 0x300f;
|
||||||
|
@ -440,10 +442,4 @@ void USBD_IRQHandler(void)
|
||||||
USBD->INTSTS = status & enabled_irqs;
|
USBD->INTSTS = status & enabled_irqs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcd_irq_handler(uint8_t rhport)
|
|
||||||
{
|
|
||||||
(void) rhport;
|
|
||||||
USBD_IRQHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -430,8 +430,10 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void USBD_IRQHandler(void)
|
void dcd_irq_handler(uint8_t rhport)
|
||||||
{
|
{
|
||||||
|
(void) rhport;
|
||||||
|
|
||||||
uint32_t status = USBD->GINTSTS;
|
uint32_t status = USBD->GINTSTS;
|
||||||
|
|
||||||
/* USB interrupt */
|
/* USB interrupt */
|
||||||
|
@ -641,10 +643,4 @@ void USBD_IRQHandler(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcd_irq_handler(uint8_t rhport)
|
|
||||||
{
|
|
||||||
(void) rhport;
|
|
||||||
USBD_IRQHandler();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue