Test cases for I2C_eeprom initialization (#15)

Added test cases for I2C_eeprom initialization to verify that the page size is chosen correctly and that it sets the address size properly.

Fixed a bug with the larger eeprom sizes having incorrect intervals.
This commit is contained in:
Tomas Hübner
2021-01-08 14:46:57 +01:00
committed by GitHub
parent 5bfc57b1d2
commit e0eba70c85
4 changed files with 194 additions and 11 deletions
+6
View File
@@ -23,6 +23,10 @@
// 1 byte for eeprom register address is available in txbuffer
#define I2C_TWIBUFFERSIZE 30
#ifndef UNIT_TEST_FRIEND
#define UNIT_TEST_FRIEND
#endif
class I2C_eeprom
{
public:
@@ -84,6 +88,8 @@ private:
uint8_t _ReadBlock(const uint16_t memoryAddress, uint8_t* buffer, const uint8_t length);
void _waitEEReady();
UNIT_TEST_FRIEND;
};
// -- END OF FILE --