pub struct Inverter { /* private fields */ }
Trait Implementations§
source§impl Into<OwnOrBorrow<'static, dyn Pin>> for Inverter
impl Into<OwnOrBorrow<'static, dyn Pin>> for Inverter
source§fn into(self) -> OwnOrBorrow<'static, dyn Pin>
fn into(self) -> OwnOrBorrow<'static, dyn Pin>
Converts this type into the (usually inferred) input type.
source§impl Pin for Inverter
impl Pin for Inverter
source§fn get(&self) -> bool
fn get(&self) -> bool
Gets the pin state. Reads multiple samples and only returns once the pin has reached a steady state.
source§fn listen(&'static self, handler: PinIsrCallback)
fn listen(&'static self, handler: PinIsrCallback)
Listen for interrupts, calling the given callback once we receive one.
source§fn set(&self, high: bool)
fn set(&self, high: bool)
Set the pin’s output according to the boolean (true == high, false == low)
source§fn set_interrupt_mode(&self, mode: InterruptMode)
fn set_interrupt_mode(&self, mode: InterruptMode)
Set when this pin will generate interrupts
source§impl UsesPin for Inverter
impl UsesPin for Inverter
source§fn using<OP: Into<OwnOrBorrow<'static, dyn Pin>>>(pin: OP) -> Self
fn using<OP: Into<OwnOrBorrow<'static, dyn Pin>>>(pin: OP) -> Self
Create a Debouncer which will wrap the given underlying Pin instance to provide a debounced version of it.
source§fn with_pin(pin: &'static dyn Pin) -> Selfwhere
Self: Sized,
fn with_pin(pin: &'static dyn Pin) -> Selfwhere
Self: Sized,
Convenience method to create an instance of this device with a
given static reference to a pin (avoids a certain amount of type
hinting boilerplate for the caller.)
source§fn static_using<OP: Into<OwnOrBorrow<'static, dyn Pin>>>(
pin: OP
) -> &'static mut Selfwhere
Self: Sized,
fn static_using<OP: Into<OwnOrBorrow<'static, dyn Pin>>>(
pin: OP
) -> &'static mut Selfwhere
Self: Sized,
Create an instance of this device that uses the given instance of a pin,
and return a static reference good for the lifetime of the program. Read more
source§fn static_with_pin(pin: &'static dyn Pin) -> &'static mut Selfwhere
Self: Sized,
fn static_with_pin(pin: &'static dyn Pin) -> &'static mut Selfwhere
Self: Sized,
Create an instance of this device that uses the given reference to a pin,
and return a static reference good for the lifetime of the program. Read more
Auto Trait Implementations§
impl !Freeze for Inverter
impl !RefUnwindSafe for Inverter
impl !Send for Inverter
impl !Sync for Inverter
impl Unpin for Inverter
impl !UnwindSafe for Inverter
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