pub struct Pin<I, M> where
    I: PinId,
    M: PinMode + ValidPinMode<I>, 
{ /* private fields */ }
Expand description

A type-level GPIO pin, parameterized by PinId and PinMode types

Implementations

Convert the pin to the requested PinMode

Disable the pin and set it to float

Disable the pin and set it to pull down

Disable the pin and set it to pull up

Configure the pin to operate as a floating input

Configure the pin to operate as a pulled down input

Configure the pin to operate as a pulled up input

Configure the pin to operate as a bus keep input

Configure the pin to operate as a push-pull output

Configure the pin to operate as a readable push pull output

Read the current drive strength of the pin.

Set the drive strength for the pin.

Get the slew rate for the pin.

Set the slew rate for the pin.

Clear interrupt.

Interrupt status.

Is interrupt enabled.

Enable or disable interrupt.

Is interrupt forced.

Force or release interrupt.

Set the interrupt override.

Set the input override.

Set the output enable override.

Set the output override.

Trait Implementations

PinId of the corresponding Pin

PinMode of the corresponding Pin

Channel ID type Read more

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8. Read more

Channel ID type Read more

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8. Read more

Channel ID type Read more

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8. Read more

Channel ID type Read more

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8. Read more

Get the operating frequency for this source Read more

Get the operating frequency for this source Read more

Erase the type-level information in a Pin and return a value-level DynPin

Error type

Is the input pin high?

Is the input pin low?

Error type

Is the input pin high?

Is the input pin low?

Error type

Drives the pin high Read more

Drives the pin low Read more

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

Is the pin in drive high mode? Read more

Is the pin in drive low mode? Read more

Error type

Toggle pin output.

Try to recreate a type-level Pin from a value-level DynPin

There is no way for the compiler to know if the conversion will be successful at compile-time. We must verify the conversion at run-time or refuse to perform it.

The type returned in the event of a conversion error.

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Is this a ClockSource for src or aux?

Get register value for this ClockSource

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.