git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8989 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
Giovanni Di Sirio 2016-02-28 09:35:43 +00:00
parent b162410c9c
commit 75eac1f574
1 changed files with 3 additions and 0 deletions

View File

@ -323,6 +323,7 @@ void usbStop(USBDriver *usbp) {
/* Resetting all ongoing synchronous operations.*/
for (i = 0; i <= (unsigned)USB_MAX_ENDPOINTS; i++) {
#if USB_USE_WAIT == TRUE
if (usbp->epc[i] != NULL) {
if (usbp->epc[i]->in_state != NULL) {
osalThreadResumeI(&usbp->epc[i]->in_state->thread, MSG_RESET);
@ -331,6 +332,8 @@ void usbStop(USBDriver *usbp) {
osalThreadResumeI(&usbp->epc[i]->out_state->thread, MSG_RESET);
}
}
#endif
usbp->epc[i] = NULL;
}
osalOsRescheduleS();
osalSysUnlock();