#ifndef __KEY_H_ #define __KEY_H_ ////////////////////////////////////////// #define KEY_MICPTT_PIN GPIO_Pin_2 #define KEY_MICPTT_PORT GPIOB #define KEY_FUNC_PIN GPIO_Pin_1 #define KEY_FUNC_PORT GPIOB #define KEY_INFO_PIN GPIO_Pin_13 #define KEY_INFO_PORT GPIOC #define KEY_PPT_PIN GPIO_Pin_2 #define KEY_PPT_PORT GPIOB #define ONOFF_CK_PIN GPIO_Pin_3 #define ONOFF_CK_PORT GPIOB #define KEY_ALL_PORTB (KEY_PPT_PIN| KEY_FUNC_PIN|KEY_MICPTT_PIN) #define KEY_ALL_PORTC KEY_INFO_PIN #define KEY_ENCODE1_PIN GPIO_Pin_4 #define KEY_ENCODE1_PORT GPIOB #define KEY_ENCODE2_PIN GPIO_Pin_5 #define KEY_ENCODE2_PORT GPIOB //#define KEY_ALL_PORTC (KEY_PPT_PIN| KEY_FUNC_PIN|KEY_INFO_PIN) #define KEY_OPTION 0x070000 //左1 选项按键 #define KEY_PPT 0x22000 //左1 #define KEY_PANEL_OK 0xfc002a //左3 #define KEY_INFO 0x42000 //左4 代替 原KEY_UP,vol+ #define KEY_FUNC 0x60000 //左5 代替 原KEY_DOWN,vol- #define KEY_PANEL_MENU 0xec042a //正1 #define KEY_PANEL_UP 0xdc042a //正2 #define KEY_PANEL_DOWN 0xbc042a //正3 #define KEY_PANEL_EXIT 0xf4042a //正4 #define KEY_PANEL_P1 0xf4042b #define KEY_PANEL_P2 0xf4042c #define KEY_PPT_MIC 0x380000 #define KEY_EXIT_DOWN_GT 0x40000 //侧键UP+DOWN 此值用于进入GT模式 #define KEY_P1_P3_UPDATE 0xf8082e //此值用于进入对讲版本升级 #define KEY_UP_DOWN_IP 0xac042a //OK+DOWN #define KEY_IDLE 0xfc042a 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 unsigned char g_iEncode; extern unsigned char PttKeyFlag; void KeyInit(void); int GetKey(void); int GetKeyVBAT(void); void KeyCount(void); void SoftPwrOffCheck(void); void OnOff_Init(void); void EncodeInit(); void EncodeKeyProcess(void); #endif