pub enum PadConfig {
Unconnected,
Input(MuxedPads, PinmuxPeripheralIn),
Output(MuxedPads, PinmuxOutsel),
InOut(MuxedPads, PinmuxPeripheralIn, PinmuxOutsel),
}
Variants§
Unconnected
Input(MuxedPads, PinmuxPeripheralIn)
Output(MuxedPads, PinmuxOutsel)
InOut(MuxedPads, PinmuxPeripheralIn, PinmuxOutsel)
Implementations§
Source§impl PadConfig
impl PadConfig
Sourcepub fn disconnect_input(&self)
pub fn disconnect_input(&self)
Disconnect pad from internal input and connect to always Low signal
pub fn disconnect_output(&self)
Sourcepub fn disconnect(&self)
pub fn disconnect(&self)
Disconnect input and output from peripheral/pad and connect to internal Hi-Z/Low signal
Trait Implementations§
Source§impl Configure for PadConfig
impl Configure for PadConfig
Source§fn configuration(&self) -> Configuration
fn configuration(&self) -> Configuration
Return the current pin configuration.
Source§fn make_output(&self) -> Configuration
fn make_output(&self) -> Configuration
Make the pin an output, returning the current configuration,
which should be either
Configuration::Output
or
Configuration::InputOutput
.Source§fn disable_output(&self) -> Configuration
fn disable_output(&self) -> Configuration
Disable the pin as an output, returning the current configuration.
Source§fn make_input(&self) -> Configuration
fn make_input(&self) -> Configuration
Make the pin an input, returning the current configuration,
which should be ither
Configuration::Input
or
Configuration::InputOutput
.Source§fn disable_input(&self) -> Configuration
fn disable_input(&self) -> Configuration
Disable the pin as an input, returning the current configuration.
Source§fn deactivate_to_low_power(&self)
fn deactivate_to_low_power(&self)
Put a pin into its lowest power state, with no guarantees on
if it is enabled or not. Implementations are free to use any
state (e.g. input, output, disable, etc.) the hardware pin
supports to ensure the pin is as low power as possible.
Re-enabling the pin requires reconfiguring it (i.e. the state
of its enabled configuration is not stored).
Source§fn set_floating_state(&self, state: FloatingState)
fn set_floating_state(&self, state: FloatingState)
Set the floating state of the pin.
Source§fn floating_state(&self) -> FloatingState
fn floating_state(&self) -> FloatingState
Return the current floating state of the pin.
Source§impl From<PadConfig> for Configuration
impl From<PadConfig> for Configuration
Source§fn from(pad: PadConfig) -> Configuration
fn from(pad: PadConfig) -> Configuration
Converts to this type from the input type.
impl Copy for PadConfig
impl Eq for PadConfig
impl StructuralPartialEq for PadConfig
Auto Trait Implementations§
impl Freeze for PadConfig
impl RefUnwindSafe for PadConfig
impl Send for PadConfig
impl Sync for PadConfig
impl Unpin for PadConfig
impl UnwindSafe for PadConfig
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