periph_conf.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 PERIPH_CONF_H
23 #define PERIPH_CONF_H
24 
25 #include "periph_cpu.h"
26 #include "cfg_clk_default.h"
27 #include "cfg_timer_default.h"
28 #include "cfg_uart_default.h"
29 
30 #ifdef __cplusplus
31  extern "C" {
32 #endif
33 
38 #define I2C_IRQ_PRIO 1
39 
40 static const i2c_conf_t i2c_config[] = {
41  {
43  .scl_pin = GPIO_PIN(1, 1),
44  .sda_pin = GPIO_PIN(1, 0)
45  },
46 };
47 
48 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
49 
55 static const spi_conf_t spi_config[] = {
56  {
57  .num = 0,
58  .mosi_pin = GPIO_PIN(3, 0),
59  .miso_pin = GPIO_PIN(2, 4),
60  .sck_pin = GPIO_PIN(3, 1),
61  .cs_pin = GPIO_PIN(3, 3)
62  },
63  {
64  .num = 1,
65  .mosi_pin = GPIO_PIN(2, 7),
66  .miso_pin = GPIO_PIN(0, 4),
67  .sck_pin = GPIO_PIN(1 ,5),
68  .cs_pin = GPIO_UNDEF
69  }
70 };
71 
72 #define SPI_NUMOF ARRAY_SIZE(spi_config)
73 
79 #define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
80 
81 static const adc_conf_t adc_config[] = {
82  GPIO_PIN(0, 6),
83  GPIO_PIN(0, 7),
84 };
85 
86 #define ADC_NUMOF ARRAY_SIZE(adc_config)
87 
89 #ifdef __cplusplus
90 } /* end extern "C" */
91 #endif
92 
93 #endif /* PERIPH_CONF_H */
94 
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
adc_conf_t
ADC device configuration.
Definition: periph_cpu.h:74
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
i2c_conf_t::speed
i2c_speed_t speed
baudrate used for the bus
Definition: periph_cpu.h:129
cfg_clk_default.h
Default clock configuration for cc2538 based boards.
i2c_conf_t
I2C configuration options.
Definition: periph_cpu.h:128
I2C_SPEED_FAST
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition: i2c.h:178
spi_conf_t
SPI configuration structure type.
Definition: periph_cpu.h:273