board.h File Reference

Board specific definitions for Olimex ESP32-EVB (ESP32-GATEWAY) More...

Detailed Description

Board specific definitions for Olimex ESP32-EVB (ESP32-GATEWAY)

This configuration is for the Olimex ESP32-EVB, but can also be used for the Olimex ESP32-GATEWAY. To use this board definition with Olimex ESP32-GATEWAY, add

USEMODULE += olimex_esp32_gateway

to the makefile of the application to use the according default board configuration.

For detailed information about the configuration of ESP32 boards, see section Common Peripherals.

Note
Most definitions can be overridden by an application-specific board configuration.
Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file board.h.

#include <stdint.h>
#include "board_common.h"
+ Include dependency graph for board.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void board_init (void)
 Initialize the board specific hardware.
 

Button pin definitions

#define BTN0_PIN   GPIO34
 Default button GPIO pin definition.
 
#define BTN0_MODE   GPIO_IN
 Default button GPIO mode definition. More...
 
#define BTN0_INT_FLANK   GPIO_FALLING
 Default interrupt flank definition for the button GPIO.
 
#define BUTTON0_PIN   BTN0_PIN
 Definition for compatibility with previous versions.
 

SD-Card interface configuration

SD-Card interface uses SPI_DEV(1) on this board.

Note
On Olimex ESP32-EVB, the CD/CS pin is not connected and simply pulled-up. Therefore, SPI bus mode is not available and the card interface can be used only in 1-bit SD bus mode. That is, SPI SD-Card is not working. On Olimex ESP32-GATEWAY, the CD/CS pin is connected to GPIO13. The SPI SD-Card driver should work on this board.
#define SDCARD_SPI_PARAM_SPI   SPI_DEV(0)
 
#define SDCARD_SPI_PARAM_CS   GPIO13
 
#define SDCARD_SPI_PARAM_CLK   SPI0_SCK
 
#define SDCARD_SPI_PARAM_MOSI   SPI0_MOSI
 
#define SDCARD_SPI_PARAM_MISO   SPI0_MISO
 
#define SDCARD_SPI_PARAM_POWER   GPIO_UNDEF
 

ESP32 Ethernet (EMAC) configuration

#define EMAC_PHY_LAN8720   1
 LAN8710 used as PHY interface.
 
#define EMAC_PHY_ADDRESS   0
 PHY0 used as base address.
 
#define EMAC_PHY_SMI_MDC_PIN   23
 SMI MDC pin.
 
#define EMAC_PHY_SMI_MDIO_PIN   18
 SMI MDC pin.
 
#define EMAC_PHY_CLOCK_MODE   ETH_CLOCK_GPIO0_IN
 external 50 MHz clock
 
#define EMAC_PHY_POWER_PIN   GPIO_UNDEF
 power enable pin not used
 

Macro Definition Documentation

◆ BTN0_MODE

#define BTN0_MODE   GPIO_IN

Default button GPIO mode definition.

Since the GPIO of the button is pulled up with an external resistor, the mode for the GPIO pin has to be GPIO_IN.

Definition at line 55 of file board.h.