51 #ifndef LT_EEDataFaultLog_H_ 52 #define LT_EEDataFaultLog_H_ 83 for (uint16_t
i = 0;
i < offset;
i++)
91 for (uint16_t
i = 0;
i < numWords;
i++)
96 if ((
i + 1) % 16 == 0)
102 uint8_t devPec = 0xFF & (w >> 8);
104 if (calcPec != devPec)
109 data[
pos] = 0xFF & w;
112 data[
pos] = 0xFF & (w >> 8);
122 memset (data, 0x00, numWords*2);
union LT_union_int32_4bytes data
uint8_t pecGet(void)
Get the current pec result.
LTC PMBus Support: Implementation for a LTC Fault Log.
void getNvmBlock(uint8_t address, uint16_t offset, uint16_t numWords, uint8_t command, uint8_t *data)
virtual void writeByte(uint8_t address, uint8_t command, uint8_t data)=0
SMBus write byte command.
virtual uint8_t readByte(uint8_t address, uint8_t command)=0
SMBus read byte command.
LT_EEDataFaultLog(LT_PMBus *pmbus)
void pecClear(void)
Clear the pec value so it can start a new calculation.
void pecAdd(uint8_t byte_value)
Add a byte to the pec calculation.
virtual uint16_t readWord(uint8_t address, uint8_t command)=0
SMBus read word command.