diff options
Diffstat (limited to 'Bootloaders/DFU/BootloaderDFU.c')
-rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 289b4eb22..83881f13e 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -151,16 +151,10 @@ EVENT_HANDLER(USB_Disconnect) */
EVENT_HANDLER(USB_UnhandledControlPacket)
{
- /* Discard unused wIndex value */
- Endpoint_Discard_Word();
-
- /* Discard unused wValue value */
- Endpoint_Discard_Word();
-
/* Get the size of the command and data from the wLength value */
- SentCommand.DataSize = Endpoint_Read_Word_LE();
+ SentCommand.DataSize = USB_ControlRequest.wLength;
- switch (bRequest)
+ switch (USB_ControlRequest.bRequest)
{
case DFU_DNLOAD:
Endpoint_ClearSETUP();
|