LCDproc development and user support list

Text archives Help


[Lcdproc] [PATCH] Add serdisplib driver


Chronological Thread 
  • From: bernhard at bwalle.de (Bernhard Walle)
  • Subject: [Lcdproc] [PATCH] Add serdisplib driver
  • Date: Mon, 22 Nov 2010 21:16:30 +0100


This patch adds a serdisplib driver for the serdisplib library
(http://serdisplib.sf.net) that is used for low-level accessing of dot-matrix
devices (i.e. such displays that are drived by pixel and not by characters
unlike HD44780, for example).

I know there's already glcdlib. But that approach has several disadvantages:

o Unnecessary library dependencies.
o Complicated installation, i.e. you have to edit two configuration files.
o Too much redraws. In fact, that was the reason for me to write this
driver because my ctinclud display (http://www.ct-maeusekino.de) was quite
unusable with the glcdlib driver. The problem is simply that lcdproc
redraws the whole screen each second and it's the task of the driver
to not to redraw it in reality. The problem is now that the glcdproc
driver only has the view of characters, and cannot decide which pixels it
actually has to redraw. And graphlcd which has the per-pixel view doesn't
do that "caching" and simply redraws all. Of course, that _can_
be changed in graphlcd, but I'm sure that leads to endless discussions and
because I didn't like the glcdlib -> graphlcd -> serdisplib approach
anyway, I decided to write that driver.

Some important design decisions:

o The driver is split into lcdgraphic.c and serdisplib.c. All function that
do the character -> pixel "rendering" are split out into lcdgraphic.c,
so it would be possible to write another low-level driver that uses that
function. However, in normal cases it makes more sense to add that part to
serdisplib.
o It only requires FreeType (http://freetype.sf.net) for font rendering.
That's no new real dependency because in almost all cases, graphlcd was
compiled with FreeType support.
o Only mono space fonts are supported.
o The driver implements symbols (arrow, etc.) using Unicode characters of the
font. (The recommended font is Andale Mono which is available for free
from http://corefonts.sf.net)
o Works on i686 and x86_64.

Please review. The patch is against current CVS. If you consider to add
this into CVS, I'll provide documentation.

Signed-off-by: Bernhard Walle <bernhard at bwalle.de>
---
LCDd.conf | 27 ++-
acinclude.m4 | 27 ++-
server/drivers/Makefile.am | 5 +-
server/drivers/lcdgraphic.c | 609
+++++++++++++++++++++++++++++++++++++++++++
server/drivers/lcdgraphic.h | 239 +++++++++++++++++
server/drivers/serdisplib.c | 448 +++++++++++++++++++++++++++++++
6 files changed, 1351 insertions(+), 4 deletions(-)
create mode 100644 server/drivers/lcdgraphic.c
create mode 100644 server/drivers/lcdgraphic.h
create mode 100644 server/drivers/serdisplib.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-serdisplib-driver.patch
Type: text/x-patch
Size: 40924 bytes
Desc: not available
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20101122/7837c099/attachment-0001.bin>




Archive powered by MHonArc 2.6.18.

Top of page