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 
9 #pragma once
10 
36 #include <stdint.h>
37 
46 #define BTN0_PIN GPIO34
47 
54 #define BTN0_MODE GPIO_IN
55 
59 #ifndef BTN0_INT_FLANK
60 #define BTN0_INT_FLANK GPIO_FALLING
61 #endif
62 
66 #define BUTTON0_PIN BTN0_PIN
75 #if MODULE_OLIMEX_ESP32_GATEWAY
76 #define LED0_PIN GPIO33
77 #define LED0_ACTIVE (1)
78 #endif
93 #if (MODULE_SDCARD_SPI && MODULE_OLIMEX_ESP32_GATEWAY) || DOXYGEN
94 #define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
95 #define SDCARD_SPI_PARAM_CS GPIO13
96 #define SDCARD_SPI_PARAM_CLK SPI0_SCK
97 #define SDCARD_SPI_PARAM_MOSI SPI0_MOSI
98 #define SDCARD_SPI_PARAM_MISO SPI0_MISO
99 #define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
100 #endif
107 #if MODULE_ESP_ETH || DOXYGEN
108 #define EMAC_PHY_LAN8720 1
109 #define EMAC_PHY_ADDRESS 0
110 #define EMAC_PHY_SMI_MDC_PIN 23
111 #define EMAC_PHY_SMI_MDIO_PIN 18
112 #define EMAC_PHY_CLOCK_MODE ETH_CLOCK_GPIO0_IN
113 #define EMAC_PHY_POWER_PIN GPIO_UNDEF
114 #endif
117 /* include common board definitions as last step */
118 #include "board_common.h"
119 
120 #ifdef __cplusplus
121 extern "C" {
122 #endif
123 
124 #ifdef __cplusplus
125 } /* end extern "C" */
126 #endif
127