From 043a861909b34d94829d664cc765847061a61d74 Mon Sep 17 00:00:00 2001 From: David Picard Date: Wed, 5 Mar 2025 09:16:34 +0100 Subject: [PATCH] boards/seeedstudio-xiao-esp32c3: add support Port the Seeed Studio Xiao ESP32C3 to RIOT. --- boards/seeedstudio-xiao-esp32c3/Kconfig | 16 ++ boards/seeedstudio-xiao-esp32c3/Makefile | 5 + boards/seeedstudio-xiao-esp32c3/Makefile.dep | 9 + .../Makefile.features | 15 ++ .../seeedstudio-xiao-esp32c3/Makefile.include | 3 + boards/seeedstudio-xiao-esp32c3/doc.md | 164 ++++++++++++++++++ .../include/arduino_iomap.h | 62 +++++++ .../seeedstudio-xiao-esp32c3/include/board.h | 72 ++++++++ .../include/gpio_params.h | 45 +++++ .../include/periph_conf.h | 156 +++++++++++++++++ 10 files changed, 547 insertions(+) create mode 100644 boards/seeedstudio-xiao-esp32c3/Kconfig create mode 100644 boards/seeedstudio-xiao-esp32c3/Makefile create mode 100644 boards/seeedstudio-xiao-esp32c3/Makefile.dep create mode 100644 boards/seeedstudio-xiao-esp32c3/Makefile.features create mode 100644 boards/seeedstudio-xiao-esp32c3/Makefile.include create mode 100644 boards/seeedstudio-xiao-esp32c3/doc.md create mode 100644 boards/seeedstudio-xiao-esp32c3/include/arduino_iomap.h create mode 100644 boards/seeedstudio-xiao-esp32c3/include/board.h create mode 100644 boards/seeedstudio-xiao-esp32c3/include/gpio_params.h create mode 100644 boards/seeedstudio-xiao-esp32c3/include/periph_conf.h diff --git a/boards/seeedstudio-xiao-esp32c3/Kconfig b/boards/seeedstudio-xiao-esp32c3/Kconfig new file mode 100644 index 000000000000..f265caba7b15 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/Kconfig @@ -0,0 +1,16 @@ +# Copyright (c) 2025 David Picard +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +config BOARD + default "seeedstudio-xiao-esp32c3" if BOARD_SEEEDSTUDIO_XIAO_ESP32C3 + +config BOARD_SEEEDSTUDIO_XIAO_ESP32C3 + bool + default y + select BOARD_COMMON_ESP32C3 + select CPU_MODEL_ESP32C3_FH4 + +source "$(RIOTBOARD)/common/esp32c3/Kconfig" diff --git a/boards/seeedstudio-xiao-esp32c3/Makefile b/boards/seeedstudio-xiao-esp32c3/Makefile new file mode 100644 index 000000000000..13fe94b28b78 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/Makefile @@ -0,0 +1,5 @@ +MODULE = board + +DIRS = $(RIOTBOARD)/common/esp32c3 + +include $(RIOTBASE)/Makefile.base diff --git a/boards/seeedstudio-xiao-esp32c3/Makefile.dep b/boards/seeedstudio-xiao-esp32c3/Makefile.dep new file mode 100644 index 000000000000..b54b62a62b23 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/Makefile.dep @@ -0,0 +1,9 @@ +ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) + USEMODULE += stdio_usb_serial_jtag +endif + +ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += saul_gpio +endif + +include $(RIOTBOARD)/common/esp32c3/Makefile.dep diff --git a/boards/seeedstudio-xiao-esp32c3/Makefile.features b/boards/seeedstudio-xiao-esp32c3/Makefile.features new file mode 100644 index 000000000000..c857e9e2cdd6 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/Makefile.features @@ -0,0 +1,15 @@ +CPU_MODEL = esp32c3_fh4 + +# common board and CPU features +include $(RIOTBOARD)/common/esp32c3/Makefile.features + +# additional features provided by the board +FEATURES_PROVIDED += periph_adc +FEATURES_PROVIDED += periph_i2c +FEATURES_PROVIDED += periph_pwm +FEATURES_PROVIDED += periph_spi + +# unique features provided by the board +FEATURES_PROVIDED += esp_jtag + +FEATURES_PROVIDED += arduino_pins diff --git a/boards/seeedstudio-xiao-esp32c3/Makefile.include b/boards/seeedstudio-xiao-esp32c3/Makefile.include new file mode 100644 index 000000000000..d1bfece841d2 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/Makefile.include @@ -0,0 +1,3 @@ +PORT_LINUX ?= /dev/ttyACM0 + +include $(RIOTBOARD)/common/esp32c3/Makefile.include diff --git a/boards/seeedstudio-xiao-esp32c3/doc.md b/boards/seeedstudio-xiao-esp32c3/doc.md new file mode 100644 index 000000000000..1db83f8a2c98 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/doc.md @@ -0,0 +1,164 @@ + + +@defgroup boards_seeedstudio-xiao-esp32c3 Seeed Studio Xiao ESP32C3 +@ingroup boards_esp32c3 +@brief Support for the Seeed Studio Xiao ESP32-C3 board +@author David Picard + +\section seeedstudio-xiao-esp32c3 Seeed Studio Xiao ESP32C3 + +## Table of Contents {#seeedstudio-xiao-esp32c3_toc} + +1. [Overview](#seeedstudio-xiao-esp32c3_overview) +2. [Hardware](#seeedstudio-xiao-esp32c3_hardware) + 1. [MCU](#seeedstudio-xiao-esp32c3_mcu) + 2. [Board Configuration](#seeedstudio-xiao-esp32c3_board_configuration) + 3. [Board Pinout](#seeedstudio-xiao-esp32c3_pinout) + 4. [Board documentation](#seeedstudio-xiao-esp32c3_documentation) +3. [Flashing the Device](#seeedstudio-xiao-esp32c3_flashing) + +## Overview {#seeedstudio-xiao-esp32c3_overview} + +Seeed Studio Xiao ESP32C3 is an IoT mini development board based on the Espressif ESP32-C3 +WiFi/Bluetooth dual-mode chip, featuring a single ­core 32-bit RISC-V CPU that operates at up to 160 MHz. + +- Wi-Fi +- Bluetooth +- Battery charging chip: Supports lithium battery charge and discharge management +- Memory: 400KB of SRAM, and 4MB of on-board flash memory +- Small size: 21 x 17.8mm +- Ultra-Low Power: Deep sleep power consumption is about 43μA +- Battery charge indicator red LED + +@image html https://files.seeedstudio.com/wiki/XIAO_WiFi/board-pic.png "Seeed Studio EPS32-C3 Xiao" width=200pix + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +## Hardware {#seeedstudio-xiao-esp32c3_hardware} + +This section describes + +- the [MCU](#seeedstudio-xiao-esp32c3_mcu), +- the default [board configuration](#seeedstudio-xiao-esp32c3_board_configuration), +- the [board pinout](#seeedstudio-xiao-esp32c3_pinout). + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +### MCU {#seeedstudio-xiao-esp32c3_mcu} + +Most features of the board are provided by the ESP32-C3 SoC. For detailed +information about the ESP32-C3 variant (family) and ESP32x SoCs, +see section \ref esp32_mcu_esp32 "ESP32 SoC Series". + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +### Board Configuration {#seeedstudio-xiao-esp32c3_board_configuration} + +The Seeed Studio EPS32-C3 Xiao board has a reset button and a bootloader button, +but no LED. +After reset, the bootloader button may be used by the application. + +To select the board, add the following to the make command line: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +BOARD=seeedstudio-xiao-esp32c3 make ... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Almost all GPIOs are broken out and can be used for different peripherals: + +- 3 x ADC channels at maximum +- 1 x SPI +- 1 x I2C +- 1 x UART +- 11 x PWM channels (only 4 defined by default) + +The purpose for which a GPIO is used depends on which module +or function is used first. For example, if module `periph_spi` is not used, +the GPIOs listed in SPI configuration can be used for other purposes. + +The following table shows the default board configuration. +This configuration can be overridden by \ref esp32_application_specific_configurations +"application-specific configurations". + +
+Function | Pin | Configuration +:---------------|:----------------------|:------------- +BUTTON0 | GPIO9 | GPIO9 is a [strapping pin](https://docs.espressif.com/projects/esptool/en/latest/esp32c3/advanced-topics/boot-mode-selection.html) +ADC | GPIO2, GPIO3, GPIO4 | \ref esp32_adc_channels "ADC Channels" +I2C_DEV(0):SCL | GPIO7 | \ref esp32_i2c_interfaces "I2C Interfaces" +I2C_DEV(0):SDA | GPIO6 | \ref esp32_i2c_interfaces "I2C Interfaces" +PWM_DEV(0) | GPIO2, GPIO3, GPIO4, GPIO5 | \ref esp32_pwm_channels "PWM Channels" +SPI_DEV(0):SCK | GPIO8 | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):MISO | GPIO9 | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):MOSI | GPIO10 | \ref esp32_spi_interfaces "SPI Interfaces" +SPI_DEV(0):CS0 | GPIO5 | \ref esp32_spi_interfaces "SPI Interfaces" +UART_DEV(0):TxD | GPIO21 | \ref esp32_uart_interfaces "UART interfaces" +UART_DEV(0):RxD | GPIO20 | \ref esp32_uart_interfaces "UART interfaces" +
+\n +@note The configuration of ADC channels contains all ESP32-C3 GPIOs that could + be used as ADC channels. + +For detailed information about the peripheral configurations of ESP32-C3 +boards, see section \ref esp32_peripherals "Common Peripherals". + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +### Board Pinout {#seeedstudio-xiao-esp32c3_pinout} + +The following figures show the pinouts as configured by default board +definition. + +@image html https://files.seeedstudio.com/wiki/XIAO_WiFi/pin_map-2.png "Seeed Studio EPS32-C3 Xiao Pinout" width=800 + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +### Board documentation {#seeedstudio-xiao-esp32c3_documentation} + +- [schematic](https://files.seeedstudio.com/wiki/XIAO_WiFi/Resources/Seeeduino-XIAO-ESP32C3-SCH.pdf) (PDF) +- [pinout](https://files.seeedstudio.com/wiki/XIAO_WiFi/Resources/XIAO-ESP32C3-pinout_sheet.xlsx) (XLSX) +- [ESP32-C3 datasheet](https://files.seeedstudio.com/wiki/Seeed-Studio-XIAO-ESP32/esp32-c3_datasheet.pdf) (PDF) +- [power consumption report](https://files.seeedstudio.com/wiki/Seeed-Studio-XIAO-ESP32/Low_Power_Consumption.pdf) (PDF) +- [product page](https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html?qid=eyJjX3NlYXJjaF9xdWVyeSI6InhpYW8gZXNwMzJjMyIsImNfc2VhcmNoX3Jlc3VsdF9wb3MiOjQsImNfdG90YWxfcmVzdWx0cyI6ODcsImNfc2VhcmNoX3Jlc3VsdF90eXBlIjoiUHJvZHVjdCIsImNfc2VhcmNoX2ZpbHRlcnMiOiJzdG9yZUNvZGU6W3JldGFpbGVyXSJ9) +- [wiki page](https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/) + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) + +## Flashing the Device {#seeedstudio-xiao-esp32c3_flashing} + +The USB-C connector of the board is directly connected to the USB Serial/JTAG +interface of the ESP32-C3 SoC. It can be used to program the board and to debug +the application. Just connect the board to your host computer and use the +following command: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +make flash BOARD=seeedstudio-xiao-esp32c3 ... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The make utility will normally restart the board in download mode in order +to flash it. +But, on occasion, this reset doesn't work. +The programmer can't connect to the board and the flashing operation is +aborted with a timeout error: +``` +Serial port /dev/ttyACM0 +Connecting... +... +serial.serialutil.SerialTimeoutException: Write timeout +``` +In this situation, restart the board manually in download mode: +1. hold down the BOOT button +2. press and release the RESET button +3. release the BOOT button. + +After flashing the board, it will still be in download mode. You have to press +the RESET button to start your application. + +For detailed information about ESP32-C3 as well as configuring and compiling +RIOT for ESP32-C3 boards, see \ref esp32_riot. + +[Back to table of contents](#seeedstudio-xiao-esp32c3_toc) diff --git a/boards/seeedstudio-xiao-esp32c3/include/arduino_iomap.h b/boards/seeedstudio-xiao-esp32c3/include/arduino_iomap.h new file mode 100644 index 000000000000..e378f5d965c8 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/include/arduino_iomap.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2025 David Picard + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_seeedstudio-xiao-esp32c3 + * @{ + * + * @file + * @brief Mapping from MCU pins to Arduino pins + * + * @author David Picard + */ + +#ifndef ARDUINO_IOMAP_H +#define ARDUINO_IOMAP_H + +#include "periph/gpio.h" +#include "periph/adc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name Mapping of MCU pins to Arduino pins + * @{ + */ +#define ARDUINO_PIN_0 GPIO2 /**< Arduino pin 0 */ +#define ARDUINO_PIN_1 GPIO3 /**< Arduino pin 1 */ +#define ARDUINO_PIN_2 GPIO4 /**< Arduino pin 2 */ +#define ARDUINO_PIN_3 GPIO5 /**< Arduino pin 3 */ +#define ARDUINO_PIN_4 GPIO6 /**< Arduino pin 4 (I2C SDA) */ +#define ARDUINO_PIN_5 GPIO7 /**< Arduino pin 5 (I2C SCL) */ +#define ARDUINO_PIN_6 GPIO21 /**< Arduino pin 1 (TxD) */ +#define ARDUINO_PIN_7 GPIO20 /**< Arduino pin 0 (RxD) */ +#define ARDUINO_PIN_8 GPIO8 /**< Arduino pin 8 (SPI SCK) */ +#define ARDUINO_PIN_9 GPIO9 /**< Arduino pin 0 (SPI MISO)*/ +#define ARDUINO_PIN_10 GPIO10 /**< Arduino pin 0 (SPI MOSI) */ + +#define ARDUINO_PIN_LAST 10 +/** @} */ + +/** + * @name Aliases for analog pins + * @{ + */ +#define ARDUINO_PIN_A0 ARDUINO_PIN_0 +#define ARDUINO_PIN_A1 ARDUINO_PIN_1 +#define ARDUINO_PIN_A2 ARDUINO_PIN_2 +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* ARDUINO_IOMAP_H */ +/** @} */ diff --git a/boards/seeedstudio-xiao-esp32c3/include/board.h b/boards/seeedstudio-xiao-esp32c3/include/board.h new file mode 100644 index 000000000000..44ee81200655 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/include/board.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2025 David Picard + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_seeedstudio-xiao-esp32c3 + * @brief Board definitions for the Seeed Studio Xiao ESP32-C3 board + * @{ + * + * @file board.h + * @author David Picard + */ + +#ifndef BOARD_H +#define BOARD_H + +#include + +/** + * @name Button pin definitions + * @{ + */ + +/** + * @brief Default button GPIO pin definition + * + * The Seeed Studio Xiao ESP32-C3 board has a BOOT button connected to GPIO9, which can + * be used as button during normal operation. Since the GPIO9 pin is pulled up, + * the button signal is inverted, i.e., pressing the button will give a + * low signal. + */ +#define BTN0_PIN GPIO9 + +/** + * @brief 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. + */ +#define BTN0_MODE GPIO_IN_PU + +/** + * @brief Default interrupt flank definition for the button GPIO + */ +#ifndef BTN0_INT_FLANK +#define BTN0_INT_FLANK GPIO_FALLING +#endif + +/** + * @brief Definition for compatibility with previous versions + */ +#define BUTTON0_PIN BTN0_PIN + +/** @} */ + +/* include common board definitions as last step */ +#include "board_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +#endif /* BOARD_H */ +/** @} */ diff --git a/boards/seeedstudio-xiao-esp32c3/include/gpio_params.h b/boards/seeedstudio-xiao-esp32c3/include/gpio_params.h new file mode 100644 index 000000000000..d3a4fd7d17b8 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/include/gpio_params.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2025 David Picard + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +#ifndef GPIO_PARAMS_H +#define GPIO_PARAMS_H + +/** + * @ingroup boards_seeedstudio-xiao-esp32c3 + * @brief Board specific configuration of direct mapped GPIOs + * @file + * @author David Picard + * @{ + */ + +#include "board.h" +#include "saul/periph.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief LED and Button configuration + */ +static const saul_gpio_params_t saul_gpio_params[] = +{ + { + .name = "BOOT", + .pin = BTN0_PIN, + .mode = BTN0_MODE, + .flags = SAUL_GPIO_INVERTED + }, +}; + +#ifdef __cplusplus +} +#endif + +#endif /* GPIO_PARAMS_H */ +/** @} */ diff --git a/boards/seeedstudio-xiao-esp32c3/include/periph_conf.h b/boards/seeedstudio-xiao-esp32c3/include/periph_conf.h new file mode 100644 index 000000000000..a5ee861dc4b3 --- /dev/null +++ b/boards/seeedstudio-xiao-esp32c3/include/periph_conf.h @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2025 David Picard + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_seeedstudio-xiao-esp32c3 + * @brief Peripheral configurations for the Seeed Studio ESP32-C3 Xiao board + * @{ + * + * For detailed information about the peripheral configuration for ESP32-C3 + * boards, see section \ref esp32_peripherals "Common Peripherals". + * + * To specify the board, add the following to the make command line: + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * BOARD=seeedstudio-xiao-esp32c3 make ... + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * @note + * Most definitions can be overridden by an \ref esp32_application_specific_configurations + * "application-specific board configuration" if necessary. + * + * @file + * @author David Picard + */ + +#ifndef PERIPH_CONF_H +#define PERIPH_CONF_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name ADC and DAC channel configuration + * @{ + */ +/** + * @brief Declaration of GPIOs that can be used as ADC channels + * + * For generic boards, all ADC pins that have broken out are declared as ADC + * channels. + * + * @note As long as the GPIOs listed in ADC_GPIOS are not initialized as ADC + * channels with the `adc_init` function, they can be used for other + * purposes. + */ +#ifndef ADC_GPIOS +#define ADC_GPIOS { GPIO2, GPIO3, GPIO4 } +#endif +/** @} */ + +/** + * @name I2C configuration + * + * For generic boards, only one I2C interface I2C_DEV(0) is defined. + * + * The GPIOs listed in the configuration are only initialized as I2C signals + * when module `periph_i2c` is used. Otherwise they are not allocated and + * can be used for other purposes. + * + * @{ + */ +#ifndef I2C0_SPEED +#define I2C0_SPEED I2C_SPEED_FAST /**< I2C bus speed of I2C_DEV(0) */ +#endif +#ifndef I2C0_SCL +#define I2C0_SCL GPIO7 /**< SCL signal of I2C_DEV(0) */ +#endif +#ifndef I2C0_SDA +#define I2C0_SDA GPIO6 /**< SDA signal of I2C_DEV(0) */ +#endif +/** @} */ + +/** + * @name PWM channel configuration + * + * For generic boards, two PWM devices are configured. These devices + * contain all GPIOs that are not defined as I2C, SPI or UART for this board. + * Generally, all outputs pins could be used as PWM channels. + * + * @note As long as the according PWM device is not initialized with + * the `pwm_init`, the GPIOs declared for this device can be used + * for other purposes. + * + * @{ + */ + +/** + * @brief Declaration of the channels for device PWM_DEV(0), + * at maximum PWM_CHANNEL_NUM_DEV_MAX. + */ +#ifndef PWM0_GPIOS +#define PWM0_GPIOS { GPIO2, GPIO3, GPIO4, GPIO5 } +#endif + +/** @} */ + +/** + * @name SPI configuration + * + * @note + * The GPIOs listed in the configuration are not initialized as SPI + * signals until the corresponding SPI interface is used for the first time + * by either calling the `spi_init_cs` function or the `spi_acquire` + * function. That is, they are not allocated as SPI signals before and can + * be used for other purposes as long as the SPI interface is not used. + * + * @{ + */ +#ifndef SPI0_CTRL +#define SPI0_CTRL FSPI /**< FSPI is used as SPI_DEV(0) */ +#endif +#ifndef SPI0_SCK +#define SPI0_SCK GPIO8 /**< FSPI SCK signal routed to GPIO8 in GPIO matrix */ +#endif +#ifndef SPI0_MISO +#define SPI0_MISO GPIO9 /**< FSPI SCK signal routed to GPIO9 in GPIO matrix */ +#endif +#ifndef SPI0_MOSI +#define SPI0_MOSI GPIO10 /**< FSPI SCK signal routed to GPIO10 in GPIO matrix */ +#endif +#ifndef SPI0_CS0 +#define SPI0_CS0 GPIO5 /**< CS pin controlled in software */ +#endif +/** @} */ + +/** + * @name UART configuration + * + * ESP32-C3 provides 2 UART interfaces at maximum: + * + * UART_DEV(0) uses fixed standard configuration.
+ * UART_DEV(1) is not used.
+ * + * @{ + */ +#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 */ + +/** @} */ + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +/* include common peripheral definitions as last step */ +#include "periph_conf_common.h" + +#endif /* PERIPH_CONF_H */ +/** @} */