Loading...
Searching...
No Matches
periph_conf_common.h File Reference

Peripheral configurations that are common for all ESP32x boards. More...

Detailed Description

Peripheral configurations that are common for all ESP32x boards.

This file contains the peripheral configurations that are valid for all ESP32x boards.

For detailed information about the peripheral configuration for ESP32x 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.
 
#define ADC_NUMOF   ARRAY_SIZE(adc_channels)
 Number of GPIOs declared as ADC channels.
 
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.
 
#define DAC_NUMOF   ARRAY_SIZE(dac_channels)
 Number of GPIOs declared as DAC channels.
 
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.
 
static const i2c_conf_t i2c_config []
 Static array with configuration for declared I2C devices.
 

PWM configuration

#define PWM_NUMOF   ARRAY_SIZE(pwm_config)
 Number of PWM devices.
 
static const pwm_config_t pwm_config []
 GPIOs used as channels for the according PWM device.
 

RMT configuration

#define RMT_CH_NUMOF   ARRAY_SIZE(rmt_channel_config)
 Number of RMT channels.
 
static const rmt_channel_config_t rmt_channel_config []
 RMT channel configuration.
 

SPI configuration

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

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 Number of UART interfaces.
 
static const uart_conf_t uart_config []
 Static array with configuration for declared UART devices.
 

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 60 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 76 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 92 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 108 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 170 of file periph_conf_common.h.

◆ PWM_NUMOF

#define PWM_NUMOF   ARRAY_SIZE(pwm_config)

Number of PWM devices.

The number of PWM devices is determined from the PWM device configuration.

Note
PWM_NUMOF definition must not be changed.

Definition at line 265 of file periph_conf_common.h.

◆ RMT_CH_NUMOF

#define RMT_CH_NUMOF   ARRAY_SIZE(rmt_channel_config)

Number of RMT channels.

Definition at line 299 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 340 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 382 of file periph_conf_common.h.

Variable Documentation

◆ adc_channels

const gpio_t adc_channels[] = ADC_GPIOS
static

Static array with declared ADC channels.

Definition at line 66 of file periph_conf_common.h.

◆ dac_channels

const gpio_t dac_channels[] = DAC_GPIOS
static

Static array with declared DAC channels.

Definition at line 98 of file periph_conf_common.h.

◆ i2c_config

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

Static array with configuration for declared I2C devices.

Definition at line 139 of file periph_conf_common.h.

◆ pwm_config

const pwm_config_t pwm_config[]
static

GPIOs used as channels for the according PWM device.

GPIOs used as channels for the according PWM device

GPIOs used as channels for the according PWM device

GPIOs used as channels for the according PWM device

PWM device configuration based on defined PWM channel GPIOs

Definition at line 210 of file periph_conf_common.h.

◆ rmt_channel_config

const rmt_channel_config_t rmt_channel_config[]
static
Initial value:
= {
{ 0, GPIO0 },
}

RMT channel configuration.

For the moment, the only RMT channel configuration used is for the WS2812 driver. To override this default configuration by a board definition, add

#define HAVE_RMT_CHANNEL_CONFIG

before including this file and define an according rmt_channel_config after including this file.

Definition at line 286 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 311 of file periph_conf_common.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.txd = UART0_TXD,
.rxd = UART0_RXD,
},
}
#define UART0_RXD
RxD of UART_DEV(0) used on all ESP32 boards.
#define UART0_TXD
TxD of UART_DEV(0) used on all ESP32 boards.

Static array with configuration for declared UART devices.

Definition at line 355 of file periph_conf_common.h.