feat(esp_hal_usb): add usb suspend wakeup status in ll layer

This commit is contained in:
JiangGuangMing
2026-06-08 16:31:25 +08:00
parent 87b0c4c40d
commit c8dcd0d2aa
4 changed files with 59 additions and 0 deletions
@@ -119,6 +119,24 @@ FORCE_INLINE_ATTR void usb_utmi_ll_enable_precise_detection(bool enable)
HP_SYSTEM.sys_usbotg20_ctrl.sys_otg_suspendm = enable;
}
/**
* @brief Set USB OTG2.0 suspend state for PMU USB wakeup logic
*
* @param[in] in_suspend True if USB OTG2.0 is suspended
*/
FORCE_INLINE_ATTR void usb_utmi_ll_set_suspend_state(bool in_suspend)
{
LP_SYS.usb_ctrl.usbotg20_in_suspend = in_suspend;
}
/**
* @brief Clear USB OTG2.0 wakeup status sent to PMU
*/
FORCE_INLINE_ATTR void usb_utmi_ll_clear_wakeup_status(void)
{
LP_SYS.usb_ctrl.usbotg20_wakeup_clr = 1;
}
#ifdef __cplusplus
}
#endif