clean up
This commit is contained in:
1 parent
1529ed0380
commit
e38c37b6b7
1 file changed
+3
-2
@@ -164,7 +164,8 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
|
||||
return USBDevice._desc_cfg;
|
||||
}
|
||||
|
||||
static uint16_t _desc_str[32];
|
||||
// up to 32 unicode characters (header make it 33)
|
||||
static uint16_t _desc_str[33];
|
||||
|
||||
// Invoked when received GET STRING DESCRIPTOR request
|
||||
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
|
||||
@@ -187,7 +188,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
|
||||
// cap at max char
|
||||
chr_count = strlen(str);
|
||||
if ( chr_count > 31 ) chr_count = 31;
|
||||
if ( chr_count > 32 ) chr_count = 32;
|
||||
|
||||
for(uint8_t i=0; i<chr_count; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user