add support for CW12832 to CwLnx driver

This commit is contained in:
marschap
2008-02-15 17:59:36 +00:00
parent bdd5fd780a
commit 6c8a0f26a2
5 changed files with 36 additions and 14 deletions
+1
View File
@@ -45,6 +45,7 @@ v.0.5dev (ongoing development)
+ i2500vfd driver for a graphocal Noritake VFD (Thomas Jarosch) + i2500vfd driver for a graphocal Noritake VFD (Thomas Jarosch)
* hd44780 driver: more complete initialization (idea by Pierre Ossman) * hd44780 driver: more complete initialization (idea by Pierre Ossman)
* hd44780 driver: "euro" character mapping table (Markus Dolze) * hd44780 driver: "euro" character mapping table (Markus Dolze)
* CwLnx driver: support for CW12832
v.0.5.2 v.0.5.2
* fix switching on/off the Load screen in lcdproc client using the menu * fix switching on/off the Load screen in lcdproc client using the menu
+2 -2
View File
@@ -259,13 +259,13 @@ DrawBorder=yes
## Cwlinux driver ## ## Cwlinux driver ##
[CwLnx] [CwLnx]
# Select the LCD model [default: 12232; legal: 12232, 1602] # Select the LCD model [default: 12232; legal: 12232, 12832, 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: depending on model: 12232: 20x4, 1602: 16x2] # Select the LCD size [default: depending on model: 12232: 20x4, 12832: 21x4, 1602: 16x2]
Size=20x4 Size=20x4
# Set the communication speed [default: 19200; legal: 9600, 19200] # Set the communication speed [default: 19200; legal: 9600, 19200]
+10 -4
View File
@@ -2,7 +2,7 @@
<title>The CwLnx Driver</title> <title>The CwLnx Driver</title>
<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, CW12832
and CW1602 by CwLinux. and CW1602 by CwLinux.
</para> </para>
@@ -12,13 +12,16 @@ and CW1602 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 CW12832 are graphical displays with 128 x 32 dots and a
21 x 4 character text mode,
the CW1602 LCDs are character LCDs that are 16 characters wide and the CW1602 LCDs are character LCDs that are 16 characters wide and
2 lines high. 2 lines high.
</para> </para>
<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" (CW12232 and CW1608)
or 3,5" (CW12832) drive bays.
The mounting brackets optionally feature a 6 button keypad that The mounting brackets optionally feature a 6 button keypad that
makes use of the keypad connector on the display modules. makes use of the keypad connector on the display modules.
</para> </para>
@@ -30,7 +33,7 @@ as 4 general purpose IO ports.
</para> </para>
<para> <para>
The CW12232 and CW1608 come in 2 variants that differ how they communicate The displays come in 2 variants that differ how they communicate
with the host: The serial modules are connected to the PC using a serial with the host: The serial modules are connected to the PC using a serial
RS232 connection getting operating power using the standard floppy drive RS232 connection getting operating power using the standard floppy drive
power connector, while the USB modules only require an USB connection. power connector, while the USB modules only require an USB connection.
@@ -58,12 +61,14 @@ For more information see the
<arg choice="plain"> <arg choice="plain">
<group choice="req"> <group choice="req">
<arg choice="plain"><literal><emphasis>12232</emphasis></literal></arg> <arg choice="plain"><literal><emphasis>12232</emphasis></literal></arg>
<arg choice="plain"><literal>12832</literal></arg>
<arg choice="plain"><literal>1602</literal></arg> <arg choice="plain"><literal>1602</literal></arg>
</group> </group>
</arg> </arg>
</term> </term>
<listitem><para> <listitem><para>
Select the LCD model [default: <literal>12232</literal>; legal: <literal>12232</literal>, <literal>1602</literal>] Select the LCD model [default: <literal>12232</literal>;
legal: <literal>12232</literal>, <literal>12232</literal>, <literal>1602</literal>]
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
@@ -89,6 +94,7 @@ For more information see the
</term> </term>
<listitem><para> <listitem><para>
Select the LCD size [default: depending on model: 12232: <literal>20x4</literal>, Select the LCD size [default: depending on model: 12232: <literal>20x4</literal>,
12832: <literal>21x4</literal>]
1602: <literal>16x2</literal>] 1602: <literal>16x2</literal>]
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
+17 -6
View File
@@ -133,8 +133,8 @@ static void CwLnx_set_char_unrestricted(Driver *drvthis, int n, unsigned char *d
#define LCD_LIGHT_OFF 70 #define LCD_LIGHT_OFF 70
#define LCD_LIGHT_BRIGHTNESS 65 #define LCD_LIGHT_BRIGHTNESS 65
#define LCD_CLEAR 88 #define LCD_CLEAR 88
#define LCD_SET_INSERT 71 #define LCD_SET_INSERT 71 /* go to X,Y */
#define LCD_INIT_INSERT 72 #define LCD_INIT_INSERT 72 /* go to home */
#define LCD_SET_BAUD 57 #define LCD_SET_BAUD 57
#define LCD_ENABLE_WRAP 67 #define LCD_ENABLE_WRAP 67
#define LCD_DISABLE_WRAP 68 #define LCD_DISABLE_WRAP 68
@@ -142,7 +142,13 @@ static void CwLnx_set_char_unrestricted(Driver *drvthis, int n, unsigned char *d
#define LCD_ENABLE_SCROLL 81 #define LCD_ENABLE_SCROLL 81
#define LCD_DISABLE_SCROLL 82 #define LCD_DISABLE_SCROLL 82
#define LCD_SOFT_RESET 86 #define LCD_SOFT_RESET 86
#define LCD_OFF_CURSOR 72 #define LCD_OFF_CURSOR 72 /* is this correct? */
#define LCD_UNDERLINE_CURSOR_ON 74 /* set cursor on at X,Y */
#define LCD_UNDERLINE_CURSOR_OFF 75
#define LCD_MOVE_CURSOR_LEFT 76
#define LCD_MOVE_CURSOR_RIGHT 77
#define LCD_INVERSE_TEXT_ON 102
#define LCD_INVERSE_TEXT_OFF 103
#define LCD_PUT_PIXEL 112 #define LCD_PUT_PIXEL 112
#define LCD_CLEAR_PIXEL 113 #define LCD_CLEAR_PIXEL 113
@@ -467,12 +473,12 @@ CwLnx_init(Driver *drvthis)
/* Read config file */ /* Read config file */
/* Which model is it (1602 or 12232)? */ /* Which model is it (1602, 12232 or 12832)? */
tmp = drvthis->config_get_int(drvthis->name, "Model", 0, 12232); tmp = drvthis->config_get_int(drvthis->name, "Model", 0, 12232);
debug(RPT_INFO, "%s: Model (in config) is '%d'", __FUNCTION__, tmp); debug(RPT_INFO, "%s: Model (in config) is '%d'", __FUNCTION__, tmp);
if ((tmp != 1602) && (tmp != 12232)) { if ((tmp != 1602) && (tmp != 12232) && (tmp != 12832)) {
tmp = 12232; tmp = 12232;
report(RPT_WARNING, "%s: Model must be 12232 or 1602; using default %d", report(RPT_WARNING, "%s: Model must be 12232, 12832 or 1602; using default %d",
drvthis->name, tmp); drvthis->name, tmp);
} }
p->model = tmp; p->model = tmp;
@@ -488,6 +494,11 @@ CwLnx_init(Driver *drvthis)
default_speed = DEFAULT_SPEED_12232; default_speed = DEFAULT_SPEED_12232;
p->cellwidth = DEFAULT_CELL_WIDTH_12232; p->cellwidth = DEFAULT_CELL_WIDTH_12232;
p->cellheight = DEFAULT_CELL_HEIGHT_12232; p->cellheight = DEFAULT_CELL_HEIGHT_12232;
} else if (p->model == 12832) {
default_size = DEFAULT_SIZE_12832;
default_speed = DEFAULT_SPEED_12832;
p->cellwidth = DEFAULT_CELL_WIDTH_12832;
p->cellheight = DEFAULT_CELL_HEIGHT_12832;
} }
/* Which device should be used */ /* Which device should be used */
+4
View File
@@ -35,18 +35,22 @@
#define DEFAULT_CELL_WIDTH_1602 5 #define DEFAULT_CELL_WIDTH_1602 5
#define DEFAULT_CELL_WIDTH_12232 6 #define DEFAULT_CELL_WIDTH_12232 6
#define DEFAULT_CELL_WIDTH_12832 6
#define DEFAULT_CELL_WIDTH DEFAULT_CELL_WIDTH_12232 #define DEFAULT_CELL_WIDTH DEFAULT_CELL_WIDTH_12232
#define DEFAULT_CELL_HEIGHT_1602 8 #define DEFAULT_CELL_HEIGHT_1602 8
#define DEFAULT_CELL_HEIGHT_12232 8 #define DEFAULT_CELL_HEIGHT_12232 8
#define DEFAULT_CELL_HEIGHT_12832 8
#define DEFAULT_CELL_HEIGHT DEFAULT_CELL_HEIGHT_12232 #define DEFAULT_CELL_HEIGHT DEFAULT_CELL_HEIGHT_12232
#define DEFAULT_SPEED_1602 19200 #define DEFAULT_SPEED_1602 19200
#define DEFAULT_SPEED_12232 19200 #define DEFAULT_SPEED_12232 19200
#define DEFAULT_SPEED_12832 19200
#define DEFAULT_SPEED DEFAULT_SPEED_12232 #define DEFAULT_SPEED DEFAULT_SPEED_12232
#define DEFAULT_SIZE_1602 "16x2" #define DEFAULT_SIZE_1602 "16x2"
#define DEFAULT_SIZE_12232 "20x4" #define DEFAULT_SIZE_12232 "20x4"
#define DEFAULT_SIZE_12832 "21x4"
#define DEFAULT_SIZE DEFAULT_SIZE_12232 #define DEFAULT_SIZE DEFAULT_SIZE_12232