diff options
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDC.c | 5 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.c | 40 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Pipe.c | 20 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c | 2 |
10 files changed, 41 insertions, 43 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index d0cb29ecf..c86b970a3 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -242,14 +242,13 @@ void CDC_Device_CreateStream(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo, FILE* static int CDC_Device_putchar(char c, FILE* Stream)
{
- CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c);
- return 0;
+ return CDC_Device_SendByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
}
static int CDC_Device_getchar(FILE* Stream)
{
if (!(CDC_Device_BytesReceived((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream))))
- return -1;
+ return _FDEV_EOF;
return CDC_Device_ReceiveByte((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream));
}
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c index 6aceccaf1..5467e3df3 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.c +++ b/LUFA/Drivers/USB/Class/Host/CDC.c @@ -342,14 +342,13 @@ void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, FILE* Str static int CDC_Host_putchar(char c, FILE* Stream)
{
- CDC_Host_SendByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream), c);
- return 0;
+ return CDC_Host_SendByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;
}
static int CDC_Host_getchar(FILE* Stream)
{
if (!(CDC_Host_BytesReceived((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream))))
- return -1;
+ return _FDEV_EOF;
return CDC_Host_ReceiveByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream));
}
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h index 6d57d2e78..c2dc5038a 100644 --- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h +++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.h @@ -263,8 +263,8 @@ {
uint16_t CurrDescriptorSize = DESCRIPTOR_CAST(*CurrConfigLoc, USB_Descriptor_Header_t).Size;
- *CurrConfigLoc += CurrDescriptorSize;
- *BytesRem -= CurrDescriptorSize;
+ *((uint8_t**)CurrConfigLoc) += CurrDescriptorSize;
+ *BytesRem -= CurrDescriptorSize;
}
/* Disable C linkage for C++ Compilers: */
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.c b/LUFA/Drivers/USB/LowLevel/Endpoint.c index 67e9457fd..6d59510b8 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.c +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.c @@ -211,122 +211,122 @@ uint8_t Endpoint_Discard_Stream(uint16_t Length #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_PStream_LE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_EStream_LE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Stream_BE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_EStream_BE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_PStream_BE
#define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Stream_LE
#define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr++) = Endpoint_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr++) = Endpoint_Read_Byte()
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_EStream_LE
#define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr++, Endpoint_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr++, Endpoint_Read_Byte())
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Stream_BE
#define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr--) = Endpoint_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr--) = Endpoint_Read_Byte()
#include "Template/Template_Endpoint_RW.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_EStream_BE
#define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_CLEAR_ENDPOINT() Endpoint_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr--, Endpoint_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr--, Endpoint_Read_Byte())
#include "Template/Template_Endpoint_RW.c"
#endif
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_Stream_LE
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_PStream_LE
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_EStream_LE
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_Stream_BE
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(*((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_PStream_BE
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Write_Control_EStream_BE
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Endpoint_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Endpoint_Control_W.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_Stream_LE
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr++) = Endpoint_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr++) = Endpoint_Read_Byte()
#include "Template/Template_Endpoint_Control_R.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_EStream_LE
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr++, Endpoint_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr++, Endpoint_Read_Byte())
#include "Template/Template_Endpoint_Control_R.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_Stream_BE
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr--) = Endpoint_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr--) = Endpoint_Read_Byte()
#include "Template/Template_Endpoint_Control_R.c"
#define TEMPLATE_FUNC_NAME Endpoint_Read_Control_EStream_BE
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr--, Endpoint_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr--, Endpoint_Read_Byte())
#include "Template/Template_Endpoint_Control_R.c"
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.h b/LUFA/Drivers/USB/LowLevel/Endpoint.h index e30b14d33..b9122e408 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.h +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.h @@ -1205,7 +1205,7 @@ }
return (MaskVal << EPSIZE0);
- };
+ }
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c index bc497ad3b..3f5272a36 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.c +++ b/LUFA/Drivers/USB/LowLevel/Pipe.c @@ -204,7 +204,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*((uint8_t*)BufferPtr++))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_PStream_LE
@@ -212,7 +212,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_EStream_LE
@@ -220,7 +220,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte(BufferPtr++))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr++))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_Stream_BE
@@ -228,7 +228,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*((uint8_t*)BufferPtr--))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_PStream_BE
@@ -236,7 +236,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_EStream_BE
@@ -244,7 +244,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte(BufferPtr--))
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr--))
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_LE
@@ -252,7 +252,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr++) = Pipe_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr++) = Pipe_Read_Byte()
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_LE
@@ -260,7 +260,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr++, Pipe_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr++, Pipe_Read_Byte())
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_BE
@@ -268,7 +268,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr--) = Pipe_Read_Byte()
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr--) = Pipe_Read_Byte()
#include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_BE
@@ -276,7 +276,7 @@ uint8_t Pipe_Discard_Stream(uint16_t Length #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr--, Pipe_Read_Byte())
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr--, Pipe_Read_Byte())
#include "Template/Template_Pipe_RW.c"
#endif
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c index a2a0c3bd5..e64f0ed4a 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c @@ -1,6 +1,6 @@ uint8_t TEMPLATE_FUNC_NAME (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));
while (Length)
{
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)
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c index 6e1f5b236..9e86eed3a 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_RW.c @@ -1,6 +1,6 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, uint16_t Length __CALLBACK_PARAM)
{
- uint8_t* DataStream = (uint8_t*)(Buffer + TEMPLATE_BUFFER_OFFSET(Length));
+ uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
uint8_t ErrorCode;
if ((ErrorCode = Endpoint_WaitUntilReady()))
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c index ad8c4abeb..d003e4073 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Pipe_RW.c @@ -1,6 +1,6 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, uint16_t Length __CALLBACK_PARAM)
{
- uint8_t* DataStream = (uint8_t*)(Buffer + TEMPLATE_BUFFER_OFFSET(Length));
+ uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
uint8_t ErrorCode;
Pipe_SetToken(TEMPLATE_TOKEN);
|