13#ifndef ZEPHYR_INCLUDE_DRIVERS_WATCHDOG_H_
14#define ZEPHYR_INCLUDE_DRIVERS_WATCHDOG_H_
34#define WDT_OPT_PAUSE_IN_SLEEP BIT(0)
39#define WDT_OPT_PAUSE_HALTED_BY_DBG BIT(1)
44#define WDT_FLAG_RESET_SHIFT (0)
48#define WDT_FLAG_RESET_MASK (0x3 << WDT_FLAG_RESET_SHIFT)
56#define WDT_FLAG_RESET_NONE (0 << WDT_FLAG_RESET_SHIFT)
58#define WDT_FLAG_RESET_CPU_CORE (1 << WDT_FLAG_RESET_SHIFT)
60#define WDT_FLAG_RESET_SOC (2 << WDT_FLAG_RESET_SHIFT)
102#ifdef CONFIG_WDT_MULTISTAGE
138__subsystem
struct wdt_driver_api {
165static inline int z_impl_wdt_setup(
const struct device *dev,
uint8_t options)
167 const struct wdt_driver_api *api =
168 (
const struct wdt_driver_api *)dev->
api;
170 return api->setup(dev, options);
188static inline int z_impl_wdt_disable(
const struct device *dev)
190 const struct wdt_driver_api *api =
191 (
const struct wdt_driver_api *)dev->
api;
193 return api->disable(dev);
221 const struct wdt_driver_api *api =
222 (
const struct wdt_driver_api *) dev->
api;
224 return api->install_timeout(dev, cfg);
241static inline int z_impl_wdt_feed(
const struct device *dev,
int channel_id)
243 const struct wdt_driver_api *api =
244 (
const struct wdt_driver_api *)dev->
api;
246 return api->feed(dev, channel_id);
257#include <syscalls/watchdog.h>
void
Definition: eswifi_shell.c:15
void(* wdt_callback_t)(const struct device *dev, int channel_id)
Definition: watchdog.h:84
int(* wdt_api_disable)(const struct device *dev)
Callback API for disabling watchdog instance. See wdt_disable() for argument descriptions.
Definition: watchdog.h:120
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 new timeout.
Definition: watchdog.h:218
int wdt_setup(const struct device *dev, uint8_t options)
Set up watchdog instance.
int wdt_feed(const struct device *dev, int channel_id)
Feed specified watchdog timeout.
int(* wdt_api_feed)(const struct device *dev, int channel_id)
Callback API for feeding specified watchdog timeout. See (wdt_feed) for argument descriptions.
Definition: watchdog.h:135
int(* wdt_api_install_timeout)(const struct device *dev, const struct wdt_timeout_cfg *cfg)
Callback API for installing new timeout. See wdt_install_timeout() for argument descriptions.
Definition: watchdog.h:127
int(* wdt_api_setup)(const struct device *dev, uint8_t options)
Callback API for setting up watchdog instance. See wdt_setup() for argument descriptions.
Definition: watchdog.h:113
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
const void * api
Definition: device.h:373
Watchdog timeout configuration struct.
Definition: watchdog.h:99
wdt_callback_t callback
Definition: watchdog.h:101
uint8_t flags
Definition: watchdog.h:105
struct wdt_window window
Definition: watchdog.h:100
Watchdog timeout window.
Definition: watchdog.h:78
uint32_t max
Definition: watchdog.h:80
uint32_t min
Definition: watchdog.h:79