Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Terminal by
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 | } |
