File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
hardware/arduino/avr/libraries/HID Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ int HID_::getInterface(uint8_t* interfaceCount)
34
34
D_HIDREPORT (descriptorSize),
35
35
D_ENDPOINT (USB_ENDPOINT_IN (pluggedEndpoint), USB_ENDPOINT_TYPE_INTERRUPT, USB_EP_SIZE, 0x01 )
36
36
};
37
+ // Reset the protocol on reenumeration. Normally the host should not assume the state of the protocol
38
+ // due to the USB specs, but Windows and Linux just assumes its in report mode.
39
+ protocol = HID_REPORT_PROTOCOL;
37
40
return USB_SendControl (0 , &hidInterface, sizeof (hidInterface));
38
41
}
39
42
@@ -130,7 +133,7 @@ bool HID_::setup(USBSetup& setup)
130
133
131
134
HID_::HID_ (void ) : PluggableUSBModule(1 , 1 , epType),
132
135
rootNode(NULL ), descriptorSize(0 ),
133
- protocol(1 ), idle(1 )
136
+ protocol(HID_REPORT_PROTOCOL ), idle(1 )
134
137
{
135
138
epType[0 ] = EP_TYPE_INTERRUPT_IN;
136
139
PluggableUSB ().plug (this );
You can’t perform that action at this time.
0 commit comments