![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Library for LTC2945 12-Bit Wide Range Power Monitor. More...
Library for LTC2945 12-Bit Wide Range Power Monitor.
Definition in file LTC2945.cpp.
Go to the source code of this file.
Functions | |
int8_t | LTC2945_write (uint8_t i2c_address, uint8_t adc_command, uint8_t code) |
Write an 8-bit code to the LTC2945. More... | |
int8_t | LTC2945_write_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t code) |
Write a 16-bit code to the LTC2945. More... | |
int8_t | LTC2945_write_24_bits (uint8_t i2c_address, uint8_t adc_command, int32_t code) |
Write a 24-bit code to the LTC2945. More... | |
int8_t | LTC2945_read (uint8_t i2c_address, uint8_t adc_command, uint8_t *adc_code) |
Reads an 8-bit adc_code from LTC2945. More... | |
int8_t | LTC2945_read_12_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code) |
Reads a 12-bit adc_code from LTC2945. More... | |
int8_t | LTC2945_read_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code) |
Reads a 16-bit adc_code from LTC2945. More... | |
int8_t | LTC2945_read_24_bits (uint8_t i2c_address, uint8_t adc_command, int32_t *adc_code) |
Reads a 24-bit adc_code from LTC2945. More... | |
float | LTC2945_VIN_code_to_voltage (uint16_t adc_code, float LTC2945_VIN_lsb) |
Calculate the LTC2945 VIN voltage. More... | |
float | LTC2945_ADIN_code_to_voltage (uint16_t adc_code, float LTC2945_ADIN_lsb) |
Calculate the LTC2945 ADIN voltage. More... | |
float | LTC2945_code_to_current (uint16_t adc_code, float resistor, float LTC2945_DELTA_SENSE_lsb) |
Calculate the LTC2945 current with a sense resistor. More... | |
float | LTC2945_code_to_power (int32_t adc_code, float resistor, float LTC2945_Power_lsb) |
Calculate the LTC2945 power. More... | |
float | LTC2945_code_to_ADIN_power (int32_t adc_code, float resistor, float LTC2945_ADIN_DELTA_SENSE_lsb) |
Calculate the LTC2945 power with the ADIN. More... | |
float LTC2945_ADIN_code_to_voltage | ( | uint16_t | adc_code, |
float | LTC2945_ADIN_lsb | ||
) |
Calculate the LTC2945 ADIN voltage.
adc_code | The ADC value |
LTC2945_ADIN_lsb | ADIN lsb weight |
Definition at line 171 of file LTC2945.cpp.
float LTC2945_code_to_ADIN_power | ( | int32_t | adc_code, |
float | resistor, | ||
float | LTC2945_ADIN_DELTA_SENSE_lsb | ||
) |
Calculate the LTC2945 power with the ADIN.
adc_code | The ADC value |
resistor | The resistor value |
LTC2945_ADIN_DELTA_SENSE_lsb | Power lsb weight |
Definition at line 200 of file LTC2945.cpp.
float LTC2945_code_to_current | ( | uint16_t | adc_code, |
float | resistor, | ||
float | LTC2945_DELTA_SENSE_lsb | ||
) |
Calculate the LTC2945 current with a sense resistor.
adc_code | The ADC value |
resistor | The resistor value |
LTC2945_DELTA_SENSE_lsb | Delta sense lsb weight |
Definition at line 180 of file LTC2945.cpp.
float LTC2945_code_to_power | ( | int32_t | adc_code, |
float | resistor, | ||
float | LTC2945_Power_lsb | ||
) |
Calculate the LTC2945 power.
adc_code | The ADC value |
resistor | The resistor value |
LTC2945_Power_lsb | Power lsb weight |
Definition at line 190 of file LTC2945.cpp.
int8_t LTC2945_read | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint8_t * | adc_code | ||
) |
Reads an 8-bit adc_code from LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
adc_code | Value that will be read from the register. |
Definition at line 112 of file LTC2945.cpp.
int8_t LTC2945_read_12_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint16_t * | adc_code | ||
) |
Reads a 12-bit adc_code from LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
adc_code | Value that will be read from the register. |
Definition at line 123 of file LTC2945.cpp.
int8_t LTC2945_read_16_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint16_t * | adc_code | ||
) |
Reads a 16-bit adc_code from LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
adc_code | Value that will be read from the register. |
Definition at line 137 of file LTC2945.cpp.
int8_t LTC2945_read_24_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
int32_t * | adc_code | ||
) |
Reads a 24-bit adc_code from LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
adc_code | Value that will be read from the register. |
Definition at line 148 of file LTC2945.cpp.
float LTC2945_VIN_code_to_voltage | ( | uint16_t | adc_code, |
float | LTC2945_VIN_lsb | ||
) |
Calculate the LTC2945 VIN voltage.
adc_code | The ADC value |
LTC2945_VIN_lsb | VIN lsb weight |
Definition at line 162 of file LTC2945.cpp.
int8_t LTC2945_write | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint8_t | code | ||
) |
Write an 8-bit code to the LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
code | Value that will be written to the register. |
Definition at line 76 of file LTC2945.cpp.
int8_t LTC2945_write_16_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
uint16_t | code | ||
) |
Write a 16-bit code to the LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
code | Value that will be written to the register. |
Definition at line 88 of file LTC2945.cpp.
int8_t LTC2945_write_24_bits | ( | uint8_t | i2c_address, |
uint8_t | adc_command, | ||
int32_t | code | ||
) |
Write a 24-bit code to the LTC2945.
i2c_address | Register address for the LTC2945 |
adc_command | The "command byte" for the LTC2945 |
code | Value that will be written to the register. |
Definition at line 98 of file LTC2945.cpp.