app.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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=1,
  8. ENCODE_USER_UNICODE_BE=2,
  9. ENCODE_USER_ASCII=3,
  10. }ENCODE_USER_ENUM;
  11. typedef enum{
  12. ASLEEP_POC,//POC�臬炏隡𤑳�
  13. ASLEEP_ADC,//�喲��钅僼�臬炏敹?
  14. ASLEEP_KEY,//�桅�鐗EY�臬炏�臭誑隡𤑳�嚗峕��厰睸�臭誑隡𤑳�(��賒�劐�銝滢��?
  15. ASLEEP_MKEY,//�拚猐KEY
  16. ASLEEP_PWR,//�菜��臬炏�扯�鈭���?
  17. ASLEEP_LCD,//LCD�臬炏隡𤑳�
  18. ASLEEP_GGROUP,//�其��瑕�蝢斤��𡑒”�嗡�閬���?
  19. ASLEEP_GUSER,//�其��瑕��𣂼��𡑒”�嗡�閬���?
  20. }ASLEEP_ENUM;
  21. #pragma pack(push)
  22. #pragma pack(1)
  23. typedef struct{
  24. char psn[20];
  25. unsigned char OtherId[16];
  26. unsigned char OtherPassWord[20];
  27. unsigned char platform[20];
  28. unsigned char pFormatMark[20];
  29. unsigned char tnet;
  30. }USER_STOR_INFO;
  31. typedef struct{
  32. unsigned char guiStatus:1;//gui�臬炏�嘥��硋��?
  33. unsigned char pocInitStatus:1;//poc�臬炏�臬𢆡摰峕�
  34. unsigned char appStatus:1;//app�臬炏隡𤑳�
  35. unsigned char pocParaDone:1;//poc��㺭�臬炏璉�瘚见��?
  36. unsigned char bndPocDone:1;//痔馨肅場宎趙俇傖
  37. unsigned char cardStatus:1;//
  38. unsigned char Get_MicLv:1;
  39. unsigned char gtMode:1;//GT璅∪�
  40. unsigned char gtTMode:1;//TM璅∪�
  41. unsigned char pocPpp:1;
  42. unsigned char pwrLock:1;//�菜��臬炏���嚗�蘨�匧銁�菜��芷�摰𡁏𧒄嚗���箔��滚��?
  43. unsigned char enableKey:1;//撱嗆𧒄�屸𢒰�臬炏摰峕�嚗𣬚鍂鈭𡡞獈甇W辣�嗆��渡�甇X��格�雿?
  44. unsigned char keyLock:1;//�桃��臬炏鋡恍�鈭?
  45. unsigned char lockShow:1;//�曄內銝�銝贝圾���蝷箔縑�?
  46. unsigned char groupTTSEnable:1;//�嗅�86�臭誑�剜𦆮
  47. unsigned char startPoc:1;
  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 int lowPwrCnt;
  56. unsigned char earCnt;
  57. unsigned char pcant;
  58. unsigned int appSleepStatus;//APP�臬炏�臭誑隡𤑳�
  59. USER_STOR_INFO UserInfo;
  60. int g_iCSQ;
  61. int g_iBAT;
  62. char fotaVersion[10];
  63. char pocVersion[20];
  64. unsigned char simSel;//�∠鍂��糓�芯葵:0,1
  65. char modemVer[30];
  66. unsigned char key_f1_cnt;
  67. unsigned char key_f2_cnt;
  68. int copstype;
  69. // unsigned char VolMicLvCu;
  70. // unsigned char VolMicLvXi;
  71. unsigned char ICCID[21];
  72. unsigned short VailDay;
  73. unsigned char voluemUpdate;
  74. unsigned char LightStatus;
  75. unsigned char MenuToStandby; //粕等殿隙渾儂賜醱
  76. }APP_DEF;
  77. #pragma pack(pop)
  78. extern APP_DEF sutApp;
  79. void appRun(void);
  80. void dataInit(void);
  81. void keyCheck(unsigned short keyStatus);
  82. void threadSendEvent(LSAPI_OSI_Thread_t *threadID, unsigned int id, unsigned int param1,unsigned int param2,unsigned int param3);
  83. void usbCmdHandler(const char *data,unsigned int length);
  84. void subTask(void *param);
  85. void ttsPlay(ENCODE_USER_ENUM type, char *tts);
  86. void backLightReset(void);
  87. void backLightCb(void *param);
  88. void StrAsciiToHex(char *src, unsigned char *des);
  89. #endif