11.2. The Linux Framebuffer Device Driver

Linux provides access to video memory (also known as the framebuffer) the same way it provides access to most other devices—via a device file. The framebuffer device file is /dev/fb0, and as with other files, we can access the data in the file using the system calls open, read, write, and close. You can learn more about these system calls from their man pages (e.g., execute man 2 write). Most system calls that access files do so using a small integer called a file descriptor. The system call open is an exception; it returns a file descriptor using a path to a file.

11.2.1. Manipulating the Framebuffer with open, read, write, and close

Because of this device file interface, it is easy to exercise the framebuffer ...

Get Linux Appliance Design now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.