Loading...
Searching...
No Matches
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
19#ifndef SDCARD_SPI_PARAMS_H
20#define SDCARD_SPI_PARAMS_H
21
22#include "board.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#ifndef SDCARD_SPI_PARAM_SPI
33#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
34#endif
35#ifndef SDCARD_SPI_PARAM_CS
36#define SDCARD_SPI_PARAM_CS GPIO_PIN(2, 4)
37#endif
38#ifndef SDCARD_SPI_PARAM_CLK
39#define SDCARD_SPI_PARAM_CLK GPIO_PIN(2, 5)
40#endif
41#ifndef SDCARD_SPI_PARAM_MOSI
42#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(2, 6)
43#endif
44#ifndef SDCARD_SPI_PARAM_MISO
45#define SDCARD_SPI_PARAM_MISO GPIO_PIN(2, 7)
46#endif
47#ifndef SDCARD_SPI_PARAM_POWER
48#define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
49#endif
50#ifndef SDCARD_SPI_PARAM_POWER_AH
52#define SDCARD_SPI_PARAM_POWER_AH (true)
53#endif
54
55#ifndef SDCARD_SPI_PARAMS
56#define SDCARD_SPI_PARAMS { .spi_dev = SDCARD_SPI_PARAM_SPI, \
57 .cs = SDCARD_SPI_PARAM_CS, \
58 .clk = SDCARD_SPI_PARAM_CLK, \
59 .mosi = SDCARD_SPI_PARAM_MOSI, \
60 .miso = SDCARD_SPI_PARAM_MISO, \
61 .power = SDCARD_SPI_PARAM_POWER, \
62 .power_act_high = SDCARD_SPI_PARAM_POWER_AH }
63#endif
70 SDCARD_SPI_PARAMS
71};
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif /* SDCARD_SPI_PARAMS_H */
static const sdcard_spi_params_t sdcard_spi_params[]
sdcard_spi configuration
sdcard_spi device params
Definition sdcard_spi.h:175