periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Yegor Yefremov
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
30 #ifndef PERIPH_CONF_H
31 #define PERIPH_CONF_H
32 
33 #include <stdint.h>
34 
35 #ifdef __cplusplus
36  extern "C" {
37 #endif
38 
51 #ifndef ADC_GPIOS
52 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
53 #define ADC_GPIOS { GPIO0, GPIO2, GPIO4, GPIO13, GPIO25, \
54  GPIO32, GPIO33, GPIO35 }
55 #else
56 #define ADC_GPIOS { GPIO0, GPIO2, GPIO4, GPIO13, GPIO25, \
57  GPIO32, GPIO33, GPIO34, GPIO35 }
58 #endif
59 #endif
60 
71 #ifndef DAC_GPIOS
72 #define DAC_GPIOS { GPIO25 }
73 #endif
74 
88 #ifndef I2C0_SPEED
89 #define I2C0_SPEED I2C_SPEED_FAST
90 #endif
91 #ifndef I2C0_SCL
92 #define I2C0_SCL GPIO22
93 #endif
94 #ifndef I2C0_SDA
95 #define I2C0_SDA GPIO21
96 #endif
97 
110 #ifndef PWM0_GPIOS
111 #define PWM0_GPIOS { GPIO14, GPIO0, GPIO2, GPIO25 }
112 #endif
113 
126 #ifndef SPI0_CTRL
127 #define SPI0_CTRL VSPI
128 #endif
129 #ifndef SPI0_SCK
130 #define SPI0_SCK GPIO5
131 #endif
132 #ifndef SPI0_MISO
133 #define SPI0_MISO GPIO19
134 #endif
135 #ifndef SPI0_MOSI
136 #define SPI0_MOSI GPIO27
137 #endif
138 #ifndef SPI0_CS0
139 #define SPI0_CS0 GPIO18
140 #endif
141 
154 #define UART0_TXD GPIO1
155 #define UART0_RXD GPIO3
157 #ifndef UART1_TXD
158 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
159 #define UART1_TXD GPIO12
160 #else
161 #define UART1_TXD GPIO15
162 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
163 #endif
164 #ifndef UART1_RXD
165 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
166 #define UART1_RXD GPIO34
167 #else
168 #define UART1_RXD GPIO12
169 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
170 #endif
171 
174 #ifdef __cplusplus
175 } /* end extern "C" */
176 #endif
177 
178 /* include common board definitions as last step */
179 #include "periph_conf_common.h"
180 
181 #endif /* PERIPH_CONF_H */
182