Struct e310x_hal::gpio::gpio0::Pin2

source ·
pub struct Pin2<MODE> { /* private fields */ }
Expand description

Pin

Implementations§

source§

impl<MODE> Pin2<MODE>

source

pub fn into_iof0(self) -> Pin2<IOF0<NoInvert>>

Configures the pin to serve as alternate function 0 (AF0)

source

pub fn into_iof1(self) -> Pin2<IOF1<NoInvert>>

Configures the pin to serve as alternate function 1 (AF1)

source

pub fn into_inverted_iof0(self) -> Pin2<IOF0<Invert>>

Configures the pin to serve as inverted alternate function 0 (AF0)

source

pub fn into_inverted_iof1(self) -> Pin2<IOF1<Invert>>

Configures the pin to serve as inverted alternate function 1 (AF1)

source

pub fn into_floating_input(self) -> Pin2<Input<Floating>>

Configures the pin to serve as a floating input pin

source

pub fn into_pull_up_input(self) -> Pin2<Input<PullUp>>

Configures the pin to operate as a pulled down input pin

source

pub fn into_output(self) -> Pin2<Output<Regular<NoInvert>>>

Configures the pin to operate as an output pin

source

pub fn into_inverted_output(self) -> Pin2<Output<Regular<Invert>>>

Configures the pin to operate as an inverted output pin

source

pub fn into_output_drive(self) -> Pin2<Output<Drive<NoInvert>>>

Configure the pin to operate as an output pin with high current drive

source

pub fn into_inverted_output_drive(self) -> Pin2<Output<Drive<Invert>>>

Configure the pin to operate as an inverted output pin with high current drive

Trait Implementations§

source§

impl<MODE> InputPin for Pin2<Input<MODE>>

§

type Error = Infallible

Error type
source§

fn is_high(&self) -> Result<bool, Infallible>

Is the input pin high?
source§

fn is_low(&self) -> Result<bool, Infallible>

Is the input pin low?
source§

impl<MODE> OutputPin for Pin2<Output<MODE>>

§

type Error = Infallible

Error type
source§

fn set_high(&mut self) -> Result<(), Infallible>

Drives the pin high Read more
source§

fn set_low(&mut self) -> Result<(), Infallible>

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 Pin2<Output<MODE>>

source§

fn is_set_high(&self) -> Result<bool, Infallible>

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

fn is_set_low(&self) -> Result<bool, Infallible>

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

impl<MODE> ToggleableOutputPin for Pin2<Output<MODE>>

source§

fn toggle(&mut self) -> Result<(), Infallible>

Toggles the pin state.

§

type Error = Infallible

Error type
source§

impl Pin<PWM0> for Pin2<IOF1<NoInvert>>

source§

impl PinCS<QSPI1> for Pin2<IOF0<NoInvert>>

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.