diff --git a/CREDITS b/CREDITS index 4c2fce2..0da27dc 100644 --- a/CREDITS +++ b/CREDITS @@ -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 diff --git a/ChangeLog b/ChangeLog index d534635..f328a8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/LCDd.conf b/LCDd.conf index 3bfd32d..6f43c2d 100644 --- a/LCDd.conf +++ b/LCDd.conf @@ -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 ] diff --git a/docs/lcdproc-user/drivers/hd44780.docbook b/docs/lcdproc-user/drivers/hd44780.docbook index 99634ba..1c0ca2c 100644 --- a/docs/lcdproc-user/drivers/hd44780.docbook +++ b/docs/lcdproc-user/drivers/hd44780.docbook @@ -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). + +This driver supports the original LCD2USB interface board as described above +as well as compatible devices like those sold by Lcdmod Kit +or those developed by Malte Pöggel. + + Special configuration options @@ -2874,6 +2880,17 @@ This can be done by specifying or by inclu + + + LineAddress = + ADDR + + + If the next line of your display doesn't start 0x20 higher in + DDRAM you can override the default value of the ExtendedMode with this parameter. + + + DelayMult = diff --git a/server/drivers/hd44780-lcd2usb.c b/server/drivers/hd44780-lcd2usb.c index 49713a8..daff0e0 100644 --- a/server/drivers/hd44780-lcd2usb.c +++ b/server/drivers/hd44780-lcd2usb.c @@ -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, diff --git a/server/drivers/hd44780-low.h b/server/drivers/hd44780-low.h index a6b55b8..4659fdb 100644 --- a/server/drivers/hd44780-low.h +++ b/server/drivers/hd44780-low.h @@ -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 diff --git a/server/drivers/hd44780.c b/server/drivers/hd44780.c index 45758c2..59d22b0 100644 --- a/server/drivers/hd44780.c +++ b/server/drivers/hd44780.c @@ -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) {