aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-09-08 13:36:30 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-09-08 13:36:30 +0000
commit98bb7fb5df434b95253c5949444ee2dcff3a53b3 (patch)
tree8a2e66cf00718d14da5bbd4e1f6b446612cd08f0 /demos
parente5833b6a09786844ae09f389d768accec9678026 (diff)
downloadChibiOS-98bb7fb5df434b95253c5949444ee2dcff3a53b3.tar.gz
ChibiOS-98bb7fb5df434b95253c5949444ee2dcff3a53b3.tar.bz2
ChibiOS-98bb7fb5df434b95253c5949444ee2dcff3a53b3.zip
Update USB demos with latest changes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8288 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c
index 4e114a51a..5f2888452 100644
--- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c
+++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c
@@ -425,6 +425,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
case USB_EVENT_SUSPEND:
+ chSysLockFromISR();
+
+ /* Disconnection event on suspend.*/
+ sduDisconnectI(&SDU2);
+
+ chSysUnlockFromISR();
return;
case USB_EVENT_WAKEUP:
return;