pub struct Pin<I, M> where
I: PinId,
M: PinMode + ValidPinMode<I>, { /* private fields */ }
Implementations
sourceimpl<I, M> Pin<I, M> where
I: PinId,
M: PinMode + ValidPinMode<I>,
impl<I, M> Pin<I, M> where
I: PinId,
M: PinMode + ValidPinMode<I>,
sourcepub fn into_mode<N: PinMode + ValidPinMode<I>>(self) -> Pin<I, N>
pub fn into_mode<N: PinMode + ValidPinMode<I>>(self) -> Pin<I, N>
Convert the pin to the requested PinMode
sourcepub fn into_floating_disabled(self) -> Pin<I, FloatingDisabled>
pub fn into_floating_disabled(self) -> Pin<I, FloatingDisabled>
Disable the pin and set it to float
sourcepub fn into_pull_down_disabled(self) -> Pin<I, PullDownDisabled>
pub fn into_pull_down_disabled(self) -> Pin<I, PullDownDisabled>
Disable the pin and set it to pull down
sourcepub fn into_pull_up_disabled(self) -> Pin<I, PullUpDisabled>
pub fn into_pull_up_disabled(self) -> Pin<I, PullUpDisabled>
Disable the pin and set it to pull up
sourcepub fn into_floating_input(self) -> Pin<I, FloatingInput>
pub fn into_floating_input(self) -> Pin<I, FloatingInput>
Configure the pin to operate as a floating input
sourcepub fn into_pull_down_input(self) -> Pin<I, PullDownInput>
pub fn into_pull_down_input(self) -> Pin<I, PullDownInput>
Configure the pin to operate as a pulled down input
sourcepub fn into_pull_up_input(self) -> Pin<I, PullUpInput>
pub fn into_pull_up_input(self) -> Pin<I, PullUpInput>
Configure the pin to operate as a pulled up input
sourcepub fn into_bus_keep_input(self) -> Pin<I, BusKeepInput>
pub fn into_bus_keep_input(self) -> Pin<I, BusKeepInput>
Configure the pin to operate as a bus keep input
sourcepub fn into_push_pull_output(self) -> Pin<I, PushPullOutput>
pub fn into_push_pull_output(self) -> Pin<I, PushPullOutput>
Configure the pin to operate as a push-pull output
sourcepub fn into_readable_output(self) -> Pin<I, ReadableOutput>
pub fn into_readable_output(self) -> Pin<I, ReadableOutput>
Configure the pin to operate as a readable push pull output
sourcepub fn get_drive_strength(&self) -> OutputDriveStrength
pub fn get_drive_strength(&self) -> OutputDriveStrength
Read the current drive strength of the pin.
sourcepub fn set_drive_strength(&mut self, strength: OutputDriveStrength)
pub fn set_drive_strength(&mut self, strength: OutputDriveStrength)
Set the drive strength for the pin.
sourcepub fn get_slew_rate(&self) -> OutputSlewRate
pub fn get_slew_rate(&self) -> OutputSlewRate
Get the slew rate for the pin.
sourcepub fn set_slew_rate(&mut self, rate: OutputSlewRate)
pub fn set_slew_rate(&mut self, rate: OutputSlewRate)
Set the slew rate for the pin.
sourcepub fn clear_interrupt(&mut self, interrupt: Interrupt)
pub fn clear_interrupt(&mut self, interrupt: Interrupt)
Clear interrupt.
sourcepub fn interrupt_status(&self, interrupt: Interrupt) -> bool
pub fn interrupt_status(&self, interrupt: Interrupt) -> bool
Interrupt status.
sourcepub fn is_interrupt_enabled(&self, interrupt: Interrupt) -> bool
pub fn is_interrupt_enabled(&self, interrupt: Interrupt) -> bool
Is interrupt enabled.
sourcepub fn set_interrupt_enabled(&self, interrupt: Interrupt, enabled: bool)
pub fn set_interrupt_enabled(&self, interrupt: Interrupt, enabled: bool)
Enable or disable interrupt.
sourcepub fn is_interrupt_forced(&self, interrupt: Interrupt) -> bool
pub fn is_interrupt_forced(&self, interrupt: Interrupt) -> bool
Is interrupt forced.
sourcepub fn set_interrupt_forced(&self, interrupt: Interrupt, forced: bool)
pub fn set_interrupt_forced(&self, interrupt: Interrupt, forced: bool)
Force or release interrupt.
sourcepub fn set_interrupt_override(&mut self, override_value: InterruptOverride)
pub fn set_interrupt_override(&mut self, override_value: InterruptOverride)
Set the interrupt override.
sourcepub fn set_input_override(&mut self, override_value: InputOverride)
pub fn set_input_override(&mut self, override_value: InputOverride)
Set the input override.
sourcepub fn set_output_enable_override(
&mut self,
override_value: OutputEnableOverride
)
pub fn set_output_enable_override(
&mut self,
override_value: OutputEnableOverride
)
Set the output enable override.
sourcepub fn set_output_override(&mut self, override_value: OutputOverride)
pub fn set_output_override(&mut self, override_value: OutputOverride)
Set the output override.
Trait Implementations
sourceimpl ClockSource for Pin<Gpio20, FunctionClock>
impl ClockSource for Pin<Gpio20, FunctionClock>
sourceimpl ClockSource for Pin<Gpio22, FunctionClock>
impl ClockSource for Pin<Gpio22, FunctionClock>
sourceimpl<I> InputPin for Pin<I, ReadableOutput> where
I: PinId,
impl<I> InputPin for Pin<I, ReadableOutput> where
I: PinId,
sourceimpl<I, C> OutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
impl<I, C> OutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
type Error = Infallible
type Error = Infallible
Error type
sourceimpl<I, C> StatefulOutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
impl<I, C> StatefulOutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
sourceimpl<I, C> ToggleableOutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
impl<I, C> ToggleableOutputPin for Pin<I, Output<C>> where
I: PinId,
C: OutputConfig,
sourceimpl<I, M> TryFrom<DynPin> for Pin<I, M> where
I: PinId,
M: PinMode + ValidPinMode<I>,
impl<I, M> TryFrom<DynPin> for Pin<I, M> where
I: PinId,
M: PinMode + ValidPinMode<I>,
sourceimpl ValidSrc<GpioOutput0Clock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<GpioOutput0Clock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<GpioOutput0Clock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<GpioOutput0Clock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<GpioOutput1Clock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<GpioOutput1Clock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<GpioOutput1Clock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<GpioOutput1Clock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<GpioOutput2Clock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<GpioOutput2Clock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<GpioOutput2Clock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<GpioOutput2Clock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<GpioOutput3Clock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<GpioOutput3Clock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<GpioOutput3Clock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<GpioOutput3Clock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<PeripheralClock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<PeripheralClock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<PeripheralClock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<PeripheralClock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<ReferenceClock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<ReferenceClock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<ReferenceClock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<ReferenceClock> for Pin<Gpio22, FunctionClock>
sourceimpl ValidSrc<SystemClock> for Pin<Gpio20, FunctionClock>
impl ValidSrc<SystemClock> for Pin<Gpio20, FunctionClock>
sourceimpl ValidSrc<SystemClock> for Pin<Gpio22, FunctionClock>
impl ValidSrc<SystemClock> for Pin<Gpio22, FunctionClock>
Auto Trait Implementations
impl<I, M> RefUnwindSafe for Pin<I, M> where
I: RefUnwindSafe,
M: RefUnwindSafe,
impl<I, M> Send for Pin<I, M> where
I: Send,
M: Send,
impl<I, M> Sync for Pin<I, M> where
I: Sync,
M: Sync,
impl<I, M> Unpin for Pin<I, M> where
I: Unpin,
M: Unpin,
impl<I, M> UnwindSafe for Pin<I, M> where
I: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more