[−][src]Struct uc8159::Display
An instance of a display which is governed by a particular uc8159
controller.
Implementations
impl<SPI, DELAY, RESET, BUSY, DC, ERR> Display<SPI, DELAY, RESET, BUSY, DC, ERR> where
SPI: Write<u8>,
DELAY: DelayMs<u16>,
RESET: OutputPin,
BUSY: InputPin,
DC: OutputPin,
ERR: From<SPI::Error> + From<RESET::Error> + From<BUSY::Error> + From<DC::Error>,
[src]
SPI: Write<u8>,
DELAY: DelayMs<u16>,
RESET: OutputPin,
BUSY: InputPin,
DC: OutputPin,
ERR: From<SPI::Error> + From<RESET::Error> + From<BUSY::Error> + From<DC::Error>,
pub fn new(
spi: SPI,
delay: DELAY,
reset: RESET,
busy: BUSY,
dc: DC,
config: Config
) -> Self
[src]
spi: SPI,
delay: DELAY,
reset: RESET,
busy: BUSY,
dc: DC,
config: Config
) -> Self
Creates a new display instance.
The provided spi
bus will be used for most of the communication. The delay
instance
is used when waiting for reset and drawing operations to complete. The reset
pin can be
provided to make sure the device is reset before each new draw command. The busy
pin is
used to poll to see when draw operations are complete. The dc
pin is used to signal
whether the sent spi
signal is a command (low) or data (high).
pub fn width(&self) -> usize
[src]
The width of the display.
pub fn height(&self) -> usize
[src]
The height of the display.
pub fn fill(&mut self, color: Color)
[src]
Fills the entire display using a single color.
This is a pretty fast operation compared to e.g. calling set_pixel
.
pub fn copy_from(&mut self, color: &[Color])
[src]
Copies data from another source in bulk.
The color data must contain exactly width() * height()
elements and be in row-major order.
pub fn set_pixel(&mut self, x: usize, y: usize, color: Color)
[src]
Sets a specific pixel color.
pub fn show(&mut self) -> Result<(), ERR>
[src]
Displays the contents of the internal buffer to the screen.
This operation blocks until the contents are completely shown.
Trait Implementations
impl<SPI: Debug, TIMER: Debug, RESET: Debug, BUSY: Debug, DC: Debug, ERR: Debug> Debug for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
SPI: Write<u8>,
TIMER: DelayMs<u16>,
RESET: OutputPin,
BUSY: InputPin,
DC: OutputPin,
ERR: From<SPI::Error> + From<RESET::Error> + From<BUSY::Error> + From<DC::Error>,
[src]
SPI: Write<u8>,
TIMER: DelayMs<u16>,
RESET: OutputPin,
BUSY: InputPin,
DC: OutputPin,
ERR: From<SPI::Error> + From<RESET::Error> + From<BUSY::Error> + From<DC::Error>,
Auto Trait Implementations
impl<SPI, TIMER, RESET, BUSY, DC, ERR> RefUnwindSafe for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
BUSY: RefUnwindSafe,
DC: RefUnwindSafe,
ERR: RefUnwindSafe,
RESET: RefUnwindSafe,
SPI: RefUnwindSafe,
TIMER: RefUnwindSafe,
[src]
BUSY: RefUnwindSafe,
DC: RefUnwindSafe,
ERR: RefUnwindSafe,
RESET: RefUnwindSafe,
SPI: RefUnwindSafe,
TIMER: RefUnwindSafe,
impl<SPI, TIMER, RESET, BUSY, DC, ERR> Send for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
BUSY: Send,
DC: Send,
ERR: Send,
RESET: Send,
SPI: Send,
TIMER: Send,
[src]
BUSY: Send,
DC: Send,
ERR: Send,
RESET: Send,
SPI: Send,
TIMER: Send,
impl<SPI, TIMER, RESET, BUSY, DC, ERR> Sync for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
BUSY: Sync,
DC: Sync,
ERR: Sync,
RESET: Sync,
SPI: Sync,
TIMER: Sync,
[src]
BUSY: Sync,
DC: Sync,
ERR: Sync,
RESET: Sync,
SPI: Sync,
TIMER: Sync,
impl<SPI, TIMER, RESET, BUSY, DC, ERR> Unpin for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
BUSY: Unpin,
DC: Unpin,
ERR: Unpin,
RESET: Unpin,
SPI: Unpin,
TIMER: Unpin,
[src]
BUSY: Unpin,
DC: Unpin,
ERR: Unpin,
RESET: Unpin,
SPI: Unpin,
TIMER: Unpin,
impl<SPI, TIMER, RESET, BUSY, DC, ERR> UnwindSafe for Display<SPI, TIMER, RESET, BUSY, DC, ERR> where
BUSY: UnwindSafe,
DC: UnwindSafe,
ERR: UnwindSafe,
RESET: UnwindSafe,
SPI: UnwindSafe,
TIMER: UnwindSafe,
[src]
BUSY: UnwindSafe,
DC: UnwindSafe,
ERR: UnwindSafe,
RESET: UnwindSafe,
SPI: UnwindSafe,
TIMER: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,