Based on Terminal lib from Simon Ford, some adds
Fork of TerminalPlus by
Diff: Terminal.h
- Revision:
- 5:d045e3561533
- Parent:
- 4:ee2311717b80
- Child:
- 6:f8c90e147000
--- a/Terminal.h Fri Sep 11 00:15:26 2015 +0000 +++ b/Terminal.h Mon Sep 14 21:33:00 2015 +0000 @@ -29,14 +29,15 @@ /** Control and display on an ANSI/VT100 Terminal * * This allows you to control an ANSI serial terminal - */ -class Terminal : public Serial { + */ +class Terminal : public Serial +{ public: - /** Create the Terminal interface - * + /** Create the Terminal interface + * * @param tx Serial transmit * @param rx Serial recieve - */ + */ Terminal(PinName tx, PinName rx); #if DOXYGEN_ONLY @@ -52,7 +53,7 @@ * variables to use in formating the string. */ int printf(const char* format, ...); - + // also baud etc #endif @@ -66,15 +67,30 @@ /** Clear the screen and locate to 0,0 */ void cls(); + /** Reset Screen */ + void reset(); + + /** Erase line */ + void eraseline(); + /** Set the foreground colour */ void foreground(int colour); /** Set the background colour */ void background(int colour); - - /**Draw box */ + + /*printf formattato con dimensione e posizione*/ + void formatPrintf(char sstr[], int xx, int yy, int padb=0); + + /**Draw box */ void frame(int x, int y, int w, int h, int boxtype=1); + /**Banner */ + void banner(); + + /**Default input pos */ + void readypos(); + }; #endif