Zephyr Project API  3.3.0
A Scalable Open Source RTOS
watchdog.h File Reference
#include <zephyr/types.h>
#include <zephyr/sys/util.h>
#include <zephyr/device.h>
#include <syscalls/watchdog.h>

Go to the source code of this file.

Data Structures

struct  wdt_window
 Watchdog timeout window. More...
 
struct  wdt_timeout_cfg
 Watchdog timeout configuration. More...
 

Macros

Watchdog options

#define WDT_OPT_PAUSE_IN_SLEEP   BIT(0)
 Pause watchdog timer when CPU is in sleep state. More...
 
#define WDT_OPT_PAUSE_HALTED_BY_DBG   BIT(1)
 Pause watchdog timer when CPU is halted by the debugger. More...
 
Watchdog behavior flags

#define WDT_FLAG_RESET_NONE   (0 << WDT_FLAG_RESET_SHIFT)
 
#define WDT_FLAG_RESET_CPU_CORE   (1 << WDT_FLAG_RESET_SHIFT)
 
#define WDT_FLAG_RESET_SOC   (2 << WDT_FLAG_RESET_SHIFT)
 

Typedefs

typedef void(* wdt_callback_t) (const struct device *dev, int channel_id)
 Watchdog callback. More...
 

Functions

int wdt_setup (const struct device *dev, uint8_t options)
 Set up watchdog instance. More...
 
int wdt_disable (const struct device *dev)
 Disable watchdog instance. More...
 
static int wdt_install_timeout (const struct device *dev, const struct wdt_timeout_cfg *cfg)
 Install a new timeout. More...
 
int wdt_feed (const struct device *dev, int channel_id)
 Feed specified watchdog timeout. More...