We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c1ce649 + 9fe2023 commit 1ff4f1bCopy full SHA for 1ff4f1b
hardware/arduino/avr/libraries/HID/HID.cpp
@@ -54,6 +54,11 @@ int HID_::getDescriptor(USBSetup& setup)
54
return -1;
55
total += res;
56
}
57
+
58
+ // Reset the protocol on reenumeration. Normally the host should not assume the state of the protocol
59
+ // due to the USB specs, but Windows and Linux just assumes its in report mode.
60
+ protocol = HID_REPORT_PROTOCOL;
61
62
return total;
63
64
@@ -130,7 +135,7 @@ bool HID_::setup(USBSetup& setup)
130
135
131
136
HID_::HID_(void) : PluggableUSBModule(1, 1, epType),
132
137
rootNode(NULL), descriptorSize(0),
133
- protocol(1), idle(1)
138
+ protocol(HID_REPORT_PROTOCOL), idle(1)
134
139
{
140
epType[0] = EP_TYPE_INTERRUPT_IN;
141
PluggableUSB().plug(this);
0 commit comments