Peripheral configurations for the Seeed Studio ESP32-C3 Xiao board. More...
Peripheral configurations for the Seeed Studio ESP32-C3 Xiao board.
For detailed information about the peripheral configuration for ESP32-C3 boards, see section Common Peripherals.
To specify the board, add the following to the make command line:
Definition in file periph_conf.h.
#include <stdint.h>
#include "periph_conf_common.h"
Go to the source code of this file.
ADC channel configuration | |
#define | ADC_GPIOS { GPIO2, GPIO3, GPIO4 } |
Declaration of GPIOs that can be used as ADC channels. More... | |
I2C configuration | |
The ESP32C3 has one I2C interface I2C_DEV(0). The GPIOs listed in the configuration are only initialized as I2C signals when module | |
#define | I2C0_SPEED I2C_SPEED_FAST |
I2C bus speed of I2C_DEV(0) | |
#define | I2C0_SCL GPIO7 |
SCL signal of I2C_DEV(0) | |
#define | I2C0_SDA GPIO6 |
SDA signal of I2C_DEV(0) | |
PWM channel configuration | |
The ESP32C3 has one LED PWM device. Pins that are not defined as I2C, SPI or UART are listed as PWM channels. Generally, all outputs pins could be used as PWM channels.
| |
#define | PWM0_GPIOS { GPIO2, GPIO3, GPIO4, GPIO5 } |
Declaration of the channels for device PWM_DEV(0), at maximum PWM_CHANNEL_NUM_DEV_MAX. | |
SPI configuration | |
| |
#define | SPI0_CTRL FSPI |
FSPI is used as SPI_DEV(0) | |
#define | SPI0_SCK GPIO8 |
FSPI SCK signal routed to GPIO8 in GPIO matrix. | |
#define | SPI0_MISO GPIO9 |
FSPI SCK signal routed to GPIO9 in GPIO matrix. | |
#define | SPI0_MOSI GPIO10 |
FSPI SCK signal routed to GPIO10 in GPIO matrix. | |
#define | SPI0_CS0 GPIO5 |
CS pin controlled in software. | |
UART configuration | |
ESP32-C3 provides 2 UART interfaces at maximum: UART_DEV(0) uses fixed standard configuration. | |
#define | UART0_TXD GPIO21 |
direct I/O pin for UART_DEV(0) TxD, can't be changed | |
#define | UART0_RXD GPIO20 |
direct I/O pin for UART_DEV(0) RxD, can't be changed | |
#define ADC_GPIOS { GPIO2, GPIO3, GPIO4 } |
Declaration of GPIOs that can be used as ADC channels.
On this board, only three pins can be used as ADC channels. Note that GPIO5 is linked to ADC2, which _"does not work properly"_, and therefore can't be used as an ADC channel.
adc_init
function, they can be used for other purposes. Definition at line 55 of file periph_conf.h.