mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20406 from FlapKap/fix_eeprom_debug_off_by_one
periph/eeprom: fix off-by-one error in debug statement
This commit is contained in:
commit
d83ec632e3
@ -95,7 +95,7 @@ size_t eeprom_read(uint32_t pos, void *data, size_t len)
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
_wait_for_pending_operations();
|
||||
*p++ = *(__IO uint8_t *)(EEPROM_START_ADDR + pos++);
|
||||
DEBUG("0x%02X ", *p);
|
||||
DEBUG("0x%02X ", *(p-1));
|
||||
}
|
||||
DEBUG("\n");
|
||||
|
||||
@ -110,8 +110,10 @@ size_t eeprom_write(uint32_t pos, const void *data, size_t len)
|
||||
|
||||
_unlock();
|
||||
|
||||
DEBUG("Writing data to EEPROM at pos %" PRIu32 ": ", pos);
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
_write_byte((EEPROM_START_ADDR + pos++), *p++);
|
||||
DEBUG("0x%02X ", *(p-1));
|
||||
}
|
||||
|
||||
_lock();
|
||||
|
Loading…
Reference in New Issue
Block a user