diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2012-08-16 05:11:55 -0700 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2012-08-16 05:11:55 -0700 |
commit | 1176b9738cbea9e3c6ce48f9be1be89f23f2e34e (patch) | |
tree | 03eaa6c30cdb4c1de3263f0691fcb23eb6a8f2f8 /demos/console/main.c | |
parent | 4ffb258d71fe0720418fb350b6f3d5354240dddf (diff) | |
parent | f0a7643598a221a91f8ec1c79eb3646617d099bd (diff) | |
download | uGFX-1176b9738cbea9e3c6ce48f9be1be89f23f2e34e.tar.gz uGFX-1176b9738cbea9e3c6ce48f9be1be89f23f2e34e.tar.bz2 uGFX-1176b9738cbea9e3c6ce48f9be1be89f23f2e34e.zip |
Merge pull request #3 from Tectu/master
Get latest updates
Diffstat (limited to 'demos/console/main.c')
-rwxr-xr-x | demos/console/main.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/demos/console/main.c b/demos/console/main.c index b8ccd633..78e24a9c 100755 --- a/demos/console/main.c +++ b/demos/console/main.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS-LCD-Driver - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS-LCD-Driver.
@@ -20,32 +20,28 @@ #include "ch.h"
#include "hal.h"
-#include "glcd.h"
-#include "test.h"
+#include "gdisp.h"
+#include "chprintf.h"
#include "console.h"
-static GLCDDriver GLCDD1;
static GLCDConsole CON1;
int main(void) {
halInit();
chSysInit();
- // init LCD and clear it
- lcdInit(&GLCDD1);
- lcdClear(Black);
+ gdispInit();
+ gdispClear(Lime);
- // init console
- lcdConsoleInit(&CON1, 0, 0, lcdGetWidth(), lcdGetHeight(), font_Small, Black, White);
+ lcdConsoleInit(&CON1, 0, 0, gdispGetWidth(), gdispGetHeight(), &fontLarger, Black, White);
- // use test thread for console output
- TestThread((BaseSequentialStream*)&CON1);
+
+ chprintf((BaseSequentialStream *)&CON1, "Hello the time is %d\nGoodbye.", chTimeNow());
- while (TRUE) {
- chThdSleepMilliseconds(200);
+ while (TRUE) {
+
+ chThdSleepMilliseconds(100);
}
-
- return 0;
}
|