Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Gunar Schorcht
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.
7 */
8
9#pragma once
10
26
27#include <stdint.h>
28
29#include "board.h"
30#include "periph_cpu.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
46#ifndef ADC_GPIOS
47#define ADC_GPIOS { GPIO1, GPIO2 }
48#endif
50
55
61#ifndef PWM0_GPIOS
62#define PWM0_GPIOS { LED0_PIN, LED1_PIN }
63#endif
65
70
72static const sdmmc_conf_t sdmmc_config[] = {
73 {
74 .slot = SDMMC_SLOT_1,
75 .cd = GPIO_UNDEF,
76 .wp = GPIO_UNDEF,
77 .clk = GPIO36,
78 .cmd = GPIO35,
79 .dat0 = GPIO37,
80 .dat1 = GPIO38,
81 .dat2 = GPIO33,
82 .dat3 = GPIO34,
83 },
84};
85
87#define SDMMC_CONFIG_NUMOF 1
89
97#ifndef SPI0_CTRL
98#define SPI0_CTRL SPI2_HOST
99#endif
100#ifndef SPI0_SCK
101#define SPI0_SCK GPIO6
102#endif
103#ifndef SPI0_MOSI
104#define SPI0_MOSI GPIO7
105#endif
106#ifndef SPI0_MISO
107#define SPI0_MISO GPIO3
108#endif
109#ifndef SPI0_CS0
110#define SPI0_CS0 GPIO5
111#endif
112
113#if IS_USED(MODULE_SDCARD_SPI)
114#ifndef SPI1_CTRL
115#define SPI1_CTRL SPI3_HOST
116#endif
117#ifndef SPI1_SCK
118#define SPI1_SCK GPIO36
119#endif
120#ifndef SPI1_MOSI
121#define SPI1_MOSI GPIO35
122#endif
123#ifndef SPI1_MISO
124#define SPI1_MISO GPIO37
125#endif
126#ifndef SPI1_CS0
127#define SPI1_CS0 GPIO34
128#endif
129#endif
131
142#define UART0_TXD GPIO43
143#define UART0_RXD GPIO44
144
146
147#ifdef __cplusplus
148} /* end extern "C" */
149#endif
150
151/* include common peripheral definitions as last step */
152#include "periph_conf_common.h"
153
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
static const sdmmc_conf_t sdmmc_config[]
SDMMC devices.
@ SDMMC_SLOT_1
SD/MMC host controller slot 1.
Definition periph_cpu.h:686
Board definitions for the ESP32-S3-USB-OTG boards.
SDMMC slot configuration.
Definition periph_cpu.h:700