Terminal interface for communicating with serial ANSI/VT100 terminals
Dependents: Terminal_HelloWorld geigercounter01 geigercounter04 DiscoTech ... more
main.cpp@0:2bf27af3c759, 2009-12-31 (annotated)
- Committer:
- simon
- Date:
- Thu Dec 31 09:50:48 2009 +0000
- Revision:
- 0:2bf27af3c759
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:2bf27af3c759 | 1 | // simple test for a ANSI/VT100 Terminal, sford |
simon | 0:2bf27af3c759 | 2 | |
simon | 0:2bf27af3c759 | 3 | #include "mbed.h" |
simon | 0:2bf27af3c759 | 4 | |
simon | 0:2bf27af3c759 | 5 | #include "Terminal.h" |
simon | 0:2bf27af3c759 | 6 | |
simon | 0:2bf27af3c759 | 7 | Terminal term(USBTX, USBRX); // tx, rx |
simon | 0:2bf27af3c759 | 8 | |
simon | 0:2bf27af3c759 | 9 | int main() { |
simon | 0:2bf27af3c759 | 10 | term.printf("Hello World!\nHow are you?"); |
simon | 0:2bf27af3c759 | 11 | |
simon | 0:2bf27af3c759 | 12 | wait(2); |
simon | 0:2bf27af3c759 | 13 | |
simon | 0:2bf27af3c759 | 14 | term.locate(3,1); |
simon | 0:2bf27af3c759 | 15 | term.foreground(0xFF0000); |
simon | 0:2bf27af3c759 | 16 | term.printf("I'm Great!"); |
simon | 0:2bf27af3c759 | 17 | |
simon | 0:2bf27af3c759 | 18 | wait(3); |
simon | 0:2bf27af3c759 | 19 | |
simon | 0:2bf27af3c759 | 20 | term.cls(); |
simon | 0:2bf27af3c759 | 21 | } |