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

📄 com.h

📁 关于测试at91sam9260的各种驱动和功能的测试源代码。
💻 H
字号:
/*************************************** Copyright (c) *************************************************
*
*			            POLAR STAR
*				   北天星国际有限公司
*				   http://www.po-star.com
*
*文 件 名: com.h 
*
*编译环境:ADS1.2
*
********************************************************************************************************/


#ifndef com_h
#define com_h

#define AT91C_CB_SIZE	80			// size of the console buffer 

//* Escape sequences */
#define ESC				\033
#define CLRSCREEN		"\033[2J"	//\033 = ESC in octal
#define ClEARLINE 		"\033[K"		// Clear line, from cursor position to the right most position of line 

//* Cursor Movement */
#define MOVEUP(num) 	"ESC[numA" 		// Move the cursor up num positions  
#define MOVEDOWN(num)   "ESC[numB" 		// Move the cursor down num positions  
#define MOVERIGHT(num)  "ESC[numC" 		// Move the cursor right num positions  
#define MOVELEFT(num) 	"ESC[numD"  	// Move the cursor left num positions  
#define MOVETO(row,col) "ESC[row;colH" 	// Move the cursor to the (col, row) position. Note that the row comes before column; that is, y comes before x. Either col or row can be omitted. Row and column both start with "1," not zero. (1, 1) corresponds to the top-left corner of the screen.  

//* Character Mode */

#define CHANGE_CHAR_MODE(attr) "ESC[attrm" 	//Change the character mode with attribute attr. The attributes are numbers listed below.  

#define ALL_ATTRIB_OFF 		0		// All attributes turned off. (Except for foreground and background color).  
#define HIGH_INTENSITY		1 		// Bold.  
#define LOW_INTENSITY		2		// Normal.  
#define UNDERLINE			4		// Underline font.  
#define BLINK				5		// Blinking font.  
#define RAPID_BLINK			6 		// Works only on some systems.  
#define REVERSE_VIDEO		7		// Swapping the foreground color and the background color.  
#define FOREGROUND_BLACK 	30		// Black.  
#define FOREGROUND_RED		31		// Red.  
#define FOREGROUND_GREEN	32 		// Green.  
#define FOREGROUND_YELLOW	33 		// Yellow.  
#define FOREGROUND_BLUE		34 		// Blue.  
#define FOREGROUND_MAGENTA	35 		// Magenta.  
#define FOREGROUND_CYAN		36 		// Cyan.  
#define FOREGROUND_WHITE 	37 		// White.  
#define BACKGROUND_BLACK 	40 		// Black.  
#define BACKGROUND_RED		41 		// Red.  
#define BACKGROUND_GREEN 	42 		// Green.  
#define BACKGROUND_YELLOW 	43 		// Yellow.  
#define BACKGROUND_BLUE 	44 		// Blue.  
#define BACKGROUND_MAGENTA 	45 		// Magenta.  
#define BACKGROUND_CYAN 	46 		// Cyan.  
#define BACKGROUND_WHITE	47 		// White.  

struct __FILE { 
    int handle; 
    /* Whatever you need here (if the only files you are using
       is the stdoutput using printf for debugging, no file
       handling is required) */ 
};


extern char message[AT91C_CB_SIZE];
extern void AT91F_ClrScr(void);
extern int AT91F_ReadLine (const char *const prompt, char *console_buffer);
extern void AT91F_WaitKeyPressed(void);

#endif

⌨️ 快捷键说明

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