Struct Pins

Source
pub struct Pins {
Show 19 fields pub a0: Pin<PA02, Reset>, pub a1: Pin<PA03, Reset>, pub a2: Pin<PA04, Reset>, pub a3: Pin<PA05, Reset>, pub tx: Pin<PA06, Reset>, pub rx: Pin<PA07, Reset>, pub miso: Pin<PA09, Reset>, pub mosi: Pin<PA10, Reset>, pub sclk: Pin<PA11, Reset>, pub sda: Pin<PA16, Reset>, pub scl: Pin<PA17, Reset>, pub neopixel_power: Pin<PA15, Reset>, pub neopixel_data: Pin<PA18, Reset>, pub usb_dm: Pin<PA24, Reset>, pub usb_dp: Pin<PA25, Reset>, pub flash_cs: Pin<PA08, Reset>, pub flash_miso: Pin<PA19, Reset>, pub flash_mosi: Pin<PA22, Reset>, pub flash_sclk: Pin<PA23, 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§

§a0: Pin<PA02, Reset>

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

a0_reset,

§a1: Pin<PA03, Reset>

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

a1_reset,

§a2: Pin<PA04, Reset>

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

a2_reset,

§a3: Pin<PA05, Reset>

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

a3_reset,

§tx: Pin<PA06, Reset>

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

uart_tx, uart_tx_reset,

§rx: Pin<PA07, Reset>

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

uart_rx, uart_rx_reset,

§miso: Pin<PA09, Reset>

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

spi_miso, miso_reset,

§mosi: Pin<PA10, Reset>

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

spi_mosi, mosi_reset,

§sclk: Pin<PA11, Reset>

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

spi_sck, sck_reset,

§sda: Pin<PA16, Reset>

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

i2c_sda, i2c_sda_reset,

§scl: Pin<PA17, Reset>

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

i2c_scl, i2c_scl_reset,

§neopixel_power: Pin<PA15, Reset>

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

neopixel_power, neopixel_power_reset,

§neopixel_data: Pin<PA18, Reset>

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

neopixel_data, neopixel_data_reset,

§usb_dm: Pin<PA24, Reset>

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

usb_dm, usb_dm_reset,

§usb_dp: Pin<PA25, Reset>

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

usb_dp, usb_dp_reset,

§flash_cs: Pin<PA08, Reset>

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

flash_cs, flash_cs_reset,

§flash_miso: Pin<PA19, Reset>

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

flash_miso, flash_miso_reset,

§flash_mosi: Pin<PA22, Reset>

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

flash_mosi, flash_mosi_reset,

§flash_sclk: Pin<PA23, Reset>

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

flash_sck, flash_sck_reset,

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

Source§

impl Pins

Source

pub fn split(self) -> Sets

Splits this Pins into categorized sets of pins.

Auto Trait Implementations§

§

impl Freeze for Pins

§

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 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> Same for T

Source§

type Output = T

Should always be Self
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.