Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc34a30c7 | ||
|
|
c2f24e5ef6 | ||
|
|
c81b926926 | ||
|
|
51a15c8622 | ||
|
|
71ca824756 | ||
|
|
02c3986d3a | ||
|
|
06541b20d0 | ||
|
|
9b4bffdce8 | ||
|
|
40af65f1c2 | ||
|
|
d1a1af6af0 | ||
|
|
1e733f91ab |
@@ -164,7 +164,7 @@ check_board_rev(Driver *drvthis)
|
||||
/* On boards that have been overvolted, the MSB will be set */
|
||||
rev &= 0x00ff;
|
||||
if ((strcmp(hw, "BCM2708") != 0 && strcmp(hw, "BCM2709") != 0) || rev == 0) {
|
||||
report(RPT_ERR, "check_board_rev: This board is not recognized as a Raspberry Pi!");
|
||||
report(RPT_ERR, "check_board_rev: This board is not recognized as a Raspberry Pi! Found:%s",hw);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -622,8 +622,18 @@ HD44780_position(Driver *drvthis, int x, int y)
|
||||
if ((relY % 4) >= 2)
|
||||
DDaddr += p->width;
|
||||
}
|
||||
p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION | DDaddr);
|
||||
//p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION | DDaddr);
|
||||
|
||||
// 40X4
|
||||
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);
|
||||
p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */
|
||||
|
||||
p->hd44780_functions->senddata(p, dispID, RS_INSTR, x);
|
||||
p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */
|
||||
|
||||
if (p->hd44780_functions->flush != NULL)
|
||||
p->hd44780_functions->flush(p);
|
||||
}
|
||||
@@ -690,11 +700,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;
|
||||
HD44780_position(drvthis,x,y);
|
||||
}
|
||||
|
||||
// 40X4 fix? // NOT WORKING
|
||||
// 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 */
|
||||
@@ -710,6 +724,7 @@ HD44780_flush(Driver *drvthis)
|
||||
if (!p->cc[i].clean) {
|
||||
int row;
|
||||
|
||||
// 40X4
|
||||
/* Tell the HD44780 we will redefine char number i */
|
||||
p->hd44780_functions->senddata(p, 0, RS_INSTR, SETCHAR | i * 8);
|
||||
p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */
|
||||
|
||||
Reference in New Issue
Block a user