@ INA2XX_BADC_AVG_1_SAMPLE
12 bit resolution, 532 us conversion time, same as INA2XX_BADC_12BIT
@ INA2XX_SADC_AVG_128_SAMPLES
128 sample average, 68.10 ms conversion time
@ INA2XX_CURRENT_RANGE_327_MA
±327.68 mA, 0.01mA resolution.
@ INA2XX_BADC_AVG_64_SAMPLES
64 sample average, 34.05 ms conversion time
@ INA2XX_SADC_10BIT
10 bit resolution, 148 us conversion time
int ina2xx_init(ina2xx_t *dev, const ina2xx_params_t *params)
Initialize a current sensor.
int ina2xx_read_bus(const ina2xx_t *dev, uint16_t *voltage)
Read bus voltage in mV.
@ INA2XX_SADC_AVG_2_SAMPLES
2 sample average, 1.06 ms conversion time
@ INA2XX_SHUNT_RANGE_80MV
+/- 80 mV range
@ INA2XX_BADC_10BIT
10 bit resolution, 148 us conversion time
int ina2xx_read_shunt(const ina2xx_t *dev, int16_t *voltage)
Read shunt voltage in E-05 V.
@ INA2XX_MODE_CONTINUOUS_SHUNT_BUS
Shunt and Bus, Continuous, default.
@ INA2XX_CURRENT_RANGE_1310_MA
±1310.72 mA, 0.04mA resolution.
@ INA2XX_BADC_AVG_2_SAMPLES
2 sample average, 1.06 ms conversion time
@ INA2XX_MODE_CONTINUOUS_BUS_ONLY
Bus Voltage, Continuous.
unsigned int i2c_t
Default i2c_t type definition.
uint16_t rshunt_mohm
Size of the shunt resistor in mΩ
ina2xx_mode
INA2XX possible mode settings.
@ INA2XX_SADC_AVG_32_SAMPLES
32 sample average, 17.02 ms conversion time
@ INA2XX_SHUNT_RANGE_320MV
+/- 320 mV range, default
ina2xx_brng
Bus voltage measurement range.
enum ina2xx_brng ina2xx_brng_t
Bus voltage measurement range.
@ INA2XX_BADC_11BIT
11 bit resolution, 276 us conversion time
int ina2xx_read_power(const ina2xx_t *dev, uint32_t *power)
Read power consumption in E-04 W.
@ INA2XX_SADC_AVG_8_SAMPLES
8 sample average, 4.26 ms conversion time
@ INA2XX_MODE_CONTINUOUS_SHUNT_ONLY
Shunt Voltage, Continuous.
@ INA2XX_CURRENT_RANGE_5242_MA
±5242.88 mA, 0.16mA resolution.
Device descriptor for INA2XX sensors.
ina2xx_i_range_t i_range
Range of the measured current.
enum ina2xx_pga ina2xx_pga_t
Shunt voltage measurement range (PGA settings)
@ INA2XX_BADC_12BIT
12 bit resolution, 532 us conversion time, default
@ INA2XX_BADC_AVG_4_SAMPLES
4 sample average, 2.13 ms conversion time
uint8_t addr
I2C address of the sensr.
@ INA2XX_MODE_ADC_DISABLE
ADC Off (disabled)
enum ina2xx_sadc ina2xx_sadc_t
Shunt ADC settings.
@ INA2XX_BUS_RANGE_16V
16 V bus voltage full scale range
ina2xx_i_range
Current measurement range.
int ina2xx_read_current(const ina2xx_t *dev, int32_t *current)
Read shunt current in E-05 A.
@ INA2XX_CURRENT_RANGE_2621_MA
±2621.44 mA, 0.08mA resolution.
@ INA2XX_MODE_TRIGGER_SHUNT_BUS
Shunt and Bus, Triggered.
ina2xx_sadc
Shunt ADC settings.
ina2xx_badc
Bus ADC settings.
@ INA2XX_BADC_9BIT
9 bit resolution, 84 us conversion time
@ INA2XX_SADC_11BIT
11 bit resolution, 276 us conversion time
@ INA2XX_SADC_AVG_64_SAMPLES
64 sample average, 34.05 ms conversion time
@ INA2XX_MODE_POWERDOWN
Power down.
ina2xx_params_t params
Configuration parameters of the driver.
enum ina2xx_badc ina2xx_badc_t
Bus ADC settings.
@ INA2XX_CURRENT_RANGE_655_MA
±655.36 mA, 0.02mA resolution.
@ INA2XX_SADC_9BIT
9 bit resolution, 84 us conversion time
@ INA2XX_SADC_AVG_16_SAMPLES
16 sample average, 8.51 ms conversion time
@ INA2XX_MODE_TRIGGER_BUS_ONLY
Bus Voltage, Triggered.
@ INA2XX_SADC_12BIT
12 bit resolution, 532 us conversion time, default
@ INA2XX_SHUNT_RANGE_160MV
+/- 160 mV range
@ INA2XX_SHUNT_RANGE_40MV
+/- 40 mV range
@ INA2XX_MODE_TRIGGER_SHUNT_ONLY
Shunt Voltage, Triggered.
@ INA2XX_SADC_AVG_4_SAMPLES
4 sample average, 2.13 ms conversion time
@ INA2XX_SADC_AVG_1_SAMPLE
12 bit resolution, 532 us conversion time, same as INA2XX_SADC_12BIT
i2c_t i2c
I2C device the sensor is connected to.
@ INA2XX_BUS_RANGE_32V
32 V bus voltage full scale range, default.
enum ina2xx_mode ina2xx_mode_t
INA2XX possible mode settings.
enum ina2xx_i_range ina2xx_i_range_t
Current measurement range.
@ INA2XX_BADC_AVG_128_SAMPLES
128 sample average, 68.10 ms conversion time
@ INA2XX_CURRENT_RANGE_10485_MA
±10485.76 mA, 0.32mA resolution.
@ INA2XX_BADC_AVG_16_SAMPLES
16 sample average, 8.51 ms conversion time
ina2xx_pga
Shunt voltage measurement range (PGA settings)
@ INA2XX_BADC_AVG_32_SAMPLES
32 sample average, 17.02 ms conversion time
Low-level I2C peripheral driver interface definition.
@ INA2XX_BADC_AVG_8_SAMPLES
8 sample average, 4.26 ms conversion time
Configuration parameters of the INA2xx driver.
uint16_t config
Configuration to apply.