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
Terminal Class Reference
Control and display on an ANSI/VT100 Terminal. More...
#include <Terminal.h>
Public Member Functions | |
| Terminal (PinName tx, PinName rx) | |
| Create the Terminal interface. | |
| int | putc (int c) |
| Write a character to the terminal. | |
| int | printf (const char *format,...) |
| Write a formated string to the terminal. | |
| void | locate (int column, int row) |
| Locate to a screen column and row. | |
| void | cls () |
| Clear the screen and locate to 0,0. | |
| void | reset () |
| Reset Screen. | |
| void | eraseline () |
| Erase line. | |
| void | foreground (int colour) |
| Set the foreground colour 0xffffff. | |
| void | forgcol (int color) |
| Set the foreground standard (0-7) color. | |
| void | background (int colour) |
| Set the background colour 0xffffff. | |
| void | bckgcol (int color) |
| Set the background standard (0-7) color. | |
| void | formatPrintf (char sstr[], int xx, int yy, int padb=0, bool boldf=0) |
| printf formattato con dimensione e posizione | |
| void | frame (int x, int y, int w, int h, int boxtype=1) |
| Draw box. | |
| void | bannerAdv () |
| Banner Adv. | |
| void | readypos () |
| Default input pos. | |
Detailed Description
Control and display on an ANSI/VT100 Terminal.
This allows you to control an ANSI serial terminal
Definition at line 35 of file Terminal.h.
Constructor & Destructor Documentation
| Terminal | ( | PinName | tx, |
| PinName | rx | ||
| ) |
Create the Terminal interface.
mbed TerminalPlus Library, for ANSI/VT200 Terminals and ecape codes Copyright (c) 2015, Max Scordamaglia , https//developer.mbed.org/users/MaxScorda/ fork from Terminal Library Copyright (c) 2007-2010, sford, http://mbed.org
- Parameters:
-
tx Serial transmit rx Serial recieve
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition at line 33 of file Terminal.cpp.
Member Function Documentation
| void background | ( | int | colour ) |
Set the background colour 0xffffff.
Definition at line 103 of file Terminal.cpp.
| void bannerAdv | ( | ) |
Banner Adv.
Definition at line 219 of file Terminal.cpp.
| void bckgcol | ( | int | color ) |
Set the background standard (0-7) color.
Definition at line 83 of file Terminal.cpp.
| void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 35 of file Terminal.cpp.
| void eraseline | ( | ) |
Erase line.
Definition at line 117 of file Terminal.cpp.
| void foreground | ( | int | colour ) |
Set the foreground colour 0xffffff.
Definition at line 56 of file Terminal.cpp.
| void forgcol | ( | int | color ) |
Set the foreground standard (0-7) color.
Definition at line 64 of file Terminal.cpp.
| void formatPrintf | ( | char | sstr[], |
| int | xx, | ||
| int | yy, | ||
| int | padb = 0, |
||
| bool | boldf = 0 |
||
| ) |
printf formattato con dimensione e posizione
Definition at line 153 of file Terminal.cpp.
| void frame | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| int | boxtype = 1 |
||
| ) |
Draw box.
Definition at line 177 of file Terminal.cpp.
| void locate | ( | int | column, |
| int | row | ||
| ) |
Locate to a screen column and row.
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 40 of file Terminal.cpp.
| int printf | ( | const char * | format, |
| ... | |||
| ) |
Write a formated string to the terminal.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
| int putc | ( | int | c ) |
Write a character to the terminal.
- Parameters:
-
c The character to write to the display
| void readypos | ( | ) |
Default input pos.
Definition at line 265 of file Terminal.cpp.
| void reset | ( | ) |
Reset Screen.
Definition at line 111 of file Terminal.cpp.
Generated on Wed Jul 13 2022 03:01:52 by
1.7.2
