[]Struct metro_m0::Pins

pub struct Pins {
    pub port: Port,
    pub a0: Pa2<Input<Floating>>,
    pub a1: Pb8<Input<Floating>>,
    pub a2: Pb9<Input<Floating>>,
    pub a3: Pa4<Input<Floating>>,
    pub a4: Pa5<Input<Floating>>,
    pub a5: Pb2<Input<Floating>>,
    pub d0: Pa11<Input<Floating>>,
    pub d1: Pa10<Input<Floating>>,
    pub d2: Pa14<Input<Floating>>,
    pub d3: Pa9<Input<Floating>>,
    pub d4: Pa8<Input<Floating>>,
    pub d5: Pa15<Input<Floating>>,
    pub d6: Pa20<Input<Floating>>,
    pub d7: Pa21<Input<Floating>>,
    pub d8: Pa6<Input<Floating>>,
    pub d9: Pa7<Input<Floating>>,
    pub d10: Pa18<Input<Floating>>,
    pub d11: Pa16<Input<Floating>>,
    pub d12: Pa19<Input<Floating>>,
    pub d13: Pa17<Input<Floating>>,
    pub sda: Pa22<Input<Floating>>,
    pub scl: Pa23<Input<Floating>>,
    pub neopixel: Pa30<Input<Floating>>,
    pub sck: Pb11<Input<Floating>>,
    pub mosi: Pb10<Input<Floating>>,
    pub miso: Pa12<Input<Floating>>,
    pub flash_sck: Pb23<Input<Floating>>,
    pub flash_mosi: Pb22<Input<Floating>>,
    pub flash_miso: Pb3<Input<Floating>>,
    pub flash_cs: Pa13<Input<Floating>>,
    pub usb_dm: Pa24<Input<Floating>>,
    pub usb_dp: Pa25<Input<Floating>>,
}

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

Fields

port: Port

Opaque port reference

a0: Pa2<Input<Floating>>

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: Pb8<Input<Floating>>

Analog Pin 1

a2: Pb9<Input<Floating>>

Analog Pin 2

a3: Pa4<Input<Floating>>

Analog Pin 3

a4: Pa5<Input<Floating>>

Analog Pin 4

a5: Pb2<Input<Floating>>

Analog Pin 5

d0: Pa11<Input<Floating>>

Pin 0, rx. Also analog input (A6)

d1: Pa10<Input<Floating>>

Pin 1, tx. Also analog input (A7)

d2: Pa14<Input<Floating>>

Pin 2

d3: Pa9<Input<Floating>>

Pin 3, PWM capable

d4: Pa8<Input<Floating>>

Pin 4, PWM capable. Also analog input (A8)

d5: Pa15<Input<Floating>>

Pin 5, PWM capable. Also analog input (A9)

d6: Pa20<Input<Floating>>

Pin 6, PWM capable

d7: Pa21<Input<Floating>>

Pin 7

d8: Pa6<Input<Floating>>

Pin 8, PWM capable. Also analog input (A10)

d9: Pa7<Input<Floating>>

Pin 9, PWM capable. Also analog input (A11)

d10: Pa18<Input<Floating>>

Pin 10, PWM capable

d11: Pa16<Input<Floating>>

Pin 11, PWM capable

d12: Pa19<Input<Floating>>

Pin 12, PWM capable

d13: Pa17<Input<Floating>>

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

sda: Pa22<Input<Floating>>scl: Pa23<Input<Floating>>neopixel: Pa30<Input<Floating>>

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

sck: Pb11<Input<Floating>>

The SPI SCK attached the to 2x3 header

mosi: Pb10<Input<Floating>>

The SPI MOSI attached the to 2x3 header

miso: Pa12<Input<Floating>>

The SPI MISO attached the to 2x3 header

flash_sck: Pb23<Input<Floating>>

The SCK pin attached to the on-board SPI flash

flash_mosi: Pb22<Input<Floating>>

The MOSI pin attached to the on-board SPI flash

flash_miso: Pb3<Input<Floating>>

The MISO pin attached to the on-board SPI flash

flash_cs: Pa13<Input<Floating>>

The CS pin attached to the on-board SPI flash

usb_dm: Pa24<Input<Floating>>

The USB D- pad

usb_dp: Pa25<Input<Floating>>

The USB D+ pad

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]