|
|
@ -182,9 +182,6 @@ ISR(TIMER1_OVF_vect, ISR_BLOCK)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void EVENT_USB_Device_ControlRequest(void)
|
|
|
|
void EVENT_USB_Device_ControlRequest(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* Get the size of the command and data from the wLength value */
|
|
|
|
|
|
|
|
SentCommand.DataSize = USB_ControlRequest.wLength;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Ignore any requests that aren't directed to the DFU interface */
|
|
|
|
/* Ignore any requests that aren't directed to the DFU interface */
|
|
|
|
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
|
|
|
|
if ((USB_ControlRequest.bmRequestType & (CONTROL_REQTYPE_TYPE | CONTROL_REQTYPE_RECIPIENT)) !=
|
|
|
|
(REQTYPE_CLASS | REQREC_INTERFACE))
|
|
|
|
(REQTYPE_CLASS | REQREC_INTERFACE))
|
|
|
@ -192,6 +189,12 @@ void EVENT_USB_Device_ControlRequest(void)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Activity - toggle indicator LEDs */
|
|
|
|
|
|
|
|
LEDs_ToggleLEDs(LEDS_LED1 | LEDS_LED2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Get the size of the command and data from the wLength value */
|
|
|
|
|
|
|
|
SentCommand.DataSize = USB_ControlRequest.wLength;
|
|
|
|
|
|
|
|
|
|
|
|
switch (USB_ControlRequest.bRequest)
|
|
|
|
switch (USB_ControlRequest.bRequest)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case DFU_REQ_DNLOAD:
|
|
|
|
case DFU_REQ_DNLOAD:
|
|
|
|