#ifndef __APP_H_ #define __APP_H_ #include "lsapi_os.h" #define APP_TASK_SLEEP_TIME 10 #define APP_SUB_DIV_TIME (APP_TASK_SLEEP_TIME*2) //暂时未明白 typedef enum{ ENCODE_USER_GBK=2, ENCODE_USER_UNICODE_BE=3, }ENCODE_USER_ENUM; typedef enum{ ASLEEP_POC,//POC是否休眠 ASLEEP_ADC,//音量旋钮是否忙 ASLEEP_KEY,//普通KEY是否可以休眠,无按键可以休眠(持续按下不休眠) ASLEEP_MKEY,//矩阵KEY ASLEEP_PWR,//电源是否执行了关闭 ASLEEP_LCD,//LCD是否休眠 ASLEEP_GGROUP,//用于获取群组列表时不要休眠 ASLEEP_GUSER,//用于获取成员列表时不要休眠 ASLEEP_GFRIEND, ASLEEP_LEADER, }ASLEEP_ENUM; #pragma pack(push) #pragma pack(1) typedef struct{ unsigned int psn; unsigned char OtherId[16]; unsigned char OtherPassWord[20]; unsigned char platform[20]; unsigned char pFormatMark[20]; unsigned char Firm_CallID[9]; char tnet; double Firm_lat; double Firm_log; unsigned char IP[20]; unsigned short port; unsigned char LeaderEnable; }USER_STOR_INFO; typedef struct{ unsigned char guiStatus;//gui是否初始化完成 unsigned char pocInitStatus;//poc是否启动完成 unsigned char appStatus;//app是否休眠 unsigned char pocParaDone;//poc参数是否检测完成 unsigned char cardStatus;// unsigned char gtMode;//GT模式 unsigned char TbMode;//͸ unsigned char gtTMode;//TM模式 unsigned char PocGetTime; unsigned char pocPpp; unsigned char pwrLock;//电源是否锁定,只有在电源未锁定时,开机了才关机 unsigned char enableKey;//延时界面是否完成,用于阻止延时期间禁止按键操作 unsigned char keyLock;//键盘是否被锁了 unsigned char lockShow;//显示一下解锁提示信息 unsigned char groupTTSEnable;//收到86可以播放 unsigned char earLev; unsigned char earPttReady; unsigned char lowPwrWarn; unsigned char lowPwrMsg; unsigned char forceUiFlash;//休眠醒来是,强制UI更新一下 unsigned char authReady; unsigned char lcdDlyLightUp;//LCD唤醒后,初始化完再点亮 unsigned char reloginTts; unsigned char reloginStatus; unsigned char waitEscReleased;//进入关机页面要等释放关机键再次按下才能退出关机键 unsigned char chargeStatus; unsigned char updateStatusBar;//重新刷新状态栏 unsigned char pttReq;//是否发了请麦指令 unsigned int lowPwrCnt; unsigned char voluemUpdate; unsigned char earCnt; unsigned char pcant; unsigned int appSleepStatus;//APP是否可以休眠 int g_iCSQ; int g_iBAT; char fotaVersion[10]; char pocVersion[50]; unsigned char ICCID[20]; unsigned char simSel;//卡用的是哪个:0,1 char modemVer[30]; unsigned char key_f1_cnt; unsigned char key_f2_cnt; int copstype; unsigned char volLev; USER_STOR_INFO UserInfo; unsigned short timeOutCnt; unsigned char fotaStatus; unsigned int mic_ana; unsigned int mic_adc; unsigned char serverDef;//用于检测服务器被修改记录使用 unsigned char audioReconfig; unsigned char ringlink; unsigned char Restart;//跳出写号模式 //unsigned char Ble_Open; //0 δ 1 δ 2Ѿ }APP_DEF; #pragma pack(pop) extern APP_DEF sutApp; extern unsigned char have_encode; void appRun(void); void dataInit(void); void keyCheck(unsigned short keyStatus); void threadSendEvent(LSAPI_OSI_Thread_t *threadID, unsigned int id, unsigned int param1,unsigned int param2,unsigned int param3); void usbCmdHandler(const char *data,unsigned int length); void subTask(void *param); void ttsPlay(ENCODE_USER_ENUM type, char *tts); void backLightReset(void); void backLightCb(void *param); void StrAsciiToHex(char *src, unsigned char *des); void lcdBackLightApi(char value); void clearKeyNum(void); #define MIC_GAIN_NUM 3 #define MIC_GAIN_DEFAULT 4 #define SPK_GAIN_NUM 8 #define SPK_GAIN_DEFAULT 4 void VolSpkUpdate(void); #endif