The friendly Operating System for the Internet of Things
boards/nrf6310/include/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 
22 #ifndef PERIPH_CONF_H
23 #define PERIPH_CONF_H
24 
25 #include "periph_cpu.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
38 #define CLOCK_CORECLOCK (16000000U) /* fixed for all NRF51822 */
39 #define CLOCK_CRYSTAL (16U) /* set to 0: internal RC oscillator
40  16: 16MHz crystal
41  32: 32MHz crystal */
42 
48 static const timer_conf_t timer_config[] = {
49  /* dev, channels, width */
50  { NRF_TIMER0, 3, TIMER_BITMODE_BITMODE_24Bit, TIMER0_IRQn }
51 };
52 
53 #define TIMER_0_ISR isr_timer0
54 
55 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
56 
62 #define RTT_NUMOF (1U)
63 #define RTT_IRQ_PRIO 1
64 
65 #define RTT_DEV NRF_RTC1
66 #define RTT_IRQ RTC1_IRQn
67 #define RTT_ISR isr_rtc1
68 #define RTT_MAX_VALUE (0xffffff)
69 #define RTT_FREQUENCY (10) /* in Hz */
70 #define RTT_PRESCALER (3275U) /* run with 10 Hz */
71 
77 #define UART_NUMOF (1U)
78 #define UART_0_EN 1
79 #define UART_IRQ_PRIO 1
80 
81 /* UART pin configuration */
82 #define UART_PIN_RX 16
83 #define UART_PIN_TX 17
84 #define UART_HWFLOWCTRL 0
85 #define UART_PIN_RTS 19
86 #define UART_PIN_CTS 18
87 
96 #define RADIO_IRQ_PRIO 1
97 
103 static const spi_conf_t spi_config[] = {
104  {
105  .dev = NRF_SPI0,
106  .sclk = 23,
107  .mosi = 22,
108  .miso = 20
109  },
110  {
111  .dev = NRF_SPI1,
112  .sclk = 16,
113  .mosi = 17,
114  .miso = 18
115  }
116 };
117 
118 #define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
119 
127 #define ADC_NUMOF (0)
128 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* PERIPH_CONF_H */
136 
SPI configuration data structure.
Timer configuration data.
cc2538_ssi_t * dev
SSI device.