default_timer_config.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2017 Josua Arndt Steffen Robertz RWTH Aachen
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #ifndef TIMER_NUMOF
24 #define TIMER_NUMOF (3U)
25 #define TIMER_CHANNEL_NUMOF (3)
26 
27 #define TIMER_0 MEGA_TIMER4
28 #define TIMER_0_MASK &TIMSK4
29 #define TIMER_0_FLAG &TIFR4
30 #define TIMER_0_ISRA TIMER4_COMPA_vect
31 #define TIMER_0_ISRB TIMER4_COMPB_vect
32 #define TIMER_0_ISRC TIMER4_COMPC_vect
33 
34 #define TIMER_1 MEGA_TIMER5
35 #define TIMER_1_MASK &TIMSK5
36 #define TIMER_1_FLAG &TIFR5
37 #define TIMER_1_ISRA TIMER5_COMPA_vect
38 #define TIMER_1_ISRB TIMER5_COMPB_vect
39 #define TIMER_1_ISRC TIMER5_COMPC_vect
40 
41 #define TIMER_2 MEGA_TIMER1
42 #define TIMER_2_MASK &TIMSK1
43 #define TIMER_2_FLAG &TIFR1
44 #define TIMER_2_ISRA TIMER1_COMPA_vect
45 #define TIMER_2_ISRB TIMER1_COMPB_vect
46 #define TIMER_2_ISRC TIMER1_COMPC_vect
47 #endif /* TIMER_NUMOF */
48 
49 #ifdef __cplusplus
50 }
51 #endif
52