AutoFilm-ESP32/include/watchdog.h

19 lines
397 B
C
Raw Permalink Normal View History

2024-06-25 21:04:22 +01:00
#ifndef WATCHDOG_H
#define WATCHDOG_H
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_task_wdt.h"
// Disable the watchdog timers
2024-06-25 21:34:47 +01:00
void disableWatchdogTimers()
{
2024-06-25 21:04:22 +01:00
esp_task_wdt_deinit();
TaskHandle_t idle_0 = xTaskGetIdleTaskHandleForCPU(0);
TaskHandle_t idle_1 = xTaskGetIdleTaskHandleForCPU(1);
esp_task_wdt_delete(idle_0);
esp_task_wdt_delete(idle_1);
}
#endif