Struct OutputPin
pub struct OutputPin {
value: ValueFile,
}Expand description
Output pin.
Dropping the pin doesn’t unexport it or change its level.
Fields§
§value: ValueFileImplementations§
§impl OutputPin
impl OutputPin
pub fn new(
pin: TlmmPin,
active_low: bool,
pull: PullSelection,
level: Level,
) -> Result<Self>
pub fn new( pin: TlmmPin, active_low: bool, pull: PullSelection, level: Level, ) -> Result<Self>
Initializes an output pin of the TLMM with a start level, 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.
pub fn new_pmic(pin: PmicPin, active_low: bool, level: Level) -> Result<Self>
pub fn new_pmic(pin: PmicPin, active_low: bool, level: Level) -> Result<Self>
Initializes an output pin of the PMIC with a start level, similar to
Ql_GPIO_Init.
§Errors
Returns an error if exporting or configuring the pin fails.
fn export(number: u32, active_low: bool, level: Level) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputPin
impl RefUnwindSafe for OutputPin
impl Send for OutputPin
impl Sync for OutputPin
impl Unpin for OutputPin
impl UnsafeUnpin for OutputPin
impl UnwindSafe for OutputPin
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