That is where I keep the scripts I use for testing my displays with FBTFT.
It started with test_fb.py which writes some patterns directly to the Linux framebuffer. In the case of FBTFT, it will be run like this:
Code: Select all
python test_fb.py --device=/dev/fb1
It does not contain scripts that talk directly with the displays through SPI.
The hy28a_test script matches a setup I have, and is used to test the fb_ili9320 kernel driver when I have made changes.
Talking about drivers can be a bit confusing without context. There are two main categories of drivers: kernel drivers and userspace drivers (ordinary applications).
A kernel driver can talk directly to the Linux SPI subsystem (spi_write()).
A userspace driver has to go through the spidev module (/dev/spidev0.0)
A third option is also available on the Pi: writing directly to the hardware registers from userspace, as the bcm2835 library does.
So when it comes to these SPI displays there are two ways to get something displayed:
* Use a Linux kernel framebuffer driver that sets up videomemory at /dev/fbX and takes care of keeping the display in sync with this video memory (framebuffer).
* Use an application (or library) that talks directly to the display through /dev/spidevX.X. Such a library can also be modelled like the Linux kernel framebuffer subsystem fbdev. But the usual way is to write each pixel directly to the display.
for instance, writes one pixel at a time using the bcm2835 library, which talks directly to the hardware registers on the Pi. Completly bypassing the Linux SPI subsystem