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.
Revision 1:edf1eade7570, committed 2011-12-13
- Comitter:
- nucho
- Date:
- Tue Dec 13 15:38:11 2011 +0000
- Parent:
- 0:4e906b12a024
- Commit message:
Changed in this revision
| AD128160.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/AD128160.lib Mon Dec 12 03:09:32 2011 +0000 +++ b/AD128160.lib Tue Dec 13 15:38:11 2011 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/nucho/code/AD128160/#6f2db745808e +http://mbed.org/users/nucho/code/AD128160/#d15cda2a5e91
--- a/main.cpp Mon Dec 12 03:09:32 2011 +0000
+++ b/main.cpp Tue Dec 13 15:38:11 2011 +0000
@@ -3,26 +3,26 @@
AD128160 lcd(p9,p20);
-int rgb565(int r, int g,int b)
-{
+int rgb565(int r, int g,int b) {
int rgb;
-
+
rgb = (r & 0xF8) << 8; /* RRRRR----------- */
rgb |= (g & 0xFC) << 3; /* -----GGGGGG----- */
rgb |= b >> 3; /* -----------BBBBB */
-
+
return rgb;
}
int main() {
- lcd.backgroudColor(rgb565(255,0,0));
+ lcd.textBackground(1,rgb565(255,0,0));
+
lcd.locate(2,lcd.rows()/2);
lcd.printf("Hello World!\n");
-
+
lcd.color(rgb565(0,255,0));
lcd.box(12,76,116,100,0);
lcd.box(8,120,124,146,1);
-
+
lcd.color(rgb565(255,0,0));
lcd.circle(16,40,16,0);
lcd.circle(48,40,16,1);