91 #define LTC2944_I2C_ADDRESS 0x64 92 #define LTC2944_I2C_ALERT_RESPONSE 0x0C 128 #define LTC2944_STATUS_REG 0x00 129 #define LTC2944_CONTROL_REG 0x01 130 #define LTC2944_ACCUM_CHARGE_MSB_REG 0x02 131 #define LTC2944_ACCUM_CHARGE_LSB_REG 0x03 132 #define LTC2944_CHARGE_THRESH_HIGH_MSB_REG 0x04 133 #define LTC2944_CHARGE_THRESH_HIGH_LSB_REG 0x05 134 #define LTC2944_CHARGE_THRESH_LOW_MSB_REG 0x06 135 #define LTC2944_CHARGE_THRESH_LOW_LSB_REG 0x07 136 #define LTC2944_VOLTAGE_MSB_REG 0x08 137 #define LTC2944_VOLTAGE_LSB_REG 0x09 138 #define LTC2944_VOLTAGE_THRESH_HIGH_MSB_REG 0x0A 139 #define LTC2944_VOLTAGE_THRESH_HIGH_LSB_REG 0x0B 140 #define LTC2944_VOLTAGE_THRESH_LOW_MSB_REG 0x0C 141 #define LTC2944_VOLTAGE_THRESH_LOW_LSB_REG 0x0D 142 #define LTC2944_CURRENT_MSB_REG 0x0E 143 #define LTC2944_CURRENT_LSB_REG 0x0F 144 #define LTC2944_CURRENT_THRESH_HIGH_MSB_REG 0x10 145 #define LTC2944_CURRENT_THRESH_HIGH_LSB_REG 0x11 146 #define LTC2944_CURRENT_THRESH_LOW_MSB_REG 0x12 147 #define LTC2944_CURRENT_THRESH_LOW_LSB_REG 0x13 148 #define LTC2944_TEMPERATURE_MSB_REG 0x14 149 #define LTC2944_TEMPERATURE_LSB_REG 0x15 150 #define LTC2944_TEMPERATURE_THRESH_HIGH_REG 0x16 151 #define LTC2944_TEMPERATURE_THRESH_LOW_REG 0x17 178 #define LTC2944_AUTOMATIC_MODE 0xC0 179 #define LTC2944_SCAN_MODE 0x80 180 #define LTC2944_MANUAL_MODE 0x40 181 #define LTC2944_SLEEP_MODE 0x00 183 #define LTC2944_PRESCALAR_M_1 0x00 184 #define LTC2944_PRESCALAR_M_4 0x08 185 #define LTC2944_PRESCALAR_M_16 0x10 186 #define LTC2944_PRESCALAR_M_64 0x18 187 #define LTC2944_PRESCALAR_M_256 0x20 188 #define LTC2944_PRESCALAR_M_1024 0x28 189 #define LTC2944_PRESCALAR_M_4096 0x30 190 #define LTC2944_PRESCALAR_M_4096_2 0x31 192 #define LTC2944_ALERT_MODE 0x04 193 #define LTC2944_CHARGE_COMPLETE_MODE 0x02 195 #define LTC2944_DISABLE_ALCC_PIN 0x00 196 #define LTC2944_SHUTDOWN_MODE 0x01
static uint8_t adc_command
const float resistor
resistor value on demo board
float LTC2944_code_to_current(uint16_t adc_code, float resistor)
Calculate the LTC2944 current with a sense resistor.
const float LTC2944_FULLSCALE_CURRENT
const float LTC2944_VOLTAGE_lsb
const float LTC2944_FULLSCALE_VOLTAGE
int8_t LTC2944_read_16_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
Reads a 16-bit adc_code from LTC2944.
float LTC2944_code_to_celcius_temperature(uint16_t adc_code)
Calculate the LTC2944 temperature.
float LTC2944_code_to_coulombs(uint16_t adc_code, float resistor, uint16_t prescalar)
Calculate the LTC2944 charge in Coulombs.
const float LTC2944_FULLSCALE_TEMPERATURE
float LTC2944_code_to_kelvin_temperature(uint16_t adc_code)
Calculate the LTC2944 temperature.
int8_t LTC2944_read(uint8_t i2c_address, uint8_t adc_command, uint8_t *adc_code)
Reads an 8-bit adc_code from LTC2944.
const float LTC2944_CHARGE_lsb
int8_t LTC2944_write(uint8_t i2c_address, uint8_t adc_command, uint8_t code)
Write an 8-bit code to the LTC2944.
const float LTC2944_TEMPERATURE_lsb
float LTC2944_code_to_mAh(uint16_t adc_code, float resistor, uint16_t prescalar)
Calculate the LTC2944 charge in mAh.
int8_t LTC2944_write_16_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t code)
Write a 16-bit code to the LTC2944.
const float LTC2944_CURRENT_lsb
float LTC2944_code_to_voltage(uint16_t adc_code)
Calculate the LTC2944 SENSE+ voltage.