Pin

Struct Pin 

Source
pub struct Pin<const SHIELD_ID: usize, const PIN_ID: usize, Mode: PinMode> { /* private fields */ }

Implementations§

Source§

impl Pin<0, 0, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 0, Uart>

Turns the current GPIO pin into a Uart pin

Source§

impl Pin<0, 0, Uart>

Source

pub fn into_mode(self) -> Pin<0, 0, Gpio>

Turns the current Uart pin into a GPIO pin

Source§

impl Pin<0, 1, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 1, Uart>

Turns the current GPIO pin into a Uart pin

Source§

impl Pin<0, 1, Uart>

Source

pub fn into_mode(self) -> Pin<0, 1, Gpio>

Turns the current Uart pin into a GPIO pin

Source§

impl Pin<0, 10, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 10, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<0, 10, Spi>

Source

pub fn into_mode(self) -> Pin<0, 10, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<0, 11, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 11, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<0, 11, Spi>

Source

pub fn into_mode(self) -> Pin<0, 11, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<0, 12, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 12, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<0, 12, Spi>

Source

pub fn into_mode(self) -> Pin<0, 12, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<0, 13, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 13, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<0, 13, Spi>

Source

pub fn into_mode(self) -> Pin<0, 13, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<0, 14, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 14, I2c>

Turns the current GPIO pin into a I2c pin

Source§

impl Pin<0, 14, I2c>

Source

pub fn into_mode(self) -> Pin<0, 14, Gpio>

Turns the current I2c pin into a GPIO pin

Source§

impl Pin<0, 15, Gpio>

Source

pub fn into_mode(self) -> Pin<0, 15, I2c>

Turns the current GPIO pin into a I2c pin

Source§

impl Pin<0, 15, I2c>

Source

pub fn into_mode(self) -> Pin<0, 15, Gpio>

Turns the current I2c pin into a GPIO pin

Source§

impl Pin<1, 0, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 0, Uart>

Turns the current GPIO pin into a Uart pin

Source§

impl Pin<1, 0, Uart>

Source

pub fn into_mode(self) -> Pin<1, 0, Gpio>

Turns the current Uart pin into a GPIO pin

Source§

impl Pin<1, 1, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 1, Uart>

Turns the current GPIO pin into a Uart pin

Source§

impl Pin<1, 1, Uart>

Source

pub fn into_mode(self) -> Pin<1, 1, Gpio>

Turns the current Uart pin into a GPIO pin

Source§

impl Pin<1, 10, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 10, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<1, 10, Spi>

Source

pub fn into_mode(self) -> Pin<1, 10, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<1, 11, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 11, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<1, 11, Spi>

Source

pub fn into_mode(self) -> Pin<1, 11, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<1, 12, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 12, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<1, 12, Spi>

Source

pub fn into_mode(self) -> Pin<1, 12, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<1, 13, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 13, Spi>

Turns the current GPIO pin into a Spi pin

Source§

impl Pin<1, 13, Spi>

Source

pub fn into_mode(self) -> Pin<1, 13, Gpio>

Turns the current Spi pin into a GPIO pin

Source§

impl Pin<1, 14, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 14, I2c>

Turns the current GPIO pin into a I2c pin

Source§

impl Pin<1, 14, I2c>

Source

pub fn into_mode(self) -> Pin<1, 14, Gpio>

Turns the current I2c pin into a GPIO pin

Source§

impl Pin<1, 15, Gpio>

Source

pub fn into_mode(self) -> Pin<1, 15, I2c>

Turns the current GPIO pin into a I2c pin

Source§

impl Pin<1, 15, I2c>

Source

pub fn into_mode(self) -> Pin<1, 15, Gpio>

Turns the current I2c pin into a GPIO pin

Trait Implementations§

Source§

impl<const SHIELD_ID: usize, const PIN_ID: usize> InputPin for Pin<SHIELD_ID, PIN_ID, Gpio>

Source§

type Error = Infallible

Error type
Source§

fn is_high(&self) -> Result<bool, Infallible>

Is the input pin high?
Source§

fn is_low(&self) -> Result<bool, Infallible>

Is the input pin low?
Source§

impl PinRx<UART3> for Pin<0, 0, Uart>

Source§

impl PinRx<UART3_SECURE> for Pin<0, 0, Uart>

Source§

impl PinRx<UART4> for Pin<1, 0, Uart>

Source§

impl PinRx<UART4_SECURE> for Pin<1, 0, Uart>

Source§

impl PinTx<UART3> for Pin<0, 1, Uart>

Source§

impl PinTx<UART3_SECURE> for Pin<0, 1, Uart>

Source§

impl PinTx<UART4> for Pin<1, 1, Uart>

Source§

impl PinTx<UART4_SECURE> for Pin<1, 1, Uart>

Auto Trait Implementations§

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> Freeze for Pin<SHIELD_ID, PIN_ID, Mode>

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> RefUnwindSafe for Pin<SHIELD_ID, PIN_ID, Mode>
where Mode: RefUnwindSafe,

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> Send for Pin<SHIELD_ID, PIN_ID, Mode>
where Mode: Send,

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> Sync for Pin<SHIELD_ID, PIN_ID, Mode>
where Mode: Sync,

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> Unpin for Pin<SHIELD_ID, PIN_ID, Mode>
where Mode: Unpin,

§

impl<const SHIELD_ID: usize, const PIN_ID: usize, Mode> UnwindSafe for Pin<SHIELD_ID, PIN_ID, Mode>
where Mode: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.