Struct ssd1306::prelude::SPIInterface
source · [−]pub struct SPIInterface<SPI, DC, CS> { /* private fields */ }
Expand description
SPI display interface.
This combines the SPI peripheral and a data/command as well as a chip-select pin
Implementations
sourceimpl<SPI, DC, CS> SPIInterface<SPI, DC, CS>where
SPI: Write<u8>,
DC: OutputPin,
CS: OutputPin,
impl<SPI, DC, CS> SPIInterface<SPI, DC, CS>where
SPI: Write<u8>,
DC: OutputPin,
CS: OutputPin,
sourcepub fn new(spi: SPI, dc: DC, cs: CS) -> SPIInterface<SPI, DC, CS>
pub fn new(spi: SPI, dc: DC, cs: CS) -> SPIInterface<SPI, DC, CS>
Create new SPI interface for communication with a display driver
sourcepub fn release(self) -> (SPI, DC, CS)
pub fn release(self) -> (SPI, DC, CS)
Consume the display interface and return the underlying peripherial driver and GPIO pins used by it
Trait Implementations
sourceimpl<SPI, DC, CS> WriteOnlyDataCommand for SPIInterface<SPI, DC, CS>where
SPI: Write<u8>,
DC: OutputPin,
CS: OutputPin,
impl<SPI, DC, CS> WriteOnlyDataCommand for SPIInterface<SPI, DC, CS>where
SPI: Write<u8>,
DC: OutputPin,
CS: OutputPin,
sourcefn send_commands(&mut self, cmds: DataFormat<'_>) -> Result<(), DisplayError>
fn send_commands(&mut self, cmds: DataFormat<'_>) -> Result<(), DisplayError>
Send a batch of commands to display
sourcefn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>
fn send_data(&mut self, buf: DataFormat<'_>) -> Result<(), DisplayError>
Send pixel data to display
Auto Trait Implementations
impl<SPI, DC, CS> RefUnwindSafe for SPIInterface<SPI, DC, CS>where
CS: RefUnwindSafe,
DC: RefUnwindSafe,
SPI: RefUnwindSafe,
impl<SPI, DC, CS> Send for SPIInterface<SPI, DC, CS>where
CS: Send,
DC: Send,
SPI: Send,
impl<SPI, DC, CS> Sync for SPIInterface<SPI, DC, CS>where
CS: Sync,
DC: Sync,
SPI: Sync,
impl<SPI, DC, CS> Unpin for SPIInterface<SPI, DC, CS>where
CS: Unpin,
DC: Unpin,
SPI: Unpin,
impl<SPI, DC, CS> UnwindSafe for SPIInterface<SPI, DC, CS>where
CS: UnwindSafe,
DC: UnwindSafe,
SPI: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.