![]() |
SparkFun INA2XX Arduino Library
v1.0.0-3-gc9007d6
Arduino Library for the SparkFun Qwiic Power Monitor (INA228 / INA237)
|
Implementation file for the SparkFun INA2XX family base driver. More...
#include "sfDevINA2XX.h"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.
SPDX-License-Identifier: MIT