![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2943 Multicell Battery Gas Gauge with Temperature, Voltage and Current Measurement. More...
Library for LTC2943 Multicell Battery Gas Gauge with Temperature, Voltage and Current Measurement.
Definition in file LTC2943.cpp.
Go to the source code of this file.
Functions | |
int8_t | LTC2943_write (uint8_t i2c_address, uint8_t adc_command, uint8_t code) |
Write an 8-bit code to the LTC2943. More... | |
int8_t | LTC2943_write_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t code) |
Write a 16-bit code to the LTC2943. More... | |
int8_t | LTC2943_read (uint8_t i2c_address, uint8_t adc_command, uint8_t *adc_code) |
Reads an 8-bit adc_code from LTC2943. More... | |
int8_t | LTC2943_read_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code) |
Reads a 16-bit adc_code from LTC2943. More... | |
float | LTC2943_code_to_coulombs (uint16_t adc_code, float resistor, uint16_t prescalar) |
Calculate the LTC2943 charge in Coulombs. More... | |
float | LTC2943_code_to_mAh (uint16_t adc_code, float resistor, uint16_t prescalar) |
Calculate the LTC2943 charge in mAh. More... | |
float | LTC2943_code_to_voltage (uint16_t adc_code) |
Calculate the LTC2943 SENSE+ voltage. More... | |
float | LTC2943_code_to_current (uint16_t adc_code, float resistor) |
Calculate the LTC2943 current with a sense resistor. More... | |
float | LTC2943_code_to_kelvin_temperature (uint16_t adc_code) |
Calculate the LTC2943 temperature. More... | |
float | LTC2943_code_to_celcius_temperature (uint16_t adc_code) |
Calculate the LTC2943 temperature. More... | |
int8_t | LTC2943_register_set_clear_bits (uint8_t i2c_address, uint8_t register_address, uint8_t bits_to_set, uint8_t bits_to_clear) |
float LTC2943_code_to_celcius_temperature | ( | uint16_t | adc_code | ) |
Calculate the LTC2943 temperature.
adc_code | The RAW ADC value |
Definition at line 164 of file LTC2943.cpp.
float LTC2943_code_to_coulombs | ( | uint16_t | adc_code, |
float | resistor, | ||
uint16_t | prescalar | ||
) |
Calculate the LTC2943 charge in Coulombs.
adc_code | The RAW ADC value |
resistor | The sense resistor value |
prescalar | The prescalar value |
Definition at line 123 of file LTC2943.cpp.
float LTC2943_code_to_current | ( | uint16_t | adc_code, |
float | resistor | ||
) |
Calculate the LTC2943 current with a sense resistor.
adc_code | The RAW ADC value |
resistor | The sense resistor value |
Definition at line 148 of file LTC2943.cpp.
float LTC2943_code_to_kelvin_temperature | ( | uint16_t | adc_code | ) |
Calculate the LTC2943 temperature.
adc_code | The RAW ADC value |
Definition at line 156 of file LTC2943.cpp.
float LTC2943_code_to_mAh | ( | uint16_t | adc_code, |
float | resistor, | ||
uint16_t | prescalar | ||
) |
Calculate the LTC2943 charge in mAh.
adc_code | The RAW ADC value |
resistor | The sense resistor value |
prescalar | The prescalar value |
Definition at line 132 of file LTC2943.cpp.
float LTC2943_code_to_voltage | ( | uint16_t | adc_code | ) |
Calculate the LTC2943 SENSE+ voltage.
adc_code | The RAW ADC value |
Definition at line 140 of file LTC2943.cpp.
int8_t LTC2943_read | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint8_t * | adc_code | ||
) |
Reads an 8-bit adc_code from LTC2943.
i2c_address | Register address for the LTC2943 |
adc_command | The "command byte" for the LTC2943 |
adc_code | Value that will be read from the register. |
Definition at line 101 of file LTC2943.cpp.
int8_t LTC2943_read_16_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint16_t * | adc_code | ||
) |
Reads a 16-bit adc_code from LTC2943.
i2c_address | Register address for the LTC2943 |
adc_command | The "command byte" for the LTC2943 |
adc_code | Value that will be read from the register. |
Definition at line 112 of file LTC2943.cpp.
int8_t LTC2943_register_set_clear_bits | ( | uint8_t | i2c_address, |
uint8_t | register_address, | ||
uint8_t | bits_to_set, | ||
uint8_t | bits_to_clear | ||
) |
Definition at line 174 of file LTC2943.cpp.
int8_t LTC2943_write | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint8_t | code | ||
) |
Write an 8-bit code to the LTC2943.
i2c_address | Register address for the LTC2943 |
adc_command | The "command byte" for the LTC2943 |
code | Value that will be written to the register. |
Definition at line 80 of file LTC2943.cpp.
int8_t LTC2943_write_16_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint16_t | code | ||
) |
Write a 16-bit code to the LTC2943.
i2c_address | Register address for the LTC2943 |
adc_command | The "command byte" for the LTC2943 |
code | Value that will be written to the register. |
Definition at line 91 of file LTC2943.cpp.