Skip to main content

Pin

Struct Pin 

Source
pub struct Pin<const P: char, const N: u8, MODE> { /* private fields */ }
Expand description

A single pin: P is the port ('A', 'B', 'C' or 'F'), N the pin number.

Implementations§

Source§

impl<const P: char, const N: u8> Pin<P, N, Debugger>

Ways out of Debugger, each giving up debug access on this pin.

Every one of them writes the mode itself rather than merely relabelling the type, so the pin never sits in a state its type misdescribes.

The activate_ prefix announces the cost: once the pin leaves SWD, the board stops answering the probe until the next reset.

Source

pub fn activate_into_input(self) -> Pin<P, N, Input>

Releases the pin as a digital input.

Source

pub fn activate(self) -> Pin<P, N, Input>

Releases the pin as an input; shorthand for activate_into_input.

Source

pub fn activate_into_push_pull_output(self) -> Pin<P, N, Output<PushPull>>

Releases the pin as a push-pull output.

Source

pub fn activate_into_open_drain_output(self) -> Pin<P, N, Output<OpenDrain>>

Releases the pin as an open-drain output.

Source

pub fn activate_into_output(self) -> Pin<P, N, Output<PushPull>>

Releases the pin as an output; shorthand for the push-pull variant.

Source

pub fn activate_into_analog(self) -> Pin<P, N, Analog>

Releases the pin as an analog input, as required by the ADC.

Source

pub fn activate_into_alternate<const AF: u8>(self) -> Pin<P, N, Alternate<AF>>
where Self: ValidAf<AF>,

Releases the pin to a peripheral through alternate function AF, driven push-pull.

Gated by ValidAf exactly as into_alternate is.

Source

pub fn activate_into_alternate_open_drain<const AF: u8>( self, ) -> Pin<P, N, Alternate<AF, OpenDrain>>
where Self: ValidAf<AF>,

Same, but leaves the pin open-drain, as I²C requires.

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, MODE>
where MODE: Active,

Source

pub fn into_input(self) -> Pin<P, N, Input>

Reconfigures the pin as a digital input.

Source

pub fn into_push_pull_output(self) -> Pin<P, N, Output<PushPull>>

Reconfigures the pin as a push-pull output.

Source

pub fn into_open_drain_output(self) -> Pin<P, N, Output<OpenDrain>>

Reconfigures the pin as an open-drain output.

The pin can also be read back in this mode, which shared buses such as I²C rely on.

Source

pub fn into_output(self) -> Pin<P, N, Output<PushPull>>

Reconfigures the pin as an output; shorthand for the push-pull variant.

Source

pub fn into_analog(self) -> Pin<P, N, Analog>

Reconfigures the pin as an analog input, as required by the ADC.

Source

pub fn into_alternate<const AF: u8>(self) -> Pin<P, N, Alternate<AF>>
where Self: ValidAf<AF>,

Routes the pin to a peripheral through alternate function AF, driven push-pull.

Source

pub fn into_alternate_open_drain<const AF: u8>( self, ) -> Pin<P, N, Alternate<AF, OpenDrain>>
where Self: ValidAf<AF>,

Same, but leaves the pin open-drain: I2c accepts only pins that went through here.

Source

pub fn lock(self) -> Pin<P, N, Locked<MODE>>
where Self: HasLock,

Freezes the pin’s configuration until the next chip reset.

Mode, pull, output type, speed and alternate function stop responding to writes, with no way back in hardware or in the type: a Locked pin is still read and written, never reconfigured. Ports with a LOCK register only.

Source

pub fn erase(self) -> ErasedPin<MODE>

Moves the pin’s identity into runtime values, keeping its mode.

Trades knowing which pin this is for a type shared with every other erased pin, so they can be collected into an array. Nothing is written; the configuration stands. One way only.

Source

pub fn set_pull(&mut self, p: Pull)

Selects the internal pull resistor.

Source

pub fn set_speed(&mut self, s: Speed)

Selects the output slew rate.

Source§

