new ConnectionType pertelian in hd44780 driver (Matteo Pillon)

This commit is contained in:
marschap
2007-03-18 15:28:32 +00:00
parent 4efec0996a
commit bbfe65da9f
5 changed files with 35 additions and 7 deletions
+7 -6
View File
@@ -267,18 +267,19 @@ serial_HD44780_senddata (PrivateData *p, unsigned char displayID, unsigned char
void
serial_HD44780_backlight (PrivateData *p, unsigned char state)
{
unsigned char send[1];
if (p->have_backlight) {
if (SERIAL_IF.backlight_escape) {
unsigned char send[2];
send[0] = SERIAL_IF.backlight_escape;
send[1] = state ? 0 : 0xFF;
write(p->fd, &send, 2);
write(p->fd, &send, 1);
}
if (SERIAL_IF.backlight_on && SERIAL_IF.backlight_off) {
send[0] = state ? SERIAL_IF.backlight_on : SERIAL_IF.backlight_off;
}
else {
unsigned char send[1];
send[0] = state ? SERIAL_IF.backlight_on : SERIAL_IF.backlight_off;
write(p->fd, &send, 1);
send[0] = state ? 0 : 0xFF;
}
write(p->fd, &send, 1);
}
}