Browse Source

* fix eep endless loop

pull/9/head
lumapu 3 years ago
parent
commit
a00ab4e48d
  1. 2
      tools/esp8266/defines.h
  2. 4
      tools/esp8266/eep.h

2
tools/esp8266/defines.h

@ -25,7 +25,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 4
#define VERSION_PATCH 5
//-------------------------------------

4
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();

Loading…
Cancel
Save