Peripheral configurations for the Adafruit Metro ESP32-S2 board. More...
Peripheral configurations for the Adafruit Metro ESP32-S2 board.
The peripheral configurations in this file can be used for the Adafruit Metro ESP32-S2 board.
Definition in file periph_conf.h.
#include <stdint.h>#include "periph_conf_common.h"
Include dependency graph for periph_conf.h:Go to the source code of this file.
ADC and DAC channel configuration | |
| #define | ADC_GPIOS { GPIO17, GPIO18, GPIO1, GPIO2, GPIO3, GPIO4 } |
| Declaration of GPIOs that can be used as ADC channels. | |
| #define | DAC_GPIOS { GPIO17, GPIO18 } |
| Declaration of GPIOs that can be used as DAC channels. | |
I2C configuration | |
Only I2C interface I2C_DEV(0) is used. It is connected to the SDA/SCL pins of the Arduino header and to the STEMMA QT connector.
| |
| #define | I2C0_SPEED I2C_SPEED_FAST |
| I2C bus speed of I2C_DEV(0) | |
| #define | I2C0_SCL GPIO34 |
| SCL signal of I2C_DEV(0) | |
| #define | I2C0_SDA GPIO33 |
| SDA signal of I2C_DEV(0) | |
PWM channel configuration | |
The PWM channels are mapped to the Arduino UNO PWM pins D3, D5, D6, D9, D10 and D11.
| |
| #define | PWM0_GPIOS { GPIO8, GPIO10, GPIO11, GPIO14 } |
| Declaration of the channels for device PWM_DEV(0), at maximum PWM_CHANNEL_NUM_DEV_MAX. | |
| #define | PWM1_GPIOS { GPIO15, GPIO16 } |
| Declaration of the channels for device PWM_DEV(1), at maximum PWM_CHANNEL_NUM_DEV_MAX. | |
SPI configuration | |
SPI_DEV(0) uses the FSPI controller and is connected to the SPI (ICSP) header. SPI_DEV(1) uses the HSPI controller and is connected to the Arduino pins D11 (MOSI), D12 (MISO) and D13 (SCK). Both use the Arduino pin D10 as default CS signal.
| |
| #define | SPI0_CTRL FSPI |
| FSPI is used as SPI_DEV(0) | |
| #define | SPI0_SCK GPIO36 |
| FSPI SCK (pin FSPICLK) | |
| #define | SPI0_MISO GPIO37 |
| FSPI MISO (pin FSPIQ) | |
| #define | SPI0_MOSI GPIO35 |
| FSPI MOSI (pin FSPID) | |
| #define | SPI0_CS0 GPIO15 |
| FSPI CS0 (Arduino pin D10) | |
| #define | SPI1_CTRL HSPI |
| HSPI (SPI Controller 3) is used as SPI_DEV(1) | |
| #define | SPI1_SCK GPIO42 |
| HSPI SCK (Arduino pin D13) | |
| #define | SPI1_MISO GPIO21 |
| HSPI MISO (Arduino pin D12) | |
| #define | SPI1_MOSI GPIO16 |
| HSPI MOSI (Arduino pin D11) | |
| #define | SPI1_CS0 GPIO15 |
| HSPI CS0 (Arduino pin D10) | |
UART configuration | |
ESP32-S2 provides 2 UART interfaces at maximum: UART_DEV(0) uses the DEBUG TX/RX pins GPIO43 and GPIO44 (default configuration from
| |
| #define | UART1_TXD GPIO6 |
| direct I/O pin for UART_DEV(1) TxD | |
| #define | UART1_RXD GPIO5 |
| direct I/O pin for UART_DEV(1) RxD | |
| #define ADC_GPIOS { GPIO17, GPIO18, GPIO1, GPIO2, GPIO3, GPIO4 } |
Declaration of GPIOs that can be used as ADC channels.
The analog pins A0 ... A5 are mapped to ADC_LINE(0) ... ADC_LINE(5).
adc_init function, they can be used for other purposes. Definition at line 43 of file periph_conf.h.
| #define DAC_GPIOS { GPIO17, GPIO18 } |
Declaration of GPIOs that can be used as DAC channels.
DAC_LINE(0) and DAC_LINE(1) are available at the analog pins A0 and A1.
dac_init function, they can be used for other purposes. Definition at line 56 of file periph_conf.h.
| #define I2C0_SCL GPIO34 |
SCL signal of I2C_DEV(0)
Definition at line 76 of file periph_conf.h.
| #define I2C0_SDA GPIO33 |
SDA signal of I2C_DEV(0)
Definition at line 79 of file periph_conf.h.
| #define I2C0_SPEED I2C_SPEED_FAST |
I2C bus speed of I2C_DEV(0)
Definition at line 73 of file periph_conf.h.
| #define PWM0_GPIOS { GPIO8, GPIO10, GPIO11, GPIO14 } |
Declaration of the channels for device PWM_DEV(0), at maximum PWM_CHANNEL_NUM_DEV_MAX.
Definition at line 101 of file periph_conf.h.
| #define PWM1_GPIOS { GPIO15, GPIO16 } |
Declaration of the channels for device PWM_DEV(1), at maximum PWM_CHANNEL_NUM_DEV_MAX.
Definition at line 109 of file periph_conf.h.
| #define SPI0_CS0 GPIO15 |
FSPI CS0 (Arduino pin D10)
Definition at line 144 of file periph_conf.h.
| #define SPI0_CTRL FSPI |
FSPI is used as SPI_DEV(0)
Definition at line 132 of file periph_conf.h.
| #define SPI0_MISO GPIO37 |
FSPI MISO (pin FSPIQ)
Definition at line 138 of file periph_conf.h.
| #define SPI0_MOSI GPIO35 |
FSPI MOSI (pin FSPID)
Definition at line 141 of file periph_conf.h.
| #define SPI0_SCK GPIO36 |
FSPI SCK (pin FSPICLK)
Definition at line 135 of file periph_conf.h.
| #define SPI1_CS0 GPIO15 |
HSPI CS0 (Arduino pin D10)
Definition at line 160 of file periph_conf.h.
| #define SPI1_CTRL HSPI |
HSPI (SPI Controller 3) is used as SPI_DEV(1)
Definition at line 148 of file periph_conf.h.
| #define SPI1_MISO GPIO21 |
HSPI MISO (Arduino pin D12)
Definition at line 154 of file periph_conf.h.
| #define SPI1_MOSI GPIO16 |
HSPI MOSI (Arduino pin D11)
Definition at line 157 of file periph_conf.h.
| #define SPI1_SCK GPIO42 |
HSPI SCK (Arduino pin D13)
Definition at line 151 of file periph_conf.h.
| #define UART1_RXD GPIO5 |
direct I/O pin for UART_DEV(1) RxD
Definition at line 182 of file periph_conf.h.
| #define UART1_TXD GPIO6 |
direct I/O pin for UART_DEV(1) TxD
Definition at line 179 of file periph_conf.h.