[]Struct circuit_playground_express::Pins

pub struct Pins {
    pub port: Port,
    pub rx: Pb9<Input<Floating>>,
    pub tx: Pb8<Input<Floating>>,
    pub d4: Pa28<Input<Floating>>,
    pub d5: Pa14<Input<Floating>>,
    pub d7: Pa15<Input<Floating>>,
    pub d11: Pa30<Input<Floating>>,
    pub d13: Pa17<Input<Floating>>,
    pub sda: Pb2<Input<Floating>>,
    pub scl: Pb3<Input<Floating>>,
    pub neopixel: Pb23<Input<Floating>>,
    pub speaker: Pa2<Input<Floating>>,
    pub sck: Pa5<Input<Floating>>,
    pub mosi: Pa7<Input<Floating>>,
    pub miso: Pa6<Input<Floating>>,
    pub flash_sck: Pa21<Input<Floating>>,
    pub flash_mosi: Pa20<Input<Floating>>,
    pub flash_miso: Pa16<Input<Floating>>,
    pub flash_cs: Pb22<Input<Floating>>,
}

Maps the pins to their arduino names and the numbers printed on the board.

Fields

port: Port

Opaque port reference

rx: Pb9<Input<Floating>>

Pin 0, rx. Also analog input (A6)

tx: Pb8<Input<Floating>>

Pin 1, tx. Also analog input (A7)

d4: Pa28<Input<Floating>>

Pin 4, button A.

d5: Pa14<Input<Floating>>

Pin 5, button B.

d7: Pa15<Input<Floating>>

Pin 7, slide switch.

d11: Pa30<Input<Floating>>

Pin 11, speaker enable.

d13: Pa17<Input<Floating>>

Digital pin number 13, which is also attached to the red LED. PWM capable.

sda: Pb2<Input<Floating>>

The I2C SDA. Also D2 and A5.

scl: Pb3<Input<Floating>>

The I2C SCL. Also D3 and A4

neopixel: Pb23<Input<Floating>>

The data line attached to the neopixel. Also D8.

speaker: Pa2<Input<Floating>>

The line attached to the speaker. Also D12 and A0.

sck: Pa5<Input<Floating>>

The SPI SCK. Also D6 and A1

mosi: Pa7<Input<Floating>>

The SPI MOSI. Also D10 and A3

miso: Pa6<Input<Floating>>

The SPI MISO. Also D9 and A2

flash_sck: Pa21<Input<Floating>>

The SCK pin attached to the on-board SPI flash

flash_mosi: Pa20<Input<Floating>>

The MOSI pin attached to the on-board SPI flash

flash_miso: Pa16<Input<Floating>>

The MISO pin attached to the on-board SPI flash

flash_cs: Pb22<Input<Floating>>

The CS pin attached to the on-board SPI flash

Methods

impl Pins

pub fn new(port: PORT) -> Self

Auto Trait Implementations

impl Send for Pins

impl Sync for Pins

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]