| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions
LTC2992.cpp File Reference
Power Monitors and Coulomb Counters » LTC2992: Dual Wide Range Power Monitor

Header for LTC2992: Dual Wide Range Power Monitor. More...

## Detailed Description

Header for LTC2992: Dual Wide Range Power Monitor.

Definition in file LTC2992.cpp.

Go to the source code of this file.

## Functions
int8_t | LTC2992_write (uint8_t i2c_address, uint8_t adc_command, uint8_t code)
| Write an 8-bit code to the LTC2992. More...
int8_t | LTC2992_write_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t code)
| Write a 16-bit code to the LTC2992. More...
int8_t | LTC2992_write_24_bits (uint8_t i2c_address, uint8_t adc_command, uint32_t code)
| Write a 24-bit code to the LTC2992. More...
int8_t | LTC2992_read (uint8_t i2c_address, uint8_t adc_command, uint8_t *adc_code)
| Reads an 8-bit adc_code from LTC2992. More...
int8_t | LTC2992_read_12_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
| Reads a 12-bit adc_code from LTC2992. More...
int8_t | LTC2992_read_16_bits (uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
| Reads a 16-bit adc_code from LTC2992. More...
int8_t | LTC2992_read_24_bits (uint8_t i2c_address, uint8_t adc_command, uint32_t *adc_code)
| Reads a 24-bit adc_code from LTC2992. More...
float | LTC2992_SENSE_code_to_voltage (uint16_t adc_code, float LTC2992_SENSE_lsb)
| Calculate the LTC2992 SENSE voltage. More...
float | LTC2992_GPIO_code_to_voltage (uint16_t adc_code, float LTC2992_GPIO_lsb)
| Calculate the LTC2992 GPIO voltage. More...
float | LTC2992_code_to_current (uint16_t adc_code, float resistor, float LTC2992_DELTA_SENSE_lsb)
| Calculate the LTC2992 current with a sense resistor. More...
float | LTC2992_code_to_current_sum (uint16_t adc_code, float resistor, float LTC2992_DELTA_SENSE_lsb)
| Calculate the LTC2992 current sum with a sense resistor. More...
float | LTC2992_code_to_power (int32_t adc_code, float resistor, float LTC2992_Power_lsb)
| Calculate the LTC2992 power. More...
float | LTC2992_code_to_power_sum (int32_t adc_code, float resistor, float LTC2992_Power_lsb)
| Power LSB Weight. More...

## Function Documentation

## ◆ LTC2992_code_to_current()

float LTC2992_code_to_current | ( | uint16_t | adc_code,
|  | float | resistor,
|  | float | LTC2992_DELTA_SENSE_lsb
| ) |  |

Calculate the LTC2992 current with a sense resistor.

Returns
  The LTC2992 current in Amps

Parameters

  adc_code | The ADC value
  resistor | The resistor value
  LTC2992_DELTA_SENSE_lsb | Delta sense lsb weight

Definition at line 243 of file LTC2992.cpp.

## ◆ LTC2992_code_to_current_sum()

float LTC2992_code_to_current_sum | ( | uint16_t | adc_code,
|  | float | resistor,
|  | float | LTC2992_DELTA_SENSE_lsb
| ) |  |

Calculate the LTC2992 current sum with a sense resistor.

Returns
  The LTC2992 current in Amps

Parameters

  adc_code | The ADC value
  resistor | The resistor value
  LTC2992_DELTA_SENSE_lsb | Delta sense lsb weight

Definition at line 253 of file LTC2992.cpp.

## ◆ LTC2992_code_to_power()

float LTC2992_code_to_power | ( | int32_t | adc_code,
|  | float | resistor,
|  | float | LTC2992_Power_lsb
| ) |  |

Calculate the LTC2992 power.

Returns
  The LTC2992 power in Watts Power lsb weight

Parameters

  adc_code | The ADC value
  resistor | The resistor value

Definition at line 263 of file LTC2992.cpp.

## ◆ LTC2992_code_to_power_sum()

float LTC2992_code_to_power_sum | ( | int32_t | adc_code,
|  | float | resistor,
|  | float | LTC2992_Power_lsb
| ) |  |

Power LSB Weight.

Parameters

  adc_code | The ADC value
  resistor | The Resistor Value

Definition at line 273 of file LTC2992.cpp.

## ◆ LTC2992_GPIO_code_to_voltage()

float LTC2992_GPIO_code_to_voltage | ( | uint16_t | adc_code,
|  | float | LTC2992_ADIN_lsb
| ) |  |

Calculate the LTC2992 GPIO voltage.

Returns
  Returns the GPIO Voltage in Volts

Parameters

  adc_code | The ADC value
  LTC2992_GPIO_lsb | GPIO lsb weight

Definition at line 234 of file LTC2992.cpp.

## ◆ LTC2992_read()

int8_t LTC2992_read | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint8_t * | adc_code
| ) |  |

Reads an 8-bit adc_code from LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  adc_code | Value that will be read from the register.

Definition at line 175 of file LTC2992.cpp.

## ◆ LTC2992_read_12_bits()

int8_t LTC2992_read_12_bits | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint16_t * | adc_code
| ) |  |

Reads a 12-bit adc_code from LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  adc_code | Value that will be read from the register.

Definition at line 186 of file LTC2992.cpp.

## ◆ LTC2992_read_16_bits()

int8_t LTC2992_read_16_bits | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint16_t * | adc_code
| ) |  |

Reads a 16-bit adc_code from LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  adc_code | Value that will be read from the register.

Definition at line 200 of file LTC2992.cpp.

## ◆ LTC2992_read_24_bits()

int8_t LTC2992_read_24_bits | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint32_t * | adc_code
| ) |  |

Reads a 24-bit adc_code from LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  adc_code | Value that will be read from the register.

Definition at line 211 of file LTC2992.cpp.

## ◆ LTC2992_SENSE_code_to_voltage()

float LTC2992_SENSE_code_to_voltage | ( | uint16_t | adc_code,
|  | float | LTC2992_SENSE_lsb
| ) |  |

Calculate the LTC2992 SENSE voltage.

Returns
  Returns the SENSE Voltage in Volts

Parameters

  adc_code | The ADC value
  LTC2992_SENSE_lsb | SENSE lsb weight

Definition at line 225 of file LTC2992.cpp.

## ◆ LTC2992_write()

int8_t LTC2992_write | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint8_t | code
| ) |  |

Write an 8-bit code to the LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  code | Value that will be written to the register.

Definition at line 138 of file LTC2992.cpp.

## ◆ LTC2992_write_16_bits()

int8_t LTC2992_write_16_bits | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint16_t | code
| ) |  |

Write a 16-bit code to the LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  code | Value that will be written to the register.

Definition at line 150 of file LTC2992.cpp.

## ◆ LTC2992_write_24_bits()

int8_t LTC2992_write_24_bits | ( | uint8_t | i2c_address,
|  | uint8_t | adc_command,
|  | uint32_t | code
| ) |  |

Write a 24-bit code to the LTC2992.

Returns
  The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Parameters

  i2c_address | Register address for the LTC2992
  adc_command | The "command byte" for the LTC2992
  code | Value that will be written to the register.

Definition at line 160 of file LTC2992.cpp.