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
87 #ifndef I2C0_SPEED
88 #define I2C0_SPEED I2C_SPEED_FAST
89 #endif
90 #ifndef I2C0_SCL
91 #define I2C0_SCL GPIO22
92 #endif
93 #ifndef I2C0_SDA
94 #define I2C0_SDA GPIO21
95 #endif
108 #ifndef PWM0_GPIOS
109 #define PWM0_GPIOS { GPIO14, GPIO0, GPIO2, GPIO25 }
110 #endif
124 #ifndef SPI0_CTRL
125 #define SPI0_CTRL VSPI
126 #endif
127 #ifndef SPI0_SCK
128 #define SPI0_SCK GPIO5
129 #endif
130 #ifndef SPI0_MISO
131 #define SPI0_MISO GPIO19
132 #endif
133 #ifndef SPI0_MOSI
134 #define SPI0_MOSI GPIO27
135 #endif
136 #ifndef SPI0_CS0
137 #define SPI0_CS0 GPIO18
138 #endif
152 #define UART0_TXD GPIO1
153 #define UART0_RXD GPIO3
155 #ifndef UART1_TXD
156 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
157 #define UART1_TXD GPIO12
158 #else
159 #define UART1_TXD GPIO15
160 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
161 #endif
162 #ifndef UART1_RXD
163 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
164 #define UART1_RXD GPIO34
165 #else
166 #define UART1_RXD GPIO12
167 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
168 #endif
171 #ifdef __cplusplus
172 } /* end extern "C" */
173 #endif
174 
175 /* include common board definitions as last step */
176 #include "periph_conf_common.h"
177 
178 #endif /* PERIPH_CONF_H */