make ConnectionType 4bit more fool-proof (M. Dolze)

This commit is contained in:
marschap
2007-10-08 13:54:05 +00:00
parent 99e11c79bb
commit 5a75b922eb
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ v.0.5dev (ongoing development)
+ option Priority for NoritakeVFD (idea: Richard Muratti)
* overhauled NoritakeVFD driver (idea: Richard Muratti)
* allow wrapping slider menu items with <= 4 keys (M. Dolze)
* a bit more Doxygen-ation
* a bit more Doxygen-ation and documentation
* hd44780 driver: make ConnectionType 4bit more fool-proof (M. Dolze)
v.0.5.2
* fix switching on/off the Load screen in lcdproc client using the menu
+3 -2
View File
@@ -100,7 +100,7 @@ hd_init_4bit(Driver *drvthis)
PrivateData *p = (PrivateData*) drvthis->private_data;
HD44780_functions *hd44780_functions = p->hd44780_functions;
int enableLines = EN1 | EN2 | EN3;
int enableLines = EN1 | EN2 | ((p->numDisplays == 3) ? EnMask[2] : 0);
// Reserve the port registers
port_access_multiple(p->port,3);
@@ -186,7 +186,8 @@ lcdstat_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char
if (displayID <= 3) {
if (displayID == 0) {
enableLines = EnMask[0] | EnMask[1] | EnMask[2];
enableLines = EnMask[0] | EnMask[1]
| ((p->numDisplays == 3) ? EnMask[2] : 0);
} else {
enableLines = EnMask[displayID - 1];
}