#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
-#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1\r
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*(BufferPtr--))\r
+#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)\r
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(*((uint8_t*)BufferPtr--))\r
-#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1\r
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte(BufferPtr--))\r
+#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)\r
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(pgm_read_byte((uint8_t*)BufferPtr--))\r
-#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1\r
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte(BufferPtr--))\r
+#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)\r
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_Byte(eeprom_read_byte((uint8_t*)BufferPtr--))\r
#define TEMPLATE_TOKEN PIPE_TOKEN_IN\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_IN\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_IN\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
#define TEMPLATE_TOKEN PIPE_TOKEN_IN\r
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()\r
#define TEMPLATE_BUFFER_OFFSET(Length) 0\r
-#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1\r
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *(BufferPtr--) = Pipe_Read_Byte()\r
+#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)\r
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *((uint8_t*)BufferPtr--) = Pipe_Read_Byte()\r
-#define TEMPLATE_BUFFER_OFFSET(Length) Length - 1\r
-#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte(BufferPtr--, Pipe_Read_Byte())\r
+#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)\r
+#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_write_byte((uint8_t*)BufferPtr--, Pipe_Read_Byte())\r