Skip to content

Conversation

@peter-marcisovsky
Copy link
Collaborator

Description

Adding remote wakeup feature for usb host lib

Related

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@peter-marcisovsky peter-marcisovsky self-assigned this Oct 16, 2025
@peter-marcisovsky peter-marcisovsky added Status: In Progress Issue is being worked on Component: usb_host Issue affects usb_host component labels Oct 16, 2025
@peter-marcisovsky peter-marcisovsky changed the title Feat/usb host remote wkp USB Host remote wakeup Oct 16, 2025
Base automatically changed from feat/usb_host_suspend to master October 22, 2025 13:04
    - HCD and USB Host tests
port->flags.conn_dev_ena = 0;
break;
}
case USB_DWC_HAL_PORT_EVENT_REMOTE_WAKEUP: {

Check failure

Code scanning / clang-tidy

duplicate case value: 'USB_DWC_HAL_PORT_EVENT_DISABLED' and 'HCD_PORT_EVENT_REMOTE_WAKEUP' both equal '5' [clang-diagnostic-error] Error

duplicate case value: 'USB_DWC_HAL_PORT_EVENT_DISABLED' and 'HCD_PORT_EVENT_REMOTE_WAKEUP' both equal '5' [clang-diagnostic-error]
port->flags.conn_dev_ena = 0;
break;
}
case USB_DWC_HAL_PORT_EVENT_REMOTE_WAKEUP: {

Check failure

Code scanning / clang-tidy

use of undeclared identifier 'USB_DWC_HAL_PORT_EVENT_REMOTE_WAKEUP'; did you mean 'HCD_PORT_EVENT_REMOTE_WAKEUP'? [clang-diagnostic-error] Error

use of undeclared identifier 'USB_DWC_HAL_PORT_EVENT_REMOTE_WAKEUP'; did you mean 'HCD_PORT_EVENT_REMOTE_WAKEUP'? [clang-diagnostic-error]
static inline bool _suspend_phy_clk(port_t *port, bool suspend)
{
// Stop PHY Clock and gate HCLK
usb_dwc_hal_pwr_clk_toggle_phy_suspend(port->hal, suspend);

Check failure

Code scanning / clang-tidy

use of undeclared identifier 'usb_dwc_hal_pwr_clk_toggle_phy_suspend' [clang-diagnostic-error] Error

use of undeclared identifier 'usb_dwc_hal_pwr_clk_toggle_phy_suspend' [clang-diagnostic-error]
// which makes 33.3 nS. Busy wait for 1uS just to be sure
esp_rom_delay_us(1);

const bool phy_clk_stopped = usb_dwc_hal_pwr_clk_check_phy_clk_stopped(port->hal);

Check failure

Code scanning / clang-tidy

use of undeclared identifier 'usb_dwc_hal_pwr_clk_check_phy_clk_stopped' [clang-diagnostic-error] Error

use of undeclared identifier 'usb_dwc_hal_pwr_clk_check_phy_clk_stopped' [clang-diagnostic-error]
esp_rom_delay_us(1);

const bool phy_clk_stopped = usb_dwc_hal_pwr_clk_check_phy_clk_stopped(port->hal);
const bool hclk_gated = usb_dwc_hal_pwr_clk_check_hclk_gated(port->hal);

Check failure

Code scanning / clang-tidy

use of undeclared identifier 'usb_dwc_hal_pwr_clk_check_hclk_gated' [clang-diagnostic-error] Error

use of undeclared identifier 'usb_dwc_hal_pwr_clk_check_hclk_gated' [clang-diagnostic-error]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: usb_host Issue affects usb_host component Status: In Progress Issue is being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants