Fork of https://developer.mbed.org/users/bscott/code/STM32_USBDevice/
Fork of STM32_USBDevice by
Diff: USBDevice/USBHAL_LPC17.cpp
- Revision:
- 3:6d85e04fb59f
- Parent:
- 1:80ab0d068708
- Child:
- 8:335f2506f422
diff -r 34856a6adb5b -r 6d85e04fb59f USBDevice/USBHAL_LPC17.cpp --- a/USBDevice/USBHAL_LPC17.cpp Tue Jul 17 14:35:40 2012 +0000 +++ b/USBDevice/USBHAL_LPC17.cpp Sun Oct 14 12:38:56 2012 +0000 @@ -371,7 +371,6 @@ // Attach IRQ instance = this; NVIC_SetVector(USB_IRQn, (uint32_t)&_usbisr); - NVIC_EnableIRQ(USB_IRQn); // Enable interrupts for device events and EP0 LPC_USB->USBDevIntEn = EP_SLOW | DEV_STAT | FRAME; @@ -388,11 +387,13 @@ } void USBHAL::connect(void) { + NVIC_EnableIRQ(USB_IRQn); // Connect USB device SIEconnect(); } void USBHAL::disconnect(void) { + NVIC_DisableIRQ(USB_IRQn); // Disconnect USB device SIEdisconnect(); }