irq: Support sleeping when mcu is idle

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2017-07-12 22:16:16 -04:00
parent 969485c754
commit 118fd21cb8
13 changed files with 101 additions and 10 deletions

View File

@@ -18,6 +18,13 @@ 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)