File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ int HID_GetDescriptor(int8_t t)
6868HIDDescriptorListNode* current = rootNode;
6969int total = 0 ;
7070while (current != NULL ) {
71- total += USBD_SendControl (0 ,current->descriptor -> data ,current-> descriptor ->length );
71+ total += USBD_SendControl (0 ,current->data ,current->length );
7272current = current->next ;
7373}
7474return total;
@@ -89,7 +89,7 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
8989current->next = node;
9090}
9191modules_count++;
92- sizeof_hidReportDescriptor += node->descriptor -> length ;
92+ sizeof_hidReportDescriptor += node->length ;
9393}
9494
9595void HID_::SendReport (uint8_t id, const void * data, int len)
Original file line number Diff line number Diff line change 4242#define HID_REPORT_DESCRIPTOR_TYPE 0x22
4343#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
4444
45- typedef struct __attribute__ ((packed)) {
46- uint8_t length;
47- const void * data;
48- } HID_Descriptor;
49-
5045class HIDDescriptorListNode {
5146public:
5247 HIDDescriptorListNode *next = NULL ;
53- const HID_Descriptor *descriptor;
54- HIDDescriptorListNode (const HID_Descriptor *d) : descriptor(d) { }
48+ HIDDescriptorListNode (const void *d, uint16_t l) : data(d), length(l) { }
49+ uint8_t length;
50+ const void * data;
5551};
5652
5753class HID_
You can’t perform that action at this time.
0 commit comments