Struct display_interface_parallel_gpio::Generic8BitBus[][src]

pub struct Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> { /* fields omitted */ }
Expand description

A generic implementation of OutputBus using OutputPins

Implementations

impl<P0, P1, P2, P3, P4, P5, P6, P7> Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: OutputPin,
    P1: OutputPin,
    P2: OutputPin,
    P3: OutputPin,
    P4: OutputPin,
    P5: OutputPin,
    P6: OutputPin,
    P7: OutputPin
[src]

pub fn new(pins: (P0, P1, P2, P3, P4, P5, P6, P7)) -> Result<Self, DisplayError>[src]

Creates a new instance and initializes the bus to 0.

The first pin in the tuple is the least significant bit.

pub fn release(self) -> (P0, P1, P2, P3, P4, P5, P6, P7)[src]

Consumes the bus and returns the pins. This does not change the state of the pins.

Trait Implementations

impl<P0, P1, P2, P3, P4, P5, P6, P7> OutputBus for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: OutputPin,
    P1: OutputPin,
    P2: OutputPin,
    P3: OutputPin,
    P4: OutputPin,
    P5: OutputPin,
    P6: OutputPin,
    P7: OutputPin
[src]

type Word = u8

u8 for 8-bit buses, u16 for 16-bit buses, etc.

fn set_value(&mut self, value: Self::Word) -> Result<(), DisplayError>[src]

impl<P0, P1, P2, P3, P4, P5, P6, P7> TryFrom<(P0, P1, P2, P3, P4, P5, P6, P7)> for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: OutputPin,
    P1: OutputPin,
    P2: OutputPin,
    P3: OutputPin,
    P4: OutputPin,
    P5: OutputPin,
    P6: OutputPin,
    P7: OutputPin
[src]

type Error = DisplayError

The type returned in the event of a conversion error.

fn try_from(
    pins: (P0, P1, P2, P3, P4, P5, P6, P7)
) -> Result<Self, DisplayError>
[src]

Performs the conversion.

Auto Trait Implementations

impl<P0, P1, P2, P3, P4, P5, P6, P7> Send for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: Send,
    P1: Send,
    P2: Send,
    P3: Send,
    P4: Send,
    P5: Send,
    P6: Send,
    P7: Send

impl<P0, P1, P2, P3, P4, P5, P6, P7> Sync for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: Sync,
    P1: Sync,
    P2: Sync,
    P3: Sync,
    P4: Sync,
    P5: Sync,
    P6: Sync,
    P7: Sync

impl<P0, P1, P2, P3, P4, P5, P6, P7> Unpin for Generic8BitBus<P0, P1, P2, P3, P4, P5, P6, P7> where
    P0: Unpin,
    P1: Unpin,
    P2: Unpin,
    P3: Unpin,
    P4: Unpin,
    P5: Unpin,
    P6: Unpin,
    P7: Unpin

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.