pub struct DeviceCapabilities {Show 13 fields
pub device_type: DeviceType,
pub max_channels: u8,
pub max_spi_frequency_hz: u32,
pub internal_reference: bool,
pub programmable_gain: bool,
pub self_test: bool,
pub low_power_mode: bool,
pub high_precision: bool,
pub diagnostic_mode: bool,
pub burnout_current: bool,
pub continuous_mode: bool,
pub single_shot_mode: bool,
pub digital_filtering: bool,
}Expand description
Device capabilities structure (runtime capability detection)
Fields§
§device_type: DeviceTypeThe specific device type (AD7124-4, AD7124-8, etc.)
max_channels: u8Maximum number of analog input channels supported
max_spi_frequency_hz: u32Maximum SPI clock frequency supported in Hz
internal_reference: boolWhether device has built-in voltage reference
programmable_gain: boolWhether device supports programmable gain amplification
self_test: boolWhether device supports built-in self-test functionality
low_power_mode: boolWhether device supports low-power operation modes
high_precision: boolWhether device provides high-precision (24-bit) measurements
diagnostic_mode: boolWhether device supports diagnostic and status monitoring
burnout_current: boolWhether device supports burnout current sources for sensor diagnostics
continuous_mode: boolWhether device supports continuous conversion mode
single_shot_mode: boolWhether device supports single-shot conversion mode
digital_filtering: boolWhether device supports digital filtering options
Implementations§
Source§impl DeviceCapabilities
impl DeviceCapabilities
Sourcepub fn for_device(device_type: DeviceType) -> Self
pub fn for_device(device_type: DeviceType) -> Self
Create capabilities for detected device type
Sourcepub fn supports(&self, feature: DeviceFeature) -> bool
pub fn supports(&self, feature: DeviceFeature) -> bool
Check if device supports a specific feature
Sourcepub fn validate_channel(&self, channel: u8) -> bool
pub fn validate_channel(&self, channel: u8) -> bool
Validate channel number against device capabilities
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more