aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bootloaders/DFU/makefile2
-rw-r--r--Bootloaders/TeensyHID/makefile2
-rw-r--r--LUFA/ChangeLog.txt2
-rw-r--r--LUFA/CompileTimeTokens.txt9
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.c8
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.h2
-rw-r--r--LUFA/MigrationInformation.txt6
7 files changed, 21 insertions, 10 deletions
diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile
index 88c539ca5..9e812e5de 100644
--- a/Bootloaders/DFU/makefile
+++ b/Bootloaders/DFU/makefile
@@ -165,7 +165,7 @@ BOOT_START = 0x1E000
# Place -D or -U options here for C sources
CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_CLEARSET_FEATURE_REQUEST
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DFEATURELESS_CONTROL_ONLY_DEVICE
CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=32
CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DUSE_SINGLE_DEVICE_CONFIGURATION
diff --git a/Bootloaders/TeensyHID/makefile b/Bootloaders/TeensyHID/makefile
index 8d8636f36..1a544dd78 100644
--- a/Bootloaders/TeensyHID/makefile
+++ b/Bootloaders/TeensyHID/makefile
@@ -165,7 +165,7 @@ BOOT_START = 0xC000
# Place -D or -U options here for C sources
CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD)
-CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DNO_CLEARSET_FEATURE_REQUES
+CDEFS += -DUSB_DEVICE_ONLY -DUSE_NONSTANDARD_DESCRIPTOR_NAMES -DFEATURELESS_CONTROL_ONLY_DEVICE
CDEFS += -DSTATIC_ENDPOINT_CONFIGURATION -DFIXED_CONTROL_ENDPOINT_SIZE=8
CDEFS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
CDEFS += -DUSE_RAM_DESCRIPTORS -DBOOT_START_ADDR=$(BOOT_START)UL -DUSE_SINGLE_DEVICE_CONFIGURATION
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt
index d283d7f95..05e6fe543 100644
--- a/LUFA/ChangeLog.txt
+++ b/LUFA/ChangeLog.txt
@@ -30,6 +30,8 @@
* - Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances
* - Removed SetSystemClockPrescaler() macro, the clock_prescale_set() avr-libc macro has been corrected in recent avr-libc versions
* - Fixed incorrect/missing control status stage transfers on demos, bootloaders and applications (thanks to Nate Lawson)
+ * - The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to NO_FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded
+ * to also remove parts of the Get Status chapter 9 request to further reduce code usage
*
* \section Sec_ChangeLog090209 Version 090209
*
diff --git a/LUFA/CompileTimeTokens.txt b/LUFA/CompileTimeTokens.txt
index 196132b95..e93e1ad32 100644
--- a/LUFA/CompileTimeTokens.txt
+++ b/LUFA/CompileTimeTokens.txt
@@ -111,11 +111,10 @@
* EEPROM or RAM rather than flash memory) and reduces code maintenance. However, many USB device projects use only a single configuration.
* Defining this token enables single-configuration mode, reducing the compiled size of the binary at the expense of flexibility.
*
- * <b>NO_CLEARSET_FEATURE_REQUEST</b> - DevChapter9.h \n
- * In some limited USB device applications, the Get Feature and Set Feature requests are not used - this is when the device does not have
- * device level features (such as remote wakeup) nor any data endpoints beyond the mandatory control endpoint. In such limited situations,
- * this token may be defined to remove the handling of the Get Feature and Set Feature Chapter 9 requests to save space. Generally, this
- * is usually only useful in (some) bootloaders.
+ * <b>FEATURELESS_CONTROL_ONLY_DEVICE</b> - DevChapter9.h \n
+ * In some limited USB device applications, device features (other than self-power) and endpoints other than the control endpoint aren't
+ * used. In such limited situations, this token may be defined to remove the handling of the Set Feature Chapter 9 request entirely and
+ * parts of the Get Feature chapter 9 request to save space. Generally, this is usually only useful in (some) bootloaders.
*
* <b>NO_STREAM_CALLBACKS</b> - Endpoint.h, Pipe.h \n
* Both the endpoint and the pipe driver code contains stream functions, allowing for arrays of data to be sent to or from the
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index 9ea3f417c..44493e698 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@ -55,7 +55,7 @@ void USB_Device_ProcessControlPacket(void)
}
break;
-#if !defined(NO_CLEARSET_FEATURE_REQUEST)
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
case REQ_ClearFeature:
case REQ_SetFeature:
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT))
@@ -238,7 +238,9 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
Endpoint_Discard_Word();
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
uint8_t wIndex_LSB = Endpoint_Read_Byte();
+#endif
switch (bmRequestType)
{
@@ -250,12 +252,14 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
break;
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
case (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_ENDPOINT):
Endpoint_SelectEndpoint(wIndex_LSB);
CurrentStatus = Endpoint_IsStalled();
break;
+#endif
}
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
@@ -268,7 +272,7 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
Endpoint_ClearSetupOUT();
}
-#if !defined(NO_CLEARSET_FEATURE_REQUEST)
+#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmRequestType)
{
uint16_t wValue = Endpoint_Read_Word_LE();
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.h b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
index 5e1772a53..543c1a940 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.h
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.h
@@ -121,7 +121,7 @@
static void USB_Device_GetConfiguration(void);
static void USB_Device_GetDescriptor(void);
static void USB_Device_GetStatus(const uint8_t bmRequestType);
- #if !defined(NO_CLEARSET_FEATURE_REQUEST)
+ #if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)
static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmRequestType);
#endif
#endif
diff --git a/LUFA/MigrationInformation.txt b/LUFA/MigrationInformation.txt
index 75b5d1912..25bf78268 100644
--- a/LUFA/MigrationInformation.txt
+++ b/LUFA/MigrationInformation.txt
@@ -29,6 +29,12 @@
* <b>Non-USB Library Components</b>
* - The ATTR_ALWAYSINLINE function attribute macro has been renamed to ATTR_ALWAYS_INLINE.
*
+ * <b>Device Mode</b>
+ * - The NO_CLEARSET_FEATURE_REQUEST compile time token has been renamed to NO_FEATURELESS_CONTROL_ONLY_DEVICE, and its function expanded
+ * to also remove parts of the Get Status chapter 9 request to further reduce code usage. On all applications currently using the
+ * NO_CLEARSET_FEATURE_REQUEST compile time token, it can be replaced with the NO_FEATURELESS_CONTROL_ONLY_DEVICE token with no further
+ * modifications required.
+ *
* \section Sec_Migration090209 Migrating from 081217 to 090209
*
* <b>Device Mode</b>