diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-10 11:24:15 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-10 11:24:15 +0000 |
commit | 5de364163f5a7597ba2f54e37cdea493fbd1e7ff (patch) | |
tree | 5fcd9f4c88696ea32d7bdec6721e8243d49567ca /LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c | |
parent | c1782ac024a42c06680f511c939e653aacdb411d (diff) | |
download | lufa-5de364163f5a7597ba2f54e37cdea493fbd1e7ff.tar.gz lufa-5de364163f5a7597ba2f54e37cdea493fbd1e7ff.tar.bz2 lufa-5de364163f5a7597ba2f54e37cdea493fbd1e7ff.zip |
Update CDC Class Driver character stream functions to use the correct avr-libc return codes for errors and EOF.
Fix pointer arithmetic on void byte buffers by explicitly typecasting the buffer pointers to uint8_t* before altering them.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c index ce402ad84..a2a9b8c1a 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c @@ -1,6 +1,6 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
{
- uint8_t* DataStream = (uint8_t*)(Buffer + TEMPLATE_BUFFER_OFFSET(Length));
+ uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
bool LastPacketFull = false;
if (Length > USB_ControlRequest.wLength)
|