impl<const P: char, const N: u8, OTYPE> Pin<P, N, Output<OTYPE>>

Source

pub fn set_high(&mut self)

Drives the pin high.

Source

pub fn set_low(&mut self)

Drives the pin low.

Source

pub fn toggle(&mut self)

Inverts the driven level.

Source

pub fn is_set_high(&self) -> bool

Returns whether the pin is being driven high.

Reads back OCTL, i.e. what was last written, not what the wire is at — for the latter on an open-drain pin see is_high.

Source

pub fn is_set_low(&self) -> bool

Returns whether the pin is being driven low.

Source§

impl<const P: char, const N: u8> Pin<P, N, Input>

Source

pub fn is_high(&self) -> bool

Returns whether the input reads high.

Source

pub fn is_low(&self) -> bool

Returns whether the input reads low.

Source§

impl<const P: char, const N: u8> Pin<P, N, Output<OpenDrain>>

Source

pub fn is_high(&self) -> bool

Returns whether the wire reads high.

Open-drain can only pull low, so this is the actual line level, which another device on a shared bus may be holding down.

Source

pub fn is_low(&self) -> bool

Returns whether the wire reads low.

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: OutputPin,

Source

pub fn set_high(&mut self)

Drives the pin high.

Source

pub fn set_low(&mut self)

Drives the pin low.

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: StatefulOutputPin,

Source

pub fn toggle(&mut self)

Inverts the driven level.

Source

pub fn is_set_high(&self) -> bool

Returns whether the pin is being driven high, read back from OCTL.

Source

pub fn is_set_low(&self) -> bool

Returns whether the pin is being driven low, read back from OCTL.

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: InputPin,

Source

pub fn is_high(&self) -> bool

Returns whether the pin reads high.

Source

pub fn is_low(&self) -> bool

Returns whether the pin reads low.

Trait Implementations§

Source§

impl Channel for Pin<'A', 0, Analog>

Source§

const CHANNEL: u8 = 0

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 1, Analog>

Source§

const CHANNEL: u8 = 1

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 2, Analog>

Source§

const CHANNEL: u8 = 2

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 3, Analog>

Source§

const CHANNEL: u8 = 3

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 4, Analog>

Source§

const CHANNEL: u8 = 4

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 5, Analog>

Source§

const CHANNEL: u8 = 5

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 6, Analog>

Source§

const CHANNEL: u8 = 6

The ADC input number for this pin.
Source§

impl Channel for Pin<'A', 7, Analog>

Source§

const CHANNEL: u8 = 7

The ADC input number for this pin.
Source§

impl Channel for Pin<'B', 0, Analog>

Available on pads_ge_24 only.
Source§

const CHANNEL: u8 = 8

The ADC input number for this pin.
Source§

impl Channel for Pin<'B', 1, Analog>

Source§

const CHANNEL: u8 = 9

The ADC input number for this pin.
Source§

impl ChannelPin<Timer0, 0> for Pin<'A', 8, Alternate<2>>

Available on pads_ge_24 only.
Source§

impl ChannelPin<Timer0, 1> for Pin<'A', 9, Alternate<2>>

Source§

impl ChannelPin<Timer0, 2> for Pin<'A', 10, Alternate<2>>

Source§

impl ChannelPin<Timer0, 3> for Pin<'A', 11, Alternate<2>>

Available on pads_ge_lqfp32 only.
Source§

impl ChannelPin<Timer2, 0> for Pin<'A', 6, Alternate<1>>

Source§

impl ChannelPin<Timer2, 0> for Pin<'B', 4, Alternate<1>>

Available on pads_ge_28 only.
Source§

impl ChannelPin<Timer2, 1> for Pin<'A', 7, Alternate<1>>

Source§

impl ChannelPin<Timer2, 1> for Pin<'B', 5, Alternate<1>>

Available on pads_ge_28 only.
Source§

impl ChannelPin<Timer2, 2> for Pin<'B', 0, Alternate<1>>

Available on pads_ge_24 only.
Source§

