mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Add ESP.reset() method
This commit is contained in:
parent
b026daf43b
commit
6b593a7978
@ -116,6 +116,8 @@ APIs related to deep sleep and watchdog timer are available in the ```ESP``` obj
|
||||
|
||||
```ESP.wdtEnable()```, ```ESP.wdtDisable()```, and ```ESP.wdtFeed()``` provide some control over the watchdog timer.
|
||||
|
||||
```ESP.reset()``` resets the CPU.
|
||||
|
||||
#### OneWire (from https://www.pjrc.com/teensy/td_libs_OneWire.html) ####
|
||||
|
||||
Library was adapted to work with ESP8266 by including register definitions into OneWire.h
|
||||
|
@ -55,3 +55,8 @@ void EspClass::deepSleep(uint32_t time_us, WakeMode mode)
|
||||
system_deep_sleep_set_option(static_cast<int>(mode));
|
||||
system_deep_sleep(time_us);
|
||||
}
|
||||
|
||||
void EspClass::reset()
|
||||
{
|
||||
((void (*)(void))0x40000080)();
|
||||
}
|
||||
|
@ -39,6 +39,8 @@ class EspClass {
|
||||
void wdtFeed();
|
||||
|
||||
void deepSleep(uint32_t time_us, WakeMode mode = WAKE_RF_DEFAULT);
|
||||
|
||||
void reset();
|
||||
};
|
||||
|
||||
extern EspClass ESP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user