Code: Select all
void RTC_IRAM_ATTR esp_wake_deep_sleep(void) {
esp_default_wake_deep_sleep();
REG_SET_BIT(GPIO_ENABLE_REG, BIT2);
REG_WRITE(GPIO_OUT_W1TS_REG, BIT2);
//the pin is on for 1/10 second
ets_delay_us(100000);
[...]code for going to sleep[...]
//the pin is off in deep sleep
}