Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
digilent-pmod.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Elektronikutvecklingsbyrån EUB AB
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
27#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_DIGILENT_PMOD_H_
28#define ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_DIGILENT_PMOD_H_
29
35/* GPIO */
36
43#define PMOD_IO(n) ((n) - 1)
44
45/* SPI */
46
51#define PMOD_SPI_CS PMOD_IO(1)
52
57#define PMOD_SPI_MOSI PMOD_IO(2)
58
63#define PMOD_SPI_MISO PMOD_IO(3)
64
69#define PMOD_SPI_SCK PMOD_IO(4)
70
71/* Expanded SPI */
72
77#define PMOD_EXP_SPI_CS PMOD_IO(1)
78
83#define PMOD_EXP_SPI_MOSI PMOD_IO(2)
84
89#define PMOD_EXP_SPI_MISO PMOD_IO(3)
90
95#define PMOD_EXP_SPI_SCK PMOD_IO(4)
96
101#define PMOD_EXP_SPI_INT PMOD_IO(5)
102
107#define PMOD_EXP_SPI_RESET PMOD_IO(6)
108
113#define PMOD_EXP_SPI_CS2 PMOD_IO(7)
114
119#define PMOD_EXP_SPI_CS3 PMOD_IO(8)
120
121/* Expanded UART */
122
127#define PMOD_EXP_UART_INT PMOD_IO(5)
128
133#define PMOD_EXP_UART_RESET PMOD_IO(6)
134
135/* H-bridge */
136
141#define PMOD_HBRIDGE_DIR PMOD_IO(1)
142
147#define PMOD_HBRIDGE_EN PMOD_IO(2)
148
149/* Dual H-bridge */
150
155#define PMOD_DUAL_HBRIDGE_DIR1 PMOD_IO(1)
156
161#define PMOD_DUAL_HBRIDGE_EN1 PMOD_IO(2)
162
167#define PMOD_DUAL_HBRIDGE_DIR2 PMOD_IO(3)
168
173#define PMOD_DUAL_HBRIDGE_EN2 PMOD_IO(4)
174
175/* Expanded dual H-bridge */
176
181#define PMOD_EXP_DUAL_HBRIDGE_DIR1 PMOD_IO(1)
182
187#define PMOD_EXP_DUAL_HBRIDGE_EN1 PMOD_IO(2)
188
193#define PMOD_EXP_DUAL_HBRIDGE_DIR2 PMOD_IO(5)
194
199#define PMOD_EXP_DUAL_HBRIDGE_EN2 PMOD_IO(6)
200
201/* I2C */
202
207#define PMOD_I2C_INT PMOD_IO(1)
208
213#define PMOD_I2C_RESET PMOD_IO(2)
214
219#define PMOD_I2C_SCL PMOD_IO(3)
220
225#define PMOD_I2C_SDA PMOD_IO(4)
226
227#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_GPIO_DIGILENT_PMOD_H_ */