MainTask.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /********************************************************************************
  2. * File Name: MainTask.h
  3. * Function Describe: Header file for MainTask.c
  4. * Explain:
  5. * Writer: ShiLiangWen
  6. * Date: 2015-1-30
  7. #define PC_Q_NUM 5
  8. #define PC_MSG_BUF_LEN 300
  9. extern unsigned char PcMsgBuf[PC_Q_NUM][PC_MSG_BUF_LEN];
  10. extern int GpsMsgBufIndex;
  11. extern OS_EVENT *GpsQ;
  12. *******************************************************************************/
  13. #ifndef __MAIN_TASK_H
  14. #define __MAIN_TASK_H
  15. /************************************file begin*******************************/
  16. #include <rtl.h>
  17. #include "MsgQueue.h"
  18. //#define CMD_SEND_TEST 0x5A
  19. //#define CMD_SEND_SETUP 0x6B
  20. //#define CMD_NETSTATUS 0x7C
  21. //#define CMD_SAVE_SETUP 0x8D
  22. //#define CMD_SAVE_CTRL 0x9E
  23. #define USE_RUNNING_MAKE
  24. #ifdef USE_RUNNING_MAKE
  25. void RunningMake(unsigned short FileID, unsigned long line);
  26. #define RunMake(FileID) RunningMake(FileID, __LINE__)
  27. #else
  28. #define RunMake(FileID) (void)0
  29. #endif
  30. extern unsigned short g_usFileID;
  31. extern unsigned long g_ulFileLine;
  32. extern unsigned char g_ucUart1Activated;//判断串口1是否有数据进来,用于控制指示灯
  33. #define MAIN_TASK_STK_SIZE 150
  34. extern OS_TID idMainTask;
  35. extern U64 stkMainTask[MAIN_TASK_STK_SIZE];
  36. extern U32 g_ulSysTick;
  37. extern short g_sVbat;
  38. //extern SUT_MSG_QUEUE PcMsgQueue;
  39. void UC2UL(unsigned char *pUC,unsigned long *pUL);
  40. void UL2UC(unsigned long UL, unsigned char *pUC);
  41. void SysParaInit(void);
  42. void SystemReboot(void);
  43. void SysShutDown(void);
  44. int GetParaFromStr(char *Str,char *Para,char *Value);
  45. unsigned long ReadPsnFromFlash(void);
  46. void SavePsnToFlash(unsigned long PSN);
  47. void SaveParaToFlash(void);
  48. void ReadParaFromFlash(void);
  49. void IWDG_Configuration(void);
  50. void AscStrToHexStr(char *AscStr, char *HexStr);
  51. void EnterGTMode(void);
  52. __task void MainTask(void);
  53. /************************************file end ******************************************/
  54. #endif