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.
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 | foreground (int colour) |
| Set the foreground colour. | |
| void | background (int colour) |
| Set the background colour. | |
Detailed Description
Control and display on an ANSI/VT100 Terminal.
This allows you to control an ANSI serial terminal
Definition at line 32 of file Terminal.h.
Constructor & Destructor Documentation
| Terminal | ( | PinName | tx, |
| PinName | rx | ||
| ) |
Create the Terminal interface.
- Parameters:
-
tx Serial transmit rx Serial recieve
Definition at line 32 of file Terminal.cpp.
Member Function Documentation
| void background | ( | int | colour ) |
Set the background colour.
Definition at line 57 of file Terminal.cpp.
| void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 34 of file Terminal.cpp.
| void foreground | ( | int | colour ) |
Set the foreground colour.
Definition at line 50 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 38 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
Generated on Tue Jul 19 2022 23:18:51 by
1.7.2