aboutsummaryrefslogtreecommitdiffstats
path: root/src/sam3x8e/timer.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-08-07 12:33:08 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-08-08 00:27:28 -0400
commit2c272f99a3fac49d8acd4b49a1aa3302225f17b8 (patch)
tree07998c722ed20fa812de26e1941daf57a030271f /src/sam3x8e/timer.c
parenta9982beacf184ccdc4bf1221852c900b0809537d (diff)
downloadkutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.tar.gz
kutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.tar.xz
kutter-2c272f99a3fac49d8acd4b49a1aa3302225f17b8.zip
sched: Implement generic sleep mechanism based on tasks pending
Track when tasks are pending and spin in irq_wait() when no tasks are pending. This improves the mechanism for sleeping the processor - it's simpler for the board specific code and it reduces the possibility of the processor sleeping when tasks are busy. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sam3x8e/timer.c')
-rw-r--r--src/sam3x8e/timer.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/sam3x8e/timer.c b/src/sam3x8e/timer.c
index 3a441062..f7698c65 100644
--- a/src/sam3x8e/timer.c
+++ b/src/sam3x8e/timer.c
@@ -18,13 +18,6 @@ timer_set(uint32_t value)
TC0->TC_CHANNEL[0].TC_RA = value;
}
-// Return the next scheduled wake up time
-uint32_t
-timer_get_next(void)
-{
- return TC0->TC_CHANNEL[0].TC_RA;
-}
-
// Return the current time (in absolute clock ticks).
uint32_t
timer_read_time(void)