impl ChannelPin<Timer2, 3> for Pin<'B', 1, Alternate<1>>

Source§

impl ChannelPin<Timer13, 0> for Pin<'A', 4, Alternate<4>>

Source§

impl ChannelPin<Timer13, 0> for Pin<'A', 7, Alternate<4>>

Source§

impl ChannelPin<Timer13, 0> for Pin<'B', 1, Alternate<2>>

Source§

impl ChannelPin<Timer15, 0> for Pin<'A', 6, Alternate<5>>

Source§

impl ChannelPin<Timer15, 0> for Pin<'B', 8, Alternate<2>>

Available on pads_ge_qfn32 only.
Source§

impl ChannelPin<Timer16, 0> for Pin<'A', 7, Alternate<5>>

Source§

impl ChannelPin<Timer16, 0> for Pin<'B', 9, Alternate<2>>

Available on pads_ge_48 only.
Source§

impl<const P: char, const N: u8, OTYPE> ErrorType for Pin<P, N, Output<OTYPE>>

Source§

type Error = !

Error type
Source§

impl<const P: char, const N: u8> ErrorType for Pin<P, N, Input>

Source§

type Error = !

Error type
Source§

impl<const P: char, const N: u8, MODE> ErrorType for Pin<P, N, Locked<MODE>>

Source§

type Error = !

Error type
Source§

impl<MODE> ExtiConfigured for Pin<'A', 0, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 1, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 2, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 3, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 4, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 5, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 6, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 7, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 8, MODE>

Available on pads_ge_24 only.
Source§

impl<MODE> ExtiConfigured for Pin<'A', 9, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 10, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.
Source§

impl<MODE> ExtiConfigured for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.
Source§

impl<MODE> ExtiConfigured for Pin<'A', 13, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 14, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'A', 15, MODE>

Available on pads_ge_28 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 0, MODE>

Available on pads_ge_24 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 1, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'B', 2, MODE>

Available on pads_ge_qfn32 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 3, MODE>

Available on pads_ge_28 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 4, MODE>

Available on pads_ge_28 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 5, MODE>

Available on pads_ge_28 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 6, MODE>

Available on pads_ge_24 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 7, MODE>

Available on pads_ge_24 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 8, MODE>

Available on pads_ge_qfn32 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 9, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 10, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 11, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 12, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 13, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 14, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'B', 15, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'C', 13, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'C', 14, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'C', 15, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'F', 0, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'F', 1, MODE>

Source§

impl<MODE> ExtiConfigured for Pin<'F', 6, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiConfigured for Pin<'F', 7, MODE>

Available on pads_ge_48 only.
Source§

impl<MODE> ExtiPin for Pin<'A', 0, MODE>

PA0 on EXTI line 0.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 1, MODE>

PA1 on EXTI line 1.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 2, MODE>

PA2 on EXTI line 2.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 3, MODE>

PA3 on EXTI line 3.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 4, MODE>

PA4 on EXTI line 4.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 5, MODE>

PA5 on EXTI line 5.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 6, MODE>

PA6 on EXTI line 6.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 7, MODE>

PA7 on EXTI line 7.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

PA8 on EXTI line 8.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 9, MODE>

PA9 on EXTI line 9.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 10, MODE>

PA10 on EXTI line 10.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

PA11 on EXTI line 11.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.

PA12 on EXTI line 12.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 13, MODE>

PA13 on EXTI line 13.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 14, MODE>

PA14 on EXTI line 14.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'A', 15, MODE>

Available on pads_ge_28 only.

PA15 on EXTI line 15.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 0, MODE>

Available on pads_ge_24 only.

PB0 on EXTI line 0.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 1, MODE>

PB1 on EXTI line 1.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 2, MODE>

Available on pads_ge_qfn32 only.

PB2 on EXTI line 2.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 3, MODE>

Available on pads_ge_28 only.

PB3 on EXTI line 3.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

PB4 on EXTI line 4.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 5, MODE>

Available on pads_ge_28 only.

PB5 on EXTI line 5.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 6, MODE>

