pub struct Comparator<'a> { /* private fields */ }
Implementations§
Source§impl Comparator<'_>
impl Comparator<'_>
pub const fn new() -> Self
Sourcepub fn handle_interrupt(&self)
pub fn handle_interrupt(&self)
Handles upward crossing events (when VIN+ becomes greater than VIN-)
Trait Implementations§
Source§impl<'a> AnalogComparator<'a> for Comparator<'a>
impl<'a> AnalogComparator<'a> for Comparator<'a>
Source§fn start_comparing(&self, _: &Self::Channel) -> Result<(), ErrorCode>
fn start_comparing(&self, _: &Self::Channel) -> Result<(), ErrorCode>
Starts comparison on only channel This enables comparator and interrupts
Source§fn stop_comparing(&self, _: &Self::Channel) -> Result<(), ErrorCode>
fn stop_comparing(&self, _: &Self::Channel) -> Result<(), ErrorCode>
Stops comparing and disables comparator
Source§fn comparison(&self, _: &Self::Channel) -> bool
fn comparison(&self, _: &Self::Channel) -> bool
Performs a single comparison between VIN+ and VIN- Returns true if vin+ > vin- Enables comparator if not enabled, to disable call stop comparing
fn set_client(&self, client: &'a dyn Client)
Auto Trait Implementations§
impl<'a> !Freeze for Comparator<'a>
impl<'a> !RefUnwindSafe for Comparator<'a>
impl<'a> !Send for Comparator<'a>
impl<'a> !Sync for Comparator<'a>
impl<'a> Unpin for Comparator<'a>
impl<'a> !UnwindSafe for Comparator<'a>
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