From 775780f9beef84cd88bf0391579f9048b779fbfa Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 25 Apr 2020 20:29:54 +0200 Subject: Status LED shows CPU sleeping --- sw/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/main.cpp b/sw/main.cpp index 30bb372..9855197 100644 --- a/sw/main.cpp +++ b/sw/main.cpp @@ -421,16 +421,15 @@ int main() send_debug("Sleep configured"); while (true) { + pins_set_status(false); sleep_mode(); wdt_reset(); + pins_set_status(true); /* In every loop, access the system_timer only once, so that * every loop has a well-defined time */ const auto time_now = system_timer.get_atomic_copy(); - // One second blink interval - pins_set_status(time_now.seconds_ % 2 == 0); - #if ENABLE_STORE_TO_EEPROM /* EEPROM has an endurance of at least 100'000 write/erase cycles. * (Datasheet 8.4 EEPROM Data Memory) -- cgit v1.2.3