Skip to content

Commit 0df54ea

Browse files
committed
Try custom device descriptors
1 parent 93c97aa commit 0df54ea

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

tools/sdk/esp32s2/include/config/sdkconfig.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@
365365
#define CONFIG_USB_MIDI_RX_BUFSIZE 64
366366
#define CONFIG_USB_MIDI_TX_BUFSIZE 64
367367
#define CONFIG_USB_VENDOR_ENABLED 1
368-
#define CONFIG_USB_CUSTOM_CLASS_ENABLED 1
369-
#define CONFIG_USB_DEBUG 1
368+
#define CONFIG_USB_DFU_RT_ENABLED 1
369+
#define CONFIG_USB_NET_ENABLED 1
370370
#define CONFIG_USB_DESC_USE_ESPRESSIF_VID 1
371371
#define CONFIG_USB_DESC_USE_DEFAULT_PID 1
372-
#define CONFIG_USB_DESC_BCDDEVICE 0x0723
372+
#define CONFIG_USB_DESC_BCDDEVICE 0x0100
373373
#define CONFIG_USB_DESC_MANUFACTURER_STRING "Espressif"
374-
#define CONFIG_USB_DESC_PRODUCT_STRING "ESP32-S2"
375-
#define CONFIG_USB_DESC_SERIAL_STRING "0"
374+
#define CONFIG_USB_DESC_PRODUCT_STRING "Espressif Device"
375+
#define CONFIG_USB_DESC_SERIAL_STRING "123456"
376376
#define CONFIG_USB_DESC_CDC_STRING "Espressif CDC Device"
377377
#define CONFIG_USB_DESC_MSC_STRING "Espressif MSC Device"
378378
#define CONFIG_USB_DESC_MIDI_STRING "Espressif MIDI Device"

tools/sdk/esp32s2/include/tinyusb/port/esp32s2/include/tusb_config.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ extern "C" {
8989
# define CONFIG_USB_CUSTOM_CLASS_ENABLED 0
9090
#endif
9191

92+
#ifndef CONFIG_USB_DFU_RT_ENABLED
93+
# define CONFIG_USB_DFU_RT_ENABLED 0
94+
#endif
95+
96+
#ifndef CONFIG_USB_NET_ENABLED
97+
# define CONFIG_USB_NET_ENABLED 0
98+
#endif
99+
92100
#ifndef CONFIG_USB_VENDOR_ENABLED
93101
# define CONFIG_USB_VENDOR_ENABLED 0
94102
#endif
@@ -97,6 +105,8 @@ extern "C" {
97105
#define CFG_TUD_CDC CONFIG_USB_CDC_ENABLED
98106
#define CFG_TUD_MSC CONFIG_USB_MSC_ENABLED
99107
#define CFG_TUD_HID CONFIG_USB_HID_ENABLED
108+
#define CFG_TUD_DFU_RT CONFIG_USB_DFU_RT_ENABLED
109+
#define CFG_TUD_NET CONFIG_USB_NET_ENABLED
100110

101111
#define CFG_TUD_MIDI CONFIG_USB_MIDI_ENABLED
102112
#define CFG_TUD_CUSTOM_CLASS CONFIG_USB_CUSTOM_CLASS_ENABLED

tools/sdk/esp32s2/lib/libtinyusb.a

-21.3 KB
Binary file not shown.

tools/sdk/esp32s2/sdkconfig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ CONFIG_SPIFFS_USE_MTIME=y
989989
#
990990
CONFIG_USB_ENABLED=y
991991
CONFIG_USB_MAX_POWER_USAGE=500
992+
# CONFIG_USB_USE_BUILTIN_DESCRIPTORS is not set
992993
CONFIG_USB_CDC_ENABLED=y
993994
CONFIG_USB_CDC_RX_BUFSIZE=1024
994995
CONFIG_USB_CDC_TX_BUFSIZE=1024
@@ -1000,18 +1001,20 @@ CONFIG_USB_MIDI_ENABLED=y
10001001
CONFIG_USB_MIDI_RX_BUFSIZE=64
10011002
CONFIG_USB_MIDI_TX_BUFSIZE=64
10021003
CONFIG_USB_VENDOR_ENABLED=y
1003-
CONFIG_USB_CUSTOM_CLASS_ENABLED=y
1004-
CONFIG_USB_DEBUG=y
1004+
CONFIG_USB_DFU_RT_ENABLED=y
1005+
CONFIG_USB_NET_ENABLED=y
1006+
# CONFIG_USB_CUSTOM_CLASS_ENABLED is not set
1007+
# CONFIG_USB_DEBUG is not set
10051008

10061009
#
10071010
# Descriptor configuration
10081011
#
10091012
CONFIG_USB_DESC_USE_ESPRESSIF_VID=y
10101013
CONFIG_USB_DESC_USE_DEFAULT_PID=y
1011-
CONFIG_USB_DESC_BCDDEVICE=0x0723
1014+
CONFIG_USB_DESC_BCDDEVICE=0x0100
10121015
CONFIG_USB_DESC_MANUFACTURER_STRING="Espressif"
1013-
CONFIG_USB_DESC_PRODUCT_STRING="ESP32-S2"
1014-
CONFIG_USB_DESC_SERIAL_STRING="0"
1016+
CONFIG_USB_DESC_PRODUCT_STRING="Espressif Device"
1017+
CONFIG_USB_DESC_SERIAL_STRING="123456"
10151018
CONFIG_USB_DESC_CDC_STRING="Espressif CDC Device"
10161019
CONFIG_USB_DESC_MSC_STRING="Espressif MSC Device"
10171020
CONFIG_USB_DESC_MIDI_STRING="Espressif MIDI Device"

0 commit comments

Comments
 (0)