Provides a safe, rusty wrapper around the Linux Framebuffer API (linux/fb.h
).
&mut [u8]
slice to write to)This package does NOT deal with:
* Drawing of any kind
* Color representation and conversion
* Terminal mode setting. If a tty is bound to your framebuffer, you need to set it to graphics mode, to prevent a cursor and other output to be written on top of your image. The usual way to do this is with ioctl(..., KDSETMODE, KD_GRAPHICS)
on the current TTY device. Doing this is out of scope for this crate, since it's not strictly part of the framebuffer API.
First of all, make sure you have access to your framebuffer device.
You can usually do that by running as root (definitely not recommended), or by adding yourself to the video
group.
There are two examples provided in the documentation:
1. Accessing, configuring and using the framebuffer in the linuxfb::Framebuffer documentation
2. Using the optional double-buffering implementation in the linuxfb::double::Buffer documentation