Struct samd11_bare::Pins

source ·
pub struct Pins {
    pub d1: Pin<PA05, Reset>,
    pub d2: Pin<PA08, Reset>,
    pub d3: Pin<PA09, Reset>,
    pub d4: Pin<PA14, Reset>,
    pub d5: Pin<PA15, Reset>,
    pub d6: Pin<PA28, Reset>,
    pub d7: Pin<PA30, Reset>,
    pub d8: Pin<PA31, Reset>,
    pub d9: Pin<PA24, Reset>,
    pub d10: Pin<PA25, Reset>,
    pub d13: Pin<PA02, Reset>,
    pub d14: Pin<PA04, Reset>,
    /* private fields */
}
Expand description

BSP replacement for the HAL Pins type

This type is intended to provide more meaningful names for the given pins.

Fields§

§d1: Pin<PA05, Reset>

This field can also be accessed using the pin_alias! macro with the following alternate names:

uart_rx,

§d2: Pin<PA08, Reset>

This field can also be accessed using the pin_alias! macro with the following alternate names:

led,

§d3: Pin<PA09, Reset>§d4: Pin<PA14, Reset>

This field can also be accessed using the pin_alias! macro with the following alternate names:

sda,

§d5: Pin<PA15, Reset>

This field can also be accessed using the pin_alias! macro with the following alternate names:

scl,

§d6: Pin<PA28, Reset>

RST pin

§d7: Pin<PA30, Reset>§d8: Pin<PA31, Reset>§d9: Pin<PA24, Reset>§d10: Pin<PA25, Reset>§d13: Pin<PA02, Reset>§d14: Pin<PA04, Reset>

This field can also be accessed using the pin_alias! macro with the following alternate names:

uart_tx,

Implementations§

source§

impl Pins

source

pub fn new(port: PORT) -> Self

Take ownership of the PAC [PORT] and split it into discrete [Pin]s.

This struct serves as a replacement for the HAL Pins struct. It is intended to provide more meaningful names for each [Pin] in a BSP. Any [Pin] not defined by the BSP is dropped.

PORT Pin Pins

source

pub unsafe fn port(&mut self) -> PORT

Take the PAC [PORT]

The [PORT] can only be taken once. Subsequent calls to this function will panic.

Safety

Direct access to the [PORT] could allow you to invalidate the compiler’s type-level tracking, so it is unsafe.

PORT

Auto Trait Implementations§

§

impl RefUnwindSafe for Pins

§

impl Send for Pins

§

impl !Sync for Pins

§

impl Unpin for Pins

§

impl UnwindSafe for Pins

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.