embassy-stm32

Crates

git

Versions

stm32f405zg

Flavors

embassy_stm32::gpio

Trait Pin

Source
pub trait Pin:
    Peripheral<P = Self>
    + Into<AnyPin>
    + SealedPin
    + Sized
    + 'static {
    type ExtiChannel: Channel;

    // Provided methods
    fn pin(&self) -> u8 { ... }
    fn port(&self) -> u8 { ... }
    fn degrade(self) -> AnyPin { ... }
}
Expand description

GPIO pin trait.

Required Associated Types§

Source

type ExtiChannel: Channel

EXTI channel assigned to this pin.

For example, PC4 uses EXTI4.

Provided Methods§

Source

fn pin(&self) -> u8

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

Source

fn port(&self) -> u8

Port of the pin

Source

fn degrade(self) -> AnyPin

Type-erase (degrade) this pin into an AnyPin.

This converts pin singletons (PA5, PB6, …), which are all different types, into the same type. It is useful for creating arrays of pins, or avoiding generics.

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§

Source§

impl Pin for PA0

Source§

impl Pin for PA1

Source§

impl Pin for PA2

Source§

impl Pin for PA3

Source§

impl Pin for PA4

Source§

impl Pin for PA5

Source§

impl Pin for PA6

Source§

impl Pin for PA7

Source§

impl Pin for PA8

Source§

impl Pin for PA9

Source§

impl Pin for PA10

Source§

impl Pin for PA11

Source§

impl Pin for PA12

Source§

impl Pin for PA13

Source§

impl Pin for PA14

Source§

impl Pin for PA15

Source§

impl Pin for PB0

Source§

impl Pin for PB1

Source§

impl Pin for PB2

Source§

impl Pin for PB3

Source§

impl Pin for PB4

Source§

impl Pin for PB5

Source§

impl Pin for PB6

Source§

impl Pin for PB7

Source§

impl Pin for PB8

Source§

impl Pin for PB9

Source§

impl Pin for PB10

Source§

impl Pin for PB11

Source§

impl Pin for PB12

Source§

impl Pin for PB13

Source§

impl Pin for PB14

Source§

impl Pin for PB15

Source§

impl Pin for PC0

Source§

impl Pin for PC1

Source§

impl Pin for PC2

Source§

impl Pin for PC3

Source§

impl Pin for PC4

Source§

impl Pin for PC5

Source§

impl Pin for PC6

Source§

impl Pin for PC7

Source§

impl Pin for PC8

Source§

impl Pin for PC9

Source§

impl Pin for PC10

Source§

impl Pin for PC11

Source§

impl Pin for PC12

Source§

impl Pin for PC13

Source§

impl Pin for PC14

Source§

impl Pin for PC15

Source§

impl Pin for PD0

Source§

impl Pin for PD1

Source§

impl Pin for PD2

Source§

impl Pin for PD3

Source§

impl Pin for PD4

Source§

impl Pin for PD5

Source§

impl Pin for PD6

Source§

impl Pin for PD7

Source§

impl Pin for PD8

Source§

impl Pin for PD9

Source§

impl Pin for PD10

Source§

impl Pin for PD11

Source§

impl Pin for PD12

Source§

impl Pin for PD13

Source§

impl Pin for PD14

Source§

impl Pin for PD15

Source§

impl Pin for PE0

Source§

impl Pin for PE1

Source§

impl Pin for PE2

Source§

impl Pin for PE3

Source§

impl Pin for PE4

Source§

impl Pin for PE5

Source§

impl Pin for PE6

Source§

impl Pin for PE7

Source§

impl Pin for PE8

Source§

impl Pin for PE9

Source§

impl Pin for PE10

Source§

impl Pin for PE11

Source§

impl Pin for PE12

Source§

impl Pin for PE13

Source§

impl Pin for PE14

Source§

impl Pin for PE15

Source§

impl Pin for PF0

Source§

impl Pin for PF1

Source§

impl Pin for PF2

Source§

impl Pin for PF3

Source§

impl Pin for PF4

Source§

impl Pin for PF5

Source§

impl Pin for PF6

Source§

impl Pin for PF7

Source§

impl Pin for PF8

Source§

impl Pin for PF9

Source§

impl Pin for PF10

Source§

impl Pin for PF11

Source§

impl Pin for PF12

Source§

impl Pin for PF13

Source§

impl Pin for PF14

Source§

impl Pin for PF15

Source§

impl Pin for PG0

Source§

impl Pin for PG1

Source§

impl Pin for PG2

Source§

impl Pin for PG3

Source§

impl Pin for PG4

Source§

impl Pin for PG5

Source§

impl Pin for PG6

Source§

impl Pin for PG7

Source§

impl Pin for PG8

Source§

impl Pin for PG9

Source§

impl Pin for PG10

Source§

impl Pin for PG11

Source§

impl Pin for PG12

Source§

impl Pin for PG13

Source§

impl Pin for PG14

Source§

impl Pin for PG15

Source§

impl Pin for PH0

Source§

impl Pin for PH1

Source§

impl Pin for PH2

Source§

impl Pin for PH3

Source§

impl Pin for PH4

Source§

impl Pin for PH5

Source§

impl Pin for PH6

Source§

impl Pin for PH7

Source§

impl Pin for PH8

Source§

impl Pin for PH9

Source§

impl Pin for PH10

Source§

impl Pin for PH11

Source§

impl Pin for PH12

Source§

impl Pin for PH13

Source§

impl Pin for PH14

Source§

impl Pin for PH15

Source§

impl Pin for PI0

Source§

impl Pin for PI1

Source§

impl Pin for PI2

Source§

impl Pin for PI3

Source§

impl Pin for PI4

Source§

impl Pin for PI5

Source§

impl Pin for PI6

Source§

impl Pin for PI7

Source§

impl Pin for PI8

Source§

impl Pin for PI9

Source§

impl Pin for PI10

Source§

impl Pin for PI11

Source§

impl Pin for PI12

Source§

impl Pin for PI13

Source§

impl Pin for PI14

Source§

impl Pin for PI15

Source§

impl Pin for AnyPin