abstract usb enable/disable interrupt to hal layer

This commit is contained in:
hathach
2012-12-10 14:58:25 +07:00
parent b52b3b1cef
commit 3eb7465e5e
12 changed files with 218 additions and 29 deletions

View File

@@ -135,13 +135,8 @@ TUSB_Error_t dcd_init(uint8_t coreid)
&membase , &memsize) );
#endif
// FIXME abstract to hal
/* Enable the USB interrupt */
#if MCU == MCU_LPC13UXX
NVIC_EnableIRQ(USB_IRQ_IRQn);
#elif MCU == MCU_LPC11UXX
NVIC_EnableIRQ(USB_IRQn);
#endif
hal_interrupt_enable(); /* Enable the USB interrupt */
/* Perform USB soft connect */
USBD_API->hw->Connect(g_hUsb, 1);
#endif