Available on pads_ge_24 only.

PB6 on EXTI line 6.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 7, MODE>

Available on pads_ge_24 only.

PB7 on EXTI line 7.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 8, MODE>

Available on pads_ge_qfn32 only.

PB8 on EXTI line 8.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

PB9 on EXTI line 9.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 10, MODE>

Available on pads_ge_48 only.

PB10 on EXTI line 10.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 11, MODE>

Available on pads_ge_48 only.

PB11 on EXTI line 11.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 12, MODE>

Available on pads_ge_48 only.

PB12 on EXTI line 12.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 13, MODE>

Available on pads_ge_48 only.

PB13 on EXTI line 13.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 14, MODE>

Available on pads_ge_48 only.

PB14 on EXTI line 14.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'B', 15, MODE>

Available on pads_ge_48 only.

PB15 on EXTI line 15.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'C', 13, MODE>

Available on pads_ge_48 only.

PC13 on EXTI line 13.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'C', 14, MODE>

Available on pads_ge_48 only.

PC14 on EXTI line 14.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'C', 15, MODE>

Available on pads_ge_48 only.

PC15 on EXTI line 15.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'F', 0, MODE>

PF0 on EXTI line 0.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'F', 1, MODE>

PF1 on EXTI line 1.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'F', 6, MODE>

Available on pads_ge_48 only.

PF6 on EXTI line 6.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<MODE> ExtiPin for Pin<'F', 7, MODE>

Available on pads_ge_48 only.

PF7 on EXTI line 7.

Source§

const SS_CODE: u8

Value written to this line’s EXTISS field to select the pin’s port.
Source§

impl<const N: u8, MODE> HasLock for Pin<'A', N, MODE>

Source§

impl<const N: u8, MODE> HasLock for Pin<'B', N, MODE>

Source§

impl<const P: char, const N: u8> InputPin for Pin<P, N, Input>

Source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?
Source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?
Source§

impl<const P: char, const N: u8> InputPin for Pin<P, N, Output<OpenDrain>>

Source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?
Source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?
Source§

impl<const P: char, const N: u8, MODE> InputPin for Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: InputPin,

Source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?
Source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?
Source§

impl InvertingInput for Pin<'A', 4, Analog>

Source§

const MSEL: u8 = 0b100

The CMPxMSEL encoding of this source.
Source§

impl InvertingInput for Pin<'A', 5, Analog>

Source§

const MSEL: u8 = 0b101

The CMPxMSEL encoding of this source.
Source§

impl InvertingInput for Pin<'A', 0, Analog>

Source§

const MSEL: u8 = 0b110

The CMPxMSEL encoding of this source.
Source§

impl InvertingInput for Pin<'A', 2, Analog>

Source§

const MSEL: u8 = 0b111

The CMPxMSEL encoding of this source.
Source§

impl MisoPin<Spi0> for Pin<'A', 6, Alternate<0>>

Source§

impl MisoPin<Spi0> for Pin<'B', 4, Alternate<0>>

Available on pads_ge_28 only.
Source§

impl MosiPin<Spi0> for Pin<'A', 7, Alternate<0>>

Source§

impl MosiPin<Spi0> for Pin<'B', 5, Alternate<0>>

Available on pads_ge_28 only.
Source§

impl NonInvertingInput for Pin<'A', 1, Analog>

Source§

const SW: bool = false

Whether CMPxSW is closed for this source.
Source§

impl<const P: char, const N: u8, OTYPE> OutputPin for Pin<P, N, Output<OTYPE>>

Source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high. Read more
Source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low. Read more
Source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value. Read more
Source§

impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: OutputPin,

Source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high. Read more
Source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low. Read more
Source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value. Read more
Source§

impl RxPin<Usart0> for Pin<'A', 10, Alternate<1>>

Source§

impl RxPin<Usart0> for Pin<'B', 7, Alternate<0>>

Available on pads_ge_24 only.
Source§

impl RxPin<Usart1> for Pin<'A', 3, Alternate<1>>

Source§

