aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-09-30 16:41:23 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-09-30 16:41:23 +0200
commit40a747a13a71c3c95c141173281ca1d82794b679 (patch)
tree6f9cf0c4813e2a66e17ead5421623e09848d4dc9
parent0de25bc37cddc63fbb7f83867a786eeb853aff5a (diff)
downloadhourglass-40a747a13a71c3c95c141173281ca1d82794b679.tar.gz
hourglass-40a747a13a71c3c95c141173281ca1d82794b679.tar.bz2
hourglass-40a747a13a71c3c95c141173281ca1d82794b679.zip
Fix timer return value
-rw-r--r--timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/timer.c b/timer.c
index 8de6157..5cae651 100644
--- a/timer.c
+++ b/timer.c
@@ -19,7 +19,7 @@ uint32_t time;
ISR(TIMER1_COMPA_vect) {
++hits;
- time += OCR1A * US_PER_TICK;
+ time += (uint32_t) OCR1A * (uint32_t) US_PER_TICK;
if (hits == maxhits-1) {
OCR1A = lastcount;
} else if (hits >= maxhits) {