All EEPROM access uses persistentStore
This commit is contained in:
committed by
Scott Lahteine
parent
6a8b906318
commit
577aeb4aa9
@ -29,6 +29,7 @@
|
||||
#include "ubl.h"
|
||||
|
||||
#include "../../../Marlin.h"
|
||||
#include "../../../HAL/persistent_store_api.h"
|
||||
#include "../../../libs/hex_print_routines.h"
|
||||
#include "../../../module/configuration_store.h"
|
||||
#include "../../../lcd/ultralcd.h"
|
||||
@ -1167,24 +1168,27 @@
|
||||
* right now, it is good to have the extra information. Soon... we prune this.
|
||||
*/
|
||||
void unified_bed_leveling::g29_eeprom_dump() {
|
||||
unsigned char cccc;
|
||||
unsigned int kkkk; // Needs to be of unspecfied size to compile clean on all platforms
|
||||
uint8_t cccc;
|
||||
int kkkk;
|
||||
uint16_t crc = 0;
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("EEPROM Dump:");
|
||||
persistentStore.access_start();
|
||||
for (uint16_t i = 0; i < persistentStore.capacity(); i += 16) {
|
||||
if (!(i & 0x3)) idle();
|
||||
print_hex_word(i);
|
||||
SERIAL_ECHOPGM(": ");
|
||||
for (uint16_t j = 0; j < 16; j++) {
|
||||
kkkk = i + j;
|
||||
eeprom_read_block(&cccc, (const void *)kkkk, sizeof(unsigned char));
|
||||
persistentStore.read_data(kkkk, &cccc, sizeof(uint8_t), &crc);
|
||||
print_hex_byte(cccc);
|
||||
SERIAL_ECHO(' ');
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
SERIAL_EOL();
|
||||
persistentStore.access_finish();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user