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/platforms/STM32 | |
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/platforms/STM32')
-rw-r--r-- | os/hal/platforms/STM32/OTGv1/usb_lld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 3e50ccfe5..f6287a49c 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -927,6 +927,10 @@ void usb_lld_stop(USBDriver *usbp) { /* If in ready state then disables the USB clock.*/
if (usbp->state != USB_STOP) {
+ /* Disabling all endpoints in case the driver has been stopped while
+ active.*/
+ otg_disable_ep(usbp);
+
usbp->txpending = 0;
otgp->DAINTMSK = 0;
|