impl RxPin<Usart1> for Pin<'A', 15, Alternate<1>>

Available on pads_ge_28 only.
Source§

impl RxPin<Usart1> for Pin<'B', 0, Alternate<4>>

Available on pads_ge_24 only.
Source§

impl SckPin<Spi0> for Pin<'A', 5, Alternate<0>>

Source§

impl SckPin<Spi0> for Pin<'B', 3, Alternate<0>>

Available on pads_ge_28 only.
Source§

impl SclPin<I2c0> for Pin<'A', 9, Alternate<4, OpenDrain>>

Source§

impl SclPin<I2c0> for Pin<'B', 6, Alternate<1, OpenDrain>>

Available on pads_ge_24 only.
Source§

impl SclPin<I2c0> for Pin<'B', 8, Alternate<1, OpenDrain>>

Available on pads_ge_qfn32 only.
Source§

impl SclPin<I2c0> for Pin<'F', 1, Alternate<1, OpenDrain>>

Source§

impl SdaPin<I2c0> for Pin<'A', 10, Alternate<4, OpenDrain>>

Source§

impl SdaPin<I2c0> for Pin<'B', 7, Alternate<1, OpenDrain>>

Available on pads_ge_24 only.
Source§

impl SdaPin<I2c0> for Pin<'B', 9, Alternate<1, OpenDrain>>

Available on pads_ge_48 only.
Source§

impl SdaPin<I2c0> for Pin<'F', 0, Alternate<1, OpenDrain>>

Source§

impl<const P: char, const N: u8, OTYPE> StatefulOutputPin for Pin<P, N, Output<OTYPE>>

Source§

fn is_set_high(&mut self) -> Result<bool, Self::Error>

Is the pin in drive high mode? Read more
Source§

fn is_set_low(&mut self) -> Result<bool, Self::Error>

Is the pin in drive low mode? Read more
Source§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle pin output.
Source§

impl<const P: char, const N: u8, MODE> StatefulOutputPin for Pin<P, N, Locked<MODE>>
where Pin<P, N, MODE>: StatefulOutputPin,

Source§

fn is_set_high(&mut self) -> Result<bool, Self::Error>

Is the pin in drive high mode? Read more
Source§

fn is_set_low(&mut self) -> Result<bool, Self::Error>

Is the pin in drive low mode? Read more
Source§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle pin output.
Source§

impl TxPin<Usart0> for Pin<'A', 9, Alternate<1>>

Source§

impl TxPin<Usart0> for Pin<'B', 6, Alternate<0>>

Available on pads_ge_24 only.
Source§

impl TxPin<Usart1> for Pin<'A', 2, Alternate<1>>

Source§

impl TxPin<Usart1> for Pin<'A', 8, Alternate<4>>

Available on pads_ge_24 only.
Source§

impl TxPin<Usart1> for Pin<'A', 14, Alternate<1>>

Source§

impl<MODE> ValidAf<0> for Pin<'A', 1, MODE>

AF0 — EVENTOUT.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 4, MODE>

AF0 — SPI0_NSS/I2S0_WS.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 5, MODE>

AF0 — SPI0_SCK/I2S0_CK.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 6, MODE>

AF0 — SPI0_MISO.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 7, MODE>

AF0 — SPI0_MOSI.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

AF0 — CK_OUT.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 10, MODE>

AF0 — TIMER16_BRKIN.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

AF0 — EVENTOUT.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.

AF0 — EVENTOUT.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 13, MODE>

AF0 — SWDIO.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 14, MODE>

AF0 — SWCLK.

Source§

impl<MODE> ValidAf<0> for Pin<'A', 15, MODE>

Available on pads_ge_28 only.

AF0 — SPI0_NSS/I2S0_WS.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 0, MODE>

Available on pads_ge_24 only.

AF0 — EVENTOUT.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 3, MODE>

Available on pads_ge_28 only.

AF0 — SPI0_SCK/I2S0_CK.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

AF0 — SPI0_MISO.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 5, MODE>

Available on pads_ge_28 only.

