diff options
Diffstat (limited to 'src/arch/msp430fr5969lp/arch.cc')
-rw-r--r-- | src/arch/msp430fr5969lp/arch.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/arch/msp430fr5969lp/arch.cc b/src/arch/msp430fr5969lp/arch.cc index 44a22c6..8281e66 100644 --- a/src/arch/msp430fr5969lp/arch.cc +++ b/src/arch/msp430fr5969lp/arch.cc @@ -63,10 +63,19 @@ void Arch::setup(void) //P4OUT = 0; } +#ifdef WITH_WAKEUP +extern void wakeup(); +#endif + void Arch::idle_loop(void) { - __eint(); - while (1); + while (1) { + __eint(); + __bis_SR_register(LPM0_bits); +#ifdef WITH_WAKEUP + wakeup(); +#endif + } } Arch arch; |