Swadge ESP32-S2/S3
APIs to develop for the Magfest Swadge
Loading...
Searching...
No Matches
hdw-sleep-switch.h
Go to the documentation of this file.
1
41
42#pragma once
43
44#include <driver/gpio.h>
45#include <esp_err.h>
46
47esp_err_t initSleepSwitch(gpio_num_t gpio);
48bool sleepSwitchShouldSleep(void);
esp_err_t initSleepSwitch(gpio_num_t gpio)
Initialize a GPIO as an RTC GPIO which monitors the sleep switch.
Definition hdw-sleep-switch.c:16
bool sleepSwitchShouldSleep(void)
Check if the sleep switch should put the Swadge to sleep. This function does not call esp_deep_sleep_...
Definition hdw-sleep-switch.c:50