periph_conf.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014-2016 Freie Universität Berlin
3  * SPDX-FileCopyrightText: 2015 Zolertia SL
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
21 #include "periph_cpu.h"
22 #include "cfg_clk_default.h"
23 #include "cfg_timer_default.h"
24 #include "cfg_uart_default.h"
25 
26 #ifdef __cplusplus
27  extern "C" {
28 #endif
29 
34 #define I2C_IRQ_PRIO 1
35 
36 static const i2c_conf_t i2c_config[] = {
37  {
39  .scl_pin = GPIO_PIN(1, 1),
40  .sda_pin = GPIO_PIN(1, 0)
41  },
42 };
43 
44 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
51 static const spi_conf_t spi_config[] = {
52  {
53  .num = 0,
54  .mosi_pin = GPIO_PIN(3, 0),
55  .miso_pin = GPIO_PIN(2, 4),
56  .sck_pin = GPIO_PIN(3, 1),
57  .cs_pin = GPIO_PIN(3, 3)
58  },
59  {
60  .num = 1,
61  .mosi_pin = GPIO_PIN(2, 7),
62  .miso_pin = GPIO_PIN(0, 4),
63  .sck_pin = GPIO_PIN(1 ,5),
64  .cs_pin = SPI_CS_UNDEF,
65  }
66 };
67 
68 #define SPI_NUMOF ARRAY_SIZE(spi_config)
75 #define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
76 
77 static const adc_conf_t adc_config[] = {
78  GPIO_PIN(0, 6),
79  GPIO_PIN(0, 7),
80 };
81 
82 #define ADC_NUMOF ARRAY_SIZE(adc_config)
85 #ifdef __cplusplus
86 } /* end extern "C" */
87 #endif
88 
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:42
static const spi_conf_t spi_config[]
SPI configuration.
Definition: periph_conf.h:93
static const i2c_conf_t i2c_config[]
I2C configuration.
Definition: periph_conf.h:65
static const adc_conf_t adc_config[]
ADC configuration.
Definition: periph_conf.h:247
Default clock configuration for cc2538 based boards.
#define SPI_CS_UNDEF
Define value for unused CS line.
Definition: periph_cpu.h:362
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition: periph_cpu.h:275
ADC device configuration.
Definition: periph_cpu.h:374
I2C configuration structure.
Definition: periph_cpu.h:295
i2c_speed_t speed
Configured bus speed, actual speed may be lower but never higher.
Definition: periph_cpu.h:300
SPI device configuration.
Definition: periph_cpu.h:333
uint8_t num
number of SSI device, i.e.
Definition: periph_cpu.h:292