[][src]Struct atmega32u4_hal::port::portd::PD1

pub struct PD1<MODE> { /* fields omitted */ }

Type representing a specific pin.

See the general Digital IO documentation for more info. In short:

Implementations

impl<MODE: DigitalIO> PD1<MODE>[src]

pub fn into_output<D: AsDDR>(self, ddr: &D) -> PD1<Output>[src]

Make this pin a digital output.

pub fn into_floating_input<D: AsDDR>(self, ddr: &D) -> PD1<Input<Floating>>[src]

Make this pin a digital input without enabling the internal pull-up.

pub fn into_pull_up_input<D: AsDDR>(self, ddr: &D) -> PD1<Input<PullUp>>[src]

Make this pin a digital input and enable the internal pull-up.

pub fn into_tri_state<D: AsDDR>(self, ddr: &D) -> PD1<TriState>[src]

Make this pin a tri-state pin. Default state is released (high) mode. Internal pull-up is not used.

Note that, as always, it is not safe to connect the external pull-up to a voltage higher than VCC + 0.5. See your chip's datasheet for more details.

impl<MODE> PD1<MODE>[src]

pub fn downgrade(self) -> Pin<MODE>[src]

Downgrade this pin into a type that is generic over all pins.

The main use for this function is to store multiple pins in an array. Please note that generic pins have a runtime overhead.

See the general Digital IO documentation and the Pin type for more information.

Example

let p1 = portb.pb1.downgrade();
let p2 = portc.pc7.downgrade();
let pins = [p1, p2];

Trait Implementations

impl<MODE: InputMode> InputPin for PD1<Input<MODE>>[src]

type Error = Void

Error type

impl InputPin for PD1<TriState>[src]

type Error = Void

Error type

impl OutputPin for PD1<Output>[src]

type Error = Void

Error type

impl OutputPin for PD1<TriState>[src]

type Error = Void

Error type

impl StatefulOutputPin for PD1<Output>[src]

impl ToggleableOutputPin for PD1<Output>[src]

type Error = Void

Error type

Auto Trait Implementations

impl<MODE> Send for PD1<MODE> where
    MODE: Send

impl<MODE> Sync for PD1<MODE> where
    MODE: Sync

impl<MODE> Unpin for PD1<MODE> where
    MODE: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.