embassy-nrf

Crates

git

Versions

nrf52832

Flavors

embassy_nrf::gpio

Trait Pin

Source
pub trait Pin:
    Peripheral<P = Self>
    + Into<AnyPin>
    + SealedPin
    + Sized
    + 'static {
    // Provided methods
    fn pin(&self) -> u8 { ... }
    fn port(&self) -> Port { ... }
    fn psel_bits(&self) -> Psel { ... }
    fn degrade(self) -> AnyPin { ... }
}
Expand description

Interface for a Pin that can be configured by an Input or Output driver, or converted to an AnyPin.

Provided Methods§

Source

fn pin(&self) -> u8

Number of the pin within the port (0..31)

Source

fn port(&self) -> Port

Port of the pin

Source

fn psel_bits(&self) -> Psel

Peripheral port register value

Source

fn degrade(self) -> AnyPin

Convert from concrete pin type PX_XX to type erased AnyPin.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§