PebbleOS v4.47.0-1362-gd278268fe
Loading...
Searching...
No Matches
Watchdog drivers

Interface for watchdog drivers. More...

Data Structures

struct  pbl_watchdog_ops
 Watchdog driver operations. More...
 
struct  pbl_watchdog
 Watchdog device. More...
 

Macros

#define PBL_WATCHDOG_STATE_DEFINE(sym)   PBL_DEVICE_STATE_DEFINE(sym)
 Define the state of a watchdog device.
 
#define PBL_WATCHDOG_INIT(sym, _name, _parent, _ops)
 Initializer of a watchdog device.
 

Detailed Description

Interface for watchdog drivers.

A driver embeds a struct pbl_watchdog in its instance, sets it up with PBL_WATCHDOG_STATE_DEFINE() and PBL_WATCHDOG_INIT(), and implements the struct pbl_watchdog_ops the class calls.


Data Structure Documentation

◆ pbl_watchdog

struct pbl_watchdog

Watchdog device.

Data Fields
struct pbl_device dev Device.
const struct pbl_watchdog_ops * ops Driver operations.

Macro Definition Documentation

◆ PBL_WATCHDOG_INIT

#define PBL_WATCHDOG_INIT (   sym,
  _name,
  _parent,
  _ops 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, pbl_watchdog_dev_init, _parent, &pbl_watchdog_class), \
.ops = (_ops), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:153

Initializer of a watchdog device.

Parameters
symSymbol of the device.
_nameName.
_parentParent device, or nullptr.
_opsDriver operations.

◆ PBL_WATCHDOG_STATE_DEFINE

#define PBL_WATCHDOG_STATE_DEFINE (   sym)    PBL_DEVICE_STATE_DEFINE(sym)

Define the state of a watchdog device.

Parameters
symSymbol of the device.