pub enum DeviceType {
AD7124_4,
AD7124_8,
Unknown,
}Expand description
Supported device variants in the AD7124 family
Variants§
AD7124_4
AD7124-4: 4-channel, 24-bit ADC
AD7124_8
AD7124-8: 8-channel, 24-bit ADC
Unknown
Unknown or unsupported device
Implementations§
Source§impl DeviceType
impl DeviceType
Sourcepub fn from_device_id(device_id: u8) -> Self
pub fn from_device_id(device_id: u8) -> Self
Get device type from device ID register
Sourcepub fn supports_feature(self, feature: DeviceFeature) -> bool
pub fn supports_feature(self, feature: DeviceFeature) -> bool
Check if device supports specific feature
Sourcepub fn max_channels(self) -> u8
pub fn max_channels(self) -> u8
Get maximum number of channels for this device
Sourcepub fn max_spi_frequency_hz(self) -> u32
pub fn max_spi_frequency_hz(self) -> u32
Get maximum SPI frequency for this device
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Get device description string
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceType
impl Debug for DeviceType
Source§impl PartialEq for DeviceType
impl PartialEq for DeviceType
impl Copy for DeviceType
impl Eq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnwindSafe for DeviceType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more