326 Embedded Linux System Design and Development
addresses for memory mapping the frame buffer. The variable screen infor-
mation is read/write retrieved using the
FBIOGET_VSCREENINFO ioctl and set
using the
FBIOSET_VSCREENINFO ioctl. The fb_var_screeninfo structure
describes the geometry and timings of the current video mode. The next step
is to
mmap the hardware buffer into our application’s process space using the
mmap() system call.
Now we are ready for plotting our pixel. We take care of the various bit
depths and pixel-packing schemes. The
fb_var_screeninfo structure pro-
vides the bit length and offsets of individual color channels. Finally, using the
property (pixel (x,y) = (line_width * y) + x) of the linear frame buffer, we
plot the single ...