Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
sdcard_spi_params.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
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
21
#include "board.h"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#ifndef SDCARD_SPI_PARAM_SPI
32
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
33
#endif
34
#ifndef SDCARD_SPI_PARAM_CS
35
#define SDCARD_SPI_PARAM_CS GPIO_PIN(2, 4)
36
#endif
37
#ifndef SDCARD_SPI_PARAM_CLK
38
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(2, 5)
39
#endif
40
#ifndef SDCARD_SPI_PARAM_MOSI
41
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(2, 6)
42
#endif
43
#ifndef SDCARD_SPI_PARAM_MISO
44
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(2, 7)
45
#endif
46
#ifndef SDCARD_SPI_PARAM_POWER
47
#define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
48
#endif
49
#ifndef SDCARD_SPI_PARAM_POWER_AH
51
#define SDCARD_SPI_PARAM_POWER_AH (true)
52
#endif
53
54
#ifndef SDCARD_SPI_PARAMS
55
#define SDCARD_SPI_PARAMS { .spi_dev = SDCARD_SPI_PARAM_SPI, \
56
.cs = SDCARD_SPI_PARAM_CS, \
57
.clk = SDCARD_SPI_PARAM_CLK, \
58
.mosi = SDCARD_SPI_PARAM_MOSI, \
59
.miso = SDCARD_SPI_PARAM_MISO, \
60
.power = SDCARD_SPI_PARAM_POWER, \
61
.power_act_high = SDCARD_SPI_PARAM_POWER_AH }
62
#endif
68
static
const
sdcard_spi_params_t
sdcard_spi_params
[] = {
69
SDCARD_SPI_PARAMS
70
};
71
72
#ifdef __cplusplus
73
}
74
#endif
75
sdcard_spi_params
static const sdcard_spi_params_t sdcard_spi_params[]
sdcard_spi configuration
Definition:
sdcard_spi_params.h:68
sdcard_spi_params_t
sdcard_spi device params
Definition:
sdcard_spi.h:174
Generated on Mon Jun 30 2025 14:58:00 by
1.9.1