123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- #ifndef __APP_H__
- #define __APP_H__
- #include "board.h"
- #include "nwy_osi_api.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
- }ENCODE_USER_ENUM;
- typedef enum{
- ASLEEP_POC,
- ASLEEP_ADC,
- ASLEEP_KEY,
- ASLEEP_MKEY,
- ASLEEP_PWR,
- ASLEEP_LCD,
- ASLEEP_GGROUP,
- ASLEEP_GUSER,
- ASLEEP_LEARN,
- ASLEEP_PWRKEY,
- }ASLEEP_ENUM;
- #define VOICE_ITEM_NUM 3
- #pragma pack(push)
- #pragma pack(1)
- typedef struct{
- unsigned int psn;
- char password[30];
- }ACCOUNT_DEF;
- typedef struct{
- unsigned char index;
- char info[30];
- }VOICE_INFO_DEF;
- typedef struct{
- unsigned char update;
- unsigned char voiceStatus;
- unsigned char aNum;
- unsigned char vNum;
- unsigned char voiceValidNum;
- VOICE_INFO_DEF info[VOICE_ITEM_NUM];
- }VOICE_DEF;
- typedef struct{
- unsigned char guiStatus:1;
- unsigned char pocInitStatus:1;
- unsigned char appStatus:1;
- unsigned char pocParaDone:1;
- unsigned char cardStatus:1;
- unsigned char gtMode:1;
- unsigned char gtTMode:1;
- unsigned char pocPpp:1;
- unsigned char pwrLock:1;
- unsigned char enableKey:1;
- unsigned char keyLock:1;
- unsigned char lockShow:1;
- unsigned char groupTTSEnable:1;
- unsigned char skipTTS:1;
- unsigned char earStatus:1;
- unsigned char authReady:1;
- unsigned char pwrKeyStatus:1;
- unsigned char activePwrShut:1;
- unsigned char antMode:1;
- unsigned int appSleepStatus;
- ACCOUNT_DEF account;
- int g_iCSQ;
- int g_iBAT;
- char fotaVersion[10];
- char pocVersion[10];
- unsigned char simSel;
- char modemVer[30];
- unsigned char pcant;
- unsigned char lcdReconfigCnt;
- VOICE_DEF voiceInfo;
- unsigned char fotaStatus;
- }APP_DEF;
- #pragma pack(pop)
- extern APP_DEF sutApp;
- extern nwy_osiThread_t *mainThreadPtr;
- extern int keyNum;
- char isKeyPress(void);
- void dataInit(void);
- void appRun(void);
- void usbCmdHandler(const char *data,uint32 length);
- void keyHandler(unsigned short key,unsigned char status);
- void hpDetStatusChanged(unsigned char hpStatus);
- void subTask(void *param);
- void threadSendEvent(nwy_osiThread_t *threadID, uint32 id, uint32 param1,uint32 param2,uint32 param3);
- void tryWakeupApp(void);
- void keyStatusCtlAll(char high_low);
- void keyCheck(unsigned short);
- void mKeyCheck(void);
- unsigned short getKeyValue(void);
- void ttsPlay(ENCODE_USER_ENUM type, char *tts);
- void backLightCb(void *param);
- void StrAsciiToHex(char *src, unsigned char *des);
- void appSleepCtl(ASLEEP_ENUM ctlType, char status);
- char getAppObjStatus(ASLEEP_ENUM ctlType);
- void volAdjAction(char direction);
- void splVolumeSet(unsigned char level);
- #endif
|