mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
b675bb2a4d
ESP32-C2 has a single group timer, thus it will use it for the interrupt watchdog, which is more critical than the task watchdog. The latter is implement in software thanks to the `esp_timer`component.
47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "sdkconfig.h"
|
|
#include "esp_err.h"
|
|
|
|
#if CONFIG_ESP_TASK_WDT
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Stop the Task Watchdog Timer (TWDT)
|
|
*
|
|
* This function will temporarily stop the timer until it is restarted/resumed by a call to esp_task_wdt_restart().
|
|
|
|
* @note esp_task_wdt_stop() must not be called by multiple tasks simultaneously.
|
|
* @return
|
|
* - ESP_OK: TWDT successfully stopped
|
|
* - Other: Failed to stop the TWDT
|
|
*/
|
|
esp_err_t esp_task_wdt_stop(void);
|
|
|
|
/**
|
|
* @brief Restart the Task Watchdog Timer (TWDT)
|
|
*
|
|
* This function will restart/resume the timer after it has been stopped by esp_task_wdt_stop().
|
|
|
|
* @note esp_task_wdt_restart() must not be called by multiple tasks simultaneously.
|
|
* @return
|
|
* - ESP_OK: TWDT successfully stopped
|
|
* - Other: Failed to stop the TWDT
|
|
*/
|
|
esp_err_t esp_task_wdt_restart(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // CONFIG_ESP_TASK_WDT
|