summaryrefslogtreecommitdiff
path: root/examples/device/mtp/src/usb_descriptors.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-09-23 15:23:16 +0700
committerhathach <[email protected]>2025-09-23 15:23:16 +0700
commit3c39f60f63109f7828009ebda135fc675288d610 (patch)
tree9fd51d9556b78587f66cdfb2752f074436473b69 /examples/device/mtp/src/usb_descriptors.c
parent1ab45bc52557a85f488566ee89ef48b7332b7ef0 (diff)
refactor API
Diffstat (limited to 'examples/device/mtp/src/usb_descriptors.c')
-rw-r--r--examples/device/mtp/src/usb_descriptors.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/device/mtp/src/usb_descriptors.c b/examples/device/mtp/src/usb_descriptors.c
index 73685c3fd..4a43a0dcc 100644
--- a/examples/device/mtp/src/usb_descriptors.c
+++ b/examples/device/mtp/src/usb_descriptors.c
@@ -109,18 +109,16 @@ enum
#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + TUD_MTP_DESC_LEN)
-uint8_t const desc_fs_configuration[] =
-{
+uint8_t const desc_fs_configuration[] = {
// Config number, interface count, string index, total length, attribute, power in mA
- TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
- TUD_MTP_DESCRIPTOR(ITF_NUM_MTP, 4, EPNUM_MTP_EVT, CFG_MTP_EVT_EP_SIZE, CFG_MTP_EVT_INTERVAL, EPNUM_MTP_OUT, EPNUM_MTP_IN, CFG_MTP_EP_SIZE),
+ TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
+ TUD_MTP_DESCRIPTOR(ITF_NUM_MTP, 4, EPNUM_MTP_EVT, 64, 1, EPNUM_MTP_OUT, EPNUM_MTP_IN, 64),
};
// Invoked when received GET CONFIGURATION DESCRIPTOR
// Application return pointer to descriptor
// Descriptor contents must exist long enough for transfer to complete
-uint8_t const *tud_descriptor_configuration_cb(uint8_t index)
-{
+uint8_t const *tud_descriptor_configuration_cb(uint8_t index) {
(void) index; // for multiple configurations
return desc_fs_configuration;
}