cfg_timer_01.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Inria
3  * 2019 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #pragma once
11 
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_TIMER0,
36  .channels = 3,
37  .bitmode = TIMER_BITMODE_BITMODE_24Bit,
38  .irqn = TIMER0_IRQn,
39  },
40  {
41  .dev = NRF_TIMER1,
42  .channels = 3,
43  .bitmode = TIMER_BITMODE_BITMODE_16Bit,
44  .irqn = TIMER1_IRQn,
45  }
46 };
47 
48 #define TIMER_0_ISR isr_timer0
49 #define TIMER_1_ISR isr_timer1
50 
52 #define TIMER_0_MAX_VALUE 0xffffffff
54 #define TIMER_1_MAX_VALUE 0xffffffff
55 
56 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
59 #ifdef __cplusplus
60 } /* end extern "C" */
61 #endif
62 
Timer device configuration.
Definition: periph_cpu.h:263
TC0_t * dev
Pointer to the used as Timer device.
Definition: periph_cpu.h:264