Struct gd32vf103_hal::gpio::gpiod::PD8 [−][src]
Pin
Implementations
impl<MODE> PD8<MODE> where
MODE: Active,
[src]
MODE: Active,
pub fn into_analog(self, ctl1: &mut CTL1) -> PD8<Analog>
[src]
Configures the pin to serve as an analog input pin.
pub fn into_floating_input(self, ctl1: &mut CTL1) -> PD8<Input<Floating>>
[src]
Configures the pin to serve as a floating input pin.
pub fn into_pull_down_input(
self,
ctl1: &mut CTL1,
octl: &mut OCTL
) -> PD8<Input<PullDown>>
[src]
self,
ctl1: &mut CTL1,
octl: &mut OCTL
) -> PD8<Input<PullDown>>
Configures the pin to serve as a pull down input pin.
pub fn into_pull_up_input(
self,
ctl1: &mut CTL1,
octl: &mut OCTL
) -> PD8<Input<PullUp>>
[src]
self,
ctl1: &mut CTL1,
octl: &mut OCTL
) -> PD8<Input<PullUp>>
Configures the pin to serve as a pull up input pin.
pub fn into_push_pull_output(self, ctl1: &mut CTL1) -> PD8<Output<PushPull>>
[src]
Configures the pin to serve as a push pull output pin; the maximum speed is set to the default value 50MHz.
pub fn into_open_drain_output(self, ctl1: &mut CTL1) -> PD8<Output<OpenDrain>>
[src]
Configures the pin to serve as an open drain output pin; the maximum speed is set to the default value 50MHz.
pub fn into_alternate_push_pull(
self,
ctl1: &mut CTL1
) -> PD8<Alternate<PushPull>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Alternate<PushPull>>
Configures the pin to serve as a push pull alternate pin; the maximum speed is set to the default value 50MHz.
pub fn into_alternate_open_drain(
self,
ctl1: &mut CTL1
) -> PD8<Alternate<OpenDrain>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Alternate<OpenDrain>>
Configures the pin to serve as an open drain alternate pin; the maximum speed is set to the default value 50MHz.
pub fn into_push_pull_output_speed<SPEED: Speed>(
self,
ctl1: &mut CTL1
) -> PD8<Output<PushPull>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Output<PushPull>>
Configures the pin to serve as a push pull output pin with maximum speed given.
pub fn into_open_drain_output_speed<SPEED: Speed>(
self,
ctl1: &mut CTL1
) -> PD8<Output<OpenDrain>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Output<OpenDrain>>
Configures the pin to serve as an open drain output pin with maximum speed given.
pub fn into_alternate_push_pull_speed<SPEED: Speed>(
self,
ctl1: &mut CTL1
) -> PD8<Alternate<PushPull>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Alternate<PushPull>>
Configures the pin to serve as a push pull alternate pin with maximum speed given
pub fn into_alternate_open_drain_speed<SPEED: Speed>(
self,
ctl1: &mut CTL1
) -> PD8<Alternate<OpenDrain>>
[src]
self,
ctl1: &mut CTL1
) -> PD8<Alternate<OpenDrain>>
Configures the pin to serve as an open drain alternate pin with maximum speed given.
pub fn lock(self, lock: &mut LOCK) -> Locked<PD8<MODE>>
[src]
Lock the pin to prevent further configurations on pin mode.
After this function is called, the pin is not actually locked; it only
sets a marker temporary variant to prepare for the real lock freezing
procedure freeze
. To actually perform the lock, users are encouraged
to call freeze
after all pins configured and marked properly for lock.
The output state of this pin can still be changed. You may unlock locked
pins by using unlock
method with a mutable reference of LOCK
struct,
but it will not be possible if freeze
method of LOCK struct was
called; see its documentation for details.
impl<MODE> PD8<MODE> where
MODE: Active,
[src]
MODE: Active,
pub fn downgrade(self) -> PDx<MODE>
[src]
Erases the pin number from the type.
This is useful when you want to collect the pins into an array where you need all the elements to have the same type.
Trait Implementations
impl<MODE> InputPin for PD8<Input<MODE>>
[src]
type Error = Infallible
Error type
fn try_is_high(&self) -> Result<bool, Self::Error>
[src]
fn try_is_low(&self) -> Result<bool, Self::Error>
[src]
impl InputPin for PD8<Output<OpenDrain>>
[src]
type Error = Infallible
Error type
fn try_is_high(&self) -> Result<bool, Self::Error>
[src]
fn try_is_low(&self) -> Result<bool, Self::Error>
[src]
impl<MODE> OutputPin for PD8<Output<MODE>>
[src]
type Error = Infallible
Error type
fn try_set_high(&mut self) -> Result<(), Self::Error>
[src]
fn try_set_low(&mut self) -> Result<(), Self::Error>
[src]
pub fn try_set_state(&mut self, state: PinState) -> Result<(), Self::Error>
[src]
impl<MODE> OutputPin for PD8<Alternate<MODE>>
[src]
type Error = Infallible
Error type
fn try_set_high(&mut self) -> Result<(), Self::Error>
[src]
fn try_set_low(&mut self) -> Result<(), Self::Error>
[src]
pub fn try_set_state(&mut self, state: PinState) -> Result<(), Self::Error>
[src]
impl<MODE> StatefulOutputPin for PD8<Output<MODE>>
[src]
fn try_is_set_high(&self) -> Result<bool, Self::Error>
[src]
fn try_is_set_low(&self) -> Result<bool, Self::Error>
[src]
impl<MODE> StatefulOutputPin for PD8<Alternate<MODE>>
[src]
fn try_is_set_high(&self) -> Result<bool, Self::Error>
[src]
fn try_is_set_low(&self) -> Result<bool, Self::Error>
[src]
impl<MODE> ToggleableOutputPin for PD8<Output<MODE>>
[src]
impl<MODE> ToggleableOutputPin for PD8<Alternate<MODE>>
[src]
Auto Trait Implementations
impl<MODE> Send for PD8<MODE> where
MODE: Send,
MODE: Send,
impl<MODE> Sync for PD8<MODE> where
MODE: Sync,
MODE: Sync,
impl<MODE> Unpin for PD8<MODE> where
MODE: Unpin,
MODE: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,