initial commit

This commit is contained in:
2026-09-25 10:48:51 +10:00
commit b90beea8ae
1020 changed files with 131665 additions and 0 deletions
@@ -0,0 +1,38 @@
/*!
* @file WatchdogESP32.h
*
* Support for ESP32 TWDT and low-power sleep modes.
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Written by Brent Rubell for Adafruit Industries.
*
* MIT License, all text here must be included in any redistribution.
*
*/
#ifndef WATCHDOGESP32_H_
#define WATCHDOGESP32_H_
#include "esp_sleep.h"
#include "esp_task_wdt.h"
/**************************************************************************/
/*!
@brief Class that contains functions for interacting with the ESP32's
WDT and low-power sleep functions.
*/
/**************************************************************************/
class WatchdogESP32 {
public:
WatchdogESP32() : _wdto(-1){};
int enable(int maxPeriodMS = 0);
void reset();
void disable();
int sleep(int maxPeriodMS = 0);
private:
int _wdto;
};
#endif // WATCHDOGESP32_H