app.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 cardStatus:1;//
  37. unsigned char Get_MicLv:1;
  38. unsigned char gtMode:1;//GT璅∪�
  39. unsigned char gtTMode:1;//TM璅∪�
  40. unsigned char pocPpp:1;
  41. unsigned char pwrLock:1;//�菜��臬炏���嚗�蘨�匧銁�菜��芷�摰𡁏𧒄嚗���箔��滚��?
  42. unsigned char enableKey:1;//撱嗆𧒄�屸𢒰�臬炏摰峕�嚗𣬚鍂鈭𡡞獈甇W辣�嗆��渡�甇X��格�雿?
  43. unsigned char keyLock:1;//�桃��臬炏鋡恍�鈭?
  44. unsigned char lockShow:1;//�曄內銝�銝贝圾���蝷箔縑�?
  45. unsigned char groupTTSEnable:1;//�嗅�86�臭誑�剜𦆮
  46. unsigned char startPoc:1;
  47. unsigned char earLev:1;
  48. unsigned char earPttReady:1;
  49. unsigned char lowPwrWarn:1;
  50. unsigned char lowPwrMsg:1;
  51. unsigned char forceUiFlash:1;//隡𤑳��埝䔉�荔�撘箏�UI�湔鰵銝�銝?
  52. unsigned char authReady:1;
  53. unsigned char lcdDlyLightUp:1;//LCD�日��𠬍��嘥��硋��滨�鈭?
  54. unsigned int lowPwrCnt;
  55. unsigned char earCnt;
  56. unsigned char pcant;
  57. unsigned int appSleepStatus;//APP�臬炏�臭誑隡𤑳�
  58. USER_STOR_INFO UserInfo;
  59. int g_iCSQ;
  60. int g_iBAT;
  61. char fotaVersion[10];
  62. char pocVersion[20];
  63. unsigned char simSel;//�∠鍂��糓�芯葵:0,1
  64. char modemVer[30];
  65. unsigned char key_f1_cnt;
  66. unsigned char key_f2_cnt;
  67. int copstype;
  68. // unsigned char VolMicLvCu;
  69. // unsigned char VolMicLvXi;
  70. unsigned char ICCID[21];
  71. unsigned short VailDay;
  72. unsigned char voluemUpdate;
  73. unsigned char LightStatus;
  74. unsigned char MenuToStandby; //粕等殿隙渾儂賜醱
  75. }APP_DEF;
  76. #pragma pack(pop)
  77. extern APP_DEF sutApp;
  78. void appRun(void);
  79. void dataInit(void);
  80. void keyCheck(unsigned short keyStatus);
  81. void threadSendEvent(LSAPI_OSI_Thread_t *threadID, unsigned int id, unsigned int param1,unsigned int param2,unsigned int param3);
  82. void usbCmdHandler(const char *data,unsigned int length);
  83. void subTask(void *param);
  84. void ttsPlay(ENCODE_USER_ENUM type, char *tts);
  85. void backLightReset(void);
  86. void backLightCb(void *param);
  87. void StrAsciiToHex(char *src, unsigned char *des);
  88. #endif