boards/cc2538dk/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef PERIPH_CONF_H
20 #define PERIPH_CONF_H
21 
22 #include "cpu.h"
23 #include "periph_cpu.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
37 static const timer_conf_t timer_config[] = {
38  {
39  .chn = 2,
40  .cfg = GPTMCFG_16_BIT_TIMER, /* required for XTIMER */
41  },
42  {
43  .chn = 1,
44  .cfg = GPTMCFG_32_BIT_TIMER,
45  },
46  {
47  .chn = 2,
48  .cfg = GPTMCFG_16_BIT_TIMER,
49  },
50  {
51  .chn = 1,
52  .cfg = GPTMCFG_32_BIT_TIMER,
53  },
54 };
55 
56 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
57 
58 #define TIMER_IRQ_PRIO 1
59 
65 static const uart_conf_t uart_config[] = {
66  {
68  .rx_pin = GPIO_PIN(0, 0),
69  .tx_pin = GPIO_PIN(0, 1),
70  .cts_pin = GPIO_UNDEF,
71  .rts_pin = GPIO_UNDEF
72  }
73 };
74 
75 /* interrupt function name mapping */
76 #define UART_0_ISR isr_uart0
77 
78 /* macros common across all UARTs */
79 #define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
80 
87 #define I2C_IRQ_PRIO 1
88 
89 static const i2c_conf_t i2c_config[] = {
90  {
92  .scl_pin = GPIO_PIN(0, 2),
93  .sda_pin = GPIO_PIN(0, 4)
94  },
95 };
96 
97 #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
98 
104 static const spi_conf_t spi_config[] = {
105  {
106  .num = 0,
107  .mosi_pin = GPIO_PIN(0, 4),
108  .miso_pin = GPIO_PIN(0, 5),
109  .sck_pin = GPIO_PIN(0, 2),
110  .cs_pin = GPIO_PIN(3, 0)
111  }
112 };
113 
114 #define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
115 
121 #define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
122 
123 static const adc_conf_t adc_config[] = {
124  GPIO_PIN(0, 6),
125 };
126 
127 #define ADC_NUMOF (sizeof(adc_config) / sizeof(adc_config[0]))
128 
134 #define RADIO_IRQ_PRIO 1
135 
137 #ifdef __cplusplus
138 } /* end extern "C" */
139 #endif
140 
141 #endif /* PERIPH_CONF_H */
142 
fast mode: ~400kbit/s
cc2538_uart_t * dev
pointer to the used UART device
I2C configuration options.
uint8_t num
number of SSI device, i.e.
16-bit timer configuration
#define UART0_BASEADDR
UART0 Instance.
Definition: cc2538_uart.h:183
uint_fast8_t chn
number of channels
i2c_speed_t speed
baudrate used for the bus
32-bit timer configuration
UART device configuration.
SPI module configuration options.
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
ADC device configuration.
Timer configuration.