41 EEprom::EEprom(TwoWire *wire, BinarySemaphore *wireLock, uint8_t i2c_address)
58 if (
_wire->endTransmission() == 0)
61 _wire->write(address >> 8);
62 _wire->write(address & 0xFF);
64 _wire->endTransmission();
93 while((eot ==
false)&&(status ==
true)) {
95 if (
_wire->endTransmission() == 0)
98 _wire->write(address >> 8);
99 _wire->write(address & 0xFF);
100 while(iByte<length) {
101 _wire->write(buffer[iByte++]);
109 _wire->endTransmission();
111 eot = iByte >= length;
139 if (
_wire->endTransmission() == 0)
142 _wire->write(address >> 8);
143 _wire->write(address & 0xFF);
144 if (
_wire->endTransmission() == 0)
146 *value =
_wire->read();
147 _wire->endTransmission();
179 if (
_wire->endTransmission() == 0)
182 _wire->write(address >> 8);
183 _wire->write(address & 0xFF);
184 if (
_wire->endTransmission() == 0)
195 for (uint16_t i = 0; i < requestLen; i++)
198 buffer[iIdx++] =
_wire->read();
200 _wire->endTransmission();
bool Read(uint16_t address, uint8_t *buffer, uint16_t length)
Read a number of data byte from EEPROM.
BinarySemaphore * _wireLock
bool Write(uint16_t address, uint8_t *buffer, uint16_t length)
Write a number of data byte into EEPROM.
EEprom()
Constructor Class.
#define EEPROM_SEMAPHORE_MAX_WAITING_TIME_MS