Skip to content

Commit eefb9a8

Browse files
committed
Merge remote-tracking branch 'arduino/master' into HEAD
2 parents ced0629 + ca3c821 commit eefb9a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libraries/HID/HID.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ int HID_::getDescriptor(USBSetup& setup)
5454
return -1;
5555
total += res;
5656
}
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+
5762
return total;
5863
}
5964

@@ -140,7 +145,7 @@ bool HID_::setup(USBSetup& setup)
140145

141146
HID_::HID_(void) : PluggableUSBModule(1, 1, epType),
142147
rootNode(NULL), descriptorSize(0),
143-
protocol(1), idle(1)
148+
protocol(HID_REPORT_PROTOCOL), idle(1)
144149
{
145150
epType[0] = EP_TYPE_INTERRUPT_IN;
146151
PluggableUSB().plug(this);

0 commit comments

Comments
 (0)