mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-29 00:11:16 +01:00
tests/periph_eeprom: take EEPROM_CLEAR_BYTE into account
After being cleared, the memory can be `0xFF` for `atmega` platforms for example. Fix the test to take EEPROM_CLEAR_BYTE into account.
This commit is contained in:
parent
3058c8c645
commit
c894b67733
@ -246,7 +246,10 @@ static int cmd_test(int argc, char **argv)
|
||||
assert(eeprom_read_byte(EEPROM_SIZE / 2) == 'A');
|
||||
|
||||
/* clear some bytes */
|
||||
const uint8_t cleared[4] = {0, 0, 0, 0,};
|
||||
const uint8_t cleared[4] = {
|
||||
EEPROM_CLEAR_BYTE, EEPROM_CLEAR_BYTE,
|
||||
EEPROM_CLEAR_BYTE, EEPROM_CLEAR_BYTE,
|
||||
};
|
||||
eeprom_clear(0, 4);
|
||||
memset(result, 0, 4);
|
||||
ret = eeprom_read(0, (uint8_t *)result, 4);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user