6#ifndef HOMECORE_DRIVERS_GPIO_H
7#define HOMECORE_DRIVERS_GPIO_H
53 int (*set)(
void *port,
unsigned pin,
bool high);
57 int (*get)(
void *port,
unsigned pin,
bool *high);
gpio_mode_t
Pin configuration for gpio_ops_t::configure.
Definition gpio.h:35
@ GPIO_INPUT_PULL_UP
Input with the internal pull-up resistor.
Definition gpio.h:39
@ GPIO_INPUT
Floating input.
Definition gpio.h:37
@ GPIO_OUTPUT
Push-pull output at the lowest speed, initially low.
Definition gpio.h:43
@ GPIO_INPUT_PULL_DOWN
Input with the internal pull-down resistor.
Definition gpio.h:41
Operations a GPIO port driver provides; every one is required.
Definition gpio.h:47
A GPIO port: driver operations bound to one port instance.
Definition gpio.h:61
void * port
Port instance passed to every operation.
Definition gpio.h:65
const gpio_ops_t * ops
Operations of the port's driver.
Definition gpio.h:63