AF0 — SPI0_MOSI.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 6, MODE>

Available on pads_ge_24 only.

AF0 — USART0_TX.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 7, MODE>

Available on pads_ge_24 only.

AF0 — USART0_RX.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

AF0 — IFRP_OUT.

Source§

impl<MODE> ValidAf<0> for Pin<'B', 11, MODE>

Available on pads_ge_48 only.

AF0 — EVENTOUT.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 0, MODE>

AF1 — USART0_CTS on x4, USART1_CTS on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 1, MODE>

AF1 — USART0_RTS/DE on x4, USART1_RTS/DE on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 2, MODE>

AF1 — USART0_TX on x4, USART1_TX on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 3, MODE>

AF1 — USART0_RX on x4, USART1_RX on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 4, MODE>

AF1 — USART0_CK on x4, USART1_CK on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 6, MODE>

AF1 — TIMER2_CH0.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 7, MODE>

AF1 — TIMER2_CH1.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

AF1 — USART0_CK.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 9, MODE>

AF1 — USART0_TX.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 10, MODE>

AF1 — USART0_RX.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

AF1 — USART0_CTS.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.

AF1 — USART0_RTS/DE.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 13, MODE>

AF1 — IFRP_OUT.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 14, MODE>

AF1 — USART0_TX on x4, USART1_TX on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'A', 15, MODE>

Available on pads_ge_28 only.

AF1 — USART0_RX on x4, USART1_RX on x6/x8.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 0, MODE>

Available on pads_ge_24 only.

AF1 — TIMER2_CH2.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 1, MODE>

AF1 — TIMER2_CH3.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 2, MODE>

Available on pads_ge_qfn32 only.

AF1 — TIMER2_ETI.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 3, MODE>

Available on pads_ge_28 only.

AF1 — EVENTOUT.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

AF1 — TIMER2_CH0.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 5, MODE>

Available on pads_ge_28 only.

AF1 — TIMER2_CH1.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 6, MODE>

Available on pads_ge_24 only.

AF1 — I2C0_SCL.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 7, MODE>

Available on pads_ge_24 only.

AF1 — I2C0_SDA.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 8, MODE>

Available on pads_ge_qfn32 only.

AF1 — I2C0_SCL.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

AF1 — I2C0_SDA.

Source§

impl<MODE> ValidAf<1> for Pin<'B', 12, MODE>

Available on pads_ge_48 only.

AF1 — EVENTOUT.

Source§

impl<MODE> ValidAf<1> for Pin<'F', 0, MODE>

AF1 — I2C0_SDA.

Source§

impl<MODE> ValidAf<1> for Pin<'F', 1, MODE>

AF1 — I2C0_SCL.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 6, MODE>

AF2 — TIMER0_BRKIN.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 7, MODE>

AF2 — TIMER0_CH0_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

AF2 — TIMER0_CH0.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 9, MODE>

AF2 — TIMER0_CH1.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 10, MODE>

AF2 — TIMER0_CH2.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

AF2 — TIMER0_CH3.

Source§

impl<MODE> ValidAf<2> for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.

AF2 — TIMER0_ETI.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 0, MODE>

Available on pads_ge_24 only.

AF2 — TIMER0_CH1_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 1, MODE>

AF2 — TIMER13_CH0.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

AF2 — EVENTOUT.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 5, MODE>

Available on pads_ge_28 only.

AF2 — I2C0_SMBA.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 6, MODE>

Available on pads_ge_24 only.

AF2 — TIMER15_CH0_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 7, MODE>

Available on pads_ge_24 only.

AF2 — TIMER16_CH0_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 8, MODE>

Available on pads_ge_qfn32 only.

AF2 — TIMER15_CH0.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

AF2 — TIMER16_CH0.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 12, MODE>

Available on pads_ge_48 only.

AF2 — TIMER0_BRKIN.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 13, MODE>

Available on pads_ge_48 only.

AF2 — TIMER0_CH0_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 14, MODE>

Available on pads_ge_48 only.

