clean up
- remove TUD_WEBUSB_URL_DESCRIPTOR to avoid flexible array member (C++ forbid in strict mode) - remove unused TUD_DESC_STRLEN/TUD_DESC_STR_HEADER/TUD_DESC_STR_HEADER
This commit is contained in:
@@ -209,8 +209,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
@@ -210,8 +210,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
@@ -162,8 +162,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
@@ -149,8 +149,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
@@ -147,8 +147,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
@@ -230,8 +230,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
|
||||
}
|
||||
}
|
||||
|
||||
// first byte is len, second byte is string type
|
||||
_desc_str[0] = TUD_DESC_STR_HEADER(chr_count);
|
||||
// first byte is length (including header), second byte is string type
|
||||
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
|
||||
|
||||
return _desc_str;
|
||||
}
|
||||
|
Reference in New Issue
Block a user