summaryrefslogtreecommitdiff
path: root/examples/device/midi_test/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-08-01 13:20:00 +0700
committerhathach <[email protected]>2019-08-01 13:20:00 +0700
commit30de17a83029abeee44cbfd7aa5a3ac63d0ce65d (patch)
treee83ed2f45c942a0047eaf72a3044ecdf57b2fc89 /examples/device/midi_test/src
parentbd08d0edc9067d57a6d6c3cc32438095b2de29c8 (diff)
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
Diffstat (limited to 'examples/device/midi_test/src')
-rw-r--r--examples/device/midi_test/src/usb_descriptors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/device/midi_test/src/usb_descriptors.c b/examples/device/midi_test/src/usb_descriptors.c
index 95d3cca25..7cebc6a15 100644
--- a/examples/device/midi_test/src/usb_descriptors.c
+++ b/examples/device/midi_test/src/usb_descriptors.c
@@ -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;
}