39#define PM_NUM_MODES (1U)
45#define PROVIDES_PM_LAYERED_OFF
48#if defined(MODULE_PERIPH_GPIO_LINUX) || defined(DOXYGEN)
49#include <linux/gpio.h>
59#define GPIO_PORT_SHIFT (24)
64#define GPIO_PIN(port, pin) (gpio_t)((port << GPIO_PORT_SHIFT) | pin)
66#define HAVE_GPIO_MODE_T
67#ifndef GPIOHANDLE_REQUEST_PULL_DOWN
68#define GPIOHANDLE_REQUEST_PULL_DOWN (0xFF)
70#ifndef GPIOHANDLE_REQUEST_PULL_UP
71#define GPIOHANDLE_REQUEST_PULL_UP (0xFF)
83 GPIO_IN = GPIOHANDLE_REQUEST_INPUT,
84 GPIO_IN_PD = GPIOHANDLE_REQUEST_INPUT | GPIOHANDLE_REQUEST_PULL_DOWN,
85 GPIO_IN_PU = GPIOHANDLE_REQUEST_INPUT | GPIOHANDLE_REQUEST_PULL_UP,
86 GPIO_OUT = GPIOHANDLE_REQUEST_OUTPUT,
87 GPIO_OD = GPIOHANDLE_REQUEST_OPEN_DRAIN,
88 GPIO_OD_PU = GPIOHANDLE_REQUEST_OPEN_DRAIN | GPIOHANDLE_REQUEST_PULL_UP
91#define HAVE_GPIO_FLANK_T
93 GPIO_FALLING = GPIOEVENT_EVENT_FALLING_EDGE,
94 GPIO_RISING = GPIOEVENT_EVENT_RISING_EDGE,
95 GPIO_BOTH = GPIO_FALLING | GPIO_RISING
99#elif defined(MODULE_PERIPH_GPIO_MOCK)
111 void (*cb)(
void *arg);
119#define GPIO_PORT_MAX (16)
123#define GPIO_PIN_MAX (32)
129extern gpio_mock_t gpio_mock[GPIO_PORT_MAX][GPIO_PIN_MAX];
135typedef gpio_mock_t* gpio_t;
141#define GPIO_PIN(port, pin) \
142 (((port >= 0) && (pin >= 0) && (port < GPIO_PORT_MAX) && (pin < GPIO_PIN_MAX)) \
143 ? &gpio_mock[port][pin] \
151#define PERIPH_TIMER_PROVIDES_SET
157#define PROVIDES_PM_OFF
158#define PROVIDES_PM_SET_LOWEST
166#if defined(MODULE_PERIPH_SPIDEV_LINUX) || defined(DOXYGEN)
175#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
179#define PERIPH_SPI_NEEDS_TRANSFER_REG
183#define PERIPH_SPI_NEEDS_TRANSFER_REGS
189#define HAVE_SPI_CLK_T
213#define EEPROM_SIZE (1024U)
217#ifdef MODULE_PERIPH_CAN
@ GPIO_OUT
select GPIO MASK as output
@ GPIO_IN
select GPIO MASK as input
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
Implementation of simulated CAN controller driver using SocketCAN on Linux.
Native CPU peripheral configuration.
gpio_mode_t
Available pin modes.