1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 12:51:24 +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)
ESP.restart();
#endif
#if defined(ARDUINO_ARCH_SAMD)
// Disable all interrupts and reset uC
__disable_irq();
NVIC_SystemReset();
while(true);
#endif
#endif
break; // and <X> if we didnt restart
}