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_SPIM0,
36  .sclk = GPIO_PIN(0, 15),
37  .mosi = GPIO_PIN(0, 13),
38  .miso = GPIO_PIN(0, 14),
39 #ifdef ERRATA_SPI_SINGLE_BYTE_WORKAROUND
40  .ppi = 0,
41 #endif
42  }
43 };
44 
45 #define SPI_NUMOF ARRAY_SIZE(spi_config)
46 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* CFG_SPI_DEFAULT_H */
53 
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
spi_conf_t::dev
SPI_Type * dev
SPI device to use.
Definition: periph_cpu.h:465
spi_conf_t
SPI configuration structure type.
Definition: periph_cpu.h:273