Loading...
Searching...
No Matches
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
40static 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)
55static 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 = SPI_CS_UNDEF,
69 }
70};
71
72#define SPI_NUMOF ARRAY_SIZE(spi_config)
79#define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
80
81static 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)
89#ifdef __cplusplus
90} /* end extern "C" */
91#endif
92
93#endif /* PERIPH_CONF_H */
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition periph_cpu.h:279
Default clock configuration for cc2538 based boards.
#define SPI_CS_UNDEF
Define value for unused CS line.
Definition periph_cpu.h:363
ADC device configuration.
Definition periph_cpu.h:379
I2C configuration structure.
Definition periph_cpu.h:299
i2c_speed_t speed
Configured bus speed, actual speed may be lower but never higher.
Definition periph_cpu.h:304
SPI device configuration.
Definition periph_cpu.h:337
uint8_t num
number of SSI device, i.e.
Definition periph_cpu.h:296