Struct GpioPin

Source
#[non_exhaustive]
pub struct GpioPin<const GPIONUM: u8>;
Expand description

GPIO pin

Implementations§

Source§

impl<const GPIONUM: u8> GpioPin<GPIONUM>
where Self: Pin,

Source

pub unsafe fn steal() -> Self

Create a pin out of thin air.

§Safety

Ensure that only one instance of a pin exists at one time.

Source

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

Available on crate feature unstable only.

Split the pin into an input and output signal.

Peripheral signals allow connecting peripherals together without using external hardware.

let (rx, tx) = peripherals.GPIO2.split();
§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Trait Implementations§

Source§

impl AdcChannel for GpioPin<0>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 0u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<1>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 1u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<2>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 2u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<3>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 3u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<4>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 4u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<5>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 5u8

Channel number used by the ADC
Source§

impl AdcChannel for GpioPin<6>

Available on crate feature unstable only.
Source§

const CHANNEL: u8 = 6u8

Channel number used by the ADC
Source§

impl<const GPIONUM: u8> Debug for GpioPin<GPIONUM>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const GPIONUM: u8> Format for GpioPin<GPIONUM>

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
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<const GPIONUM: u8> Peripheral for GpioPin<GPIONUM>
where Self: Pin,

Source§

type P = GpioPin<GPIONUM>

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&self) -> Self::P

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§

fn map<U>(self, transform: impl FnOnce(Self::P) -> U) -> U
where U: Peripheral<P = U>,

Map the peripheral using Into. Read more
Source§

impl Pin for GpioPin<0>

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 Pin for GpioPin<1>

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 Pin for GpioPin<10>

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 Pin for GpioPin<11>

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 Pin for GpioPin<12>

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 Pin for GpioPin<13>

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 Pin for GpioPin<14>

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 Pin for GpioPin<15>

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 Pin for GpioPin<16>

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 Pin for GpioPin<17>

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 Pin for GpioPin<18>

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 Pin for GpioPin<19>

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 Pin for GpioPin<2>

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 Pin for GpioPin<20>

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 Pin for GpioPin<21>

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 Pin for GpioPin<22>

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 Pin for GpioPin<23>

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 Pin for GpioPin<24>

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 Pin for GpioPin<25>

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 Pin for GpioPin<26>

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 Pin for GpioPin<27>

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 Pin for GpioPin<28>

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 Pin for GpioPin<29>

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 Pin for GpioPin<3>

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 Pin for GpioPin<30>

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 Pin for GpioPin<4>

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 Pin for GpioPin<5>

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 Pin for GpioPin<6>

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 Pin for GpioPin<7>

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 Pin for GpioPin<8>

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 Pin for GpioPin<9>

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 AnalogPin for GpioPin<0>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<1>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<2>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<3>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<4>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<5>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<6>

Available on crate feature unstable only.
Source§

impl AnalogPin for GpioPin<7>

Available on crate feature unstable only.
Source§

impl InputPin for GpioPin<0>

Source§

impl InputPin for GpioPin<1>

Source§

impl InputPin for GpioPin<10>

Source§

impl InputPin for GpioPin<11>

Source§

impl InputPin for GpioPin<12>

Source§

impl InputPin for GpioPin<13>

Source§

impl InputPin for GpioPin<14>

Source§

impl InputPin for GpioPin<15>

Source§

impl InputPin for GpioPin<16>

Source§

impl InputPin for GpioPin<17>

Source§

impl InputPin for GpioPin<18>

Source§

impl InputPin for GpioPin<19>

Source§

impl InputPin for GpioPin<2>

Source§

impl InputPin for GpioPin<20>

Source§

impl InputPin for GpioPin<21>

Source§

impl InputPin for GpioPin<22>

Source§

impl InputPin for GpioPin<23>

Source§

impl InputPin for GpioPin<24>

Source§

impl InputPin for GpioPin<25>

Source§

impl InputPin for GpioPin<26>

Source§

impl InputPin for GpioPin<27>

Source§

impl InputPin for GpioPin<28>

Source§

impl InputPin for GpioPin<29>

Source§

impl InputPin for GpioPin<3>

Source§

impl InputPin for GpioPin<30>

Source§

impl InputPin for GpioPin<4>

Source§

impl InputPin for GpioPin<5>

Source§

impl InputPin for GpioPin<6>

Source§

impl InputPin for GpioPin<7>

Source§

impl InputPin for GpioPin<8>

Source§

impl InputPin for GpioPin<9>

Source§

impl OutputPin for GpioPin<0>

Source§

impl OutputPin for GpioPin<1>

Source§

impl OutputPin for GpioPin<10>

Source§

impl OutputPin for GpioPin<11>

Source§

impl OutputPin for GpioPin<12>

Source§

impl OutputPin for GpioPin<13>

Source§

impl OutputPin for GpioPin<14>

Source§

impl OutputPin for GpioPin<15>

Source§

impl OutputPin for GpioPin<16>

Source§

impl OutputPin for GpioPin<17>

Source§

impl OutputPin for GpioPin<18>

Source§

impl OutputPin for GpioPin<19>

Source§

impl OutputPin for GpioPin<2>

Source§

impl OutputPin for GpioPin<20>

Source§

impl OutputPin for GpioPin<21>

Source§

impl OutputPin for GpioPin<22>

Source§

impl OutputPin for GpioPin<23>

Source§

impl OutputPin for GpioPin<24>

Source§

impl OutputPin for GpioPin<25>

Source§

impl OutputPin for GpioPin<26>

Source§

impl OutputPin for GpioPin<27>

Source§

impl OutputPin for GpioPin<28>

Source§

impl OutputPin for GpioPin<29>

Source§

impl OutputPin for GpioPin<3>

Source§

impl OutputPin for GpioPin<30>

Source§

impl OutputPin for GpioPin<4>

Source§

impl OutputPin for GpioPin<5>

Source§

impl OutputPin for GpioPin<6>

Source§

impl OutputPin for GpioPin<7>

Source§

impl OutputPin for GpioPin<8>

Source§

impl OutputPin for GpioPin<9>

Source§

impl RtcPin for GpioPin<0>

Source§

impl RtcPin for GpioPin<1>

Source§

impl RtcPin for GpioPin<2>

Source§

impl RtcPin for GpioPin<3>

Source§

impl RtcPin for GpioPin<4>

Source§

impl RtcPin for GpioPin<5>

Source§

impl RtcPin for GpioPin<6>

Source§

impl RtcPin for GpioPin<7>

Source§

impl RtcPinWithResistors for GpioPin<0>

Source§

impl RtcPinWithResistors for GpioPin<1>

Source§

impl RtcPinWithResistors for GpioPin<2>

Source§

impl RtcPinWithResistors for GpioPin<3>

Source§

impl RtcPinWithResistors for GpioPin<4>

Source§

impl RtcPinWithResistors for GpioPin<5>

Source§

impl RtcPinWithResistors for GpioPin<6>

Source§

impl RtcPinWithResistors for GpioPin<7>

Auto Trait Implementations§

§

impl<const GPIONUM: u8> Freeze for GpioPin<GPIONUM>

§

impl<const GPIONUM: u8> RefUnwindSafe for GpioPin<GPIONUM>

§

impl<const GPIONUM: u8> Send for GpioPin<GPIONUM>

§

impl<const GPIONUM: u8> Sync for GpioPin<GPIONUM>

§

impl<const GPIONUM: u8> Unpin for GpioPin<GPIONUM>

§

impl<const GPIONUM: u8> UnwindSafe for GpioPin<GPIONUM>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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,