123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #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=1,
- ENCODE_USER_UNICODE_BE=2,
- ENCODE_USER_ASCII=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_ENUM;
- #pragma pack(push)
- #pragma pack(1)
- //typedef struct{
- // unsigned int psn;
- // char password[30];
- // unsigned char tnet;//4 显示4G,5 显示5G
- //}ACCOUNT_DEF;
- typedef struct{
- char psn[20];
- unsigned char OtherId[16];
- unsigned char OtherPassWord[20];
- unsigned char platform[20];
- unsigned char pFormatMark[20];
- unsigned char tnet;
- }USER_STOR_INFO;
- typedef struct{
- unsigned char guiStatus:1;//gui是否初始化完成
- unsigned char pocInitStatus:1;//poc是否启动完成
- unsigned char appStatus:1;//app是否休眠
- unsigned char pocParaDone:2;//poc参数是否检测完成
- unsigned char cardStatus:1;//
- unsigned char gtMode:1;//GT模式
- unsigned char gtTMode:1;//TM模式
- unsigned char pocPpp:1;
- unsigned char pwrLock:1;//电源是否锁定,只有在电源未锁定时,开机了才关机
- unsigned char enableKey:1;//延时界面是否完成,用于阻止延时期间禁止按键操作
- unsigned char keyLock:1;//键盘是否被锁了
- unsigned char lockShow:1;//显示一下解锁提示信息
- unsigned char groupTTSEnable:1;//收到86可以播放
- unsigned char earLev:1;
- unsigned char earPttReady:1;
- unsigned char lowPwrWarn:1;
- unsigned char lowPwrMsg:1;
- unsigned char forceUiFlash:1;//休眠醒来是,强制UI更新一下
- unsigned char authReady:1;
- unsigned char lcdDlyLightUp:1;//LCD唤醒后,初始化完再点亮
- unsigned char reloginTts:1;
- unsigned char reloginStatus:1;
- unsigned char waitEscReleased:1;//进入关机页面要等释放关机键再次按下才能退出关机键
- unsigned char chargeStatus:1;
- unsigned char updateStatusBar:1;//重新刷新状态栏
- unsigned char pttReq:1;//是否发了请麦指令
- unsigned char voluemUpdate;
- unsigned int lowPwrCnt;
- unsigned char earCnt;
- unsigned char pcant;
- unsigned int appSleepStatus;//APP是否可以休眠
- USER_STOR_INFO UserInfo;
- //ACCOUNT_DEF account;
- int g_iCSQ;
- int g_iBAT;
- char fotaVersion[10];
- char pocVersion[10];
- unsigned char simSel;//卡用的是哪个:0,1
- char modemVer[30];
- unsigned char key_f1_cnt;
- unsigned char key_f2_cnt;
- int copstype;
- unsigned char volLev;
- unsigned short timeOutCnt;
- unsigned char fotaStatus;
- unsigned int mic_ana;
- unsigned int mic_adc;
- unsigned char startPoc;
- }APP_DEF;
- #pragma pack(pop)
- extern APP_DEF sutApp;
- 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);
- #define MIC_GAIN_NUM 7
- #define MIC_GAIN_DEFAULT 4
- #define SPK_GAIN_NUM 8
- #define SPK_GAIN_DEFAULT 4
- void VolSpkUpdate(void);
- #endif
|