mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
rp2040: Set watchdog to reboot properly (#3991)
This commit is contained in:
parent
5cf257b251
commit
1554c5700e
1 changed files with 3 additions and 2 deletions
|
@ -14,8 +14,9 @@ void IRAM_ATTR HOT delay(uint32_t ms) { ::delay(ms); }
|
|||
uint32_t IRAM_ATTR HOT micros() { return ::micros(); }
|
||||
void IRAM_ATTR HOT delayMicroseconds(uint32_t us) { delay_microseconds_safe(us); }
|
||||
void arch_restart() {
|
||||
while (true) { // NOLINT(clang-diagnostic-unreachable-code)
|
||||
yield();
|
||||
watchdog_reboot(0, 0, 10);
|
||||
while (1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
void arch_init() { watchdog_enable(0x7fffff, false); }
|
||||
|
|
Loading…
Reference in a new issue