diff options
| author | hathach <[email protected]> | 2025-09-27 16:15:04 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-09-27 17:08:21 +0700 |
| commit | cb21ca1b0cb3221341dca2559109c0bb4dc18e6f (patch) | |
| tree | aba4e31d802be53361d16c94150bf4fe110dbb0f /examples/device/mtp/src/usb_descriptors.c | |
| parent | f9d4bc798177e63532cd5a2ef058400d6f0ef5e4 (diff) | |
implement control request
Diffstat (limited to 'examples/device/mtp/src/usb_descriptors.c')
| -rw-r--r-- | examples/device/mtp/src/usb_descriptors.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/device/mtp/src/usb_descriptors.c b/examples/device/mtp/src/usb_descriptors.c index 4a43a0dcc..810137c46 100644 --- a/examples/device/mtp/src/usb_descriptors.c +++ b/examples/device/mtp/src/usb_descriptors.c @@ -140,10 +140,10 @@ enum { char const *string_desc_arr[] = { (const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409) - CFG_TUD_MANUFACTURER, // 1: Manufacturer - CFG_TUD_MODEL, // 2: Product + "TinyUsb", // 1: Manufacturer + "TinyUsb Device", // 2: Product NULL, // 3: Serials will use unique ID if possible - CFG_MTP_INTERFACE, // 4: MTP Interface + "TinyUSBB MTP", // 4: MTP Interface }; static uint16_t _desc_str[32 + 1]; @@ -168,7 +168,9 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) { // Note: the 0xEE index string is a Microsoft OS 1.0 Descriptors. // https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors - if ( !(index < sizeof(string_desc_arr) / sizeof(string_desc_arr[0])) ) return NULL; + if ( !(index < sizeof(string_desc_arr) / sizeof(string_desc_arr[0])) ) { + return NULL; + } const char *str = string_desc_arr[index]; |
