Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>

#include <libopencm3/cm3/scb.h>
#include <libopencm3/cm3/vector.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/dfu.h>
Expand Down Expand Up @@ -294,6 +295,11 @@ static int dfu_control_class_request(usbd_device *usbd_dev,
}
#endif
case DFU_DETACH:
/* Best we can do! */
scb_reset_system();
status = USBD_REQ_HANDLED;
break;

default: {
/* Stall the control pipe */
dfu_set_status(DFU_STATUS_ERR_STALLEDPKT);
Expand Down