⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vt100.h

📁 ti-Chipcon CC1010 1G以下Soc源码库。包括rf,powermodes,clockmodes,flashRW,interrupts,timer,pwm,uart...所有底层驱动源码
💻 H
字号:
/*****************************************************************************
 *                                                                           *
 *        **********                                                         *
 *       ************                                                        *
 *      ***        ***                                                       *
 *      ***   +++   ***                                                      *
 *      ***   + +   ***                                                      *
 *      ***   +                            CHIPCON CC1010                    *
 *      ***   + +   ***           CUL SIMPLE PACKET PROTOCOL (SPP)           *
 *      ***   +++   ***                 VT100 HEADER FILE                 *
 *      ***       ***                                                        *
 *       ***********                                                         *
 *        *********                                                          *
 *                                                                           *
 *****************************************************************************
 * Internal header file for the CUL simple packet protocol.                  *
 *****************************************************************************
 * Author:              JOL                                                  *
 *****************************************************************************
 * Revision history:                                                         *
 *                                                                           *
 * $Log: vt100.h,v $
 * Revision 1.1  2002/10/14 11:49:09  tos
 * Initial version in CVS.
 *
 *                                                                           *
 ****************************************************************************/

// VT100 MACROS
#define ESC											27

// Deleting text
#define VT100_CLEAR_SCREEN()						printf("%c[2J", ESC)
#define VT100_CLEAR_LINE_RIGHT()					printf("%c[0K", ESC)
#define VT100_CLEAR_LINE()							printf("%c[2K", ESC)
#define VT100_CLEAR_SCREEN_DOWN()					printf("\n%c[0J", ESC)
#define VT100_INSERT_BLANK_LINE()					printf("\n%c[0K", ESC)

// Scroll
#define VT100_SET_SCROLL_REGION(startRow, endRow)	printf("%c[%d;%dr", ESC, (int) (startRow), (int) (endRow));
#define VT100_SET_SCROLL_ALL()						printf("%c[r", ESC)

#define VT100_SET_BGCOLOR(color, brightness)		printf("%c[%d;%dm", ESC, (int)((color) + 40), (int)(brightness))
#define VT100_SET_FGCOLOR(color, brightness)		printf("%c[%d;%dm", ESC, (int)((color) + 30), (int)(brightness))

#define VT100_SCROLL_UP()							printf("%cM", ESC)
#define VT100_SCROLL_DOWN()							printf("%cD", ESC)

// Jump
#define VT100_GO_TOP_LEFT()							printf("%c[H", ESC)
#define VT100_GO_TO_POS(row, col)					printf("%c[%d;%dH", ESC, (int) (row), (int) (col));

#define BLACK		0
#define RED			1
#define GREEN		2
#define YELLOW		3
#define BLUE		4
#define MAGENTA		5
#define CYAN		6
#define WHITE		7

#define BRIGHT		1
#define DIM 		2


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -