3 #include "elrs_eeprom.h"
7 void test_eeprom_rw(void)
10 // GIVEN the eeprom object has been initialised
11 // WHEN the write method is called using a valid address and value
12 // THEN the value is stored at that address in eeprom
14 // Initialise the eeprom
21 // Write the first value variable into the eeprom at the specified address
24 eeprom
.WriteByte(address
, value
);
26 // Assert that value in eeprom matches what was written
27 TEST_ASSERT_EQUAL(value
, eeprom
.ReadByte(address
));
29 // Write the second value variable into the eeprom at the specified address
32 eeprom
.WriteByte(address
, value
);
34 // Assert that value in eeprom matches what was written
35 TEST_ASSERT_EQUAL(value
, eeprom
.ReadByte(address
));