cfg_spi_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2018 Freie Universit├Ąt Berlin
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 
20 #ifndef CFG_SPI_DEFAULT_H
21 #define CFG_SPI_DEFAULT_H
22 
23 #include "periph_cpu.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 static const spi_conf_t spi_config[] = {
34  {
35  .dev = NRF_SPI0,
36  .sclk = GPIO_PIN(0, 15),
37  .mosi = GPIO_PIN(0, 13),
38  .miso = GPIO_PIN(0, 14),
39  }
40 };
41 
42 #define SPI_NUMOF ARRAY_SIZE(spi_config)
43 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif /* CFG_SPI_DEFAULT_H */
50 
static const spi_conf_t spi_config[]
Static array with configuration for declared I2C devices.
SPI_Type * dev
SPI device to use.
Definition: periph_cpu.h:437
SPI configuration structure type.
Definition: periph_cpu.h:267
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35