aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/LowLevel/Endpoint.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2009-12-21 08:29:12 +0000
committerDean Camera <[email protected]>2009-12-21 08:29:12 +0000
commitd4952265a6de30e2cc205cb5b65c8b43ab483fb5 (patch)
tree5b2d1e88df68f28e605ff8edccfdcca3203f38a0 /LUFA/Drivers/USB/LowLevel/Endpoint.c
parentc99f6657a6335b0a70fac9c6278672057e57f525 (diff)
downloadqmk_firmware-d4952265a6de30e2cc205cb5b65c8b43ab483fb5.tar.gz
qmk_firmware-d4952265a6de30e2cc205cb5b65c8b43ab483fb5.zip
Ensure that unsupported SetFeature/ClearFeature request targets cause a STALL back to the host.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Endpoint.c')
-rw-r--r--LUFA/Drivers/USB/LowLevel/Endpoint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.c b/LUFA/Drivers/USB/LowLevel/Endpoint.c
index b0c09ca8d9..2244996d4d 100644
--- a/LUFA/Drivers/USB/LowLevel/Endpoint.c
+++ b/LUFA/Drivers/USB/LowLevel/Endpoint.c
@@ -207,6 +207,9 @@ uint8_t Endpoint_Discard_Stream(uint16_t Length
return ENDPOINT_RWSTREAM_NoError;
}
+/* The following abuses the C preprocessor in order to copy-past common code with slight alterations,
+ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
+
#define TEMPLATE_FUNC_NAME Endpoint_Write_Stream_LE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()