blob: 5f007f19bfdf6bd39bbfd285fe9bd79d7aa8ecfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/*
* Copyright 2024 Birte Kristina Friesel
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "arch.h"
#include "driver/counter.h"
Counter counter;
void tim2_isr(void)
{
if (timer_get_flag(TIM2, TIM_SR_UIF)) {
timer_clear_flag(TIM2, TIM_SR_UIF);
if (counter.overflow < 4294967295) {
counter.overflow++;
}
}
}
|