|
ADS7952 Driver
API reference
|
Lightweight utility functions for engineering-unit conversion. More...
Functions | |
| constexpr uint16_t | ads7952::VoltageToCount (float voltage, float vref) noexcept |
| Convert a voltage to a 12-bit ADC count. | |
Lightweight utility functions for engineering-unit conversion.
|
constexprnoexcept |
Convert a voltage to a 12-bit ADC count.
Useful for computing alarm thresholds from engineering units. The result is clamped to 0–4095.
| voltage | Target voltage in volts |
| vref | Reference voltage in volts |
Definition at line 284 of file ads7952_types.hpp.
Referenced by ads7952::ADS7952< SpiType >::ProgramAlarmVoltage().