fix(esp_hw_support): allows to forcefully disable submodes at mode initialization

This commit is contained in:
wuzhenghui
2024-09-12 11:57:02 +08:00
parent 00991f1bf5
commit 37fa09f1dc
2 changed files with 39 additions and 3 deletions
@@ -43,6 +43,7 @@ typedef enum {
/**
* @brief Set sub-sleep power mode in sleep, mode enabled status is maintained by reference count.
* The caller should ensure that the enabling and disabling behavior is symmetric.
* This submode configuration will kept after deep sleep wakeup.
*
* @param mode sub-sleep mode type
@@ -54,6 +55,17 @@ typedef enum {
*/
esp_err_t esp_sleep_sub_mode_config(esp_sleep_sub_mode_t mode, bool activate);
/**
* @brief Force disable sub-sleep power mode in sleep, usually used during initialization.
*
* @param mode sub-sleep mode type
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_ARG if either of the arguments is out of range
*/
esp_err_t esp_sleep_sub_mode_force_disable(esp_sleep_sub_mode_t mode);
/**
* Dump the sub-sleep power mode enable status
* @param stream The stream to dump to, if NULL then nothing will be dumped