Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
periph_conf.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Gunar Schorcht
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
34
#ifndef PERIPH_CONF_H
35
#define PERIPH_CONF_H
36
37
#include <stdint.h>
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
59
#ifndef ADC_GPIOS
60
#if MODULE_OLIMEX_ESP32_GATEWAY
61
#define ADC_GPIOS { GPIO32, GPIO35, GPIO36, GPIO39 }
62
#else
/* MODULE_OLIMEX_ESP32_GATEWAY */
63
#define ADC_GPIOS { }
64
#endif
/* MODULE_OLIMEX_ESP32_GATEWAY */
65
#endif
/* ADC_GPIOS */
66
68
#ifndef DAC_GPIOS
69
#define DAC_GPIOS { }
70
#endif
71
78
#ifndef MODULE_OLIMEX_ESP32_GATEWAY
79
#define CAN_TX GPIO5
80
#define CAN_RX GPIO35
81
#endif
82
96
#ifndef I2C0_SPEED
97
#define I2C0_SPEED I2C_SPEED_FAST
98
#endif
99
100
#ifdef MODULE_OLIMEX_ESP32_GATEWAY
101
#ifndef I2C0_SCL
102
#define I2C0_SCL GPIO16
103
#endif
104
#ifndef I2C0_SDA
105
#define I2C0_SDA GPIO17
106
#endif
107
#else
/* MODULE_OLIMEX_ESP32_GATEWAY */
108
#ifndef I2C0_SCL
109
#define I2C0_SCL GPIO16
110
#endif
111
#ifndef I2C0_SDA
112
#define I2C0_SDA GPIO13
113
#endif
114
#endif
/* MODULE_OLIMEX_ESP32_GATEWAY */
115
131
#ifndef PWM0_GPIOS
132
#if FLASH_MODE_DOUT || FLASH_MODE_DIO || DOXYGEN
133
#define PWM0_GPIOS { GPIO9, GPIO10 }
134
#else
135
#error Configuration problem: Flash mode qio or qout is used, \
136
GPIO9 and GPIO10 cannot be used as PWM channels as configured
137
#define PWM0_GPIOS { }
138
#endif
139
#endif
140
142
#ifndef PWM1_GPIOS
143
#define PWM1_GPIOS { }
144
#endif
145
168
#ifndef SPI0_CTRL
169
#define SPI0_CTRL HSPI
170
#endif
171
172
#ifndef SPI0_SCK
173
#define SPI0_SCK GPIO14
174
#endif
175
#ifndef SPI0_MISO
176
#define SPI0_MISO GPIO2
177
#endif
178
#ifndef SPI0_MOSI
179
#define SPI0_MOSI GPIO15
180
#endif
181
182
#ifndef SPI0_CS0
183
#ifndef MODULE_OLIMEX_ESP32_GATEWAY
184
#define SPI0_CS0 GPIO17
185
#else
/* MODULE_OLIMEX_ESP32_GATEWAY */
186
#define SPI0_CS0 GPIO13
187
#endif
/* MODULE_OLIMEX_ESP32_GATEWAY */
188
#endif
/* SPI0_CS0 */
189
206
#define UART0_TXD GPIO1
207
#define UART0_RXD GPIO3
209
#ifndef UART1_TXD
210
#define UART1_TXD GPIO4
211
#endif
212
#ifndef UART1_RXD
213
#define UART1_RXD GPIO36
214
#endif
215
217
#ifdef __cplusplus
218
}
/* end extern "C" */
219
#endif
220
221
/* include common peripheral definitions as last step */
222
#include "periph_conf_common.h"
223
224
#endif
/* PERIPH_CONF_H */
225
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17