The friendly Operating System for the Internet of Things
boards/nrf52dk/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universit├Ąt Berlin
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 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
36 #define CLOCK_CORECLOCK (64000000U) /* fixed for all NRF52832 */
37 #define CLOCK_CRYSTAL (32U) /* set to 0: internal RC oscillator
38  32: 32MHz crystal */
39 
45 static const timer_conf_t timer_config[] = {
46  /* dev, channels, width, IRQn */
47  { NRF_TIMER1, 3, TIMER_BITMODE_BITMODE_32Bit, TIMER1_IRQn }
48 };
49 
50 #define TIMER_0_ISR isr_timer1
51 
52 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
53 
59 #define RTT_NUMOF (1U)
60 #define RTT_DEV NRF_RTC1
61 #define RTT_IRQ RTC1_IRQn
62 #define RTT_ISR isr_rtc1
63 #define RTT_MAX_VALUE (0xffffff)
64 #define RTT_FREQUENCY (10) /* in Hz */
65 #define RTT_PRESCALER (3275U) /* run with 10 Hz */
66 
72 #define UART_NUMOF (1U)
73 #define UART_PIN_RX 8
74 #define UART_PIN_TX 6
75 
81 static const spi_conf_t spi_config[] = {
82  {
83  .dev = NRF_SPI0,
84  .sclk = 15,
85  .mosi = 13,
86  .miso = 14 }
87 };
88 
89 #define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
90 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* __PERIPH_CONF_H */
SPI configuration data structure.
Timer configuration data.
cc2538_ssi_t * dev
SSI device.