mirror of
https://github.com/esphome/esphome.git
synced 2025-02-10 00:41:44 +01:00
rp2040: Set watchdog to reboot properly (#3991)
This commit is contained in:
parent
5cf257b251
commit
1554c5700e
@ -14,8 +14,9 @@ void IRAM_ATTR HOT delay(uint32_t ms) { ::delay(ms); }
|
|||||||
uint32_t IRAM_ATTR HOT micros() { return ::micros(); }
|
uint32_t IRAM_ATTR HOT micros() { return ::micros(); }
|
||||||
void IRAM_ATTR HOT delayMicroseconds(uint32_t us) { delay_microseconds_safe(us); }
|
void IRAM_ATTR HOT delayMicroseconds(uint32_t us) { delay_microseconds_safe(us); }
|
||||||
void arch_restart() {
|
void arch_restart() {
|
||||||
while (true) { // NOLINT(clang-diagnostic-unreachable-code)
|
watchdog_reboot(0, 0, 10);
|
||||||
yield();
|
while (1) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void arch_init() { watchdog_enable(0x7fffff, false); }
|
void arch_init() { watchdog_enable(0x7fffff, false); }
|
||||||
|
Loading…
Reference in New Issue
Block a user