feat(usb): add usb wakeup from light sleep example

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
JiangGuangMing
2026-06-29 16:08:35 +08:00
committed by BOT
co-authored by Cursor
parent 0252365360
commit 5099acf16e
9 changed files with 302 additions and 1 deletions
@@ -1,11 +1,12 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "esp_err.h"
#include "soc/soc_caps.h"
@@ -164,6 +165,18 @@ esp_err_t usb_new_phy(const usb_phy_config_t *config, usb_phy_handle_t *handle_r
*/
esp_err_t usb_phy_otg_set_mode(usb_phy_handle_t handle, usb_otg_mode_t mode);
/**
* @brief Set the USB OTG suspend state for USB wakeup logic
*
* @param in_suspend True if the USB OTG bus is suspended
*/
void usb_phy_set_otg_suspend_state(bool in_suspend);
/**
* @brief Clear USB OTG wakeup status from the USB wakeup logic
*/
void usb_phy_clear_otg_wakeup_status(void);
/**
* @brief Delete a USB PHY
*