1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

Merge remote-tracking branch 'origin/TrackManager_SAMD' into PORTX_HAL

This commit is contained in:
Asbelos
2022-07-07 10:02:28 +01:00
10 changed files with 68 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
/*
* © 2022 Paul M Antoine
* © 2021 Neil McKechnie
* © 2021 Mike S
* © 2021 Herb Morton
@@ -906,9 +907,15 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[])
wdt_enable( WDTO_15MS); // set Arduino watchdog timer for 15ms
delay(50); // wait for the prescaller time to expire
#else
#ifdef ARDUINO_ARCH_ESP
#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
}