summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-11-04 15:43:53 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-11-04 15:43:53 +0100
commit960d7042d2152d3f8016def1be72da2db06cff87 (patch)
treee605e615dc8f29dc2260313c7c0b53f4c773f062
parentd655a5eb915f0c067f5929badb7549dd02468d1b (diff)
msp430fr5994lp sleep_ms: handle ms == 0
-rw-r--r--src/arch/msp430fr5994lp/arch.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/msp430fr5994lp/arch.cc b/src/arch/msp430fr5994lp/arch.cc
index 2e57a5f..de75fbb 100644
--- a/src/arch/msp430fr5994lp/arch.cc
+++ b/src/arch/msp430fr5994lp/arch.cc
@@ -131,6 +131,9 @@ volatile bool sleep_done = false;
// max delay: 524 ms @ 8 MHz
void Arch::sleep_ms(unsigned int const ms)
{
+ if (ms == 0) {
+ return;
+ }
sleep_done = false;
#if F_CPU == 16000000UL
TA3CTL = TASSEL__SMCLK | ID__8; // /8