Loading...
Searching...
No Matches
gpio_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Tom Hert git@annsann.eu>
3 * SPDX-FileCopyrightText: 2025 HAW Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
18
20#define GPIO_PIN_NUMOF 30u
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27#define HAVE_GPIO_MODE_T
28
30typedef enum {
32 GPIO_IN_PD,
33 GPIO_IN_PU,
35 GPIO_OD,
37 GPIO_OD_PU,
40 GPIO_PIO1
42
78
79#ifdef __cplusplus
80}
81#endif
82
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:161
@ GPIO_IN
select GPIO MASK as input
Definition periph_cpu.h:160
gpio_function_select_t
Possible function values for gpio_io_ctrl_t::function_select.
Definition gpio_conf.h:46
@ FUNCTION_SELECT_PIO0
connect pin to the first PIO peripheral
Definition gpio_conf.h:63
@ FUNCTION_SELECT_CLOCK
connect pin to the timer (depending on pin: external clock, clock output, or not supported)
Definition gpio_conf.h:70
@ FUNCTION_SELECT_PIO1
connect pin to the second PIO peripheral
Definition gpio_conf.h:66
@ FUNCTION_SELECT_I2C
connect pin to the I2C peripheral (SCL/SDA depends on pin)
Definition gpio_conf.h:54
@ FUNCTION_SELECT_PWM
connect pin to the timer for PWM (channel depends on pin)
Definition gpio_conf.h:57
@ FUNCTION_SELECT_UART
connect pin to the UART peripheral (TXD/RXD depends on pin)
Definition gpio_conf.h:51
@ FUNCTION_SELECT_USB
connect pin to the USB peripheral (function depends on pin)
Definition gpio_conf.h:73
@ FUNCTION_SELECT_SIO
use pin as vanilla GPIO
Definition gpio_conf.h:60
@ FUNCTION_SELECT_SPI
connect pin to the SPI peripheral (MISO/MOSI/SCK depends on pin)
Definition gpio_conf.h:48
@ FUNCTION_SELECT_NONE
Reset value, pin unconnected.
Definition gpio_conf.h:76
@ GPIO_PIO0
configure pin for PIO usage
Definition gpio_conf.h:39
gpio_mode_t
Available pin modes.
Definition periph_cpu.h:96