diff --git a/docs/lcdproc-dev/add-your-driver.docbook b/docs/lcdproc-dev/add-your-driver.docbook
index 4db574b..023df28 100644
--- a/docs/lcdproc-dev/add-your-driver.docbook
+++ b/docs/lcdproc-dev/add-your-driver.docbook
@@ -15,7 +15,7 @@ This chapter will explain you the major steps and few gotchas of adding your own
-Autoconf, automake, börk börk börk!
+Autoconf, automake, and Everything!
How I Learned to Stop Worrying and Love the Configure Script
@@ -148,7 +148,11 @@ myDriver_LDADD = @SOMESTRANGELIB@
Step 3
-Last but not least, you need to specify which source files should be associated with your driver. You put your driver name followed by _SOURCES and egal this to a space separated list of the source and header files. See below for an example.
+
+Last but not least, you need to specify which source files should be
+associated with your driver. You put your driver name followed by
+_SOURCES and egal this to a space separated list
+of the source and header files. See below for an example.
myDriver_SOURCES = lcd.h myDriver.c myDriver.h report.h
@@ -161,9 +165,151 @@ myDriver_SOURCES = lcd.h myDriver.c myDriver.h report.h
Test your setup
-You're almost done! You only need to check out if you didn't made any mistake. Just run sh autogen.sh to regenerate the configure script and Makefiles, then run ./configure --enable-drivers=myDriver and type make. If your driver compiles without error, then congratulations, you've just added your driver to LCDproc! Remember to submit a patch to the mailing list so that we can add it to the standard distribution.
+
+You're almost done! You only need to check out if you didn't made any mistake.
+Just run sh autogen.sh to regenerate the configure script and Makefiles,
+then run ./configure --enable-drivers=myDriver and type make.
+If your driver compiles without error, then congratulations, you've just added
+your driver to LCDproc! Remember to submit a patch to the mailing list so that
+we can add it to the standard distribution, but do not forget the documentation.
+
-If you had an error, just send us an email describing it to the mailing list and we'll try to help you.
+
+If you had an error, just send us an email describing it to the mailing list and we'll try to help you.
+
+
+
+
+
+
+
+It's all about documentation
+
+
+Please do not forget to also add the required documentation,
+so that your driver can be used from others as well.
+
+
+
+The configuration file, LCDd.conf
+
+
+Extend the LCDproc server's configuration file with a section that holds
+a standard configuration for your driver together with short descriptions
+of the options used.
+
+
+
+…
+
+## MyDriver for MyDevice ##
+[MyDriver]
+
+# Select the output device to use [default: /dev/lcd]
+Device=/dev/ttyS0
+
+# Set the display size [default: 20x4]
+Size=20x4
+
+…
+
+
+
+
+
+
+The daemon's manual page, LCDd.8
+
+
+Append your driver to the list of drivers in docs/LCDd.conf,
+the manual page of LCD, so that users can find your driver when doing man LCDd.
+
+
+
+…
+.TP
+.B ms6931
+MSI-6931 displays in 1U rack servers by MSI
+.TP
+.B mtc_s16209x
+MTC_S16209x LCD displays by Microtips Technology Inc
+.TP
+.B MtxOrb
+Matrix Orbital displays (except Matrix Orbital GLK displays)
+.TP
+.B MyDriver
+displays connected using MyDevice
+.TP
+.B NoritakeVFD
+Noritake VFD Device CU20045SCPB-T28A
+.TP
+.B pylcd
+LCD displays from Pyramid (http://www.pyramid.de)
+.TP
+.B sed1330
+SED1330/SED1335 (aka S1D13300/S1D13305) based graphical displays
+…
+
+
+
+
+
+The user guide
+
+
+Step 1
+
+
+Please add a file myDriver.docbook,
+that describes the configuration of your driver and the hard/software needed,
+to the directory docs/lcdproc-user/drivers/.
+
+
+
+
+
+Step 2
+
+
+Define a Docbook entity for your driverfile in lcdproc-user.docbook.
+
+
+
+…
+<!ENTITY ms6931 SYSTEM "drivers/ms6931.docbook">
+<!ENTITY mtc_s16209x SYSTEM "drivers/mtc_s16209x.docbook">
+<!ENTITY MtxOrb SYSTEM "drivers/mtxorb.docbook">
+<!ENTITY MyDriver SYSTEM "drivers/MyDriver.docbook">
+<!ENTITY NoritakeVFD SYSTEM "drivers/NoritakeVFD.docbook">
+<!ENTITY pylcd SYSTEM "drivers/pylcd.docbook">
+<!ENTITY sed1330 SYSTEM "drivers/sed1330.docbook">
+…
+
+
+
+
+
+Step 3
+
+
+Add the freshly defined entity to drivers.docbook
+to include the documentation of your driver into the
+LCDproc User's Guide.
+
+
+
+…
+&ms6931;
+&mtc_s16209x;
+&MtxOrb;
+&MyDriver;
+&NoritakeVFD;
+&pylcd;
+&sed1330;
+…
+
+
+
diff --git a/docs/lcdproc-dev/driver-api.docbook b/docs/lcdproc-dev/driver-api.docbook
index a180fc5..bb8da4c 100644
--- a/docs/lcdproc-dev/driver-api.docbook
+++ b/docs/lcdproc-dev/driver-api.docbook
@@ -256,70 +256,72 @@ typedef struct my_driver_private {
FUNCTIONS IN DETAIL
-
+
int (*init)
Driver *drvthis
-
+
- The init function
- Starts up the LCD, initializes all vars. Allocates private data space
+ The init() function.
+ It starts up the LCD, initializes all variables, allocates private data space
and stores the pointer by calling store_private_ptr();
-
+
void (*close)
Driver *drvthis
-
+
- Shuts down the connection with the LCD.
+ Shut down the connection with the LCD.
Called just before unloading the driver.
-
+
int (*width)
Driver *drvthis
-
+
- Get the screen width.
+ Get the screen width in characters.
+ The result is 1-based.
-
+
int (*height)
Driver *drvthis
-
+
- Get the screen height.
+ Get the screen height in lines.
+ The result is 1-based.
-
+
void (*clear)
Driver *drvthis
-
+
- Clears the framebuffer
+ Clear the framebuffer.
-
+
void (*flush)
Driver *drvthis
-
+
- Flushes the framebuffer to the LCD.
+ Flush the framebuffer to the LCD.
-
+
void (*string)
Driver *drvthis
@@ -327,14 +329,17 @@ typedef struct my_driver_private {
int y
char *str
-
+
- Places a string in the framebuffer
- All coordinates are 1-based, (1,1) is top left.
- Driver should check for overflows
+ Place string str into position
+ (x,y) in the framebuffer.
+ All coordinates are 1-based, i.e. (1,1) is top left.
+ The driver should check for overflows, i.e. that the positional parameters
+ are within the screen's boundaries and cut off the part of the string
+ that is out of bounds.
-
+
void (*chr)
Driver *drvthis
@@ -342,13 +347,16 @@ typedef struct my_driver_private {
int y
char c
-
+
- Places a char in the framebuffer
- Driver should check for overflows
+ Place a single character c into position
+ (x,y) in the framebuffer.
+ The driver should check for overflows, i.e. that the positional parameters
+ are within the screen's boundaries and ignore the request if
+ the character is out of bounds.
-
+
void (*vbar)
Driver *drvthis
@@ -358,12 +366,14 @@ typedef struct my_driver_private {
int promille
int options
-
+
- Draws a vertical bar at horizontal position x and with length len.
+ Draw a vertical bar at position (x,y)
+ that has maximal length len, where a fraction of
+ (promille / 1000) is filled.
-
+
void (*hbar)
Driver *drvthis
@@ -373,30 +383,32 @@ typedef struct my_driver_private {
int promille
int options
-
+
- Draws a horizontal bar at position x,y and with length len.
+ Draw a horizontal bar at position (x,y)
+ that has maximal length len, where a fraction of
+ (promille / 1000) is filled.
-
+
void (*num)
Driver *drvthis
int x
int num
-
+
- Displays a big number at position x.
+ Display big number num at horizontal position x.
-
+
void (*heartbeat)
Driver *drvthis
int state
-
+
Sets the heartbeat to the indicated state.
0=off 1=graph1 2=graph2
@@ -406,7 +418,7 @@ typedef struct my_driver_private {
The driver choose how to do it. See MtxOrb.c"
-
+
void (*icon)
Driver *drvthis
@@ -414,110 +426,110 @@ typedef struct my_driver_private {
int y
int icon
-
+
-
+
void (*set_char)
Driver *drvthis
char ch
char *dat
-
+
-
+
int (*get_free_chars)
Driver *drvthis
-
+
-
+
int (*cellwidth)
Driver *drvthis
-
+
-
+
int (*cellheight)
Driver *drvthis
-
+
-
+
int (*contrast)
Driver *drvthis
int contrast
-
+
Sets the contrast to the given value. Values should be 0 to 255.
Many displays do not support software setting of contrast.
Use -1 to get the current value returned.
-
+
void (*backlight)
Driver *drvthis
int brightness
-
+
Sets the backlight to brightness 'on'.
Often hardware can only support on and off, in that case any value
of on>0 will switch the backlight on.
-
+
void (*output)
Driver *drvthis
int state
-
+
Sets the output value. Some displays/wirings have a general purpose
output, which can be controlled by calling this function. See the
'output' command in the 'widget language'.
-
+
char *(*get_key)
Driver *drvthis
-
+
Checks if a key has been pressed on the device.
Returns NULL for "no key pressed", or a string describing the pressd key.
These characters should match the keypad-layout.
-
+
char *(*get_info)
Driver *drvthis
-
+
Returns a string describing the driver and its features.
-
+
char (*config_get_bool)
char *sectionname
@@ -525,7 +537,7 @@ typedef struct my_driver_private {
int skip
char default_value
-
+
Call to server. Retrieve a bool from the config file.
Sectionname should be the name of the driver (as in the struct).
@@ -534,7 +546,7 @@ typedef struct my_driver_private {
identical keys, then increase skip to get every next value.
-
+
int (*config_get_int)
char *sectionname
@@ -542,12 +554,12 @@ typedef struct my_driver_private {
int skip
int default_value
-
+
Call to server. Retrieve an integer from the config file.
-
+
double (*config_get_float)
char *sectionname
@@ -555,12 +567,12 @@ typedef struct my_driver_private {
int skip
double default_value
-
+
Call to server. Retrieve a float from the config file.
-
+
char *(*config_get_string)
char *sectionname
@@ -568,7 +580,7 @@ typedef struct my_driver_private {
int skip
char *default
-
+
Call to server. Retrieve a string from the config file.
Fill result with a pointer to some available space. You can fill it
@@ -579,24 +591,24 @@ typedef struct my_driver_private {
next call.
-
+
int config_has_section
char *sectionname
-
+
Returns wether a section exists. Does not need to be called prior
to a call to a config_get_* function.
-
+
int config_has_key
char *sectionname
char *keyname
-
+
Returns the number of times a key exists. Does not need to be called
prior to a call to a config_get_* function.
diff --git a/docs/lcdproc-dev/language.docbook b/docs/lcdproc-dev/language.docbook
index 961a86c..8cbd30a 100644
--- a/docs/lcdproc-dev/language.docbook
+++ b/docs/lcdproc-dev/language.docbook
@@ -301,13 +301,13 @@
hidden
- screen will never be visible
+ The screen will never be visible
background
- only visible when no normal info screens exist
+ The screen is only visible when no normal info screens exists
@@ -325,13 +325,13 @@
alert
- screen has an important message for the user
+ The screen has an important message for the user.
input
- the client is doing interactive input
+ The client is doing interactive input.
@@ -388,7 +388,7 @@
Changes the heartbeat setting for this screen.
- If the to open, the default,r
+ If set to open, the default,
the client's heartbeat setting will be used.
@@ -480,7 +480,7 @@
screen_id
new_widget_id
widgettype
- -in frame_id]
+ -in frame_id