uLCD library
Fork of 4DGL-uLCD-SE by
Diff: uLCD_4DGL_Graphics.cpp
- Revision:
- 4:74df7fc26fef
- Parent:
- 3:9ba47197d94f
- Child:
- 6:b759b69cbaf9
--- a/uLCD_4DGL_Graphics.cpp Mon Nov 18 03:05:40 2013 +0000 +++ b/uLCD_4DGL_Graphics.cpp Wed Nov 20 03:25:53 2013 +0000 @@ -205,12 +205,13 @@ writeBYTE(w & 0xFF); writeBYTE((h >> 8) & 0xFF); writeBYTE(h & 0xFF); + wait_ms(1); for (int i=0; i<w*h; i++) { red5 = (colors[i] >> (16 + 3)) & 0x1F; // get red on 5 bits green6 = (colors[i] >> (8 + 2)) & 0x3F; // get green on 6 bits blue5 = (colors[i] >> (0 + 3)) & 0x1F; // get blue on 5 bits - writeBYTE(((red5 << 3) + (green6 >> 3)) & 0xFF); // first part of 16 bits color - writeBYTE(((green6 << 5) + (blue5 >> 0)) & 0xFF); // second part of 16 bits color + writeBYTEfast(((red5 << 3) + (green6 >> 3)) & 0xFF); // first part of 16 bits color + writeBYTEfast(((green6 << 5) + (blue5 >> 0)) & 0xFF); // second part of 16 bits color } int resp=0; while (!_cmd.readable()) wait_ms(TEMPO); // wait for screen answer @@ -305,3 +306,4 @@ writeCOMMAND(command, 2); } +