Interface for GPIO port drivers.
More...
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().
◆ PBL_GPIO_PORT_INIT
| #define PBL_GPIO_PORT_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_init, |
|
|
|
_parent, |
|
|
|
_ops, |
|
|
|
_num_pins, |
|
|
|
_intc |
|
) |
| |
Value: { \
.dev = \
.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
-
| sym | Symbol of the port instance, with its state defined by PBL_DEVICE_STATE_DEFINE(). |
| _name | Name. |
| _init | Driver init function, or NULL. |
| _parent | Parent device, or NULL. |
| _ops | Driver operations. |
| _num_pins | Number of pins. |
| _intc | Interrupt controller of the pins, or NULL. |
◆ pbl_gpio_port_class