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 #include "cfg_clock_16_0.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 static const timer_conf_t timer_config[] = {
35  {
36  .dev = NRF_TIMER0,
37  .channels = 3,
38  .bitmode = TIMER_BITMODE_BITMODE_24Bit,
39  .irqn = TIMER0_IRQn
40  },
41  {
42  .dev = NRF_TIMER1,
43  .channels = 3,
44  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
45  .irqn = TIMER1_IRQn
46  }
47 };
48 
49 #define TIMER_0_ISR isr_timer0
50 #define TIMER_1_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 (1) /* NRF_RTC1 */
61 #define RTT_MAX_VALUE (0x00ffffff)
62 #define RTT_FREQUENCY (1024)
63 
69 #define UART_NUMOF (1U)
70 /* UART pin configuration */
71 #define UART_HWFLOWCTRL 0
72 #define UART_PIN_RX 25
73 #define UART_PIN_TX 24
74 
80 static const i2c_conf_t i2c_config[] = {
81  {
82  .dev = NRF_TWI0,
83  .pin_scl = 19,
84  .pin_sda = 20,
85  .ppi = 0,
86  .speed = I2C_SPEED_NORMAL,
87  }
88 };
89 
90 #define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
91 
97 #define PWM_NUMOF (1U)
98 #define PWM_TIMER NRF_TIMER2
99 #define PWM_PIN (0U)
100 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* PERIPH_CONF_H */
107 
I2C configuration options.
NRF_TIMER_Type * dev
timer device
I2C_TypeDef * dev
USART device used.
Common clock configuration for some nrf51 based boards.
normal mode: ~100kbit/s
Timer configuration.