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 
9 #pragma once
10 
32 #include <stdint.h>
33 
34 #ifdef __cplusplus
35  extern "C" {
36 #endif
37 
50 #ifndef ADC_GPIOS
51 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
52 #define ADC_GPIOS { GPIO0, GPIO2, GPIO4, GPIO13, GPIO25, \
53  GPIO32, GPIO33, GPIO35, GPIO36, GPIO39 }
54 #else
55 #define ADC_GPIOS { GPIO0, GPIO2, GPIO4, GPIO13, GPIO25, \
56  GPIO32, GPIO33, GPIO35, GPIO36, GPIO34 }
57 #endif
58 #endif
59 
70 #ifndef DAC_GPIOS
71 #define DAC_GPIOS { GPIO25 }
72 #endif
86 #ifndef I2C0_SPEED
87 #define I2C0_SPEED I2C_SPEED_FAST
88 #endif
89 #ifndef I2C0_SCL
90 #define I2C0_SCL GPIO22
91 #endif
92 #ifndef I2C0_SDA
93 #define I2C0_SDA GPIO21
94 #endif
107 #ifndef PWM0_GPIOS
108 #define PWM0_GPIOS { GPIO14, GPIO0, GPIO2, GPIO25 }
109 #endif
123 #ifndef SPI0_CTRL
124 #define SPI0_CTRL VSPI
125 #endif
126 #ifndef SPI0_SCK
127 #define SPI0_SCK GPIO5
128 #endif
129 #ifndef SPI0_MISO
130 #define SPI0_MISO GPIO19
131 #endif
132 #ifndef SPI0_MOSI
133 #define SPI0_MOSI GPIO27
134 #endif
135 #ifndef SPI0_CS0
136 #define SPI0_CS0 GPIO18
137 #endif
151 #define UART0_TXD GPIO1
152 #define UART0_RXD GPIO3
154 #ifndef UART1_TXD
155 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
156 #define UART1_TXD GPIO12
157 #else
158 #define UART1_TXD GPIO15
159 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
160 #endif
161 #ifndef UART1_RXD
162 #if MODULE_ESP32_TTGO_T_BEAM_V1_0
163 #define UART1_RXD GPIO34
164 #else
165 #define UART1_RXD GPIO12
166 #endif /* MODULE_ESP32_TTGO_T_BEAM_V1_0 */
167 #endif
170 #ifdef __cplusplus
171 } /* end extern "C" */
172 #endif
173 
174 /* include common board definitions as last step */
175 #include "periph_conf_common.h"
176