123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /********************************************************************************
- * File Name: Key.h
- * Function Describe: Header file for Key.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2015-1-30
- *******************************************************************************/
- #ifndef __KEY_LED_H
- #define __KEY_LED_H
- /*********************************begin*****************************************/
- #define KEY_LED_PIN GPIO_Pin_8
- #define KEY_LED_PORT GPIOB
- #define KEY_LED(bit) bit?(GPIO_SetBits(KEY_LED_PORT,KEY_LED_PIN)):(GPIO_ResetBits(KEY_LED_PORT,KEY_LED_PIN))
- #define KEY_PPT_PIN GPIO_Pin_3
- #define KEY_PPT_PORT GPIOC
-
- #define KEY_PANEL_UP_PIN GPIO_Pin_5
- #define KEY_PANEL_UP_PORT GPIOB
-
- #define KEY_PANEL_DOWN_PIN GPIO_Pin_6
- #define KEY_PANEL_DOWN_PORT GPIOB
- #define KEY_PANEL_OK_PIN GPIO_Pin_7
- #define KEY_PANEL_OK_PORT GPIOB
- #define KEY_PANEL_EXIT_PIN GPIO_Pin_4
- #define KEY_PANEL_EXIT_PORT GPIOB
- #define KEY_PANEL_MENU_PIN GPIO_Pin_3
- #define KEY_PANEL_MENU_PORT GPIOB
- #define KEY_PPT_MIC_PIN GPIO_Pin_5
- #define KEY_PPT_MIC_PORT GPIOC
- //////////////////////////////////////////
- #define KEY_FUNC_PIN GPIO_Pin_10
- #define KEY_FUNC_PORT GPIOC
-
- #define KEY_INFO_PIN GPIO_Pin_1
- #define KEY_INFO_PORT GPIOC
-
- #define KEY_POWER_PIN GPIO_Pin_2
- #define KEY_POWER_PORT GPIOB
-
- #define KEY_ALL_PORTB (KEY_PANEL_UP_PIN|KEY_PANEL_DOWN_PIN|KEY_PANEL_OK_PIN|KEY_PANEL_EXIT_PIN|KEY_PANEL_MENU_PIN|KEY_POWER_PIN)
- #define KEY_ALL_PORTC (KEY_PPT_PIN| KEY_PPT_MIC_PIN|KEY_FUNC_PIN|KEY_INFO_PIN)
-
-
- #define KEY_OPTION 0xf8042a //左1 选项按键
- #define KEY_PPT 0xfc0422 //左2
- #define KEY_PANEL_OK 0xfc002a //左3
- #define KEY_INFO 0x7c042a //左4 代替 原KEY_UP,群组上
- #define KEY_FUNC 0xfc0428 //左5 代替 原KEY_DOWN,群组下
-
- #define KEY_PANEL_MENU 0xec042a //正1
- #define KEY_PANEL_UP 0xdc042a //正2
- #define KEY_PANEL_DOWN 0xbc042a //正3
- #define KEY_PANEL_EXIT 0xf4042a //正4
- #if 0
- #define KEY_UP 0xf81c2a
- #define KEY_DOWN 0xf81c2c
- #define KEY_PANEL_P1 0xf8182e
- #define KEY_PANEL_P2 0xf8142e
- #define KEY_PANEL_P3 0xf80c2e
- #endif
- #define KEY_PPT_MIC 0xfc040a
- #define KEY_EXIT_DOWN_GT 0xb4042a //DOWN+EXIT 此值用于进入GT模式
- #define KEY_P1_P3_UPDATE 0xf8082e //此值用于进入对讲版本升级
- #define KEY_OK_DOWN_GPS 0xac042a //OK+DOWN
-
- extern unsigned char g_ucDKC;
- extern unsigned char g_ucUKC;
- extern unsigned char g_ucKeyFree;
- extern unsigned char g_ucKeyMode;
- extern unsigned long g_ulKeyValue; //key value
- extern unsigned char g_ucKeyPPTPress;
- extern int g_iEncode;
- void KeyInit(void);
- int GetKey(void);
- int GetEncodeKey(void);
- void KeyToModem(int flag);
- void KeyCount(void);
- void OnOff_Init(void);
- /**********************************end******************************************/
- #endif
|