mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 12:25:03 +02:00
feat(usb/host): Add option to choose peripheral for USB host library
Starting with ESP32-P4 we can have targets that have more than 1 USB-OTG peripheral. This commit adds an option to choose which peripherals will be used by USB Host lib. Internally, we will still have only 1 Root HUB but with multiple Root ports.
This commit is contained in:
@@ -121,6 +121,13 @@ typedef struct {
|
||||
} fifo_settings_custom; /**< Optional custom FIFO configuration (advanced use).
|
||||
RX and NPTX must be > 0. If all fields are zero,
|
||||
a default configuration will be selected based on Kconfig bias. */
|
||||
unsigned peripheral_map; /**< Selects the USB peripheral(s) to use.
|
||||
- On targets with multiple USB peripherals, this field can be used to specify which ones to enable.
|
||||
- Set to 0 to use the default peripheral.
|
||||
- On High-Speed capable targets, the default is the High-Speed peripheral.
|
||||
- On Full-Speed only targets, the default is the Full-Speed peripheral.
|
||||
- Example: peripheral_map = BIT1; installs USB host on peripheral 1.
|
||||
- The mapping of bits to specific peripherals is defined in the USB_DWC_LL_GET_HW() macro. */
|
||||
} usb_host_config_t;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user