cfg_timer_default.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Inria
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 CFG_TIMER_DEFAULT_H
21 #define CFG_TIMER_DEFAULT_H
22 
23 #include "periph_cpu.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 static const timer_conf_t timer_config[] = {
34  {
35  .dev = NRF_TIMER1,
36  .channels = 3,
37  .bitmode = TIMER_BITMODE_BITMODE_32Bit,
38  .irqn = TIMER1_IRQn
39  },
40  {
41  .dev = NRF_TIMER2,
42  .channels = 3,
43  .bitmode = TIMER_BITMODE_BITMODE_08Bit,
44  .irqn = TIMER2_IRQn
45  }
46 };
47 
48 #define TIMER_0_ISR isr_timer1
49 #define TIMER_1_ISR isr_timer2
50 
51 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
52 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif /* CFG_TIMER_DEFAULT_H */
59 
timer_conf_t
Timer configuration.
Definition: periph_cpu.h:288
timer_conf_t::dev
uint32_t dev
Address of timer base.
Definition: periph_cpu.h:112