Loading...
Searching...
No Matches
default_timer_config.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Otto-von-Guericke-Universität Magdeburg
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
9#pragma once
10
20
21#include "periph_cpu_common.h"
22#include "periph_conf.h" /* <- Allow overwriting timer config from board */
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifndef TIMER_NUMOF
29#define TIMER_NUMOF (2U)
30#define TIMER_CHANNEL_NUMOF (2)
31
32#define TIMER_0 MEGA_TIMER1
33#define TIMER_0_MASK &TIMSK1
34#define TIMER_0_FLAG &TIFR1
35#define TIMER_0_ISRA TIMER1_COMPA_vect
36#define TIMER_0_ISRB TIMER1_COMPB_vect
37
38#define TIMER_1 MEGA_TIMER3
39#define TIMER_1_MASK &TIMSK3
40#define TIMER_1_FLAG &TIFR3
41#define TIMER_1_ISRA TIMER3_COMPA_vect
42#define TIMER_1_ISRB TIMER3_COMPB_vect
43#endif /* TIMER_NUMOF */
44
45#ifdef __cplusplus
46}
47#endif
48