Fixed Device Mode not handling Set Feature and Clear Feature Chapter 9 requests that...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 13 May 2009 22:40:08 +0000 (22:40 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 13 May 2009 22:40:08 +0000 (22:40 +0000)
LUFA/ChangeLog.txt
LUFA/Drivers/USB/LowLevel/DevChapter9.c

index 1833596..d868055 100644 (file)
@@ -13,6 +13,7 @@
   *  - Fixed RNDISEthernet not working under Linux due to Linux requiring an "optional" request which was unhandled\r
   *  - Fixed Mouse and Keyboard device demos not acting in accordance with the HID specification for idle periods (thanks to Brian Dickman)\r
   *  - Removed support for endpoint/pipe non-control interrupts; these did not act in the way users expected, and had many subtle issues\r
+  *  - Fixed Device Mode not handling Set Feature and Clear Feature Chapter 9 requests that are addressed to the device (thanks to Brian Dickman)\r
   *\r
   *\r
   *  \section Sec_ChangeLog090510 Version 090510\r
index 6ecadb0..785d10f 100644 (file)
@@ -62,7 +62,8 @@ void USB_Device_ProcessControlPacket(void)
                        break;\r
                case REQ_ClearFeature:\r
                case REQ_SetFeature:\r
-                       if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT))\r
+                       if ((bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE)) ||\r
+                           (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT)))\r
                        {\r
                                USB_Device_ClearSetFeature();\r
                                RequestHandled = true;\r