aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c')
-rw-r--r--testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
index fa5b4f4..557d139 100644
--- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
@@ -289,6 +289,12 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
case USB_EVENT_WAKEUP:
+ chSysLockFromISR();
+
+ /* Disconnection event on suspend */
+ sduWakeupHookI(&SDU1);
+
+ chSysUnlockFromISR();
return;
case USB_EVENT_STALLED:
return;