Skip to content

Commit

Permalink
Move protocol member initialization from cpp to header.
Browse files Browse the repository at this point in the history
  • Loading branch information
forderud committed Sep 9, 2024
1 parent f1360de commit c279a76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/HID/HID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ bool HID_::setup(USBSetup& setup)
return false;
}

HID_::HID_(void) : PluggableUSBModule(2, 1, epType),
protocol(HID_REPORT_PROTOCOL)
HID_::HID_(void) : PluggableUSBModule(2, 1, epType)
{
epType[0] = EP_TYPE_INTERRUPT_IN;
epType[1] = EP_TYPE_INTERRUPT_OUT;
Expand Down
2 changes: 1 addition & 1 deletion src/HID/HID.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class HID_ : public PluggableUSBModule
HIDSubDescriptor* rootNode = nullptr;
uint16_t descriptorSize = 1;

uint8_t protocol;
uint8_t protocol = HID_REPORT_PROTOCOL;
uint8_t idle = 1;

// Buffer pointer to hold the feature data
Expand Down

0 comments on commit c279a76

Please sign in to comment.