pub trait Model {
type ColorFormat: RgbColor;
fn init<RST, DELAY, DI>(
&mut self,
di: &mut DI,
delay: &mut DELAY,
options: &ModelOptions,
rst: &mut Option<RST>
) -> Result<u8, InitError<RST::Error>>
where
RST: OutputPin,
DELAY: DelayUs<u32>,
DI: WriteOnlyDataCommand;
fn write_pixels<DI, I>(&mut self, di: &mut DI, colors: I) -> Result<(), Error>
where
DI: WriteOnlyDataCommand,
I: IntoIterator<Item = Self::ColorFormat>;
fn default_options() -> ModelOptions;
fn hard_reset<RST, DELAY>(
&mut self,
rst: &mut RST,
delay: &mut DELAY
) -> Result<(), InitError<RST::Error>>
where
RST: OutputPin,
DELAY: DelayUs<u32>,
{ ... }
}
Required Associated Types§
type ColorFormat: RgbColor
Required Methods§
sourcefn init<RST, DELAY, DI>(
&mut self,
di: &mut DI,
delay: &mut DELAY,
options: &ModelOptions,
rst: &mut Option<RST>
) -> Result<u8, InitError<RST::Error>>where
RST: OutputPin,
DELAY: DelayUs<u32>,
DI: WriteOnlyDataCommand,
fn init<RST, DELAY, DI>(
&mut self,
di: &mut DI,
delay: &mut DELAY,
options: &ModelOptions,
rst: &mut Option<RST>
) -> Result<u8, InitError<RST::Error>>where
RST: OutputPin,
DELAY: DelayUs<u32>,
DI: WriteOnlyDataCommand,
Initializes the display for this model with MADCTL from crate::Display and returns the value of MADCTL set by init
sourcefn write_pixels<DI, I>(&mut self, di: &mut DI, colors: I) -> Result<(), Error>where
DI: WriteOnlyDataCommand,
I: IntoIterator<Item = Self::ColorFormat>,
fn write_pixels<DI, I>(&mut self, di: &mut DI, colors: I) -> Result<(), Error>where
DI: WriteOnlyDataCommand,
I: IntoIterator<Item = Self::ColorFormat>,
Writes pixels to the display IC via the given DisplayInterface Any pixel color format conversion is done here
sourcefn default_options() -> ModelOptions
fn default_options() -> ModelOptions
Creates default ModelOptions for this particular Model. This serves as a “sane default”. There can be additional variants which will be provided via helper constructors.