SparkFun INA2XX Arduino Library  v1.0.0-3-gc9007d6
Arduino Library for the SparkFun Qwiic Power Monitor (INA228 / INA237)
Loading...
Searching...
No Matches
sfDevINA2XX.cpp File Reference

Implementation file for the SparkFun INA2XX family base driver. More...

#include "sfDevINA2XX.h"

Detailed Description

Implementation file for the SparkFun INA2XX family base driver.

This file implements the sfDevINA2XX base class methods for configuring and reading shared registers on the INA228 and INA237 power monitor ICs. Device-specific measurement methods are in sfDevINA228.cpp and sfDevINA237.cpp.

Configuration registers (CONFIG, ADC_CONFIG, DIAG_ALRT) are accessed through bitfield unions: the register word is read into the union, the relevant field is modified, and the word is written back. Every method returns a SparkFun Toolkit error code so callers can detect and propagate communication failures.

Author
SparkFun Electronics
Date
June 2026

SPDX-License-Identifier: MIT

See also
https://github.com/sparkfun/SparkFun_INA2XX_Arduino_Library