ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
tinyusb_config_t Struct Reference

Configuration structure of the TinyUSB core. More...

#include <tinyusb.h>

Data Fields

union { 
   const tusb_desc_device_t *   device_descriptor 
}; 
const char ** string_descriptor
bool external_phy
const uint8_t * configuration_descriptor
bool self_powered
int vbus_monitor_io

Detailed Description

Configuration structure of the TinyUSB core.

USB specification mandates self-powered devices to monitor USB VBUS to detect connection/disconnection events. If you want to use this feature, connected VBUS to any free GPIO through a voltage divider or voltage comparator. The voltage divider output should be (0.75 * Vdd) if VBUS is 4.4V (lowest valid voltage at device port). The comparator thresholds should be set with hysteresis: 4.35V (falling edge) and 4.75V (raising edge).

Definition at line 29 of file tinyusb.h.

Field Documentation

◆ [union]

union { ... } tinyusb_config_t

◆ configuration_descriptor

const uint8_t* tinyusb_config_t::configuration_descriptor

Pointer to a configuration descriptor. If set to NULL, TinyUSB device will use a default configuration descriptor whose values are set in Kconfig

Definition at line 36 of file tinyusb.h.

Referenced by tinyusb_driver_install().

◆ device_descriptor

const tusb_desc_device_t* tinyusb_config_t::device_descriptor

Pointer to a device descriptor. If set to NULL, the TinyUSB device will use a default device descriptor whose values are set in Kconfig

Definition at line 31 of file tinyusb.h.

Referenced by tinyusb_driver_install().

◆ external_phy

bool tinyusb_config_t::external_phy

Should USB use an external PHY

Definition at line 35 of file tinyusb.h.

Referenced by tinyusb_driver_install().

◆ self_powered

bool tinyusb_config_t::self_powered

This is a self-powered USB device. USB VBUS must be monitored.

Definition at line 37 of file tinyusb.h.

Referenced by tinyusb_driver_install().

◆ string_descriptor

const char** tinyusb_config_t::string_descriptor

Pointer to an array of string descriptors

Definition at line 34 of file tinyusb.h.

Referenced by tinyusb_driver_install().

◆ vbus_monitor_io

int tinyusb_config_t::vbus_monitor_io

GPIO for VBUS monitoring. Ignored if not self_powered.

Definition at line 38 of file tinyusb.h.

Referenced by tinyusb_driver_install().


The documentation for this struct was generated from the following file: