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 
24 #include <stdint.h>
25 
26 #include "board.h"
27 #include "periph_cpu.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
43 #ifndef ADC_GPIOS
44 #define ADC_GPIOS { GPIO1, GPIO2 }
45 #endif
58 #ifndef PWM0_GPIOS
59 #define PWM0_GPIOS { LED0_PIN, LED1_PIN }
60 #endif
69 static 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
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
139 #define UART0_TXD GPIO43
140 #define UART0_RXD GPIO44
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.
Definition: periph_conf.h:69
@ SDMMC_SLOT_1
SD/MMC host controller slot 1.
Definition: periph_cpu.h:690
SDMMC slot configuration.
Definition: periph_cpu.h:704
sdmmc_slot_t slot
SDMMC slot used [ SDMMC_SLOT_0 | SDMMC_SLOT_1].
Definition: periph_cpu.h:705
Board specific definitions for the Zigduino board.