pub struct Cmp<POS, INV> { /* private fields */ }Expand description
The comparator, configured and stopped.
Implementations§
Source§impl<POS: NonInvertingInput, INV: InvertingInput> Cmp<POS, INV>
impl<POS: NonInvertingInput, INV: InvertingInput> Cmp<POS, INV>
Sourcepub fn new(
rcu: &mut Rcu,
cmp: Cmp,
pos: POS,
inv: INV,
config: CmpConfig,
) -> Self
pub fn new( rcu: &mut Rcu, cmp: Cmp, pos: POS, inv: INV, config: CmpConfig, ) -> Self
Clocks the peripheral and applies config, leaving the comparator stopped.
Sourcepub fn release(self) -> (Cmp, POS, INV)
pub fn release(self) -> (Cmp, POS, INV)
Hands back the peripheral and both inputs. The clock stays on, since
CFGCMPEN also feeds SYSCFG.
Sourcepub fn enable(self) -> CmpRunning<POS, INV, Unlocked>
pub fn enable(self) -> CmpRunning<POS, INV, Unlocked>
Starts the comparator.
Auto Trait Implementations§
impl<POS, INV> !Sync for Cmp<POS, INV>
impl<POS, INV> Freeze for Cmp<POS, INV>
impl<POS, INV> RefUnwindSafe for Cmp<POS, INV>where
POS: RefUnwindSafe,
INV: RefUnwindSafe,
impl<POS, INV> Send for Cmp<POS, INV>
impl<POS, INV> Unpin for Cmp<POS, INV>
impl<POS, INV> UnsafeUnpin for Cmp<POS, INV>where
POS: UnsafeUnpin,
INV: UnsafeUnpin,
impl<POS, INV> UnwindSafe for Cmp<POS, INV>where
POS: UnwindSafe,
INV: UnwindSafe,
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