From 5a5cf764db88d148f3778a45ec1f9bae1899b3c3 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 22 Sep 2015 01:40:35 +0200 Subject: HID: merged HID_Descriptor into HIDDescriptorListNode This simplifies the object model and produce a small gain in code size and performance. --- libraries/HID/HID.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libraries/HID/HID.cpp') diff --git a/libraries/HID/HID.cpp b/libraries/HID/HID.cpp index c1b5fdf..8533f08 100644 --- a/libraries/HID/HID.cpp +++ b/libraries/HID/HID.cpp @@ -61,7 +61,7 @@ int HID_GetDescriptor(int8_t t) HIDDescriptorListNode* current = rootNode; int total = 0; while(current != NULL) { - total += USB_SendControl(TRANSFER_PGM,current->descriptor->data,current->descriptor->length); + total += USB_SendControl(TRANSFER_PGM,current->data,current->length); current = current->next; } return total; @@ -82,7 +82,7 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node) current->next = node; } modules_count++; - sizeof_hidReportDescriptor += (uint16_t)node->descriptor->length; + sizeof_hidReportDescriptor += (uint16_t)node->length; } void HID_::SendReport(u8 id, const void* data, int len) -- cgit v1.2.3-18-g5258