Loading...
Searching...
No Matches
cfg_spi_default.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014-2016 Freie Universität Berlin
3 * 2015 Zolertia SL
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
22#ifndef CFG_SPI_DEFAULT_H
23#define CFG_SPI_DEFAULT_H
24
25#include "periph_cpu.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35static const spi_conf_t spi_config[] = {
36 {
37 .num = 0,
38 .mosi_pin = GPIO_PIN(PORT_B, 1),
39 .miso_pin = GPIO_PIN(PORT_B, 3),
40 .sck_pin = GPIO_PIN(PORT_B, 2),
41 .cs_pin = GPIO_PIN(PORT_B, 5)
42 },
43 {
44 .num = 1,
45 .mosi_pin = GPIO_PIN(PORT_C, 5),
46 .miso_pin = GPIO_PIN(PORT_C, 6),
47 .sck_pin = GPIO_PIN(PORT_C, 4),
48 .cs_pin = GPIO_PIN(PORT_A, 7)
49 }
50};
51
52#define SPI_NUMOF ARRAY_SIZE(spi_config)
55#ifdef __cplusplus
56} /* end extern "C" */
57#endif
58
59#endif /* CFG_SPI_DEFAULT_H */
@ PORT_B
port B
Definition periph_cpu.h:48
@ PORT_C
port C
Definition periph_cpu.h:49
@ PORT_A
port A
Definition periph_cpu.h:47
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
static const spi_conf_t spi_config[]
Default SPI device configuration.
SPI device configuration.
Definition periph_cpu.h:337
uint8_t num
number of SSI device, i.e.
Definition periph_cpu.h:296