aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-08-13 13:51:48 -0700
committerTectu <joel@unormal.org>2012-08-13 13:51:48 -0700
commit436fa7d740d3235f4660c48679cea924b3ba73a3 (patch)
treea0134ccad298bd9f5e063f7fe2d8d6cc909636bc
parentf833dc27c0ebcf92ef34c0f842088c5efb09a277 (diff)
parent61f527498f6c6705792c39f0b38d6c8794d7b39e (diff)
downloaduGFX-436fa7d740d3235f4660c48679cea924b3ba73a3.tar.gz
uGFX-436fa7d740d3235f4660c48679cea924b3ba73a3.tar.bz2
uGFX-436fa7d740d3235f4660c48679cea924b3ba73a3.zip
Merge pull request #41 from trsaunders/master
documentation changes
-rw-r--r--docs/console.txt20
-rw-r--r--docs/contributors.txt4
-rw-r--r--src/console.c5
3 files changed, 28 insertions, 1 deletions
diff --git a/docs/console.txt b/docs/console.txt
new file mode 100644
index 00000000..09e7ae86
--- /dev/null
+++ b/docs/console.txt
@@ -0,0 +1,20 @@
+The console module acts as a BaseSequentialStream at a user defined area of the LCD.
+
+Requirements:
+The console code requires a lld that has vertical scroll implemented.
+It is also necessary to enable the scroll code:
+
+ #define GDISP_NEED_SCROLL TRUE
+
+Usage:
+
+ #include "console.h"
+
+ /* Define a console object */
+ GLCDConsole CON1;
+
+ /* initialise the console to take up the entire screen */
+ lcdConsoleInit(&CON1, 0, 0, 320, 240, &fontLarger, Black, White);
+
+ /* print something */
+ chprintf((BaseSequentialStream *)&CON1, "Hello the time is %d\nGoodbye.", chTimeNow());
diff --git a/docs/contributors.txt b/docs/contributors.txt
index 289aa98f..70c7e660 100644
--- a/docs/contributors.txt
+++ b/docs/contributors.txt
@@ -10,6 +10,8 @@ Date NickName RealName Contribution
30.07.2012 inmarket Andrew Hannam halext implementation
- dxli Dongxu Li lcdDrawEllipse() filled option
- benwilliam - fastMath & lcdDrawEllipse()
-- Badger Thomas Saunders console implementation, FSMC
+- Badger Thomas Saunders console implementation
+ FSMC for STM32F1 and F4
+ lld orientation fixes for S6D1121 and SSD1189
- Abhishek Abhishek Kakkar font rendering, S6D1121 GPIO
diff --git a/src/console.c b/src/console.c
index 55bc3312..e5f2371c 100644
--- a/src/console.c
+++ b/src/console.c
@@ -25,6 +25,8 @@
#include "gdisp_fonts.h"
#include "console.h"
+#if defined(GDISP_NEED_SCROLL)
+
/*
* Interface implementation. The interface is write only
*/
@@ -168,3 +170,6 @@ msg_t lcdConsoleWrite(GLCDConsole *console, char *bp, size_t n) {
return RDY_OK;
}
+
+
+#endif /* GDISP_NEED_SCROLL */