Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
sdcard_spi_params.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2017 Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
17
18
#include "board.h"
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
28
#ifndef SDCARD_SPI_PARAM_SPI
29
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
30
#endif
31
#ifndef SDCARD_SPI_PARAM_CS
32
#define SDCARD_SPI_PARAM_CS GPIO_PIN(2, 4)
33
#endif
34
#ifndef SDCARD_SPI_PARAM_CLK
35
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(2, 5)
36
#endif
37
#ifndef SDCARD_SPI_PARAM_MOSI
38
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(2, 6)
39
#endif
40
#ifndef SDCARD_SPI_PARAM_MISO
41
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(2, 7)
42
#endif
43
#ifndef SDCARD_SPI_PARAM_POWER
44
#define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
45
#endif
46
#ifndef SDCARD_SPI_PARAM_POWER_AH
48
#define SDCARD_SPI_PARAM_POWER_AH (true)
49
#endif
50
51
#ifndef SDCARD_SPI_PARAMS
52
#define SDCARD_SPI_PARAMS { .spi_dev = SDCARD_SPI_PARAM_SPI, \
53
.cs = SDCARD_SPI_PARAM_CS, \
54
.clk = SDCARD_SPI_PARAM_CLK, \
55
.mosi = SDCARD_SPI_PARAM_MOSI, \
56
.miso = SDCARD_SPI_PARAM_MISO, \
57
.power = SDCARD_SPI_PARAM_POWER, \
58
.power_act_high = SDCARD_SPI_PARAM_POWER_AH }
59
#endif
61
65
static
const
sdcard_spi_params_t
sdcard_spi_params
[] = {
66
SDCARD_SPI_PARAMS
67
};
68
69
#ifdef __cplusplus
70
}
71
#endif
72
sdcard_spi_params
static const sdcard_spi_params_t sdcard_spi_params[]
sdcard_spi configuration
Definition
sdcard_spi_params.h:57
sdcard_spi_params_t
sdcard_spi device params
Definition
sdcard_spi.h:174
Generated on Wed Apr 15 2026 11:03:01 by
1.13.2