--- lcdproc-0.4.5/server/drivers/hd44780-4bit.c.orig 2005-04-15 18:39:08.000000000 +0200 +++ lcdproc-0.4.5/server/drivers/hd44780-4bit.c 2005-04-18 14:50:24.000000000 +0200 @@ -113,6 +113,10 @@ hd44780_functions->backlight = lcdstat_HD44780_backlight; hd44780_functions->readkeypad = lcdstat_HD44780_readkeypad; + // parallel port power patch + extIF=0; // should already be zero otherwise config file is wrong + port_out (lptPort + 2, 0x04); + // powerup the lcd now if (extIF) { enableLines |= EN3; @@ -244,29 +248,20 @@ void lcdstat_HD44780_backlight (unsigned char state) { - backlight_bit = ((!have_backlight||state)?0:BL); - - port_out (lptPort, backlight_bit); } unsigned char lcdstat_HD44780_readkeypad (unsigned int YData) { unsigned char readval; - // 10 bits output or 6 bits if >=3 displays - // Convert the positive logic to the negative logic on the LPT port - port_out (lptPort, ~YData & 0x003F ); - if (!extIF) { - port_out (lptPort + 2, ( ((~YData & 0x03C0) << 6 )) ^ OUTMASK); - } + extIF=0; + port_out (lptPort + 2, 0x04); + if( delayBus ) hd44780_functions->uPause (1); // Read inputs readval = ~ port_in (lptPort + 1) ^ INMASK; - // Put port back into idle state for backlight - port_out (lptPort, backlight_bit); - // And convert value back (MSB first). return (((readval & FAULT) / FAULT <<4) | /* pin 15 */ ((readval & SELIN) / SELIN <<3) | /* pin 13 */