11/*
2- * Copyright (C) 2024 Isikcan 'Jon' Yilmaz
3- *
4- * This file is subject to the terms and conditions of the GNU Lesser
5- * General Public License v2.1. See the file LICENSE in the top level
6- * directory for more details.
2+ * SPDX-FileCopyrightText: 2024 Isikcan 'Jon' Yilmaz
3+ * SPDX-License-Identifier: LGPL-2.1-only
74 */
85
6+ #pragma once
7+
98/**
10- * @ingroup boards_esp32s3_seeedstudio
9+ * @ingroup boards_seeedstudio-xiao-esp32s3
1110 * @brief Peripheral configurations for Seeed Studio Xiao ESP32S3 boards
1211 * @{
1312 *
1817 * For detailed information about the peripheral configuration for ESP32-S3
1918 * boards, see section \ref esp32_peripherals "Common Peripherals".
2019 *
21- * @note
22- * Most definitions can be overridden by an \ref esp32_application_specific_configurations
23- * "application-specific board configuration" if necessary.
24- *
2520 * @file
2621 * @author Isikcan 'Jon' Yilmaz <[email protected] > 2722 */
2823
29- #ifndef PERIPH_CONF_H
30- #define PERIPH_CONF_H
31-
3224#include <stdint.h>
3325
3426#ifdef __cplusplus
3527extern "C" {
3628#endif
3729
3830/**
39- * @name ADC and DAC channel configuration
31+ * @name ADC Channel Configuration
4032 * @{
4133 */
4234/**
@@ -51,14 +43,15 @@ extern "C" {
5143 * purposes.
5244 */
5345#ifndef ADC_GPIOS
54- #define ADC_GPIOS { GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, GPIO7, GPIO8, GPIO9 }
46+ # define ADC_GPIOS { GPIO1, GPIO2, GPIO3, GPIO4, GPIO5, GPIO6, GPIO7, GPIO8, GPIO9 }
5547#endif
5648/** @} */
5749
5850/**
5951 * @name I2C configuration
6052 *
61- * For generic boards, only one I2C interface I2C_DEV(0) is defined.
53+ * For the Seeedstudio Xiao ESP32S3 board, only one I2C interface I2C_DEV(0)
54+ * is defined.
6255 *
6356 * The GPIOs listed in the configuration are only initialized as I2C signals
6457 * when module `periph_i2c` is used. Otherwise they are not allocated and
@@ -67,13 +60,13 @@ extern "C" {
6760 * @{
6861 */
6962#ifndef I2C0_SPEED
70- #define I2C0_SPEED I2C_SPEED_FAST /**< I2C bus speed of I2C_DEV(0) */
63+ # define I2C0_SPEED I2C_SPEED_FAST /**< I2C bus speed of I2C_DEV(0) */
7164#endif
7265#ifndef I2C0_SCL
73- #define I2C0_SCL GPIO6 /**< SCL signal of I2C_DEV(0) */
66+ # define I2C0_SCL GPIO6 /**< SCL signal of I2C_DEV(0) */
7467#endif
7568#ifndef I2C0_SDA
76- #define I2C0_SDA GPIO5 /**< SDA signal of I2C_DEV(0) */
69+ # define I2C0_SDA GPIO5 /**< SDA signal of I2C_DEV(0) */
7770#endif
7871/** @} */
7972
@@ -95,9 +88,9 @@ extern "C" {
9588 * @brief Declaration of the channels for device PWM_DEV(0),
9689 * at maximum PWM_CHANNEL_NUM_DEV_MAX.
9790 */
98- // #ifndef PWM0_GPIOS
99- // # define PWM0_GPIOS { GPIO12, GPIO13, GPIO14, GPIO15, GPIO16 }
100- // #endif
91+ #ifndef PWM0_GPIOS
92+ # define PWM0_GPIOS { GPIO21 }
93+ #endif
10194
10295/**
10396 * @brief Declaration of the channels for device PWM_DEV(1),
@@ -117,23 +110,23 @@ extern "C" {
117110 * by either calling the `spi_init_cs` function or the `spi_acquire`
118111 * function. That is, they are not allocated as SPI signals before and can
119112 * be used for other purposes as long as the SPI interface is not used.
120- * @{ TODO SPI pins
113+ * @{
121114 */
122- // #ifndef SPI0_CTRL
123- // #define SPI0_CTRL FSPI /**< FSPI is used as SPI_DEV(0) */
124- // #endif
125- // #ifndef SPI0_SCK
126- // # define SPI0_SCK GPIO36 /**< FSPI SCK (pin FSPICLK) */
127- // #endif
128- // #ifndef SPI0_MISO
129- // # define SPI0_MISO GPIO37 /**< FSPI MISO (pin FSPIQ) */
130- // #endif
131- // #ifndef SPI0_MOSI
132- // # define SPI0_MOSI GPIO35 /**< FSPI MOSI (pin FSPID) */
133- // #endif
134- // #ifndef SPI0_CS0
135- // # define SPI0_CS0 GPIO34 /**< FSPI CS0 (pin FSPICS0) */
136- // #endif
115+ #ifndef SPI0_CTRL
116+ # define SPI0_CTRL FSPI /**< FSPI is used as SPI_DEV(0) */
117+ #endif
118+ #ifndef SPI0_SCK
119+ # define SPI0_SCK GPIO7 /**< FSPI SCK (pin FSPICLK) */
120+ #endif
121+ #ifndef SPI0_MISO
122+ # define SPI0_MISO GPIO8 /**< FSPI MISO (pin FSPIQ) */
123+ #endif
124+ #ifndef SPI0_MOSI
125+ # define SPI0_MOSI GPIO9 /**< FSPI MOSI (pin FSPID) */
126+ #endif
127+ #ifndef SPI0_CS0
128+ # define SPI0_CS0 GPIO3 /**< FSPI CS0 (pin FSPICS0) */
129+ #endif
137130/** @} */
138131
139132/**
@@ -143,25 +136,19 @@ extern "C" {
143136 *
144137 * UART_DEV(0) uses fixed standard configuration.<br>
145138 * UART_DEV(1) is not used.<br>
139+ * UART_DEV(2) is not used.
146140 *
147141 * @{
148142 */
149143#define UART0_TXD GPIO43 /**< direct I/O pin for UART_DEV(0) TxD, can't be changed */
150144#define UART0_RXD GPIO44 /**< direct I/O pin for UART_DEV(0) RxD, can't be changed */
151-
152145/** @} */
153146
154- /**
155- * @name Camera configurations and pins
156- * TODO also mic pins
157- */
158-
159147#ifdef __cplusplus
160148} /* end extern "C" */
161149#endif
162150
163151/* include common peripheral definitions as last step */
164152#include "periph_conf_common.h"
165153
166- #endif /* PERIPH_CONF_H */
167154/** @} */
0 commit comments