diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-09-08 12:28:44 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-09-08 12:28:44 +0000 |
commit | e5833b6a09786844ae09f389d768accec9678026 (patch) | |
tree | 879fb45694cc431f39098e05c9ae6c0e9cde8c0e /testhal/STM32/STM32F7xx | |
parent | aa7557a5f206124dc232343be2010f7d9b82e267 (diff) | |
download | ChibiOS-e5833b6a09786844ae09f389d768accec9678026.tar.gz ChibiOS-e5833b6a09786844ae09f389d768accec9678026.tar.bz2 ChibiOS-e5833b6a09786844ae09f389d768accec9678026.zip |
Disconnect handling in SDU driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8287 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F7xx')
-rw-r--r-- | testhal/STM32/STM32F7xx/USB_CDC/usbcfg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testhal/STM32/STM32F7xx/USB_CDC/usbcfg.c b/testhal/STM32/STM32F7xx/USB_CDC/usbcfg.c index 73ada5cc0..968fd6724 100644 --- a/testhal/STM32/STM32F7xx/USB_CDC/usbcfg.c +++ b/testhal/STM32/STM32F7xx/USB_CDC/usbcfg.c @@ -284,6 +284,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;
|