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.
Dependents: GPS_System_with_Google_Maps
Fork of NokiaLCD by
Revision 6:d829f93abd27, committed 2012-12-13
- Comitter:
- Ifrah
- Date:
- Thu Dec 13 23:58:05 2012 +0000
- Parent:
- 5:18ae1fbb4c63
- Commit message:
- Added patches
Changed in this revision
| NokiaLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/NokiaLCD.cpp Fri May 25 01:48:37 2012 +0000
+++ b/NokiaLCD.cpp Thu Dec 13 23:58:05 2012 +0000
@@ -67,7 +67,7 @@
case LCD6610:
command(0xCA); // display control
data(0);
- data(31);
+ data(32);
data(0);
command(0xBB);
data(1);
@@ -323,7 +323,27 @@
void NokiaLCD::pixel(int x, int y, int colour) {
_cs = 0;
_window(x, y, 1, 1);
- _putp(colour);
+ switch (_type) {
+ case LCD6100:
+ case PCF8833:
+
+ _putp(colour);
+
+ break;
+ case LCD6610:
+
+ int r4 = (colour >> (16 + 4)) & 0xF;
+ int g4 = (colour >> (8 + 4)) & 0xF;
+ int b4 = (colour >> (0 + 4)) & 0xF;
+ int d1 = (r4 << 4) | g4;
+ int d2 = (b4 << 4) | r4;
+ int d3 = (g4 << 4) | b4;
+ data(d1);
+ data(d2);
+ data(d3);
+
+ break;
+ }
_cs = 1;
}
