178 pin.
port->OUT &=~ _BV(pin.
bit);
186 return pin.
port->IN & _BV(pin.
bit);
void configure_gpio_pin(const struct gpio_pin *pin, enum gpio_type type)
Configures a GPIO pin.
Definition: gpio.c:107
static void gpio_drive_high(const struct gpio_pin pin)
Enables a GPIO output pin.
Definition: gpio.h:170
The GPIO pin acts as an output.
Definition: gpio.h:50
Nothing happened :-(.
Definition: gpio.h:39
enum gpio_input_event poll_gpio_input_timeout(const struct gpio_pin pin, enum gpio_type type, uint8_t timeout)
Polls a GPIO input pin with timeout.
Definition: gpio.c:139
This struct represents the four solder jumpers on the bottom side of the PCB.
Definition: gpio.h:86
static void gpio_toggle(const struct gpio_pin pin)
Toggles a GPIO output pin.
Definition: gpio.h:200
PORT_t * port
Definition: gpio.h:59
void init_gpio_module(const struct gpio_mapping mappings[], uint8_t mappings_size)
Initializes the GPIO module.
const struct gpio_pin * pin
GPIO pin to configure.
Definition: gpio.h:67
static void gpio_set(const struct gpio_pin pin, bool value)
Sets a GPIO output pin to the specified state.
Definition: gpio.h:194
static bool gpio_get(const struct gpio_pin pin)
Reads the state of a GPIO input pin.
Definition: gpio.h:185
uint8_t bit
The corresponding bit index in the configuration registers.
Definition: gpio.h:61
gpio_type
Function / type of a GPIO pin.
Definition: gpio.h:45
A GPIO input pin was seen logical "high" for some time.
Definition: gpio.h:41
The GPIO pin acts as an input and is pulled down.
Definition: gpio.h:48
static void gpio_drive_low(const struct gpio_pin pin)
Disables a GPIO output pin.
Definition: gpio.h:177
The GPIO pin acts as an input and is pulled up.
Definition: gpio.h:49
A GPIO input pin was seen logical "high" briefly.
Definition: gpio.h:40
bool poll_gpio_input(const struct gpio_pin pin, enum gpio_type type)
Polls a GPIO input pin.
Definition: gpio.c:134
Configurations for all available GPIO pins.
Definition: gpio.h:95
Configuration of a single GPIO pin.
Definition: gpio.h:57
Maps a GPIO pin to its designated type / function.
Definition: gpio.h:65
The GPIO pin acts as an input.
Definition: gpio.h:47
gpio_input_event
Possible GPIO input events.
Definition: gpio.h:37