Struct st7789::ST7789 [−][src]
pub struct ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin, { /* fields omitted */ }
Expand description
ST7789 driver to connect to TFT displays.
Implementations
impl<DI, RST, PinE> ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
impl<DI, RST, PinE> ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
Creates a new ST7789 driver instance
Arguments
di
- a display interface for talking with the displayrst
- display hard reset pinsize_x
- x axis resolution of the display in pixelssize_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 coordinatey
- y coordinatecolor
- the Rgb565 color value
pub fn set_pixels<T>(
&mut self,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
colors: T
) -> Result<(), Error<PinE>> where
T: IntoIterator<Item = u16>,
pub fn set_pixels<T>(
&mut self,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
colors: T
) -> Result<(), Error<PinE>> where
T: IntoIterator<Item = u16>,
Sets pixel colors in given rectangle bounds.
Arguments
sx
- x coordinate startsy
- y coordinate startex
- x coordinate endey
- y coordinate endcolors
- anything that can provideIntoIterator<Item = u16>
to iterate over pixel data
Release resources allocated to this driver back. This returns the display interface and the RST pin deconstructing the driver.
pub fn set_tearing_effect(
&mut self,
tearing_effect: TearingEffect
) -> Result<(), Error<PinE>>
pub fn set_tearing_effect(
&mut self,
tearing_effect: TearingEffect
) -> Result<(), Error<PinE>>
Configures the tearing effect output.
Trait Implementations
impl<DI, RST, PinE> DrawTarget for ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
impl<DI, RST, PinE> DrawTarget for ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
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>,
fn fill_contiguous<I>(
&mut self,
area: &Rectangle,
colors: I
) -> Result<(), Self::Error> where
I: IntoIterator<Item = Self::Color>,
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
impl<DI, RST, PinE> OriginDimensions for ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
impl<DI, RST, PinE> OriginDimensions for ST7789<DI, RST> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
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.