Add an option to specify the DDRAM address of the next line.

This allows using the ST7036 controller like found on EA DOG modules.
This commit is contained in:
mmdolze
2009-03-03 20:17:28 +00:00
parent 82c69e7a6e
commit d62a27fac1
7 changed files with 33 additions and 3 deletions
+3
View File
@@ -256,6 +256,9 @@ Jack Cleaver
Phant0m / Aron Parsons
-IRtrans driver
Malte Poeggel
- support for ST7036 controller in hd44780
Further developers in the sourceforge lcdproc team:
Mindaugas Idzelis aim4min
+2 -1
View File
@@ -42,7 +42,7 @@ v.0.5dev (ongoing development)
* clean up build system (T. Jarosch, with tests/fixes by M. Dolze)
+ hd44780 driver: new ConnectionType ftdi (Thomas Jarosch)
* shuttleVFD driver: fix VendorID, support newer models (Miska Sulander)
+ i2500vfd driver for a graphocal Noritake VFD (Thomas Jarosch)
+ i2500vfd driver for a graphical Noritake VFD (Thomas Jarosch)
* hd44780 driver: more complete initialization (idea by Pierre Ossman)
* hd44780 driver: "euro" character mapping table (Markus Dolze)
* CwLnx driver: support for CW12832
@@ -64,6 +64,7 @@ v.0.5dev (ongoing development)
+ new client lcdident.pl (Ethan Dicks)
* server: prevent stalling if time goes backwards (M. Vallevand)
* hd44780 driver: update the backlight setting only on change
+ hd44780 driver: add lineaddress option to support ST7036 (Malte Poeggel)
v.0.5.2
* fix switching on/off the Load screen in lcdproc client using the menu
+4
View File
@@ -471,6 +471,10 @@ Size=20x4
# set this flag to get into extended mode (4-line linear).
#ExtendedMode=yes
# In extended mode, on some controllers like the ST7036 (in 3 line mode)
# the next line in DDRAM won't start 0x20 higher. [default: 0x20]
#LineAddress=0x10
# Character map to to map ISO-8859-1 to the LCD's character set
# [default: hd44780_default; legal: hd44780_default, hd44780_euro,
# ea_ks0073, sed1278f_0b ]
+17
View File
@@ -2203,6 +2203,12 @@ one for each key and the third if the keys are pressed simultaneously.
With this 3-key setup, menus can be used (see example below).
</para>
<para>
This driver supports the original LCD2USB interface board as described above
as well as compatible devices like those sold by <ulink url="http://www.lcdmodkit.com/">Lcdmod Kit</ulink>
or those developed by <ulink url="http://www.maltepoeggel.de/index.php?site=sp-lcd&lang=en">Malte Pöggel</ulink>.
</para>
<sect4 id="hd44780-lcd2usb-config">
<title>Special configuration options</title>
@@ -2874,6 +2880,17 @@ This can be done by specifying <option>--enable-drivers=all</option> or by inclu
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>LineAddress</command> =
<arg choice="plain"><replaceable>ADDR</replaceable></arg>
</term>
<listitem><para>
If the next line of your display doesn't start <literal>0x20</literal> higher in
DDRAM you can override the default value of the ExtendedMode with this parameter.
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>DelayMult</command> =
+1 -1
View File
@@ -148,7 +148,7 @@ lcd2usb_HD44780_backlight(PrivateData *p, unsigned char state)
/* get backlight brightness */
int promille = (state == BACKLIGHT_ON) ? p->brightness : p->offbrightness;
p->hd44780_functions->drv_report(RPT_INFO, "lcd2usb_HD44780_backlight: Setting backlight to %d", promille);
p->hd44780_functions->drv_debug(RPT_DEBUG, "lcd2usb_HD44780_backlight: Setting backlight to %d", promille);
/* and set it (converted from [0,1000] -> [0,255]) */
if (usb_control_msg(p->usbHandle, USB_TYPE_VENDOR, LCD2USB_SET_BRIGHTNESS,
+1
View File
@@ -161,6 +161,7 @@ typedef struct hd44780_private_data {
char have_backlight; // off by default
char have_output; // have extra output port (off by default)
char ext_mode; // use of extended mode required for some weird controllers
int line_address; // address of the next line in ext_mode (linear addressing)
int delayMult; // Delay multiplier for slow displays
char delayBus; // Delay if the computer can send data too fast over
// its bus to LPT port
+5 -1
View File
@@ -60,6 +60,9 @@
// Default parallel port address
#define LPTPORT 0x378
// Default Lineaddress in ext_mode
#define LADDR 0x20
// Autorepeat values
#define KEYPAD_AUTOREPEAT_DELAY 500
#define KEYPAD_AUTOREPEAT_FREQ 15
@@ -165,6 +168,7 @@ HD44780_init(Driver *drvthis)
p->port = drvthis->config_get_int(drvthis->name, "port", 0, LPTPORT);
p->ext_mode = drvthis->config_get_bool(drvthis->name, "extendedmode", 0, 0);
p->line_address = drvthis->config_get_int(drvthis->name, "lineaddress", 0, LADDR);
p->have_keypad = drvthis->config_get_bool(drvthis->name, "keypad", 0, 0);
p->have_backlight = drvthis->config_get_bool(drvthis->name, "backlight", 0, 0);
p->have_output = drvthis->config_get_bool(drvthis->name, "outputport", 0, 0);
@@ -605,7 +609,7 @@ HD44780_position(Driver *drvthis, int x, int y)
if (p->ext_mode) {
// Linear addressing, each line starts 0x20 higher.
DDaddr = x + relY * 0x20;
DDaddr = x + relY * p->line_address;
} else {
// 16x1 is a special case
if (p->dispSizes[dispID - 1] == 1 && p->width == 16) {