Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: GDEW075T8.cpp
- Revision:
- 2:73f957691c31
- Parent:
- 1:6ae4383194a1
- Child:
- 3:8129e159831b
--- a/GDEW075T8.cpp Mon Oct 15 03:53:22 2018 +0000 +++ b/GDEW075T8.cpp Mon Oct 15 03:56:16 2018 +0000 @@ -55,6 +55,12 @@ } +static void refresh() { + sendCommand(0x12); + wait(0.1); + waitForReady(); +} + #define PIXEL_WHITE 0x02 #define PIXEL_BLACK 0x00 #define PIXEL(p) ((p) ? (PIXEL_BLACK) : (PIXEL_WHITE)) @@ -66,7 +72,9 @@ source.init(); - while (source.hasNext()) { + int i = 0; + + while (i++ < GDE::BUFFER_SIZE && source.hasNext()) { unsigned char p = source.nextPixelGroup(); // transmit 2 pixels each time for (int j = 0; j < 4; ++j) { @@ -81,7 +89,7 @@ waitForReady(); // display refresh - GDE::refresh(); + refresh(); wait(1); } @@ -145,12 +153,6 @@ } - void refresh() { - sendCommand(0x12); - wait(0.1); - waitForReady(); - } - void showPixels(PixelSource &source, bool needRefresh) { if (needRefresh) { PixelSource fullBlackSource = PixelSource();