fix(usb/host): Correctly handle unpowered port in HUB

This commit is contained in:
Tomas Rezucha
2024-08-28 11:12:44 +02:00
parent 62a3b50c94
commit d2a8b5e577
5 changed files with 37 additions and 16 deletions

View File

@@ -200,8 +200,10 @@ esp_err_t usb_host_lib_info(usb_host_lib_info_t *info_ret);
* @note If 'usb_host_config_t.root_port_unpowered' was set on USB Host Library installation, users must call this
* function to power ON the root port before any device connections can occur.
*
* @param enable True to power the root port ON, false to power OFF
* @return esp_err_t
* @param[in] enable True to power the root port ON, false to power OFF
* @return
* - ESP_OK: Root port power enabled/disabled
* - ESP_ERR_INVALID_STATE: Root port already powered or HUB driver not installed
*/
esp_err_t usb_host_lib_set_root_port_power(bool enable);