Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
watchdog.h File Reference
#include <zephyr/types.h>
#include <zephyr/sys/util.h>
#include <zephyr/device.h>
#include <zephyr/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.
 
#define WDT_OPT_PAUSE_HALTED_BY_DBG   BIT(1)
 Pause watchdog timer when CPU is halted by the debugger.
 
Watchdog behavior flags

#define WDT_FLAG_RESET_NONE   (0 << WDT_FLAG_RESET_SHIFT)
 Reset: none.
 
#define WDT_FLAG_RESET_CPU_CORE   (1 << WDT_FLAG_RESET_SHIFT)
 Reset: CPU core.
 
#define WDT_FLAG_RESET_SOC   (2 << WDT_FLAG_RESET_SHIFT)
 Reset: SoC.
 

Typedefs

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

Functions

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