|
HF-ADS7952 Driver 0.1.0-dev
HF-ADS7952 C++ Driver
|
Namespaces | |
| namespace | gpio |
| namespace | reg |
Classes | |
| class | ADS7952 |
| Main driver class for the ADS7952 ADC. More... | |
| struct | ChannelReadings |
| struct | GPIOConfig |
| struct | ReadResult |
| class | SpiInterface |
| CRTP-based template interface for SPI bus operations. More... | |
Enumerations | |
| enum class | Mode : uint8_t { Mode::Manual , Mode::Auto1 , Mode::Auto2 } |
| enum class | Range : uint8_t { Range::Vref , Range::TwoVref } |
| enum class | PowerDown : uint8_t { PowerDown::Normal , PowerDown::PowerDown } |
| enum class | AlarmBound : uint8_t { AlarmBound::Low = 0 , AlarmBound::High = 1 } |
| enum class | Error : uint8_t { Error::Ok = 0 , Error::NotInitialized , Error::InvalidChannel , Error::SpiError , Error::ProgrammingFailed , Error::ModeChangeFailed , Error::Timeout } |
| enum class | GPIO01AlarmMode : uint8_t { GPIO01AlarmMode::GPIO = 0 , GPIO01AlarmMode::GPIO0_HighAndLowAlarm = 1 , GPIO01AlarmMode::GPIO0_HighAlarm = 2 , GPIO01AlarmMode::GPIO1_HighAlarm = 4 , GPIO01AlarmMode::GPIO1_LowAlarm_GPIO0_HighAlarm = 6 } |
Functions | |
| template<typename... Channels> | |
| constexpr uint16_t | ChannelMask (Channels... channels) noexcept |
| Construct a channel enable bitmask from a list of channel numbers. | |
| constexpr uint16_t | ChannelRangeMask (uint8_t first, uint8_t last) noexcept |
| Build a contiguous channel range mask from first to last (inclusive). | |
| constexpr uint16_t | VoltageToCount (float voltage, float vref) noexcept |
| Convert a voltage to a 12-bit ADC count. | |
Variables | |
Predefined Auto-1 Channel Masks | |
Bit ordering: bit N = channel N, bit 0 = CH0 (LSB). | |
| constexpr uint16_t | kAllChannels = 0x0FFF |
| CH0–CH11 (all 12) | |
| constexpr uint16_t | kEvenChannels = 0x0555 |
| CH0, CH2, CH4, CH6, CH8, CH10. | |
| constexpr uint16_t | kOddChannels = 0x0AAA |
| CH1, CH3, CH5, CH7, CH9, CH11. | |
| constexpr uint16_t | kFirstFour = 0x000F |
| CH0–CH3. | |
| constexpr uint16_t | kSecondFour = 0x00F0 |
| CH4–CH7. | |
| constexpr uint16_t | kThirdFour = 0x0F00 |
| CH8–CH11. | |
|
inlineconstexpr |
CH0–CH11 (all 12)
Definition at line 242 of file ads7952_types.hpp.
|
inlineconstexpr |
CH0, CH2, CH4, CH6, CH8, CH10.
Definition at line 243 of file ads7952_types.hpp.
|
inlineconstexpr |
CH0–CH3.
Definition at line 245 of file ads7952_types.hpp.
|
inlineconstexpr |
CH1, CH3, CH5, CH7, CH9, CH11.
Definition at line 244 of file ads7952_types.hpp.
|
inlineconstexpr |
CH4–CH7.
Definition at line 246 of file ads7952_types.hpp.
|
inlineconstexpr |
CH8–CH11.
Definition at line 247 of file ads7952_types.hpp.