Update hd44780.c

This commit is contained in:
2016-11-02 09:06:25 +00:00
parent 06541b20d0
commit 02c3986d3a
+8 -4
View File
@@ -624,7 +624,7 @@ HD44780_position(Driver *drvthis, int x, int y)
}
//p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION | DDaddr);
p->hd44780_functions->senddata(p, dispID, RS_INSTR, 0x80);
p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION);
p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */
p->hd44780_functions->senddata(p, dispID, RS_INSTR, relY);
@@ -699,11 +699,15 @@ HD44780_flush(Driver *drvthis)
/* there are differences, ... */
if (sp <= ep) {
for (drawing = 0; sp <= ep; x++, sp++, sq++) {
/* x%8 is for 16x1 displays only ! */
if (!drawing || (p->dispSizes[dispID-1] == 1 && p->width == 16 && (x % 8 == 0))) {
drawing = 1;
// if (!drawing || (p->dispSizes[dispID-1] == 1 && p->width == 16 && (x % 8 == 0))) {
// drawing = 1;
// HD44780_position(drvthis,x,y);
// }
// 40X4 fix?
HD44780_position(drvthis,x,y);
}
p->hd44780_functions->senddata(p, dispID, RS_DATA, *sp);
p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */
*sq = *sp; /* Update backing store */