@@ -77,7 +77,7 @@ typedef struct {
7777 * - USBH must already be installed
7878 * Exit:
7979 * - Install Hub driver memory resources
80- * - Initializes the HCD root port
80+ * - Initializes the HCD root ports selected by hub_config->port_map
8181 *
8282 * @param[in] hub_config Hub driver configuration
8383 * @param[out] client_ret Unique pointer to identify the Hub as a USB Host client
@@ -95,44 +95,43 @@ esp_err_t hub_install(hub_config_t *hub_config, void **client_ret);
9595 *
9696 * This must be called before uninstalling the USBH
9797 * Entry:
98- * - Must have stopped the root port
98+ * - Must have stopped all enabled root ports
9999 * Exit:
100- * - HCD root port deinitialized
100+ * - HCD root ports deinitialized
101101 *
102102 * @return
103103 * - ESP_OK: Hub driver uninstalled successfully
104- * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or root port is in other state than not powered
104+ * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or any enabled root port is in other state than not powered
105105 */
106106esp_err_t hub_uninstall (void );
107107
108108/**
109- * @brief Start the Hub driver's root port
109+ * @brief Start the Hub driver's root ports
110110 *
111- * This will power the root port ON
112- *
113- * @note This function should only be called from the Host Library task
111+ * This will power ON all enabled root ports.
114112 *
115113 * @return
116- * - ESP_OK: Root port has been powered on
117- * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or root port is in other state than not powered
114+ * - ESP_OK: All enabled root ports have been powered on
115+ * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or any enabled root port is in other state than not powered
118116 */
119117esp_err_t hub_root_start (void );
120118
121119/**
122- * @brief Stops the Hub driver's root port
120+ * @brief Stops the Hub driver's root ports
123121 *
124- * This will power OFF the root port
122+ * This will power OFF all enabled root ports.
125123 *
126124 * @return
127- * - ESP_OK: Root port has been powered off
128- * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or root port is in not powered state
125+ * - ESP_OK: All enabled root ports have been powered off
126+ * - ESP_ERR_INVALID_STATE: Hub driver is not installed, or all enabled root ports are already not powered
129127 */
130128esp_err_t hub_root_stop (void );
131129
132130/**
133- * @brief Check if root port is in suspended state
131+ * @brief Check if a root port is in suspended state
134132 *
135- * This will check root port state
133+ * This will check root port state. In multi-port configurations, this currently
134+ * checks the first enabled root port only.
136135 *
137136 * @return
138137 * - true: Root port is in suspended state
@@ -143,7 +142,8 @@ bool hub_root_is_suspended(void);
143142/**
144143 * @brief Check if the Hub driver's root port can be suspended
145144 *
146- * This will check if all HCD pipes are idle and which state the root port is in
145+ * This will check if all HCD pipes are idle and which state the root port is in.
146+ * In multi-port configurations, this currently checks the first enabled root port only.
147147 *
148148 * @return
149149 * - ESP_OK: Hub driver's root port can be suspended
@@ -157,6 +157,8 @@ esp_err_t hub_root_can_suspend(void);
157157/**
158158 * @brief Check if the Hub driver's root port can be resumed
159159 *
160+ * In multi-port configurations, this currently checks the first enabled root port only.
161+ *
160162 * @return
161163 * - ESP_OK: Hub driver's root port can be resumed
162164 * - ESP_ERR_INVALID_STATE: Hub driver is not installed
@@ -169,7 +171,8 @@ esp_err_t hub_root_can_resume(void);
169171/**
170172 * @brief Mark the Hub driver's root port as ready for suspend
171173 *
172- * This will mark the root port, as ready to be suspended and and will be processed by the hub processing loop
174+ * This will mark the root port as ready to be suspended and will be processed by the hub processing loop.
175+ * In multi-port configurations, this currently targets the first enabled root port only.
173176 *
174177 * @return
175178 * - ESP_OK: Hub driver suspended successfully
@@ -181,7 +184,8 @@ esp_err_t hub_root_mark_suspend(void);
181184/**
182185 * @brief Mark the Hub driver's root port as ready for resume
183186 *
184- * This will mark the root port, as ready to be resumed and and will be processed by the hub processing loop
187+ * This will mark the root port as ready to be resumed and will be processed by the hub processing loop.
188+ * In multi-port configurations, this currently targets the first enabled root port only.
185189 *
186190 * @return
187191 * - ESP_OK: Hub driver resumed successfully
0 commit comments