#uefi #graphics #no-std

no-std uefi-graphics

An embedded-graphics display driver for UEFI environments

4 releases (breaking)

0.4.0 Jul 29, 2021
0.3.1 Jul 24, 2021
0.3.0 Jul 24, 2021
0.2.0 Nov 9, 2020
0.1.0 Sep 23, 2020

#1294 in Embedded development

MIT/Apache

5KB
56 lines

Uefi-graphics

An embedded-graphics display driver for UEFI environments.

Simple, slight work in progress. Should work fine, doesn't do too much.

Example

Using the uefi, currently at 0.11.0 crate

// The GraphicsOutput from the uefi crate
let graphics: &mut GraphicsOutput;

// Get the framebuffer.
let mut fb = graphics.frame_buffer();

let display = &mut UefiDisplay::new(
    // The framebuffer pointer.
    // The framebuffer is stored in a variable separately to ensure the
    // `UefiDisplay` cannot become invalid.
    fb.as_mut_ptr(),

    // These casts are needed because, while the uefi spec has these as u32,
    // the uefi crate casts them to usize for some reason.
    mode.stride() as u32,
    (mode.resolution().0 as u32, mode.resolution().1 as u32),

    // This ensures that the lifetimes are correct.
    &fb,
);

lib.rs:

An embedded-graphics display driver for UEFI environments

Dependencies

~485KB