summaryrefslogtreecommitdiff
path: root/src/arch/arduino-nano/driver/counter.cc
blob: 894a882b5b74df4b7a6b5239cae0ce7318439b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "driver/counter.h"

#if defined(TIMER_S) || defined(WITH_LOOP)
#warn "timer/loop and counter are mutually exclusive. Expect odd behaviour."
#endif

Counter counter;

ISR(TIMER1_OVF_vect)
{
	if (counter.overflowed < 255) {
		counter.overflowed++;
	}
}