[−][src]Struct debouncr::Debouncer
A debouncer.
It wraps a u8
or u16
, depending on the number of required consecutive
logical-high states.
To create an instance, use the appropriate debounce_X
function (where X
is the number of required consecutive logical-high states).
Implementations
impl Debouncer<u8, Repeat2>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat3>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat4>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat5>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat6>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat7>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u8, Repeat8>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat9>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat10>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat11>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat12>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat13>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat14>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat15>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
impl Debouncer<u16, Repeat16>
[src]
pub fn update(&mut self, pressed: bool) -> Option<Edge>
[src]
Update the state.
pub fn is_high(&self) -> bool
[src]
Return true
if the debounced state is logical high.
pub fn is_low(&self) -> bool
[src]
Return true
if the debounced state is logical low.
Auto Trait Implementations
impl<S, M> Send for Debouncer<S, M> where
M: Send,
S: Send,
M: Send,
S: Send,
impl<S, M> Sync for Debouncer<S, M> where
M: Sync,
S: Sync,
M: Sync,
S: Sync,
impl<S, M> Unpin for Debouncer<S, M> where
M: Unpin,
S: Unpin,
M: Unpin,
S: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,