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

Interface for pin controller drivers. More...

Data Structures

struct  pbl_pinctrl_controller_ops
 Pin controller driver operations. More...
 
struct  pbl_pinctrl_controller
 A pin controller. More...
 

Macros

#define PBL_PINCTRL_CONTROLLER_INIT(sym, _name, _parent, _ops, _num_pads, _hog)
 Initializer for the struct pbl_pinctrl_controller of controller sym.
 

Variables

const struct pbl_device_class pbl_pinctrl_class
 Class of the pin controllers.
 

Detailed Description

Interface for pin controller drivers.

A driver embeds a struct pbl_pinctrl_controller in its instance, sets it up with PBL_PINCTRL_CONTROLLER_INIT(), and implements the struct pbl_pinctrl_controller_ops the class calls.


Data Structure Documentation

◆ pbl_pinctrl_controller

struct pbl_pinctrl_controller

A pin controller.

Data Fields
struct pbl_device dev Device.
const struct pbl_pinctrl_state * hog State of the controller's own, selected at init, or NULL.
uint16_t num_pads Number of pads.
const struct pbl_pinctrl_controller_ops * ops Driver operations.

Macro Definition Documentation

◆ PBL_PINCTRL_CONTROLLER_INIT

#define PBL_PINCTRL_CONTROLLER_INIT (   sym,
  _name,
  _parent,
  _ops,
  _num_pads,
  _hog 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, pbl_pinctrl_controller_dev_init, _parent, \
.ops = (_ops), \
.num_pads = (_num_pads), \
.hog = (_hog), \
}
#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
const struct pbl_device_class pbl_pinctrl_class
Class of the pin controllers.

Initializer for the struct pbl_pinctrl_controller of controller sym.

Parameters
symSymbol of the controller instance, with its state defined by PBL_DEVICE_STATE_DEFINE().
_nameName.
_parentParent device, or NULL.
_opsDriver operations.
_num_padsNumber of pads.
_hogState of the controller's own, selected at init, or NULL.

Variable Documentation

◆ pbl_pinctrl_class

const struct pbl_device_class pbl_pinctrl_class
extern

Class of the pin controllers.