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
9#pragma once
10
20
21#include "cfg_adc_default.h"
22#include "cfg_clk_default.h"
23#include "cfg_i2c_default.h"
24#include "cfg_timer_default.h"
25#include "cfg_uart_default.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 = SPI_CS_UNDEF,
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)
54
55#ifdef __cplusplus
56} /* end extern "C" */
57#endif
58
@ PORT_B
port B
Definition periph_cpu.h:47
@ PORT_C
port C
Definition periph_cpu.h:48
@ PORT_A
port A
Definition periph_cpu.h:46
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:45
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:362
SPI device configuration.
Definition periph_cpu.h:336