USB_HostRequest renamed to USB_ControlRequest, entire control request header is now...
[pub/USBasp.git] / Bootloaders / DFU / BootloaderDFU.c
index 289b4eb..83881f1 100644 (file)
@@ -151,16 +151,10 @@ EVENT_HANDLER(USB_Disconnect)
  */\r
 EVENT_HANDLER(USB_UnhandledControlPacket)\r
 {\r
-       /* Discard unused wIndex value */\r
-       Endpoint_Discard_Word();\r
-       \r
-       /* Discard unused wValue value */\r
-       Endpoint_Discard_Word();\r
-\r
        /* Get the size of the command and data from the wLength value */\r
-       SentCommand.DataSize = Endpoint_Read_Word_LE();\r
+       SentCommand.DataSize = USB_ControlRequest.wLength;\r
 \r
-       switch (bRequest)\r
+       switch (USB_ControlRequest.bRequest)\r
        {\r
                case DFU_DNLOAD:\r
                        Endpoint_ClearSETUP();\r