Support DFU GET_STATUS request when in application mode.
This commit is contained in:
parent
f2f5fd2fa1
commit
f5d8bda6e6
|
@ -434,6 +434,20 @@ static int cdcacm_control_request(struct usb_setup_data *req, uint8_t **buf,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
case DFU_GETSTATUS:
|
||||||
|
if(req->wIndex == DFU_IF_NO) {
|
||||||
|
u32 bwPollTimeout = 0; /* 24-bit integer in DFU class spec */
|
||||||
|
|
||||||
|
(*buf)[0] = DFU_STATUS_OK;
|
||||||
|
(*buf)[1] = 0;
|
||||||
|
(*buf)[2] = 0;
|
||||||
|
(*buf)[3] = 0;
|
||||||
|
(*buf)[4] = STATE_APP_IDLE;
|
||||||
|
(*buf)[5] = 0; /* iString not used here */
|
||||||
|
*len = 6;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
case DFU_DETACH:
|
case DFU_DETACH:
|
||||||
if(req->wIndex == DFU_IF_NO) {
|
if(req->wIndex == DFU_IF_NO) {
|
||||||
*complete = dfu_detach_complete;
|
*complete = dfu_detach_complete;
|
||||||
|
|
Loading…
Reference in New Issue