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

📄 define.h

📁 楼宇对讲系统里用的文字信息接收。用可视对讲话机的TFT屏可看到从管理中心发过来的广播信息和本户的特发信息
💻 H
字号:


/* timer0 11.0592MHZ*/
//#define  TM10MS_H 0xdb
//#define  TM10MS_L 0xff
/*timer2*/
//#define TM5MS_H 0xed
//#define TM5MS_L 0xff

/* 20MHZ timer0 */
#define  TM10MS_H 0xbe
#define  TM10MS_L 0xe5

#define  TM20MS_H 0x7d
#define  TM20MS_L 0x4a
/*timer2*/
#define TM4MS_H 0xe5
#define TM4MS_L 0xf4

/* 按键定义 */
#define  KEY_TM 2        //按键延时时间

#define NOKEY  0
#define KEYOK  1
#define LEFTKEY  0x01           //LEFF KEY
#define RIGHTKEY 0x02

/*话机阅读信息时的模式定义*/
#define DUMMY_DISP 0
#define FIRST_MENU_DISP 1
#define SECOND_MENU_DISP 2
#define THIRD_MENU_DISP 3

/*信息阅读时的选项位置*/

#define MES_READ_POSITION 0    //信息浏览位置
#define CLOSE_POSITION 1       //关机位置

#define P_DISP 0               //   内容显示时按正向显时显示(按下页显示模式)
#define N_DISP 1               //   内容显示时按反向显时显示(按上页显示模式)


/* 定义字体显示时的大小:STANDARD */
#define STANDARD       0x00
#define DOU_WIDTH      0x01
#define DOU_H_W        0x02
#define QUARD_W_DOU_H  0x03           
/*以下定义是MB90092的控制命令的关键字*/
#define COMMAND_0   0x80
#define COMMAND_1   0x88
#define COMMAND_2   0x90
#define COMMAND_3   0x98
#define COMMAND_4   0xa0
#define COMMAND_5   0xa8
#define COMMAND_6   0xb0
#define COMMAND_7   0xb8
#define COMMAND_8   0xc0
#define COMMAND_9   0xc8
#define COMMAND_10  0xd0

/* 字体色为下列颜色之一种,固定*/  
	#define CHA_COLOR_BLACK    0x00
	#define CHA_COLOR_BLUE     0x10
	#define CHA_COLOR_RED      0x20   
	#define CHA_COLOR_MAGENTA  0x30   //红紫色
	#define CHA_COLOR_GREEN    0x40     
	#define CHA_COLOR_CYAN     0x50   //蓝绿色
	#define CHA_COLOR_YELLOW   0x60 
    #define CHA_COLOR_WHITE    0x70
/* 字体背景色为下列颜色之一,固定*/   
	#define BACK_COLOR_BLACK   0x00  
	#define BACK_COLOR_BLUE    0x01    
	#define BACK_COLOR_RED     0x02      
	#define BACK_COLOR_MAGENTA 0x03  //红紫色   
	#define BACK_COLOR_GREEN   0x04          
	#define BACK_COLOR_CYAN    0x05      //蓝绿色  
	#define BACK_COLOR_YELLOW  0x06
    #define BACK_COLOR_WHITE   0x07
/******************************************************/
#ifdef SCREEN_BACK_COR_BLACK
     #define SCREEN__COR  0x00
#elif defined SCREEN_BACK_COR_BLUE
     #define SCREEN_COR 0x01
#elif defined SCREEN_BACK_COR_RED
     #define SCREEN_COR 0x02
#elif defined SCREEN_BACK_COR_MAGENTA
     #define SCREEN_COR 0x03
#elif defined SCREEN_BACK_COR_GREEN
     #define SCREEN_COR 0x04
#elif defined SCREEN_BACK_COR_CYAN
     #define SCREEN_COR 0x05
#elif defined SCREEN_BACK_COR_YELLOW
     #define SCREEN_COR 0x06
#else
     #define SCREEN_COR 0x07    //white
#endif

/* 下列定义起动显示行空几格等*/
#define MAX_DISP_ROW 7
#define MAX_DISP_COL 8


/*呼叫和看信息时的继电器切换*/
#define SW_OFF 1
#define SW_ON  0
/*打开话机时定义*/
#define DISP_ON  0
#define DISP_OFF 1
/*延时定义 10ms循环一次的定义*/

#define TM20MS 1
#define TM60MS 3
#define TM200MS 10
#define TM500MS 25
#define TM600MS 30
#define TM800MS 40


/* 100ms循环一次定义*/
#define TM30S  300


/*ADDR_PRC.C*/
#define MESSAGE_START_ADDR (0x1900) 

#define MESSAGE_LENTH  512      //相当于255个汉字的信息
                                //一条信息占用FLASH MEMORY 合计128*4段
#define MAX_MESSAGE_CNT 200

#define PAGE_0 0
#define PAGE_1 1

/* 信息新旧定义*/
#define NEW 1
#define OLD 0

/*串口波特定义*/
#define BPS4800  0xf5

/*timer2 里处理的超时时间定义*/
#define TM100MS 25	

⌨️ 快捷键说明

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