- for (pos = 0; pos < ao_storage_total; pos += 4) {
- ao_storage_read(pos, data, 4);
- for (i = 0; i < 4; i++)
- ao_async_byte(data[i]);
- if (data[3] == (uint8_t) (AO_LOG_MICRO_GROUND >> 24))
- break;
+ ao_eeprom_read(N_SAMPLES_OFFSET, &n_samples, sizeof (n_samples));
+ if (n_samples == 0xffff)
+ n_samples = 0;
+ nbytes = STARTING_LOG_OFFSET + sizeof (uint16_t) * n_samples;
+ ao_async_start();
+ ao_async_byte('M');
+ ao_async_byte('P');
+ for (b = 0; b < nbytes; b++) {
+ if ((b & 0xf) == 0)
+ ao_log_newline();
+ ao_eeprom_read(b, &byte, 1);
+ ao_log_hex(byte);
+ crc = ao_log_micro_crc(crc, byte);