1
0
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:
Gaëtan Harter 2019-02-12 16:35:13 +01:00
parent 3058c8c645
commit c894b67733
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -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);