mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 20:21:04 +00:00
esp32: Deactivate wakeup trigger after first wakeup
The files updated according to code review discussions. In the sleep_modes.c removed immidiate disable of ULP mode and leave just trigger deactivation. The esp_sleep.h is updated to have the same defines for source as esp_sleep_wakeup_cause_t. Updated documentation in sleep_modes.rst file to include cross references. Some minor changes in test_sleep.c unit test. (TW#18952) Closes https://github.com/espressif/esp-idf/issues/1677
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include "esp_err.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/touch_pad.h"
|
||||
#include "soc/rtc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -61,20 +60,11 @@ typedef enum {
|
||||
ESP_SLEEP_WAKEUP_TIMER, //!< Wakeup caused by timer
|
||||
ESP_SLEEP_WAKEUP_TOUCHPAD, //!< Wakeup caused by touchpad
|
||||
ESP_SLEEP_WAKEUP_ULP, //!< Wakeup caused by ULP program
|
||||
} esp_sleep_wakeup_cause_t;
|
||||
|
||||
/**
|
||||
* @brief Sleep wakeup sources for esp_sleep_disable_wakeup_source function
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_SLEEP_SOURCE_UNDEFINED, //!< Wakeup source is not defined
|
||||
ESP_SLEEP_SOURCE_EXT0, //!< Wakeup source for external signal using RTC_IO
|
||||
ESP_SLEEP_SOURCE_EXT1, //!< Wakeup source for external signal using RTC_CNTL
|
||||
ESP_SLEEP_SOURCE_TIMER, //!< Wakeup source for timer
|
||||
ESP_SLEEP_SOURCE_TOUCHPAD, //!< Wakeup source for touchpad
|
||||
ESP_SLEEP_SOURCE_ULP, //!< Wakeup source for ULP program
|
||||
} esp_sleep_source_t;
|
||||
|
||||
/* Leave this type define for compatibility */
|
||||
typedef esp_sleep_source_t esp_sleep_wakeup_cause_t;
|
||||
|
||||
/**
|
||||
* @brief Disable wakeup source
|
||||
*
|
||||
|
Reference in New Issue
Block a user