Struct serpente::Pins

source ·
pub struct Pins {
Show 14 fields pub port: Port, pub d0: Pa4<Input<Floating>>, pub d1: Pa5<Input<Floating>>, pub d2: Pa6<Input<Floating>>, pub d3: Pa7<Input<Floating>>, pub d4: Pa8<Input<Floating>>, pub d5: Pa9<Input<Floating>>, pub led_g: Pa19<Input<Floating>>, pub led_r: Pa22<Input<Floating>>, pub led_b: Pa23<Input<Floating>>, pub flash_mosi: Pa16<Input<Floating>>, pub flash_miso: Pa18<Input<Floating>>, pub flash_sck: Pa17<Input<Floating>>, pub flash_cs: Pa15<Input<Floating>>,
}
Expand description

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

Fields§

§port: Port

Opaque port reference

§d0: Pa4<Input<Floating>>

SPI MOSI UART TX2

§d1: Pa5<Input<Floating>>

SPI SCK, UART RX2

§d2: Pa6<Input<Floating>>

SPI MISO

§d3: Pa7<Input<Floating>>

Digital/Analog

§d4: Pa8<Input<Floating>>

I2C SDA, UART TX

§d5: Pa9<Input<Floating>>

I2C SCL, UART RX

§led_g: Pa19<Input<Floating>>

RGB LED, PWM capable

§led_r: Pa22<Input<Floating>>§led_b: Pa23<Input<Floating>>§flash_mosi: Pa16<Input<Floating>>

SPI Flash

§flash_miso: Pa18<Input<Floating>>§flash_sck: Pa17<Input<Floating>>§flash_cs: Pa15<Input<Floating>>

Implementations§

source§

impl Pins

source

pub fn new(port: PORT) -> Self

Auto Trait Implementations§

§

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.