aboutsummaryrefslogtreecommitdiff
path: root/libraries/HID/HID.h
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2015-08-13 09:39:21 +0200
committerMartino Facchin <m.facchin@arduino.cc>2015-08-13 09:39:21 +0200
commitb3197c6ef83253d712f4b7b30a0763f18f6d3ddc (patch)
treec1c11380a35613e3ab8e9264bfb84251a91d5db8 /libraries/HID/HID.h
parent98f7ab15884119b1c9f1f58f96a8302200c1e2a3 (diff)
parent98301ba23a1f7c60b4590330da2ee1c260da7aa6 (diff)
Merge pull request #3640 from NicoHood/USB-Core-Fixes
Usb core fixes
Diffstat (limited to 'libraries/HID/HID.h')
-rw-r--r--libraries/HID/HID.h6
1 files changed, 3 insertions, 3 deletions
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