app.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. char tnet;
  31. }USER_STOR_INFO;
  32. typedef struct{
  33. unsigned char guiStatus:1;//gui�臬炏�嘥��硋���
  34. unsigned char pocInitStatus:1;//poc�臬炏�臬𢆡摰峕�
  35. unsigned char appStatus:1;//app�臬炏隡𤑳�
  36. unsigned char pocParaDone:2;//poc��㺭�臬炏璉�瘚见���
  37. unsigned char cardStatus:1;//
  38. unsigned char gtMode:1;//GT璅∪�
  39. unsigned char TbMode:1;//懦挴芵換
  40. unsigned char gtTMode:1;//TM璅∪�
  41. unsigned char PocGetTime:1;
  42. unsigned char pocPpp:1;
  43. unsigned char pwrLock:1;//�菜��臬炏���嚗�蘨�匧銁�菜��芷�摰𡁏𧒄嚗���箔��滚���
  44. unsigned char enableKey:1;//撱嗆𧒄�屸𢒰�臬炏摰峕�嚗𣬚鍂鈭𡡞獈甇W辣�嗆��渡�甇X��格�雿�
  45. unsigned char keyLock:1;//�桃��臬炏鋡恍�鈭�
  46. unsigned char lockShow:1;//�曄內銝�銝贝圾���蝷箔縑��
  47. unsigned char groupTTSEnable:1;//�嗅�86�臭誑�剜𦆮
  48. unsigned char earLev:1;
  49. unsigned char earPttReady:1;
  50. unsigned char lowPwrWarn:1;
  51. unsigned char lowPwrMsg:1;
  52. unsigned char forceUiFlash:1;//隡𤑳��埝䔉�荔�撘箏�UI�湔鰵銝�銝�
  53. unsigned char authReady:1;
  54. unsigned char lcdDlyLightUp:1;//LCD�日��𠬍��嘥��硋��滨�鈭�
  55. unsigned char reloginTts:1;
  56. unsigned char reloginStatus:1;
  57. unsigned char waitEscReleased:1;//餈𥕦��單㦤憿菟𢒰閬���𦠜𦆮�單㦤�桀�甈⊥�銝𧢲��賡���箏��粹睸
  58. unsigned char chargeStatus:1;
  59. unsigned char updateStatusBar:1;//�齿鰵�瑟鰵�嗆���
  60. unsigned char pttReq:1;//�臬炏�睲�霂琿漲��誘
  61. unsigned char voluemUpdate;
  62. unsigned int lowPwrCnt;
  63. unsigned char earCnt;
  64. unsigned char pcant;
  65. unsigned int appSleepStatus;//APP�臬炏�臭誑隡𤑳�
  66. int g_iCSQ;
  67. int g_iBAT;
  68. char fotaVersion[10];
  69. char pocVersion[50];
  70. unsigned char ICCID[20];
  71. unsigned char simSel;//�∠鍂��糓�芯葵:0,1
  72. char modemVer[30];
  73. unsigned char key_f1_cnt;
  74. unsigned char key_f2_cnt;
  75. int copstype;
  76. unsigned char volLev;
  77. USER_STOR_INFO UserInfo;
  78. unsigned short timeOutCnt;
  79. unsigned char fotaStatus;
  80. unsigned int mic_ana;
  81. unsigned int mic_adc;
  82. unsigned char serverDef;//�其�璉�瘚𧢲��∪膥鋡思耨�寡扇敶蓥蝙��
  83. unsigned char audioReconfig;
  84. //unsigned char Ble_Open; //0 帤 湖羲 1 湖羲帤蟀諉 2湖羲ブ眒冪蟀諉
  85. }APP_DEF;
  86. #pragma pack(pop)
  87. extern APP_DEF sutApp;
  88. void appRun(void);
  89. void dataInit(void);
  90. void keyCheck(unsigned short keyStatus);
  91. void threadSendEvent(LSAPI_OSI_Thread_t *threadID, unsigned int id, unsigned int param1,unsigned int param2,unsigned int param3);
  92. void usbCmdHandler(const char *data,unsigned int length);
  93. void subTask(void *param);
  94. void ttsPlay(ENCODE_USER_ENUM type, char *tts);
  95. void backLightReset(void);
  96. void backLightCb(void *param);
  97. void StrAsciiToHex(char *src, unsigned char *des);
  98. void lcdBackLightApi(char value);
  99. #define MIC_GAIN_NUM 7
  100. #define MIC_GAIN_DEFAULT 4
  101. #define SPK_GAIN_NUM 8
  102. #define SPK_GAIN_DEFAULT 4
  103. void VolSpkUpdate(void);
  104. #endif