Struct gd32vf103_hal::gpio::gpiod::PD7 [−][src]
Pin
Implementations
impl<MODE> PD7<MODE> where
MODE: Active,
[src]
MODE: Active,
pub fn into_analog(self, ctl0: &mut CTL0) -> PD7<Analog>
[src]
Configures the pin to serve as an analog input pin.
pub fn into_floating_input(self, ctl0: &mut CTL0) -> PD7<Input<Floating>>
[src]
Configures the pin to serve as a floating input pin.
pub fn into_pull_down_input(
self,
ctl0: &mut CTL0,
octl: &mut OCTL
) -> PD7<Input<PullDown>>
[src]
self,
ctl0: &mut CTL0,
octl: &mut OCTL
) -> PD7<Input<PullDown>>
Configures the pin to serve as a pull down input pin.
pub fn into_pull_up_input(
self,
ctl0: &mut CTL0,
octl: &mut OCTL
) -> PD7<Input<PullUp>>
[src]
self,
ctl0: &mut CTL0,
octl: &mut OCTL
) -> PD7<Input<PullUp>>
Configures the pin to serve as a pull up input pin.
pub fn into_push_pull_output(self, ctl0: &mut CTL0) -> PD7<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, ctl0: &mut CTL0) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Alternate<PushPull>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Alternate<OpenDrain>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Output<PushPull>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Output<OpenDrain>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Alternate<PushPull>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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,
ctl0: &mut CTL0
) -> PD7<Alternate<OpenDrain>>
[src]
self,
ctl0: &mut CTL0
) -> PD7<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<PD7<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> PD7<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 PD7<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 PD7<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 PD7<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 PD7<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 PD7<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 PD7<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 PD7<Output<MODE>>
[src]
impl<MODE> ToggleableOutputPin for PD7<Alternate<MODE>>
[src]
Auto Trait Implementations
impl<MODE> Send for PD7<MODE> where
MODE: Send,
MODE: Send,
impl<MODE> Sync for PD7<MODE> where
MODE: Sync,
MODE: Sync,
impl<MODE> Unpin for PD7<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>,