Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.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 BOARD_H
35
#define BOARD_H
36
37
#include <stdint.h>
38
47
#define BTN0_PIN GPIO34
48
55
#define BTN0_MODE GPIO_IN
56
60
#ifndef BTN0_INT_FLANK
61
#define BTN0_INT_FLANK GPIO_FALLING
62
#endif
63
67
#define BUTTON0_PIN BTN0_PIN
68
76
#if MODULE_OLIMEX_ESP32_GATEWAY
77
#define LED0_PIN GPIO33
78
#define LED0_ACTIVE (1)
79
#endif
80
94
#if (MODULE_SDCARD_SPI && MODULE_OLIMEX_ESP32_GATEWAY) || DOXYGEN
95
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
96
#define SDCARD_SPI_PARAM_CS GPIO13
97
#define SDCARD_SPI_PARAM_CLK SPI0_SCK
98
#define SDCARD_SPI_PARAM_MOSI SPI0_MOSI
99
#define SDCARD_SPI_PARAM_MISO SPI0_MISO
100
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
101
#endif
102
108
#if MODULE_ESP_ETH || DOXYGEN
109
#define EMAC_PHY_LAN8720 1
110
#define EMAC_PHY_ADDRESS 0
111
#define EMAC_PHY_SMI_MDC_PIN 23
112
#define EMAC_PHY_SMI_MDIO_PIN 18
113
#define EMAC_PHY_CLOCK_MODE ETH_CLOCK_GPIO0_IN
114
#define EMAC_PHY_POWER_PIN GPIO_UNDEF
115
#endif
116
118
/* include common board definitions as last step */
119
#include "board_common.h"
120
121
#ifdef __cplusplus
122
extern
"C"
{
123
#endif
124
128
static
inline
void
board_init
(
void
) {
129
/* there is nothing special to initialize on this board */
130
board_init_common
();
131
}
132
133
#ifdef __cplusplus
134
}
/* end extern "C" */
135
#endif
136
137
#endif
/* BOARD_H */
138
board_init_common
void board_init_common(void)
Initialize the hardware that is common for all ESP32 boards.
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17