mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-14 08:21:15 +00: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:
@@ -113,8 +113,10 @@ static void usb_host_lib_task(void *arg)
|
||||
# ifdef ENABLE_ENUM_FILTER_CALLBACK
|
||||
.enum_filter_cb = set_config_cb,
|
||||
# endif // ENABLE_ENUM_FILTER_CALLBACK
|
||||
.peripheral_map = BIT0,
|
||||
};
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
ESP_LOGI(TAG, "USB Host installed with peripheral map 0x%x", host_config.peripheral_map);
|
||||
|
||||
//Signalize the app_main, the USB host library has been installed
|
||||
xTaskNotifyGive(arg);
|
||||
|
Reference in New Issue
Block a user