pub struct Pin<I, M>where
I: PinId,
M: PinMode,{ /* private fields */ }
Implementations§
source§impl<I, M> Pin<I, M>where
I: PinId,
M: PinMode,
impl<I, M> Pin<I, M>where I: PinId, M: PinMode,
sourcepub fn into_mode<N>(self) -> Pin<I, N>where
N: PinMode,
pub fn into_mode<N>(self) -> Pin<I, N>where N: PinMode,
Convert the pin to the requested PinMode
sourcepub fn into_floating_disabled(self) -> Pin<I, Disabled<Floating>>
pub fn into_floating_disabled(self) -> Pin<I, Disabled<Floating>>
Disable the pin and set it to float
sourcepub fn into_pull_down_disabled(self) -> Pin<I, Disabled<PullDown>>
pub fn into_pull_down_disabled(self) -> Pin<I, Disabled<PullDown>>
Disable the pin and set it to pull down
sourcepub fn into_pull_up_disabled(self) -> Pin<I, Disabled<PullUp>>
pub fn into_pull_up_disabled(self) -> Pin<I, Disabled<PullUp>>
Disable the pin and set it to pull up
sourcepub fn into_floating_input(self) -> Pin<I, Input<Floating>>
pub fn into_floating_input(self) -> Pin<I, Input<Floating>>
Configure the pin to operate as a floating input
sourcepub fn into_pull_down_input(self) -> Pin<I, Input<PullDown>>
pub fn into_pull_down_input(self) -> Pin<I, Input<PullDown>>
Configure the pin to operate as a pulled down input
sourcepub fn into_pull_up_input(self) -> Pin<I, Input<PullUp>>
pub fn into_pull_up_input(self) -> Pin<I, Input<PullUp>>
Configure the pin to operate as a pulled up input
sourcepub fn into_floating_interrupt(self) -> Pin<I, Interrupt<Floating>>
pub fn into_floating_interrupt(self) -> Pin<I, Interrupt<Floating>>
Configure the pin to operate as a floating interrupt
sourcepub fn into_pull_down_interrupt(self) -> Pin<I, Interrupt<PullDown>>
pub fn into_pull_down_interrupt(self) -> Pin<I, Interrupt<PullDown>>
Configure the pin to operate as a pulled down interrupt
sourcepub fn into_pull_up_interrupt(self) -> Pin<I, Interrupt<PullUp>>
pub fn into_pull_up_interrupt(self) -> Pin<I, Interrupt<PullUp>>
Configure the pin to operate as a pulled up interrupt
sourcepub fn into_push_pull_output(self) -> Pin<I, Output<PushPull>>
pub fn into_push_pull_output(self) -> Pin<I, Output<PushPull>>
Configure the pin to operate as a push-pull output
sourcepub fn into_readable_output(self) -> Pin<I, Output<Readable>>
pub fn into_readable_output(self) -> Pin<I, Output<Readable>>
Configure the pin to operate as a readable push pull output
sourcepub fn into_alternate<C>(self) -> Pin<I, Alternate<C>>where
C: AlternateConfig,
pub fn into_alternate<C>(self) -> Pin<I, Alternate<C>>where C: AlternateConfig,
Configure the pin to operate as the corresponding peripheral function.
The type C
indicates the desired peripheral function.
sourcepub fn get_drive_strength(&self) -> bool
pub fn get_drive_strength(&self) -> bool
Read the current drive strength of the pin.
The drive strength is reset to normal on every change in pin mode.
sourcepub fn set_drive_strength(&mut self, stronger: bool)
pub fn set_drive_strength(&mut self, stronger: bool)
Set the drive strength for the pin.
The drive strength is reset to normal on every change in pin mode.
Trait Implementations§
source§impl<I, M> ExternalInterrupt for Pin<I, M>where
I: PinId,
M: PinMode,
Pin<I, M>: ExternalInterrupt,
impl<I, M> ExternalInterrupt for Pin<I, M>where I: PinId, M: PinMode, Pin<I, M>: ExternalInterrupt,
source§impl<I, M> From<Pin<I, M>> for Pin<I, M>where
I: PinId,
M: PinMode,
impl<I, M> From<Pin<I, M>> for Pin<I, M>where I: PinId, M: PinMode,
Convert from a v2::Pin
to a v1::Pin
source§impl<I, M> From<Pin<I, M>> for Pin<I, M>where
I: PinId,
M: PinMode,
impl<I, M> From<Pin<I, M>> for Pin<I, M>where I: PinId, M: PinMode,
Convert from a v1::Pin
to a v2::Pin