From a00ab4e48d450d3198ad8c2010e313a73a55b3d6 Mon Sep 17 00:00:00 2001 From: lumapu Date: Mon, 25 Apr 2022 21:40:35 +0200 Subject: [PATCH] * fix eep endless loop --- tools/esp8266/defines.h | 2 +- tools/esp8266/eep.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/esp8266/defines.h b/tools/esp8266/defines.h index 765ba2b2..b91fe2d2 100644 --- a/tools/esp8266/defines.h +++ b/tools/esp8266/defines.h @@ -25,7 +25,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 2 -#define VERSION_PATCH 4 +#define VERSION_PATCH 5 //------------------------------------- diff --git a/tools/esp8266/eep.h b/tools/esp8266/eep.h index da1450b0..a49cae67 100644 --- a/tools/esp8266/eep.h +++ b/tools/esp8266/eep.h @@ -37,7 +37,7 @@ class eep { } void read(uint32_t addr, uint8_t data[], uint16_t length) { - for(uint8_t i = 0; i < length; i ++) { + for(uint16_t i = 0; i < length; i ++) { *(data++) = EEPROM.read(addr++); } } @@ -78,7 +78,7 @@ class eep { } void write(uint32_t addr, uint8_t data[], uint16_t length) { - for(uint8_t i = 0; i < length; i ++) { + for(uint16_t i = 0; i < length; i ++) { EEPROM.write(addr++, data[i]); } EEPROM.commit();