diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-04-27 10:06:06 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-04-27 10:06:06 +0000 |
commit | 4434fed8d81d9bc3a41a02a645bfd719ff941f73 (patch) | |
tree | 0cb7212b530b88875e1d25b0b2ebb633cf5ac800 /os/hal/src | |
parent | 6d4cee3b28ab9446fa8f567bdd0199c16561bad8 (diff) | |
download | ChibiOS-4434fed8d81d9bc3a41a02a645bfd719ff941f73.tar.gz ChibiOS-4434fed8d81d9bc3a41a02a645bfd719ff941f73.tar.bz2 ChibiOS-4434fed8d81d9bc3a41a02a645bfd719ff941f73.zip |
Fixed stop procedure in the USB driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5634 35acf78f-673a-0410-8e92-d51de3d6d3f4
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;
|