SELKIELogger  1.0.0
I2C-INA219.h File Reference
#include <stdbool.h>
Include dependency graph for I2C-INA219.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  i2c_ina219_options
 

Macros

#define INA219_REG_CONFIG   0x00
 INA219 configuration register.
 
#define INA219_REG_SHUNT   0x01
 INA219 shunt voltage register.
 
#define INA219_REG_BUS   0x02
 INA219 bus voltage register.
 
#define INA219_REG_POWER   0x03
 INA219 calculated power register.
 
#define INA219_REG_CURRENT   0x04
 INA219 current register.
 
#define INA219_REG_CALIBRATION   0x05
 INA219 calibration registor.
 
#define INA219_CONFIG_DEF   0x3DDF
 Default sensor configuration for this library. More...
 
#define INA219_CONFIG_RESET   0x8000
 
#define I2C_INA219_DEFAULTS    { .scale = 1.0, .offset = 0.0, .min = -INFINITY, .max = INFINITY }
 

Functions

bool i2c_ina219_configure (const int busHandle, const int devAddr)
 Send configuration command to the specified device. More...
 
uint16_t i2c_ina219_read_configuration (const int busHandle, const int devAddr)
 Read configuration from device. More...
 
float i2c_ina219_read_shuntVoltage (const int busHandle, const int devAddr, const void *opts)
 Get voltage across the shunt resistor in millivolts. More...
 
float i2c_ina219_read_busVoltage (const int busHandle, const int devAddr, const void *opts)
 Get bus voltage (at V- terminal) in volts. More...
 
float i2c_ina219_read_power (const int busHandle, const int devAddr, const void *opts)
 Get power consumption in watts. More...
 
float i2c_ina219_read_current (const int busHandle, const int devAddr, const void *opts)
 Get current flow through shunt resistor in amps. More...
 

Detailed Description