pub struct Display<DI, RST, MODEL> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
MODEL: Model, { /* private fields */ }
Expand description
Display driver to connect to TFT displays.
Implementations
sourceimpl<DI, RST> Display<DI, RST, ILI9486Rgb565> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
impl<DI, RST> Display<DI, RST, ILI9486Rgb565> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
sourcepub fn ili9486_rgb565(di: DI, rst: RST) -> Self
pub fn ili9486_rgb565(di: DI, rst: RST) -> Self
sourceimpl<DI, RST> Display<DI, RST, ILI9486Rgb666> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
impl<DI, RST> Display<DI, RST, ILI9486Rgb666> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
sourcepub fn ili9486_rgb666(di: DI, rst: RST) -> Self
pub fn ili9486_rgb666(di: DI, rst: RST) -> Self
sourceimpl<DI, RST> Display<DI, RST, ST7735s> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
impl<DI, RST> Display<DI, RST, ST7735s> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
sourceimpl<DI> Display<DI, NoPin, ST7735s> where
DI: WriteOnlyDataCommand,
impl<DI> Display<DI, NoPin, ST7735s> where
DI: WriteOnlyDataCommand,
sourcepub fn st7735s_without_rst(di: DI) -> Self
pub fn st7735s_without_rst(di: DI) -> Self
sourceimpl<DI, RST> Display<DI, RST, ST7789> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
impl<DI, RST> Display<DI, RST, ST7789> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
sourceimpl<DI> Display<DI, NoPin, ST7789> where
DI: WriteOnlyDataCommand,
impl<DI> Display<DI, NoPin, ST7789> where
DI: WriteOnlyDataCommand,
sourcepub fn st7789_without_rst(di: DI) -> Self
pub fn st7789_without_rst(di: DI) -> Self
sourceimpl<DI, RST, M> Display<DI, RST, M> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
M: Model,
impl<DI, RST, M> Display<DI, RST, M> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
M: Model,
sourcepub fn with_model(di: DI, rst: Option<RST>, model: M) -> Self
pub fn with_model(di: DI, rst: Option<RST>, model: M) -> Self
sourcepub fn init(
&mut self,
delay_source: &mut impl DelayUs<u32>,
options: DisplayOptions
) -> Result<(), Error<RST::Error>>
pub fn init(
&mut self,
delay_source: &mut impl DelayUs<u32>,
options: DisplayOptions
) -> Result<(), Error<RST::Error>>
sourcepub fn orientation(&self) -> Orientation
pub fn orientation(&self) -> Orientation
Returns currently set Orientation
sourcepub fn set_orientation(
&mut self,
orientation: Orientation
) -> Result<(), Error<RST::Error>>
pub fn set_orientation(
&mut self,
orientation: Orientation
) -> Result<(), Error<RST::Error>>
Sets display Orientation
sourcepub fn set_pixel(
&mut self,
x: u16,
y: u16,
color: M::ColorFormat
) -> Result<(), Error<RST::Error>>
pub fn set_pixel(
&mut self,
x: u16,
y: u16,
color: M::ColorFormat
) -> Result<(), Error<RST::Error>>
sourcepub fn set_pixels<T>(
&mut self,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
colors: T
) -> Result<(), Error<RST::Error>> where
T: IntoIterator<Item = M::ColorFormat>,
pub fn set_pixels<T>(
&mut self,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
colors: T
) -> Result<(), Error<RST::Error>> where
T: IntoIterator<Item = M::ColorFormat>,
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
sourcepub fn set_scroll_region(
&mut self,
tfa: u16,
vsa: u16,
bfa: u16
) -> Result<(), Error<RST::Error>>
pub fn set_scroll_region(
&mut self,
tfa: u16,
vsa: u16,
bfa: u16
) -> Result<(), Error<RST::Error>>
Sets scroll region
Arguments
tfa
- Top fixed areavsa
- Vertical scrolling areabfa
- Bottom fixed area
sourcepub fn release(self) -> (DI, Option<RST>, M)
pub fn release(self) -> (DI, Option<RST>, M)
Release resources allocated to this driver back. This returns the display interface and the RST pin deconstructing the driver.
sourcepub fn set_tearing_effect(
&mut self,
tearing_effect: TearingEffect
) -> Result<(), Error<RST::Error>>
pub fn set_tearing_effect(
&mut self,
tearing_effect: TearingEffect
) -> Result<(), Error<RST::Error>>
Configures the tearing effect output.
Trait Implementations
sourceimpl<DI, RST, M> DrawTarget for Display<DI, RST, M> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
M: Model,
impl<DI, RST, M> DrawTarget for Display<DI, RST, M> where
DI: WriteOnlyDataCommand,
RST: OutputPin,
M: Model,
type Error = Error<<RST as OutputPin>::Error>
type Error = Error<<RST as OutputPin>::Error>
Error type to return when a drawing operation fails. Read more
type Color = <M as Model>::ColorFormat
type Color = <M as Model>::ColorFormat
The pixel color type the targetted display supports.
sourcefn draw_iter<T>(&mut self, item: T) -> Result<(), Self::Error> where
T: IntoIterator<Item = Pixel<Self::Color>>,
fn draw_iter<T>(&mut self, item: T) -> Result<(), Self::Error> where
T: IntoIterator<Item = Pixel<Self::Color>>,
Draw individual pixels to the display without a defined order. Read more
sourcefn 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
sourceimpl<DI, RST, MODEL, PinE> OriginDimensions for Display<DI, RST, MODEL> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
MODEL: Model,
impl<DI, RST, MODEL, PinE> OriginDimensions for Display<DI, RST, MODEL> where
DI: WriteOnlyDataCommand,
RST: OutputPin<Error = PinE>,
MODEL: Model,
Auto Trait Implementations
impl<DI, RST, MODEL> RefUnwindSafe for Display<DI, RST, MODEL> where
DI: RefUnwindSafe,
MODEL: RefUnwindSafe,
RST: RefUnwindSafe,
impl<DI, RST, MODEL> Send for Display<DI, RST, MODEL> where
DI: Send,
MODEL: Send,
RST: Send,
impl<DI, RST, MODEL> Sync for Display<DI, RST, MODEL> where
DI: Sync,
MODEL: Sync,
RST: Sync,
impl<DI, RST, MODEL> Unpin for Display<DI, RST, MODEL> where
DI: Unpin,
MODEL: Unpin,
RST: Unpin,
impl<DI, RST, MODEL> UnwindSafe for Display<DI, RST, MODEL> where
DI: UnwindSafe,
MODEL: UnwindSafe,
RST: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> CheckedAs for T
impl<T> CheckedAs for T
sourcefn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dst where
Src: CheckedCast<Dst>,
sourcefn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
sourceimpl<T> Dimensions for T where
T: OriginDimensions,
impl<T> Dimensions for T where
T: OriginDimensions,
sourcefn bounding_box(&self) -> Rectangle
fn bounding_box(&self) -> Rectangle
Returns the bounding box.
sourceimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
sourcefn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dst where
Src: OverflowingCast<Dst>,
sourcefn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
sourceimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
sourcefn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dst where
Src: SaturatingCast<Dst>,
sourcefn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
sourcefn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dst where
Src: UnwrappedCast<Dst>,
sourcefn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
sourceimpl<T> WrappingAs for T
impl<T> WrappingAs for T
sourcefn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
Casts the value.
sourceimpl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dst where
Src: WrappingCast<Dst>,
sourcefn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.