Skip to content

Commit

Permalink
fix sendStringDescriptor() maxlen uitn8_t to uint32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Nov 27, 2023
1 parent e2b78cb commit 55d7bc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cores/arduino/USB/USBAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class USBDeviceClass {
uint32_t sendControl(int /* ep */, const void *data, uint32_t len) { return sendControl(data, len); }
uint32_t recvControl(void *data, uint32_t len);
uint32_t sendConfiguration(uint32_t maxlen);
bool sendStringDescriptor(const uint8_t *string, uint8_t maxlen);
bool sendStringDescriptor(const uint8_t *string, uint32_t maxlen);
void initControl(int end);
uint8_t SendInterfaces(uint32_t* total);
void packMessages(bool val);
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/USB/USBCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static EPHandler *epHandlers[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
// Send a USB descriptor string. The string is stored as a
// plain ASCII string but is sent out as UTF-16 with the
// correct 2-byte prefix
bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint8_t maxlen)
bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint32_t maxlen)
{
if (maxlen < 2)
return false;
Expand Down

0 comments on commit 55d7bc1

Please sign in to comment.