Chapter 2. API Reference
Hardware USB Connection
• Any board with the ESP32-S2 chip with USB connectors or with exposed USB’s D+ and D- (DATA+/DATA-)
pins.
If the board has no USB connector but has the pins, connect pins directly to the host (e.g. with do-it-yourself cable
from any USB connection cable).
On ESP32-S2, connect GPIO 20 and 19 to D+/D- respectively:
Driver Structure
As the basis is used the TinyUSB stack.
On top of it the driver implements:
• Customization of USB descriptors
• Serial device support
• Redirecting of standard streams through the Serial device
• Encapsulated driver’s task servicing the TinyuSB
Configuration
Via Menuconfig options you can specify:
• Several of descriptor’s parameters (see: Descriptors Configuration bellow)
• USB Serial low-level Configuration
• The verbosity of the TinyUSB’s log
• Disable the TinyUSB main task (for the custom implementation)
Descriptors Configuration The driver’s descriptors are provided by the tinyusb_config_t structure’s
descriptor and string_descriptor members. Therefore, users should initialize tinyusb_config_t
to their desired descriptor before calling tinyusb_driver_install() to install driver.
However, the driver also provides a default descriptor. The driver can be installed with the default descriptor by
setting the descriptor and string_descriptor members of tinyusb_config_t to NULL before call-
ing tinyusb_driver_install(). The driver’s default descriptor is specified using Menuconfig, where the
following fields should be configured:
• PID
• VID
• bcdDevice
• Manufacturer
• Product name
Espressif Systems 481
Submit Document Feedback
Release v4.4