esp_hal::gpio

Struct AnyPin

Source
pub struct AnyPin(/* private fields */);
Expand description

Type-erased GPIO pin

Implementations§

Source§

impl AnyPin

Source

pub fn split(self) -> (InputSignal, OutputSignal)

Split the pin into an input and output signal.

Peripheral signals allow connecting peripherals together without using external hardware.

Trait Implementations§

Source§

impl From<GpioPin<0>> for AnyPin

Source§

fn from(pin: GpioPin<0>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<1>> for AnyPin

Source§

fn from(pin: GpioPin<1>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<10>> for AnyPin

Source§

fn from(pin: GpioPin<10>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<11>> for AnyPin

Source§

fn from(pin: GpioPin<11>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<12>> for AnyPin

Source§

fn from(pin: GpioPin<12>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<13>> for AnyPin

Source§

fn from(pin: GpioPin<13>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<14>> for AnyPin

Source§

fn from(pin: GpioPin<14>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<15>> for AnyPin

Source§

fn from(pin: GpioPin<15>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<16>> for AnyPin

Source§

fn from(pin: GpioPin<16>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<17>> for AnyPin

Source§

fn from(pin: GpioPin<17>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<18>> for AnyPin

Source§

fn from(pin: GpioPin<18>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<19>> for AnyPin

Source§

fn from(pin: GpioPin<19>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<2>> for AnyPin

Source§

fn from(pin: GpioPin<2>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<20>> for AnyPin

Source§

fn from(pin: GpioPin<20>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<21>> for AnyPin

Source§

fn from(pin: GpioPin<21>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<22>> for AnyPin

Source§

fn from(pin: GpioPin<22>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<23>> for AnyPin

Source§

fn from(pin: GpioPin<23>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<24>> for AnyPin

Source§

fn from(pin: GpioPin<24>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<25>> for AnyPin

Source§

fn from(pin: GpioPin<25>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<26>> for AnyPin

Source§

fn from(pin: GpioPin<26>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<27>> for AnyPin

Source§

fn from(pin: GpioPin<27>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<28>> for AnyPin

Source§

fn from(pin: GpioPin<28>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<29>> for AnyPin

Source§

fn from(pin: GpioPin<29>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<3>> for AnyPin

Source§

fn from(pin: GpioPin<3>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<30>> for AnyPin

Source§

fn from(pin: GpioPin<30>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<4>> for AnyPin

Source§

fn from(pin: GpioPin<4>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<5>> for AnyPin

Source§

fn from(pin: GpioPin<5>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<6>> for AnyPin

Source§

fn from(pin: GpioPin<6>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<7>> for AnyPin

Source§

fn from(pin: GpioPin<7>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<8>> for AnyPin

Source§

fn from(pin: GpioPin<8>) -> Self

Converts to this type from the input type.
Source§

impl From<GpioPin<9>> for AnyPin

Source§

fn from(pin: GpioPin<9>) -> Self

Converts to this type from the input type.
Source§

impl Peripheral for AnyPin

Source§

type P = AnyPin

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&self) -> Self

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more
Source§

fn map_into<U>(self) -> U
where Self::P: Into<U>, U: Peripheral<P = U>,

Map the peripheral using Into. Read more
Source§

impl Pin for AnyPin

Source§

fn number(&self) -> u8

GPIO number
Source§

fn degrade(self) -> AnyPin
where Self: Sized,

Type-erase (degrade) this pin into an AnyPin. Read more
Source§

impl RtcPin for AnyPin

Source§

fn rtc_set_config(&mut self, input_enable: bool, mux: bool, func: RtcFunction)

Configure the pin
Source§

fn rtcio_pad_hold(&mut self, enable: bool)

Enable or disable PAD_HOLD
Source§

unsafe fn apply_wakeup(&mut self, wakeup: bool, level: u8)

Safety Read more
Source§

impl RtcPinWithResistors for AnyPin

Source§

fn rtcio_pullup(&mut self, enable: bool)

Enable/disable the internal pull-up resistor
Source§

fn rtcio_pulldown(&mut self, enable: bool)

Enable/disable the internal pull-down resistor
Source§

impl InputPin for AnyPin

Source§

impl OutputPin for AnyPin

Auto Trait Implementations§

§

impl Freeze for AnyPin

§

impl RefUnwindSafe for AnyPin

§

impl Send for AnyPin

§

impl Sync for AnyPin

§

impl Unpin for AnyPin

§

impl UnwindSafe for AnyPin

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>,

Source§

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>,

Source§

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.
Source§

impl<P> PeripheralInput for P
where P: InputPin,

Source§

impl<P> PeripheralOutput for P
where P: OutputPin,