123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #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,//�桅�鐗EY�臬炏�臭誑隡𤑳�嚗峕��厰睸�臭誑隡𤑳�(��賒�劐�銝滢���)
- 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;//撱嗆𧒄�屸𢒰�臬炏摰峕�嚗𣬚鍂鈭𡡞獈甇W辣�嗆��渡�甇X��格�雿�
- 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
|