sdcard_spi_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
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
25 extern "C" {
26 #endif
27 
31  #define CARD_DETECT_PIN (GPIO_PIN(PA, 21))
32 
37  {
38  .spi_dev = SPI_DEV(0),
39  .cs = GPIO_PIN(PA, 8),
40  .clk = GPIO_PIN(PB, 11),
41  .mosi = GPIO_PIN(PB, 10),
42  .miso = GPIO_PIN(PA, 12),
43  .power = GPIO_UNDEF,
44  .power_act_high = true
45  },
46 };
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* SDCARD_SPI_PARAMS_H */
53 
sdcard_spi_params_t::spi_dev
spi_t spi_dev
SPI bus used.
Definition: sdcard_spi.h:175
board.h
Board specific configuration for the Adafruit Feather M0.
SPI_DEV
#define SPI_DEV(x)
Default SPI device access macro.
Definition: spi.h:86
PB
@ PB
port B
Definition: periph_cpu_common.h:89
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition: periph_cpu_common.h:52
sdcard_spi_params
static const sdcard_spi_params_t sdcard_spi_params[]
sdcard_spi configuration
Definition: sdcard_spi_params.h:36
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
PA
@ PA
port A
Definition: periph_cpu_common.h:88
sdcard_spi_params_t
sdcard_spi device params
Definition: sdcard_spi.h:174