Struct ili9341::Ili9341 [−][src]
pub struct Ili9341<IFACE, RESET> { /* fields omitted */ }
Expand description
There are two method for drawing to the screen: Ili9341::draw_raw_iter and Ili9341::draw_raw_slice
In both cases the expected pixel format is rgb565.
The hardware makes it efficient to draw rectangles on the screen.
What happens is the following:
- A drawing window is prepared (with the 2 opposite corner coordinates)
- The starting point for drawint is the top left corner of this window
- Every pair of bytes received is intepreted as a pixel value in rgb565
- As soon as a pixel is received, an internal counter is incremented, and the next word will fill the next pixel (the adjacent on the right, or the first of the next row if the row ended)
Implementations
pub fn new<DELAY, SIZE>(
interface: IFACE,
reset: RESET,
delay: &mut DELAY,
mode: Orientation,
_display_size: SIZE
) -> Result<Self, DisplayError> where
DELAY: DelayMs<u16>,
SIZE: DisplaySize,
[src]pub fn configure_vertical_scroll(
&mut self,
fixed_top_lines: u16,
fixed_bottom_lines: u16
) -> Result<Scroller, DisplayError>
[src]
pub fn configure_vertical_scroll(
&mut self,
fixed_top_lines: u16,
fixed_bottom_lines: u16
) -> Result<Scroller, DisplayError>
[src]Configures the screen for hardware-accelerated vertical scrolling.
pub fn scroll_vertically(
&mut self,
scroller: &mut Scroller,
num_lines: u16
) -> Result<(), DisplayError>
[src]pub fn draw_raw_iter<I: IntoIterator<Item = u16>>(
&mut self,
x0: u16,
y0: u16,
x1: u16,
y1: u16,
data: I
) -> Result<(), DisplayError>
[src]
pub fn draw_raw_iter<I: IntoIterator<Item = u16>>(
&mut self,
x0: u16,
y0: u16,
x1: u16,
y1: u16,
data: I
) -> Result<(), DisplayError>
[src]Draw a rectangle on the screen, represented by top-left corner (x0, y0) and bottom-right corner (x1, y1).
The border is included.
This method accepts an iterator of rgb565 pixel values.
The iterator is useful to avoid wasting memory by holding a buffer for the whole screen when it is not necessary.
pub fn draw_raw_slice(
&mut self,
x0: u16,
y0: u16,
x1: u16,
y1: u16,
data: &[u16]
) -> Result<(), DisplayError>
[src]
pub fn draw_raw_slice(
&mut self,
x0: u16,
y0: u16,
x1: u16,
y1: u16,
data: &[u16]
) -> Result<(), DisplayError>
[src]Draw a rectangle on the screen, represented by top-left corner (x0, y0) and bottom-right corner (x1, y1).
The border is included.
This method accepts a raw buffer of words that will be copied to the screen video memory.
The expected format is rgb565.
Change the orientation of the screen
Trait Implementations
type Error = DisplayError
type Error = DisplayError
Error type to return when a drawing operation fails. Read more
Draw individual pixels to the display without a defined order. Read more
fn fill_contiguous<I>(
&mut self,
area: &Rectangle,
colors: I
) -> Result<(), Self::Error> where
I: IntoIterator<Item = Self::Color>,
[src]
fn fill_contiguous<I>(
&mut self,
area: &Rectangle,
colors: I
) -> Result<(), Self::Error> where
I: IntoIterator<Item = Self::Color>,
[src]Fill a given area with an iterator providing a contiguous stream of pixel colors. Read more
Fill a given area with a solid color. Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Returns the bounding box.
Casts the value.
Casts the value.
Casts the value.
Casts the value.