We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9d7e85 commit cb4437fCopy full SHA for cb4437f
cores/arduino/USBCore.cpp
@@ -468,7 +468,7 @@ bool SendDescriptor(USBSetup& setup)
468
469
if (t == 0x21) {
470
InitControl(setup.wLength);
471
- int toSend = setup.wLength < sizeof(hidClassDescriptor) ? setup.wLength : sizeof(hidClassDescriptor);
+ int toSend = setup.wLength < hidClassDescriptorSize ? setup.wLength : hidClassDescriptorSize;
472
USB_SendControl(TRANSFER_PGM, hidClassDescriptor, toSend);
473
return true;
474
}
0 commit comments