aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-27 10:06:06 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-27 10:06:06 +0000
commit4434fed8d81d9bc3a41a02a645bfd719ff941f73 (patch)
tree0cb7212b530b88875e1d25b0b2ebb633cf5ac800 /os/hal/src
parent6d4cee3b28ab9446fa8f567bdd0199c16561bad8 (diff)
downloadChibiOS-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.c3
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;