From 960d7042d2152d3f8016def1be72da2db06cff87 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 4 Nov 2019 15:43:53 +0100 Subject: msp430fr5994lp sleep_ms: handle ms == 0 --- src/arch/msp430fr5994lp/arch.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/arch') 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 -- cgit v1.2.3