EEPROM Restore added in Bootloader

This commit is contained in:
bsongis
2014-04-09 11:51:38 +02:00
parent ab7218e5cf
commit 5dab6ef38f
5 changed files with 102 additions and 74 deletions
@@ -724,8 +724,7 @@ int32_t fat12Write(const uint8_t *buffer, uint16_t sector, uint32_t count )
}
else if (sector < 3 + (EESIZE/BLOCKSIZE)) {
while (count) {
const EeFs * test = (const EeFs *)buffer;
if (offset == 0 && test->version==EEFS_VERS && test->mySize==sizeof(eeFs) && test->bs==BS) {
if (offset == 0 && isEepromStart(buffer)) {
TRACE("EEPROM start found in sector %d", sector);
offset = sector;
}