mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Fix ESP8266 compile error
This commit is contained in:
parent
a8e005336e
commit
bec7a8eb69
@ -109,10 +109,10 @@ void NvmSave(const char *sNvsName, const char *sName, const void *pSettings, uns
|
|||||||
interrupts();
|
interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t NvmErase(const char *sNvsName) {
|
int32_t NvmErase(const char *sNvsName) {
|
||||||
nvs_handle handle;
|
nvs_handle handle;
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
esp_err_t result = nvs_open(sNvsName, NVS_READWRITE, &handle);
|
int32_t result = nvs_open(sNvsName, NVS_READWRITE, &handle);
|
||||||
if (ESP_OK == result) { result = nvs_erase_all(handle); }
|
if (ESP_OK == result) { result = nvs_erase_all(handle); }
|
||||||
if (ESP_OK == result) { result = nvs_commit(handle); }
|
if (ESP_OK == result) { result = nvs_commit(handle); }
|
||||||
nvs_close(handle);
|
nvs_close(handle);
|
||||||
@ -125,7 +125,7 @@ void SettingsErase(uint8_t type) {
|
|||||||
// cal_data - SDK PHY calibration data as documented in esp_phy_init.h
|
// cal_data - SDK PHY calibration data as documented in esp_phy_init.h
|
||||||
// qpc - Tasmota Quick Power Cycle state
|
// qpc - Tasmota Quick Power Cycle state
|
||||||
// main - Tasmota Settings data
|
// main - Tasmota Settings data
|
||||||
esp_err_t r1, r2, r3;
|
int32_t r1, r2, r3;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0: // Reset 2, 5, 6 = Erase all flash from program end to end of physical flash
|
case 0: // Reset 2, 5, 6 = Erase all flash from program end to end of physical flash
|
||||||
// nvs_flash_erase(); // Erase RTC, PHY, sta.mac, ap.sndchan, ap.mac, Tasmota etc.
|
// nvs_flash_erase(); // Erase RTC, PHY, sta.mac, ap.sndchan, ap.mac, Tasmota etc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user