periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Christian Mehlis <mehlis@inf.fu-berlin.de>
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 
20 #ifndef PERIPH_CONF_H
21 #define PERIPH_CONF_H
22 
23 #include "periph_cpu.h"
24 #include "cfg_clock_16_1.h"
25 #include "cfg_timer_012.h"
26 #include "cfg_rtt_default.h"
27 
28 #ifdef __cplusplus
29  extern "C" {
30 #endif
31 
38 #define UART_NUMOF (1U)
39 #define UART_PIN_RX 17
40 #define UART_PIN_TX 18
41 
47 static const spi_conf_t spi_config[] = {
48  {
49  .dev = NRF_SPI0,
50  .sclk = 15,
51  .mosi = 13,
52  .miso = 14
53  }
54 };
55 
56 #define SPI_NUMOF ARRAY_SIZE(spi_config)
57 
63 static const i2c_conf_t i2c_config[] = {
64  {
65  .dev = NRF_TWI0,
66  .pin_scl = 7,
67  .pin_sda = 8,
68  .ppi = 0,
69  .speed = I2C_SPEED_NORMAL,
70  },
71  {
72  .dev = NRF_TWI1,
73  .pin_scl = 9,
74  .pin_sda = 10,
75  .ppi = 1,
76  .speed = I2C_SPEED_NORMAL,
77  }
78 };
79 
80 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
81 
89 static const adc_conf_t adc_config[] = {3, 4, 5, 6};
90 
91 #define ADC_NUMOF ARRAY_SIZE(adc_config)
92 
94 #ifdef __cplusplus
95 } /* end extern "C" */
96 #endif
97 
98 #endif /* PERIPH_CONF_H */
I2C_SPEED_NORMAL
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition: i2c.h:177
cfg_clock_16_1.h
Common clock configuration for some nrf51 based boards.
adc_conf_t
ADC device configuration.
Definition: periph_cpu.h:74
i2c_conf_t
I2C configuration options.
Definition: periph_cpu.h:128
spi_conf_t::dev
SPI_Type * dev
SPI device to use.
Definition: periph_cpu.h:465
cfg_timer_012.h
Shared timer peripheral configuration mapping timers 0, 1, and 2.
spi_conf_t
SPI configuration structure type.
Definition: periph_cpu.h:273
i2c_conf_t::dev
I2C_TypeDef * dev
USART device used.
Definition: periph_cpu.h:247