VT100 Terminal Commands: Difference between revisions
From DSignT Support Database
Jump to navigationJump to search
WikiImporter (talk | contribs) (Pushed from DSignT Issue Database.) |
No edit summary |
||
| Line 34: | Line 34: | ||
[[category:DSP]] | [[category:DSP]][[category:Software]] | ||
Latest revision as of 16:10, 15 December 2011
VT100 Terminal Commands
/***********************************************************************
defines
***********************************************************************/
#define STR_VALUE(x) #x
#define VT100_CLR "\x1B[2J\x1B[H"
#define VT100_ATTRIB(x) "\x1B["STR_VALUE(x)"m"
#define VT100_POS(x,y) "\x1B["STR_VALUE(y)";"STR_VALUE(x)"H"
#define VT100_ATTRIB_BOLD 1
#define VT100_ATTRIB_NORM 0
Example
DM2_uartWriteStr (
h_uart,
VT100_CLR
VT100_ATTRIB(VT100_ATTRIB_BOLD)
".-------------------------------------------------.\r\n"
"| D.Module2.C6747 VT100 Demo |\r\n"
"| |\r\n"
"| (c) D.SignT 2011 www.dsignt.de |\r\n"
"'-------------------------------------------------'\r\n\n"
VT100_ATTRIB(VT100_ATTRIB_NORM)
,DM2_UART_NOTIMEOUT );
DM2_uartWriteStr (h_uart, VT100_POS(5,7) "bla bla", DM2_UART_NOTIMEOUT);