19#include <piduino/converter.h>
20#include <piduino/i2cdev.h>
93 explicit Max1161x (
const std::string ¶meters);
The Converter class provides an interface for analog-to-digital and digital-to-analog converters.
@ DefaultReference
Default reference voltage.
static Info defaultBus()
Gets information about the default I2C bus on the system.
Class for the MAX11612 to MAX11617 series of analog-to-digital converters.
const Info & info() const
Returns the information about the Max1161x converter.
Max1161x(const std::string ¶meters)
Constructs a Max1161x object from a string of parameters.
Max1161x(int busId=I2cDev::Info::defaultBus().id(), MaxIndex maxId=Max11615, int referenceId=DefaultReference, double fsr=0, bool bipolar=false)
Constructs a Max1161x object with the specified I2C device and parameters.
MaxIndex
Enumeration of the Max1161x models. This enum represents the different models of the Max1161x series.
static std::string registeredName()
Returns the name registered for this converter.
virtual ~Max1161x()
Destructor for the Max1161x class.
Internal implementation class for GpioDevice.
#define PIMP_DECLARE_PRIVATE(Class)
PIMP_DECLARE_PRIVATE.
Global namespace for Piduino.
Structure containing information about the Max1161x converter.
int busId
The I2C bus ID used for communication.
MaxIndex id
The Max1161x model ID (12, 13, 14, 15, 16, or 17).
Info(MaxIndex id=Max11615, int busId=I2cDev::Info::defaultBus().id())
Default constructor for Info.
double intref
The internal reference voltage value.
Info(MaxIndex id, int addr, int nchan, double intref, double fsr)
Constructs an Info object with the specified parameters.
double fsr
The full-scale range value.
void setId(MaxIndex id)
Sets the Max1161x model ID.
int addr
The I2C address of the converter.
int nchan
The number of channels configured for the converter.