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.
Dependencies: bitreversetable256
Fork of Adafruit-GP9002-Graphic-VFD-Library by
Revision 4:dc3e19dfd45d, committed 2016-05-15
- Comitter:
- oliverb
- Date:
- Sun May 15 07:13:29 2016 +0000
- Parent:
- 3:0a38cff87d2e
- Commit message:
- Improved byte cache, now needs only one SPI data write for a hit.
Changed in this revision
| Adafruit_GP9002.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0a38cff87d2e -r dc3e19dfd45d Adafruit_GP9002.cpp
--- a/Adafruit_GP9002.cpp Mon May 09 09:29:03 2016 +0000
+++ b/Adafruit_GP9002.cpp Sun May 15 07:13:29 2016 +0000
@@ -84,7 +84,7 @@
// hold the address so we can read and then write
command(GP9002_ADDRHELD);
- addrcache=0; //known because we just set the address
+ addrcache=-1; //address OK but cmd not set
bytecache=0; //known because display cleared
}
@@ -165,6 +165,7 @@
command(GP9002_DATAREAD);
dataRead();
bytecache = dataRead();
+ command(GP9002_DATAWRITE); //warning: subsequent drawpixel ops will assume this
}
y=0xc0>>((y & 3) <<1);
color*=0b01010101;
@@ -173,7 +174,6 @@
bytecache |= color&y;
- command(GP9002_DATAWRITE);
dataWrite(bytecache);
}
@@ -325,13 +325,16 @@
command(GP9002_CLEARSCREEN);
wait_us(500);
+ addrcache=-1; //address OK but cmd not set
}
void Adafruit_GP9002::displayOff(void) {
command(GP9002_DISPLAYSOFF);
+ addrcache=-1; //address OK but cmd not set
}
void Adafruit_GP9002::displayOn(void) {
command(GP9002_DISPLAY1ON);
+ addrcache=-1; //address OK but cmd not set
}
