boards/calliope-mini/include/periph_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2017 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_HFCLK (16U) /* set to 0: internal RC oscillator
37  16: 16MHz crystal
38  32: 32MHz crystal */
39 #define CLOCK_LFCLK (0) /* set to 0: internal RC oscillator
40  * 1: 32.768 kHz crystal
41  * 2: derived from HFCLK */
42 
48 static const timer_conf_t timer_config[] = {
49  {
50  .dev = NRF_TIMER0,
51  .channels = 3,
52  .bitmode = TIMER_BITMODE_BITMODE_24Bit,
53  .irqn = TIMER0_IRQn
54  },
55  {
56  .dev = NRF_TIMER1,
57  .channels = 3,
58  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
59  .irqn = TIMER1_IRQn
60  },
61  {
62  .dev = NRF_TIMER2,
63  .channels = 3,
64  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
65  .irqn = TIMER2_IRQn
66  }
67 };
68 
69 #define TIMER_0_ISR isr_timer0
70 #define TIMER_1_ISR isr_timer1
71 #define TIMER_2_ISR isr_timer2
72 
73 #define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
74 
80 #define RTT_NUMOF (1U)
81 #define RTT_DEV (1) /* NRF_RTC1 */
82 #define RTT_MAX_VALUE (0x00ffffff)
83 #define RTT_FREQUENCY (1024)
84 
90 #define UART_NUMOF (1U)
91 /* UART pin configuration */
92 #define UART_HWFLOWCTRL 0
93 #define UART_PIN_RX 25
94 #define UART_PIN_TX 24
95 
101 static const i2c_conf_t i2c_config[] = {
102  {
103  .dev = NRF_TWI0,
104  .pin_scl = 19,
105  .pin_sda = 20,
106  .ppi = 0
107  }
108 };
109 
110 #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
111 
119 #define ADC_NUMOF (0)
120 
129 #define RADIO_IRQ_PRIO 1
130 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* PERIPH_CONF_H */
137 
I2C configuration options.
NRF_TIMER_Type * dev
timer device
I2C_TypeDef * dev
USART device used.
Timer configuration.