Loading...
Searching...
No Matches
periph_conf.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 DAI Labor Technische Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "cfg_adc_default.h"
19#include "cfg_clk_default.h"
20#include "cfg_i2c_default.h"
21#include "cfg_timer_default.h"
22#include "cfg_uart_default.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32static const spi_conf_t spi_config[] = {
33 {
34 .num = 0,
35 .mosi_pin = GPIO_PIN(PORT_B, 1),
36 .miso_pin = GPIO_PIN(PORT_B, 3),
37 .sck_pin = GPIO_PIN(PORT_B, 2),
38 .cs_pin = SPI_CS_UNDEF,
39 },
40 {
41 .num = 1,
42 .mosi_pin = GPIO_PIN(PORT_C, 5),
43 .miso_pin = GPIO_PIN(PORT_C, 6),
44 .sck_pin = GPIO_PIN(PORT_C, 4),
45 .cs_pin = GPIO_PIN(PORT_A, 7)
46 }
47};
48
49#define SPI_NUMOF ARRAY_SIZE(spi_config)
51
52#ifdef __cplusplus
53} /* end extern "C" */
54#endif
55
@ 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