periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
19 #ifndef PERIPH_CONF_H
20 #define PERIPH_CONF_H
21 
22 #include "periph_cpu.h"
23 #include "cfg_clock_16_0.h"
24 #include "cfg_timer_012.h"
25 #include "cfg_rtt_default.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define UART_NUMOF (1U)
36 /* UART pin configuration */
37 #define UART_PIN_RX 1
38 #define UART_PIN_TX 2
39 
45 static const spi_conf_t spi_config[] = {
46  {
47  .dev = NRF_SPI0,
48  .sclk = 19,
49  .mosi = 17,
50  .miso = 18
51  },
52  {
53  .dev = NRF_SPI1,
54  .sclk = 22,
55  .mosi = 20,
56  .miso = 21
57  }
58 };
59 
60 #define SPI_NUMOF ARRAY_SIZE(spi_config)
61 
67 static const i2c_conf_t i2c_config[] = {
68  {
69  .dev = NRF_TWI0,
70  .pin_scl = 23,
71  .pin_sda = 24,
72  .ppi = 0,
73  .speed = I2C_SPEED_NORMAL
74  }
75 };
76 
77 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
78 
86 #define ADC_CONFIG {4, 5, 6, 7}
87 #define ADC_NUMOF (4)
88 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* PERIPH_CONF_H */
I2C configuration options.
Definition: periph_cpu.h:128
SPI_Type * dev
SPI device to use.
Definition: periph_cpu.h:458
I2C_TypeDef * dev
USART device used.
Definition: periph_cpu.h:240
Common clock configuration for some nrf51 based boards.
Shared timer peripheral configuration mapping timers 0, 1, and 2.
SPI configuration structure type.
Definition: periph_cpu.h:273
normal mode: ~100 kbit/s
Definition: i2c.h:183