M5Unit-ANADIG 0.1.0 git rev:3fbd370
|
Base class of ADS1100,ADS1110. More...
#include <unit_ADS11xx.hpp>
Classes | |
struct | Config |
Public Member Functions | |
UnitADS11XX (const uint8_t addr=DEFAULT_ADDRESS) | |
virtual bool | begin () override |
virtual void | update (const bool force=false) override |
virtual bool | generalReset () |
General reset. | |
Measurement data by periodic | |
int16_t | differentialValue () const |
Oldest measured differential value. | |
float | differentialVoltage () const |
Oldest measured differential voltage(mV) | |
Settings | |
bool | readPGA (ads11xx::PGA &pga) |
Read the PGA. | |
bool | writePGA (const ads11xx::PGA pga) |
Write the PGA. | |
Protected Member Functions | |
bool | start_periodic_measurement (const uint8_t cfg_value) |
bool | start_periodic_measurement () |
bool | stop_periodic_measurement () |
bool | measure_singleshot (ads11xx::Data &data, const uint8_t cfg_value) |
bool | measure_singleshot (ads11xx::Data &data) |
bool | read_config (uint8_t &v) |
bool | write_config (const uint8_t v) |
bool | read_measurement (uint8_t v[2]) |
bool | is_data_ready () |
virtual bool | read_if_ready_in_periodic (uint8_t v[2]) |
virtual uint32_t | get_interval (const uint8_t) |
M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitADS11XX, ads11xx::Data) | |
Protected Attributes | |
std::unique_ptr< m5::container::CircularBuffer< ads11xx::Data > > | _data {} |
ads11xx::PGA | _pga {} |
uint8_t | _rate {} |
float | _vdd {2.048f} |
float | _factor {1.0f} |
Base class of ADS1100,ADS1110.
|
virtual |
General reset.
Reset using I2C general call
Reimplemented in m5::unit::UnitADS1100, and m5::unit::UnitADS1110.
bool m5::unit::UnitADS11XX::readPGA | ( | ads11xx::PGA & | pga | ) |
Read the PGA.
[out] | pga | PGA |
bool m5::unit::UnitADS11XX::writePGA | ( | const ads11xx::PGA | pga | ) |
Write the PGA.
pga | PGA |