Loading...
Searching...
No Matches
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
20
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
36static const i2c_conf_t i2c_config[] = {
37 {
38 .speed = I2C_SPEED_FAST,
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)
46
51static 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)
70
75#define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
76
77static 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)
84
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:45
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
Definition periph_cpu.h:278
Default clock configuration for cc2538 based boards.
#define SPI_CS_UNDEF
Define value for unused CS line.
Definition periph_cpu.h:362
ADC device configuration.
Definition periph_cpu.h:377
I2C configuration structure.
Definition periph_cpu.h:298
SPI device configuration.
Definition periph_cpu.h:336