Function esp_idf_hal::sys::esp_task_wdt_init
source · pub unsafe extern "C" fn esp_task_wdt_init(
config: *const esp_task_wdt_config_t,
) -> i32
Expand description
@brief Initialize the Task Watchdog Timer (TWDT)
This function configures and initializes the TWDT. This function will subscribe the idle tasks if configured to do so. For other tasks, users can subscribe them using esp_task_wdt_add() or esp_task_wdt_add_user(). This function won’t start the timer if no task have been registered yet.
@note esp_task_wdt_init() must only be called after the scheduler is started. Moreover, it must not be called by multiple tasks simultaneously. @param[in] config Configuration structure @return
- ESP_OK: Initialization was successful
- ESP_ERR_INVALID_STATE: Already initialized
- Other: Failed to initialize TWDT