boards/remote-revb/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  * Copyright (C) 2015 Zolertia SL
4  * 2017 HAW Hamburg
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser General
7  * Public License v2.1. See the file LICENSE in the top level directory for more
8  * details.
9  */
10 
23 #ifndef PERIPH_CONF_H
24 #define PERIPH_CONF_H
25 
26 #include "cc2538_gpio.h"
27 #include "periph_cpu.h"
28 #include "periph_common.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(2, 3),
44  .sda_pin = GPIO_PIN(2, 2)
45  },
46 };
47 
48 #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
49 
55 static const spi_conf_t spi_config[] = {
56  {
57  .num = 0,
58  .mosi_pin = GPIO_PIN(1, 1),
59  .miso_pin = GPIO_PIN(1, 3),
60  .sck_pin = GPIO_PIN(1, 2),
61  .cs_pin = GPIO_PIN(1, 5)
62  },
63  {
64  .num = 1,
65  .mosi_pin = GPIO_PIN(2, 5),
66  .miso_pin = GPIO_PIN(2, 6),
67  .sck_pin = GPIO_PIN(2, 4),
68  .cs_pin = GPIO_PIN(0, 7)
69  }
70 };
71 #define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
72 
78 #define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
79 
80 static const adc_conf_t adc_config[] = {
81  GPIO_PIN(0, 5),
82  GPIO_PIN(0, 4),
83  /* voltage divider with 5/3 relationship to allow 5V sensors */
84  GPIO_PIN(0, 2),
85 };
86 
87 #define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
88 
90 #ifdef __cplusplus
91 } /* end extern "C" */
92 #endif
93 
94 #endif /* PERIPH_CONF_H */
95 
fast mode: ~400kbit/s
I2C configuration options.
uint8_t num
number of SSI device, i.e.
i2c_speed_t speed
baudrate used for the bus
Peripheral MCU configuration for the Re-Mote boards.
Driver for the cc2538 GPIO controller.
SPI module configuration options.
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
ADC device configuration.