Struct PGPIO16BitInterface

Source
pub struct PGPIO16BitInterface<BUS, DC, WR> { /* private fields */ }
Expand description

Parallel 16 Bit communication interface

This interface implements a 16-Bit “8080” style write-only display interface using any 16-bit OutputBus implementation as well as one OutputPin for the data/command selection and one OutputPin for the write-enable flag.

All pins are supposed to be high-active, high for the D/C pin meaning “data” and the write-enable being pulled low before the setting of the bits and supposed to be sampled at a low to high edge.

Implementations§

Source§

impl<BUS, DC, WR> PGPIO16BitInterface<BUS, DC, WR>
where BUS: OutputBus<Word = u16>, DC: OutputPin, WR: OutputPin,

Source

pub fn new(bus: BUS, dc: DC, wr: WR) -> Self

Create new parallel GPIO interface for communication with a display driver

Source

pub fn release(self) -> (BUS, DC, WR)

Consume the display interface and return the bus and GPIO pins used by it

Trait Implementations§

Source§

impl<BUS, DC, WR> WriteOnlyDataCommand for PGPIO16BitInterface<BUS, DC, WR>
where BUS: OutputBus<Word = u16>, DC: OutputPin, WR: OutputPin,

Source§

fn send_commands(&mut self, cmds: DataFormat<'_>) -> Result<(), DisplayError>

Send a batch of commands to display
Source§

fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>

Send pixel data to display

Auto Trait Implementations§

§

impl<BUS, DC, WR> Freeze for PGPIO16BitInterface<BUS, DC, WR>
where BUS: Freeze, DC: Freeze, WR: Freeze,

§

impl<BUS, DC, WR> RefUnwindSafe for PGPIO16BitInterface<BUS, DC, WR>

§

impl<BUS, DC, WR> Send for PGPIO16BitInterface<BUS, DC, WR>
where BUS: Send, DC: Send, WR: Send,

§

impl<BUS, DC, WR> Sync for PGPIO16BitInterface<BUS, DC, WR>
where BUS: Sync, DC: Sync, WR: Sync,

§

impl<BUS, DC, WR> Unpin for PGPIO16BitInterface<BUS, DC, WR>
where BUS: Unpin, DC: Unpin, WR: Unpin,

§

impl<BUS, DC, WR> UnwindSafe for PGPIO16BitInterface<BUS, DC, WR>
where BUS: UnwindSafe, DC: UnwindSafe, WR: 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 = Infallible

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

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

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.