Loading...
Searching...
No Matches
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
29extern "C" {
30#endif
31
36static 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 = SPI_CS_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)
56#ifdef __cplusplus
57} /* end extern "C" */
58#endif
59
60#endif /* PERIPH_CONF_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
Common default ADC configuration for the RE-Mote board revision A.
Default clock configuration for cc2538 based boards.
#define SPI_CS_UNDEF
Define value for unused CS line.
Definition periph_cpu.h:363
SPI device configuration.
Definition periph_cpu.h:337
uint8_t num
number of SSI device, i.e.
Definition periph_cpu.h:296