Enum wasefire_applet_api::gpio::OutputConfig
source · #[repr(u32)]pub enum OutputConfig {
Disabled = 0,
PushPull = 3,
OpenDrain = 1,
OpenSource = 2,
}Expand description
Output configuration.
Variants§
Disabled = 0
Output is disabled.
PushPull = 3
Push-pull output (most common configuration).
Writing 0 (resp. 1) drives the voltage to 0 (resp. 1).
OpenDrain = 1
Open-drain output.
Writing 0 drives the voltage to 0. Writing 1 doesn’t drive the voltage.
OpenSource = 2
Open-source output.
Writing 0 doesn’t drive the voltage. Writing 1 drives the voltage to 1.
Trait Implementations§
source§impl Clone for OutputConfig
impl Clone for OutputConfig
source§fn clone(&self) -> OutputConfig
fn clone(&self) -> OutputConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for OutputConfig
impl Debug for OutputConfig
source§impl From<usize> for OutputConfig
impl From<usize> for OutputConfig
source§impl Ord for OutputConfig
impl Ord for OutputConfig
source§fn cmp(&self, other: &OutputConfig) -> Ordering
fn cmp(&self, other: &OutputConfig) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for OutputConfig
impl PartialEq for OutputConfig
source§fn eq(&self, other: &OutputConfig) -> bool
fn eq(&self, other: &OutputConfig) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for OutputConfig
impl PartialOrd for OutputConfig
source§fn partial_cmp(&self, other: &OutputConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &OutputConfig) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl TryFrom<u32> for OutputConfig
impl TryFrom<u32> for OutputConfig
impl Copy for OutputConfig
impl Eq for OutputConfig
impl StructuralPartialEq for OutputConfig
Auto Trait Implementations§
impl Freeze for OutputConfig
impl RefUnwindSafe for OutputConfig
impl Send for OutputConfig
impl Sync for OutputConfig
impl Unpin for OutputConfig
impl UnwindSafe for OutputConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)