mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 15:36:38 +02:00
* fix eep endless loop
This commit is contained in:
parent
d5c1ac005b
commit
a00ab4e48d
2 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 4
|
||||
#define VERSION_PATCH 5
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue