A TextDisplay driver that supports graphical displays using on of the SED133x conrtrolers. Allows stdout and stderr output to be redirected to the display.

Revision:
6:2f8aed3d2be4
Parent:
1:18c56f038905
Child:
7:d79600310cfe
--- a/TextLCD.h	Sat Jan 29 20:31:14 2011 +0000
+++ b/TextLCD.h	Sat Jan 29 20:48:08 2011 +0000
@@ -7,12 +7,40 @@
 
 #ifndef MBED_TEXTLCD_H
 #define MBED_TEXTLCD_H
+/** TextLCD Textdisplay
+ * 
+ * Example:
+ * @code
+ / simple test for TextDisplay class, untested
+ #include "mbed.h"
+ #include "TextLCD.h"
+ 
+ TextLCD lcd(p5, p6, p7, p8, p9, p28, p27, 4, 20, "lcd");
+ 
+ 
+ int main() {
+      lcd.printf("Hello TextDisplay world!\r\n");
+      lcd.claim(stdout);
+      printf("hello stream world\r\n");
+ }
 
+ * @endcode
+ */
 class TextLCD : public TextDisplay {
 public:
+    /** Create the TextDisplay interface
+     *
+     * @param rs PinName for reset
+     * @param rw PinName for read/write
+     * @param e PinName for enable
+     * @param d0-d3 PinName for D0 -D3
+     * @param rows number of rows on the display (default: 2)
+     * @param columns number of colums on the display (default: 16)
+     * @param name name to be used in pathname of the stream (defaults to "sed133x")
+     */
     TextLCD(PinName rs, PinName rw, PinName e,
             PinName d0, PinName d1, PinName d2, PinName d3,
-            uint16_t rows = 2, uint16_t columns = 16, const char *name = NULL);
+            uint16_t rows = 2, uint16_t columns = 16, const char *name = "textlcd");
     virtual void character(uint16_t column, uint16_t row, int c);
     virtual uint16_t rows() {
         return _rows;