1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-11 15:22:13 +03:00

Make Updater be able to run inside async callbacks (#2096)

This commit is contained in:
Me No Dev
2016-06-05 13:00:10 +03:00
committed by Ivan Grokhotkov
parent dd81336b79
commit 2f933e20fa
2 changed files with 12 additions and 5 deletions

View File

@ -37,6 +37,11 @@ class UpdaterClass {
*/
bool begin(size_t size, int command = U_FLASH);
/*
Run Updater from asynchronous callbacs
*/
void runAsync(bool async){ _async = async; }
/*
Writes a buffer to the flash and increments the address
Returns the amount written
@ -143,6 +148,7 @@ class UpdaterClass {
bool _verifyHeader(uint8_t data);
bool _verifyEnd();
bool _async;
uint8_t _error;
uint8_t *_buffer;
size_t _bufferLen;