periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 DAI Labor Technische Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
19 #ifndef PERIPH_CONF_H
20 #define PERIPH_CONF_H
21 
22 #include "cfg_adc_default.h"
23 #include "cfg_clk_default.h"
24 #include "cfg_i2c_default.h"
25 #include "cfg_timer_default.h"
26 #include "cfg_uart_default.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 static const spi_conf_t spi_config[] = {
37  {
38  .num = 0,
39  .mosi_pin = GPIO_PIN(PORT_B, 1),
40  .miso_pin = GPIO_PIN(PORT_B, 3),
41  .sck_pin = GPIO_PIN(PORT_B, 2),
42  .cs_pin = GPIO_UNDEF
43  },
44  {
45  .num = 1,
46  .mosi_pin = GPIO_PIN(PORT_C, 5),
47  .miso_pin = GPIO_PIN(PORT_C, 6),
48  .sck_pin = GPIO_PIN(PORT_C, 4),
49  .cs_pin = GPIO_PIN(PORT_A, 7)
50  }
51 };
52 
53 #define SPI_NUMOF ARRAY_SIZE(spi_config)
54 
56 #ifdef __cplusplus
57 } /* end extern "C" */
58 #endif
59 
60 #endif /* PERIPH_CONF_H */
61 
PORT_C
@ PORT_C
port C
Definition: periph_cpu.h:38
PORT_A
@ PORT_A
port A
Definition: periph_cpu.h:36
cfg_adc_default.h
Common default ADC configuration for the RE-Mote board revision A.
cfg_uart_default.h
Common default UART configuration for the RE-Mote board revision A.
GPIO_UNDEF
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
Definition: periph_cpu_common.h:52
spi_conf_t::num
uint8_t num
number of SSI device, i.e.
Definition: periph_cpu.h:274
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
cfg_clk_default.h
Default clock configuration for cc2538 based boards.
PORT_B
@ PORT_B
port B
Definition: periph_cpu.h:37
spi_conf_t
SPI configuration structure type.
Definition: periph_cpu.h:273