aboutsummaryrefslogtreecommitdiffstats
path: root/README.Drivers
blob: 98628ecb3432f6b769d2e877e3b0ac9b1492a614 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# $Id: README.Drivers,v 1.4 2001/03/09 13:08:11 ltoetsch Exp $
#

How to write new display drivers for lcd4linux

If you plan to write a new display driver for lcd4linux, you should follow
this guidelines:

* use Skeleton.c as a start point.
  You might also have a look at Text.c

* create a new sourcefile <drivername>.c and add it to the bottom of
  Makefile.am

* add an entry to configure.in

* there's no need for a <drivername>.h

* create one (or more) unique display names (your driver will be selected by
  this name in the 'Display'-line of lcd4linux.conf).

* include "display.h" in your driver, to get the LCD structure and various 
  BAR_ definitions

* include "cfg.h" if you need to access settings in the config file.

* create a LCD table at the bottom of your driver, and fill it with the
  appropriate values. Take care that you specify the correct bar capabilities
  of your display or driver:

  BAR_L:  horizontal bars headed left
  BAR_R:  horizontal bars headed right
  BAR_H2: driver supports horizontal dual-bars
  BAR_U:  vertical bars bottom-up
  BAR_D:  vertical bars top-down
  BAR_V2: driver supports vertical dual-bars

* edit display.c and create a reference to your LCD table:

     external LCD YourDriver[];

* extend the FAMILY table in display.c with your driver:

     FAMILY Driver[] = {
       { "Skeleton",      Skeleton },
       { "MatrixOrbital", MatrixOrbital },
       { "YourFamily",    YourDriver },
       { "" }
     };

* write the correspondig init(), clear(), put(), bar(), quit() and
  flush()-functions. There's no need to use a framebuffer and display its
  contents with the flush()- call (as in MatrixOrbital.c), you can directly
  write to the display in the put()- and bar()-functions, and use an empty
  flush()-function. But if you have a limited number of user-defined
  characters, and therefore you have to do some sort of 'character reduction'
  or similar stuff, you will have to use a framebuffer and the flush()-call. 
-highlight'> timer queues added liblcd4linux deactivated turing transformation to new layout 2004-01-12[lcd4linux @ 2004-01-12 03:51:01 by reinelt]reinelt5-15/+44 evaluating the 'Variables' section in the config file 2004-01-11[lcd4linux @ 2004-01-11 18:26:02 by reinelt]reinelt10-79/+158 further widget and layout processing 2004-01-11[lcd4linux @ 2004-01-11 09:26:15 by reinelt]reinelt4-19/+67 layout starts to exist... 2004-01-10[lcd4linux @ 2004-01-10 20:22:33 by reinelt]reinelt13-210/+554 added new function 'cfg_list()' (not finished yet) added layout.c (will replace processor.c someday) added widget_text.c (will be the first and most important widget) modified lcd4linux.c so that old-style configs should work, too 2004-01-10[lcd4linux @ 2004-01-10 17:45:26 by reinelt]reinelt2-5/+15 changed initialization order so cfg() gets initialized before plugins. This way a plugin's init() can use cfg_get(). Thanks to Xavier for reporting this one! 2004-01-10[lcd4linux @ 2004-01-10 17:36:56 by reinelt]reinelt4-10/+207 I2C Sensors plugin from Xavier added 2004-01-10[lcd4linux @ 2004-01-10 17:34:40 by reinelt]reinelt3-176/+138 further matrixOrbital changes widgets initialized 2004-01-10[lcd4linux @ 2004-01-10 10:20:22 by reinelt]reinelt2-14/+605 new MatrixOrbital changes 2004-01-09[lcd4linux @ 2004-01-09 17:03:06 by reinelt]reinelt10-51/+420 initiated transfer to new driver architecture new file 'drv.c' will someday replace 'display.c' new file 'drv_MatrixOrbital.c' will replace 'MatrixOrbital.c' due to this 'soft' transfer lcd4linux should stay usable during the switch (at least I hope so) 2004-01-09[lcd4linux @ 2004-01-09 04:16:06 by reinelt]reinelt28-193/+332 added 'section' argument to cfg_get(), but NULLed it on all calls by now. 2004-01-08[lcd4linux @ 2004-01-08 06:00:28 by reinelt]reinelt1-8/+14 allowed '.' in key names allowed empty group keys (not only "group anything {", but "anything {") 2004-01-08[lcd4linux @ 2004-01-08 05:28:12 by reinelt]reinelt3-42/+198 Luk Claes added to AUTHORS cfg: group handling ('{}') added 2004-01-07[lcd4linux @ 2004-01-07 10:15:41 by reinelt]reinelt4-184/+436 small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster 2004-01-06[lcd4linux @ 2004-01-06 23:01:37 by reinelt]reinelt3-4/+7 more copyright issues 2004-01-06[lcd4linux @ 2004-01-06 22:33:13 by reinelt]reinelt14-472/+542 Copyright statements cleaned up 2004-01-06[lcd4linux @ 2004-01-06 21:14:51 by reinelt]reinelt4-14/+7 more debianizing 2004-01-06[lcd4linux @ 2004-01-06 18:22:41 by reinelt]reinelt1-3/+13 debian updates 2004-01-06[lcd4linux @ 2004-01-06 17:56:43 by reinelt]reinelt3-1000/+2045 autotools update 2004-01-06[lcd4linux @ 2004-01-06 17:37:00 by reinelt]reinelt1-0/+20 2004-01-06[lcd4linux @ 2004-01-06 17:33:45 by reinelt]reinelt6-28/+298 Evaluator: functions with variable argument lists Evaluator: plugin_sample.c and README.Plugins added 2004-01-06[lcd4linux @ 2004-01-06 15:19:12 by reinelt]reinelt2-104/+136 Evaluator rearrangements... 2004-01-05[lcd4linux @ 2004-01-05 11:57:38 by reinelt]reinelt7-8/+168 added %y tokens to make the Evaluator useable 2004-01-02[lcd4linux @ 2004-01-02 14:20:15 by reinelt]reinelt10-0/+201 debianization added 2004-01-02[lcd4linux @ 2004-01-02 14:18:54 by reinelt]reinelt2-0/+101 Changelog, TODO updated 2003-12-19[lcd4linux @ 2003-12-19 06:27:33 by reinelt]reinelt4-8/+119 added XMMS plugin from Markus Keil