Skip to content

Commit a420486

Browse files
committed
HID: merged HID_Descriptor into HIDDescriptorListNode
This simplifies the object model and produce a small gain in code size and performance.
1 parent c24bb59 commit a420486

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Keyboard.cpp

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

6363
Keyboard_::Keyboard_(void)
6464
{
65-
static HID_Descriptor descriptor = {
66-
.length = sizeof(_hidReportDescriptor),
67-
.data = _hidReportDescriptor,
68-
};
69-
static HIDDescriptorListNode node(&descriptor);
65+
static HIDDescriptorListNode node(_hidReportDescriptor, sizeof(_hidReportDescriptor));
7066
HID.AppendDescriptor(&node);
7167
}
7268

0 commit comments

Comments
 (0)