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

Counter counter;

#ifndef __acweaving
__attribute__((interrupt(TIMER2_A1_VECTOR))) void handle_timer2_overflow()
{
	if (TA2IV == 0x0e) {
		if (counter.overflow < 65535) {
			counter.overflow++;
		}
	}
}
#endif