Skip to main content

FrameBuffer

Trait FrameBuffer 

Source
pub trait FrameBuffer {
    // Required methods
    fn get_word_size(&self) -> WordSize;
    fn plane_count(&self) -> usize;
    fn plane_ptr_len(&self, plane_idx: usize) -> (*const u8, usize);
}
Expand description

Trait for read-only framebuffers.

Required Methods§

Source

fn get_word_size(&self) -> WordSize

Returns the word size configuration for this framebuffer

Source

fn plane_count(&self) -> usize

Returns the number of BCM bit-planes in this framebuffer.

Contiguous (threshold-based) framebuffers return 1 — the entire buffer is treated as a single plane. True bit-plane framebuffers return the number of planes (typically equal to the colour depth in bits).

Source

fn plane_ptr_len(&self, plane_idx: usize) -> (*const u8, usize)

Returns a raw pointer and byte length for the given plane.

For a single-plane framebuffer (plane_count() == 1), plane_idx must be 0 and the returned span covers the whole DMA-ready buffer.

§Panics

May panic if plane_idx >= plane_count().

Implementors§

Source§

impl<F: FrameBuffer, M: PixelRemapper, const PANEL_ROWS: usize, const PANEL_COLS: usize, const NROWS: usize, const BITS: u8, const FRAME_COUNT: usize, const TILE_ROWS: usize, const TILE_COLS: usize, const FB_COLS: usize> FrameBuffer for TiledFrameBuffer<F, M, PANEL_ROWS, PANEL_COLS, NROWS, BITS, FRAME_COUNT, TILE_ROWS, TILE_COLS, FB_COLS>

Source§

impl<const NROWS: usize, const COLS: usize, const PLANES: usize> FrameBuffer for hub75_framebuffer::bitplane::latched::DmaFrameBuffer<NROWS, COLS, PLANES>

Source§

impl<const NROWS: usize, const COLS: usize, const PLANES: usize> FrameBuffer for hub75_framebuffer::bitplane::plain::DmaFrameBuffer<NROWS, COLS, PLANES>

Source§

impl<const ROWS: usize, const COLS: usize, const NROWS: usize, const BITS: u8, const FRAME_COUNT: usize> FrameBuffer for &mut hub75_framebuffer::latched::DmaFrameBuffer<ROWS, COLS, NROWS, BITS, FRAME_COUNT>

Source§

impl<const ROWS: usize, const COLS: usize, const NROWS: usize, const BITS: u8, const FRAME_COUNT: usize> FrameBuffer for &mut hub75_framebuffer::plain::DmaFrameBuffer<ROWS, COLS, NROWS, BITS, FRAME_COUNT>

Source§

impl<const ROWS: usize, const COLS: usize, const NROWS: usize, const BITS: u8, const FRAME_COUNT: usize> FrameBuffer for hub75_framebuffer::latched::DmaFrameBuffer<ROWS, COLS, NROWS, BITS, FRAME_COUNT>

Source§

impl<const ROWS: usize, const COLS: usize, const NROWS: usize, const BITS: u8, const FRAME_COUNT: usize> FrameBuffer for hub75_framebuffer::plain::DmaFrameBuffer<ROWS, COLS, NROWS, BITS, FRAME_COUNT>