Skip to content

Commit

Permalink
usb: do not disable endpoints at USB_DC_SUSPEND event
Browse files Browse the repository at this point in the history
Do not disable endpoints at USB_DC_SUSPEND event.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
  • Loading branch information
jfischer-no authored and carlescufi committed Aug 7, 2019
1 parent 4c21b0f commit 8e9bf88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions subsys/usb/usb_device.c
Expand Up @@ -942,8 +942,10 @@ static void forward_status_cb(enum usb_dc_status_code status, const u8_t *param)
if (status == USB_DC_DISCONNECTED || status == USB_DC_SUSPEND) {
if (usb_dev.configured) {
usb_cancel_transfers();
foreach_ep(disable_interface_ep);
usb_dev.configured = false;
if (status == USB_DC_DISCONNECTED) {
foreach_ep(disable_interface_ep);
usb_dev.configured = false;
}
}
}

Expand Down

0 comments on commit 8e9bf88

Please sign in to comment.