Skip to main content

AnyPin

Struct AnyPin 

Source
pub struct AnyPin { /* private fields */ }
Expand description

Type-erased GPIO pin

Implementations§

Source§

impl AnyPin

Source

pub unsafe fn steal(pin_port: PinId) -> Peri<'static, Self>

Unsafely create an AnyPin from a PinId number.

§Safety

This only works for valid port + pin combinations. Consult the reference manual to see which ports and pins your MCU has.

Trait Implementations§

Source§

impl Clone for AnyPin

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AnyPin

Source§

impl From<P000> for AnyPin

Source§

fn from(val: P000) -> Self

Converts to this type from the input type.
Source§

impl From<P001> for AnyPin

Source§

fn from(val: P001) -> Self

Converts to this type from the input type.
Source§

impl From<P002> for AnyPin

Source§

fn from(val: P002) -> Self

Converts to this type from the input type.
Source§

impl From<P003> for AnyPin

Source§

fn from(val: P003) -> Self

Converts to this type from the input type.
Source§

impl From<P004> for AnyPin

Source§

fn from(val: P004) -> Self

Converts to this type from the input type.
Source§

impl From<P010> for AnyPin

Source§

fn from(val: P010) -> Self

Converts to this type from the input type.
Source§

impl From<P011> for AnyPin

Source§

fn from(val: P011) -> Self

Converts to this type from the input type.
Source§

impl From<P012> for AnyPin

Source§

fn from(val: P012) -> Self

Converts to this type from the input type.
Source§

impl From<P013> for AnyPin

Source§

fn from(val: P013) -> Self

Converts to this type from the input type.
Source§

impl From<P014> for AnyPin

Source§

fn from(val: P014) -> Self

Converts to this type from the input type.
Source§

impl From<P015> for AnyPin

Source§

fn from(val: P015) -> Self

Converts to this type from the input type.
Source§

impl From<P100> for AnyPin

Source§

fn from(val: P100) -> Self

Converts to this type from the input type.
Source§

impl From<P101> for AnyPin

Source§

fn from(val: P101) -> Self

Converts to this type from the input type.
Source§

impl From<P102> for AnyPin

Source§

fn from(val: P102) -> Self

Converts to this type from the input type.
Source§

impl From<P103> for AnyPin

Source§

fn from(val: P103) -> Self

Converts to this type from the input type.
Source§

impl From<P104> for AnyPin

Source§

fn from(val: P104) -> Self

Converts to this type from the input type.
Source§

impl From<P105> for AnyPin

Source§

fn from(val: P105) -> Self

Converts to this type from the input type.
Source§

impl From<P106> for AnyPin

Source§

fn from(val: P106) -> Self

Converts to this type from the input type.
Source§

impl From<P107> for AnyPin

Source§

fn from(val: P107) -> Self

Converts to this type from the input type.
Source§

impl From<P108> for AnyPin

Source§

fn from(val: P108) -> Self

Converts to this type from the input type.
Source§

impl From<P109> for AnyPin

Source§

fn from(val: P109) -> Self

Converts to this type from the input type.
Source§

impl From<P110> for AnyPin

Source§

fn from(val: P110) -> Self

Converts to this type from the input type.
Source§

impl From<P111> for AnyPin

Source§

fn from(val: P111) -> Self

Converts to this type from the input type.
Source§

impl From<P112> for AnyPin

Source§

fn from(val: P112) -> Self

Converts to this type from the input type.
Source§

impl From<P113> for AnyPin

Source§

fn from(val: P113) -> Self

Converts to this type from the input type.
Source§

impl From<P200> for AnyPin

Source§

fn from(val: P200) -> Self

Converts to this type from the input type.
Source§

impl From<P201> for AnyPin

Source§

fn from(val: P201) -> Self

Converts to this type from the input type.
Source§

impl From<P204> for AnyPin

Source§

fn from(val: P204) -> Self

Converts to this type from the input type.
Source§

impl From<P205> for AnyPin

Source§

fn from(val: P205) -> Self

Converts to this type from the input type.
Source§

impl From<P206> for AnyPin

Source§

fn from(val: P206) -> Self

Converts to this type from the input type.
Source§

impl From<P212> for AnyPin

Source§

fn from(val: P212) -> Self

Converts to this type from the input type.
Source§

impl From<P213> for AnyPin

Source§

fn from(val: P213) -> Self

Converts to this type from the input type.
Source§

impl From<P214> for AnyPin

Source§

fn from(val: P214) -> Self

Converts to this type from the input type.
Source§

impl From<P215> for AnyPin

Source§

fn from(val: P215) -> Self

Converts to this type from the input type.
Source§

impl From<P300> for AnyPin

Source§

fn from(val: P300) -> Self

Converts to this type from the input type.
Source§

impl From<P301> for AnyPin

Source§

fn from(val: P301) -> Self

Converts to this type from the input type.
Source§

impl From<P302> for AnyPin

Source§

fn from(val: P302) -> Self

Converts to this type from the input type.
Source§

impl From<P303> for AnyPin

Source§

fn from(val: P303) -> Self

Converts to this type from the input type.
Source§

impl From<P304> for AnyPin

Source§

fn from(val: P304) -> Self

Converts to this type from the input type.
Source§

impl From<P400> for AnyPin

Source§

fn from(val: P400) -> Self

Converts to this type from the input type.
Source§

impl From<P401> for AnyPin

Source§

fn from(val: P401) -> Self

Converts to this type from the input type.
Source§

impl From<P402> for AnyPin

Source§

fn from(val: P402) -> Self

Converts to this type from the input type.
Source§

impl From<P407> for AnyPin

Source§

fn from(val: P407) -> Self

Converts to this type from the input type.
Source§

impl From<P408> for AnyPin

Source§

fn from(val: P408) -> Self

Converts to this type from the input type.
Source§

impl From<P409> for AnyPin

Source§

fn from(val: P409) -> Self

Converts to this type from the input type.
Source§

impl From<P410> for AnyPin

Source§

fn from(val: P410) -> Self

Converts to this type from the input type.
Source§

impl From<P411> for AnyPin

Source§

fn from(val: P411) -> Self

Converts to this type from the input type.
Source§

impl From<P500> for AnyPin

Source§

fn from(val: P500) -> Self

Converts to this type from the input type.
Source§

impl From<P501> for AnyPin

Source§

fn from(val: P501) -> Self

Converts to this type from the input type.
Source§

impl From<P502> for AnyPin

Source§

fn from(val: P502) -> Self

Converts to this type from the input type.
Source§

impl From<P914> for AnyPin

Source§

fn from(val: P914) -> Self

Converts to this type from the input type.
Source§

impl From<P915> for AnyPin

Source§

fn from(val: P915) -> Self

Converts to this type from the input type.
Source§

impl PeripheralType for AnyPin

Source§

impl Pin for AnyPin

Source§

fn pin(&self) -> u8

Number of the pin within the port, typically 0..16. Read more
Source§

fn port(&self) -> u8

Port of the pin
Source§

fn pin_port(&self) -> PinId

Encoded port+pin number of the pin

Auto Trait Implementations§

§

impl Forget for AnyPin

§

impl Freeze for AnyPin

§

impl Move for AnyPin

§

impl RefUnwindSafe for AnyPin

§

impl Send for AnyPin

§

impl Sync for AnyPin

§

impl Unpin for AnyPin

§

impl UnsafeUnpin 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.