diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-04 15:43:53 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-04 15:43:53 +0100 |
commit | 960d7042d2152d3f8016def1be72da2db06cff87 (patch) | |
tree | e605e615dc8f29dc2260313c7c0b53f4c773f062 /src/arch | |
parent | d655a5eb915f0c067f5929badb7549dd02468d1b (diff) |
msp430fr5994lp sleep_ms: handle ms == 0
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/msp430fr5994lp/arch.cc | 3 |
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 |