Struct InputPin
pub struct InputPin {
value: AsyncFd<ValueFile>,
}Expand description
Input pin that can wait for a level.
Dropping the pin doesn’t unexport it.
Fields§
§value: AsyncFd<ValueFile>Implementations§
§impl InputPin
impl InputPin
pub fn new(pin: TlmmPin, active_low: bool, pull: PullSelection) -> Result<Self>
pub fn new(pin: TlmmPin, active_low: bool, pull: PullSelection) -> Result<Self>
Initializes an input pin of the TLMM, similar to Ql_GPIO_Init.
The pull is set before the export. If the export fails because a driver owns the pin, its pull has already changed.
§Errors
Returns an error if setting the pull, exporting or configuring the pin fails.
§Panics
Panics if it isn’t called within a Tokio runtime with I/O enabled.
fn export(number: u32, active_low: bool) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for InputPin
impl !UnwindSafe for InputPin
impl Freeze for InputPin
impl Send for InputPin
impl Sync for InputPin
impl Unpin for InputPin
impl UnsafeUnpin for InputPin
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