pub struct RM67162;
Expand description
RM67162 AMOLED display driver implementation
Supports:
- 16-bit RGB565 color
- 240x536 resolution
This driver was developed for the Lilygo T-Display-S3 AMOLED display (v2). The initialization sequence is based on Lilygo’s Arduino example code.
Currently only tested with 240x536 resolution displays. While it may work with other display sizes, this is untested and could lead to unexpected behavior. If you encounter issues with different display sizes, please report them.
Trait Implementations§
Source§impl Model for RM67162
impl Model for RM67162
Source§const FRAMEBUFFER_SIZE: (u16, u16)
const FRAMEBUFFER_SIZE: (u16, u16)
The framebuffer size in pixels.
Source§type ColorFormat = Rgb565
type ColorFormat = Rgb565
The color format.
Source§async fn init<DELAY, DI>(
&mut self,
di: &mut DI,
delay: &mut DELAY,
options: &ModelOptions,
) -> Result<SetAddressMode, ModelInitError<DI::Error>>
async fn init<DELAY, DI>( &mut self, di: &mut DI, delay: &mut DELAY, options: &ModelOptions, ) -> Result<SetAddressMode, ModelInitError<DI::Error>>
Initializes the display for this model with MADCTL from crate::Display
and returns the value of MADCTL set by init
Source§const RESET_DURATION: u32 = 10u32
const RESET_DURATION: u32 = 10u32
Duration of the active low reset pulse in µs.
Source§fn update_address_window<DI>(
di: &mut DI,
_rotation: Rotation,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
fn update_address_window<DI>(
di: &mut DI,
_rotation: Rotation,
sx: u16,
sy: u16,
ex: u16,
ey: u16,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
Updates the address window of the display.
Source§fn sleep<DI, DELAY>(
di: &mut DI,
delay: &mut DELAY,
) -> impl Future<Output = Result<(), DI::Error>>
fn sleep<DI, DELAY>( di: &mut DI, delay: &mut DELAY, ) -> impl Future<Output = Result<(), DI::Error>>
Need to call Self::wake before issuing other commands
Source§fn wake<DI, DELAY>(
di: &mut DI,
delay: &mut DELAY,
) -> impl Future<Output = Result<(), DI::Error>>
fn wake<DI, DELAY>( di: &mut DI, delay: &mut DELAY, ) -> impl Future<Output = Result<(), DI::Error>>
Wakes the display after it’s been set to sleep via Self::sleep
Source§fn write_memory_start<DI>(
di: &mut DI,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
fn write_memory_start<DI>(
di: &mut DI,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
We need WriteMemoryStart befor write pixel
Source§fn software_reset<DI>(
di: &mut DI,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
fn software_reset<DI>(
di: &mut DI,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
SoftReset
Source§fn update_options<DI>(
&self,
di: &mut DI,
options: &ModelOptions,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
fn update_options<DI>(
&self,
di: &mut DI,
options: &ModelOptions,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
This function will been called if user update options
Source§fn set_tearing_effect<DI>(
di: &mut DI,
tearing_effect: TearingEffect,
_options: &ModelOptions,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
fn set_tearing_effect<DI>(
di: &mut DI,
tearing_effect: TearingEffect,
_options: &ModelOptions,
) -> impl Future<Output = Result<(), DI::Error>>where
DI: Interface,
Configures the tearing effect output.
Auto Trait Implementations§
impl Freeze for RM67162
impl RefUnwindSafe for RM67162
impl Send for RM67162
impl Sync for RM67162
impl Unpin for RM67162
impl UnwindSafe for RM67162
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.