File tree 2 files changed +5
-9
lines changed
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)
68
68
HIDDescriptorListNode* current = rootNode;
69
69
int total = 0 ;
70
70
while (current != NULL ) {
71
- total += USBD_SendControl (0 ,current->descriptor -> data ,current-> descriptor ->length );
71
+ total += USBD_SendControl (0 ,current->data ,current->length );
72
72
current = current->next ;
73
73
}
74
74
return total;
@@ -89,7 +89,7 @@ void HID_::AppendDescriptor(HIDDescriptorListNode *node)
89
89
current->next = node;
90
90
}
91
91
modules_count++;
92
- sizeof_hidReportDescriptor += node->descriptor -> length ;
92
+ sizeof_hidReportDescriptor += node->length ;
93
93
}
94
94
95
95
void HID_::SendReport (uint8_t id, const void * data, int len)
Original file line number Diff line number Diff line change 42
42
#define HID_REPORT_DESCRIPTOR_TYPE 0x22
43
43
#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
44
44
45
- typedef struct __attribute__ ((packed)) {
46
- uint8_t length;
47
- const void * data;
48
- } HID_Descriptor;
49
-
50
45
class HIDDescriptorListNode {
51
46
public:
52
47
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;
55
51
};
56
52
57
53
class HID_
You can’t perform that action at this time.
0 commit comments