AF2 — TIMER0_CH1_ON.

Source§

impl<MODE> ValidAf<2> for Pin<'B', 15, MODE>

Available on pads_ge_48 only.

AF2 — TIMER0_CH2_ON.

Source§

impl<MODE> ValidAf<3> for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

AF3 — EVENTOUT.

Source§

impl<MODE> ValidAf<3> for Pin<'A', 15, MODE>

Available on pads_ge_28 only.

AF3 — EVENTOUT.

Source§

impl<MODE> ValidAf<3> for Pin<'B', 1, MODE>

AF3 — TIMER0_CH2_ON.

Source§

impl<MODE> ValidAf<3> for Pin<'B', 5, MODE>

Available on pads_ge_28 only.

AF3 — TIMER15_BRKIN.

Source§

impl<MODE> ValidAf<3> for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

AF3 — EVENTOUT.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 4, MODE>

AF4 — TIMER13_CH0.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 7, MODE>

AF4 — TIMER13_CH0.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 9, MODE>

AF4 — I2C0_SCL.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 10, MODE>

AF4 — I2C0_SDA.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

AF4 — I2C0_SMBA.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 12, MODE>

Available on pads_ge_lqfp32 only.

AF4 — I2C0_TXFRAME.

Source§

impl<MODE> ValidAf<4> for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

AF4 — I2C0_TXFRAME.

Source§

impl<MODE> ValidAf<4> for Pin<'A', 8, MODE>

Available on pads_ge_24 only.

AF4 — USART1_TX.

Source§

impl<MODE> ValidAf<4> for Pin<'B', 0, MODE>

Available on pads_ge_24 only.

AF4 — USART1_RX.

Source§

impl<MODE> ValidAf<5> for Pin<'A', 6, MODE>

AF5 — TIMER15_CH0.

Source§

impl<MODE> ValidAf<5> for Pin<'A', 7, MODE>

AF5 — TIMER16_CH0.

Source§

impl<MODE> ValidAf<5> for Pin<'A', 9, MODE>

AF5 — CK_OUT.

Source§

impl<MODE> ValidAf<5> for Pin<'B', 9, MODE>

Available on pads_ge_48 only.

AF5 — I2S0_MCK.

Source§

impl<MODE> ValidAf<6> for Pin<'A', 6, MODE>

AF6 — EVENTOUT.

Source§

impl<MODE> ValidAf<6> for Pin<'A', 7, MODE>

AF6 — EVENTOUT.

Source§

impl<MODE> ValidAf<6> for Pin<'B', 4, MODE>

Available on pads_ge_28 only.

AF6 — TIMER16_BRKIN.

Source§

impl<MODE> ValidAf<7> for Pin<'A', 0, MODE>

AF7 — CMP_OUT.

Source§

impl<MODE> ValidAf<7> for Pin<'A', 6, MODE>

AF7 — CMP_OUT.

Source§

impl<MODE> ValidAf<7> for Pin<'A', 11, MODE>

Available on pads_ge_lqfp32 only.

AF7 — CMP_OUT.

Auto Trait Implementations§

§

impl<const P: char, const N: u8, MODE> Freeze for Pin<P, N, MODE>
where PhantomData<MODE>: Freeze,

§

impl<const P: char, const N: u8, MODE> RefUnwindSafe for Pin<P, N, MODE>

§

impl<const P: char, const N: u8, MODE> Send for Pin<P, N, MODE>
where PhantomData<MODE>: Send,

§

impl<const P: char, const N: u8, MODE> Sync for Pin<P, N, MODE>
where PhantomData<MODE>: Sync,

§

impl<const P: char, const N: u8, MODE> Unpin for Pin<P, N, MODE>
where PhantomData<MODE>: Unpin,

§

impl<const P: char, const N: u8, MODE> UnsafeUnpin for Pin<P, N, MODE>
where PhantomData<MODE>: UnsafeUnpin,

§

impl<const P: char, const N: u8, MODE> UnwindSafe for Pin<P, N, MODE>
where PhantomData<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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.