Skip to content

Added convert method to EEPROM to transfer data from partition to nvs #2841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Could have sworn I changed the return when I made the label
  • Loading branch information
lbernstone committed May 29, 2019
commit 8560231ba7d5506bc4a1ea763248905427e086e4
2 changes: 1 addition & 1 deletion libraries/EEPROM/library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name=EEPROM
version=1.0.3
author=Ivan Grokhotkov
maintainer=Paolo Becchi <[email protected]>
sentence=Enables reading and writing data to the permanent FLASH storage, up to 4kb.
sentence=Enables reading and writing data a sequential, addressable FLASH storage
paragraph=
category=Data Storage
url=http://arduino.cc/en/Reference/EEPROM
Expand Down
8 changes: 3 additions & 5 deletions libraries/EEPROM/src/EEPROM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,8 @@ uint16_t EEPROMClass::convert (bool clear, const char* EEPROMname, const char* n
return result;
}

size_t size;
size = mypart->size;
uint8_t* data;
data = (uint8_t*) malloc(size);
size_t size = mypart->size;
uint8_t* data = (uint8_t*) malloc(size);
if (!data) {
log_e("Not enough memory to convert EEPROM!");
goto exit;
Expand Down Expand Up @@ -274,7 +272,7 @@ uint16_t EEPROMClass::convert (bool clear, const char* EEPROMname, const char* n
}
exit:
free(data);
return size;
return result;
}

/*
Expand Down