Reading input events

The driver for the touch screen that I have been using registers itself as an input event handler. If it is the only input device on the system, it will be mapped to /dev/input/event0. If there is also an USB mouse, for example, it will be mapped to /dev/input/event1. You can get an idea of … Continue reading Reading input events

Using the framebuffer

This is a quick note on how to draw to the screen using the framebuffer on Linux. The example below builds on the previous post and runs on a Raspberry Pi equipped with a 320x480 TFT display. The code just fills the entire screen with red color: First we open "/dev/fb1", which is the framebuffer … Continue reading Using the framebuffer