From 44b21fd98739a74e0bdfe373396358f15d9d194e Mon Sep 17 00:00:00 2001 From: pmantoine Date: Tue, 5 Jul 2022 12:40:00 +0700 Subject: [PATCH] Added code to respond to --- DCCEXParser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 7191b47..86408a9 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -885,6 +885,12 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[]) #if defined(ARDUINO_ARCH_ESP32) ESP.restart(); #endif +#if defined(ARDUINO_ARCH_SAMD) + // Disable all interrupts and reset uC + __disable_irq(); + NVIC_SystemReset(); + while(true); +#endif #endif break; // and if we didnt restart }