irq: Support sleeping when mcu is idle
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -46,12 +46,24 @@ irq_restore(irqstatus_t flag)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
irq_wait(void)
|
||||
{
|
||||
asm("slp 1");
|
||||
}
|
||||
|
||||
static void
|
||||
timer_set(uint32_t value)
|
||||
{
|
||||
CT_IEP.TMR_CMP0 = value;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
timer_get_next(void)
|
||||
{
|
||||
return CT_IEP.TMR_CMP0;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
timer_read_time(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user