Skip to content

Commit c279a76

Browse files
committed
Move protocol member initialization from cpp to header.
1 parent f1360de commit c279a76

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/HID/HID.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ bool HID_::setup(USBSetup& setup)
265265
return false;
266266
}
267267

268-
HID_::HID_(void) : PluggableUSBModule(2, 1, epType),
269-
protocol(HID_REPORT_PROTOCOL)
268+
HID_::HID_(void) : PluggableUSBModule(2, 1, epType)
270269
{
271270
epType[0] = EP_TYPE_INTERRUPT_IN;
272271
epType[1] = EP_TYPE_INTERRUPT_OUT;

src/HID/HID.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class HID_ : public PluggableUSBModule
144144
HIDSubDescriptor* rootNode = nullptr;
145145
uint16_t descriptorSize = 1;
146146

147-
uint8_t protocol;
147+
uint8_t protocol = HID_REPORT_PROTOCOL;
148148
uint8_t idle = 1;
149149

150150
// Buffer pointer to hold the feature data

0 commit comments

Comments
 (0)