Skip to content

Commit 6b88280

Browse files
feat(usb_host): Access ll instead of hal, to extend IDF support
1 parent 8b488d3 commit 6b88280

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

host/usb/src/hcd_dwc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,8 +1341,12 @@ static esp_err_t _port_cmd_bus_suspend(port_t *port)
13411341
goto exit;
13421342
}
13431343

1344+
// Here we are calling ll directly instead of hal, to allow the suspend/resume feature to be used as a managed usb
1345+
// component in all active IDF releases (Currently IDF 5.4.x, IDF 5.5.x and IDF 6.0) and all it's minor releases
1346+
// because the hal function usb_dwc_hal_port_check_if_suspended(port->hal) starts to be supported in IDF 5.5.2, (and IDF 5.4.2)
1347+
13441348
// Sanity check, the root port should have entered the suspended state after the SUSPEND_ENTRY_MS delay
1345-
if (!usb_dwc_hal_port_check_if_suspended(port->hal)) {
1349+
if (!usb_dwc_ll_hprt_get_port_suspend(port->hal->dev)) {
13461350
ret = ESP_ERR_NOT_FINISHED;
13471351
goto exit;
13481352
}

0 commit comments

Comments
 (0)