diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-07-12 15:24:36 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-07-12 15:24:36 +0200 |
commit | b2f7f066dbeed346e6d70414593cad2d918c2bd4 (patch) | |
tree | 14d61f487fadc109e38485e74e65fb7741ffe5e8 /src/arch/msp430fr5969lp/arch.cc | |
parent | 7f6b7ecfb0fb60a08dcc6c174d313eee052a94dc (diff) |
Add arch.idle() command
Diffstat (limited to 'src/arch/msp430fr5969lp/arch.cc')
-rw-r--r-- | src/arch/msp430fr5969lp/arch.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/arch/msp430fr5969lp/arch.cc b/src/arch/msp430fr5969lp/arch.cc index aee46f3..3016842 100644 --- a/src/arch/msp430fr5969lp/arch.cc +++ b/src/arch/msp430fr5969lp/arch.cc @@ -91,6 +91,17 @@ void Arch::idle_loop(void) } } +void Arch::idle(void) +{ + __eint(); + asm volatile("nop"); + __bis_SR_register(LPM2_bits); + asm volatile("nop"); +#ifdef WITH_WAKEUP + wakeup(); +#endif +} + Arch arch; #if defined(WITH_LOOP) || defined(TIMER_S) |