1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-24 13:21:23 +01:00

Added code to respond to <D RESET>

This commit is contained in:
pmantoine 2022-07-05 12:40:00 +07:00
parent 959225c252
commit 44b21fd987

View File

@ -885,6 +885,12 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[])
#if defined(ARDUINO_ARCH_ESP32) #if defined(ARDUINO_ARCH_ESP32)
ESP.restart(); ESP.restart();
#endif #endif
#if defined(ARDUINO_ARCH_SAMD)
// Disable all interrupts and reset uC
__disable_irq();
NVIC_SystemReset();
while(true);
#endif
#endif #endif
break; // and <X> if we didnt restart break; // and <X> if we didnt restart
} }