Struct circuit_playground_express::pins::Pins[][src]

pub struct Pins {
Show 22 fields pub a6: Pin<PB09, Reset>, pub a7: Pin<PB08, Reset>, pub d4: Pin<PA28, Reset>, pub d5: Pin<PA14, Reset>, pub d7: Pin<PA15, Reset>, pub d11: Pin<PA30, Reset>, pub d13: Pin<PA17, Reset>, pub a5: Pin<PB02, Reset>, pub a4: Pin<PB03, Reset>, pub d8: Pin<PB23, Reset>, pub a0: Pin<PA02, Reset>, pub a1: Pin<PA05, Reset>, pub a3: Pin<PA07, Reset>, pub a2: Pin<PA06, Reset>, pub flash_sck: Pin<PA21, Reset>, pub flash_mosi: Pin<PA20, Reset>, pub flash_miso: Pin<PA16, Reset>, pub flash_cs: Pin<PB22, Reset>, pub accel_sda: Pin<PA00, Reset>, pub accel_scl: Pin<PA01, Reset>, pub usb_dm: Pin<PA24, Reset>, pub usb_dp: Pin<PA25, Reset>, // some fields omitted
}
Expand description

BSP replacement for the HAL Pins type

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

Fields

a6: Pin<PB09, Reset>

Pin 0, rx. Also analog input (A6) This field can also be accessed using the pin_alias! macro with the following alternate names: uart_rx,

a7: Pin<PB08, Reset>

Pin 1, tx. Also analog input (A7) This field can also be accessed using the pin_alias! macro with the following alternate names: uart_tx,

d4: Pin<PA28, Reset>

Pin 4, button A.

d5: Pin<PA14, Reset>

Pin 5, button B.

d7: Pin<PA15, Reset>

Pin 7, slide switch.

d11: Pin<PA30, Reset>

Pin 11, speaker enable.

d13: Pin<PA17, 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,

a5: Pin<PB02, Reset>

The I2C SDA. Also D2 and A5. This field can also be accessed using the pin_alias! macro with the following alternate names: sda,

a4: Pin<PB03, Reset>

The I2C SCL. Also D3 and A4 This field can also be accessed using the pin_alias! macro with the following alternate names: scl,

d8: Pin<PB23, Reset>

The data line attached to the neopixel. Also D8. This field can also be accessed using the pin_alias! macro with the following alternate names: neo_pixel,

a0: Pin<PA02, Reset>

The line attached to the speaker. Also D12 and A0. This field can also be accessed using the pin_alias! macro with the following alternate names: speaker,

a1: Pin<PA05, Reset>

The SPI SCK. Also D6 and A1 This field can also be accessed using the pin_alias! macro with the following alternate names: sck,

a3: Pin<PA07, Reset>

The SPI MOSI. Also D10 and A3 This field can also be accessed using the pin_alias! macro with the following alternate names: mosi,

a2: Pin<PA06, Reset>

The SPI MISO. Also D9 and A2 This field can also be accessed using the pin_alias! macro with the following alternate names: miso,

flash_sck: Pin<PA21, 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_sck,

flash_mosi: Pin<PA20, Reset>

The MOSI 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_mosi,

flash_miso: Pin<PA16, Reset>

The MISO 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_miso,

flash_cs: Pin<PB22, 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,

accel_sda: Pin<PA00, Reset>accel_scl: Pin<PA01, Reset>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

Performs the conversion.

Performs the conversion.

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.