summaryrefslogtreecommitdiff
path: root/examples/device/cdc_msc_hid/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-07-01 22:38:06 +0700
committerhathach <[email protected]>2019-07-01 22:38:06 +0700
commit6991b28532605ceae685cb8be1fee904e09f12fe (patch)
tree2d383bce7e232d56ee072f5fccdf2b688228da8d /examples/device/cdc_msc_hid/src
parent991aaf0158fcb02f7951a895a0caa6637e84fd8a (diff)
improving midi support, adding midi exmaple
rename TUSB_DESC_CLASS_SPECIFIC to TUSB_DESC_CS_INTERFACE
Diffstat (limited to 'examples/device/cdc_msc_hid/src')
-rw-r--r--examples/device/cdc_msc_hid/src/usb_descriptors.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/device/cdc_msc_hid/src/usb_descriptors.c b/examples/device/cdc_msc_hid/src/usb_descriptors.c
index 8cd6062be..1692151a0 100644
--- a/examples/device/cdc_msc_hid/src/usb_descriptors.c
+++ b/examples/device/cdc_msc_hid/src/usb_descriptors.c
@@ -32,7 +32,7 @@
* [MSB] HID | MSC | CDC [LSB]
*/
#define _PID_MAP(itf, n) ( (CFG_TUD_##itf) << (n) )
-#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) )
+#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | _PID_MAP(MIDI, 3) )
//------------- Device Descriptors -------------//
tusb_desc_device_t const desc_device =
@@ -188,6 +188,8 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index)
chr_count = 1;
}else
{
+ // Convert ASCII string into UTF-16
+
if ( !(index < sizeof(string_desc_arr)/sizeof(string_desc_arr[0])) ) return NULL;
const char* str = string_desc_arr[index];