diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dmx.c | 3 | ||||
-rw-r--r-- | kernel/kernel.c | 8 | ||||
-rw-r--r-- | kernel/kernel.h | 2 |
3 files changed, 3 insertions, 10 deletions
diff --git a/kernel/dmx.c b/kernel/dmx.c index 66e2f7c..fa1399c 100644 --- a/kernel/dmx.c +++ b/kernel/dmx.c @@ -52,8 +52,7 @@ main() exec(ppm, &ppmarg, DEFSTACK); #endif - for (;;) - _NOP(); + IDLE(); return 0; } diff --git a/kernel/kernel.c b/kernel/kernel.c index 7fe821e..51532b5 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -25,7 +25,6 @@ #include <avr/io.h> #include <avr/interrupt.h> #include <avr/power.h> -#include <avr/sleep.h> #include <avr/wdt.h> #include "kernel.h" #include "stack.h" @@ -298,10 +297,3 @@ reboot(void) { kern.reboot = 1; } - -void -idle(void) -{ - for (;;) - sleep_mode(); -} diff --git a/kernel/kernel.h b/kernel/kernel.h index 47dc79a..198e10e 100644 --- a/kernel/kernel.h +++ b/kernel/kernel.h @@ -72,6 +72,8 @@ enum Prio { High, Low = 2, Idle, nPrio }; enum SysRQ { nTask, Prio }; +#define IDLE() do { for (;;) asm volatile ("nop"); } while (0) + /* __BEGIN_DECLS */ void init(uint8_t sema); |