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;
|
extern SerialUSBDriver SDU1;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case USB_EVENT_RESET:
|
|
||||||
return;
|
|
||||||
case USB_EVENT_ADDRESS:
|
case USB_EVENT_ADDRESS:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_CONFIGURED:
|
case USB_EVENT_CONFIGURED:
|
||||||
|
@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_RESET:
|
||||||
|
/* Falls into. */
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
/* Falls into. */
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
|
|
||||||
|
|
|
@ -315,6 +315,8 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
osalSysUnlockFromISR();
|
osalSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
return;
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_WAKEUP:
|
case USB_EVENT_WAKEUP:
|
||||||
|
|
|
@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
extern SerialUSBDriver SDU1;
|
extern SerialUSBDriver SDU1;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case USB_EVENT_RESET:
|
|
||||||
return;
|
|
||||||
case USB_EVENT_ADDRESS:
|
case USB_EVENT_ADDRESS:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_CONFIGURED:
|
case USB_EVENT_CONFIGURED:
|
||||||
|
@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_RESET:
|
||||||
|
/* Falls into. */
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
/* Falls into. */
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
|
|
||||||
|
|
|
@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
extern SerialUSBDriver SDU1;
|
extern SerialUSBDriver SDU1;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case USB_EVENT_RESET:
|
|
||||||
return;
|
|
||||||
case USB_EVENT_ADDRESS:
|
case USB_EVENT_ADDRESS:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_CONFIGURED:
|
case USB_EVENT_CONFIGURED:
|
||||||
|
@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_RESET:
|
||||||
|
/* Falls into. */
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
/* Falls into. */
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
|
|
||||||
|
|
|
@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
extern SerialUSBDriver SDU1;
|
extern SerialUSBDriver SDU1;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case USB_EVENT_RESET:
|
|
||||||
return;
|
|
||||||
case USB_EVENT_ADDRESS:
|
case USB_EVENT_ADDRESS:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_CONFIGURED:
|
case USB_EVENT_CONFIGURED:
|
||||||
|
@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_RESET:
|
||||||
|
/* Falls into. */
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
/* Falls into. */
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
|
|
||||||
|
|
|
@ -262,8 +262,6 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
extern SerialUSBDriver SDU1;
|
extern SerialUSBDriver SDU1;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case USB_EVENT_RESET:
|
|
||||||
return;
|
|
||||||
case USB_EVENT_ADDRESS:
|
case USB_EVENT_ADDRESS:
|
||||||
return;
|
return;
|
||||||
case USB_EVENT_CONFIGURED:
|
case USB_EVENT_CONFIGURED:
|
||||||
|
@ -280,6 +278,10 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
|
|
||||||
chSysUnlockFromISR();
|
chSysUnlockFromISR();
|
||||||
return;
|
return;
|
||||||
|
case USB_EVENT_RESET:
|
||||||
|
/* Falls into. */
|
||||||
|
case USB_EVENT_UNCONFIGURED:
|
||||||
|
/* Falls into. */
|
||||||
case USB_EVENT_SUSPEND:
|
case USB_EVENT_SUSPEND:
|
||||||
chSysLockFromISR();
|
chSysLockFromISR();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue