cryptnox-pos 1.0.0
Standalone USDC payment terminal firmware (ESP32 + Cryptnox smart card)
Loading...
Searching...
No Matches
wdt.h File Reference

Task-watchdog feed that is safe to call from any task. More...

#include "esp_task_wdt.h"
Include dependency graph for wdt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void wdt_feed (void)
 Feed the task watchdog if, and only if, the calling task is subscribed.

Detailed Description

Task-watchdog feed that is safe to call from any task.

The main loop and the UI loop subscribe to the task watchdog, which resets the terminal (CONFIG_ESP_TASK_WDT_PANIC) when either stops feeding it for CONFIG_ESP_TASK_WDT_TIMEOUT_S — a hung PN532 I2C transaction or a wedged HTTP read, which used to freeze the panel until somebody pulled the plug.

The long waits both loops make on purpose (the card wait, the receipt poll, an HTTPS request) feed it from inside. Those helpers are also reached from tasks that are not subscribed, where a bare esp_task_wdt_reset() logs "task not found" on every call — hence the status check.

Definition in file wdt.h.

Function Documentation

◆ wdt_feed()

void wdt_feed ( void )
inlinestatic

Feed the task watchdog if, and only if, the calling task is subscribed.

Definition at line 28 of file wdt.h.

Referenced by app_main(), card_connect(), https_post_json(), net_time_sync(), net_wifi_connect(), net_wifi_scan(), settle_inflight(), and ui_task().