periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2017 Freie Universität Berlin
3  * 2017 HAW Hamburg
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_clock_32_1.h"
27 #include "cfg_rtt_default.h"
28 #include "cfg_timer_default.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
39 #define CLOCK_CORECLOCK (64000000U) /* fixed for all nRF52832 */
40 
46 #define UART_NUMOF (1U)
47 #define UART_PIN_RX GPIO_PIN(0, 30)
48 #define UART_PIN_TX GPIO_PIN(0, 31)
49 
55 static const spi_conf_t spi_config[] = {
56  {
57  .dev = NRF_SPIM0,
58  .sclk = 4,
59  .mosi = 3,
60  .miso = 13,
61  .ppi = 0
62  }
63 };
64 
65 #define SPI_NUMOF ARRAY_SIZE(spi_config)
66 
72 static const i2c_conf_t i2c_config[] = {
73  {
74  .dev = NRF_TWIM1,
75  .scl = 28,
76  .sda = 29,
77  .speed = I2C_SPEED_NORMAL
78  }
79 };
80 
81 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
82 
87 #define NRF5X_ENABLE_DCDC
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* PERIPH_CONF_H */
94 
cfg_clock_32_1.h
Common clock configuration for the nRF52 based boards.
I2C_SPEED_NORMAL
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition: i2c.h:177
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
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