|
LowPower
|
Low Power Management for ESP32: More...
#include <LowPowerESP32.h>

Public Member Functions | |
| bool | isProcessingOnSleep (sleep_mode_enum_t sleep_mode) |
| Returns true if processing is possible in the current sleep mode. | |
| bool | sleep (void) override |
| sets processor into sleep mode | |
| bool | setSleepTime (uint32_t time, time_unit_t time_unit) override |
| Defines the sleep time. | |
| bool | addWakeupPin (int pin, pin_change_t change_type) override |
| Defines the wakup pin. | |
| bool | addWakeupTouchPin (int pin, int touch_threshold=TOUCH_THREASHOLD) |
| Wakup by touch pin. | |
| void | setWakeupType (wakeup_t wakeup) |
| There are two types for ESP32, ext0 and ext1 . ext0 uses RTC_IO to wakeup thus requires RTC peripherals to be on while ext1 uses RTC Controller so does not need peripherals to be powered on. Note that using internal pullups/pulldowns also requires RTC peripherals to be turned on. | |
| bool | isModeSupported (sleep_mode_enum_t sleep_mode) override |
| Provides information if the indicated mode is supported. | |
| void | clear () override |
| Reset to the initial state. | |
| void | setCpuFrequencyMhz (int mhz) |
| virtual bool | sleepFor (uint32_t time, time_unit_t time_unit_type) |
| sets mc into sleep mode to sleep for indicated millis | |
| virtual void | setActive (bool flag) |
| sets the flag to be active | |
| virtual void | setActiveTime (uint32_t time, time_unit_t time_unit_type) |
| Defiles the active time. | |
| virtual bool | isActive () |
| Checks if we are active (not sleeping) | |
| virtual | operator bool () |
| same as isActive() | |
| virtual bool | setSleepMode (sleep_mode_enum_t mode) |
| Defines the sleep mode. | |
| virtual void | process () |
| Triggers the processing to be active or sleeping based on the set definitions. | |
| virtual bool | isProcessingOnSleep () |
| Returns true if processing is possible in the current sleep mode. | |
Protected Member Functions | |
| void | wifiSetPS (wifi_ps_type_t type) |
| bool | isTouchPin (int pin) |
| uint64_t | toUs (uint64_t time, time_unit_t time_unit) |
Low Power Management for ESP32:
Additional ESP32 specific functionality/features:
Attention: at wakup of deep sleep we restart in setup.