pub struct AnyComparator<'d>(/* private fields */);Expand description
Any Comparator. Could be either comparator 0, comparator 1, etc.
Trait Implementations§
Source§impl Comparator for AnyComparator<'_>
impl Comparator for AnyComparator<'_>
Source§fn set_enable(&self, enable: bool)
fn set_enable(&self, enable: bool)
Enables/disables the comparator. If enabled, this means
it will generate interrupt based on its configuration.
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns true if the comparator has been enabled. This means
it will generate interrupt based on its configuration.
Source§fn set_mode(&self, mode: ComparatorMode)
fn set_mode(&self, mode: ComparatorMode)
Set the mode of the comparator to be either target or periodic.
Source§fn mode(&self) -> ComparatorMode
fn mode(&self) -> ComparatorMode
Get the current mode of the comparator, which is either target or
periodic.
Source§fn set_period(&self, value: u32)
fn set_period(&self, value: u32)
Set how often the comparator should generate an interrupt when in
periodic mode.
Source§fn set_target(&self, value: u64)
fn set_target(&self, value: u64)
Set when the comparator should generate an interrupt in target mode.
Source§fn actual_target(&self) -> u64
fn actual_target(&self) -> u64
Get the actual target value of the comparator.
Source§fn set_interrupt_handler(&self, handler: InterruptHandler)
fn set_interrupt_handler(&self, handler: InterruptHandler)
Set the interrupt handler for this comparator.
Source§impl<'d> Debug for AnyComparator<'d>
impl<'d> Debug for AnyComparator<'d>
Source§impl<'d, const CHANNEL: u8> From<SpecificComparator<'d, CHANNEL>> for AnyComparator<'d>
impl<'d, const CHANNEL: u8> From<SpecificComparator<'d, CHANNEL>> for AnyComparator<'d>
Source§fn from(_value: SpecificComparator<'d, CHANNEL>) -> Self
fn from(_value: SpecificComparator<'d, CHANNEL>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'d> Freeze for AnyComparator<'d>
impl<'d> RefUnwindSafe for AnyComparator<'d>
impl<'d> Send for AnyComparator<'d>
impl<'d> Sync for AnyComparator<'d>
impl<'d> Unpin for AnyComparator<'d>
impl<'d> UnwindSafe for AnyComparator<'d>
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