cfg_timer_012.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Inria
3  * SPDX-FileCopyrightText: 2019 Freie Universität Berlin
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
20 #include "periph_cpu.h"
21 
22 #ifdef __cplusplus
23  extern "C" {
24 #endif
25 
30 static const timer_conf_t timer_config[] = {
31  {
32  .dev = NRF_TIMER0,
33  .channels = 3,
34  .bitmode = TIMER_BITMODE_BITMODE_24Bit,
35  .irqn = TIMER0_IRQn,
36  },
37  {
38  .dev = NRF_TIMER1,
39  .channels = 3,
40  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
41  .irqn = TIMER1_IRQn,
42  },
43  {
44  .dev = NRF_TIMER2,
45  .channels = 3,
46  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
47  .irqn = TIMER2_IRQn,
48  }
49 };
50 
51 #define TIMER_0_ISR isr_timer0
52 #define TIMER_1_ISR isr_timer1
53 #define TIMER_2_ISR isr_timer2
54 
56 #define TIMER_0_MAX_VALUE 0xffffffff
58 #define TIMER_1_MAX_VALUE 0xffffffff
60 #define TIMER_2_MAX_VALUE 0xffffffff
61 
62 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
65 #ifdef __cplusplus
66 } /* end extern "C" */
67 #endif
68 
Timer device configuration.
Definition: periph_cpu.h:263
TC0_t * dev
Pointer to the used as Timer device.
Definition: periph_cpu.h:264