diff options
Diffstat (limited to 'os/hal/src')
-rw-r--r-- | os/hal/src/usb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index 1e7c35121..9c3825910 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -282,7 +282,8 @@ void usbStop(USBDriver *usbp) { chDbgCheck(usbp != NULL, "usbStop");
chSysLock();
- chDbgAssert((usbp->state == USB_STOP) || (usbp->state == USB_READY),
+ chDbgAssert((usbp->state == USB_STOP) || (usbp->state == USB_READY) ||
+ (usbp->state == USB_SELECTED) || (usbp->state == USB_ACTIVE),
"usbStop(), #1", "invalid state");
usb_lld_stop(usbp);
usbp->state = USB_STOP;
|