Fix a bug not checking for keypad rows 7-10 in hd44780-4bit correctly.
This commit is contained in:
@@ -15,6 +15,7 @@ v.0.5dev (ongoing development)
|
||||
* picolcd driver: Fix RC-5 for picoLCD 20x2 (A. van Schie)
|
||||
* Introduce shared/defines.h to collect commonly used macros
|
||||
+ new driver: SureElec for devices made by SURE Electronics (Laurent Latil)
|
||||
* hd44780-4bit: Fix bug not checking for keypad rows 7-10 correctly
|
||||
|
||||
v0.5.3
|
||||
+ lcdexec: notification when called program finishes
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user