command.h

来自「以ST公司CPU为核心的彩色电视机的完整源程序。」· C头文件 代码 · 共 121 行

H
121
字号
/*****************************************************************************
FILENAME     : COMMAND.H
VERSION      : V1.0
DATE         : JAN 1999
AUTHOR(s)    : ASHISH RUDOLA/ DEEPAK DOSHI
PROCESSOR    : ST92195
DESCRIPTION  : This module contains constant definitions and function
               prototypes.
MODIFICATIONS:
   -
*****************************************************************************/
#ifndef _commandhead_
#define _commandhead_

void key_debounce(unsigned char i);

void init_auto_demo_var(void);

void init_command(void);
unsigned char get_command(void);

#define NO_COMMAND 0x2E      /* The key which returns IR value = 0x2E should not be used */

#define COMMAND_0 				0x00
#define COMMAND_1 				0x01
#define COMMAND_2 				0x02
#define COMMAND_3 				0x03
#define COMMAND_4 				0x04
#define COMMAND_5 				0x05
#define COMMAND_6 				0x06
#define COMMAND_7 				0x07
#define COMMAND_8 				0x08
#define COMMAND_9 				0x09
#define COMMAND_LOCK 			0x0a

#define COMMAND_TWO_DIGIT       0x10
#define COMMAND_SLEEP 			0x1c
#define COMMAND_RECALL 			0x15     /*11 DOSHI*/   
#define COMMAND_MUTE 			0x12
#define COMMAND_POWER 			0x20
#define COMMAND_TV_AV	 		0x28  
#define COMMAND_CHANNEL_UP 	    0x29	   /*17 page up */
#define COMMAND_CHANNEL_DOWN 	0x2a    /*18 page down */
#define COMMAND_MENU		    0x23   /* original 0x3B  22*/
#define COMMAND_SERVICE 		0x34	/*0x3b   20*/  
#define COMMAND_VSM	 			0x13
#define COMMAND_DEMO	 		0x3A
#define COMMAND_OK				0x11   /*0f original 0x21 */
#define COMMAND_LEFT 			0x25    /*14*/
#define COMMAND_RIGHT 			0x24    /*13*/
#define COMMAND_SWAP 			0x16    /*13*/
#define COMMAND_SCAN 			0x17    /*13*/
#define COMMAND_SUROUND			0x2F   /*13*/
#define COMMAND_PAGE_UP			0x26   /*13*/
#define COMMAND_PAGE_DOWN		0x30   /*13*/
#define COMMAND_INDEX         0x2F      /*   "INDEX" remote key code	*/


/* Teletext Key definitions */
#define Digit_0  			0x00      /*   "0" remote key code	*/
#define Digit_1             0x01      /*   "1" remote key code	*/
#define Digit_2             0x02      /*   "2" remote key code	*/
#define Digit_3             0x03      /*   "3" remote key code	*/
#define Digit_4             0x04      /*   "4" remote key code	*/
#define Digit_5             0x05      /*   "5" remote key code	*/
#define Digit_6             0x06      /*   "6" remote key code	*/
#define Digit_7             0x07      /*   "7" remote key code	*/
#define Digit_8             0x08      /*   "8" remote key code	*/
#define Digit_9             0x09      /*   "9" remote key code	*/
#define Index_TXT           0x2F      /*   "INDEX" remote key code	*/
#define TV_TXT 			    0x1A      /* 1A  "TV/TXT" remote key code	*/
#define RED_Key             0x29      /*   "RED" remote key code	*/
#define GREEN_Key           0x24      /*   "GREEN" remote key code	*/
#define YELLOW_Key          0x2A      /*   "YELLOW" remote key code	*/
#define CYAN_Key            0x25      /*   "CYAN" remote key code	*/
#define Page_minus          0x30      /*   "Page -" remote key code	*/
#define Page_plus           0x26      /*   "Page +" remote key code	*/
#define Stop                0x15      /*   "STOP" remote key code	*/
#define List_Basic_Flof     0xFF      /*   "LIST/BASIC/FLOF" remote key code	*/
#define Store_List          0xFF      /*   "Store List" remote key code	*/
#define Size	             0x14      /* 14  "Size" remote key code	*/
#define Mix                 0x16      /*   "Mix" remote key code	*/
#define Reveal              0x13      /*   "Reveal" remote key code	*/
#define Browse              0x1C      /* not use  "Browse" remote key code	*/
#define Sub_Code            0x28      /*   "Sub-Code" remote key code	*/
#define Cancel              0x17      /*   "Cancel" remote key code	*/




/* Timing definitions */
#define CHANNEL_UP_INITIAL_TIME 800/MS_PER_INTERRUPT
#define CHANNEL_UP_NORMAL_TIME 800/MS_PER_INTERRUPT
#define CHANNEL_DOWN_INITIAL_TIME 800/MS_PER_INTERRUPT
#define CHANNEL_DOWN_NORMAL_TIME 800/MS_PER_INTERRUPT
#define VOLUME_UP_INITIAL_TIME 200/MS_PER_INTERRUPT
#define VOLUME_UP_NORMAL_TIME 200/MS_PER_INTERRUPT
#define VOLUME_DOWN_INITIAL_TIME 200/MS_PER_INTERRUPT
#define VOLUME_DOWN_NORMAL_TIME 200/MS_PER_INTERRUPT
#define MENU_INITIAL_TIME 500/MS_PER_INTERRUPT
#define MENU_NORMAL_TIME 200/MS_PER_INTERRUPT
#define MENU_UP_INITIAL_TIME 500/MS_PER_INTERRUPT
#define MENU_UP_NORMAL_TIME 200/MS_PER_INTERRUPT
#define MENU_DOWN_INITIAL_TIME 500/MS_PER_INTERRUPT
#define MENU_DOWN_NORMAL_TIME 200/MS_PER_INTERRUPT
#define MENU_RIGHT_INITIAL_TIME 200/MS_PER_INTERRUPT
#define MENU_RIGHT_NORMAL_TIME 200/MS_PER_INTERRUPT
#define MENU_LEFT_INITIAL_TIME 200/MS_PER_INTERRUPT
#define MENU_LEFT_NORMAL_TIME 200/MS_PER_INTERRUPT

/* Timing definitions */
#define SERVICE_UP_INITIAL_TIME 500/MS_PER_INTERRUPT
#define SERVICE_UP_NORMAL_TIME 200/MS_PER_INTERRUPT
#define SERVICE_DOWN_INITIAL_TIME 500/MS_PER_INTERRUPT
#define SERVICE_DOWN_NORMAL_TIME 200/MS_PER_INTERRUPT
#define SERVICE_RIGHT_INITIAL_TIME 500/MS_PER_INTERRUPT
#define SERVICE_RIGHT_NORMAL_TIME 15/MS_PER_INTERRUPT
#define SERVICE_LEFT_INITIAL_TIME 500/MS_PER_INTERRUPT
#define SERVICE_LEFT_NORMAL_TIME 15/MS_PER_INTERRUPT

#endif

⌨️ 快捷键说明

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