revamped version of the CwLnx driver

This commit is contained in:
marschap
2006-10-06 09:29:57 +00:00
parent d1d56e5ab7
commit 110c31c4b0
5 changed files with 543 additions and 530 deletions
+2
View File
@@ -38,6 +38,8 @@ v.0.5dev (ongoing development)
* command line options more synchronizd between server and clients * command line options more synchronizd between server and clients
* CFontzPacket & CFontz633 support big & little endian systems * CFontzPacket & CFontz633 support big & little endian systems
* MtxOrb driver completely rewritten to support used-defined characters * MtxOrb driver completely rewritten to support used-defined characters
* CWLnx driver completely rewritten to support Cw1602 LCDs in addition
to the CW12232 LCDs
* more options in lcdproc's config file lcdproc.conf: * more options in lcdproc's config file lcdproc.conf:
+ time and date formats can be changed using strftime formats + time and date formats can be changed using strftime formats
+ Load screen's LowLoad & HighLoad thresholds + Load screen's LowLoad & HighLoad thresholds
+2 -2
View File
@@ -239,12 +239,12 @@ UseACS=no
## Cwlinux driver ## ## Cwlinux driver ##
[CwLnx] [CwLnx]
# Select the LCD model [default: 12232; legal: 12232, 1608] # Select the LCD model [default: 12232; legal: 12232, 1602]
Model=12232 Model=12232
# Select the output device to use [default: /dev/lcd] # Select the output device to use [default: /dev/lcd]
Device=/dev/ttyUSB0 Device=/dev/ttyUSB0
# Select the LCD size [default: 20x4 (for 12232), 16x2 (for 1608)] # Select the LCD size [default: depending on model: 12232: 20x4, 1602: 16x2]
Size=20x4 Size=20x4
# Set the communication speed [default: 19200; legal: 9600, 19200] # Set the communication speed [default: 19200; legal: 9600, 19200]
+28 -7
View File
@@ -3,7 +3,7 @@
<para> <para>
This section talks about using LCDproc with the serial / USB LCDs CW12232 This section talks about using LCDproc with the serial / USB LCDs CW12232
by CwLinux. and CW1602 by CwLinux.
</para> </para>
<sect2 id="CwLnx-features"> <sect2 id="CwLnx-features">
@@ -11,7 +11,12 @@ by CwLinux.
<para> <para>
The CwLinux CW12232 LCDs are graphical LCDs with 122 x 32 dots The CwLinux CW12232 LCDs are graphical LCDs with 122 x 32 dots
that also have a text mode with 20 x 4 characters. that also have a text mode with 20 x 4 characters,
the CW1602 LCDs are character LCDs that are 16 characters wide and
2 lines high.
</para>
<para>
The modules can be ordered bare or as part of a kit mounted The modules can be ordered bare or as part of a kit mounted
on brackets that fit in half-height 5.25" drive bays. on brackets that fit in half-height 5.25" drive bays.
The mounting brackets optionally feature a 6 button keypad that The mounting brackets optionally feature a 6 button keypad that
@@ -25,10 +30,10 @@ as 4 general purpose IO ports.
</para> </para>
<para> <para>
The CW12232 come in 2 variants that differ how they communicate with the host: The CW12232 and CW1608 come in 2 variants that differ how they communicate
The serial modules are connected to the PC using a serial RS232 connection getting with the host: The serial modules are connected to the PC using a serial
operating power using the standard floppy drive power connector, RS232 connection getting operating power using the standard floppy drive
while the USB modules only require an USB connection. power connector, while the USB modules only require an USB connection.
</para> </para>
<para> <para>
@@ -47,6 +52,21 @@ For more information see the
<title>[CwLnx]</title> <title>[CwLnx]</title>
<variablelist> <variablelist>
<varlistentry>
<term>
<command>Model=</command>
<arg choice="plain">
<group choice="req">
<arg choice="plain"><literal><emphasis>12232</emphasis></literal></arg>
<arg choice="plain"><literal>1602</literal></arg>
</group>
</arg>
</term>
<listitem><para>
Select the LCD model [default: 12232; legal: 12232, 1602]
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<command>Device=</command> <command>Device=</command>
@@ -68,7 +88,8 @@ For more information see the
</arg> </arg>
</term> </term>
<listitem><para> <listitem><para>
Select the LCD size [default: 20x4] Select the LCD size [default: depending on model: 12232: <literal>20x4</literal>,
1602: <literal>16x2</literal>]
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
+482 -505
View File
File diff suppressed because it is too large Load Diff
+18 -5
View File
@@ -3,6 +3,7 @@
Copyright (C) 2002, Andrew Ip Copyright (C) 2002, Andrew Ip
2002, David Glaude 2002, David Glaude
2003, David Glaude 2003, David Glaude
2006, Peter Marschall
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -28,14 +29,26 @@
// #define DEFAULT_OFFBRIGHTNESS 0 // #define DEFAULT_OFFBRIGHTNESS 0
// #define DEFAULT_EXITBRIGHTNESS 0 // #define DEFAULT_EXITBRIGHTNESS 0
#define DEFAULT_CELLWIDTH 6
#define DEFAULT_CELLHEIGHT 8
#define DEFAULT_DEVICE "/dev/lcd" #define DEFAULT_DEVICE "/dev/lcd"
#define DEFAULT_SPEED 19200
#define DEFAULT_SIZE "20x4"
#define DEFAULT_BACKLIGHT 1 #define DEFAULT_BACKLIGHT 1
#define DEFAULT_BRIGHTNESS 200 #define DEFAULT_BRIGHTNESS 200
#define DEFAULT_CELL_WIDTH_1602 5
#define DEFAULT_CELL_WIDTH_12232 6
#define DEFAULT_CELL_WIDTH DEFAULT_CELL_WIDTH_12232
#define DEFAULT_CELL_HEIGHT_1602 8
#define DEFAULT_CELL_HEIGHT_12232 8
#define DEFAULT_CELL_HEIGHT DEFAULT_CELL_HEIGHT_12232
#define DEFAULT_SPEED_1602 19200
#define DEFAULT_SPEED_12232 19200
#define DEFAULT_SPEED DEFAULT_SPEED_12232
#define DEFAULT_SIZE_1602 "16x2"
#define DEFAULT_SIZE_12232 "20x4"
#define DEFAULT_SIZE DEFAULT_SIZE_12232
MODULE_EXPORT int CwLnx_init(Driver *drvthis); MODULE_EXPORT int CwLnx_init(Driver *drvthis);
MODULE_EXPORT void CwLnx_close(Driver *drvthis); MODULE_EXPORT void CwLnx_close(Driver *drvthis);
@@ -55,7 +68,7 @@ MODULE_EXPORT void CwLnx_num(Driver *drvthis, int x, int num);
MODULE_EXPORT int CwLnx_icon(Driver *drvthis, int x, int y, int icon); MODULE_EXPORT int CwLnx_icon(Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT int CwLnx_get_free_chars(Driver *drvthis); MODULE_EXPORT int CwLnx_get_free_chars(Driver *drvthis);
MODULE_EXPORT void CwLnx_set_char(Driver *drvthis, int n, char *dat); MODULE_EXPORT void CwLnx_set_char(Driver *drvthis, int n, unsigned char *dat);
MODULE_EXPORT int CwLnx_get_contrast(Driver *drvthis); MODULE_EXPORT int CwLnx_get_contrast(Driver *drvthis);
MODULE_EXPORT void CwLnx_set_contrast(Driver *drvthis, int contrast); MODULE_EXPORT void CwLnx_set_contrast(Driver *drvthis, int contrast);