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

Interface for reset controller drivers. More...

Data Structures

struct  pbl_reset_controller_ops
 Reset controller driver operations, called with interrupts locked. More...
 
struct  pbl_reset_controller
 A reset controller. More...
 

Macros

#define PBL_RESET_CONTROLLER_STATE_DEFINE(sym)   PBL_DEVICE_STATE_DEFINE(sym)
 Define the class state of reset controller sym, for the driver's define macro.
 
#define PBL_RESET_CONTROLLER_INIT(sym, _name, _init, _parent, _ops, _num_resets)
 Initializer for the struct pbl_reset_controller of controller sym.
 

Detailed Description

Interface for reset controller drivers.

A driver embeds a struct pbl_reset_controller in its instance, sets it up with PBL_RESET_CONTROLLER_STATE_DEFINE() and PBL_RESET_CONTROLLER_INIT(), and implements the struct pbl_reset_controller_ops the class calls.


Data Structure Documentation

◆ pbl_reset_controller

struct pbl_reset_controller

A reset controller.

Data Fields
struct pbl_device dev Device.
uint16_t num_resets Number of reset lines.
const struct pbl_reset_controller_ops * ops Driver operations.

Macro Definition Documentation

◆ PBL_RESET_CONTROLLER_INIT

#define PBL_RESET_CONTROLLER_INIT (   sym,
  _name,
  _init,
  _parent,
  _ops,
  _num_resets 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, &pbl_reset_controller_class), \
.ops = (_ops), \
.num_resets = (_num_resets), \
}
#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 for the struct pbl_reset_controller of controller sym.

Parameters
symSymbol of the controller instance, with its state defined by PBL_RESET_CONTROLLER_STATE_DEFINE().
_nameName.
_initDevice init function, or NULL.
_parentParent device, or NULL.
_opsDriver operations.
_num_resetsNumber of reset lines.

◆ PBL_RESET_CONTROLLER_STATE_DEFINE

#define PBL_RESET_CONTROLLER_STATE_DEFINE (   sym)    PBL_DEVICE_STATE_DEFINE(sym)

Define the class state of reset controller sym, for the driver's define macro.

Parameters
symSymbol of the controller instance.