aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-08-06 19:21:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-08 00:27:28 -0400
commit78982ebb51b0895b3178a85edcb1543939dc13b4 (patch)
treea1961fb294104a81e37ff3af93e643fdd35e5f30 /src/generic
parent6a63c27542fc7b432ed438ce1d62243b5aebc3da (diff)
downloadkutter-78982ebb51b0895b3178a85edcb1543939dc13b4.tar.gz
kutter-78982ebb51b0895b3178a85edcb1543939dc13b4.tar.xz
kutter-78982ebb51b0895b3178a85edcb1543939dc13b4.zip
avr: Implement internal avr specific timer to handle 16bit overflows
Don't rely on the generic scheduler code to always have a timer no more than 1ms in the future. Instead, create an avr specific timer that will be called every 0x8000 ticks. This simplifies the generic code and it reduces the amount of code that needs to be run every millisecond. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/generic')
-rw-r--r--src/generic/misc.h1
-rw-r--r--src/generic/timer_irq.c6
2 files changed, 0 insertions, 7 deletions
diff --git a/src/generic/misc.h b/src/generic/misc.h
index f0f8e5a5..65861207 100644
--- a/src/generic/misc.h
+++ b/src/generic/misc.h
@@ -12,7 +12,6 @@ uint32_t timer_from_us(uint32_t us);
uint8_t timer_is_before(uint32_t time1, uint32_t time2);
uint32_t timer_read_time(void);
void timer_kick(void);
-void timer_periodic(void);
void *dynmem_start(void);
void *dynmem_end(void);
diff --git a/src/generic/timer_irq.c b/src/generic/timer_irq.c
index 127601e2..605fc129 100644
--- a/src/generic/timer_irq.c
+++ b/src/generic/timer_irq.c
@@ -30,12 +30,6 @@ timer_is_before(uint32_t time1, uint32_t time2)
return (int32_t)(time1 - time2) < 0;
}
-// Called by main code once every millisecond. (IRQs disabled.)
-void
-timer_periodic(void)
-{
-}
-
static uint32_t timer_repeat_until;
#define TIMER_IDLE_REPEAT_TICKS timer_from_us(500)
#define TIMER_REPEAT_TICKS timer_from_us(100)