Renamed NO_CLEARSET_FEATURE_REQUEST compile time token to NO_FEATURELESS_CONTROL_ONLY...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 11 Mar 2009 13:11:58 +0000 (13:11 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 11 Mar 2009 13:11:58 +0000 (13:11 +0000)
Bootloaders/DFU/makefile
Bootloaders/TeensyHID/makefile
LUFA/ChangeLog.txt
LUFA/CompileTimeTokens.txt
LUFA/Drivers/USB/LowLevel/DevChapter9.c
LUFA/Drivers/USB/LowLevel/DevChapter9.h
LUFA/MigrationInformation.txt

index 88c539c..9e812e5 100644 (file)
@@ -165,7 +165,7 @@ BOOT_START = 0x1E000
 \r
 # Place -D or -U options here for C sources\r
 CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_CLEARSET_FEATURE_REQUEST\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DFEATURELESS_CONTROL_ONLY_DEVICE\r
 CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=32\r
 CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
 CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DUSE_SINGLE_DEVICE_CONFIGURATION\r
index 8d8636f..1a544dd 100644 (file)
@@ -165,7 +165,7 @@ BOOT_START = 0xC000
 \r
 # Place -D or -U options here for C sources\r
 CDEFS  = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)\r
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_CLEARSET_FEATURE_REQUES\r
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DFEATURELESS_CONTROL_ONLY_DEVICE\r
 CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=8\r
 CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"\r
 CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DUSE_SINGLE_DEVICE_CONFIGURATION\r
index d283d7f..05e6fe5 100644 (file)
@@ -30,6 +30,8 @@
   *  - Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances\r
   *  - Removed SetSystemClockPrescaler() macro, the clock_prescale_set() avr-libc macro has been corrected in recent avr-libc versions\r
   *  - Fixed incorrect/missing control status stage transfers on demos, bootloaders and applications (thanks to Nate Lawson)\r
+  *  - The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to NO_FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded\r
+  *    to also remove parts of the Get Status chapter 9 request to further reduce code usage\r
   *\r
   *  \section Sec_ChangeLog090209 Version 090209\r
   *\r
index 196132b..e93e1ad 100644 (file)
  *  EEPROM or RAM rather than flash memory) and reduces code maintenance. However, many USB device projects use only a single configuration.\r
  *  Defining this token enables single-configuration mode, reducing the compiled size of the binary at the expense of flexibility.\r
  *\r
- *  <b>NO_CLEARSET_FEATURE_REQUEST</b> - DevChapter9.h \n\r
- *  In some limited USB device applications, the Get Feature and Set Feature requests are not used - this is when the device does not have\r
- *  device level features (such as remote wakeup) nor any data endpoints beyond the mandatory control endpoint. In such limited situations,\r
- *  this token may be defined to remove the handling of the Get Feature and Set Feature Chapter 9 requests to save space. Generally, this\r
- *  is usually only useful in (some) bootloaders.\r
+ *  <b>FEATURELESS_CONTROL_ONLY_DEVICE</b> - DevChapter9.h \n\r
+ *  In some limited USB device applications, device features (other than self-power) and endpoints other than the control endpoint aren't\r
+ *  used. In such limited situations, this token may be defined to remove the handling of the Set Feature Chapter 9 request entirely and\r
+ *  parts of the Get Feature chapter 9 request to save space. Generally, this is usually only useful in (some) bootloaders.\r
  *\r
  *  <b>NO_STREAM_CALLBACKS</b> - Endpoint.h, Pipe.h \n\r
  *  Both the endpoint and the pipe driver code contains stream functions, allowing for arrays of data to be sent to or from the\r
index 9ea3f41..44493e6 100644 (file)
@@ -55,7 +55,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 +238,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 +252,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 +272,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
index 5e1772a..543c1a9 100644 (file)
                                static void USB_Device_GetConfiguration(void);\r
                                static void USB_Device_GetDescriptor(void);\r
                                static void USB_Device_GetStatus(const uint8_t bmRequestType);\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
                                #endif\r
                        #endif\r
index 75b5d19..25bf782 100644 (file)
  *  <b>Non-USB Library Components</b>\r
  *    - The ATTR_ALWAYSINLINE function attribute macro has been renamed to ATTR_ALWAYS_INLINE.\r
  *\r
+ *  <b>Device Mode</b>\r
+ *    - The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to NO_FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded\r
+ *      to also remove parts of the Get Status chapter 9 request to further reduce code usage. On all applications currently using the \r
+ *      NO_CLEARSET_FEATURE_REQUEST compile time token, it can be replaced with the NO_FEATURELESS_CONTROL_ONLY_DEVICE token with no further\r
+ *      modifications required.\r
+ *\r
  * \section Sec_Migration090209 Migrating from 081217 to 090209\r
  *\r
  *  <b>Device Mode</b>\r