Trait mipidsi::models::Model

source ·
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§

Required Methods§

Initializes the display for this model with MADCTL from crate::Display and returns the value of MADCTL set by init

Writes pixels to the display IC via the given DisplayInterface Any pixel color format conversion is done here

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.

Provided Methods§

Implementors§