Fix a bug not checking for keypad rows 7-10 in hd44780-4bit correctly.

This commit is contained in:
mmdolze
2009-12-12 21:32:31 +00:00
parent 6161df5b60
commit 1971f0ccee
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -261,7 +261,7 @@ void lcdstat_HD44780_backlight(PrivateData *p, unsigned char state)
/**
* Read keypress.
* \param p Pointer to driver's private data structure.
* \param YData ???
* \param YData Bitmap of rows / lines to enable.
* \return Bitmap of the pressed keys.
*/
unsigned char lcdstat_HD44780_readkeypad(PrivateData *p, unsigned int YData)
@@ -273,7 +273,7 @@ unsigned char lcdstat_HD44780_readkeypad(PrivateData *p, unsigned int YData)
port_out(p->port, ~YData & 0x003F);
if (p->numDisplays<=3) {
// Can't combine >3 displays with >6 keypad output lines
port_out(p->port + 2, (((~YData & 0x03C0) << 6)) ^ OUTMASK);
port_out(p->port + 2, (((~YData & 0x03C0) >> 6)) ^ OUTMASK);
}
if (p->delayBus) p->hd44780_functions->uPause(p, 1);