#include <LTC2943.h>
Public Member Functions | |
int | getVoltageThresholdLow () |
LTC2943 (unsigned char u_c_device_address, string str_i2c_file_name, sem_t *mutex) | |
float | readAccumulatedCharge () |
float | readCurrent () |
void | readRegisters () |
int | readStatusRegister () |
float | readTemperature () |
float | readVoltage () |
void | resetAlertStatus () |
void | setChargeThresholdHigh (uint16_t _maxCharge) |
void | setChargeThresholdLow (uint16_t _minCharge) |
void | setControlRegister (unsigned char _mode, unsigned char _prescaler, unsigned char _alccConfiguration) |
void | setCurrentThresholdHigh (uint16_t _maxCurrent) |
void | setCurrentThresholdLow (uint16_t _minCurrent) |
void | setTemperatureThresholdHigh (uint16_t _maxTemp) |
void | setTemperatureThresholdLow (uint16_t _minTemp) |
void | setVoltageThresholdHigh (float _maxVoltage) |
void | setVoltageThresholdLow (float _minVoltage) |
virtual | ~LTC2943 () |
Public Attributes | |
uint16_t | alccMode |
uint16_t | prescalerMode |
uint16_t | prescalerValue |
float | senseResistorValue |
Private Member Functions | |
float | calculateAccumulatedChargeFromADCCode (uint16_t _accumulatedChargeADCCode) |
float | calculateCurrentFromADCCode (uint16_t _currentCode) |
float | calculateTemperatureFromADCCode (uint16_t _temperatureCode) |
float | calculateVoltageFromADCCode (uint16_t _voltageCode) |
Private Attributes | |
IMI2C * | batteryReader |
char | c_register_data [24] |
LTC2943::LTC2943 | ( | unsigned char | u_c_device_address, |
string | str_i2c_file_name, | ||
sem_t * | mutex | ||
) |
Definition at line 346 of file LTC2943.cpp.
LTC2943::~LTC2943 | ( | ) | [virtual] |
Definition at line 361 of file LTC2943.cpp.
float LTC2943::calculateAccumulatedChargeFromADCCode | ( | uint16_t | _accumulatedChargeADCCode | ) | [private] |
Definition at line 291 of file LTC2943.cpp.
float LTC2943::calculateCurrentFromADCCode | ( | uint16_t | _currentCode | ) | [private] |
Definition at line 247 of file LTC2943.cpp.
float LTC2943::calculateTemperatureFromADCCode | ( | uint16_t | _temperatureCode | ) | [private] |
Definition at line 226 of file LTC2943.cpp.
float LTC2943::calculateVoltageFromADCCode | ( | uint16_t | _voltageCode | ) | [private] |
Definition at line 269 of file LTC2943.cpp.
int LTC2943::getVoltageThresholdLow | ( | ) |
float LTC2943::readAccumulatedCharge | ( | ) |
Definition at line 278 of file LTC2943.cpp.
float LTC2943::readCurrent | ( | ) |
Definition at line 235 of file LTC2943.cpp.
void LTC2943::readRegisters | ( | ) |
Definition at line 367 of file LTC2943.cpp.
int LTC2943::readStatusRegister | ( | ) |
Definition at line 204 of file LTC2943.cpp.
float LTC2943::readTemperature | ( | ) |
Definition at line 214 of file LTC2943.cpp.
float LTC2943::readVoltage | ( | ) |
Definition at line 256 of file LTC2943.cpp.
void LTC2943::resetAlertStatus | ( | ) |
Definition at line 14 of file LTC2943.cpp.
void LTC2943::setChargeThresholdHigh | ( | uint16_t | _maxCharge | ) |
Definition at line 120 of file LTC2943.cpp.
void LTC2943::setChargeThresholdLow | ( | uint16_t | _minCharge | ) |
Definition at line 139 of file LTC2943.cpp.
void LTC2943::setControlRegister | ( | unsigned char | _mode, |
unsigned char | _prescaler, | ||
unsigned char | _alccConfiguration | ||
) |
Definition at line 300 of file LTC2943.cpp.
void LTC2943::setCurrentThresholdHigh | ( | uint16_t | _maxCurrent | ) |
Definition at line 73 of file LTC2943.cpp.
void LTC2943::setCurrentThresholdLow | ( | uint16_t | _minCurrent | ) |
Definition at line 97 of file LTC2943.cpp.
void LTC2943::setTemperatureThresholdHigh | ( | uint16_t | _maxTemp | ) |
Definition at line 25 of file LTC2943.cpp.
void LTC2943::setTemperatureThresholdLow | ( | uint16_t | _minTemp | ) |
Definition at line 49 of file LTC2943.cpp.
void LTC2943::setVoltageThresholdHigh | ( | float | _maxVoltage | ) |
Definition at line 158 of file LTC2943.cpp.
void LTC2943::setVoltageThresholdLow | ( | float | _minVoltage | ) |
Definition at line 181 of file LTC2943.cpp.
uint16_t LTC2943::alccMode |
IMI2C* LTC2943::batteryReader [private] |
char LTC2943::c_register_data[24] [private] |
uint16_t LTC2943::prescalerMode |
uint16_t LTC2943::prescalerValue |