Skip to content

Commit c24bb59

Browse files
committed
HID: Renamed fields in HIDDescriptorListNode and HID_Descriptor
In particular HIDDescriptorListNode.cb has been renamed to HIDDescriptorListNode.descriptor because it contains decriptor data and not callbacks. Moreover the HID_Descriptor.descriptor field has been renamed to HID_Descriptor.data so the structure has now two fields length and data. 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) { } }; This imply a change in the use of the node from: node->cb->lenght node->cd->descriptor to node->descriptor->length node->descriptor->data
1 parent efcd7c6 commit c24bb59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Keyboard.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
6262

6363
Keyboard_::Keyboard_(void)
6464
{
65-
static HID_Descriptor cb = {
65+
static HID_Descriptor descriptor = {
6666
.length = sizeof(_hidReportDescriptor),
67-
.descriptor = _hidReportDescriptor,
67+
.data = _hidReportDescriptor,
6868
};
69-
static HIDDescriptorListNode node(&cb);
69+
static HIDDescriptorListNode node(&descriptor);
7070
HID.AppendDescriptor(&node);
7171
}
7272

0 commit comments

Comments
 (0)