From 488ace3d138ef1eb183ab53b9b24fa9ea3eeb301 Mon Sep 17 00:00:00 2001 From: NicoHood Date: Fri, 7 Aug 2015 19:42:04 +0200 Subject: Fixed HID Reports >255 bytes --- libraries/HID/HID.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libraries/HID/HID.h') diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index 89832a9..b9f29b4 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -45,7 +45,7 @@ #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23 typedef struct __attribute__((packed)) { - u8 length; + uint16_t length; const void* descriptor; } HID_Descriptor; @@ -88,10 +88,10 @@ typedef struct #define HID_TX HID_ENDPOINT_INT #define D_HIDREPORT(_descriptorLength) \ - { 9, 0x21, 0x1, 0x1, 0, 1, 0x22, _descriptorLength, 0 } + { 9, 0x21, 0x1, 0x1, 0, 1, 0x22, _descriptorLength & 0xFF, _descriptorLength >> 8 } #define WEAK __attribute__ ((weak)) #endif -#endif \ No newline at end of file +#endif -- cgit v1.2.3-18-g5258