aboutsummaryrefslogtreecommitdiffstats
path: root/Crystalfontz.c
diff options
context:
space:
mode:
authorreinelt <>2004-01-09 04:16:06 +0000
committerreinelt <>2004-01-09 04:16:06 +0000
commitc8d1a94e34b59f94c8bf7af1a5dde282515a2e19 (patch)
tree97337d07d0693302ca3031d256bff023a4d18f82 /Crystalfontz.c
parent28ae14208cef01ae0ca6293b88968ec31bec855e (diff)
downloadlcd4linux-c8d1a94e34b59f94c8bf7af1a5dde282515a2e19.tar.gz
[lcd4linux @ 2004-01-09 04:16:06 by reinelt]
added 'section' argument to cfg_get(), but NULLed it on all calls by now.
Diffstat (limited to 'Crystalfontz.c')
-rw-r--r--Crystalfontz.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Crystalfontz.c b/Crystalfontz.c
index 49e27ac..e538e7c 100644
--- a/Crystalfontz.c
+++ b/Crystalfontz.c
@@ -1,4 +1,4 @@
-/* $Id: Crystalfontz.c,v 1.17 2003/11/16 09:45:49 reinelt Exp $
+/* $Id: Crystalfontz.c,v 1.18 2004/01/09 04:16:06 reinelt Exp $
*
* driver for display modules from Crystalfontz
*
@@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: Crystalfontz.c,v $
+ * Revision 1.18 2004/01/09 04:16:06 reinelt
+ * added 'section' argument to cfg_get(), but NULLed it on all calls by now.
+ *
* Revision 1.17 2003/11/16 09:45:49 reinelt
* Crystalfontz changes, small glitch in getopt() fixed
*
@@ -161,7 +164,7 @@ static int CF_backlight (void)
char buffer[3];
int backlight;
- if (cfg_number("Backlight", 0, 0, 100, &backlight)<0) return -1;
+ if (cfg_number(NULL, "Backlight", 0, 0, 100, &backlight)<0) return -1;
snprintf (buffer, 3, "\016%c", backlight);
CF_write (buffer, 2);
return 0;
@@ -173,7 +176,7 @@ static int CF_contrast (void)
char buffer[3];
int contrast;
- if (cfg_number("Contrast", 50, 0, 100, &contrast)<0) return -1;
+ if (cfg_number(NULL, "Contrast", 50, 0, 100, &contrast)<0) return -1;
snprintf (buffer, 3, "\017%c", contrast);
CF_write (buffer, 2);
return 0;
@@ -227,7 +230,7 @@ static int CF_init (LCD *Self)
Port=NULL;
}
- port=cfg_get ("Port",NULL);
+ port=cfg_get (NULL, "Port", NULL);
if (port==NULL || *port=='\0') {
error ("Crystalfontz: no 'Port' entry in %s", cfg_source());
return -1;
@@ -235,7 +238,7 @@ static int CF_init (LCD *Self)
Port=strdup(port);
- if (cfg_number("Speed", 19200, 1200,19200, &speed)<0) return -1;
+ if (cfg_number(NULL, "Speed", 19200, 1200,19200, &speed)<0) return -1;
switch (speed) {
case 1200:
@@ -260,7 +263,7 @@ static int CF_init (LCD *Self)
Device=CF_open();
if (Device==-1) return -1;
- if (cfg_number("Icons", 0, 0, CHARS, &Icons)<0) return -1;
+ if (cfg_number(NULL, "Icons", 0, 0, CHARS, &Icons)<0) return -1;
if (Icons>0) {
debug ("reserving %d of %d user-defined characters for icons", Icons, CHARS);
icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, CF_define_char);