aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/KINETIS
diff options
context:
space:
mode:
authorfunnydog <funnydog@users.noreply.github.com>2016-12-13 08:03:55 +0100
committerfunnydog <funnydog@users.noreply.github.com>2016-12-13 08:52:47 +0100
commitdc478a551138b03c73997d091180cf15eb4afb57 (patch)
treeaf5484e7e6eecb832d5b34298cb79becfb731fc1 /testhal/KINETIS
parentb403f064d4a33c0da1e7c6b258700e1451373db0 (diff)
downloadChibiOS-Contrib-dc478a551138b03c73997d091180cf15eb4afb57.tar.gz
ChibiOS-Contrib-dc478a551138b03c73997d091180cf15eb4afb57.tar.bz2
ChibiOS-Contrib-dc478a551138b03c73997d091180cf15eb4afb57.zip
testhal: handle USB_EVENT_(RESET|UNCONFIGURED) in KINETIS demos
Handle the USB_EVENT_RESET and USB_EVENT_UNCONFIGURED as they were USB_EVENT_SUSPEND like in STM32 demos.
Diffstat (limited to 'testhal/KINETIS')
-rw-r--r--testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c6
-rw-r--r--testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c2
-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
6 files changed, 22 insertions, 10 deletions
diff --git a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c
index 750f5ca..5c47795 100644
--- a/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/usbcfg.c
@@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) {
- case USB_EVENT_RESET:
- return;
case USB_EVENT_ADDRESS:
return;
case USB_EVENT_CONFIGURED:
@@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
+ case USB_EVENT_RESET:
+ /* Falls into. */
+ case USB_EVENT_UNCONFIGURED:
+ /* Falls into. */
case USB_EVENT_SUSPEND:
chSysLockFromISR();
diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c
index 30944b5..1f04a4c 100644
--- a/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c
+++ b/testhal/KINETIS/FRDM-KL25Z/USB_HID/usbcfg.c
@@ -315,6 +315,8 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
osalSysUnlockFromISR();
return;
+ case USB_EVENT_UNCONFIGURED:
+ return;
case USB_EVENT_SUSPEND:
return;
case USB_EVENT_WAKEUP:
diff --git a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
index 557d139..0ec1c62 100644
--- a/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-KL25Z/USB_SERIAL/usbcfg.c
@@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) {
- case USB_EVENT_RESET:
- return;
case USB_EVENT_ADDRESS:
return;
case USB_EVENT_CONFIGURED:
@@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
+ case USB_EVENT_RESET:
+ /* Falls into. */
+ case USB_EVENT_UNCONFIGURED:
+ /* Falls into. */
case USB_EVENT_SUSPEND:
chSysLockFromISR();
diff --git a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c
index 557d139..0ec1c62 100644
--- a/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/FRDM-KL26Z/USB_SERIAL/usbcfg.c
@@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) {
- case USB_EVENT_RESET:
- return;
case USB_EVENT_ADDRESS:
return;
case USB_EVENT_CONFIGURED:
@@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
+ case USB_EVENT_RESET:
+ /* Falls into. */
+ case USB_EVENT_UNCONFIGURED:
+ /* Falls into. */
case USB_EVENT_SUSPEND:
chSysLockFromISR();
diff --git a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c
index 557d139..0ec1c62 100644
--- a/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/MCHCK/USB_SERIAL/usbcfg.c
@@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) {
- case USB_EVENT_RESET:
- return;
case USB_EVENT_ADDRESS:
return;
case USB_EVENT_CONFIGURED:
@@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
+ case USB_EVENT_RESET:
+ /* Falls into. */
+ case USB_EVENT_UNCONFIGURED:
+ /* Falls into. */
case USB_EVENT_SUSPEND:
chSysLockFromISR();
diff --git a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c
index 557d139..0ec1c62 100644
--- a/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c
+++ b/testhal/KINETIS/TEENSY3_x/USB_SERIAL/usbcfg.c
@@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) {
- case USB_EVENT_RESET:
- return;
case USB_EVENT_ADDRESS:
return;
case USB_EVENT_CONFIGURED:
@@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
chSysUnlockFromISR();
return;
+ case USB_EVENT_RESET:
+ /* Falls into. */
+ case USB_EVENT_UNCONFIGURED:
+ /* Falls into. */
case USB_EVENT_SUSPEND:
chSysLockFromISR();