Plane: CLI uses HAL eeprom storage size definition

This commit is contained in:
Randy Mackay 2014-03-12 15:20:17 +09:00
parent 693ce27bf6
commit fcea127537
2 changed files with 2 additions and 2 deletions

View File

@ -593,7 +593,7 @@ static void zero_eeprom(void)
{
uint8_t b = 0;
cliSerial->printf_P(PSTR("\nErasing EEPROM\n"));
for (uint16_t i = 0; i < EEPROM_MAX_ADDR; i++) {
for (uint16_t i = 0; i < HAL_STORAGE_SIZE_AVAILABLE; i++) {
hal.storage->write_byte(i, b);
}
cliSerial->printf_P(PSTR("done\n"));

View File

@ -91,7 +91,7 @@ test_eedump(uint8_t argc, const Menu::arg *argv)
uint16_t i, j;
// hexdump the EEPROM
for (i = 0; i < EEPROM_MAX_ADDR; i += 16) {
for (i = 0; i < HAL_STORAGE_SIZE_AVAILABLE; i += 16) {
cliSerial->printf_P(PSTR("%04x:"), i);
for (j = 0; j < 16; j++)
cliSerial->printf_P(PSTR(" %02x"), hal.storage->read_byte(i + j));