[][src]Struct lpc81x_hal::pins::pin::Pin8

pub struct Pin8<MODE: PinMode>(_);

Methods

impl<MODE: PinMode> Pin8<MODE>[src]

pub fn digital_input(&self) -> Pin8<DigitalInput>[src]

Obtain the input portion of the pin.

Input functions can coexist on the same pin, so the input portion can be freely copied and shared even though the other portions are subject to ownership and move semantics.

The result of this method implements the embedded-hal digital v2 InputPin trait.

impl Pin8<Unassigned>[src]

pub fn to_digital_output(self, high: bool) -> Pin8<DigitalOutput>[src]

Configure the pin's output portion for general-purpose digital output.

The result of this method implements the embedded-hal digital v2 OutputPin trait.

If high is set then the output will be driving the line high once activated. Otherwise, it will be driving the line low. Use the OutputPin trait methods to change the pin state after initial configuration.

Trait Implementations

impl<MODE: PinMode> Pin for Pin8<MODE>[src]

const REG_MASK: u32[src]

impl UnassignedPin for Pin8<Unassigned>[src]

impl InputPin for Pin8<DigitalInput>[src]

impl InputPin for Pin8<Unassigned>[src]

impl Copy for Pin8<DigitalInput>[src]

The input portion of a pin can be freely copied, because multiple input functions can coexist on the same pin.

impl<MODE: PinMode> !Sync for Pin8<MODE>[src]

impl Clone for Pin8<DigitalInput>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl OutputPin for Pin8<DigitalOutput>[src]

type Error = !

Error type

impl ToggleableOutputPin for Pin8<DigitalOutput>[src]

type Error = !

Error type

impl InputPin for Pin8<DigitalInput>[src]

type Error = !

Error type

Auto Trait Implementations

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

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

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> OutputPin for T where
    T: OutputPin
[src]

type Error = ()

Error type

impl<P> ToggleableOutputPin for P where
    P: Default
[src]

type Error = <P as OutputPin>::Error

Error type

fn toggle(&mut self) -> Result<(), <P as ToggleableOutputPin>::Error>[src]

Toggle pin output

impl<T> InputPin for T where
    T: InputPin
[src]

type Error = ()

Error type