The friendly Operating System for the Internet of Things
boards/nrf51dongle/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 
19 #ifndef PERIPH_CONF_H
20 #define PERIPH_CONF_H
21 
22 #include "periph_cpu.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
35 #define CLOCK_CORECLOCK (16000000U) /* fixed for all NRF51822 */
36 #define CLOCK_CRYSTAL (16U) /* set to 0: internal RC oscillator
37  16: 16MHz crystal
38  32: 32MHz crystal */
39 
45 static const timer_conf_t timer_config[] = {
46  /* dev, channels, width */
47  { NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
48 };
49 
50 #define TIMER_0_ISR isr_timer0
51 
52 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
53 
59 #define RTT_NUMOF (1U)
60 #define RTT_IRQ_PRIO 1
61 
62 #define RTT_DEV NRF_RTC1
63 #define RTT_IRQ RTC1_IRQn
64 #define RTT_ISR isr_rtc1
65 #define RTT_MAX_VALUE (0xffffff)
66 #define RTT_FREQUENCY (10) /* in Hz */
67 #define RTT_PRESCALER (3275U) /* run with 10 Hz */
68 
74 #define UART_NUMOF (1U)
75 /* UART pin configuration */
76 #define UART_HWFLOWCTRL 1
77 #define UART_PIN_RX 11
78 #define UART_PIN_TX 9
79 #define UART_PIN_RTS 8
80 #define UART_PIN_CTS 10
81 
89 #define ADC_NUMOF (0)
90 
99 #define RADIO_IRQ_PRIO 1
100 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* PERIPH_CONF_H */
107 
Timer configuration data.