diff options
author | trsaunders <trsaunders@gmail.com> | 2012-07-24 17:22:50 +0100 |
---|---|---|
committer | trsaunders <trsaunders@gmail.com> | 2012-07-24 17:22:50 +0100 |
commit | e4094ad4681e2d73c1a22c60a7dd16835f9b7287 (patch) | |
tree | 8db74abf04b378191b7d036011b09ed32bb58ebc /demos | |
parent | 4ba0eb23a7d41a0f2afee3fd64b9ed56684bf865 (diff) | |
parent | 8d7a588c5185558fdc85da867a37ecf09026bb3c (diff) | |
download | uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.tar.gz uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.tar.bz2 uGFX-e4094ad4681e2d73c1a22c60a7dd16835f9b7287.zip |
get pixel return value implemented in struct
Diffstat (limited to 'demos')
-rw-r--r-- | demos/README | 14 | ||||
-rwxr-xr-x | demos/console/main.c | 30 |
2 files changed, 30 insertions, 14 deletions
diff --git a/demos/README b/demos/README index e95314f7..a15ebd51 100644 --- a/demos/README +++ b/demos/README @@ -2,17 +2,3 @@ This are a few demos, showing how to use the library. Please note that this are not compilable projects. - -Your boarfile do need to contain the following informations: - - #define TP_PORT GPIOC - #define TP_IRQ 4 - #define TP_CS 6 - - #define LCD_DATA_PORT GPIOE - #define LCD_CMD_PORT GPIOD - #define LCD_CS 12 - #define LCD_RS 13 - #define LCD_WR 14 - #define LCD_RD 15 - diff --git a/demos/console/main.c b/demos/console/main.c new file mode 100755 index 00000000..c629e2cd --- /dev/null +++ b/demos/console/main.c @@ -0,0 +1,30 @@ +#include "ch.h"
+#include "hal.h"
+#include "glcd.h"
+#include "test.h"
+#include "console.h"
+
+static GLCDDriver GLCDD1;
+static GLCDConsole CON1;
+
+int main(void) {
+ halInit();
+ chSysInit();
+
+ // init LCD and clear it
+ lcdInit(&GLCDD1);
+ lcdClear(Black);
+
+ // init console
+ lcdConsoleInit(&CON1, 0, 0, lcdGetWidth(), lcdGetHeight(), font_Small, Black, White);
+
+ // use test thread for console output
+ TestThread((BaseSequentialStream*)&CON1);
+
+ while (TRUE) {
+
+ chThdSleepMilliseconds(200);
+ }
+
+ return 0;
+}
|