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.
This commit is contained in:
parent
b403f064d4
commit
dc478a5511
|
@ -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();
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue