git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2743 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2011-02-18 08:00:36 +00:00
parent 60d8f68906
commit 690d08a1f9
1 changed files with 5 additions and 3 deletions

View File

@ -271,12 +271,14 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
case USB_EVENT_ADDRESS: case USB_EVENT_ADDRESS:
return; return;
case USB_EVENT_CONFIGURED: case USB_EVENT_CONFIGURED:
/* Enables the endpoints specified into the configuration.*/ /* Enables the endpoints specified into the configuration.
chSysLock(); Note, this callback is invoked from an ISR so I-Class functions
must be used.*/
chSysLockFromIsr();
usbInitEndpointI(usbp, DATA_REQUEST_EP, &ep1config); usbInitEndpointI(usbp, DATA_REQUEST_EP, &ep1config);
usbInitEndpointI(usbp, INTERRUPT_REQUEST_EP, &ep2config); usbInitEndpointI(usbp, INTERRUPT_REQUEST_EP, &ep2config);
usbInitEndpointI(usbp, DATA_AVAILABLE_EP, &ep3config); usbInitEndpointI(usbp, DATA_AVAILABLE_EP, &ep3config);
chSysUnlock(); chSysUnlockFromIsr();
return; return;
case USB_EVENT_SUSPEND: case USB_EVENT_SUSPEND:
return; return;