pub struct ParallelInterface<BUS, DC, WR> { /* private fields */ }
Expand description
Parallel communication interface
This interface implements a “8080” style write-only display interface using any
OutputBus
implementation as well as one
OutputPin
for the data/command selection and one OutputPin
for the write-enable flag.
All pins in the data bus 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> ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> ParallelInterface<BUS, DC, WR>
Sourcepub fn new(bus: BUS, dc: DC, wr: WR) -> Self
pub fn new(bus: BUS, dc: DC, wr: WR) -> Self
Create new parallel GPIO interface for communication with a display driver
Sourcepub fn release(self) -> (BUS, DC, WR)
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> Interface for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> Interface for ParallelInterface<BUS, DC, WR>
Source§const KIND: InterfaceKind = BUS::KIND
const KIND: InterfaceKind = BUS::KIND
Kind
Source§type Error = ParallelError<<BUS as OutputBus>::Error, <DC as ErrorType>::Error, <WR as ErrorType>::Error>
type Error = ParallelError<<BUS as OutputBus>::Error, <DC as ErrorType>::Error, <WR as ErrorType>::Error>
Error type
Source§async fn send_command(
&mut self,
command: u8,
args: &[u8],
) -> Result<(), Self::Error>
async fn send_command( &mut self, command: u8, args: &[u8], ) -> Result<(), Self::Error>
Send a command with optional parameters
Auto Trait Implementations§
impl<BUS, DC, WR> Freeze for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> RefUnwindSafe for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> Send for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> Sync for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> Unpin for ParallelInterface<BUS, DC, WR>
impl<BUS, DC, WR> UnwindSafe for ParallelInterface<BUS, DC, WR>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> InterfaceExt for Twhere
T: Interface,
impl<T> InterfaceExt for Twhere
T: Interface,
Source§fn write_command(
&mut self,
command: impl DcsCommand,
) -> impl Future<Output = Result<(), Self::Error>>
fn write_command( &mut self, command: impl DcsCommand, ) -> impl Future<Output = Result<(), Self::Error>>
Sends a DCS command to the display interface.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.