Code: Select all
void app_main()
{
gpio_set_pull_mode(GPIO_NUM_25, GPIO_PULLUP_ONLY);
gpio_set_direction(GPIO_NUM_25, GPIO_MODE_INPUT);
gpio_wakeup_enable(GPIO_NUM_25, GPIO_INTR_LOW_LEVEL);
esp_sleep_enable_gpio_wakeup();
esp_light_sleep_start();
// Put pin 25 to GND
ESP_LOGE("Test", "Wakes as expected");
gpio_wakeup_disable(GPIO_NUM_25); // <---- has no impact
while(1) {
esp_light_sleep_start();
// Put pin 25 to GND
ESP_LOGE("Test", "Wakes but shouldn't");
}
}