periph_conf_common.h File Reference

Common declarations of ESP32 periphery for all ESP32 boards. More...

Detailed Description

Common declarations of ESP32 periphery for all ESP32 boards.

This file contains peripheral configurations that are valid for all ESP32.

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

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file periph_conf_common.h.

#include "periph_cpu.h"
#include "kernel_defines.h"
+ Include dependency graph for periph_conf_common.h:

Go to the source code of this file.

ADC configuration

#define ADC_GPIOS   { }
 Declaration of GPIOs that can be used as ADC channels. More...
 
#define ADC_NUMOF   ARRAY_SIZE(adc_channels)
 Number of GPIOs declared as ADC channels. More...
 
static const gpio_t adc_channels [] = ADC_GPIOS
 Static array with declared ADC channels.
 

DAC configuration

#define DAC_GPIOS   { }
 Declaration of GPIOs that can be used as DAC channels. More...
 
#define DAC_NUMOF   ARRAY_SIZE(dac_channels)
 Number of GPIOs declared as DAC channels. More...
 
static const gpio_t dac_channels [] = DAC_GPIOS
 Static array with declared DAC channels.
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 Number of I2C interfaces. More...
 
static const i2c_conf_t i2c_config []
 Static array with configuration for declared I2C devices. More...
 

PWM configuration

#define PWM_NUMOF   (0)
 Static array of GPIOs that can be used as channels of PWM0. More...
 

SPI configuration

#define SPI_NUMOF   ARRAY_SIZE(spi_config)
 Number of SPI interfaces. More...
 
static const spi_conf_t spi_config []
 Static array with configuration for declared SPI devices. More...
 

UART configuration

#define UART0_TXD   (GPIO1)
 TxD of UART_DEV(0) used on all ESP32 boards.
 
#define UART0_RXD   (GPIO3)
 RxD of UART_DEV(0) used on all ESP32 boards.
 
#define UART_NUMOF   ARRAY_SIZE(uart_config)
 Number of UART interfaces. More...
 
static const uart_conf_t uart_config []
 Static array with configuration for declared UART devices. More...
 

Macro Definition Documentation

◆ ADC_GPIOS

#define ADC_GPIOS   { }

Declaration of GPIOs that can be used as ADC channels.

ADC_GPIOS is defined in board-specific peripheral configuration. Since ADC_GPIOS must be defined even if there are no ADC channels, an empty list definition is done here as fallback configuration.

Definition at line 47 of file periph_conf_common.h.

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_channels)

Number of GPIOs declared as ADC channels.

The number of GPIOs that are declared as ADC channels is determined from the ADC_GPIOS definition.

Note
ADC_NUMOF definition must not be changed.

Definition at line 63 of file periph_conf_common.h.

◆ DAC_GPIOS

#define DAC_GPIOS   { }

Declaration of GPIOs that can be used as DAC channels.

DAC_GPIOS is defined in board-specific peripheral configuration. Since DAC_GPIOS must be defined even if there are no DAC channels, an empty list definition is done here as fallback configuration.

Definition at line 79 of file periph_conf_common.h.

◆ DAC_NUMOF

#define DAC_NUMOF   ARRAY_SIZE(dac_channels)

Number of GPIOs declared as DAC channels.

The number of GPIOs that are declared as DAC channels is determined from the DAC_GPIOS definition.

Note
DAC_NUMOF definition must not be changed.

Definition at line 95 of file periph_conf_common.h.

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Number of I2C interfaces.

The number of I2C interfaces is determined from board-specific peripheral definitions of I2Cn_SPEED, I2Cn_SCK, and I2Cn_SDA.

Note
I2C_NUMOF definition must not be changed.

Definition at line 131 of file periph_conf_common.h.

◆ PWM_NUMOF

#define PWM_NUMOF   (0)

Static array of GPIOs that can be used as channels of PWM0.

Static array of GPIOs that can be used as channels of PWM0

Number of PWM devices

The number of PWM devices is determined from the PWM0_GPIOS and PWM1_GPIOS definitions.

Note
PWM_NUMOF definition must not be changed.

Definition at line 166 of file periph_conf_common.h.

◆ SPI_NUMOF

#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Number of SPI interfaces.

The number of SPI interfaces is determined from board-specific peripheral definitions of SPIn_*.

Note
SPI_NUMOF definition must not be changed.

Definition at line 207 of file periph_conf_common.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Number of UART interfaces.

The number of UART interfaces is determined from board-specific peripheral definitions of UARTn_*.

Note
UART_NUMOF definition must not be changed.

Definition at line 252 of file periph_conf_common.h.

Variable Documentation

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
}

Static array with configuration for declared I2C devices.

Definition at line 106 of file periph_conf_common.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
}

Static array with configuration for declared SPI devices.

Definition at line 178 of file periph_conf_common.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.txd = UART0_TXD,
.rxd = UART0_RXD,
},
}

Static array with configuration for declared UART devices.

Definition at line 225 of file periph_conf_common.h.

UART0_RXD
#define UART0_RXD
RxD of UART_DEV(0) used on all ESP32 boards.
Definition: periph_conf_common.h:219
UART0_TXD
#define UART0_TXD
TxD of UART_DEV(0) used on all ESP32 boards.
Definition: periph_conf_common.h:216