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. 
href='/debian/lcd4linux.git/commit/Text.c?id=33a43b7658084eaaf169b516e5c18d5e879cb2d2&follow=1'>[lcd4linux @ 2002-08-30 03:54:01 by reinelt]reinelt1-3/+8 2002-08-22[lcd4linux @ 2002-08-22 05:51:36 by reinelt]reinelt1-7/+4 2002-08-21[lcd4linux @ 2002-08-21 06:09:53 by reinelt]reinelt2-10/+48 2002-08-19[lcd4linux @ 2002-08-19 10:51:06 by reinelt]reinelt2-259/+60 2002-08-19[lcd4linux @ 2002-08-19 09:43:43 by reinelt]reinelt1-261/+57 2002-08-19[lcd4linux @ 2002-08-19 09:30:18 by reinelt]reinelt1-256/+106 2002-08-19[lcd4linux @ 2002-08-19 09:11:34 by reinelt]reinelt2-257/+51 2002-08-19[lcd4linux @ 2002-08-19 07:52:19 by reinelt]reinelt3-8/+17 2002-08-19[lcd4linux @ 2002-08-19 07:36:29 by reinelt]reinelt7-359/+481 2002-08-19[lcd4linux @ 2002-08-19 04:41:20 by reinelt]reinelt20-32/+166 2002-08-18[lcd4linux @ 2002-08-18 08:11:11 by reinelt]reinelt1-26/+28 2002-08-17[lcd4linux @ 2002-08-17 14:14:21 by reinelt]reinelt3-67/+101 2002-08-17[lcd4linux @ 2002-08-17 13:10:22 by reinelt]reinelt9-182/+765 2002-08-17[lcd4linux @ 2002-08-17 12:54:08 by reinelt]reinelt1-7/+23 2002-04-30[lcd4linux @ 2002-04-30 07:20:15 by reinelt]reinelt2-173/+129 2002-04-29[lcd4linux @ 2002-04-29 11:00:25 by reinelt]reinelt14-2339/+5100 2001-09-14[lcd4linux @ 2001-09-14 05:57:06 by reinelt]reinelt1-1/+5 2001-09-13[lcd4linux @ 2001-09-13 07:40:57 by reinelt]reinelt1-0/+6 2001-09-12[lcd4linux @ 2001-09-12 06:17:22 by reinelt]reinelt2-1/+8 2001-09-12[lcd4linux @ 2001-09-12 05:58:16 by reinelt]reinelt3-9/+27 2001-09-12[lcd4linux @ 2001-09-12 05:37:22 by reinelt]reinelt4-23/+99 2001-09-11[lcd4linux @ 2001-09-11 06:43:43 by reinelt]reinelt1-1/+10