mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
Add WDT functions
This commit is contained in:
parent
365fef2547
commit
b2a86d3148
@ -1,5 +1,5 @@
|
||||
/*
|
||||
support_legacy_cores.ino - Legacy arduino core support for Tasmota
|
||||
support_cores.ino - Arduino core support for Tasmota
|
||||
|
||||
Copyright (C) 2020 Theo Arends
|
||||
|
||||
@ -35,3 +35,29 @@ void resetPins()
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Hardware related
|
||||
\*********************************************************************************************/
|
||||
|
||||
#ifdef ESP8266
|
||||
|
||||
void HwWdtDisable(void) {
|
||||
*((volatile uint32_t*) 0x60000900) &= ~(1); // Hardware WDT OFF
|
||||
}
|
||||
|
||||
void HwWdtEnable(void) {
|
||||
*((volatile uint32_t*) 0x60000900) |= 1; // Hardware WDT ON
|
||||
}
|
||||
|
||||
void WdtDisable(void) {
|
||||
ESP.wdtDisable();
|
||||
HwWdtDisable();
|
||||
}
|
||||
|
||||
void WdtEnable(void) {
|
||||
HwWdtEnable();
|
||||
ESP.wdtEnable(0);
|
||||
}
|
||||
|
||||
#endif // ESP8266
|
Loading…
x
Reference in New Issue
Block a user