pub struct ST7789<DI, RST, BL> where
    DI: WriteOnlyDataCommand,
    RST: OutputPin,
    BL: OutputPin
{ /* private fields */ }
Expand description

ST7789 driver to connect to TFT displays.

Implementations

Creates a new ST7789 driver instance

Arguments
  • di - a display interface for talking with the display
  • rst - display hard reset pin
  • bl - backlight pin
  • size_x - x axis resolution of the display in pixels
  • size_y - y axis resolution of the display in pixels

Runs commands to initialize the display

Arguments
  • delay_source - mutable reference to a delay provider

Performs a hard reset using the RST pin sequence

Arguments
  • delay_source - mutable reference to a delay provider

Returns currently set orientation

Sets display orientation

Sets a pixel color at the given coords.

Arguments
  • x - x coordinate
  • y - y coordinate
  • color - the Rgb565 color value

Sets pixel colors in given rectangle bounds.

Arguments
  • sx - x coordinate start
  • sy - y coordinate start
  • ex - x coordinate end
  • ey - y coordinate end
  • colors - anything that can provide IntoIterator<Item = u16> to iterate over pixel data

Sets scroll offset “shifting” the displayed picture

Arguments
  • offset - scroll offset in pixels

Release resources allocated to this driver back. This returns the display interface and the RST pin deconstructing the driver.

Configures the tearing effect output.

Trait Implementations

Error type to return when a drawing operation fails. Read more

The pixel color type the targetted display supports.

Draw individual pixels to the display without a defined order. Read more

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

Fill the entire display with a solid color. Read more

Returns the size of the bounding box.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Returns the bounding box.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

Casts the value.

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.