pub struct WindowComparator<U, L, ED> {
pub upper: Comparator<U, ED>,
pub lower: Comparator<L, ED>,
}
Expand description
Uses two comparators to implement a window comparator. See Figure 69 in RM0444 Rev 5.
Fields§
§upper: Comparator<U, ED>
§lower: Comparator<L, ED>
Implementations§
Source§impl WindowComparator<COMP1, COMP2, Disabled>
impl WindowComparator<COMP1, COMP2, Disabled>
Sourcepub fn listen(&self, edge: SignalEdge, exti: &mut EXTI)
pub fn listen(&self, edge: SignalEdge, exti: &mut EXTI)
Enables raising the ADC_COMP
interrupt at the specified signal edge
Source§impl<ED> WindowComparator<COMP1, COMP2, ED>
impl<ED> WindowComparator<COMP1, COMP2, ED>
Sourcepub fn output_pin<P: OutputPin<COMP1>>(&self, pin: P)
pub fn output_pin<P: OutputPin<COMP1>>(&self, pin: P)
Configures a GPIO pin to output the signal of the comparator
Multiple GPIO pins may be configured as the output simultaneously.
Sourcepub fn is_pending(&self, edge: SignalEdge, exti: &EXTI) -> bool
pub fn is_pending(&self, edge: SignalEdge, exti: &EXTI) -> bool
Returns true
if the output signal interrupt is pending for the edge
Source§impl WindowComparator<COMP2, COMP1, Disabled>
impl WindowComparator<COMP2, COMP1, Disabled>
Sourcepub fn listen(&self, edge: SignalEdge, exti: &mut EXTI)
pub fn listen(&self, edge: SignalEdge, exti: &mut EXTI)
Enables raising the ADC_COMP
interrupt at the specified signal edge
Source§impl<ED> WindowComparator<COMP2, COMP1, ED>
impl<ED> WindowComparator<COMP2, COMP1, ED>
Sourcepub fn output_pin<P: OutputPin<COMP2>>(&self, pin: P)
pub fn output_pin<P: OutputPin<COMP2>>(&self, pin: P)
Configures a GPIO pin to output the signal of the comparator
Multiple GPIO pins may be configured as the output simultaneously.
Sourcepub fn is_pending(&self, edge: SignalEdge, exti: &EXTI) -> bool
pub fn is_pending(&self, edge: SignalEdge, exti: &EXTI) -> bool
Returns true
if the output signal interrupt is pending for the edge
Auto Trait Implementations§
impl<U, L, ED> Freeze for WindowComparator<U, L, ED>
impl<U, L, ED> RefUnwindSafe for WindowComparator<U, L, ED>
impl<U, L, ED> Send for WindowComparator<U, L, ED>
impl<U, L, ED> Sync for WindowComparator<U, L, ED>
impl<U, L, ED> Unpin for WindowComparator<U, L, ED>
impl<U, L, ED> UnwindSafe for WindowComparator<U, L, ED>
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