ads1115  0.2.0
config.hpp
Go to the documentation of this file.
1 #ifndef ADS1115_OPTIONS_HPP_
2 #define ADS1115_OPTIONS_HPP_
3 
4 // ADS1115
6 #include "ads1115/parameters.hpp"
7 
8 // stl
9 #include <cstdint>
10 
11 namespace ADS1115
12 {
21 
22  Config() = default;
23  Config(const std::uint16_t bytes);
24 
28  DR data_rate = DR::SPS_128;
30  COMP_POL comp_pol = COMP_POL::LOW;
33 
34  bool operator==(const Config& other) const = default;
35 
39  std::uint16_t to_bytes() const;
40  };
41 } // namespace ADS1115
42 
43 #endif // ADS1115_OPTIONS_HPP_
ADS1115
Definition: ads1115.hpp:16
parameters.hpp
ADS1115::COMP_QUE::DISABLE_COMP
@ DISABLE_COMP
ADS1115::COMP_LAT::NON_LATCHING
@ NON_LATCHING
ads1115_export.h
ADS1115::PGA::FS_2_048
@ FS_2_048
FS = 2.048V.
ADS1115::PGA
PGA
Definition: parameters.hpp:58
ADS1115::MUX::AIN0_AIN1
@ AIN0_AIN1
ADS1115::COMP_MODE
COMP_MODE
Definition: parameters.hpp:105
ADS1115::DR::SPS_128
@ SPS_128
DR = 128 SPS.
ADS1115::MODE::SINGLE_CONV
@ SINGLE_CONV
Sets the ADS1115 to power-down single-shot mode.
ADS1115::MUX
MUX
Definition: parameters.hpp:43
ADS1115::MODE
MODE
Definition: parameters.hpp:75
ADS1115::COMP_QUE
COMP_QUE
Definition: parameters.hpp:140
ADS1115::Config
Definition: config.hpp:20
ADS1115::COMP_POL
COMP_POL
Definition: parameters.hpp:116
ADS1115::DR
DR
Definition: parameters.hpp:84
ADS1115_EXPORT
#define ADS1115_EXPORT
Definition: ads1115_export.h:15
ADS1115::COMP_MODE::TRAD_COMP
@ TRAD_COMP
Traditional comparator with hysteresis.
ADS1115::COMP_LAT
COMP_LAT
Definition: parameters.hpp:129
ADS1115::COMP_POL::LOW
@ LOW