Add ESP::deepSleep(us)
fixes: https://github.com/espressif/arduino-esp32/issues/51
This commit is contained in:
parent
fdc4f53eb6
commit
7a7b697ff9
@ -20,6 +20,7 @@
|
||||
#include "Arduino.h"
|
||||
#include "Esp.h"
|
||||
#include "rom/spi_flash.h"
|
||||
#include "esp_deep_sleep.h"
|
||||
#include <memory>
|
||||
|
||||
//#define DEBUG_SERIAL Serial
|
||||
@ -80,6 +81,11 @@ unsigned long long operator"" _GB(unsigned long long x)
|
||||
|
||||
EspClass ESP;
|
||||
|
||||
void EspClass::deepSleep(uint32_t time_us)
|
||||
{
|
||||
esp_deep_sleep(time_us);
|
||||
}
|
||||
|
||||
uint32_t EspClass::getCycleCount()
|
||||
{
|
||||
uint32_t ccount;
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
|
||||
const char * getSdkVersion();
|
||||
|
||||
void deepSleep(uint32_t time_us);
|
||||
|
||||
uint8_t getCpuFreqMHz();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user