50 #ifndef LT_PMBusDeviceLTC2974_H_ 51 #define LT_PMBusDeviceLTC2974_H_ 54 #include "../LTPSM_PartFaultLogs/LT_2974FaultLog.h" 78 return (cap_ & capability) == capability;
83 uint8_t *model = (uint8_t *) calloc(8,1);
84 memcpy(model,
"LTC2974", 7);
85 return (
char *) model;
99 if ( (
id & 0xFFF0) == 0x0210)
class that handles LTC2974 fault logs.
void dumpBinary(Print *printer=0)
Dumps binary of the fault log to a Print inheriting object, or Serial if none specified.
char * getFaultLog()
Get the fault log text (call must free)
void disableFaultLog()
Disable the Fault Log.
LT_PMBusDeviceLTC2974(LT_PMBus *pmbus, uint8_t address)
uint8_t waitForNotBusy(uint8_t address)
Read MFR_COMMON until not Busy.
bool hasFaultLog(uint8_t address)
virtual uint8_t waitForAck(uint8_t address, uint8_t command)=0
Read with the address and command in loop until ack, then issue stop.
void enableFaultLog(uint8_t address)
void enableFaultLog()
Enable the Fault Log.
void clearFaultLog()
Clear the Fault Log.
void release()
Frees the memory reserved for the fault log.
uint8_t getNumPages(void)
bool hasFaultLog()
Is there a fault log?
void read(uint8_t address)
Reads the fault log from the specified address, reserves memory to hold the data. ...
void disableFaultLog(uint8_t address)
uint16_t readMfrSpecialId(uint8_t address)
Get speical ID.
void clearFaultLog(uint8_t address)
static LT_PMBusDevice * detect(LT_PMBus *pmbus, uint8_t address)
uint32_t getCapabilities()
Get the supported capabilities.
bool hasCapability(uint32_t capability)
Is/are these capability(s) supported?