Struct display_interface_spi::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) -> Self
pub fn new(spi: SPI, dc: DC, cs: CS) -> Self
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