pub struct Pins {
Show 34 fields pub a0: Pin<PA02, Reset>, pub a1: Pin<PA05, Reset>, pub a2: Pin<PA06, Reset>, pub a3: Pin<PA04, Reset>, pub a4: Pin<PB08, Reset>, pub a5: Pin<PB09, Reset>, pub d0: Pin<PA23, Reset>, pub d1: Pin<PA22, Reset>, pub d2: Pin<PB17, Reset>, pub d3: Pin<PB16, Reset>, pub d4: Pin<PB13, Reset>, pub d5: Pin<PB14, Reset>, pub d6: Pin<PB15, Reset>, pub d7: Pin<PB12, Reset>, pub d8: Pin<PA21, Reset>, pub d9: Pin<PA20, Reset>, pub d10: Pin<PA18, Reset>, pub d11: Pin<PA19, Reset>, pub d12: Pin<PA17, Reset>, pub d13: Pin<PA16, Reset>, pub sda: Pin<PB02, Reset>, pub scl: Pin<PB03, Reset>, pub neopixel: Pin<PB22, Reset>, pub sclk: Pin<PA13, Reset>, pub mosi: Pin<PA12, Reset>, pub miso: Pin<PA14, Reset>, pub flash_sclk: Pin<PB10, Reset>, pub flash_cs: Pin<PB11, Reset>, pub flash_d0: Pin<PA08, Reset>, pub flash_d1: Pin<PA09, Reset>, pub flash_d2: Pin<PA10, Reset>, pub flash_d3: Pin<PA11, Reset>, pub usb_dm: Pin<PA24, Reset>, pub usb_dp: Pin<PA25, 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>

Analog pin 0. Can act as a true analog output as it has a DAC (which is not currently supported by this hal) as well as input.

a1: Pin<PA05, Reset>

Analog Pin 1

a2: Pin<PA06, Reset>

Analog Pin 2

a3: Pin<PA04, Reset>

Analog Pin 3

a4: Pin<PB08, Reset>

Analog Pin 4

a5: Pin<PB09, Reset>

Analog Pin 5

d0: Pin<PA23, Reset>

Pin 0, rx. This field can also be accessed using the pin_alias! macro with the following alternate names:

uart_rx,

d1: Pin<PA22, Reset>

Pin 1, tx. This field can also be accessed using the pin_alias! macro with the following alternate names:

uart_tx,

d2: Pin<PB17, Reset>

Pin 2

d3: Pin<PB16, Reset>

Pin 3

d4: Pin<PB13, Reset>

Pin 4

d5: Pin<PB14, Reset>

Pin 5

d6: Pin<PB15, Reset>

Pin 6

d7: Pin<PB12, Reset>

Pin 7

d8: Pin<PA21, Reset>

Pin 8

d9: Pin<PA20, Reset>

Pin 9

d10: Pin<PA18, Reset>

Pin 10

d11: Pin<PA19, Reset>

Pin 11

d12: Pin<PA17, Reset>

Pin 12

d13: Pin<PA16, Reset>

Digital pin number 13, which is also attached to the red LED. PWM capable. This field can also be accessed using the pin_alias! macro with the following alternate names:

red_led,

sda: Pin<PB02, Reset>

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

sda,

scl: Pin<PB03, Reset>

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

scl,

neopixel: Pin<PB22, Reset>

The data line attached to the neopixel. Is also attached to SWCLK.

sclk: Pin<PA13, Reset>

The SPI SCLK attached the to 2x3 header This field can also be accessed using the pin_alias! macro with the following alternate names:

sclk,

mosi: Pin<PA12, Reset>

The SPI MOSI attached the to 2x3 header This field can also be accessed using the pin_alias! macro with the following alternate names:

mosi,

miso: Pin<PA14, Reset>

The SPI MISO attached the to 2x3 header This field can also be accessed using the pin_alias! macro with the following alternate names:

miso,

flash_sclk: Pin<PB10, Reset>

The SCK pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_sclk,

flash_cs: Pin<PB11, Reset>

The CS pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_cs,

flash_d0: Pin<PA08, Reset>

The D0 pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_d0,

flash_d1: Pin<PA09, Reset>

The D1 pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_d1,

flash_d2: Pin<PA10, Reset>

The D1 pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_d2,

flash_d3: Pin<PA11, Reset>

The D1 pin attached to the on-board SPI flash This field can also be accessed using the pin_alias! macro with the following alternate names:

flash_d3,

usb_dm: Pin<PA24, Reset>

The USB D- pad This field can also be accessed using the pin_alias! macro with the following alternate names:

usb_dm,

usb_dp: Pin<PA25, Reset>

The USB D+ pad This field can also be accessed using the pin_alias! macro with the following alternate names:

usb_dp,

Implementations

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

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.