#[repr(C)]pub struct PamojaAds1115Config {
pub start_conversion: u8,
pub mux: u8,
pub pga: u8,
pub single_shot: u8,
pub data_rate: u8,
pub window_comparator: u8,
pub comparator_active_high: u8,
pub comparator_latching: u8,
pub comparator_queue: u8,
}Expand description
An ADS1115 configuration register, field by field.
The multi-way settings carry the code the datasheet prints; the single-bit settings are named for the state that bit selects, so there is no code to look up for a flag.
Fields§
§start_conversion: u81 starts a single conversion when written.
mux: u8The input multiplexer code, 0..=7.
pga: u8The gain code, 0..=7, which sets the full-scale range.
single_shot: u81 converts once per request and powers down, 0 converts continuously.
data_rate: u8The data rate code, 0..=7.
window_comparator: u81 selects the window comparator, 0 the traditional one.
comparator_active_high: u81 makes the ALERT/RDY pin active high.
comparator_latching: u81 latches the comparator until the conversion is read.
comparator_queue: u8The comparator queue code, 0..=3, where 3 disables the comparator.
Trait Implementations§
Source§impl Clone for PamojaAds1115Config
impl Clone for PamojaAds1115Config
Source§fn clone(&self) -> PamojaAds1115Config
fn clone(&self) -> PamojaAds1115Config
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PamojaAds1115Config
Source§impl Debug for PamojaAds1115Config
impl Debug for PamojaAds1115Config
impl Eq for PamojaAds1115Config
Source§impl From<Config> for PamojaAds1115Config
impl From<Config> for PamojaAds1115Config
Source§impl From<PamojaAds1115Config> for Config
impl From<PamojaAds1115Config> for Config
Source§fn from(value: PamojaAds1115Config) -> Self
fn from(value: PamojaAds1115Config) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PamojaAds1115Config
impl PartialEq for PamojaAds1115Config
Source§fn eq(&self, other: &PamojaAds1115Config) -> bool
fn eq(&self, other: &PamojaAds1115Config) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PamojaAds1115Config
Auto Trait Implementations§
impl Freeze for PamojaAds1115Config
impl RefUnwindSafe for PamojaAds1115Config
impl Send for PamojaAds1115Config
impl Sync for PamojaAds1115Config
impl Unpin for PamojaAds1115Config
impl UnsafeUnpin for PamojaAds1115Config
impl UnwindSafe for PamojaAds1115Config
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