ads1115
0.2.0
|
#include "config.hpp"
Public Member Functions | |
Config ()=default | |
Config (const std::uint16_t bytes) | |
bool | operator== (const Config &other) const =default |
std::uint16_t | to_bytes () const |
The Config struct represents the config register of the ADS1115.
The config register of the ADS1115 is consists of 16 bit which configure the device. The members of this struct map to the configuration options described in the datasheet and can span more than one bit. A to_bytes()
member function is provided to convert the struct to a std::uint16_t
which can be writen to the config register of the ADS1115.
Definition at line 20 of file config.hpp.
|
default |
ADS1115::Config::Config | ( | const std::uint16_t | bytes | ) |
Definition at line 11 of file config.cpp.
|
default |
std::uint16_t ADS1115::Config::to_bytes | ( | ) | const |
Converts the struct to a std::uint16_t
which can be writen to the config register of the ADS1115.
Definition at line 23 of file config.cpp.
References comp_lat, comp_mode, comp_pol, comp_que, data_rate, mode, mux, and pga.
COMP_LAT ADS1115::Config::comp_lat = COMP_LAT::NON_LATCHING |
Definition at line 31 of file config.hpp.
Referenced by TEST(), and to_bytes().
COMP_MODE ADS1115::Config::comp_mode = COMP_MODE::TRAD_COMP |
Definition at line 29 of file config.hpp.
Referenced by TEST(), and to_bytes().
COMP_POL ADS1115::Config::comp_pol = COMP_POL::LOW |
Definition at line 30 of file config.hpp.
Referenced by TEST(), and to_bytes().
COMP_QUE ADS1115::Config::comp_que = COMP_QUE::DISABLE_COMP |
Definition at line 32 of file config.hpp.
Referenced by TEST(), and to_bytes().
DR ADS1115::Config::data_rate = DR::SPS_128 |
Definition at line 28 of file config.hpp.
Referenced by TEST(), and to_bytes().
MODE ADS1115::Config::mode = MODE::SINGLE_CONV |
Definition at line 27 of file config.hpp.
Referenced by TEST(), and to_bytes().
MUX ADS1115::Config::mux = MUX::AIN0_AIN1 |
Definition at line 25 of file config.hpp.
Referenced by TEST(), and to_bytes().
PGA ADS1115::Config::pga = PGA::FS_2_048 |
Definition at line 26 of file config.hpp.
Referenced by TEST(), and to_bytes().