|
HF-ADS7952 Driver 0.1.0-dev
HF-ADS7952 C++ Driver
|
#include <ads7952_types.hpp>
Public Member Functions | |
| bool | ok () const noexcept |
| True when error equals Error::Ok. | |
| bool | hasChannel (uint8_t ch) const noexcept |
| Check if a specific channel has valid data in this reading. | |
| uint8_t | validChannelCount () const noexcept |
| Count channels currently marked valid. | |
Public Attributes | |
| uint16_t | count [MAX_CHANNELS] = {} |
| Raw counts per channel. | |
| float | voltage [MAX_CHANNELS] = {} |
| Converted voltages per channel. | |
| uint16_t | valid_mask = 0 |
| Bitmask indicating which channels contain valid data. | |
| Error | error = Error::Ok |
Static Public Attributes | |
| static constexpr uint8_t | MAX_CHANNELS = 12 |
Definition at line 148 of file ads7952_types.hpp.
|
inlinenoexcept |
Check if a specific channel has valid data in this reading.
Definition at line 175 of file ads7952_types.hpp.
References MAX_CHANNELS, and valid_mask.
|
inlinenoexcept |
True when error equals Error::Ok.
Definition at line 172 of file ads7952_types.hpp.
References error, and ads7952::Ok.
|
inlinenoexcept |
Count channels currently marked valid.
Definition at line 183 of file ads7952_types.hpp.
References valid_mask.
| uint16_t ads7952::ChannelReadings::count[MAX_CHANNELS] = {} |
Raw counts per channel.
Definition at line 151 of file ads7952_types.hpp.
Definition at line 169 of file ads7952_types.hpp.
Referenced by ok(), and ads7952::ADS7952< SpiType >::ReadAllChannels().
|
staticconstexpr |
Definition at line 149 of file ads7952_types.hpp.
Referenced by hasChannel(), and ads7952::ADS7952< SpiType >::ReadAllChannels().
| uint16_t ads7952::ChannelReadings::valid_mask = 0 |
Bitmask indicating which channels contain valid data.
Bit ordering: bit N corresponds to channel N (bit 0 = CH0, bit 11 = CH11). Only bits [11:0] are meaningful; upper bits are always 0.
Use hasChannel(ch) for single-channel checks, or inspect the mask directly for bulk operations:
Definition at line 167 of file ads7952_types.hpp.
Referenced by hasChannel(), and validChannelCount().
| float ads7952::ChannelReadings::voltage[MAX_CHANNELS] = {} |
Converted voltages per channel.
Definition at line 152 of file ads7952_types.hpp.