aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/KINETIS
diff options
context:
space:
mode:
authorfunnydog <funnydog@users.noreply.github.com>2016-12-13 07:54:25 +0100
committerfunnydog <funnydog@users.noreply.github.com>2016-12-13 08:51:52 +0100
commitb403f064d4a33c0da1e7c6b258700e1451373db0 (patch)
tree54d011ef03cdd463b4ca8ec8d0d61bb2788bf8f3 /testhal/KINETIS
parent2b9cfccc7657157b95d1d7f2fc079207a3c883c0 (diff)
downloadChibiOS-Contrib-b403f064d4a33c0da1e7c6b258700e1451373db0.tar.gz
ChibiOS-Contrib-b403f064d4a33c0da1e7c6b258700e1451373db0.tar.bz2
ChibiOS-Contrib-b403f064d4a33c0da1e7c6b258700e1451373db0.zip
testhal: add missing sduWakeupHookI() call to KINETIS usb_serial demos
Add the missing call to sduWakeupHookI() to the USB_EVENT_WAKEUP event, with proper locking around them.
Diffstat (limited to 'testhal/KINETIS')
-rw-r--r--testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c6
-rw-r--r--testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c6
-rw-r--r--testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c6
-rw-r--r--testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c6
-rw-r--r--testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c6
5 files changed, 30 insertions, 0 deletions
diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c
index 96bfdba..750f5ca 100644
--- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-K20D50M/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;
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;
diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c
index fa5b4f4..557d139 100644
--- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-KL26Z/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;
diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c
index fa5b4f4..557d139 100644
--- a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/MCHCK/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;
diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c
index fa5b4f4..557d139 100644
--- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/TEENSY3_x/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;