From 40a747a13a71c3c95c141173281ca1d82794b679 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 30 Sep 2014 16:41:23 +0200 Subject: Fix timer return value --- timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3