From 3786b1ee159b63a8aa6b3fce99a14d90bb773d4c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 26 Apr 2022 06:48:26 -0500 Subject: [PATCH] Reboot implementation for nrf devices (#1411) --- src/shutdown.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shutdown.h b/src/shutdown.h index 10c93bde..ce1da1f3 100644 --- a/src/shutdown.h +++ b/src/shutdown.h @@ -6,10 +6,13 @@ void powerCommandsCheck() { + DEBUG_MSG("Rebooting\n"); + if (rebootAtMsec && millis() > rebootAtMsec) { #ifndef NO_ESP32 - DEBUG_MSG("Rebooting for update\n"); ESP.restart(); +#elif NRF52_SERIES + NVIC_SystemReset(); #else DEBUG_MSG("FIXME implement reboot for this platform"); #endif