ConstThe address with both A1 and A0 tied to GND.
The bus voltage one count carries, in microvolts.
The value the configuration register reads after a reset.
The device identifier the die-ID register carries for an INA226.
The value the manufacturer-ID register reads.
What an address pin is tied to, as the code the address helper takes.
Tied to GND.
Tied to SCL.
Tied to SDA.
Tied to VS.
How many times the power LSB is the current LSB.
The registers a driver reads and writes.
The alert limit.
The bus voltage result.
The calibration register.
The configuration register.
The current result.
The die-ID register.
The manufacturer-ID register.
The Mask/Enable register.
The power result.
The shunt voltage result.
The shunt voltage one count carries, in nanovolts.
Returns the limit comparison the alert pin actually responds to.
Only one limit function drives the pin at a time; with several enabled the part honours the most significant bit.
The enables in force.
The highest-priority enabled function, or null if none is enabled.
Returns the 7-bit address the A1 and A0 pins select.
What the A1 pin is tied to, one of pin.
What the A0 pin is tied to.
The address, 0x40 to 0x4F.
Returns how many samples an averaging code folds into one result.
The averaging code, 0 to 7.
The sample count, 1 to 1024.
Converts a raw bus-voltage register to microvolts.
The register value.
The bus voltage, at 1.25 mV per count.
Builds the bus-voltage register a monitor reports for a bus voltage.
The bus voltage.
The register value.
Converts a raw bus-voltage register to volts.
The register value.
The bus voltage.
Computes the calibration register for a shunt and current resolution.
The microamps per count the current register should carry.
The shunt resistor value.
The register value to write.
Parses the configuration register.
The register value, as read from the device.
The decoded settings; reserved bits are ignored.
Assembles the configuration register value.
The settings to encode.
The register value to write, with reserved bit 14 set as at reset.
Returns how long a conversion-time code takes.
The conversion-time code, 0 to 7.
The typical conversion time in microseconds.
Converts a raw current register to amps.
The signed register value.
The resolution the calibration selected.
The current.
Converts a raw current register to microamps.
The signed register value.
The resolution the calibration selected.
The current.
Builds the current register a monitor reports for a current.
The current.
The current LSB the calibration was set for.
The signed register value.
Computes the current register the part derives from a shunt reading.
The signed shunt-voltage register.
The calibration register in force.
The signed current register.
Splits a die-ID register into its device and revision fields.
The die-ID register.
The 12-bit device identifier and the 4-bit revision.
Checks that a pair of identification registers belongs to an INA226.
A node reads both at start-up, so a wrong part on the address, or a bus that reads all ones, is caught before its readings are trusted.
The manufacturer-ID register.
The die-ID register.
The decoded die ID.
Parses the Mask/Enable register.
The register value, as read from the device.
The decoded enables and flags.
Assembles the Mask/Enable register value.
The enables and flags to encode.
The register value to write.
Returns the smallest current resolution that still covers a maximum.
The largest current the application measures.
The minimum current LSB in microamps.
Reports whether a mode code keeps converting after the first result.
The mode code, 0 to 7.
Whether the mode is one of the three continuous ones.
Reports whether a mode code converts the bus voltage.
The mode code, 0 to 7.
Whether the bus input is measured.
Reports whether a mode code converts the shunt voltage.
The mode code, 0 to 7.
Whether the shunt input is measured.
Converts a raw power register to microwatts.
The register value.
The resolution the calibration selected.
The power. The power LSB is fixed at 25 times the current LSB.
Builds the power register a monitor reports for a power.
The power.
The current LSB the calibration was set for.
The register value.
Computes the power register the part derives from a current and a bus voltage.
The signed current register.
The bus-voltage register.
The power register.
Converts a raw power register to watts.
The register value.
The resolution the calibration selected.
The power.
Converts a raw shunt-voltage register to millivolts.
The signed register value.
The shunt voltage.
Converts a raw shunt-voltage register to nanovolts.
The signed register value.
The shunt voltage, at 2.5 uV per count.
Builds the shunt-voltage register a monitor reports for a shunt voltage.
The inverse of shuntNanovolts, so a node can be written and tested against what a monitor sends without one attached.
The shunt voltage.
The signed register value.
Returns how often the result registers update with these settings.
The settings in force.
The update interval in microseconds, or 0 in power-down.
A TI INA226 current, voltage, and power monitor with an alert pin.