move irq from msp430

This commit is contained in:
hathach 2020-04-08 16:42:36 +07:00
parent 8f17945b67
commit e879ad1e6f
2 changed files with 14 additions and 1 deletions

View File

@ -28,6 +28,17 @@
#include "msp430.h"
//--------------------------------------------------------------------+
// Forward USB interrupt events to TinyUSB IRQ Handler
//--------------------------------------------------------------------+
void __attribute__ ((interrupt(USB_UBM_VECTOR))) USB_UBM_ISR(void)
{
tud_irq_handler(0);
}
//--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM
//--------------------------------------------------------------------+
#define LED_PORT P1OUT
#define LED_PIN BIT0
#define LED_STATE_ON 1

View File

@ -539,8 +539,10 @@ static void handle_setup_packet(void)
dcd_event_setup_received(0, (uint8_t*) &_setup_packet[0], true);
}
void __attribute__ ((interrupt(USB_UBM_VECTOR))) USB_UBM_ISR(void)
void dcd_irq_handler(uint8_t rhport)
{
(void) rhport;
// Setup is special- reading USBVECINT to handle setup packets is done to
// stop hardware-generated NAKs on EP0.
uint8_t setup_status = USBIFG & SETUPIFG;