Struct gd32f1x0_hal::gpio::gpioa::PA0

source ·
pub struct PA0<MODE> { /* private fields */ }

Implementations§

source§

impl PA0<Debugger>

source

pub fn activate(self) -> PA0<Input<Floating>>

source§

impl<MODE> PA0<MODE>
where MODE: Active,

source

pub fn into_floating_input(self, config: &mut Config) -> PA0<Input<Floating>>

Configures the pin to operate as a floating input.

source

pub fn into_pull_up_input(self, config: &mut Config) -> PA0<Input<PullUp>>

Configures the pin to operate as a pulled down input.

source

pub fn into_pull_down_input(self, config: &mut Config) -> PA0<Input<PullDown>>

Configures the pin to operate as a pulled down input.

source

pub fn into_analog(self, config: &mut Config) -> PA0<Analog>

Configures the pin to operate as an analog input or output.

source

pub fn into_open_drain_output( self, config: &mut Config ) -> PA0<Output<OpenDrain>>

Configures the pin to operate as an open drain output.

source

pub fn into_push_pull_output(self, config: &mut Config) -> PA0<Output<PushPull>>

Configures the pin to operate as an open drain output.

source

pub fn downgrade(self) -> Pin<MODE>

Erases the pin number and port from the type.

source§

impl<MODE> PA0<Output<MODE>>

source

pub fn set_speed(&mut self, config: &mut Config, speed: Speed)

Configures the max slew rate of the pin

source§

impl<MODE> PA0<MODE>
where MODE: Active,

source

pub fn into_alternate<AFN: AF>( self, config: &mut Config, pull_mode: PullMode, output_mode: OutputMode ) -> PA0<Alternate<AFN>>

Configures the pin to operate as an alternate function.

source§

impl<AFN> PA0<Alternate<AFN>>

source

pub fn set_speed(&mut self, config: &mut Config, speed: Speed)

Configures the max slew rate of the pin

Trait Implementations§

source§

impl Channel<Adc> for PA0<Analog>

source§

impl<MODE> ErrorType for PA0<MODE>

§

type Error = Infallible

Error type
source§

impl<MODE> InputPin for PA0<Input<MODE>>

source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?
source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?
source§

impl InputPin for PA0<Output<OpenDrain>>

source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?
source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?
source§

impl<MODE> OutputPin for PA0<Output<MODE>>

source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high. Read more
source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low. Read more
source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value. Read more
source§

impl<MODE> StatefulOutputPin for PA0<Output<MODE>>

source§

fn is_set_high(&mut self) -> Result<bool, Self::Error>

Is the pin in drive high mode? Read more
source§

fn is_set_low(&mut self) -> Result<bool, Self::Error>

Is the pin in drive low mode? Read more
source§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle pin output.
source§

impl Pin<Timer1, Ch0> for PA0<Alternate<AF2>>

source§

impl SclPin<I2c1> for PA0<Alternate<AF4>>

Auto Trait Implementations§

§

impl<MODE> Freeze for PA0<MODE>
where MODE: Freeze,

§

impl<MODE> RefUnwindSafe for PA0<MODE>
where MODE: RefUnwindSafe,

§

impl<MODE> Send for PA0<MODE>
where MODE: Send,

§

impl<MODE> Sync for PA0<MODE>
where MODE: Sync,

§

impl<MODE> Unpin for PA0<MODE>
where MODE: Unpin,

§

impl<MODE> UnwindSafe for PA0<MODE>
where MODE: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.