Skip to content

Commit cee4a8d

Browse files
committed
Descriptor type (0x03) should be second byte for string descriptor
1 parent ba1ad40 commit cee4a8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/USB/USBCore.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint8_t maxlen)
9191
return false;
9292

9393
uint8_t buffer[maxlen];
94-
buffer[0] = 0x03;
95-
buffer[1] = strlen((const char*)string) * 2 + 2;
94+
buffer[0] = strlen((const char*)string) * 2 + 2;
95+
buffer[1] = 0x03;
9696

9797
uint8_t i;
9898
for (i = 2; i < maxlen && *string; i++) {

0 commit comments

Comments
 (0)