Corrected AudioInput and AudioOutput demos, to fix endpoint underflows due to roundin...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / DevChapter9.c
index 9ea3f41..765627b 100644 (file)
@@ -28,7 +28,8 @@
   this software.\r
 */\r
 \r
-#include "USBMode.h"\r
+#include "../HighLevel/USBMode.h"\r
+\r
 #if defined(USB_CAN_BE_DEVICE)\r
 \r
 #define  INCLUDE_FROM_DEVCHAPTER9_C\r
@@ -55,7 +56,7 @@ void USB_Device_ProcessControlPacket(void)
                        }\r
 \r
                        break;\r
-#if !defined(NO_CLEARSET_FEATURE_REQUEST)\r
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
                case REQ_ClearFeature:\r
                case REQ_SetFeature:\r
                        if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT))\r
@@ -238,7 +239,9 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
 \r
        Endpoint_Discard_Word();\r
 \r
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
        uint8_t wIndex_LSB = Endpoint_Read_Byte();\r
+#endif\r
        \r
        switch (bmRequestType)\r
        {\r
@@ -250,12 +253,14 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
                          CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;\r
                        \r
                        break;\r
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
                case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):\r
                        Endpoint_SelectEndpoint(wIndex_LSB);\r
 \r
                        CurrentStatus = Endpoint_IsStalled();\r
 \r
                        break;\r
+#endif\r
        }\r
        \r
        Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);                      \r
@@ -268,7 +273,7 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
        Endpoint_ClearSetupOUT();\r
 }\r
 \r
-#if !defined(NO_CLEARSET_FEATURE_REQUEST)\r
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
 static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmRequestType)\r
 {\r
        uint16_t wValue = Endpoint_Read_Word_LE();\r