Skip to main content
RKTK API Docs RKTK Home Repo

DisplaySize

Trait DisplaySize 

Source
pub trait DisplaySize {
    type Buffer: AsMut<[u8]> + NewZeroed;

    const WIDTH: u8;
    const HEIGHT: u8;
    const DRIVER_COLS: u8 = 128;
    const DRIVER_ROWS: u8 = 64;
    const OFFSETX: u8 = 0;
    const OFFSETY: u8 = 0;

    // Required method
    fn configure(
        &self,
        iface: &mut impl WriteOnlyDataCommand,
    ) -> Result<(), DisplayError>;
}
Expand description

Display information.

This trait describes information related to a particular display. This includes resolution, offset and framebuffer size.

Required Associated Constants§

Source

const WIDTH: u8

Width in pixels

Source

const HEIGHT: u8

Height in pixels

Provided Associated Constants§

Source

const DRIVER_COLS: u8 = 128

Maximum width supported by the display driver

Source

const DRIVER_ROWS: u8 = 64

Maximum height supported by the display driver

Source

const OFFSETX: u8 = 0

Horizontal offset in pixels

Source

const OFFSETY: u8 = 0

Vertical offset in pixels

Required Associated Types§

Source

type Buffer: AsMut<[u8]> + NewZeroed

Size of framebuffer. Because the display is monochrome, this is width * height / 8

Required Methods§

Source

fn configure( &self, iface: &mut impl WriteOnlyDataCommand, ) -> Result<(), DisplayError>

Send resolution and model-dependent configuration to the display

See Command::ComPinConfig and Command::InternalIref for more information

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§