Struct microbit::hal::lpcomp::LpComp [−][src]
pub struct LpComp { /* fields omitted */ }Expand description
A safe wrapper around the LPCOMP peripheral.
Implementations
impl LpComp[src]
impl LpComp[src]pub fn new<P>(lpcomp: LPCOMP, input_pin: &P) -> LpComp where
P: LpCompInputPin, [src]
pub fn new<P>(lpcomp: LPCOMP, input_pin: &P) -> LpComp where
P: LpCompInputPin, [src]Takes ownership of the LPCOMP peripheral, returning a safe wrapper
using specified input pin and a default Vref of Vdd/2.
pub fn aref_pin<P>(&self, ref_pin: &P) -> &LpComp where
P: LpCompRefPin, [src]
pub fn aref_pin<P>(&self, ref_pin: &P) -> &LpComp where
P: LpCompRefPin, [src]Sets analog reference pin.
pub fn hysteresis(&self, enabled: bool) -> &LpComp[src]
pub fn hysteresis(&self, enabled: bool) -> &LpComp[src]Enables/disables comparator hysteresis.
pub fn analog_detect(&self, event: Transition) -> &LpComp[src]
pub fn analog_detect(&self, event: Transition) -> &LpComp[src]Analog detect event configuration, used for analog signal power up from OFF.
pub fn enable_interrupt(&self, event: Transition) -> &LpComp[src]
pub fn enable_interrupt(&self, event: Transition) -> &LpComp[src]Enables COMP_LPCOMP interrupt triggering on the specified event.
pub fn disable_interrupt(&self, event: Transition) -> &LpComp[src]
pub fn disable_interrupt(&self, event: Transition) -> &LpComp[src]Disables COMP_LPCOMP interrupt triggering on the specified event.
pub fn event_up(&self) -> &Reg<u32, _EVENTS_UP>[src]
pub fn event_up(&self) -> &Reg<u32, _EVENTS_UP>[src]Returns reference to Up transition event endpoint for PPI.
pub fn event_down(&self) -> &Reg<u32, _EVENTS_DOWN>[src]
pub fn event_down(&self) -> &Reg<u32, _EVENTS_DOWN>[src]Returns reference to Down transition event endpoint for PPI.
pub fn event_cross(&self) -> &Reg<u32, _EVENTS_CROSS>[src]
pub fn event_cross(&self) -> &Reg<u32, _EVENTS_CROSS>[src]Returns reference to Cross transition event endpoint for PPI.
pub fn reset_event(&self, event: Transition)[src]
pub fn reset_event(&self, event: Transition)[src]Marks event as handled.
pub fn reset_events(&self)[src]
pub fn reset_events(&self)[src]Marks all events as handled.
pub fn read(&self) -> CompResult[src]
pub fn read(&self) -> CompResult[src]Returns the output state of the comparator.
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> CheckedAs for T[src]
impl<T> CheckedAs for T[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>, [src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>, [src]Casts the value.
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>, [src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>, [src]pub fn lossless_try_into(self) -> Option<Dst>[src]
pub fn lossless_try_into(self) -> Option<Dst>[src]Performs the conversion.
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>, [src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>, [src]pub fn lossy_into(self) -> Dst[src]
pub fn lossy_into(self) -> Dst[src]Performs the conversion.
impl<T> OverflowingAs for T[src]
impl<T> OverflowingAs for T[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>, [src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>, [src]Casts the value.
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> SaturatingAs for T[src]
impl<T> SaturatingAs for T[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>, [src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>, [src]Casts the value.
impl<T> UnwrappedAs for T[src]
impl<T> UnwrappedAs for T[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>, [src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>, [src]Casts the value.
impl<T> WrappingAs for T[src]
impl<T> WrappingAs for T[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>, [src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>, [src]Casts the value.