[X9D] Code to quickly show the 16 greyscales

This commit is contained in:
bsongis
2013-01-13 21:00:18 +00:00
parent c1c4631b73
commit 3f724dc6ab
+6
View File
@@ -31,7 +31,13 @@ void lcdRefresh()
Set_Address(0, y);
AspiCmd(0xAF);
for (uint8_t x=0; x<DISPLAY_W; x+=2) {
#if 1
uint8_t data = (p[x] & mask ? 0x80 : 0) + (p[x+1] & mask ? 0x08 : 0) + (p[DISPLAY_PLAN_SIZE+x] & mask ? 0x40 : 0) + (p[DISPLAY_PLAN_SIZE+x+1] & mask ? 0x04 : 0);
#else
// this code shows the 16 grey tones...
uint8_t data = (x * 16) / 212;
data += (data << 4);
#endif
WriteData(data);
}
WriteData(0);