Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Gunar Schorcht
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
23
24#include <stdint.h>
25
26#include "board.h"
27#include "periph_cpu.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
43#ifndef ADC_GPIOS
44#define ADC_GPIOS { GPIO1, GPIO2 }
45#endif
47
52
58#ifndef PWM0_GPIOS
59#define PWM0_GPIOS { LED0_PIN, LED1_PIN }
60#endif
62
67
69static const sdmmc_conf_t sdmmc_config[] = {
70 {
71 .slot = SDMMC_SLOT_1,
72 .cd = GPIO_UNDEF,
73 .wp = GPIO_UNDEF,
74 .clk = GPIO36,
75 .cmd = GPIO35,
76 .dat0 = GPIO37,
77 .dat1 = GPIO38,
78 .dat2 = GPIO33,
79 .dat3 = GPIO34,
80 },
81};
82
84#define SDMMC_CONFIG_NUMOF 1
86
94#ifndef SPI0_CTRL
95#define SPI0_CTRL SPI2_HOST
96#endif
97#ifndef SPI0_SCK
98#define SPI0_SCK GPIO6
99#endif
100#ifndef SPI0_MOSI
101#define SPI0_MOSI GPIO7
102#endif
103#ifndef SPI0_MISO
104#define SPI0_MISO GPIO3
105#endif
106#ifndef SPI0_CS0
107#define SPI0_CS0 GPIO5
108#endif
109
110#if IS_USED(MODULE_SDCARD_SPI)
111#ifndef SPI1_CTRL
112#define SPI1_CTRL SPI3_HOST
113#endif
114#ifndef SPI1_SCK
115#define SPI1_SCK GPIO36
116#endif
117#ifndef SPI1_MOSI
118#define SPI1_MOSI GPIO35
119#endif
120#ifndef SPI1_MISO
121#define SPI1_MISO GPIO37
122#endif
123#ifndef SPI1_CS0
124#define SPI1_CS0 GPIO34
125#endif
126#endif
128
139#define UART0_TXD GPIO43
140#define UART0_RXD GPIO44
141
143
144#ifdef __cplusplus
145} /* end extern "C" */
146#endif
147
148/* include common peripheral definitions as last step */
149#include "periph_conf_common.h"
150
#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:687
Board definitions for the ESP32-S3-USB-OTG boards.
SDMMC slot configuration.
Definition periph_cpu.h:701