HF-ADS7952 Driver 0.1.0-dev
HF-ADS7952 C++ Driver
Loading...
Searching...
No Matches
Register and Frame Constants

SPI frame bitfields and parser helpers for ADS7952 command/response words. More...

Files

file  ads7952_registers.hpp
 Register definitions and SPI frame constants for the ADS7952.
 

Namespaces

namespace  ads7952::reg::Mode
 
namespace  ads7952::reg::GPIO
 
namespace  ads7952::reg::GPIOProg
 
namespace  ads7952::reg::Alarm
 
namespace  ads7952::reg::Response
 

Functions

constexpr uint16_t ads7952::reg::ChannelSelect (uint8_t ch) noexcept
 Encode manual-mode channel selection bits DI[10:7].
 
constexpr uint16_t ads7952::reg::Auto1ChannelBit (uint8_t ch) noexcept
 Build the Auto-1 enable bit for a channel.
 
constexpr uint16_t ads7952::reg::Auto2LastChannel (uint8_t ch) noexcept
 Encode Auto-2 last-channel field DI[9:6].
 

Detailed Description

SPI frame bitfields and parser helpers for ADS7952 command/response words.

Function Documentation

◆ Auto1ChannelBit()

constexpr uint16_t ads7952::reg::Auto1ChannelBit ( uint8_t ch)
inlineconstexprnoexcept

Build the Auto-1 enable bit for a channel.

Parameters
chChannel index.
Returns
Bit mask with the selected channel bit set.

Definition at line 110 of file ads7952_registers.hpp.

◆ Auto2LastChannel()

constexpr uint16_t ads7952::reg::Auto2LastChannel ( uint8_t ch)
inlineconstexprnoexcept

Encode Auto-2 last-channel field DI[9:6].

Parameters
chLast channel index.
Returns
Encoded last-channel field for AUTO_2_PROG command.

Definition at line 124 of file ads7952_registers.hpp.

Referenced by ads7952::ADS7952< SpiType >::ProgramAuto2LastChannel().

◆ ChannelSelect()

constexpr uint16_t ads7952::reg::ChannelSelect ( uint8_t ch)
inlineconstexprnoexcept

Encode manual-mode channel selection bits DI[10:7].

Parameters
chChannel index (only low 4 bits are encoded).
Returns
Encoded channel-select field for command frame composition.

Definition at line 66 of file ads7952_registers.hpp.

Referenced by ads7952::ADS7952< SpiType >::EnterManualMode(), and ads7952::ADS7952< SpiType >::ReadChannel().