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

Interface for GPIO port drivers. More...

Data Structures

struct  pbl_gpio_port_ops
 Port driver operations. More...
 
struct  pbl_gpio_port
 A GPIO controller. More...
 

Macros

#define PBL_GPIO_PORT_INIT(sym, _name, _init, _parent, _ops, _num_pins, _intc)
 Initializer for a struct pbl_gpio_port.
 

Variables

const struct pbl_device_class pbl_gpio_port_class
 Class of the GPIO ports.
 

Detailed Description

Interface for GPIO port drivers.

A driver embeds a struct pbl_gpio_port in its instance, sets it up with PBL_GPIO_PORT_INIT(), and implements the struct pbl_gpio_port_ops the class calls. Hogs are defined with PBL_GPIO_HOG_DEFINE().

Macro Definition Documentation

◆ PBL_GPIO_PORT_INIT

#define PBL_GPIO_PORT_INIT (   sym,
  _name,
  _init,
  _parent,
  _ops,
  _num_pins,
  _intc 
)
Value:
{ \
.dev = \
PBL_DEVICE_INIT_CLASS(sym, _name, pbl_gpio_port_dev_init, _parent, &pbl_gpio_port_class), \
.ops = (_ops), \
.num_pins = (_num_pins), \
.intc = (_intc), \
.init = (_init), \
}
const struct pbl_device_class pbl_gpio_port_class
Class of the GPIO ports.

Initializer for a struct pbl_gpio_port.

Parameters
symSymbol of the port instance, with its state defined by PBL_DEVICE_STATE_DEFINE().
_nameName.
_initDriver init function, or NULL.
_parentParent device, or NULL.
_opsDriver operations.
_num_pinsNumber of pins.
_intcInterrupt controller of the pins, or NULL.

Variable Documentation

◆ pbl_gpio_port_class

const struct pbl_device_class pbl_gpio_port_class
extern

Class of the GPIO ports.