diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2015-09-22 01:40:35 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2015-09-22 16:51:30 +0200 |
commit | 5a5cf764db88d148f3778a45ec1f9bae1899b3c3 (patch) | |
tree | d58c9d8b70d4a12bfe77824306d726c43234313f /libraries/HID/HID.h | |
parent | 9b9bf9532471abf373b36e9336a951ad5021fc3a (diff) |
HID: merged HID_Descriptor into HIDDescriptorListNode
This simplifies the object model and produce a small gain in code
size and performance.
Diffstat (limited to 'libraries/HID/HID.h')
-rw-r--r-- | libraries/HID/HID.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libraries/HID/HID.h b/libraries/HID/HID.h index 760090a..1a87bb7 100644 --- a/libraries/HID/HID.h +++ b/libraries/HID/HID.h @@ -44,16 +44,13 @@ #define HID_REPORT_DESCRIPTOR_TYPE 0x22 #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23 -typedef struct __attribute__((packed)) { - uint16_t length; - const void* data; -} HID_Descriptor; - class HIDDescriptorListNode { public: HIDDescriptorListNode *next = NULL; - const HID_Descriptor *descriptor; - HIDDescriptorListNode(const HID_Descriptor *d) : descriptor(d) { } + HIDDescriptorListNode(const void *d, uint16_t l) : data(d), length(l) { } + + const void* data; + uint16_t length; }; class HID_ |