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-FileCopyrightText: 2017 Freie Universität Berlin
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
20 #include "arduino_pinmap.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #ifndef SDCARD_SPI_PARAM_SPI
31 #define SDCARD_SPI_PARAM_SPI (SPI_DEV(0))
32 #endif
33 #ifndef SDCARD_SPI_PARAM_CS
34 #define SDCARD_SPI_PARAM_CS (ARDUINO_PIN_4)
35 #endif
36 #ifndef SDCARD_SPI_PARAM_CLK
37 #define SDCARD_SPI_PARAM_CLK (ARDUINO_PIN_76)
38 #endif
39 #ifndef SDCARD_SPI_PARAM_MOSI
40 #define SDCARD_SPI_PARAM_MOSI (ARDUINO_PIN_75)
41 #endif
42 #ifndef SDCARD_SPI_PARAM_MISO
43 #define SDCARD_SPI_PARAM_MISO (ARDUINO_PIN_74)
44 #endif
45 #ifndef SDCARD_SPI_PARAM_POWER
46 #define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
47 #endif
48 #ifndef SDCARD_SPI_PARAM_POWER_AH
50 #define SDCARD_SPI_PARAM_POWER_AH (true)
51 #endif
58  {
59  .spi_dev = SDCARD_SPI_PARAM_SPI,
60  .cs = SDCARD_SPI_PARAM_CS,
61  .clk = SDCARD_SPI_PARAM_CLK,
62  .mosi = SDCARD_SPI_PARAM_MOSI,
63  .miso = SDCARD_SPI_PARAM_MISO,
64  .power = SDCARD_SPI_PARAM_POWER,
65  .power_act_high = SDCARD_SPI_PARAM_POWER_AH
66  },
67 };
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
Compatibility wrapper for arduino_iomap.h.
static const sdcard_spi_params_t sdcard_spi_params[]
sdcard_spi configuration
#define SDCARD_SPI_PARAM_POWER_AH
treated as 'don't care' if SDCARD_SPI_PARAM_POWER is GPIO_UNDEF
sdcard_spi device params
Definition: sdcard_spi.h:174
spi_t spi_dev
SPI bus used.
Definition: sdcard_spi.h:175