diff options
author | David Phillips <david@yeah.nah.nz> | 2021-02-27 22:26:22 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2021-02-27 22:26:22 +1300 |
commit | eaba2a7b0658f648bf32219aec0ce827c94333a0 (patch) | |
tree | 42f50d2f3c87abfb7af0149430a67afb778fd4f1 /timer.c | |
parent | 450829bab633da3bce84a9a0f6857e68e46c7eb4 (diff) | |
download | altimeter-eaba2a7b0658f648bf32219aec0ce827c94333a0.tar.xz |
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.
Diffstat (limited to 'timer.c')
-rw-r--r-- | timer.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -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; |