update serialVFD driver to support more display types (Stefan Herdler)

This commit is contained in:
marschap
2008-05-02 15:48:18 +00:00
parent e40175b3c0
commit 23b796e67f
9 changed files with 537 additions and 53 deletions
+1
View File
@@ -48,6 +48,7 @@ v.0.5dev (ongoing development)
* CwLnx driver: support for CW12832 * CwLnx driver: support for CW12832
+ new driver mx5000 for Logitech MX5000 keyboards (Christian Jodar) + new driver mx5000 for Logitech MX5000 keyboards (Christian Jodar)
* update debian inits scripts to allow multiple instances of clients * update debian inits scripts to allow multiple instances of clients
+ serialVFD driver: support for 4 more display types (Stefan Herdler)
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
+7
View File
@@ -863,6 +863,10 @@ Speed=9600
# 1 KD Rev 2.1. # 1 KD Rev 2.1.
# 2 Noritake VFDs (*). # 2 Noritake VFDs (*).
# 3 Futaba VFDs # 3 Futaba VFDs
# 4 IEE S03601-95B
# 5 IEE S03601-96-080 (*)
# 6 Futaba NA202SD08FA (allmost IEE compatible)
# 7 Samsung 20S207DA4 and 20S207DA6
# (* most should work, not testet yet.) # (* most should work, not testet yet.)
Type=0 Type=0
@@ -875,6 +879,9 @@ use_parallel=no
# Portaddress where the LPT is. Used in parallelmode only. Usual values are 0x278, 0x378 and 0x3BC # Portaddress where the LPT is. Used in parallelmode only. Usual values are 0x278, 0x378 and 0x3BC
Port=0x378 Port=0x378
# Set parallel port timingdelay (us). Used in parallelmode only. [default: 2; legal: 0 - 255]
#PortWait=2
# Device to use in serial mode. Usual values are /dev/ttyS0 and /dev/ttyS1 # Device to use in serial mode. Usual values are /dev/ttyS0 and /dev/ttyS1
Device=/dev/ttyS1 Device=/dev/ttyS1
+1 -1
View File
@@ -229,7 +229,7 @@ SED1330/SED1335 (aka S1D13300/S1D13305) based graphical displays
122x32 pixel graphic displays based on SED1520 controllers 122x32 pixel graphic displays based on SED1520 controllers
.TP .TP
.B serialVFD .B serialVFD
NEC (FIPC8367 based) and FUTABA VFDs Text VFDs of various manufacturers, see LCDproc user-documentation for further details.
.TP .TP
.B shuttleVFD .B shuttleVFD
Shuttle VFD (USB-based) Shuttle VFD (USB-based)
+102 -22
View File
@@ -28,6 +28,7 @@ Feedback is welcome.
<entry>Serial</entry> <entry>Serial</entry>
<entry>Parallel</entry> <entry>Parallel</entry>
<entry>Display tested</entry> <entry>Display tested</entry>
<entry><command>Type</command></entry>
<entry>Remark</entry> <entry>Remark</entry>
</row> </row>
</thead> </thead>
@@ -38,22 +39,25 @@ Feedback is welcome.
<entry>Ok</entry> <entry>Ok</entry>
<entry>Ok</entry> <entry>Ok</entry>
<entry>Yes</entry> <entry>Yes</entry>
<entry>0</entry>
<entry> </entry> <entry> </entry>
</row> </row>
<row> <row>
<entry>NEC FC20X2JA</entry> <entry>NEC FC20X2JA</entry>
<entry>NEC FIPC8367</entry> <entry>NEC FIPC8367</entry>
<entry>(Ok)</entry> <entry>(Ok)<footnote id="not_tested" label="1" > <para>Should work, but feature not tested yet.</para> </footnote> </entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry> <entry>No</entry>
<entry>0</entry>
<entry>Same Controller as on FM20X2KB-AB</entry> <entry>Same Controller as on FM20X2KB-AB</entry>
</row> </row>
<row> <row>
<entry>NEC FC20X1SA-AB/AA</entry> <entry>NEC FC20X1SA-AB/AA</entry>
<entry>NEC FIPC8367</entry> <entry>NEC FIPC8367</entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry> <entry>No</entry>
<entry>0</entry>
<entry>Same Controller as on FM20X2KB-AB</entry> <entry>Same Controller as on FM20X2KB-AB</entry>
</row> </row>
<row> <row>
@@ -62,59 +66,109 @@ Feedback is welcome.
<entry>Ok</entry> <entry>Ok</entry>
<entry>Ok</entry> <entry>Ok</entry>
<entry>Yes</entry> <entry>Yes</entry>
<entry>1, 0<footnote id="no_char" label="2" >
<para>
Custom-Characters are not supported with this <command>Type</command>, set <command>Custom-Characters=0</command>
in <filename>LCDd.conf</filename>.
</para>
</footnote></entry>
<entry> </entry> <entry> </entry>
</row> </row>
<row> <row>
<entry>FUTABA M402SD06GJ</entry> <entry>FUTABA M402SD06GJ</entry>
<entry>?</entry> <entry>?</entry>
<entry>(?)*</entry> <entry>(?)<footnoteref linkend="not_tested" /></entry>
<entry>Ok</entry> <entry>Ok</entry>
<entry>Yes</entry> <entry>Yes</entry>
<entry>(* perhaps no compatible baudrate, not tested) <entry>3</entry>
The display has no user-characters: set <command>Custom-Characters=0</command> <entry>The display has no user-characters.
in <filename>LCDd.conf.</filename></entry> Serial interface with PC compatible baudrate is optional only, feature not tested.</entry>
</row> </row>
<row> <row>
<entry>FUTABA M204SD01AA</entry> <entry>FUTABA M204SD01AA</entry>
<entry>FUTABA 5P00A016</entry> <entry>FUTABA 5P00A016</entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry> <entry>No</entry>
<entry>3</entry>
<entry> </entry> <entry> </entry>
</row> </row>
<row> <row>
<entry>Samsung 20S204DA2</entry> <entry>Futaba NA202SD08FA</entry>
<entry>?</entry> <entry>?</entry>
<entry>Ok</entry> <entry>Ok</entry>
<entry>Ok</entry> <entry>Ok</entry>
<entry>Yes</entry> <entry>Yes</entry>
<entry>The display is FUTABA compatible (hard- and software). Set <command>Custom-Characters=0</command> <entry>6</entry>
in <filename>LCDd.conf.</filename> </entry> <entry>allmost IEE compatible, no Custom-Characters</entry>
</row>
<row>
<entry>Samsung 20S204DA2 and 20S207DA1</entry>
<entry>?</entry>
<entry>Ok</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry>3<footnoteref linkend="no_char" />, 7<footnoteref linkend="no_char" /><footnoteref linkend="not_tested" /> </entry>
<entry>The display is FUTABA compatible (hard- and software). Custom-Characters not supported(?). </entry>
</row>
<row>
<entry>Samsung 20S207DA4 and 20S207DA6</entry>
<entry>?</entry>
<entry>Ok</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry>7, 3<footnoteref linkend="no_char" /></entry>
<entry>allmost Futaba compatible</entry>
</row> </row>
<row> <row>
<entry>Noritake CU20026SCPB-T</entry> <entry>Noritake CU20026SCPB-T</entry>
<entry>microcontroller</entry> <entry>microcontroller</entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry> <entry>No</entry>
<entry>2</entry>
<entry> </entry> <entry> </entry>
</row> </row>
<row> <row>
<entry>Noritake CU20045SCPB-T28A</entry> <entry>Noritake CU20045SCPB-T28A</entry>
<entry>?</entry> <entry>?</entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)</entry> <entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry> <entry>No</entry>
<entry>2</entry>
<entry> </entry>
</row>IEE 36657
<row>
<entry>IEE 36657-01 (= 02S-93290-VFD 36657-01)</entry>
<entry>?</entry>
<entry>Ok</entry>
<entry>Ok</entry>
<entry>Yes</entry>
<entry>4</entry>
<entry> </entry>
</row>
<row>
<entry>IEE S03601-95B</entry>
<entry>?</entry>
<entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry>
<entry>4</entry>
<entry> </entry>
</row>
<row>
<entry>IEE S03601-96-080</entry>
<entry>?</entry>
<entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>(Ok)<footnoteref linkend="not_tested" /></entry>
<entry>No</entry>
<entry>5</entry>
<entry> </entry> <entry> </entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<literal>(</literal>&hellip;<literal>)</literal>: Feature not tested.
</para> </para>
<para> <para>
@@ -379,6 +433,16 @@ optional
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<command>PortWait</command> =
<arg choice="plain"><replaceable>DELAY</replaceable></arg>
</term>
<listitem><para>
Set parallel port timingdelay (us). Used in parallelmode only. [default: <literal>2</literal>; legal: 0 - 255].
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<command>Device</command> = <command>Device</command> =
@@ -450,6 +514,22 @@ Number of Custom-Characters [default: Display-<command>Type</command> dependent]
<entry><literal>3</literal></entry> <entry><literal>3</literal></entry>
<entry>Futaba VFDs</entry> <entry>Futaba VFDs</entry>
</row> </row>
<row>
<entry><literal>4</literal></entry>
<entry>IEE S03601-95B</entry>
</row>
<row>
<entry><literal>5</literal></entry>
<entry>IEE S03601-96-080</entry>
</row>
<row>
<entry><literal>6</literal></entry>
<entry>Futaba NA202SD08FA (allmost IEE compatible)</entry>
</row>
<row>
<entry><literal>7</literal></entry>
<entry>Samsung 20S207DA?</entry>
</row>
</tbody> </tbody>
</tgroup> </tgroup>
</informaltable> </informaltable>
+40 -15
View File
@@ -128,6 +128,8 @@ serialVFD_init (Driver *drvthis)
p->ISO_8859_1 = 1; p->ISO_8859_1 = 1;
p->refresh_timer = 480; p->refresh_timer = 480;
p->hw_brightness = 0; p->hw_brightness = 0;
p->para_wait = DEFAULT_PARA_WAIT;
debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis); debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis);
@@ -197,14 +199,8 @@ serialVFD_init (Driver *drvthis)
p->ISO_8859_1 = drvthis->config_get_bool(drvthis->name, "ISO_8859_1", 0, 1); p->ISO_8859_1 = drvthis->config_get_bool(drvthis->name, "ISO_8859_1", 0, 1);
/* Which displaytype */ /* Which displaytype */
tmp = drvthis->config_get_int(drvthis->name, "Type", 0, DEFAULT_DISPLAYTYPE); p->display_type = drvthis->config_get_int(drvthis->name, "Type", 0, DEFAULT_DISPLAYTYPE);
if ((tmp < 0) || (tmp > 3)) {
report(RPT_WARNING, "%s: Type must be between 0 and 3; using default %d",
drvthis->name, DEFAULT_DISPLAYTYPE);
tmp = DEFAULT_DISPLAYTYPE;
}
p->display_type = tmp;
/* Number of custom characters */ /* Number of custom characters */
tmp = drvthis->config_get_int(drvthis->name, "Custom-Characters", 0, -83); tmp = drvthis->config_get_int(drvthis->name, "Custom-Characters", 0, -83);
if ((tmp < 0) || (tmp > 99)) { if ((tmp < 0) || (tmp > 99)) {
@@ -241,7 +237,26 @@ serialVFD_init (Driver *drvthis)
memset(p->backingstore, 0, p->width * p->height); memset(p->backingstore, 0, p->width * p->height);
//setup displayspecific data //setup displayspecific data
serialVFD_load_display_data(drvthis); memset(p->usr_chr_mapping, 0, 31);
memset(p->usr_chr_load_mapping, 0, 31);
if (serialVFD_load_display_data(drvthis) != 0) {
report(RPT_WARNING, "%s: Type %d not defined; using default %d",
drvthis->name, p->display_type, DEFAULT_DISPLAYTYPE);
p->display_type = DEFAULT_DISPLAYTYPE;
if (serialVFD_load_display_data(drvthis) != 0) {
report(RPT_ERR, "%s: unable to load display_data", drvthis->name);
return -1;
}
}
/* parallel port wait */
tmp = p->para_wait;
p->para_wait = drvthis->config_get_int(drvthis->name, "PortWait", 0, p->para_wait);
if ((p->usr_chr_load_mapping[0] == 0) && (p->usr_chr_load_mapping[1] == 0)){ //this should not happen if usr_chr_load_mapping had been set
memcpy(p->usr_chr_load_mapping, p->usr_chr_mapping, 31);
}
// report(RPT_ERR, "%s: Port: %X", drvthis->name, p->port, strerror(errno)); // report(RPT_ERR, "%s: Port: %X", drvthis->name, p->port, strerror(errno));
@@ -393,7 +408,7 @@ serialVFD_put_char (Driver *drvthis, int n)
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[set_user_char][1],\ Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[set_user_char][1],\
p->hw_cmd[set_user_char][0]);// substitute and select Character to overwrite p->hw_cmd[set_user_char][0]);// substitute and select Character to overwrite
Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &p->usr_chr_mapping[n], 1); Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &p->usr_chr_load_mapping[n], 1);
Port_Function[p->use_parallel].write_fkt(drvthis, &p->custom_char[n][0], p->usr_chr_dot_assignment[0]);// overwrite selected Character Port_Function[p->use_parallel].write_fkt(drvthis, &p->custom_char[n][0], p->usr_chr_dot_assignment[0]);// overwrite selected Character
} }
@@ -447,6 +462,11 @@ serialVFD_flush (Driver *drvthis)
if (custom_char_changed[p->last_custom]) if (custom_char_changed[p->last_custom])
p->last_custom = -10; p->last_custom = -10;
if (p->hw_cmd[mv_cursor][0] == 0) { // Workaround for Displays that doesn't support mv_cursor command
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[pos1_cursor][1], p->hw_cmd[pos1_cursor][0]);
last_chr = -1;
}
for (i = 0; i < (p->height * p->width); i++) { for (i = 0; i < (p->height * p->width); i++) {
/* Backing-store implementation. If it's already /* Backing-store implementation. If it's already
@@ -454,16 +474,18 @@ serialVFD_flush (Driver *drvthis)
*/ */
if ((p->framebuf[i] != p->backingstore[i]) || if ((p->framebuf[i] != p->backingstore[i]) ||
((p->framebuf[i] <= 30) && (custom_char_changed[(int)p->framebuf[i]]))) { ((p->framebuf[i] <= 30) && (custom_char_changed[(int)p->framebuf[i]] != 0))) {
if (last_chr < i-1) { // if not last char written cursor has to be moved. if (last_chr < i-1) { // if not last char written cursor has to be moved.
if (last_chr < i-2-p->hw_cmd[mv_cursor][0]) { if (((p->hw_cmd[hor_tab][0] * (i-1-last_chr)) > (p->hw_cmd[mv_cursor][0]+1)) && (p->hw_cmd[mv_cursor][0] != 0)) {
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[mv_cursor][1], Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[mv_cursor][1],
p->hw_cmd[mv_cursor][0]); p->hw_cmd[mv_cursor][0]);
Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &i, 1); Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &i, 1);
//report(RPT_WARNING, "%s: move %d", drvthis->name, i);
} }
else { else {
for (j = last_chr; j < (i-1); j++) for (j = last_chr; j < (i-1); j++)
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[hor_tab][1], p->hw_cmd[hor_tab][0]); Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[hor_tab][1], p->hw_cmd[hor_tab][0]);
//report(RPT_WARNING, "%s: TAB %d", drvthis->name, j-last_chr);
} }
} }
@@ -482,8 +504,8 @@ serialVFD_flush (Driver *drvthis)
Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &p->usr_chr_mapping[(int)p->framebuf[i]], 1); Port_Function[p->use_parallel].write_fkt(drvthis, (unsigned char *) &p->usr_chr_mapping[(int)p->framebuf[i]], 1);
} }
} }
else if ((p->framebuf[i] > 127) && (p->ISO_8859_1 != 0)) { // ISO_8859_1 translation for 129 ... 255 else if ((p->framebuf[i] == 127) || ((p->framebuf[i] > 127) && (p->ISO_8859_1 != 0))) { // ISO_8859_1 translation for 129 ... 255
Port_Function[p->use_parallel].write_fkt(drvthis, &p->charmap[p->framebuf[i] - 128], 1); Port_Function[p->use_parallel].write_fkt(drvthis, &p->charmap[p->framebuf[i] - 127], 1);
} }
else { else {
Port_Function[p->use_parallel].write_fkt(drvthis, &p->framebuf[i], 1); Port_Function[p->use_parallel].write_fkt(drvthis, &p->framebuf[i], 1);
@@ -493,8 +515,11 @@ serialVFD_flush (Driver *drvthis)
} }
} }
if (last_chr != -10) // update backingstore if something changed if (last_chr >= 0) { // update backingstore if something changed
memcpy(p->backingstore, p->framebuf, p->height * p->width); memcpy(p->backingstore, p->framebuf, p->height * p->width);
//report(RPT_WARNING, "%s: memcpy", drvthis->name);
}
} }
+4 -1
View File
@@ -44,6 +44,7 @@
#define DEFAULT_BRIGHTNESS 140 #define DEFAULT_BRIGHTNESS 140
#define DEFAULT_SIZE "20x2" #define DEFAULT_SIZE "20x2"
#define DEFAULT_DISPLAYTYPE 0 #define DEFAULT_DISPLAYTYPE 0
#define DEFAULT_PARA_WAIT 2
MODULE_EXPORT int serialVFD_init (Driver *drvthis); MODULE_EXPORT int serialVFD_init (Driver *drvthis);
@@ -93,7 +94,8 @@ typedef struct driver_private_data {
int predefined_vbar; int predefined_vbar;
int ISO_8859_1; int ISO_8859_1;
unsigned int refresh_timer; unsigned int refresh_timer;
unsigned char charmap[128]; unsigned int para_wait;
unsigned char charmap[129];
int display_type; // display type int display_type; // display type
int last_custom; // last custom character written int last_custom; // last custom character written
unsigned char custom_char[31][7]; // stored custom characters unsigned char custom_char[31][7]; // stored custom characters
@@ -101,6 +103,7 @@ typedef struct driver_private_data {
unsigned char hw_cmd[10][4]; // hardwarespecific commands unsigned char hw_cmd[10][4]; // hardwarespecific commands
int usr_chr_dot_assignment[57]; // how to setup usercharacters int usr_chr_dot_assignment[57]; // how to setup usercharacters
unsigned int usr_chr_mapping[31];// where to place the usercharacters (0..30) in the asciicode unsigned int usr_chr_mapping[31];// where to place the usercharacters (0..30) in the asciicode
unsigned int usr_chr_load_mapping[31];// needed for displays with different read and write mapping
int hbar_cc_offset; // character offset of the bars int hbar_cc_offset; // character offset of the bars
int vbar_cc_offset; // character offset of the bars int vbar_cc_offset; // character offset of the bars
char info[255]; char info[255];
+365 -10
View File
@@ -36,9 +36,13 @@ void serialVFD_load_NEC_FIPC (Driver *drvthis);
void serialVFD_load_KD (Driver *drvthis); void serialVFD_load_KD (Driver *drvthis);
void serialVFD_load_Noritake (Driver *drvthis); void serialVFD_load_Noritake (Driver *drvthis);
void serialVFD_load_Futaba (Driver *drvthis); void serialVFD_load_Futaba (Driver *drvthis);
void serialVFD_load_IEE_95B (Driver *drvthis);
void serialVFD_load_IEE_96 (Driver *drvthis);
void serialVFD_load_Futaba_NA202SD08FA(Driver *drvthis);
void serialVFD_load_Samsung (Driver *drvthis);
void serialVFD_load_display_data(Driver *drvthis) int serialVFD_load_display_data(Driver *drvthis)
{ {
PrivateData *p = (PrivateData*) drvthis->private_data; PrivateData *p = (PrivateData*) drvthis->private_data;
switch (p->display_type) { switch (p->display_type) {
@@ -54,7 +58,23 @@ void serialVFD_load_display_data(Driver *drvthis)
case 3: case 3:
serialVFD_load_Futaba(drvthis); serialVFD_load_Futaba(drvthis);
break; break;
case 4:
serialVFD_load_IEE_95B(drvthis);
break;
case 5:
serialVFD_load_IEE_96(drvthis);
break;
case 6:
serialVFD_load_Futaba_NA202SD08FA(drvthis);
break;
case 7:
serialVFD_load_Samsung(drvthis);
break;
default:
return -1;
break;
} }
return 0;
} }
@@ -80,7 +100,7 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
{1 ,0x02}, {1 ,0x02},
{1 ,0x01}, // bright {1 ,0x01}, // bright
{1 ,0x0D}, // pos1 {1 ,0x0D}, // pos1
{1 ,0x1B}, // move cursor {1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x0C}, // reset {1 ,0x0C}, // reset
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{1 ,0x1A}, // set user char {1 ,0x1A}, // set user char
@@ -91,6 +111,7 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
// Translates ISO 8859-1 to display charset. // Translates ISO 8859-1 to display charset.
const unsigned char charmap[] = { const unsigned char charmap[] = {
127, // the "filled-block"-character usually 127
/* #128 = 0x80 */ /* #128 = 0x80 */
128, 129, 130, 131, 132, 133, 134, 135, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 136, 137, 138, 139, 140, 141, 142, 143,
@@ -111,7 +132,7 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E, 'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E,
'0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y' }; '0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y' };
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
@@ -158,7 +179,7 @@ serialVFD_load_KD (Driver *drvthis)
{1 ,0x02}, {1 ,0x02},
{1 ,0x01}, // bright {1 ,0x01}, // bright
{1 ,0x0D}, // pos1 {1 ,0x0D}, // pos1
{1 ,0x1B}, // move cursor {1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x0C}, // reset {1 ,0x0C}, // reset
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{1 ,0x1A}, // set user char {1 ,0x1A}, // set user char
@@ -168,6 +189,7 @@ serialVFD_load_KD (Driver *drvthis)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
const unsigned char charmap[] = { const unsigned char charmap[] = {
127, // the "filled-block"-character usually 127
/* #128 = 0x80 */ /* #128 = 0x80 */
128, 129, 130, 131, 132, 133, 134, 135, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 136, 137, 138, 139, 140, 141, 142, 143,
@@ -188,7 +210,7 @@ serialVFD_load_KD (Driver *drvthis)
0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA, 0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA,
'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB, 'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB,
0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y' }; 0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y' };
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
@@ -235,7 +257,7 @@ serialVFD_load_Noritake (Driver *drvthis)
{3 ,0x1B, 0x4C, 0x90}, {3 ,0x1B, 0x4C, 0x90},
{3 ,0x1B, 0x4C, 0xFF}, // bright {3 ,0x1B, 0x4C, 0xFF}, // bright
{1 ,0x0C}, // pos1 {1 ,0x0C}, // pos1
{2 ,0x1B, 0x48}, // move cursor {2 ,0x1B, 0x48}, // move cursor (set to 0 if not supported)
{2 ,0x1B, 0x49}, // reset {2 ,0x1B, 0x49}, // reset
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{2 ,0x1B, 0x43}, // set user char {2 ,0x1B, 0x43}, // set user char
@@ -245,8 +267,8 @@ serialVFD_load_Noritake (Driver *drvthis)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
// no charmap needed // no charmap needed
for (tmp = 128; tmp <= 255; tmp++) for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = tmp; p->charmap[tmp] = tmp+127;
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57] = { 5, const int usr_chr_dot_assignment[57] = { 5,
@@ -291,7 +313,7 @@ serialVFD_load_Futaba (Driver *drvthis)
{2 ,0x04, 0x60}, {2 ,0x04, 0x60},
{2 ,0x04, 0xFF}, // bright {2 ,0x04, 0xFF}, // bright
{2 ,0x10, 0x00}, // pos1 {2 ,0x10, 0x00}, // pos1
{1 ,0x10,}, // move cursor {1 ,0x10}, // move cursor (set to 0 if not supported)
{1 ,0x1F}, // reset {1 ,0x1F}, // reset
{2 ,0x11,0x14}, // init {2 ,0x11,0x14}, // init
{1 ,0x03}, // set user char {1 ,0x03}, // set user char
@@ -302,6 +324,7 @@ serialVFD_load_Futaba (Driver *drvthis)
// Translates ISO 8859-1 to display charset. // Translates ISO 8859-1 to display charset.
const unsigned char charmap[] = { const unsigned char charmap[] = {
127, // the "filled-block"-character usually 127
/* #128 = 0x80 */ /* #128 = 0x80 */
128, 129, 130, 131, 132, 133, 134, 135, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 136, 137, 138, 139, 140, 141, 142, 143,
@@ -322,7 +345,7 @@ serialVFD_load_Futaba (Driver *drvthis)
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, 0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,
'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/', 'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/',
'0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 }; '0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 };
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
@@ -342,3 +365,335 @@ serialVFD_load_Futaba (Driver *drvthis)
for (tmp = 0; tmp < 31; tmp++) for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp]; p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
} }
void
serialVFD_load_IEE_95B (Driver *drvthis)
{ //IEE_03601-95B_2x40_VFD
PrivateData *p = (PrivateData*) drvthis->private_data;
int tmp, w;
if (p->customchars == -83)
p->customchars = 10; // number of custom characters the display provides
p->vbar_cc_offset = 0; // character offset of the bars
p->hbar_cc_offset = 0; // character offset of the bars
p->predefined_hbar = 0; // the display has predefined hbar-characters
p->predefined_vbar = 0; // the display has predefined vbar-characters
p->para_wait = 60; // the display needs more delay in the parallelport mode
// hardwarespecific commands:
// hw_cmd[Command][data] = {{commandlength , command 1},
// .....
// {commandlength , command N}}
const char hw_cmd[10][4] = {{1 ,0x1C}, // dark
{1 ,0x1D},
{1 ,0x1E},
{1 ,0x1F}, // bright
{1 ,0x16}, // pos1
{1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x15}, // reset
{2 ,0x0E, 0x11}, // init
{1 ,0x18}, // set user char
{1 ,0x09}}; // tab
for (tmp = 0; tmp < 10; tmp++)
for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
const unsigned char charmap[] = {
0xEF, // the "filled-block"-character usually 127
/* #128 = 0x80 */
0x7F, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
0xE8, 0xE9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
152, 153, 154, 155, 156, 157, 158, 159,
/* #160 = 0xA0 */
160, '!', 0xD3, '?', '?', 0x5C, 0x7C, '?',
'"', '?', '?', '?', '?', '-', '?', '?',
0xB9, 0xBA, '?', '?', 0x27, '?', '?', '.',
',', '?', '?', '?', '?', '?', '?', '?',
/* #192 = 0xC0 */
0xB2, 0xA2, 0xA4, 'A', 0xA0, 0xA1, 0xA5, 0xA3,
0xA7, 0xA6, 0xA8, 0xB4, 0xAB, 0xAA, 0xAC, 0xA9,
'D', 0xAE, 0xB1, 0xB0, 0xBF, 'O', 0xAD, 'x',
0xAF, 0xB7, 0xB6, 0xB8, 0xB5, 'Y', 'p', 0xB3,
/* #224 = 0xE0 */
0xD2, 0xC2, 0xC4, 'a', 0xC0, 0xC1, 0xC5, 0xC3,
0xC7, 0xC6, 0xC8, 0xD4, 0xCB, 0xCA, 0xCC, 0xC9,
'o', 0xCE, 0xD1, 0xD0, 0xDF, 'o', 0xAD, 0xBB,
0xCF, 0xD7, 0xD6, 0xD8, 0xD5, 'y', 'p', 'y' };
for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57] = { 6,
0, 0, 0, 0,34,17, 3, 0,
33,14, 4,23,30,13, 7, 0,
29,10, 8,27,26, 9,11, 0,
25, 6,12,31,22, 5,15, 0,
21, 2,16,35,18, 1,19, 0,
20,24,28,32, 0, 0, 0, 0 };
for (tmp = 0; tmp < 57; tmp++)
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
// Where to place the usercharacters (0..30) in the asciicode.
// Also used to map standardcharacters in the usercharacterspace(0..30)
// (useful for displays with less then 30 usercharacters and predefined bars)
const unsigned int usr_chr_mapping[31]=
{0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
// The following is only needet to set if the display needs a different setting
// for loading the usercharacters.
// Example: The character loaded to 0x00 will be shown at 0xFD.
// usr_chr_load_mapping[0] or usr_chr_load_mapping[1] has to be != 0
const unsigned int usr_chr_load_mapping[31]=
{0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_load_mapping[tmp] = usr_chr_load_mapping[tmp];
}
void
serialVFD_load_IEE_96 (Driver *drvthis)
{ //IEE_03601-96_2x40_VFD
PrivateData *p = (PrivateData*) drvthis->private_data;
int tmp, w;
if (p->customchars == -83)
p->customchars = 3; // number of custom characters the display provides
p->vbar_cc_offset = 0; // character offset of the bars
p->hbar_cc_offset = 0; // character offset of the bars
p->predefined_hbar = 0; // the display has predefined hbar-characters
p->predefined_vbar = 0; // the display has predefined vbar-characters
p->para_wait = 60; // the display needs more delay in the parallelport mode
// hardwarespecific commands:
// hw_cmd[Command][data] = {{commandlength , command 1},
// .....
// {commandlength , command N}}
const char hw_cmd[10][4] = {{1 ,0x1C}, // dark
{1 ,0x1D},
{1 ,0x1E},
{1 ,0x1F}, // bright
{1 ,0x16}, // pos1
{0 }, // move cursor (set to 0 if not supported)
{1 ,0x15}, // reset
{2 ,0x0E, 0x11}, // init
{1 ,0x18}, // set user char
{1 ,0x09}}; // tab
for (tmp = 0; tmp < 10; tmp++)
for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
const unsigned char charmap[] = {
0xEF, // the "filled-block"-character usually 127
/* #128 = 0x80 */
0x7F, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
0xE8, 0xE9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
152, 153, 154, 155, 156, 157, 158, 159,
/* #160 = 0xA0 */
160, '!', 0xD3, '?', '?', 0x5C, 0x7C, '?',
'"', '?', '?', '?', '?', '-', '?', '?',
0xB9, 0xBA, '?', '?', 0x27, '?', '?', '.',
',', '?', '?', '?', '?', '?', '?', '?',
/* #192 = 0xC0 */
0xB2, 0xA2, 0xA4, 'A', 0xA0, 0xA1, 0xA5, 0xA3,
0xA7, 0xA6, 0xA8, 0xB4, 0xAB, 0xAA, 0xAC, 0xA9,
'D', 0xAE, 0xB1, 0xB0, 0xBF, 'O', 0xAD, 'x',
0xAF, 0xB7, 0xB6, 0xB8, 0xB5, 'Y', 'p', 0xB3,
/* #224 = 0xE0 */
0xD2, 0xC2, 0xC4, 'a', 0xC0, 0xC1, 0xC5, 0xC3,
0xC7, 0xC6, 0xC8, 0xD4, 0xCB, 0xCA, 0xCC, 0xC9,
'o', 0xCE, 0xD1, 0xD0, 0xDF, 'o', 0xAD, 0xBB,
0xCF, 0xD7, 0xD6, 0xD8, 0xD5, 'y', 'p', 'y' };
for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57] = { 6,
0, 7, 0,26, 0, 8,17, 0,
0, 9,18,28, 0,10,19, 0,
1,11,20,30, 2,12,21, 0,
3,13,22,32, 4,14,23, 0,
5,15,24,34, 6,16,25, 0,
27,29,31,33,35, 0, 0, 0 };
for (tmp = 0; tmp < 57; tmp++)
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
// Where to place the usercharacters (0..30) in the asciicode.
// Also used to map standardcharacters in the usercharacterspace(0..30)
// (useful for displays with less then 30 usercharacters and predefined bars)
const unsigned int usr_chr_mapping[31]=
{0xFF, 0xFE, 0xFD};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
// The following is only needet to set if the display needs a different setting
// for loading the usercharacters.
// Example: The character loaded to 0x00 will be shown at 0xFD.
// usr_chr_load_mapping[0] or usr_chr_load_mapping[1] has to be != 0
const unsigned int usr_chr_load_mapping[31]=
{ 0x02, 0x01, 0x00};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_load_mapping[tmp] = usr_chr_load_mapping[tmp];
}
void
serialVFD_load_Futaba_NA202SD08FA (Driver *drvthis)
{ //IEE_03601-96_2x40_VFD
PrivateData *p = (PrivateData*) drvthis->private_data;
int tmp, w;
//if (p->customchars == -83) // display doesn't support custom characters
p->customchars = 0; // number of custom characters the display provides
p->vbar_cc_offset = 5; // character offset of the bars
p->hbar_cc_offset = 12; // character offset of the bars
p->predefined_hbar = 1; // the display has predefined hbar-characters
p->predefined_vbar = 1; // the display has predefined vbar-characters
p->para_wait = 25; // the display needs more delay in the parallelport mode
// hardwarespecific commands:
// hw_cmd[Command][data] = {{commandlength , command 1},
// .....
// {commandlength , command N}}
const char hw_cmd[10][4] ={{2 ,0x04, 0x20}, // dark
{2 ,0x04, 0x40},
{2 ,0x04, 0x60},
{2 ,0x04, 0xFF}, // bright
{1 ,0x16}, // pos1
{1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x15}, // reset
{2 ,0x0E, 0x11}, // init
{1 ,0x18}, // set user char
{1 ,0x09}}; // tab
for (tmp = 0; tmp < 10; tmp++)
for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
const unsigned char charmap[] = {
127, // the "filled-block"-character usually 127
/* #128 = 0x80 */
128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151,
152, 153, 154, 155, 156, 157, 158, 159,
/* #160 = 0xA0 */
160, '!', 0xD3, 0x90, 0x9A, 'Y', 0x7C, 0x91,
'"', '?', '?', '?', '?', '-', '?', '?',
0xB9, 0xBA, 0x98, 0x99, 0x27, 0x88, '?', '.',
',', '?', '?', '?', '?', 0x9B, '?', '?',
/* #192 = 0xC0 */
0xB2, 0xA2, 0xA4, 'A', 0xA0, 0xA1, 0xA5, 0xA3,
0xA7, 0xA6, 0xA8, 0xB4, 0xAB, 0xAA, 0xAC, 0xA9,
'D', 0xAE, 0xB1, 0xB0, 0xBF, 'O', 0xAD, 'x',
0xAF, 0xB7, 0xB6, 0xB8, 0xA5, 'Y', 'p', 0xB3,
/* #224 = 0xE0 */
0xD2, 0xC2, 0xC4, 'a', 0xC0, 0xC1, 0xC5, 0xC3,
0xC7, 0xC6, 0xC8, 0xD4, 0xCB, 0xCA, 0xCC, 0xC9,
'o', 0xCE, 0xD1, 0xD0, 0xDF, 'o', 0xAD, 0xBB,
0xCF, 0xD7, 0xD6, 0xD8, 0xD5, 'y', 'p', 'y' };
for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57] = { 0, 0 }; // no usercharacters
for (tmp = 0; tmp < 57; tmp++)
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
// Where to place the usercharacters (0..30) in the asciicode.
// Also used to map standardcharacters in the usercharacterspace(0..30)
// (useful for displays with less then 30 usercharacters and predefined bars)
const unsigned int usr_chr_mapping[31]=
{0,0,0,0,0,0, 0xF4, 0xF4, 0xF5, 0xF6, 0xF6, 0xF7, 0, 0xF0, 0xF1, 0xF2, 0xF3};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
}
void
serialVFD_load_Samsung (Driver *drvthis)
{ //Samsung 20S207DA4 & 20S207DA6
PrivateData *p = (PrivateData*) drvthis->private_data;
int tmp, w;
if (p->customchars == -83)
p->customchars = 16; // number of custom characters the display provides
p->vbar_cc_offset = 0; // character offset of the bars
p->hbar_cc_offset = 0; // character offset of the bars
p->predefined_hbar = 0; // the display has predefined hbar-characters
p->predefined_vbar = 0; // the display has predefined vbar-characters
// hardwarespecific commands:
// hw_cmd[Command][data] = {{commandlength , command 1},
// .....
// {commandlength , command N}}
const char hw_cmd[10][4] = {{2 ,0x04, 0x20}, // dark
{2 ,0x04, 0x40},
{2 ,0x04, 0x60},
{2 ,0x04, 0xFF}, // bright
{2 ,0x10, 0x00}, // pos1
{1 ,0x10,}, // move cursor
{1 ,0x1F}, // reset
{2 ,0x11,0x14}, // init
{1 ,0x1B}, // set user char
{1 ,0x09}}; // tab
for (tmp = 0; tmp < 10; tmp++)
for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
// Translates ISO 8859-1 to display charset.
const unsigned char charmap[] = {
127, // the "filled-block"-character usually 127
/* #128 = 0x80 */
128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151,
152, 153, 154, 155, 156, 157, 158, 159,
/* #160 = 0xA0 */
160, 0xAD, 0x9B, 0x9C, 0xC8, 0x9D, 0x7C, 0xC0,
'"', '?', 0xA6, 0xAE, 0xAA, '-', '?', '?',
0xEF, 0xCA, 0xC6, 0xC7, 0x27, 0xB8, '?', '.',
',', '?', 0xA7, 0xAF, 0xAC, 0xAB, '?', 0xA8,
/* #192 = 0xC0 */
0xD0, 'A', 0xD5, 'A', 0x8E, 0x8F, 0x92, 0x80,
0xD1, 0x90, 0xD6, 0xD3, 'I', 'I', 0xD7, 0xD4,
'D', 0xA5, 'O', 'O', 0xD8, 'O', 0x99, 'x',
'0', 0xD2, 'U', 0xD9, 0x9A, 'Y', 'p', 0xB1,
/* #224 = 0xE0 */
0x85, 0xA0, 0x83, 'a', 0x84, 0x86, 0x91, 0x87,
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,
'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/',
'0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 };
for (tmp = 0; tmp < 129; tmp++)
p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57] = { 5,
8, 7, 6, 5, 4, 3, 2, 1,
16,15,14,13,12,11,10, 9,
24,23,22,21,20,19,18,17,
32,31,30,29,28,27,26,25,
0, 0, 0, 0, 0,35,34,33 };
for (tmp = 0; tmp < 57; tmp++)
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
// Where to place the usercharacters (0..30) in the asciicode.
// Also used to map standardcharacters in the usercharacterspace(0..30)
// (useful for displays with less then 30 usercharacters and predefined bars)
const unsigned int usr_chr_mapping[31] = { 0xCD, 0xCE, 0xCF, 0xEE,
0xFF, 0x05, 0x06, 0x07,
0x0B, 0x0C, 0x0E, 0x0F,
0x17, 0x1A, 0x1C, 0x1D };
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
}
+1 -1
View File
@@ -24,5 +24,5 @@
#include "lcd.h" #include "lcd.h"
#include "serialVFD.h" #include "serialVFD.h"
void serialVFD_load_display_data(Driver *drvthis); int serialVFD_load_display_data(Driver *drvthis);
#endif #endif
+16 -3
View File
@@ -57,15 +57,28 @@ serialVFD_write_parallel (Driver *drvthis, unsigned char *dat, size_t length)
for (i_para = 0; i_para < length; i_para++) { for (i_para = 0; i_para < length; i_para++) {
port_out(p->port, dat[i_para]); port_out(p->port, dat[i_para]);
// port_in(p->port+1);
if (p->para_wait > 2) // some displays need a little time to rest
port_in(p->port+1);
port_out(p->port+2, WR_on); port_out(p->port+2, WR_on);
port_in(p->port+1);
if (p->para_wait > 1) // some displays need a little time to rest
port_in(p->port+1);
port_out(p->port+2, WR_off); port_out(p->port+2, WR_off);
port_in(p->port+1);
if (p->para_wait > 0) // some displays need a little time to rest
port_in(p->port+1);
for (j_para = 0; j_para < MAXBUSY; j_para++) { for (j_para = 0; j_para < MAXBUSY; j_para++) {
if ((port_in(p->port+1)) & Busy) if ((port_in(p->port+1)) & Busy)
break; break;
} }
for (j_para = 3; j_para < p->para_wait; j_para++) // some displays need a little longer time to rest
port_in(p->port+1);
} }
#endif #endif
} }