From 393a17cd1b090f8c98991f83016c298d4dc309da Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sun, 11 Sep 2016 12:16:24 +0200 Subject: [PATCH] Updater: enable final checks from outside Enable Updater users to perform final checks after the image has been downloaded and flashed, but the boot loader not been updated yet: 1. Provide access to the start address of the update area in flash so the update image can be verified. 2. Provide a way to abort the update. --- cores/esp8266/Updater.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/esp8266/Updater.h b/cores/esp8266/Updater.h index 046ff1667b..9f68b20a4d 100644 --- a/cores/esp8266/Updater.h +++ b/cores/esp8266/Updater.h @@ -69,6 +69,8 @@ class UpdaterClass { */ bool end(bool evenIfRemaining = false); + void abort() { _reset(); clearError(); } + /* Prints the last error to an output stream */ @@ -98,6 +100,7 @@ class UpdaterClass { size_t size(){ return _size; } size_t progress(){ return _currentAddress - _startAddress; } size_t remaining(){ return _size - (_currentAddress - _startAddress); } + uint32_t startAddress(){ return _startAddress; } /* Template to write from objects that expose