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

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
JiangGuangMing
2026-06-11 09:05:40 +08:00
co-authored by Cursor
parent 3b32b1fc96
commit 33f65d3ff2
3 changed files with 83 additions and 3 deletions
+23 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -57,6 +57,28 @@ void _usb_utmi_hal_disable(void);
#define usb_utmi_hal_disable(...) do {(void)__DECLARE_RCC_ATOMIC_ENV; _usb_utmi_hal_disable(__VA_ARGS__);} while(0)
#endif
/**
* @brief Enable/disable 15k pulldown resistors on D+/D- lines
*
* In USB Host mode, 15k pulldown resistors must be connected on both D+ and D-.
* In USB Device mode, pulldown resistors must be disconnected.
*
* @param[in] enable true to connect pulldowns (Host mode), false to disconnect (Device mode)
*/
void usb_utmi_hal_enable_data_pulldowns(bool enable);
/**
* @brief Set USB OTG2.0 suspend state for PMU USB wakeup logic
*
* @param[in] in_suspend True if USB OTG2.0 is suspended
*/
void usb_utmi_hal_set_suspend_state(bool in_suspend);
/**
* @brief Clear USB OTG2.0 wakeup status sent to PMU
*/
void usb_utmi_hal_clear_wakeup_status(void);
#endif // (SOC_USB_UTMI_PHY_NUM > 0)
#ifdef __cplusplus