Struct nrf52832::acomp::Comparator
source · pub struct Comparator<'a> { /* private fields */ }
Implementations§
source§impl<'a> Comparator<'a>
impl<'a> Comparator<'a>
pub const fn new() -> Comparator<'a>
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,
_: &<Comparator<'a> as AnalogComparator<'a>>::Channel,
) -> Result<(), ErrorCode>
fn start_comparing( &self, _: &<Comparator<'a> as AnalogComparator<'a>>::Channel, ) -> Result<(), ErrorCode>
Starts comparison on only channel This enables comparator and interrupts
source§fn stop_comparing(
&self,
_: &<Comparator<'a> as AnalogComparator<'a>>::Channel,
) -> Result<(), ErrorCode>
fn stop_comparing( &self, _: &<Comparator<'a> as AnalogComparator<'a>>::Channel, ) -> Result<(), ErrorCode>
Stops comparing and disables comparator
source§fn comparison(
&self,
_: &<Comparator<'a> as AnalogComparator<'a>>::Channel,
) -> bool
fn comparison( &self, _: &<Comparator<'a> as AnalogComparator<'a>>::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