\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
\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
* - 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
* 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
}\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
\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
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
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
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
* <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