From eaba2a7b0658f648bf32219aec0ce827c94333a0 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sat, 27 Feb 2021 22:26:22 +1300 Subject: Make timer mandatory for data manager The NULL check was a bit of a hack to get the test building. Probably a bad idea to leave it around, since there's no time it's sane to leave the timestamps on data manager contexts unset. --- timer.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'timer.c') diff --git a/timer.c b/timer.c index 7d82b0f..498e621 100644 --- a/timer.c +++ b/timer.c @@ -11,9 +11,6 @@ * interrupts already disabled in order to be safe */ -/* XXX hardcoded based upon TCCR3B selecting /256 prescaled clock */ -#define TIMER_HZ (F_CPU / 256) - static void timer_init(void) { /* timer1 has /1024 prescaler, 1 Hz comparator val, enable IRQ */ @@ -28,18 +25,11 @@ static void timer_init(void) TCCR3B |= (1 << CS32); } -static float timer_stamps_to_seconds(uint16_t start, uint16_t end) -{ - return (float)(end - start) / TIMER_HZ; -} - static uint16_t timer_get_value(void) { return TCNT3; } -/**/ - void get_system_timer(struct timer *timer) { timer->init = timer_init; -- cgit v1.1