sdcard_spi_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
3  * 2017 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #pragma once
11 
23 #include "arduino_pinmap.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef SDCARD_SPI_PARAM_SPI
34 #define SDCARD_SPI_PARAM_SPI (SPI_DEV(0))
35 #endif
36 #ifndef SDCARD_SPI_PARAM_CS
37 #define SDCARD_SPI_PARAM_CS (ARDUINO_PIN_4)
38 #endif
39 #ifndef SDCARD_SPI_PARAM_CLK
40 #define SDCARD_SPI_PARAM_CLK (ARDUINO_PIN_76)
41 #endif
42 #ifndef SDCARD_SPI_PARAM_MOSI
43 #define SDCARD_SPI_PARAM_MOSI (ARDUINO_PIN_75)
44 #endif
45 #ifndef SDCARD_SPI_PARAM_MISO
46 #define SDCARD_SPI_PARAM_MISO (ARDUINO_PIN_74)
47 #endif
48 #ifndef SDCARD_SPI_PARAM_POWER
49 #define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
50 #endif
51 #ifndef SDCARD_SPI_PARAM_POWER_AH
53 #define SDCARD_SPI_PARAM_POWER_AH (true)
54 #endif
61  {
62  .spi_dev = SDCARD_SPI_PARAM_SPI,
63  .cs = SDCARD_SPI_PARAM_CS,
64  .clk = SDCARD_SPI_PARAM_CLK,
65  .mosi = SDCARD_SPI_PARAM_MOSI,
66  .miso = SDCARD_SPI_PARAM_MISO,
67  .power = SDCARD_SPI_PARAM_POWER,
68  .power_act_high = SDCARD_SPI_PARAM_POWER_AH
69  },
70 };
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
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