app.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #ifndef __APP_H_
  2. #define __APP_H_
  3. #include "lsapi_os.h"
  4. #define APP_TASK_SLEEP_TIME 10
  5. #define APP_SUB_DIV_TIME (APP_TASK_SLEEP_TIME*2) //��𧒄�芣���
  6. typedef enum{
  7. ENCODE_USER_GBK=2,
  8. ENCODE_USER_UNICODE_BE=3,
  9. }ENCODE_USER_ENUM;
  10. typedef enum{
  11. ASLEEP_POC,//POC�臬炏隡𤑳�
  12. ASLEEP_ADC,//�喲��钅僼�臬炏敹�
  13. ASLEEP_KEY,//�桅�鐗EY�臬炏�臭誑隡𤑳�嚗峕��厰睸�臭誑隡𤑳�(��賒�劐�銝滢���)
  14. ASLEEP_MKEY,//�拚猐KEY
  15. ASLEEP_PWR,//�菜��臬炏�扯�鈭����
  16. ASLEEP_LCD,//LCD�臬炏隡𤑳�
  17. ASLEEP_GGROUP,//�其��瑕�蝢斤��𡑒”�嗡�閬����
  18. ASLEEP_GUSER,//�其��瑕��𣂼��𡑒”�嗡�閬����
  19. ASLEEP_GFRIEND,
  20. ASLEEP_LEADER,
  21. }ASLEEP_ENUM;
  22. #pragma pack(push)
  23. #pragma pack(1)
  24. typedef struct{
  25. unsigned int psn;
  26. unsigned char OtherId[16];
  27. unsigned char OtherPassWord[20];
  28. unsigned char platform[20];
  29. unsigned char pFormatMark[20];
  30. unsigned char Firm_CallID[9];
  31. char tnet;
  32. double Firm_lat;
  33. double Firm_log;
  34. unsigned char IP[20];
  35. unsigned short port;
  36. unsigned char LeaderEnable;
  37. }USER_STOR_INFO;
  38. typedef struct{
  39. unsigned char guiStatus;//gui�臬炏�嘥��硋���
  40. unsigned char pocInitStatus;//poc�臬炏�臬𢆡摰峕�
  41. unsigned char appStatus;//app�臬炏隡𤑳�
  42. unsigned char pocParaDone;//poc��㺭�臬炏璉�瘚见���
  43. unsigned char cardStatus;//
  44. unsigned char gtMode;//GT璅∪�
  45. unsigned char TbMode;//懦挴芵換
  46. unsigned char gtTMode;//TM璅∪�
  47. unsigned char PocGetTime;
  48. unsigned char pocPpp;
  49. unsigned char pwrLock;//�菜��臬炏���嚗�蘨�匧銁�菜��芷�摰𡁏𧒄嚗���箔��滚���
  50. unsigned char enableKey;//撱嗆𧒄�屸𢒰�臬炏摰峕�嚗𣬚鍂鈭𡡞獈甇W辣�嗆��渡�甇X��格�雿�
  51. unsigned char keyLock;//�桃��臬炏鋡恍�鈭�
  52. unsigned char lockShow;//�曄內銝�銝贝圾���蝷箔縑��
  53. unsigned char groupTTSEnable;//�嗅�86�臭誑�剜𦆮
  54. unsigned char earLev;
  55. unsigned char earPttReady;
  56. unsigned char lowPwrWarn;
  57. unsigned char lowPwrMsg;
  58. unsigned char forceUiFlash;//隡𤑳��埝䔉�荔�撘箏�UI�湔鰵銝�銝�
  59. unsigned char authReady;
  60. unsigned char lcdDlyLightUp;//LCD�日��𠬍��嘥��硋��滨�鈭�
  61. unsigned char reloginTts;
  62. unsigned char reloginStatus;
  63. unsigned char waitEscReleased;//餈𥕦��單㦤憿菟𢒰閬���𦠜𦆮�單㦤�桀�甈⊥�銝𧢲��賡���箏��粹睸
  64. unsigned char chargeStatus;
  65. unsigned char updateStatusBar;//�齿鰵�瑟鰵�嗆���
  66. unsigned char pttReq;//�臬炏�睲�霂琿漲��誘
  67. unsigned int lowPwrCnt;
  68. unsigned char voluemUpdate;
  69. unsigned char earCnt;
  70. unsigned char pcant;
  71. unsigned int appSleepStatus;//APP�臬炏�臭誑隡𤑳�
  72. int g_iCSQ;
  73. int g_iBAT;
  74. char fotaVersion[10];
  75. char pocVersion[50];
  76. unsigned char ICCID[20];
  77. unsigned char simSel;//�∠鍂��糓�芯葵:0,1
  78. char modemVer[30];
  79. unsigned char key_f1_cnt;
  80. unsigned char key_f2_cnt;
  81. int copstype;
  82. unsigned char volLev;
  83. USER_STOR_INFO UserInfo;
  84. unsigned short timeOutCnt;
  85. unsigned char fotaStatus;
  86. unsigned int mic_ana;
  87. unsigned int mic_adc;
  88. unsigned char serverDef;//�其�璉�瘚𧢲��∪膥鋡思耨�寡扇敶蓥蝙��
  89. unsigned char audioReconfig;
  90. unsigned char ringlink;
  91. unsigned char Restart;//頝喳枂�坔噡璅∪�
  92. //unsigned char Ble_Open; //0 帤 湖羲 1 湖羲帤蟀諉 2湖羲ブ眒冪蟀諉
  93. }APP_DEF;
  94. #pragma pack(pop)
  95. extern APP_DEF sutApp;
  96. extern unsigned char have_encode;
  97. void appRun(void);
  98. void dataInit(void);
  99. void keyCheck(unsigned short keyStatus);
  100. void threadSendEvent(LSAPI_OSI_Thread_t *threadID, unsigned int id, unsigned int param1,unsigned int param2,unsigned int param3);
  101. void usbCmdHandler(const char *data,unsigned int length);
  102. void subTask(void *param);
  103. void ttsPlay(ENCODE_USER_ENUM type, char *tts);
  104. void backLightReset(void);
  105. void backLightCb(void *param);
  106. void StrAsciiToHex(char *src, unsigned char *des);
  107. void lcdBackLightApi(char value);
  108. void clearKeyNum(void);
  109. #define MIC_GAIN_NUM 3
  110. #define MIC_GAIN_DEFAULT 4
  111. #define SPK_GAIN_NUM 8
  112. #define SPK_GAIN_DEFAULT 4
  113. void VolSpkUpdate(void);
  114. #endif