|
| | ADS7952 (SpiType &spi, float vref=ADS7952_CFG::DEFAULT_VREF, float va=ADS7952_CFG::DEFAULT_VA, Range initial_range=ADS7952_CFG::DEFAULT_RANGE) noexcept |
| | Construct a new ADS7952 driver instance.
|
| |
| | ADS7952 (const ADS7952 &)=delete |
| |
| ADS7952 & | operator= (const ADS7952 &)=delete |
| |
| bool | EnsureInitialized (bool force=false) noexcept |
| | Ensure the driver is initialized — idempotent, safe to call repeatedly.
|
| |
| bool | IsInitialized () const noexcept |
| | Check if the driver has been initialized.
|
| |
| ReadResult | ReadChannel (uint8_t channel) noexcept |
| | Read a single ADC channel (switches to Manual mode).
|
| |
| ChannelReadings | ReadAllChannels () noexcept |
| | Read all channels in the current Auto-1 sequence.
|
| |
| float | CountToVoltage (uint16_t count) const noexcept |
| | Convert raw count to voltage using the currently active reference.
|
| |
| uint16_t | VoltageToCount (float voltage) const noexcept |
| | Convert a voltage to a 12-bit ADC count using the active reference.
|
| |
| bool | EnterManualMode (uint8_t channel=0) noexcept |
| | Enter Manual mode, selecting the given channel for conversion.
|
| |
| bool | EnterAuto1Mode (bool reset_counter=true) noexcept |
| | Enter Auto-1 mode (sequences through programmed channel mask).
|
| |
| bool | EnterAuto2Mode (bool reset_counter=true) noexcept |
| | Enter Auto-2 mode (sequences channels 0 through last_channel).
|
| |
| Mode | GetMode () const noexcept |
| | Get the current operating mode.
|
| |
| bool | ProgramAuto1Channels (uint16_t channel_mask) noexcept |
| | Program the Auto-1 channel sequence.
|
| |
| bool | ProgramAuto2LastChannel (uint8_t last_channel) noexcept |
| | Program the Auto-2 last channel.
|
| |
| bool | ProgramGPIO (const GPIOConfig &config) noexcept |
| | Program GPIO pin functions, direction, and alarm routing.
|
| |
| bool | ProgramAlarm (uint8_t channel, AlarmBound bound, uint16_t threshold_12bit) noexcept |
| | Program an alarm threshold for a single channel (count-based).
|
| |
| bool | ProgramAlarmVoltage (uint8_t channel, AlarmBound bound, float voltage) noexcept |
| | Program an alarm threshold for a single channel (voltage-based).
|
| |
| bool | SetRange (Range range) noexcept |
| | Set the input voltage range and update active reference.
|
| |
| Range | GetRange () const noexcept |
| | Get the current input range setting.
|
| |
| bool | SetPowerDown (PowerDown pd) noexcept |
| | Set the power-down mode.
|
| |
| void | SetGPIOOutputs (uint8_t gpio_state) noexcept |
| | Set GPIO output pin levels (for pins configured as outputs).
|
| |
| float | GetActiveVref () const noexcept |
| | Get the active voltage reference (affected by range setting).
|
| |
| float | GetVref () const noexcept |
| | Get the configured Vref (REFP pin voltage).
|
| |
| float | GetVA () const noexcept |
| | Get the configured VA supply voltage.
|
| |
| void | SetVref (float vref) noexcept |
| | Update the Vref value for voltage calculations.
|
| |
| void | SetVA (float va) noexcept |
| | Update the VA supply voltage value.
|
| |
| uint16_t | GetAuto1ChannelMask () const noexcept |
| | Get the Auto-1 programmed channel mask. Bit ordering: bit N = channel N (bit 0 = CH0, bit 11 = CH11).
|
| |
| uint8_t | GetAuto2LastChannel () const noexcept |
| | Get the Auto-2 programmed last channel.
|
| |
template<typename SpiType>
class ads7952::ADS7952< SpiType >
Main driver class for the ADS7952 ADC.
Provides a synchronous, command-oriented API over the ADS7952 SPI protocol. The class is transport-agnostic and relies on a CRTP SPI implementation.
- Template Parameters
-
| SpiType | Platform-specific SPI class derived from SpiInterface<SpiType> |
Definition at line 76 of file ads7952.hpp.