123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #ifndef __APP_H_
- #define __APP_H_
- #include "lsapi_os.h"
- #include "lsapi_network.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,//鏅�€欿EY鏄�惁鍙�互浼戠湢锛屾棤鎸夐敭鍙�互浼戠湢(鎸佺画鎸変笅涓嶄紤鐪?
- 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];
- char tnet;
- }ACCOUNT_DEF;
- typedef struct{
- unsigned char guiStatus:1;//gui鏄�惁鍒濆�鍖栧畬鎴?
- unsigned char pocInitStatus:1;//poc鏄�惁鍚�姩瀹屾垚
- unsigned char appStatus:1;//app鏄�惁浼戠湢
- unsigned char pocParaDone:1;//poc鍙傛暟鏄�惁妫€娴嬪畬鎴?
- unsigned char bndPocDone:1;//博纳德初始化完成
- 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 int lowPwrCnt;
- unsigned char earCnt;
- unsigned char pcant;
- unsigned int appSleepStatus;//APP鏄�惁鍙�互浼戠湢
- 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_f2_cnt;
- int copstype;
- unsigned char volLev;
- unsigned char ICCID[21];
- unsigned short VailDay;
- unsigned char voluemUpdate;
- unsigned short timeOutCnt;//UI 超时返回
- unsigned char RegNetOK;// 鍗″凡娉ㄥ唽
- unsigned char weather[150];
- unsigned char platfrom_err;
- unsigned char apnCopyDone;
- }APP_DEF;
- #pragma pack(pop)
- extern APP_DEF sutApp;
- #define max_neighbor_cellbun 6
- extern LSAPI_CellLocation_t nCellInfo[max_neighbor_cellbun];
- 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);
- #endif
|