#[non_exhaustive]pub struct OutputConfig { /* private fields */ }
Expand description
Output pin configuration.
This struct is used to configure the drive mode, drive strength, and pull direction of an output pin. By default, the configuration is set to:
- Drive mode:
DriveMode::PushPull
- Drive strength:
DriveStrength::_20mA
- Pull direction:
Pull::None
(no pull resistors connected)
Implementations§
Source§impl OutputConfig
impl OutputConfig
Sourcepub fn with_drive_mode(self, drive_mode: DriveMode) -> Self
pub fn with_drive_mode(self, drive_mode: DriveMode) -> Self
Assign the given value to the drive_mode
field.
Sourcepub fn drive_mode(&self) -> DriveMode
pub fn drive_mode(&self) -> DriveMode
Output drive mode.
Sourcepub fn with_drive_strength(self, drive_strength: DriveStrength) -> Self
pub fn with_drive_strength(self, drive_strength: DriveStrength) -> Self
Assign the given value to the drive_strength
field.
Sourcepub fn drive_strength(&self) -> DriveStrength
pub fn drive_strength(&self) -> DriveStrength
Pin drive strength.
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§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 Default for OutputConfig
impl Default for OutputConfig
Source§impl Format for OutputConfig
impl Format for OutputConfig
Source§impl PartialEq for OutputConfig
impl PartialEq 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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)