diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-12-21 08:29:12 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-12-21 08:29:12 +0000 |
| commit | ed96395683b13d7fc810ca6ad1e2d0741da53127 (patch) | |
| tree | 5b2d1e88df68f28e605ff8edccfdcca3203f38a0 /LUFA/Drivers/USB/LowLevel/Pipe.c | |
| parent | b3c255659f933a8989db339967f15973ffadb073 (diff) | |
Ensure that unsupported SetFeature/ClearFeature request targets cause a STALL back to the host.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@997 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Pipe.c')
| -rw-r--r-- | LUFA/Drivers/USB/LowLevel/Pipe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c index 5c7b32af..897c50b4 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.c +++ b/LUFA/Drivers/USB/LowLevel/Pipe.c @@ -199,6 +199,9 @@ uint8_t Pipe_Discard_Stream(uint16_t Length return PIPE_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 Pipe_Write_Stream_LE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT
|
