implement #19 serial descriptor based on deviceid

This commit is contained in:
hathach
2018-08-21 14:53:06 +07:00
parent 6feea4e069
commit daa1b83144
3 changed files with 25 additions and 2 deletions

View File

@ -77,6 +77,9 @@ enum {
// STRING DESCRIPTORS
//--------------------------------------------------------------------+
// Serial is 64-bit DeviceID -> 16 chars len
uint16_t usb_desc_str_serial[1+16] = { TUD_DESC_STR_HEADER(16) };
// array of pointer to string descriptors
uint16_t const * const string_desc_arr [] =
{
@ -90,7 +93,7 @@ uint16_t const * const string_desc_arr [] =
TUD_DESC_STRCONV('B','l','u','e','f','r','u','i','t',' ','n','R','F','5','2','8','4','0', ' ', 'D','F','U'),
// 3: Serials TODO use chip ID
TUD_DESC_STRCONV('1', '2', '3', '4'),
usb_desc_str_serial,
// 4: CDC Interface
TUD_DESC_STRCONV('B','l','u','e','f','r','u','i','t',' ','S','e','r','i','a','l'),