ADS7952 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
ads7952_types.hpp
Go to the documentation of this file.
1
12#ifndef ADS7952_TYPES_HPP
13#define ADS7952_TYPES_HPP
14
15#include <array>
16#include <cstddef>
17#include <cstdint>
18
19#include "ads7952_detail.hpp"
20#include "ads7952_registers.hpp"
21#include "ads7952_version.h"
22
24namespace ads7952 {
25
38enum class [[nodiscard]] Error : uint8_t {
39 // Base set: the same names and values in every driver of the org (standards/driver.md).
40 Ok = 0,
41 NotInitialized = 1,
42 InvalidArgument = 2,
43 Bus = 3,
44 Timeout = 4,
48 Crc = 6,
49 Busy = 7,
50 DeviceFault = 8,
51 Unsupported = 9,
53 // Chip-specific values start at 16; each one is returned by some call (tests/test_errors.cpp).
54 NoDevice = 16,
56 ChannelMismatch = 17,
59 SequenceMismatch = 18,
62 WriteMismatch = 19,
65 RangeMismatch = 20,
69 ScaleMismatch = 21,
72 DeviceReset = 22,
78};
79
85[[nodiscard]] constexpr const char* ToString(Error error) noexcept {
86 // One case per enumerator, so -Wswitch-enum names a new one that has no name here (KB-CPP-053);
87 // `default` keeps the fallback below for a value that is not an enumerator (Rule 9.4.2).
88 switch (error) {
89 case Error::Ok:
90 return "Ok";
92 return "NotInitialized";
94 return "InvalidArgument";
95 case Error::Bus:
96 return "Bus";
97 case Error::Timeout:
98 return "Timeout";
100 return "DeviceIdMismatch";
101 case Error::Crc:
102 return "Crc";
103 case Error::Busy:
104 return "Busy";
106 return "DeviceFault";
108 return "Unsupported";
109 case Error::NoDevice:
110 return "NoDevice";
112 return "ChannelMismatch";
114 return "SequenceMismatch";
116 return "WriteMismatch";
118 return "RangeMismatch";
120 return "ScaleMismatch";
122 return "DeviceReset";
123 default:
124 break;
125 }
126 return "Unknown";
127}
128
136template <typename T>
137struct [[nodiscard]] Result {
138 T value{};
139 Error error{Error::Ok};
140
142 [[nodiscard]] constexpr bool ok() const noexcept {
143 return error == Error::Ok;
144 }
146 constexpr explicit operator bool() const noexcept {
147 return ok();
148 }
149
155 static constexpr Result Success(T v) noexcept {
156 return {v, Error::Ok};
157 }
163 static constexpr Result Failure(Error e) noexcept {
164 return {T{}, e};
165 }
166};
167
169template <>
170struct [[nodiscard]] Result<void> {
171 Error error{Error::Ok};
172
174 [[nodiscard]] constexpr bool ok() const noexcept {
175 return error == Error::Ok;
176 }
178 constexpr explicit operator bool() const noexcept {
179 return ok();
180 }
181
183 static constexpr Result Success() noexcept {
184 return {Error::Ok};
185 }
191 static constexpr Result Failure(Error e) noexcept {
192 return {e};
193 }
194};
195
197enum class LogLevel : uint8_t {
198 Error = 0,
199 Warning,
200 Info,
201 Debug,
202};
203
212enum class Variant : uint8_t {
213 Ads7950 = 0,
214 Ads7951 = 1,
215 Ads7952 = 2,
216 Ads7953 = 3,
217};
218
220enum class Package : uint8_t {
221 Tssop = 0,
222 Vqfn = 1,
224};
225
227enum class Range : uint8_t {
228 Vref = 0,
229 TwoVref = 1,
230};
231
232namespace detail {
234template <>
235struct EnumLast<Variant> {
236 static constexpr Variant kValue = Variant::Ads7953;
237};
239template <>
240struct EnumLast<Package> {
241 static constexpr Package kValue = Package::Vqfn;
242};
244template <>
245struct EnumLast<Range> {
246 static constexpr Range kValue = Range::TwoVref;
247};
248} // namespace detail
249
256enum class Verify : uint8_t {
257 None = 0,
258 ReadBack = 1,
259};
260
265enum class AlarmOutput : uint8_t {
266 None = 0,
267 Gpio0HighOrLow = 1,
268 Gpio0High = 2,
269 Gpio1Low = 4,
271};
272
287
294 uint16_t low_code{0};
295 uint16_t high_code{4095};
296};
297
299inline constexpr std::size_t kMaxChannels = 16;
301inline constexpr uint16_t kMaxCode = 4095;
303inline constexpr uint32_t kCodesPerFullScale = 4096;
306inline constexpr uint32_t kPowerUpUs = 1;
308inline constexpr std::size_t kMaxTraceFrames = 32;
310inline constexpr std::size_t kFrameBytes = 2;
311
317[[nodiscard]] constexpr uint8_t ChannelCount(Variant variant) noexcept {
318 switch (variant) {
319 case Variant::Ads7950:
320 return 4;
321 case Variant::Ads7951:
322 return 8;
323 case Variant::Ads7952:
324 return 12;
325 case Variant::Ads7953:
326 return 16;
327 default:
328 break;
329 }
330 return 0;
331}
332
339[[nodiscard]] constexpr uint16_t AllChannels(Variant variant) noexcept {
340 // ChannelCount() is 0, 4, 8, 12 or 16: the shift stays below the width of uint32_t.
341 return static_cast<uint16_t>((uint32_t{1} << ChannelCount(variant)) - 1U);
342}
343
344static_assert(kMaxChannels <= 16U, "channel masks are 16 bits");
345static_assert((AllChannels(Variant::Ads7950) == 0x000FU) &&
346 (AllChannels(Variant::Ads7953) == 0xFFFFU));
347
354struct Bank {
355 std::array<uint16_t, kMaxChannels> code{};
356 uint16_t mask{0};
360
365 [[nodiscard]] constexpr bool Has(uint8_t channel) const noexcept {
366 return (channel < kMaxChannels) && (((static_cast<uint32_t>(mask) >> channel) & 1U) != 0U);
367 }
368};
369
371inline constexpr uint8_t kNoMonitor = 0xFF;
372
374inline constexpr uint8_t kNoPark = 0xFF;
375
388 uint32_t expected_uv{0};
389 uint32_t tolerance_uv{0};
391};
392
402struct Config {
412 uint16_t vref_mv{2500};
416 uint16_t va_min_mv{5000};
419 uint16_t auto1_channels{0x0FFF};
424 std::array<AlarmThreshold, kMaxChannels> alarms{};
435};
436
437namespace detail {
438
440[[nodiscard]] constexpr uint32_t FullScaleUv(Range range, uint16_t vref_mv) noexcept {
441 return static_cast<uint32_t>(vref_mv) * ((range == Range::TwoVref) ? 2000U : 1000U);
442}
443
445[[nodiscard]] constexpr uint32_t CodeOfInput(uint32_t input_uv, uint32_t full_scale_uv) noexcept {
446 const uint64_t code = (static_cast<uint64_t>(input_uv) * 4096U) / full_scale_uv;
447 return (code > 4095U) ? 4095U : static_cast<uint32_t>(code);
448}
449
451struct MonitorWindow {
452 uint32_t expected;
453 uint32_t other;
454 uint32_t margin;
455};
456
457[[nodiscard]] constexpr MonitorWindow WindowOf(const Config& config) noexcept {
458 const Range other = (config.range == Range::TwoVref) ? Range::Vref : Range::TwoVref;
459 const uint32_t fs = FullScaleUv(config.range, config.vref_mv);
460 const uint64_t margin =
461 ((static_cast<uint64_t>(config.monitor.tolerance_uv) * 4096U) + fs - 1U) / fs;
462 return {.expected = CodeOfInput(config.monitor.expected_uv, fs),
463 .other = CodeOfInput(config.monitor.expected_uv, FullScaleUv(other, config.vref_mv)),
464 .margin = (margin > 4096U) ? 4096U : static_cast<uint32_t>(margin)};
465}
466
467[[nodiscard]] constexpr bool Within(uint32_t code, uint32_t centre, uint32_t margin) noexcept {
468 return ((code + margin) >= centre) && (code <= (centre + margin));
469}
470
471} // namespace detail
472
480[[nodiscard]] constexpr Error ValidateMonitor(const Config& config) noexcept {
481 const ScaleMonitor& m = config.monitor;
482 if (m.channel == kNoMonitor) {
483 return Error::Ok;
484 }
485 if ((m.channel >= ChannelCount(config.variant)) || (m.tolerance_uv == 0U)) {
487 }
488 const detail::MonitorWindow w = detail::WindowOf(config);
489 if ((w.expected <= w.margin) || ((w.expected + w.margin) >= kMaxCode)) {
491 }
492 const uint32_t gap = (w.expected > w.other) ? (w.expected - w.other) : (w.other - w.expected);
493 return (gap > (2U * w.margin)) ? Error::Ok : Error::InvalidArgument;
494}
495
504[[nodiscard]] constexpr Error CheckScaleCode(const Config& config, uint16_t code) noexcept {
505 if ((config.monitor.channel == kNoMonitor) || (ValidateMonitor(config) != Error::Ok)) {
507 }
508 const detail::MonitorWindow w = detail::WindowOf(config);
509 const uint32_t c = static_cast<uint32_t>(code) & kMaxCode;
510 if (detail::Within(c, w.expected, w.margin)) {
511 return Error::Ok;
512 }
513 return detail::Within(c, w.other, w.margin) ? Error::RangeMismatch : Error::ScaleMismatch;
514}
515
521[[nodiscard]] constexpr Error ValidateGpio(const Config& config) noexcept {
522 const GpioConfig& g = config.gpio;
523 const auto alarm = static_cast<uint32_t>(detail::ToUnderlying(g.alarm_output));
524 const uint32_t outputs = g.output_mask;
525 const uint32_t levels = g.output_levels;
526 if ((alarm > 6U) || (alarm == 3U) || (alarm == 5U) || (outputs > 0x0FU) ||
527 ((levels & ~outputs) != 0U)) {
529 }
530 // A pin with a function ignores its direction bit (Table 11 note): it cannot be an output. The
531 // bits collect in uint32_t, so no compound assignment narrows (KB-CPP20-022).
532 uint32_t function_pins = 0U;
533 function_pins |= ((alarm & 0x03U) != 0U) ? 0x01U : 0x00U; // GPIO0: any code with bit 0 or bit 1
534 function_pins |= ((alarm & 0x04U) != 0U) ? 0x02U : 0x00U; // GPIO1: codes 100 and 110
535 function_pins |= g.gpio2_range_input ? 0x04U : 0x00U;
536 function_pins |= g.gpio3_power_down_input ? 0x08U : 0x00U;
537 if ((function_pins & outputs) != 0U) {
539 }
540 if ((config.package == Package::Vqfn) && (((function_pins | outputs) & 0x0EU) != 0U)) {
541 return Error::Unsupported;
542 }
543 return Error::Ok;
544}
545
552[[nodiscard]] constexpr Error ValidateAlarms(const Config& config) noexcept {
553 const uint8_t channels = ChannelCount(config.variant);
554 for (std::size_t ch = 0; ch < kMaxChannels; ++ch) {
555 const AlarmThreshold& a = config.alarms[ch];
556 const bool reset = (a.low_code < 4U) && (a.high_code >= 4092U);
557 if ((a.low_code > kMaxCode) || (a.high_code > kMaxCode) || ((ch >= channels) && !reset)) {
559 }
560 }
561 return Error::Ok;
562}
563
570[[nodiscard]] constexpr bool ValidSupplies(const Config& config) noexcept {
571 if ((config.vref_mv < 2000U) || (config.vref_mv > 3000U) || (config.va_min_mv < 2700U) ||
572 (config.va_min_mv > 5250U)) {
573 return false;
574 }
575 return (config.range != Range::TwoVref) ||
576 ((2U * static_cast<uint32_t>(config.vref_mv)) <= static_cast<uint32_t>(config.va_min_mv));
577}
578
584[[nodiscard]] constexpr bool ValidPark(const Config& config) noexcept {
585 return (config.park_channel == kNoPark) ||
586 ((config.park_channel != 0U) && (config.park_channel < ChannelCount(config.variant)));
587}
588
598[[nodiscard]] constexpr Error Validate(const Config& config) noexcept {
599 const uint8_t channels = ChannelCount(config.variant);
600 if (!detail::IsEnumerator(config.variant) || !detail::IsEnumerator(config.package) ||
601 !detail::IsEnumerator(config.range)) {
603 }
604 if (!ValidSupplies(config)) {
606 }
607 const auto all = static_cast<uint32_t>(AllChannels(config.variant));
608 if ((config.auto1_channels == 0U) ||
609 ((static_cast<uint32_t>(config.auto1_channels) & ~all) != 0U) ||
610 (config.auto2_last_channel >= channels)) {
612 }
613 if ((ValidateAlarms(config) != Error::Ok) || (ValidateMonitor(config) != Error::Ok)) {
615 }
616 if (!ValidPark(config)) {
618 }
619 return ValidateGpio(config);
620}
621
628[[nodiscard]] constexpr Config ResetConfig(Variant variant) noexcept {
629 Config c{};
630 c.variant = variant;
631 c.auto1_channels = AllChannels(variant);
632 const auto channels = static_cast<uint32_t>(ChannelCount(variant));
633 c.auto2_last_channel = static_cast<uint8_t>((channels > 0U) ? (channels - 1U) : 0U);
634 return c;
635}
636
637// The reset configuration of each part is valid, and `Config{}` is the ADS7952's (section 8.4.3).
638static_assert(Validate(Config{}) == Error::Ok);
639static_assert((Validate(ResetConfig(Variant::Ads7950)) == Error::Ok) &&
642static_assert((ResetConfig(Variant::Ads7952).auto1_channels == Config{}.auto1_channels) &&
643 (ResetConfig(Variant::Ads7952).auto2_last_channel == Config{}.auto2_last_channel));
644
653[[nodiscard]] constexpr uint32_t CodeToMicrovolts(uint16_t code, Range range,
654 uint16_t vref_mv) noexcept {
655 const uint32_t full_scale_uv = detail::FullScaleUv(range, vref_mv);
656 return static_cast<uint32_t>(
657 (static_cast<uint64_t>(static_cast<uint32_t>(code) & kMaxCode) * full_scale_uv) /
659}
660
661// Table 8: code 4095 is full scale less one LSB; one LSB of Range 1 at 2.5 V is 610 uV.
662using detail::operator""_u16;
663static_assert(CodeToMicrovolts(4095_u16, Range::Vref, 2500_u16) == 2499389U);
664static_assert((CodeToMicrovolts(1_u16, Range::Vref, 2500_u16) == 610U) &&
665 (CodeToMicrovolts(1_u16, Range::TwoVref, 2500_u16) == 1220U));
666
668constexpr const char* GetDriverVersion() noexcept {
669 return ADS7952_VERSION_STRING;
670}
672constexpr uint32_t GetDriverVersionMajor() noexcept {
673 return ADS7952_VERSION_MAJOR;
674}
676constexpr uint32_t GetDriverVersionMinor() noexcept {
677 return ADS7952_VERSION_MINOR;
678}
680constexpr uint32_t GetDriverVersionPatch() noexcept {
681 return ADS7952_VERSION_PATCH;
682}
683
686} // namespace ads7952
687
688#endif // ADS7952_TYPES_HPP
Compile-time helpers of the ADS7952 driver: exact hook matching and enumeration checks.
ADS795x command and reply words: the bit fields of every frame (datasheet SLAS605C,...
constexpr uint32_t kCodesPerFullScale
Codes per full scale: one LSB is full scale / 4096 (Table 8).
Definition ads7952_types.hpp:303
constexpr uint32_t GetDriverVersionMajor() noexcept
Definition ads7952_types.hpp:672
constexpr uint8_t kNoPark
Config::park_channel when the chip stays on channel 0 after a read of it: no parking.
Definition ads7952_types.hpp:374
constexpr std::size_t kFrameBytes
Bytes per transfer: every frame is 16 bits with CS low throughout (section 8.1).
Definition ads7952_types.hpp:310
constexpr uint8_t ChannelCount(Variant variant) noexcept
Number of analog inputs of a variant.
Definition ads7952_types.hpp:317
constexpr uint32_t CodeToMicrovolts(uint16_t code, Range range, uint16_t vref_mv) noexcept
Convert a result code to the input voltage it stands for (Table 8: one LSB is full scale / 4096,...
Definition ads7952_types.hpp:653
constexpr uint8_t kNoMonitor
ScaleMonitor::channel when no channel carries a known voltage: no scale check.
Definition ads7952_types.hpp:371
constexpr bool ValidSupplies(const Config &config) noexcept
Check the reference and the analog supply (section 7.3), and Range 2 against them (2 x VREF <= +VA,...
Definition ads7952_types.hpp:570
constexpr Error Validate(const Config &config) noexcept
Check a configuration without touching the chip.
Definition ads7952_types.hpp:598
Range
Input range, DI06 of the mode control word (Tables 1, 2, 5; Table 8).
Definition ads7952_types.hpp:227
Variant
Which 12-bit member of the family is fitted. The chip cannot tell, so it is configured.
Definition ads7952_types.hpp:212
constexpr std::size_t kMaxChannels
Channels of the largest part (ADS7953); arrays indexed by channel have this size.
Definition ads7952_types.hpp:299
constexpr uint32_t GetDriverVersionPatch() noexcept
Definition ads7952_types.hpp:680
constexpr uint32_t kPowerUpUs
Definition ads7952_types.hpp:306
constexpr bool ValidPark(const Config &config) noexcept
Check Config::park_channel against the variant.
Definition ads7952_types.hpp:584
constexpr const char * GetDriverVersion() noexcept
Definition ads7952_types.hpp:668
constexpr uint32_t GetDriverVersionMinor() noexcept
Definition ads7952_types.hpp:676
constexpr uint16_t AllChannels(Variant variant) noexcept
The mask of every channel of a variant: also the reset value of its Auto-1 program register (section ...
Definition ads7952_types.hpp:339
Package
The package: the VQFN parts bring out GPIO0 only (section 8.5.2).
Definition ads7952_types.hpp:220
constexpr std::size_t kMaxTraceFrames
Longest TraceFrames() request, in frames.
Definition ads7952_types.hpp:308
constexpr Error CheckScaleCode(const Config &config, uint16_t code) noexcept
Judge one code of the scale monitor's channel. No I/O.
Definition ads7952_types.hpp:504
constexpr uint16_t kMaxCode
Largest result code: 12 bits, straight binary (Table 8).
Definition ads7952_types.hpp:301
Error
Why a call failed. Every call of the driver returns one of these in its Result.
Definition ads7952_types.hpp:38
constexpr const char * ToString(Error error) noexcept
The name of an error, for logs.
Definition ads7952_types.hpp:85
LogLevel
Severity passed to the optional Log() hook.
Definition ads7952_types.hpp:197
constexpr Error ValidateMonitor(const Config &config) noexcept
Check the scale monitor of a configuration.
Definition ads7952_types.hpp:480
constexpr Config ResetConfig(Variant variant) noexcept
The Config of a variant left in its reset state: Config{} with that variant's Auto-1 mask and Auto-2 ...
Definition ads7952_types.hpp:628
constexpr Error ValidateGpio(const Config &config) noexcept
Check the GPIO settings of a configuration against its package.
Definition ads7952_types.hpp:521
constexpr Error ValidateAlarms(const Config &config) noexcept
Check the alarm thresholds of a configuration against its variant.
Definition ads7952_types.hpp:552
Verify
Extra verification for one call, chosen per call (handbook KB-ARCH-041).
Definition ads7952_types.hpp:256
AlarmOutput
What GPIO0 and GPIO1 do besides general-purpose I/O: DI06:04 of the GPIO program register (Table 11)....
Definition ads7952_types.hpp:265
@ Vref
0 to VREF (Range 1). The reset value.
@ TwoVref
0 to 2 x VREF (Range 2); specified only while 2 x VREF <= +VA (section 7.6).
@ Ads7953
16 channels.
@ Ads7952
12 channels. The default.
@ Ads7951
8 channels.
@ Ads7950
4 channels.
@ Tssop
TSSOP (DBT): GPIO0 to GPIO3. The default.
@ InvalidArgument
An argument or a Config field is out of range; nothing was sent.
@ Crc
Not returned by this driver (the chip sends no CRC).
@ Bus
The port's Transfer() (or EnsureInitialized()) returned false.
@ DeviceFault
Not returned by this driver (the chip reports no faults).
@ NotInitialized
EnsureInitialized() has not succeeded, or Deinitialize() ran since.
@ Ok
The call succeeded.
@ Timeout
Not returned by this driver: no call waits for the chip.
@ Busy
Not returned by this driver (the chip is never busy to a frame).
@ Warning
Something unexpected that the driver recovered from.
@ Info
Lifecycle events: initialised.
@ Debug
Detail for bring-up.
@ None
No extra frame. The default.
@ ReadBack
Read back what the chip took (GPIO levels, the scanned sequence).
@ Gpio0HighOrLow
xx1: GPIO0 is the "high or low" alarm output.
@ Gpio0High
010: GPIO0 is the high alarm output.
@ None
000: GPIO0 and GPIO1 are general-purpose I/O. The reset value.
@ Gpio1LowGpio0High
110: GPIO1 the low and GPIO0 the high alarm output (TSSOP only).
@ Gpio1Low
100: GPIO1 is the low alarm output (TSSOP only).
The ADS7952 driver: everything it declares lives here; internals in detail.
Definition ads7952.hpp:30
The two alarm thresholds of one channel, in 12-bit result codes. The chip keeps the upper 10 bits and...
Definition ads7952_types.hpp:293
uint16_t high_code
High alarm when the result is above this; 0 to 4095.
Definition ads7952_types.hpp:295
uint16_t low_code
Low alarm when the result is below this; 0 to 4095.
Definition ads7952_types.hpp:294
The result of one Auto-1 or Auto-2 scan: one code per channel of the sequence.
Definition ads7952_types.hpp:354
constexpr bool Has(uint8_t channel) const noexcept
Definition ads7952_types.hpp:365
std::array< uint16_t, kMaxChannels > code
Result of channel n at index n, 0 to 4095.
Definition ads7952_types.hpp:355
Range range
Definition ads7952_types.hpp:359
uint16_t mask
Definition ads7952_types.hpp:356
What the driver is told about the chip and the board. Config{} is an ADS7952 in TSSOP left in its res...
Definition ads7952_types.hpp:402
uint16_t va_min_mv
Definition ads7952_types.hpp:416
std::array< AlarmThreshold, kMaxChannels > alarms
Definition ads7952_types.hpp:424
ScaleMonitor monitor
Definition ads7952_types.hpp:427
uint16_t vref_mv
Definition ads7952_types.hpp:412
Package package
Definition ads7952_types.hpp:404
Variant variant
The fitted part; every channel is checked against it.
Definition ads7952_types.hpp:403
uint8_t park_channel
Definition ads7952_types.hpp:434
GpioConfig gpio
GPIO program register and output levels.
Definition ads7952_types.hpp:423
uint8_t auto2_last_channel
Definition ads7952_types.hpp:422
uint16_t auto1_channels
Definition ads7952_types.hpp:419
Range range
Definition ads7952_types.hpp:408
The GPIO program register and the GPIO output levels. GpioConfig{} is the reset state: every pin an i...
Definition ads7952_types.hpp:280
uint8_t output_mask
Bit n = 1: GPIOn is a general-purpose output (DI03:00).
Definition ads7952_types.hpp:281
uint8_t output_levels
Levels of the output pins, bit n for GPIOn; only output pins.
Definition ads7952_types.hpp:282
bool gpio2_range_input
GPIO2 selects the range (DI07); DI06 is then ignored.
Definition ads7952_types.hpp:284
bool gpio3_power_down_input
GPIO3 is the active-low power-down input (DI08).
Definition ads7952_types.hpp:285
AlarmOutput alarm_output
GPIO0/GPIO1 alarm functions (DI06:04).
Definition ads7952_types.hpp:283
static constexpr Result Failure(Error e) noexcept
A failed result.
Definition ads7952_types.hpp:191
static constexpr Result Success() noexcept
Definition ads7952_types.hpp:183
constexpr bool ok() const noexcept
Definition ads7952_types.hpp:174
The value of a call, or why there is none.
Definition ads7952_types.hpp:137
static constexpr Result Failure(Error e) noexcept
A failed result.
Definition ads7952_types.hpp:163
static constexpr Result Success(T v) noexcept
A successful result.
Definition ads7952_types.hpp:155
constexpr bool ok() const noexcept
Definition ads7952_types.hpp:142
A channel the board drives with a known voltage, so the driver can prove the scale every code is conv...
Definition ads7952_types.hpp:386
uint32_t expected_uv
Its nominal input, in microvolts; strictly inside the range.
Definition ads7952_types.hpp:388
uint8_t channel
The channel, or kNoMonitor.
Definition ads7952_types.hpp:387
uint32_t tolerance_uv
Definition ads7952_types.hpp:389