ProductPara.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /********************************************************************************
  2. * File Name: ProductPara.h
  3. * Function Describe: Header file for ProductPara.c
  4. * Explain:
  5. * Writer: ShiLiangWen
  6. * Date: 2015-7-6
  7. *******************************************************************************/
  8. #ifndef __PRODUCT_PARA_H
  9. #define __PRODUCT_PARA_H
  10. /*=============================================================================*/
  11. #include "PocTask.h"
  12. //IAP相关
  13. #define STM32_FLASH_SIZE 128 //所选STM32的FLASH容量大小(单位为K)
  14. #define STM32_RAM_SIZE 64
  15. #define STM32_FLASH_BASE 0x08000000 //STM32 FLASH的起始地址
  16. #define MCU_FLAG 192 // //MCU标志 128+64
  17. #define MAIN_CONFIG_ADDR (STM32_FLASH_BASE+126*1024) //第126,127k
  18. #define BACKUP_CONFIG_ADDR (STM32_FLASH_BASE+124*1024) //第124,125k
  19. //#define MODEM_TYPE MODEM_TYPE_M9507C
  20. #define PRODUCT_VERSION 175
  21. #define INTER_VER 0
  22. //产品相关
  23. #define PRODUCT_NAME "T640" //产品型号名,字符串长度不能大于13个字符 CDMA 修改会清除参数
  24. //调试信息打印
  25. #define SLW_DEBUG
  26. //服务器相关 默认
  27. #define POC_SERVER_IP "0.0.0.0"//"183.131.13.10"
  28. #define POC_SERVER_PORT 1390
  29. #define GPS_SERVER_IP "0.0.0.0" //"183.131.13.6" //Higos Gps server 100.64.106.86
  30. #define TSGPS_SERVER_PORT 1395 //部标服务端口GPS_SERVER_PORT
  31. //VPN
  32. #define APN_APN "ctnet"
  33. #define APN_NAME "card"
  34. #define APN_PASSWORD "card"
  35. /***************M20**********************/
  36. #define LANGUAGE "cn"
  37. #define LOCAL "lcn"
  38. #define NET_MODE "4G"
  39. #define KEY_SOUND "open"
  40. #define MODECHANNEL "3225"
  41. #define DEFAULT_GPS_SEND_TIME_INDEX 4 //default GPS send time
  42. #define APN_LEN 30
  43. #define RECORD_INFO_ADDRESS 0x380000
  44. //----------------------------------------------------------
  45. typedef struct
  46. {
  47. unsigned char McuFlag; //MCU标识 101 --STM32F101CB
  48. unsigned char IapFlag; //IAP标志 0x55--需要空中升级; 0x88--正常运行应用程序 ; 其他---无应用程序
  49. unsigned char takeNoteFlag;//0 不记录保存参数信息 1 记录
  50. char ProductName[14];//项目名
  51. unsigned short ProductVersion; //版本号
  52. unsigned short PocPort; //POC Port
  53. unsigned short GpsPort; //GPS Port
  54. unsigned long PSN; //产品序列号
  55. char PIP[40]; //POC IP
  56. char GIP[40]; //GPS IP
  57. char APNApn[APN_LEN+1];
  58. char APNName[APN_LEN+1]; //APN
  59. char APNPass[APN_LEN+1]; //APN Password
  60. unsigned short m_GPS_TimeIndex;
  61. unsigned char APNIndex;
  62. unsigned char g_net;
  63. char HARDID[16];
  64. char ApnAuthType; //认证类型
  65. /******************M20新参数*******************/
  66. unsigned char Net_Mode[3];//3G-4G
  67. unsigned char Language[3];//CN EN
  68. unsigned char Channel[32];
  69. unsigned char Local[10]; //CN EN
  70. unsigned char SendToneEnadble;//s是否激活PTT提示音 0 1 //发送提示音
  71. unsigned char PromptToneEnable; //是否激活信息语音提示
  72. char IMEI[16]; //目前用来存账号
  73. unsigned char Keysound[6];
  74. unsigned char FastInterface;
  75. unsigned char Aw8735;
  76. unsigned char Netmode;
  77. unsigned char LowConsumption;
  78. unsigned char RecvToneEnadble;//接收提示音
  79. unsigned char LCDSetIndex;
  80. signed char VbatCalibration;
  81. //unsigned char dummy;//用来确定是偶数用的
  82. }__attribute__ ((packed)) SUT_PRODUCT_PARA;
  83. extern SUT_PRODUCT_PARA sutProductPara;
  84. extern unsigned char HardRevision[25];
  85. void ReadProductParaFromFlash(void);
  86. void SaveProductParaToFlash(char *recoreInfo);
  87. void GpsTimeUpdate(void);
  88. /*=============================================================================*/
  89. #endif
  90. /************************************file begin*******************************/