A TextDisplay driver that supports graphical displays using on of the SED133x conrtrolers. Allows stdout and stderr output to be redirected to the display.
Diff: Terminal.h
- Revision:
- 5:684f79f70ac9
- Parent:
- 1:18c56f038905
- Child:
- 7:d79600310cfe
--- a/Terminal.h Sat Jan 29 20:06:34 2011 +0000 +++ b/Terminal.h Sat Jan 29 20:31:14 2011 +0000 @@ -14,10 +14,34 @@ #ifndef MBED_TERMINAL_H #define MBED_TERMINAL_H +/** Terminal Textdisplay + * + * Provides an TextDisplay version with output to a serial port + * Example: + * @code + / simple test for TextDisplay class + #include "mbed.h" + #include "Terminal.h" + + Terminal lcd(USBTX, USBRX); + + int main() { + lcd.printf("Hello TextDisplay world!\r\n"); + lcd.claim(stdout); + printf("hello stream world\r\n"); + } + + * @endcode + */ class Terminal : public TextDisplay { public: - - Terminal(PinName tx, PinName rx, const char *name = NULL); + /** Create the TextDisplay interface + * + * @paran tx PinName for data sending (USBTX for pc connection) + * @param rx PinName for data reception (USBRX for pc connection) + * @param name The name used in the path to access the strean through the filesystem (default: "term") + */ + Terminal(PinName tx, PinName rx, const char *name = "term"); virtual void character(uint16_t column, uint16_t row, int c); virtual uint16_t rows();