[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/cp/ps/modem/tools/inc/AudioExport.h b/cp/ps/modem/tools/inc/AudioExport.h
new file mode 100644
index 0000000..efc9e0f
--- /dev/null
+++ b/cp/ps/modem/tools/inc/AudioExport.h
@@ -0,0 +1,105 @@
+/**

+ * 

+ * @file      AudioExport.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßÒôƵÊý¾Ýµ¼³öÄ£¿é½Ó¿Ú¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2016/12/13  1.0      hou.bing       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef AUDIO_EXPORT_H

+#define AUDIO_EXPORT_H

+

+typedef struct

+{

+	UINT32 rxIn_Addr;

+	UINT32 rxOut_Addr;

+	UINT32 txIn_Addr;

+	UINT32 txOut_Addr;

+	UINT32 rxIn_Len;

+	UINT32 rxOut_Len;

+	UINT32 txIn_Len;

+	UINT32 txOut_Len;

+}T_ZCAT_AUDIO_MEM_PARAM;

+

+

+typedef enum

+{

+    ZCAT_AUDIO_PS_BASE   = 0,

+    ZCAT_AUDIO_PS_DL     = 1,

+    ZCAT_AUDIO_PS_UL     = 2,

+    ZCAT_AUDIO_PS_SYNC   = 3,

+    ZCAT_AUDIO_PS_TMP    = 4,

+    ZCAT_AUDIO_PS_END    = 10,

+    

+    ZCAT_AUDOI_DRV_BASE  = 10,

+    ZCAT_AUDIO_DRV_RXIN  = 11,

+    ZCAT_AUDIO_DRV_RXOUT = 12,

+    ZCAT_AUDIO_DRV_TXIN  = 13,

+    ZCAT_AUDIO_DRV_TXOUT = 14,

+    ZCAT_AUDIO_DRV_END   = 20

+

+} T_ZCAT_AUDIO_MEM_TYPE;

+

+

+/**

+ * @brief ÒôƵÊý¾Ýµ¼³ö´¦Àíº¯Êý

+ * @param[in] buf »º´æÖ¸Õë

+ * @param[in] buf »º´æ³¤¶È

+ * @return void

+ * @note

+ * @see 

+ */

+VOID zCatAgt_Audio_Export_ProcessMsg(VOID *buf, UINT32 len);

+

+/**

+ * @brief ÒôƵÊý¾Ýµ¼³ö×¢²áº¯Êý

+ * @param[in] type ÀàÐÍ

+ * @param[in] size ´óС

+ * @param[in] addr µØÖ·

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ·ñÔò·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 zCatAgt_Audio_Reg(UINT32 type, UINT32 size, UINT32 addr);

+

+/**

+ * @brief ÒôƵÊý¾Ýµ¼³ö³õʼ»¯

+ * @param[in] void

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ·ñÔò·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 zCatAgt_Audio_Export_Init(VOID);

+

+/**

+ * @brief ÉèÖÃÒôƵÎļþ²ÎÊý \n

+          ÔÚÔ­Óй̶¨µÄÒôƵÎļþµØÖ·»ù´¡ÉÏÐ޸ģ¬Ö§³Ö¶¯Ì¬ÉêÇëµÄÒôƵÎļþµØÖ·

+ * @param[in] ptParam ÒôƵÎļþ²ÎÊý

+ * @return void

+ * @note

+ * @see 

+ */

+VOID zCatAgt_SetAudioFileInfo(T_ZCAT_AUDIO_MEM_PARAM* ptParam);

+

+#endif

diff --git a/cp/ps/modem/tools/inc/CpTrace.h b/cp/ps/modem/tools/inc/CpTrace.h
new file mode 100644
index 0000000..fd65c8e
--- /dev/null
+++ b/cp/ps/modem/tools/inc/CpTrace.h
@@ -0,0 +1,124 @@
+/**

+ * 

+ * @file      CpTrace.h

+ * @brief     

+ *            This file is part of tools.

+ *            ZCAT¹¤¾ßCp²àlog¸ú×Ù½Ó¿Ú

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/14  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef CPTRACE_H_

+#define CPTRACE_H_

+

+// PSÒì³£´òÓ¡¼¶±ð

+#define PS_EXCEPTION_LEVEL_NORMAL (0x01)    /* Ò»°ã¼¶±ð */

+#define PS_EXCEPTION_LEVEL_SEVERE (0x02)    /* ÑÏÖØ¼¶±ð */

+#define PS_EXCEPTION_LEVEL_DEBUG  (0x04)    /* µ÷ÊÔ¼¶±ð */

+

+#define TRACE_ERR_LEVEL_NORMAL    PS_EXCEPTION_LEVEL_NORMAL

+#define TRACE_ERR_LEVEL_SEVERE    PS_EXCEPTION_LEVEL_SEVERE

+#define TRACE_ERR_LEVEL_DEBUG     PS_EXCEPTION_LEVEL_DEBUG

+

+typedef struct

+{

+    BYTE	      StackIndex; // 1:ЭÒéÕ»1, 2:ЭÒéÕ»

+    ZOSS_TASK_ID  Taskid;

+    BYTE          ModelId;  

+    DWORD         Errcode;

+    DWORD         RecvMsgId;

+    DWORD         SendMsgId;

+    BYTE          State ;	 

+    WORD          MsgLen;

+    char         *pMsgBuf;

+    BYTE          bErrLevel;

+} T_PsException_MsgHead;

+

+typedef struct

+{

+    BYTE	     StackIndex; // 1:ЭÒéÕ»1,2:ЭÒéÕ»

+    ZOSS_TASK_ID SrcTaskID;

+    ZOSS_TASK_ID DestTaskID;

+    BYTE         bSrcModID;

+    BYTE         bDestModID;

+    DWORD        MsgID;	

+    BYTE         Direct; // Ä£¿é¼äÏûÏ¢µÄ·½Ïò£¬0: ·¢ËÍ 1: ½ÓÊÕ  

+    WORD         MsgLen;

+    char        *pMsgBuf; 

+}T_PsModMsgInfoHead;

+

+/**

+ * @brief »ñÈ¡PSÒì³£ÏûÏ¢LOG¹ýÂ˹æÔò

+ * @return µ÷ÊÔ, ½ô¼±, Ò»°ã 

+ * @note

+ * @see 

+ */

+UINT8 zCatAgt_PsException_GetLevelFilter(VOID);

+

+/**

+ * @brief ÊÇ·ñ¸ú×ÙPSЭÒéÕ»Ô­ÓïLOG

+ * @return true zCAT¸ú×ÙЭÒéÕ»Ô­Óï          \n

+          false zCATδ¸ú×ÙЭÒéÕ»Ô­Óï(zCATδÁ¬½Ó»òÕßÒÑÁ¬½Óµ«Î´´ò¿ªÔ­Óï´°¿Ú)

+ * @note

+ * @see 

+ */

+BOOL zCatAgt_IsPsOrigTraced(VOID);

+

+/**

+ * @brief ÅжÏPSÒì³£ÏûÏ¢LOGÊÇ·ñ¸ú×Ù

+ * @return true  zCAT¸ú×ÙЭÒéÕ»Òì³£  

+ *        false  zCATδ¸ú×ÙЭÒéÕ»Òì³£(zCATδÁ¬½Ó»òÕßÒÑÁ¬½Óµ«Î´´ò¿ªÒì³£´°¿Ú)

+ * @note

+ * @see 

+ */

+BOOL zCatAgt_IsPsExpTraced(VOID);

+

+/**

+ * @brief ÅжÏPS±ê×¼ÐÅÁîLOGÊÇ·ñ¸ú×Ù

+ * @return true  zCAT¸ú×ÙЭÒéÕ»±ê×¼log  

+ *        false  zCATδ¸ú×ÙЭÒéÕ»±ê×¼log(zCATδÁ¬½Ó»òÕßÒÑÁ¬½Óµ«Î´´ò¿ª±ê×¼log´°¿Ú)

+ * @note

+ * @see 

+ */

+BOOL zCatAgt_IsPsSigTraced(VOID);

+

+/**

+ * @brief ÅжÏzCATÊÇ·ñ¸ú×Ùmodem´òÓ¡

+ * @return true  zCAT¸ú×Ùmodem´òÓ¡  

+ *        false  zCATδ¸ú×Ùmodem´òÓ¡(zCATδÁ¬½Ó»òÕßÒÑÁ¬½Óµ«Î´´ò¿ªmodem´òÓ¡´°¿Ú)

+ * @note

+ * @see 

+ */

+BOOL zCatAgt_IsModemPrintTraced(VOID);

+

+/**

+ * @brief ÅжÏzCATÊÇ·ñ¸ú×ÙGSMÎïÀí²ã´òÓ¡

+ * @return true  zCAT¸ú×ÙGSMÎïÀí²ã´òÓ¡  

+ *        false  zCATδ¸ú×ÙGSMÎïÀí²ã´òÓ¡(zCATδÁ¬½Ó»òÕßÒÑÁ¬½Óµ«Î´´ò¿ªGSMÎïÀí²ã´òÓ¡´°¿Ú)

+ * @note

+ * @see 

+ */

+BOOL zCatAgt_IsGsmPrintTraced(VOID);

+

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/StdLogMsgID.h b/cp/ps/modem/tools/inc/StdLogMsgID.h
new file mode 100644
index 0000000..5666cd2
--- /dev/null
+++ b/cp/ps/modem/tools/inc/StdLogMsgID.h
@@ -0,0 +1,407 @@
+/**

+ * 

+ * @file      StdLogMsgID.h

+ * @brief     

+ *            This file is part of tools.

+ *            ±ê×¼ÐÅÁîLog¶¨Òå³£Óõĺê

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/14  1.0      li.minghui     Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_STD_LOG_H

+#define ZCAT_STD_LOG_H

+

+////////////////////////////////////// Log /////////////////////////////////

+#define LOG_TOOL_COMMON_BASE            (WORD)0x0000//(WORD)0x01000000

+#define LOG_TOOL_COMMON_USIM_BASE       (WORD)0x0000//(WORD)0x01000000

+//USIM

+#define USIM_CARD_MODE_LOG              (WORD)(LOG_TOOL_COMMON_USIM_BASE + 1)

+#define USIM_SRV_TABLE_LOG              (WORD)(LOG_TOOL_COMMON_USIM_BASE + 2)

+#define FRBDN_TAI_LIST_LOG              (WORD)(LOG_TOOL_COMMON_USIM_BASE + 3)

+

+//other

+#define LOG_TOOL_COMMON_OTHER_BASE      (WORD)0x0100//(WORD)0x01001000

+#define MSGTRACEPS_CELLRESORCCO_IND_EV  (WORD)(LOG_TOOL_COMMON_OTHER_BASE + 0)

+#define ROADTEST_UEINFO_CNF_EV          (WORD)(LOG_TOOL_COMMON_OTHER_BASE + 1)

+#define EM_CELL_INFO_LOG                (WORD)(LOG_TOOL_COMMON_OTHER_BASE + 2)

+#define EM_SCELL_INFO_LOG               (WORD)(LOG_TOOL_COMMON_OTHER_BASE + 3)

+

+//UMTS

+#define LOG_TOOL_UMTS_BASE              (WORD)0x1000//(WORD)0x02000000

+//NAS

+#define LOG_TOOL_UMTS_NAS_BASE          (WORD)0x1000//(WORD)0x02000000

+#define TG_NAS_MSG_IND_EV               (WORD)(LOG_TOOL_UMTS_NAS_BASE + 0)

+//ARM/SIM

+#define LOG_TOOL_UMTS_ARM_BASE          (WORD)0x1100//(WORD)0x02001000

+

+//GSM

+#define LOG_TOOL_GSM_BASE               (WORD)0x2000//(WORD)0x03000000

+//Layer 1

+#define LOG_TOOL_GSM_LAYER1_BASE        (WORD)0x2000//(WORD)0x03000000

+//Layer 2

+#define LOG_TOOL_GSM_LAYER2_BASE        (WORD)0x2100//(WORD)0x03001000

+

+//Layer 3

+#define LOG_TOOL_GSM_LAYER3_BASE        (WORD)0x2200//(WORD)0x03002000//£¨NASÏûÏ¢¶¼·ÅÔÚUMTSÀïµÄNASÄ£¿éÁË£©

+#define GSM_RRC_MSG_IND_EV              (WORD)(LOG_TOOL_GSM_LAYER3_BASE + 0)

+

+//GPRS

+#define LOG_TOOL_GSM_GPRS_BASE          (WORD)0x2300//(WORD)0x03003000

+//Obsolete

+#define LOG_TOOL_GSM_OBSOLETE_BASE      (WORD)0x2400//(WORD)0x03004000

+//GSM User

+#define LOG_TOOL_GSM_GSMUSER_BASE       (WORD)0x2500//(WORD)0x03005000

+//EGPRS

+#define LOG_TOOL_GSM_EGPRS_BASE         (WORD)0x2600//(WORD)0x03006000

+//DSDS

+#define LOG_TOOL_GSM_DSDS_BASE          (WORD)0x2700//(WORD)0x03007000

+

+//TD

+#define LOG_TOOL_TD_BASE                (WORD)0x3000//(WORD)0x04000000

+//L1

+#define LOG_TOOL_TD_L1_BASE             (WORD)0x3000//(WORD)0x04000000

+

+//L2

+#define LOG_TOOL_TD_L2_BASE             (WORD)0x3100//(WORD)0x04001000

+#define UMAC_UL_UPA_TB_INFO_TRACE_EV    (WORD)(LOG_TOOL_TD_L2_BASE + 0)

+#define URLC_UL_DATAPDU_TRACE_EV        (WORD)(LOG_TOOL_TD_L2_BASE + 1)

+#define URLC_DL_DATAPDU_TRACE_EV        (WORD)(LOG_TOOL_TD_L2_BASE + 2)

+#define URLC_UL_CTRLPDU_TRACE_EV        (WORD)(LOG_TOOL_TD_L2_BASE + 3)

+#define URLC_DL_CTRLPDU_TRACE_EV        (WORD)(LOG_TOOL_TD_L2_BASE + 4)

+#define PDCP2URLC_DATA_IND_TRACE_EV     (WORD)(LOG_TOOL_TD_L2_BASE + 5)

+#define PDCP2URLC_DATA_REQ_TRACE_EV     (WORD)(LOG_TOOL_TD_L2_BASE + 6)

+

+//L3

+#define LOG_TOOL_TD_L3_BASE             (WORD)0x3200//(WORD)0x04002000//(NASÏûÏ¢¶¼·ÅÔÚUMTSÀïµÄNASÄ£¿éÁË)

+#define	TD_RRC_MSG_IND_EV               (WORD)(LOG_TOOL_TD_L3_BASE + 0)

+#define	W_RRC_MSG_IND_EV                (DWORD)(LOG_TOOL_TD_L3_BASE + 1)///////hb20130810  

+

+//FW

+#define LOG_TOOL_TD_FW_BASE             (WORD)0x3300//(WORD)0x04003000

+

+//LTE

+#define LOG_TOOL_LTE_BASE               (WORD)0x4000//(WORD)0x05000000

+

+//L1

+#define LOG_TOOL_LTE_L1_BASE                                (WORD)0x4000//(WORD)0x05001000

+#define LOG_TOOL_LTE_PHY_ECSR_PSSINFO                       (WORD)(LOG_TOOL_LTE_L1_BASE + 0)

+#define LOG_TOOL_LTE_PHY_ECSR_SERCELLFRMTIMING              (WORD)(LOG_TOOL_LTE_L1_BASE + 1)

+#define LOG_TOOL_LTE_PHY_ECSR_SSSINFO                       (WORD)(LOG_TOOL_LTE_L1_BASE + 2)

+#define LOG_TOOL_LTE_PHY_ECSR_SERCELL_MEAS_RESULT           (WORD)(LOG_TOOL_LTE_L1_BASE + 3)

+#define LOG_TOOL_LTE_PHY_ECSR_NEBORCELL_MEAS_RESULT         (WORD)(LOG_TOOL_LTE_L1_BASE + 4)

+#define LOG_TOOL_LTE_PHY_PBCH_INFO                          (WORD)(LOG_TOOL_LTE_L1_BASE + 5)

+#define LOG_TOOL_LTE_PHY_GLB_MIB_INFO                       (WORD)(LOG_TOOL_LTE_L1_BASE + 6)

+#define LOG_TOOL_LTE_PHY_GLB_CSR_MEASURE_INFO               (WORD)(LOG_TOOL_LTE_L1_BASE + 7)

+#define LOG_TOOL_LTE_PHY_DL_PCFICH_INFO                     (WORD)(LOG_TOOL_LTE_L1_BASE + 8)

+#define LOG_TOOL_LTE_PHY_DL_PHICH_INFO                      (WORD)(LOG_TOOL_LTE_L1_BASE + 9)

+#define LOG_TOOL_LTE_PHY_DL_PDCCH_INFO                      (WORD)(LOG_TOOL_LTE_L1_BASE + 10)

+#define LOG_TOOL_LTE_PHY_DL_PDSCH_INFO                      (WORD)(LOG_TOOL_LTE_L1_BASE + 11)

+#define LOG_TOOL_LTE_PHY_DL_HARQ_INFO                       (WORD)(LOG_TOOL_LTE_L1_BASE + 12)

+#define LOG_TOOL_LTE_PHY_DL_PA_INFO                         (WORD)(LOG_TOOL_LTE_L1_BASE + 13)

+#define LOG_TOOL_LTE_PHY_DL_FLOW_INFO                       (WORD)(LOG_TOOL_LTE_L1_BASE + 14)

+#define LOG_TOOL_LTE_PHY_DL_DCI_INFO                        (WORD)(LOG_TOOL_LTE_L1_BASE + 15)

+#define LOG_TOOL_LTE_PHY_EXT_PUCCHFMT_STAT_INFO             (WORD)(LOG_TOOL_LTE_L1_BASE + 16)

+#define LOG_TOOL_LTE_PHY_EXT_BUNLDINGAN_STAT_INFO           (WORD)(LOG_TOOL_LTE_L1_BASE + 17)

+#define LOG_TOOL_LTE_PHY_EXT_MUTIPLEXAN_STAT_INFO           (WORD)(LOG_TOOL_LTE_L1_BASE + 18)

+#define LOG_TOOL_LTE_PHY_EXT_SRHARQSIMUL_STAT_INFO          (WORD)(LOG_TOOL_LTE_L1_BASE + 19)

+#define LOG_TOOL_LTE_PHY_EXT_CQIHARQSIMULSIMUL_STAT_INFO    (WORD)(LOG_TOOL_LTE_L1_BASE + 20)

+#define LOG_TOOL_LTE_PHY_SRSTX_REPORT                       (WORD)(LOG_TOOL_LTE_L1_BASE + 21)

+#define LOG_TOOL_LTE_PHY_EXT_SRS_STAT_INFO                  (WORD)(LOG_TOOL_LTE_L1_BASE + 22)

+#define LOG_TOOL_LTE_PHY_EXT_PRACH_STAT_INFO                (WORD)(LOG_TOOL_LTE_L1_BASE + 23)

+#define LOG_TOOL_LTE_PHY_EXT_ULHARQTRANS_STAT_INFO          (WORD)(LOG_TOOL_LTE_L1_BASE + 24)

+#define LOG_TOOL_LTE_PHY_EXT_DCI0_INFO                      (WORD)(LOG_TOOL_LTE_L1_BASE + 25)

+#define LOG_TOOL_LTE_PHY_EXT_DCI3OR3A_INFO                  (WORD)(LOG_TOOL_LTE_L1_BASE + 26)

+#define LOG_TOOL_LTE_PHY_EXT_ULPOWERCTRL_INFO               (WORD)(LOG_TOOL_LTE_L1_BASE + 27)

+#define LOG_TOOL_LTE_PHY_DFE_DEBUG_INFO                     (WORD)(LOG_TOOL_LTE_L1_BASE + 28)

+#define LOG_TOOL_LTE_PHY_RFC_DEBUG_INFO                     (WORD)(LOG_TOOL_LTE_L1_BASE + 29)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGMIB_INFO                 (WORD)(LOG_TOOL_LTE_L1_BASE + 30)

+#define LOG_TOOL_LTE_PHY_DEBUG_PHYCELLID_RANGE              (WORD)(LOG_TOOL_LTE_L1_BASE + 31)

+#define LOG_TOOL_LTE_PHY_DEBUG_MEAS_FREQ_INFO               (WORD)(LOG_TOOL_LTE_L1_BASE + 32)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGMEASCONFIG_INFO          (WORD)(LOG_TOOL_LTE_L1_BASE + 33)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGMEASMASKSET_INFO         (WORD)(LOG_TOOL_LTE_L1_BASE + 34)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGCSRAGE_INFO              (WORD)(LOG_TOOL_LTE_L1_BASE + 35)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGCSRPRIORITY_INFO         (WORD)(LOG_TOOL_LTE_L1_BASE + 36)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUGCSR_MEAS_INFO            (WORD)(LOG_TOOL_LTE_L1_BASE + 37)

+#define LOG_TOOL_LTE_PHY_DEBUG_SEG4TIME                     (WORD)(LOG_TOOL_LTE_L1_BASE + 38)

+#define LOG_TOOL_LTE_PHY_DEBUG_SEG3TIME                     (WORD)(LOG_TOOL_LTE_L1_BASE + 39)

+#define LOG_TOOL_LTE_PHY_DEBUG_TIME                         (WORD)(LOG_TOOL_LTE_L1_BASE + 40)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSRFRAME_BOUNDRY_INFO   (WORD)(LOG_TOOL_LTE_L1_BASE + 41)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSR_SEARCH_INFO         (WORD)(LOG_TOOL_LTE_L1_BASE + 42)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSR_BCH_INFO            (WORD)(LOG_TOOL_LTE_L1_BASE + 43)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSR_CELL_STATE          (WORD)(LOG_TOOL_LTE_L1_BASE + 44)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSR_CELL_INFO           (WORD)(LOG_TOOL_LTE_L1_BASE + 45)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_FREQ_POINT_INFO         (WORD)(LOG_TOOL_LTE_L1_BASE + 46)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CELL_DATABASE_INFO      (WORD)(LOG_TOOL_LTE_L1_BASE + 47)

+#define LOG_TOOL_LTE_PHY_ECSR_DEBUG_CSR_INFO                (WORD)(LOG_TOOL_LTE_L1_BASE + 48)

+#define LOG_TOOL_LTE_PHY_GLB_CALC_FOR_SINR                  (WORD)(LOG_TOOL_LTE_L1_BASE + 49)

+#define LOG_TOOL_LTE_PHY_GLB_FLOW_INFO                      (WORD)(LOG_TOOL_LTE_L1_BASE + 50)

+#define LOG_TOOL_LTE_PHY_GLB_UE_INFO                        (WORD)(LOG_TOOL_LTE_L1_BASE + 51)

+#define LOG_TOOL_LTE_PHY_RF_AUTOTEST_INFO                   (WORD)(LOG_TOOL_LTE_L1_BASE + 52)

+#define LOG_TOOL_LTE_PHY_TH_AUTOTEST_INFO                   (WORD)(LOG_TOOL_LTE_L1_BASE + 53)

+

+#define LOG_TOOL_LTE_PHY_RAPC_Msg1_UE_INFO                  (DWORD)(LOG_TOOL_LTE_L1_BASE + 54)

+#define LOG_TOOL_LTE_PHY_RAPC_Msg2_UE_INFO                  (DWORD)(LOG_TOOL_LTE_L1_BASE + 55)

+#define LOG_TOOL_LTE_PHY_RAPC_Msg3_UE_INFO                  (DWORD)(LOG_TOOL_LTE_L1_BASE + 56)

+#define LOG_TOOL_LTE_PHY_RAPC_Msg4_UE_INFO                  (DWORD)(LOG_TOOL_LTE_L1_BASE + 57)

+

+//ÐÂÔöLTEAµÄSCELLÏûÏ¢ID										

+#define LOG_TOOL_LTEA_L1_BASE								(WORD)(LOG_TOOL_LTE_L1_BASE + 100)

+#define LOG_TOOL_LTEA_PHY_DL_PHICH_INFO                     (WORD)(LOG_TOOL_LTEA_L1_BASE + 1)

+#define LOG_TOOL_LTEA_PHY_DL_PDCCH_INFO                     (WORD)(LOG_TOOL_LTEA_L1_BASE + 2)

+#define LOG_TOOL_LTEA_PHY_DL_PDSCH_INFO                     (WORD)(LOG_TOOL_LTEA_L1_BASE + 3)

+#define LOG_TOOL_LTEA_PHY_DL_DCI_INFO                       (WORD)(LOG_TOOL_LTEA_L1_BASE + 4)

+#define LOG_TOOL_LTEA_PHY_EXT_CQIHARQSIMULSIMUL_STAT_INFO   (WORD)(LOG_TOOL_LTEA_L1_BASE + 5)

+#define LOG_TOOL_LTEA_PHY_EXT_ULPOWERCTRL_INFO              (WORD)(LOG_TOOL_LTEA_L1_BASE + 6)

+#define LOG_TOOL_LTEA_PHY_DFE_DEBUG_INFO                    (WORD)(LOG_TOOL_LTEA_L1_BASE + 7)

+#define LOG_TOOL_LTEA_PHY_GLB_CALC_FOR_SINR                 (WORD)(LOG_TOOL_LTEA_L1_BASE + 8)

+#define LOG_TOOL_LTEA_PHY_GLB_FLOW_INFO                     (WORD)(LOG_TOOL_LTEA_L1_BASE + 9)

+#define LOG_TOOL_LTEA_PHY_GLB_UE_INFO                       (WORD)(LOG_TOOL_LTEA_L1_BASE + 10)

+

+#define LOG_TOOL_LTE_L1_END                                 (WORD)(LOG_TOOL_LTEA_L1_BASE + 11)

+//MAC Layer

+#define LOG_TOOL_LTE_MAC_LAY_BASE       (WORD)0x4100//(WORD)0x05002000

+#define EUMAC_CFG_LOG                   (WORD)(LOG_TOOL_LTE_MAC_LAY_BASE + 0)

+#define EUMAC_RACH_TRACE_LOG            (WORD)(LOG_TOOL_LTE_MAC_LAY_BASE + 1)

+#define EUMAC_DL_BLCS_LOG               (WORD)(LOG_TOOL_LTE_MAC_LAY_BASE + 2)

+#define EUMAC_UL_BLCS_LOG               (WORD)(LOG_TOOL_LTE_MAC_LAY_BASE + 3)

+#define EUMAC_STATISTICS_LOG            (WORD)(LOG_TOOL_LTE_MAC_LAY_BASE + 4)

+

+//RLC Layer

+#define LOG_TOOL_LTE_RLC_LAY_BASE       (WORD)0x4200//(WORD)0x05003000

+#define EURLC_DL_AM_ALLPDU_LOG          (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 0)

+#define EURLC_DL_AM_CTRLPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 1)

+#define EURLC_DL_AM_POLLPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 2)

+#define EURLC_DL_AM_SIGPDU_LOG          (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 3)

+#define EURLC_DL_UM_DATAPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 4)

+#define EURLC_DL_STATISTICS_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 5)

+#define EURLC_UL_AM_ALLPDU_LOG          (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 6)

+#define EURLC_UL_AM_CTRLPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 7)

+#define EURLC_UL_AM_POLLPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 8)

+#define EURLC_UL_AM_SIGPDU_LOG          (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 9)

+#define EURLC_UL_UM_DATAPDU_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 10)

+#define EURLC_UL_STATISTICS_LOG         (WORD)(LOG_TOOL_LTE_RLC_LAY_BASE + 11)

+

+//PDCP Layer

+#define LOG_TOOL_LTE_PDCP_LAY_BASE      (WORD)0x4300//(WORD)0x05004000

+#define EPDCP_DL_CFG_LOG                (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 0)

+#define EPDCP_UL_CFG_LOG                (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 1)

+#define EPDCP_DL_UNCIPHER_PDU_LOG       (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 2)

+#define EPDCP_UL_UNCIPHER_PDU_LOG       (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 3)

+#define EPDCP_DL_CIPHER_PDU_LOG         (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 4)

+#define EPDCP_UL_CIPHER_PDU_LOG         (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 5)

+#define EPDCP_DL_CTRL_PDU_LOG           (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 6)

+#define EPDCP_UL_CTRL_PDU_LOG           (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 7)

+#define EPDCP_DL_SRB_INTERGIRTY_PDU_LOG (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 8)

+#define EPDCP_UL_SRB_INTERGIRTY_PDU_LOG (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 9)

+#define EPDCP_DL_STATISTICS_LOG         (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 10)

+#define EPDCP_UL_STATISTICS_LOG         (WORD)(LOG_TOOL_LTE_PDCP_LAY_BASE + 11)

+

+//RRC Layer

+#define LOG_TOOL_LTE_RRC_LAY_BASE       (WORD)0x4400//(WORD)0x05005000

+#define ZEUCER_RB_INFO_IND_EV           (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 0)

+#define ZEUCER_RRC_UE_INFO_IND_EV       (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 1)

+#define TD_RRC_UE_INFO_IND_EV           (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 2)

+#define EURLC_DL_CFG_LOG                (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 3)

+#define EURLC_UL_CFG_LOG                (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 4)

+#define EUMCR_INTRA_FREQ_MEAS_RLTS_LOG  (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 5)

+#define EUMCR_INTER_FREQ_MEAS_RLTS_LOG  (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 6)

+#define EUMCR_UTRA_MEAS_RLTS_LOG        (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 7)  

+#define EUMCR_GSM_FREQ_MEAS_RLTS_LOG    (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 8) 

+#define EUMCR_EUTRA_MEAS_FREQ_LOG       (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 9)  

+#define EUMCR_UTRA_MEAS_FREQ_LOG        (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 10)	  

+#define EUMCR_GSM_MEAS_FREQ_LOG         (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 11)

+#define EUMCR_MOBILITY_CHG_LOG          (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 12) 

+#define EUMCR_MEAS_CONFIG_CONN_LOG      (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 13)

+#define EUMCR_CELL_EVA_CONN_LOG         (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 14)  

+#define EUSIR_S_CHECK_LOG               (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 15)   

+#define EUSIR_PAGE_CONFIG_LOG           (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 16)    

+#define EUMCR_MEAS_RULE_IDLE_LOG        (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 17) 

+#define EUMCR_LOW_EQUAL_RESEL_LOG       (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 18)

+#define EUMCR_CELL_EVA_IDLE_LOG         (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 19)

+#define LTE_RRC_MSG_IND_EV              (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 20)	

+#define W_RRC_UE_INFO_IND_EV            (WORD)(LOG_TOOL_LTE_RRC_LAY_BASE + 21)

+

+//NAS Layer

+#define LOG_TOOL_LTE_NAS_LAY_BASE       (WORD)0x4500//(WORD)0x05006000

+#define ZEMM_NAS_UE_INFO_IND_EV         (WORD)(LOG_TOOL_LTE_NAS_LAY_BASE + 0)

+#define ESM_BEARER_CTX_STATE_LOG        (WORD)(LOG_TOOL_LTE_NAS_LAY_BASE + 1)	

+#define ESM_BEARER_CTX_INFO_LOG         (WORD)(LOG_TOOL_LTE_NAS_LAY_BASE + 2)

+#define ESM_PROCE_STATE_LOG             (WORD)(LOG_TOOL_LTE_NAS_LAY_BASE + 3)

+#define LTE_NAS_MSG_IND_EV              (WORD)(LOG_TOOL_LTE_NAS_LAY_BASE + 4)

+

+//Espresso

+#define LOG_TOOL_LTE_ESPRESSO_BASE      (WORD)0x4600//(WORD)0x05000000

+

+//Other

+#define LOG_TOOL_LTE_OTHER_BASE         (WORD)0x4700//(WORD)0x05007000

+#define EUCSR_SYS_PARA_IND_EV           (WORD)(LOG_TOOL_LTE_OTHER_BASE + 0)

+#define EUDBG_THROUGHPUT_IND_EV         (WORD)(LOG_TOOL_LTE_OTHER_BASE + 1)

+#define MSGTRACEPS_DALAYTEST_IND_EV     (WORD)(LOG_TOOL_LTE_OTHER_BASE + 2)

+#define LTE_EUL2_INFO_IND_EV            (WORD)(LOG_TOOL_LTE_OTHER_BASE + 3)

+

+/////WCDMA

+#define LOG_TOOL_WCDMA_BASE             (WORD)0x5000//

+/////W_L1

+#define LOG_TOOL_WCDMA_L1_BASE          (WORD)0x5000

+#define LOG_TOOL_WCDMA_STATE_CNT        (WORD)(LOG_TOOL_WCDMA_L1_BASE + 0)

+#define LOG_TOOL_WCDMA_MAIN_INFO        (WORD)(LOG_TOOL_WCDMA_L1_BASE + 1)

+#define LOG_TOOL_WCDMA_ACTIVE_CELL_INFO (WORD)(LOG_TOOL_WCDMA_L1_BASE + 2)

+#define LOG_TOOL_WCDMA_TPC_PACKET_INFO  (WORD)(LOG_TOOL_WCDMA_L1_BASE + 3)

+#define LOG_TOOL_WCDMA_UL_POWER_INFO    (WORD)(LOG_TOOL_WCDMA_L1_BASE + 4)

+#define LOG_TOOL_WCDMA_PC_STATIC_INFO   (WORD)(LOG_TOOL_WCDMA_L1_BASE + 5)

+#define LOG_TOOL_WCDMA_RFC_GAP_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 6)

+#define LOG_TOOL_WCDMA_RFC_STATE_INFO   (WORD)(LOG_TOOL_WCDMA_L1_BASE + 7)

+#define LOG_TOOL_WCDMA_DL_TRCH_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 8)

+#define LOG_TOOL_WCDMA_UL_TRCH_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 9)

+#define LOG_TOOL_WCDMA_DL_CPCH_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 10)

+#define LOG_TOOL_WCDMA_DL_DPCH_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 11)

+#define LOG_TOOL_WCDMA_UL_DPCH_PC_INFO  (WORD)(LOG_TOOL_WCDMA_L1_BASE + 12)

+#define LOG_TOOL_WCDMA_UL_DPCH_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 13)

+#define LOG_TOOL_WCDMA_PRACH_INFO       (WORD)(LOG_TOOL_WCDMA_L1_BASE + 14)

+#define LOG_TOOL_WCDMA_SYNC_INFO        (WORD)(LOG_TOOL_WCDMA_L1_BASE + 15)

+#define LOG_TOOL_WCDMA_FS_PROC_INFO     (WORD)(LOG_TOOL_WCDMA_L1_BASE + 16)

+#define LOG_TOOL_WCDMA_CS_STATISTIC_INFO      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 17)

+#define LOG_TOOL_WCDMA_PAGE_STATISTIC_INFO    (WORD)(LOG_TOOL_WCDMA_L1_BASE + 18)

+#define LOG_TOOL_WCDMA_SERVE_CELL_RESULT      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 19)

+#define LOG_TOOL_WCDMA_INTRA_CELL_RESULT      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 20)

+#define LOG_TOOL_WCDMA_INTER_CELL_RESULT      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 21)

+#define LOG_TOOL_WCDMA_STATISTIC_INFO		  (WORD)(LOG_TOOL_WCDMA_L1_BASE + 22)

+#define LOG_TOOL_WCDMA_HSDPA_PACKET_INFO      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 23)

+#define LOG_TOOL_WCDMA_HSDPA_STATISTIC_INFO   (WORD)(LOG_TOOL_WCDMA_L1_BASE + 24)

+#define LOG_TOOL_WCDMA_HSUPA_PACKET_INFO      (WORD)(LOG_TOOL_WCDMA_L1_BASE + 25)

+#define LOG_TOOL_WCDMA_HSUPA_STATISTIC_INFO   (WORD)(LOG_TOOL_WCDMA_L1_BASE + 26)

+#define LOG_TOOL_WCDMA_SLEEP_MIX_INFO         (WORD)(LOG_TOOL_WCDMA_L1_BASE + 27)

+

+#define LOG_TOOL_WCDMA_L1_END                LOG_TOOL_WCDMA_SLEEP_MIX_INFO + 1

+////W_RRC

+#define LOG_TOOL_W_AS_BASE					(WORD)0x5100//

+#define Z_WCDMA_RRC_STATUS_LOG              (DWORD)(LOG_TOOL_W_AS_BASE+0)

+#define Z_WCDMA_RRC_PROTOCOL_ERROR_LOG      (DWORD)(LOG_TOOL_W_AS_BASE+1)

+#define Z_WCDMA_RRC_SERVCELL_INFO_LOG       (DWORD)(LOG_TOOL_W_AS_BASE+2)

+#define Z_WCDMA_RRC_CMINFO_LOG              (DWORD)(LOG_TOOL_W_AS_BASE+3)

+#define Z_WCDMA_RRC_RESELECTCELL_LOG        (DWORD)(LOG_TOOL_W_AS_BASE+4)

+#define Z_WCDMA_RRC_FMOINFO_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+5)

+#define Z_WCDMA_RRC_MCEVENTINFO_LOG         (DWORD)(LOG_TOOL_W_AS_BASE+6)

+#define Z_WCDMA_RRC_CELLINFO_LOG            (DWORD)(LOG_TOOL_W_AS_BASE+7)

+#define Z_WCDMA_RRC_PRIOINFO_LOG            (DWORD)(LOG_TOOL_W_AS_BASE+8)

+#define Z_WCDMA_RRC_EVENT_FREQQUA_LOG       (DWORD)(LOG_TOOL_W_AS_BASE+9)

+#define Z_WCDMA_RRC_CELLRST_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+10)

+#define Z_WCDMA_RRC_TRAFFIC_REPORT_LOG      (DWORD)(LOG_TOOL_W_AS_BASE+11)

+//RLC

+#define Z_WCDMA_RLC_DlAmSta_TV_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+12)

+#define Z_WCDMA_RLC_UlAmSta_Tv_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+13)

+#define Z_WCDMA_RLC_Sta_TV_LOG              (DWORD)(LOG_TOOL_W_AS_BASE+14)

+#define Z_WCDMA_RLC_UlTm_TV_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+15)

+#define Z_WCDMA_RLC_UlUm_TV_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+16)

+#define Z_WCDMA_RLC_DlTm_TV_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+17)

+#define Z_WCDMA_RLC_DlUm_TV_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+18)

+#define Z_WCDMA_RLC_DlAmConfig_TV_LOG       (DWORD)(LOG_TOOL_W_AS_BASE+19)

+#define Z_WCDMA_RLC_UlAmConfig_TV_LOG       (DWORD)(LOG_TOOL_W_AS_BASE+20)

+#define Z_WCDMA_RLC_AmPdu_TV_LOG            (DWORD)(LOG_TOOL_W_AS_BASE+21)

+#define Z_WCDMA_RLC_RbRat_TV_LOG            (DWORD)(LOG_TOOL_W_AS_BASE+22)

+#define Z_WCDMA_RLC_AmCtrlPdu_TV_LOG        (DWORD)(LOG_TOOL_W_AS_BASE+23)

+#define Z_WCDMA_RLC_FlexPduPack_TV_LOG      (DWORD)(LOG_TOOL_W_AS_BASE+24)

+//MAC

+#define Z_WCDMA_MAC_UlLgchPara_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+25)

+#define Z_WCDMA_MAC_DlLgchPara_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+26)

+#define Z_WCDMA_MAC_RachCtrlPara_LOG        (DWORD)(LOG_TOOL_W_AS_BASE+27)

+#define Z_WCDMA_MAC_UlTfcsPara_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+28)

+#define Z_WCDMA_MAC_DynamicUpaPduPara_LOG   (DWORD)(LOG_TOOL_W_AS_BASE+29)

+#define Z_WCDMA_MAC_StaticsUpaPduPara_LOG   (DWORD)(LOG_TOOL_W_AS_BASE+30)

+#define Z_WCDMA_MAC_MaceCfgPara_LOG         (DWORD)(LOG_TOOL_W_AS_BASE+31)

+#define Z_WCDMA_MAC_MaceHeaderPara_LOG      (DWORD)(LOG_TOOL_W_AS_BASE+32)

+#define Z_WCDMA_MAC_MacHsCfgPara_LOG        (DWORD)(LOG_TOOL_W_AS_BASE+33)

+#define Z_WCDMA_MAC_DpaReorderingPara_LOG   (DWORD)(LOG_TOOL_W_AS_BASE+34)

+#define Z_WCDMA_MAC_MacHsRstPara_LOG        (DWORD)(LOG_TOOL_W_AS_BASE+35)

+#define Z_WCDMA_MAC_DpaPduPara_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+36)

+#define Z_WCDMA_MAC_Lgch_TV_LOG             (DWORD)(LOG_TOOL_W_AS_BASE+38)

+

+//PDCP

+#define Z_WCDMA_PDCP_RatRat_TV_LOG          (DWORD)(LOG_TOOL_W_AS_BASE+37)

+

+/////W_NAS

+#define LOG_TOOL_W_NAS_BASE          (DWORD)0x5200

+#define GMM_STATE_LOG                (DWORD)(LOG_TOOL_W_NAS_BASE+1)

+#define MM_STATE_LOG                 (DWORD)(LOG_TOOL_W_NAS_BASE+2)

+#define NAS_REGISRT_STATE_LOG        (DWORD)(LOG_TOOL_W_NAS_BASE+3)

+#define CC_MO_SETUP_LOG              (DWORD)(LOG_TOOL_W_NAS_BASE+4)

+#define SM_MO_SETUP_LOG              (DWORD)(LOG_TOOL_W_NAS_BASE+5)

+#define NAS_MM_CHARACTERISTICS_LOG   (DWORD)(LOG_TOOL_W_NAS_BASE+6)

+#define NAS_QoS_LOG                  (DWORD)(LOG_TOOL_W_NAS_BASE+7)

+#define NAS_BC_LOG                   (DWORD)(LOG_TOOL_W_NAS_BASE+8)

+#define UE_DYNAMICID_LOG             (DWORD)(LOG_TOOL_W_NAS_BASE+9)

+#define UE_STATIC_LOG                (DWORD)(LOG_TOOL_W_NAS_BASE+10)

+// ºóÐøÌí¼ÓÐÂLog£¬Ðè¸üÐÂLOG_TOOL_LASTµÄÖµ

+#define LOG_TOOL_LAST                   (WORD)(UE_STATIC_LOG + 1)

+

+////////////////////////////////////// Event /////////////////////////////////

+#define EVT_TOOL_BASE                   (WORD)0x0000//(WORD)0x0000

+

+//Common

+#define EVT_TOOL_COMMON_BASE            (WORD)EVT_TOOL_BASE//(WORD)0x0000

+#define TRACS_DELAYEVENT_IND_EV         (WORD)(EVT_TOOL_COMMON_BASE + 1)

+

+//LTE

+#define EVT_TOOL_LTE_BASE               (WORD)0x1000//(WORD)0x0200

+

+//NAS

+#define EVT_TOOL_LTE_NAS_BASE           (WORD)0x1000//(WORD)0x0200

+#define EMM_TIMER_START_EVENT           (WORD)(EVT_TOOL_LTE_NAS_BASE + 0)

+#define EMM_TIMER_EXPIRY_EVENT          (WORD)(EVT_TOOL_LTE_NAS_BASE + 1)

+#define ESM_TIMER_START_EVENT           (WORD)(EVT_TOOL_LTE_NAS_BASE + 2)

+#define ESM_TIMER_EXPIRY_EVENT          (WORD)(EVT_TOOL_LTE_NAS_BASE + 3)

+

+//MAC

+#define EVT_TOOL_LTE_MAC_BASE           (WORD)0x1100//(WORD)0x0400

+#define EUMAC_TIMER_EVENT               (WORD)(EVT_TOOL_LTE_MAC_BASE + 0) 

+#define EUMAC_RESET_EVENT               (WORD)(EVT_TOOL_LTE_MAC_BASE + 1) 

+

+//RRC

+#define EVT_TOOL_LTE_RRC_BASE           (WORD)0x1200//(WORD)0x0600

+#define EURRC_TIMER_EVENT               (WORD)(EVT_TOOL_LTE_RRC_BASE + 0) 

+#define PAGING_DRX_CYCLE_EVENT          (WORD)(EVT_TOOL_LTE_RRC_BASE + 1) 

+#define SIB_READ_FAIL_EVENT             (WORD)(EVT_TOOL_LTE_RRC_BASE + 2)

+#define EURRC_SECUIRITY_CFG_EVENT       (WORD)(EVT_TOOL_LTE_RRC_BASE + 3)

+

+//Other

+#define EVT_TOOL_OTHER_BASE             (WORD)0x2000//(WORD)0x0800

+#define TA_EVENT                        (WORD)(EVT_TOOL_OTHER_BASE + 0)

+#define UL_OOS_EVENT                    (WORD)(EVT_TOOL_OTHER_BASE + 1)

+#define RACH_ACS_STARE_EVENT            (WORD)(EVT_TOOL_OTHER_BASE + 2)

+#define RACH_ACS_RSLT_EVENT             (WORD)(EVT_TOOL_OTHER_BASE + 3)

+#define BSR_OR_SR_REQ_EVENT             (WORD)(EVT_TOOL_OTHER_BASE + 4)

+

+/////WCDMA 

+#define LOG_TOOL_W_EVENT_BASE          (DWORD)0x2100

+#define UMTS_TIMER_EVENT               (DWORD)(LOG_TOOL_W_EVENT_BASE+1)

+#define W_CAMPFAIL_EVENT               (DWORD)(LOG_TOOL_W_EVENT_BASE+2)

+#define W_OUTSYNC_EVENT                (DWORD)(LOG_TOOL_W_EVENT_BASE+3)

+#define W_RLCUNRECOVERR_EVENT          (DWORD)(LOG_TOOL_W_EVENT_BASE+4)

+#define NAS_INTIATIVE_DISCONN_EVENT    (DWORD)(LOG_TOOL_W_EVENT_BASE+5)

+#define NAS_UNSOLICITED_DISCONN_EVENT  (DWORD)(LOG_TOOL_W_EVENT_BASE+6)

+#define NAS_OOS_EVENT                  (DWORD)(LOG_TOOL_W_EVENT_BASE+7)

+// ºóÐøÌí¼ÓÐÂEvent£¬Ðè¸üÐÂEVT_TOOL_LASTµÄÖµ

+#define EVT_TOOL_LAST                   (WORD)(NAS_OOS_EVENT + 1)

+

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/Tmtagent_api.h b/cp/ps/modem/tools/inc/Tmtagent_api.h
new file mode 100644
index 0000000..2c3c6d2
--- /dev/null
+++ b/cp/ps/modem/tools/inc/Tmtagent_api.h
@@ -0,0 +1,64 @@
+/**

+ * 

+ * @file      Tmtagent_api.h

+ * @brief     

+ *            This file is part of tools.

+ *            ¹¤¾ßCommAgt½Ó¿Ú¹«¹²ÉùÃ÷

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/14  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef TMTAGENT_API_H_

+#define TMTAGENT_API_H_

+

+#include "zcat/zcat.h"

+#include "zcat/zcat_dbg.h"

+#include "zcat/zcat_event.h"

+#include "zcat/zcat_ipppp.h"

+#include "zcat/zcat_print.h"

+#include "zcat/zcat_sig.h"

+

+//GSMÎïÀí²ãÏûÏ¢ÀàÐͶ¨Ò壬Ŀǰ֧³Ö´òÓ¡ÏûÏ¢ºÍÐÅÁîÏûÏ¢

+#define L1G_MSG_PRN GSM_MSG_PRN

+#define L1G_MSG_SIG GSM_MSG_SIG

+#define L1G_MSG_UNKNOWN GSM_MSG_UNKNOWN

+

+typedef T_ZCAT_GSM_TRACEHEADER T_Tmt_L1gTraceHeader;

+typedef T_ZCAT_GSM_SIGMSGINFO T_Tmt_L1gSigMsgInfo;

+typedef T_ZCAT_GSM_PRNMSGINFO T_Tmt_L1gPrnMsgInfo;

+

+//GSMÎïÀí²ã¾ßÌåijÀàÏûÏ¢½á¹¹

+typedef union

+{

+    T_Tmt_L1gSigMsgInfo	  L1gSigMsgInfo;  //ÐÅÁîÏûÏ¢

+    T_Tmt_L1gPrnMsgInfo   L1gPrnMsgInfo;  //´òÓ¡ÏûÏ¢

+}T_Tmt_L1gSpecMsgInfo;

+

+//GSMÎïÀí²ãÏûÏ¢¸ú×ÙÍ·½á¹¹

+typedef struct 

+{

+    T_Tmt_L1gTraceHeader      L1gTraceHeader;  //ÏûÏ¢¹«¹²Í·

+    T_Tmt_L1gSpecMsgInfo      L1gSpecMsgInfo; //¾ßÌåijÀàÏûÏ¢ÐÅÏ¢

+}T_Tmt_L1gTraceInfo;

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/TraceShare.h b/cp/ps/modem/tools/inc/TraceShare.h
new file mode 100644
index 0000000..003a57d
--- /dev/null
+++ b/cp/ps/modem/tools/inc/TraceShare.h
@@ -0,0 +1,42 @@
+/**

+ * 

+ * @file      TraceShare.h

+ * @brief     

+ *            This file is part of tools.

+ *            TraceÍ·Îļþ

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef TRACESHARE_H_

+#define TRACESHARE_H_

+

+#include "zcat/zcat.h"

+#include "zcat/zcat_dbg.h"

+#include "zcat/zcat_event.h"

+#include "zcat/zcat_ipppp.h"

+#include "zcat/zcat_print.h"

+#include "zcat/zcat_sig.h"

+#include "CpTrace.h"

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/amt/amt.h b/cp/ps/modem/tools/inc/amt/amt.h
new file mode 100644
index 0000000..7dab755
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/amt.h
@@ -0,0 +1,43 @@
+/**

+ * 

+ * @file      amt.h

+ * @brief     

+ *            This file is part of FTM.

+ *            AMT¹¤¾ßUE²à´úÀíÄ£¿é

+ *            Êý¾ÝÀàÐͶ¨Òå¼°¶ÔÍâ½Ó¿Ú˵Ã÷

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2015/01/19  1.0      lan.kai        Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef _AMT_H_

+#define _AMT_H_

+

+typedef UINT32 (*pfBaseBand)(UINT16 msg_id, UINT8* buf, UINT32 buf_len);

+VOID AmtAgent_ComposeAndProcess(UINT8 *buf, UINT32 buf_len);

+typedef UINT32 (*pfSendDataToAmtApp)( UINT8* buf, UINT32 buf_len);

+void RegSendDataToAmtAppFunction(pfSendDataToAmtApp pf);

+

+

+

+

+

+#endif

diff --git a/cp/ps/modem/tools/inc/amt/amt_ddr_nvconfig.h b/cp/ps/modem/tools/inc/amt/amt_ddr_nvconfig.h
new file mode 100644
index 0000000..b178061
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/amt_ddr_nvconfig.h
@@ -0,0 +1,47 @@
+/**

+ * 

+ * @file      amt_ddr_nvconfig.h

+ * @brief     

+ *            This file is part of FTM.

+ *            AMT°æ±¾Æô¶¯¹ý³ÌDDRÏÂÔØNV¿Õ¼ä¹æ»®

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2011/04/08  1.0      lu.xieji       create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+

+#ifndef AMT_DDR_NVCONFIG_H

+#define AMT_DDR_NVCONFIG_H

+

+

+#include "Ram_config.h"

+

+#define ICP_AREA_OFFSET   0x100000	//1M

+#define TDNV_FDT_LEN      0x19D0    //TDNV_FDT   6608

+#define TDNV_USER_LEN     0x100     //TDNV_USER  256

+#define TDNV_UNCAL_LEN    0x44A     //TDNV_UNCAL 1098

+

+#define AMT_TDNV_FDT_DATA_START   ICP_DATA_BASE_ADDR + ICP_AREA_OFFSET

+#define AMT_TDNV_USER_DATA_START  AMT_TDNV_FDT_DATA_START + TDNV_FDT_LEN

+#define AMT_TDNV_UNCAL_DATA_START AMT_TDNV_USER_DATA_START + TDNV_USER_LEN

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/amt/w_fdt_event.h b/cp/ps/modem/tools/inc/amt/w_fdt_event.h
new file mode 100644
index 0000000..8f3521f
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/w_fdt_event.h
@@ -0,0 +1,231 @@
+/********************************************************************

+* °æÈ¨ËùÓÐ (C)2001, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+*

+* ÎļþÃû³Æ    w_fdt_event.h

+* Îļþ±êʶ£º

+* ÄÚÈÝÕªÒª£º

+* ÆäËü˵Ã÷£º

+* µ±Ç°°æ±¾£º

+* ×÷    ÕߣºÕÅöÎöÎ

+* Íê³ÉÈÕÆÚ£º

+*

+* ÐÞ¸ÄÈÕÆÚ    °æ±¾ºÅ     ÐÞ¸ÄÈË	     ÐÞ¸ÄÄÚÈÝ

+* -----------------------------------------------

+  2014.08.18  V1.0       ÕÅöÎöÎ      н¨

+  2014.10.22  V1.1       ÕÅöÎöÎ      Ôö¼Ó²¿·ÖÏûÏ¢·´À¡

+********************************************************************/

+

+#include "w_nv_param.h"

+

+#ifndef _W_FDT_EVENT_H

+#define _W_FDT_EVENT_H

+#define W_AMT_VERSION

+#ifdef W_AMT_VERSION

+

+#define FDT_EVENT_BASE              (0xF500)

+

+

+/************************************************************************/

+/*                         FDTÏà¹Ø½Ó¿ÚÏûÏ¢¶¨Òå                          */

+/************************************************************************/

+typedef enum

+{

+    FDT_WCDMA_SET_MODE_REQ = (unsigned short)FDT_EVENT_BASE,

+

+    FDT_WCDMA_SET_MODE_IND,

+

+    FDT_WCDMA_REL_REQ,

+

+    FDT_WCDMA_TX_OPEN_REQ,

+

+	FDT_WCDMA_TX_OPEN_IND,

+

+    FDT_WCDMA_TX_CLOSE_REQ,

+

+	FDT_WCDMA_TX_CLOSE_IND,

+

+    FDT_WCDMA_RX_OPEN_REQ,

+

+	FDT_WCDMA_RX_OPEN_IND,

+

+    FDT_WCDMA_RX_CLOSE_REQ,

+

+	FDT_WCDMA_RX_CLOSE_IND,

+

+    FDT_WCDMA_AFC_SET_REQ,

+

+	FDT_WCDMA_AFC_SET_IND,

+

+    FDT_WCDMA_CTRL_INFO_REQ,

+

+	FDT_WCDMA_CTRL_INFO_IND,

+

+    FDT_WCDMA_START_REQ,

+

+	FDT_WCDMA_START_IND,

+

+    FDT_WCDMA_AGC_GET_REQ,

+

+    FDT_WCDMA_AGC_GET_IND,

+

+	FDT_WCDMA_REL_IND,

+

+    FDT_WCDMA_HDET_GET_REQ,

+

+    FDT_WCDMA_HDET_GET_IND,

+

+    FDT_WCDMA_DCXO_TMP_READ_REQ,

+    

+	FDT_WCDMA_DCXO_TMP_READ_IND,

+

+	FDT_WCDMA_END,

+

+}E_FdtMsgId;

+

+/* PC¿ØÖÆL1W½øÈëFDTģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaSetModeReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaSetModeInd;

+

+/* PC¿ØÖÆL1WÍ˳öFDTģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaRelReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaRelInd;

+

+

+/* PC¿ØÖÆL1W´ò¿ªTX½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5

+}T_FdtWcdmaTxOpenReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wPadding;

+}T_FdtWcdmaTxOpenInd;

+

+/* PC¿ØÖÆL1W¹Ø±ÕTX½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaTxCloseReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaTxCloseInd;

+

+/* PC¿ØÖÆL1W´ò¿ªRX½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+    unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ

+	unsigned short  wFreq;                  //wFreq = ½ÓÊÕÆµµã*5

+}T_FdtWcdmaRxOpenReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaRxOpenInd;

+

+/* PC¿ØÖÆL1W¹Ø±ÕRX½»»¥ÏûÏ¢£¬Ö÷¸¨Í¨µÀͬʱ¹Ø±Õ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaRxCloseReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaRxCloseInd;

+

+/* PC¿ØÖÆL1W AFCÉèÖý»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	signed   short  swAfcDac;

+}T_FdtWcdmaAfcSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	signed   short  wPadding;

+}T_FdtWcdmaAfcSetInd;

+

+/* PC¿ØÖÆL1WУ׼ͼÑùÐÅÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wRfCh;          //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ

+    T_WcdmaFdtCtrlInfo tWcdmaFdtCtrlInfo;

+}T_FdtWcdmaCtrlInfoReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	signed   short  wPadding;

+}T_FdtWcdmaCtrlInfoInd;

+

+/* PC¿ØÖÆL1WÆô¶¯FDT½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wRfCh;          //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ

+}T_FdtWcdmaStartReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	signed   short  wPadding;

+}T_FdtWcdmaStartInd;

+

+/* PC¿ØÖÆL1WÉϱ¨AGCУ׼½á¹û½»»¥ÏûÏ¢ */

+typedef struct

+{

+    unsigned short  wId;

+    unsigned short  wPadding;

+}T_FdtWcdmaAgcGetReq;

+

+/* L1WÉϱ¨AGCУ׼½á¹ûÏûÏ¢ */

+typedef struct

+{

+    unsigned short  wId;

+    unsigned short  wPadding;

+    unsigned short  wAgcMain[100];

+    unsigned short  wAgcAux[100];

+}T_FdtWcdmaAgcGetInd;

+

+typedef struct

+{

+    unsigned short  wId;

+    unsigned short  wPadding;

+    unsigned short  wHdet[2000];

+}T_FdtWcdmaHdetGetInd;

+

+

+#endif

+#endif

diff --git a/cp/ps/modem/tools/inc/amt/w_hdt_event.h b/cp/ps/modem/tools/inc/amt/w_hdt_event.h
new file mode 100644
index 0000000..a844f46
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/w_hdt_event.h
@@ -0,0 +1,517 @@
+/********************************************************************

+* °æÈ¨ËùÓÐ (C)2001, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+*

+* ÎļþÃû³Æ£ºw_hdt_event.h

+* Îļþ±êʶ£º

+* ÄÚÈÝÕªÒª£º

+* ÆäËü˵Ã÷£º

+* µ±Ç°°æ±¾£º

+* ×÷    ÕߣºÕÅöÎöÎ

+* Íê³ÉÈÕÆÚ£º

+*

+* ÐÞ¸ÄÈÕÆÚ    °æ±¾ºÅ     ÐÞ¸ÄÈË	     ÐÞ¸ÄÄÚÈÝ

+* -----------------------------------------------

+  2014.08.18  V1.0       ÕÅöÎöÎ      н¨

+  2014.09.26  V1.0       ÕÅöÎöÎ      Ôö¼Ó»ñÈ¡APTµçѹ¹¦ÄÜ

+  2014.10.22  V1.2		 ÕÅöÎöÎ		 Ôö¼ÓζȻضÁ½Ó¿Ú

+********************************************************************/

+#ifndef _W_HDT_EVENT_H

+#define _W_HDT_EVENT_H

+

+

+

+#define HDT_WCDMA_EVENT_BASE  (0xF000)

+

+/************************************************************************/

+/*                         HDTÏà¹Ø½Ó¿ÚÏûÏ¢¶¨Òå                          */

+/************************************************************************/

+typedef enum

+{

+    /**************** ¹«¹²¿ØÖÆÐÅÏ¢  ****************/

+    HDT_WCDMA_SET_MODE_REQ = (unsigned short)HDT_WCDMA_EVENT_BASE,

+    HDT_WCDMA_SET_MODE_IND,

+

+    HDT_WCDMA_REL_REQ,

+

+    HDT_WCDMA_AFC_WR_REQ,

+    HDT_WCDMA_AFC_WR_IND,

+

+    HDT_WCDMA_AFC_RD_REQ,

+    HDT_WCDMA_AFC_RD_IND,

+

+    HDT_WCDMA_MIPI_WR_REQ,

+    HDT_WCDMA_MIPI_WR_IND,

+

+    HDT_WCDMA_MIPI_RD_REQ,

+    HDT_WCDMA_MIPI_RD_IND,

+

+    HDT_WCDMA_APT_DAC_REQ,

+    HDT_WCDMA_APT_DAC_IND,

+

+    HDT_WCDMA_REG_READ_REQ,

+    HDT_WCDMA_REG_READ_IND,

+

+    HDT_WCDMA_APC_TABLE_REQ,

+    HDT_WCDMA_APC_TABLE_IND,

+

+    HDT_WCDMA_AGC_TABLE_REQ,

+    HDT_WCDMA_AGC_TABLE_IND,

+

+	HDT_WCDMA_TMP_READ_REQ,

+	HDT_WCDMA_TMP_READ_IND,

+

+	HDT_WCDMA_HDET_READ_REQ,

+	HDT_WCDMA_HDET_READ_IND,

+

+    HDT_WCDMA_TX_DCOC_REQ,

+    HDT_WCDMA_TX_DCOC_IND,

+

+    HDT_WCDMA_DCXO_TMP_READ_REQ,

+	HDT_WCDMA_DCXO_TMP_READ_IND,

+

+

+    /**************** ·¢Éä¿ØÖÆÐÅÏ¢  ****************/

+    HDT_WCDMA_TX_OPEN_REQ = (unsigned short)(HDT_WCDMA_EVENT_BASE + 0x0100),

+    HDT_WCDMA_TX_OPEN_IND,

+

+    HDT_WCDMA_TX_FREQ_SET_REQ,

+    HDT_WCDMA_TX_FREQ_SET_IND,

+

+    HDT_WCDMA_TX_PA_MODE_SET_REQ,

+    HDT_WCDMA_TX_PA_MODE_SET_IND,

+

+    HDT_WCDMA_TX_APC_SET_REQ,

+    HDT_WCDMA_TX_APC_SET_IND,

+

+    HDT_WCDMA_TX_APC_INDEX_SET_REQ,

+    HDT_WCDMA_TX_APC_INDEX_SET_IND,

+

+    HDT_WCDMA_TX_STOP_REQ,

+    HDT_WCDMA_TX_STOP_IND,

+

+    /**************** ½ÓÊÕ¿ØÖÆÐÅÏ¢  ****************/

+    HDT_WCDMA_RX_OPEN_REQ = (unsigned short)(HDT_WCDMA_EVENT_BASE + 0x0200),

+    HDT_WCDMA_RX_OPEN_IND,

+

+    HDT_WCDMA_RX_FREQ_SET_REQ,

+    HDT_WCDMA_RX_FREQ_SET_IND,

+

+    HDT_WCDMA_RX_AGC_SET_REQ,

+    HDT_WCDMA_RX_AGC_SET_IND,

+

+    HDT_WCDMA_RX_RSSI_REQ,

+    HDT_WCDMA_RX_RSSI_IND,

+

+    HDT_WCDMA_RX_STOP_REQ,

+    HDT_WCDMA_RX_STOP_IND,

+

+	HDT_WCDMA_RX_AGC_AUTO_REQ,

+	HDT_WCDMA_RX_AGC_AUTO_IND,

+

+	HDT_WCDMA_REL_IND,

+

+}E_HdtWcdmaMsgId;

+

+

+/************************************************************************/

+/*                          ÎïÀí²ã»Ø¸´´íÎóºÅ¶¨Òå                        */

+/************************************************************************/

+typedef enum

+{

+    HDT_WCDMA_SUCCESS=0,

+

+

+}E_HdtWcdmaErrId;

+

+

+/************************************************************************/

+/*                       HDTÏà¹Ø½Ó¿ÚÏûÏ¢½á¹¹¶¨Òå                        */

+/************************************************************************/

+/* PC¿ØÖÆL1W½øÈëHDTģʽ½»»¥ÏûÏ¢£¬ÎïÀí²ã·µ»Ø´øAFC·¶Î§ÐÅÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaSetModeReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+    unsigned short  wAgcMax;

+    unsigned short  wApcIndexMax;

+	signed long     sdAfcMin;

+	signed long     sdAfcMax;

+}T_HdtWcdmaSetModeInd;

+

+

+/* PC¿ØÖÆL1WÍ˳öHDTģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaRelReq;

+

+

+/* PC¿ØÖÆL1WдAFC¿ØÖÆ×Ö½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	signed long     sdAfcVal;

+}T_HdtWcdmaAfcWrReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaAfcWrInd;

+

+

+/* PC¿ØÖÆL1W¶ÁAFC¿ØÖÆ×Ö½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaAfcRdReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+	signed long     sdAfcVal;

+}T_HdtWcdmaAfcRdInd;

+

+

+/* PC¿ØÖÆL1WдMIPI¿ØÖÆ×Ö½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wSa;                    //Ƭѡ

+	unsigned short  wAdr;                   //µØÖ·

+	unsigned short  wVal;                   //¿ØÖÆ×ÖÖµ

+}T_HdtWcdmaMipiWrReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaMipiWrInd;

+

+

+/* PC¿ØÖÆL1W¶ÁMIPI¿ØÖÆ×Ö½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	unsigned short  wSa;

+	unsigned short  wAdr;

+}T_HdtWcdmaMipiRdReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	unsigned short  eError;

+	unsigned short  wVal;

+}T_HdtWcdmaMipiRdInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wVal;

+}T_HdtWcdmaAptDacReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaAptDacInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  padding;

+	short           swDcocIdata;

+	short           swDcocQdata;

+}T_HdtWcdmaDcocReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaDcocInd;

+

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wAdr;

+}T_HdtWcdmaRegReadReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  eError;

+	unsigned long   dRegVal;

+}T_HdtWcdmaRegReadInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;

+}T_HdtWcdmaApcTableReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  eError;

+	unsigned long   dApcTable[686];

+}T_HdtWcdmaApcTableInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;

+}T_HdtWcdmaAgcTableReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  eError;

+	unsigned long   dAgcTable[123];

+}T_HdtWcdmaAgcTableInd;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaTmpReadReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  padding;

+	unsigned short  eError;

+    unsigned short  wAdc;

+}T_HdtWcdmaTmpReadInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  padding;

+	unsigned short  eError;

+    unsigned short  wDcxoTmp;

+}T_HdtWcdmaDcxoTmpReadInd;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  padding;

+	unsigned short  eError;

+    unsigned short  wPowerAdc;

+}T_HdtWcdmaPowerAdcReadInd;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaAGCAutoReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  MainVal;

+	unsigned short  AuxVal;

+	unsigned short  padding;

+}T_HdtWcdmaAGCAutoInd;

+

+

+/* PC¿ØÖÆL1W´ò¿ªTX½»»¥ÏûÏ¢ */

+typedef enum

+{

+	LowMode = 0,

+	MidMode,

+	HighMode

+}E_HdtWcdmaPaMode;

+

+typedef enum

+{

+	BPSK = 0,

+	QPSK,

+	QAM16,

+	CW,

+}E_HdtWcdmaModulateMode;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5

+    signed short    swTxPow;                //·¢É书ÂÊ£¬µ¥Î»dbm£¬¾«¶ÈÖ§³Ö0.25dbm£¬PC·¢¸øÎïÀí²ãµÄÖµswTxPow=ÉèÖÃÖµ*4

+	unsigned short  eModulateMode;

+}T_HdtWcdmaTxOpenReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxOpenInd;

+

+

+/* PC¿ØÖÆL1WÉèÖÃTXƵµã½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5

+}T_HdtWcdmaTxFreqSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxFreqSetInd;

+

+

+/* PC¿ØÖÆL1WÉèÖÃPAģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	unsigned short  ePaMode;

+    unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5

+}T_HdtWcdmaTxPaModeSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxPaModeSetInd;

+

+

+/* PC¿ØÖÆL1WÉèÖÃTX·¢É书Âʽ»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	signed short    swTxPow;                //·¢É书ÂÊ£¬µ¥Î»dbm£¬¾«¶ÈÖ§³Ö0.25dbm£¬PC·¢¸øÎïÀí²ãµÄÖµswTxPow=ÉèÖÃÖµ*4

+    unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5

+}T_HdtWcdmaTxApcSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxApcSetInd;

+

+/* PC¿ØÖÆL1WÉèÖ÷¢ÉäÂë±í¿ØÖÆ×ÖÇëÇó */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+    unsigned short  wFreq;

+    unsigned short  wIndex;

+}T_HdtWcdmaTxApcIndexSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxApcIndexSetInd;

+

+/* PC¿ØÖÆL1WÉèÖùرշ¢Éä½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short wId;

+    unsigned short  padding;

+}T_HdtWcdmaTxStopReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaTxStopInd;

+

+

+/* PC¿ØÖÆL1W´ò¿ªRX½»»¥ÏûÏ¢ */

+typedef struct

+{

+    unsigned short  wId;

+    unsigned short  padding;

+    unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ£»´ò¿ª¸¨Í¨µÀʱÐèÒª±£Ö¤Ö÷ͨµÀÒѾ­´ò¿ª

+    unsigned short  wFreq;                  //wFreq = ·¢É䯵µã*5£¬Ö÷¸¨Í¨µÀƵµãÒ»ÖÂ

+    unsigned short  wAgcValMain;            //Ö÷ͨµÀAGCÖµ£¬µ¥Î»db£¬²½½øÖ§³Ö1db

+    unsigned short  wAgcValAux;             //¸¨Í¨µÀAGCÖµ£¬µ¥Î»db£¬²½½øÖ§³Ö1db

+}T_HdtWcdmaRxOpenReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaRxOpenInd;

+

+

+/* PC¿ØÖÆL1WÉèÖÃRXƵµã½»»¥ÏûÏ¢£¬Ö÷¸¨ÆµµãÒ»Ö */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;                  //wFreq = ½ÓÊÕÆµµã*5

+}T_HdtWcdmaRxFreqSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaRxFreqSetInd;

+

+

+/* PC¿ØÖÆL1WÉèÖÃÖ÷ͨµÀAGC½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wFreq;                  //wFreq = ½ÓÊÕÆµµã*5

+	unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ

+	unsigned short  wAgcVal;                //AGCÖµ£¬µ¥Î»db£¬²½½øÖ§³Ö1db

+}T_HdtWcdmaRxAgcSetReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+	unsigned short  eError;

+    unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ

+}T_HdtWcdmaRxAgcSetInd;

+

+

+/* PC¿ØÖÆL1W»ñÈ¡Ö÷ͨµÀRSSI½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ

+    unsigned short  wAgcValMain;            //Ö÷ͨµÀÉèÖõÄAGCÖµ

+    unsigned short  wAgcValAux;             //¸¨Í¨µÀÉèÖõÄAGCÖµ

+}T_HdtWcdmaRxRssiReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+	unsigned short  wRssi;

+    unsigned short  wRfCh;                  //0:Ö÷ͨµÀ£¬1:¸¨Í¨µÀ£¬2:Ö÷¸¨Í¨µÀ

+}T_HdtWcdmaRxRssiInd;

+

+

+/* PC¿ØÖÆL1W¹Ø±ÕRX½»»¥ÏûÏ¢£¬¹Ø±ÕÖ÷¸¨Í¨µÀ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  padding;

+}T_HdtWcdmaRxStopReq;

+

+typedef struct

+{

+	unsigned short  wId;

+	unsigned short  eError;

+}T_HdtWcdmaRxStopInd;

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/amt/w_nst_event.h b/cp/ps/modem/tools/inc/amt/w_nst_event.h
new file mode 100644
index 0000000..6dfa9a1
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/w_nst_event.h
@@ -0,0 +1,261 @@
+/********************************************************************

+* °æÈ¨ËùÓÐ (C)2001, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+*

+* ÎļþÃû³Æ£ºw_nst_event.h

+* Îļþ±êʶ£º

+* ÄÚÈÝÕªÒª£º

+* ÆäËü˵Ã÷£º

+* µ±Ç°°æ±¾£º

+* ×÷    ÕߣºÕÅöÎöÎ

+* Íê³ÉÈÕÆÚ£º

+*

+* ÐÞ¸ÄÈÕÆÚ    °æ±¾ºÅ     ÐÞ¸ÄÈË	     ÐÞ¸ÄÄÚÈÝ

+* -----------------------------------------------

+  2014.08.18  V1.0       ÕÅöÎöÎ      н¨

+  2014.10.14  V1.1       ÕÅöÎöÎ      Ôö¼Ó¹¦¿Ø²ÎÊý¿ØÖƽӿÚ

+  2014.10.16  V1.2       ÕÅöÎöÎ      Ôö¼Ó²âÁ¿²ÎÊý¿ØÖƽӿÚ

+  2014.10.22  V1.3		 ÕÅöÎöÎ		 Ôö¼Ó²¿·ÖÏûÏ¢·´À¡

+********************************************************************/

+#ifndef _W_NST_EVENT_H

+#define _W_NST_EVENT_H

+

+#ifdef W_AMT_VERSION

+

+#define NST_EVENT_BASE              (0xF600)

+

+

+/************************************************************************/

+/*                         NSTÏà¹Ø½Ó¿ÚÏûÏ¢¶¨Òå                          */

+/************************************************************************/

+typedef enum

+{

+    NST_WCDMA_SET_MODE_REQ = (unsigned short)NST_EVENT_BASE,

+

+    NST_WCDMA_SET_MODE_IND,

+

+    NST_WCDMA_TRX_OPEN_REQ,

+

+	NST_WCDMA_TRX_OPEN_IND,

+

+    NST_WCDMA_TRX_CLOSE_REQ,

+

+	NST_WCDMA_TRX_CLOSE_IND,

+

+    NST_WCDMA_REL_REQ,

+

+    NST_WCDMA_SYNC_REQ,

+

+    NST_WCDMA_SYNC_IND,

+

+    NST_WCDMA_DPCH_UL_REQ,

+

+	NST_WCDMA_DPCH_UL_IND,

+

+    NST_WCDMA_DPCH_DL_REQ,

+

+	NST_WCDMA_DPCH_DL_IND,

+

+	NST_WCDMA_DPCH_REL_REQ,

+

+	NST_WCDMA_DPCH_REL_IND,

+

+    NST_WCDMA_BER_MEAS_REQ,

+

+    NST_WCDMA_BER_MEAS_IND,

+

+	NST_WCDMA_PC_PARA_REQ,

+

+	NST_WCDMA_PC_PARA_IND,

+

+    NST_WCDMA_FREQ_CHGE_REQ,

+

+	NST_WCDMA_FREQ_CHGE_IND,

+

+	NST_WCDMA_NV_PARA_UPDATE_REQ,

+

+	NST_WCDMA_NV_PARA_UPDATE_IND,

+

+	NST_WCDMA_RSSI_MEAS_REQ,

+

+	NST_WCDMA_RSSI_MEAS_IND,

+

+	NST_WCDMA_REL_IND,

+}E_NstMsgId;

+

+/* PC¿ØÖÆL1W½øÈëNSTģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaSetModeReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaSetModeInd;

+

+/* PC¿ØÖÆL1WÍ˳öNSTģʽ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaRelReq;

+

+/* PC¿ØÖÆL1W´ò¿ªÉÏÐн»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wFreqTx;

+    unsigned short  wFreqRx;

+    unsigned short  wRxChState;

+}T_NstWcdmaTRxOpenReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaTRxOpenInd;

+

+/* PC¿ØÖÆL1W¹Ø±ÕÉÏÏÂÐн»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaTRxCloseReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaTRxCloseInd;

+

+/* PC¿ØÖÆL1Wͬ²½ÒÇ±í½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wFreq;

+}T_NstWcdmaSyncReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaSyncInd;

+

+/* PC¿ØÖÆL1W½¨Á´½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wFreqTx;

+    unsigned short  wFreqRx;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchUlReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchUlInd;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchDlReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchDlInd;

+

+/* PC¿ØÖÆL1WÊÍ·ÅDPCH½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchRelReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaDpchRelInd;

+

+/* PC¿ØÖÆL1W BER²âÊÔ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wTtiLen;    //TTI¸öÊý£¬Ã¿¸öTTI 244bit

+}T_NstWcdmaBerMeasReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wErrNum;    //´íÎóbitÊý

+    unsigned short  wTotalNum;

+    unsigned short  wPadding;

+}T_NstWcdmaBerMeasInd;

+

+/* PC¿ØÖÆL1WÐÞ¸ÄPC²ÎÊý½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wTpcAlg; 		//0:Ëã·¨1, 1:Ëã·¨2

+    unsigned short  wTpcStepSize;	//0:1db, 1:2db

+    unsigned short  wPadding;

+}T_NstWcdmaPcParaReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaPcParaInd;

+

+/* PC¿ØÖÆL1WÇл»ÐŵÀ½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wFreqTx;

+    unsigned short  wFreqRx;

+    unsigned short  wPadding;

+}T_NstWcdmaFreqChgeReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaFreqChgeInd;

+

+

+/* PC¿ØÖÆL1W¸üÐÂNV½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaNvParaUpdateReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wPadding;

+}T_NstWcdmaNvParaUpdateInd;

+

+/* PC¿ØÖÆL1W»ñÈ¡RSSI½»»¥ÏûÏ¢ */

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wFreq;

+}T_NstWcdmaRssiMeasReq;

+

+typedef struct

+{

+	unsigned short  wId;

+    unsigned short  wRssiMain;

+    unsigned short  wRssiAux;

+    unsigned short  wPadding;

+}T_NstWcdmaRssiMeasInd;

+#endif

+#endif

+

diff --git a/cp/ps/modem/tools/inc/amt/w_nv_param.h b/cp/ps/modem/tools/inc/amt/w_nv_param.h
new file mode 100644
index 0000000..86863bd
--- /dev/null
+++ b/cp/ps/modem/tools/inc/amt/w_nv_param.h
@@ -0,0 +1,593 @@
+/********************************************************************

+* °æÈ¨ËùÓÐ (C)2001, ÉîÛÚÊÐÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+*

+* ÎļþÃû³Æ£ºw_nv_param.h

+* Îļþ±êʶ£º

+* ÄÚÈÝÕªÒª£º

+* ÆäËü˵Ã÷£º¹¤¾ßÓëÎïÀí²ã¹²ÓÃÍ·Îļþ

+* µ±Ç°°æ±¾£º

+* ×÷    ÕߣºÕÅöÎöÎ

+* Íê³ÉÈÕÆÚ£º

+*

+* ÐÞ¸ÄÈÕÆÚ    °æ±¾ºÅ     ÐÞ¸ÄÈË	     ÐÞ¸ÄÄÚÈÝ

+* -----------------------------------------------

+  2014.08.18  V1.0       ÕÅöÎöÎ      н¨

+  2014.08.27  V1.1       ÑîÑÇÎ÷      Ìí¼ÓÓû§NVºÍУ׼NV²¿·ÖƵ¶ÎÄÚÈÝ£¬ÐÞ¸ÄÔ­½á¹¹Ì岿·Ö²ÎÊý

+  2014.09.10  V1.2       ÕÅöÎöÎ      ÓÅ»¯UserNvÌìÏß¿ª¹ØNV½á¹¹

+  2014.09.10  V1.3       ÕÅöÎöÎ      ÐÞ¸ÄÖ§³Ö¶àµãAPT¹¦ÄÜ

+  2014.11.12  V1.4       ÕÅöÎöÎ      Ôö¼Ó²¹³äƵµãУ׼NV

+********************************************************************/

+#ifndef _W_NV_PARAM_H

+#define _W_NV_PARAM_H

+

+/************************************************************************/

+/*                            У׼¿ØÖÆNV¶¨Òå                            */

+/************************************************************************/

+#define FREQ_MAX                    12     /* µ¥¸öƵ¶ÎÄÚÖ§³Ö×î¶àµÄƵµãÊý */

+#define FDT_TX_INIT_POW             10      /* ³õʼ»¯·¢É书ÂÊ10dbm */

+#define FDT_TX_POW_STEP_LEN         6       /* TX APCУ׼ʱÿ¸ö¹¦Âʵã³ÖÐøÊ±¼ä£¬µ¥Î»Slot */

+#define FDT_RX_AGC_STEP_ELN         (FDT_TX_POW_STEP_LEN << 1)       /* RX AGCУ׼ʱÿ¸ö¹¦ÂʵãAGCÊÕÁ²Ê±¼ä£¬µ¥Î»Slot£¬Èç¹û¿¼ÂÇPAÖÐÔöÒæ£¬´Ë´¦Îª9£¨Æµ²¹Ê±Ð迼ÂÇÉÏÏÂÐÐÆµµã¶ÔÓ¦£© */

+

+#define TX_APC_POW_PA_HIGH_MAX          ((signed short)(112))        /* ((signed short)(28 * 4))  PA¸ßÔöÒæÂë±í·¶Î§28~-6dbm */

+#define TX_APC_POW_PA_HIGH_MIN          ((signed short)(-24))        /* ((signed short)((-6) * 4)) */

+#define TX_APC_NV_PA_HIGH_LEN           ((unsigned short)(137))      /* ((unsigned short)(TX_APC_POW_PA_HIGH_MAX - TX_APC_POW_PA_HIGH_MIN + 1)) */

+

+#define TX_APC_POW_PA_LOW_MAX           ((signed short)(56))         /* ((signed short)(14 *4))         PAµÍÔöÒæÂë±í·¶Î§14~-60dbm */

+#define TX_APC_POW_PA_LOW_MIN           ((signed short)(-240))       /* ((signed short)((-60) * 4)) */

+#define TX_APC_NV_PA_LOW_LEN            ((unsigned short)(297))      /* ((unsigned short)(TX_APC_POW_PA_LOW_MAX - TX_APC_POW_PA_LOW_MIN + 1)) */

+

+#define RX_AGC_POW_MAX                  ((signed short)(-19))        /* ÏÂÐÐУ׼¹¦ÂÊ·¶Î§-19~-110dbm */

+#define RX_AGC_POW_MIN                  ((signed short)(-110))

+#define RX_AGC_NV_LEN                   ((unsigned short)(92))       /* ((unsigned short)(RX_AGC_POW_MAX - RX_AGC_POW_MIN + 1)) */

+

+#define FREQ_COMP_NUM                    32                          /* Ƶ²¹Ã¿¸öƵ¶ÎÄÚµãÊý£¬ÒÔ×î¶àµÄ¶¨Òå */

+#define TMP_COMP_NUM                     40                          /* β¹Ã¿¸öƵ¶ÎÄÚµãÊý */

+

+#define TX_APC_PA_HIGH_LEN_MAX           300

+#define TX_APC_PA_MID_LEN_MAX            300

+#define TX_APC_PA_LOW_LEN_MAX            600

+

+typedef struct

+{

+    unsigned short wApcInd;

+    unsigned short wAptDac;

+}T_WcdmaFdtApcCtrlInfo;

+

+typedef struct

+{

+    unsigned short wFreqTx;

+    unsigned short wFreqRx;

+}T_WcdmaFdtFreqInfo;

+

+typedef struct

+{

+    unsigned short          wTotalSlotLen;                                       /* wTotalSlotLen = (wPaHighLen+wPaMidLen+wPaLowLen)*FDT_TX_POW_STEP_LEN */

+    unsigned short          wPaHighLen;                                          /* µ¥¸öƵµãÄÚPA±£³ÖΪ¸ßÔöÒæ¹¦ÂʵãÊý */

+    unsigned short          wPaMidLen;                                           /* µ¥¸öƵµãÄÚPA±£³ÖΪÖÐÔöÒæ¹¦ÂʵãÊý */

+    unsigned short          wPaLowLen;                                           /* µ¥¸öƵµãÄÚPA±£³ÖΪµÍÔöÒæ¹¦ÂʵãÊý */

+    

+    T_WcdmaFdtApcCtrlInfo   tWcdmaFdtApcPaHighCtrlInfo[TX_APC_PA_HIGH_LEN_MAX];

+    T_WcdmaFdtApcCtrlInfo   tWcdmaFdtApcPaMidCtrlInfo[TX_APC_PA_MID_LEN_MAX];

+    T_WcdmaFdtApcCtrlInfo   tWcdmaFdtApcPaLowCtrlInfo[TX_APC_PA_LOW_LEN_MAX];

+}T_WcdmaFdtPaCtrlInfo;

+

+

+typedef struct

+{

+    unsigned short wApcIndex;

+	unsigned short wPadding;

+    signed short   swReg285;

+    signed short   swReg286;

+    signed short   swReg285_10MHz;   /*reg285/10MHz*/

+    signed short   swReg286_10MHz;   /*reg286/10MHz*/

+}T_WcdmaFdtDcocData;

+

+/* AMT FDT step½á¹¹Ìå */

+typedef struct

+{

+    unsigned short wCenterChannel;  /*DCOCУ׼Ƶµã*/

+    unsigned short wNum;            /*DCOCУ׼ÓÐЧ×éÊý£¬×î´óÖ§³Ö6×é*/

+    T_WcdmaFdtDcocData wDcoc[6];    /*DCOCУ׼Êý¾Ý*/

+}T_WcdmaFdtDcocInfo;

+

+/* PC²à¸øL1WµÄУ׼¿ØÖÆÐÅÏ¢ */

+typedef struct

+{

+

+    unsigned short          wFreqNum;                                            /* ÉÏÏÂÐÐÆµµã¶ÔÓ¦£¬¸öÊýÒ»Ñù£»¸ù¾ÝwFreqNumÈ·ÈÏÓÐЧƵµã¸öÊý */

+    unsigned short          wPadding;

+

+    T_WcdmaFdtFreqInfo      tWcdmaFdtFreqInfo[FREQ_MAX];

+

+    T_WcdmaFdtPaCtrlInfo    tWcdmaFdtPaCtrlInfo;

+

+	T_WcdmaFdtDcocInfo      tWcdmaFdtDcocInfo;

+}T_WcdmaFdtCtrlInfo;

+

+

+

+/************************************************************************/

+/*                           RFУ׼ֵNV¶¨Òå                             */

+/************************************************************************/

+

+typedef struct

+{

+    unsigned short  wRate;

+    signed short    swFreqErr;

+    unsigned short  awReserved[10];

+}T_WcdmaNvAfcCalibData;

+

+typedef struct

+{

+    unsigned long    dCtrlWord0;

+    unsigned long    dCtrlWord1;

+    unsigned long    dAptDac0;

+    unsigned long    dAptDac1;

+}T_WcdmaNvApcCtrlWord;

+

+typedef struct

+{

+    unsigned long    dCtrlWord0;

+    unsigned long    dCtrlWord1;

+}T_WcdmaNvAgcCtrlWord;

+

+typedef struct

+{

+    T_WcdmaNvApcCtrlWord   atWcdmaNvApcCtrlWordPaH[TX_APC_NV_PA_HIGH_LEN];

+    T_WcdmaNvApcCtrlWord   atWcdmaNvApcCtrlWordPaL[TX_APC_NV_PA_LOW_LEN];

+}T_WcdmaNvApcCalibData;

+

+typedef struct

+{

+    T_WcdmaNvAgcCtrlWord   atWcdmaNvAgcMainCtrlWord[RX_AGC_NV_LEN];

+    T_WcdmaNvAgcCtrlWord   atWcdmaNvAgcAuxCtrlWord[RX_AGC_NV_LEN];

+}T_WcdmaNvAgcCalibData;

+

+typedef struct

+{

+    signed short           aswWcdmaNvApcFreqCompPaH[FREQ_COMP_NUM];

+    signed short           aswWcdmaNvApcFreqCompPaL[FREQ_COMP_NUM];

+}T_WcdmaNvApcFreqCompData;

+

+typedef struct

+{

+    signed short           aswWcdmaNvAgcFreqCompMain[FREQ_COMP_NUM];

+    signed short           aswWcdmaNvAgcFreqCompAux[FREQ_COMP_NUM];

+}T_WcdmaNvAgcFreqCompData;

+

+typedef struct

+{

+    unsigned short      wTmpVal;       /* ADCζÈÖµ */

+    signed short        swDeltaPow;     /* ²»Í¬Î¶ÈÏÂÓë³£ÎÂÏÂ×î´ó·¢É书ÂʵIJîÖµ */

+}T_WcdmaNvApcTmpCompData;

+

+

+typedef struct

+{

+    unsigned long        dGroup;

+    unsigned long        dRxMain;

+    unsigned long        dRxAux;

+    unsigned long        dRxAll;

+    unsigned long        dTx;

+    unsigned long        dIdleRxMain;

+    unsigned long        dIdleRxAux;

+    unsigned long        dIdleRxAll;

+    unsigned long        dIdleTx;

+    unsigned long        dIdle;

+    unsigned long        adReserved[6];

+}T_WcdmaNvSwitchGpioCtrlWord;

+

+typedef struct

+{

+    unsigned long        dRxMain;

+    unsigned long        dRxAux;

+    unsigned long        dRxAll;

+    unsigned long        dTx;

+    unsigned long        dIdleRxMain;

+    unsigned long        dIdleRxAux;

+    unsigned long        dIdleRxAll;

+    unsigned long        dIdleTx;

+    unsigned long        dIdle;

+    unsigned long        adReserved[6];

+}T_WcdmaNvSwitchMipiCtrlWord;

+

+typedef struct

+{

+    T_WcdmaNvSwitchGpioCtrlWord tWcdmaNvSwitchGpioCtrlWord0;

+    T_WcdmaNvSwitchGpioCtrlWord tWcdmaNvSwitchGpioCtrlWord1;

+    unsigned long               adReserved0[32];

+

+    T_WcdmaNvSwitchMipiCtrlWord tWcdmaNvSwitchMipiCtrlWord0;

+    T_WcdmaNvSwitchMipiCtrlWord tWcdmaNvSwitchMipiCtrlWord1;

+    unsigned long               adReserved1[30];

+}T_WcdmaNvSwitchData;

+

+

+typedef struct

+{

+    unsigned long        dGroup;

+    unsigned long        dPaHigh;

+    unsigned long        dPaMid;

+    unsigned long        dPaLow;

+	unsigned long        dIdle;

+    unsigned long        adReserved[7];

+}T_WcdmaNvPaGpioCtrlWord;

+

+typedef struct

+{

+    unsigned long        dPaHigh;

+    unsigned long        dPaMid;

+    unsigned long        dPaLow;

+	unsigned long        dIdle;

+    unsigned long        adReserved[7];

+}T_WcdmaNvPaMipiCtrlWord;

+

+typedef struct

+{

+    T_WcdmaNvPaGpioCtrlWord tWcdmaNvPaGpioCtrlWord0;

+    T_WcdmaNvPaGpioCtrlWord tWcdmaNvPaGpioCtrlWord1;

+    unsigned long           adReserved0[24];

+

+    T_WcdmaNvPaMipiCtrlWord tWcdmaNvPaMipiCtrlWord0;

+    T_WcdmaNvPaMipiCtrlWord tWcdmaNvPaMipiCtrlWord1;

+    unsigned long           adReserved1[22];

+}T_WcdmaNvPaData;

+

+typedef struct

+{

+    signed   short      swTxMaxPow;

+    unsigned short      awResved[39];

+}T_WcdmaNvCtrl;

+

+typedef enum

+{

+    APC_CALIB_PATCH_B1=0,

+    APC_CALIB_PATCH_B2,

+    APC_CALIB_PATCH_B5,

+    APC_CALIB_PATCH_B8,

+}E_ApcCalibPatchBand;

+

+typedef struct

+{

+    unsigned long               dPatchFlag;                                 /* ²¹³äƵµã¶ÔÓ¦µÄƵ¶Î 0:B1,1:B2,2:B5,3:B8 */

+    unsigned long               dPatchHL;                           		/* ¸ßµÍÑ¡Ôñ 0:¸ß£¬1:µÍ */

+    unsigned long               dPatchfreq;                                 /* Ƶµã½ç£¬¼´´óÓÚ(СÓÚ)µÈÓÚ´ËÆµµãÈ¡PatchÖеÄУ׼ֵ */

+    T_WcdmaNvApcCalibData       tWcdmaNvApcCalibDataPatch;                  /* ²¹³äƵµãУ׼ֵ */

+}T_WcdmaNvApcCalibPatch;

+/* AMTУ׼Ïà¹ØµÄNV²ÎÊý */

+typedef struct

+{

+    unsigned short              wTotalLen;                                  /* ×ܳ¤¶È£¬µ¥Î»BYTE */

+    signed   short              swRssiOffset;                               /* RSSIÆ«ÒÆÖµ */

+

+	unsigned long               adReserved[20];

+

+    T_WcdmaNvAfcCalibData       tWcdmaNvAfcCalibData;                       /* AFCУ׼NV */

+

+    /* B1Ƶ¶ÎУ׼ÐÅÏ¢ */

+    T_WcdmaNvApcCalibData       tWcdmaNvApcCalibDataB1;                     /* B1Ƶ¶ÎAPCУ׼ֵ */

+    T_WcdmaNvApcFreqCompData    tWcdmaNvApcFreqCompDataB1;                  /* B1Ƶ¶ÎAPCƵ²¹Öµ */

+    T_WcdmaNvAgcCalibData       tWcdmaNvAgcCalibDataB1;                     /* B1Ƶ¶ÎAGCУ׼ֵ */

+    T_WcdmaNvAgcFreqCompData    tWcdmaNvAgcFreqCompDataB1;                  /* B1Ƶ¶ÎAGCƵ²¹Öµ */

+

+	/* B2Ƶ¶ÎУ׼ÐÅÏ¢ */

+    T_WcdmaNvApcCalibData       tWcdmaNvApcCalibDataB2;                     /* B2Ƶ¶ÎAPCУ׼ֵ */

+    T_WcdmaNvApcFreqCompData    tWcdmaNvApcFreqCompDataB2;                  /* B2Ƶ¶ÎAPCƵ²¹Öµ */

+    T_WcdmaNvAgcCalibData       tWcdmaNvAgcCalibDataB2;                     /* B2Ƶ¶ÎAGCУ׼ֵ */

+    T_WcdmaNvAgcFreqCompData    tWcdmaNvAgcFreqCompDataB2;                  /* B2Ƶ¶ÎAGCƵ²¹Öµ */

+

+    /* B5Ƶ¶ÎУ׼ÐÅÏ¢ */

+    T_WcdmaNvApcCalibData       tWcdmaNvApcCalibDataB5;                     /* B5Ƶ¶ÎAPCУ׼ֵ */

+    T_WcdmaNvApcFreqCompData    tWcdmaNvApcFreqCompDataB5;                  /* B5Ƶ¶ÎAPCƵ²¹Öµ */

+    T_WcdmaNvAgcCalibData       tWcdmaNvAgcCalibDataB5;                     /* B5Ƶ¶ÎAGCУ׼ֵ */

+    T_WcdmaNvAgcFreqCompData    tWcdmaNvAgcFreqCompDataB5;                  /* B5Ƶ¶ÎAGCƵ²¹Öµ */

+

+	/* B8Ƶ¶ÎУ׼ÐÅÏ¢ */

+    T_WcdmaNvApcCalibData       tWcdmaNvApcCalibDataB8;                     /* B8Ƶ¶ÎAPCУ׼ֵ */

+    T_WcdmaNvApcFreqCompData    tWcdmaNvApcFreqCompDataB8;                  /* B8Ƶ¶ÎAPCƵ²¹Öµ */

+    T_WcdmaNvAgcCalibData       tWcdmaNvAgcCalibDataB8;                     /* B8Ƶ¶ÎAGCУ׼ֵ */

+    T_WcdmaNvAgcFreqCompData    tWcdmaNvAgcFreqCompDataB8;                  /* B8Ƶ¶ÎAGCƵ²¹Öµ */

+

+    /* ²¹³äƵµãУ׼ÐÅÏ¢ */

+    unsigned long               dPatchEnable;                               /* ²¹³äƵµãУ׼ʹÄܱêÖ¾ */  

+    T_WcdmaNvApcCalibPatch      tWcdmaNvApcCalibPatch;                      /* ²¹³äƵµãУ׼ÐÅÏ¢ */

+}T_WcdmaCalibNv;

+

+typedef struct

+{

+    unsigned long		dDac0PaH;

+	unsigned long		dDac1PaH;

+	unsigned long		dDac0PaL;

+	unsigned long		dDac1PaL;

+    unsigned long       adResved[12];

+}T_WcdmaNvApt;

+

+/* ÐͺŻúÏà¹ØNV£¬ÌìÏß¿ª¹Ø¡¢PA¡¢Î²¹¡¢ÆäËü¿ØÖÆ */

+typedef struct

+{

+    unsigned short              wTotalLen;                                  /* ×ܳ¤¶È£¬µ¥Î»BYTE */

+    unsigned short              wPadding;

+

+    unsigned long               adReserved[40];

+

+    T_WcdmaNvCtrl               tWcdmaNvCtrl;                               /* ¿ØÖÆÏà¹ØµÄNV */

+

+	T_WcdmaNvApt				tWcdmaNvApt;								/* APTµÄNV */

+

+    T_WcdmaNvApcTmpCompData     atWcdmaNvApcTmpCompDataB1[TMP_COMP_NUM];    /* B1Ƶ¶ÎAPCβ¹ */

+    T_WcdmaNvSwitchData         tWcdmaNvSwitchDataB1;                       /* B1Ƶ¶ÎÌìÏß¿ª¹Ø */

+    T_WcdmaNvPaData             tWcdmaNvPaDataB1;                           /* B1Ƶ¶ÎPA */

+

+	T_WcdmaNvApcTmpCompData     atWcdmaNvApcTmpCompDataB2[TMP_COMP_NUM];    /* B2Ƶ¶ÎAPCβ¹ */

+    T_WcdmaNvSwitchData         tWcdmaNvSwitchDataB2;                       /* B2Ƶ¶ÎÌìÏß¿ª¹Ø */

+    T_WcdmaNvPaData             tWcdmaNvPaDataB2;                           /* B2Ƶ¶ÎPA */

+

+	T_WcdmaNvApcTmpCompData     atWcdmaNvApcTmpCompDataB5[TMP_COMP_NUM];    /* B5Ƶ¶ÎAPCβ¹ */

+    T_WcdmaNvSwitchData         tWcdmaNvSwitchDataB5;                       /* B5Ƶ¶ÎÌìÏß¿ª¹Ø */

+    T_WcdmaNvPaData             tWcdmaNvPaDataB5;                           /* B5Ƶ¶ÎPA */

+

+    T_WcdmaNvApcTmpCompData     atWcdmaNvApcTmpCompDataB8[TMP_COMP_NUM];    /* B8Ƶ¶ÎAPCβ¹ */

+    T_WcdmaNvSwitchData         tWcdmaNvSwitchDataB8;                       /* B8Ƶ¶ÎÌìÏß¿ª¹Ø */

+    T_WcdmaNvPaData             tWcdmaNvPaDataB8;                           /* B8Ƶ¶ÎPA */

+}T_WcdmaUserNv;

+

+

+/************************************************************************/

+/*                           »ù´øNV¶¨Òå                                 */

+/************************************************************************/

+/********** L1S NV**********/

+typedef struct

+{

+    unsigned short wL1wSegUpdateNum;        /* ×ÊÔ´¸üÐÂʹÓã¬Ã¿¸ôÖ¸¶¨Ö¡Êý¶ÎÐÅϢʱ¿Ì¸Ä±äÒ»´Î   (ĬÈÏÖµ:16) */

+    unsigned short wL1wRfctrlStartIndex;    /* ×ÊÔ´ÉêÇëÆðʼλÖõÄÏà¶ÔÖ¡ºÅ           (ĬÈÏÖµ:0) */

+    unsigned short wL1wRfctrlStartSlot;     /* ×ÊÔ´ÉêÇëÆðʼλÖÃÆ«ÒÆ                 (ĬÈÏÖµ:6) */

+    unsigned short wL1wRfctrlEndSlot;       /* ×ÊÔ´ÉêÇë½áÊøÎ»ÖÃÆ«ÒÆ                 (ĬÈÏÖµ:5) */

+    unsigned short wL1wDchRfctrlStartSlot;  /* DCH̬×ÊÔ´ÉêÇëÆðʼλÖÃÆ«ÒÆ            (ĬÈÏÖµ:12) */

+	unsigned short wL1wDchRfctrlEndSlot;    /* DCH̬×ÊÔ´ÉêÇë½áÊøÎ»ÖÃÆ«ÒÆ            (ĬÈÏÖµ:11) */

+	unsigned short wL1wFreqChProtectChip;   /* ͬƵµ½ÒìÆµµÄ±£»¤¼ä¸ô£¬µ¥Î»chips      (ĬÈÏÖµ:768) */

+    unsigned short wEngReserved[5];         /* ±£Áô²ÎÊý */

+}T_L1wNvL1sCmn;

+

+typedef struct

+{

+    unsigned short wStep1Slot;                      /*STEP1ÀÛ¼ÆÊ±Ï¶Êý£¬Ä¬ÈÏÖµ30*/

+    unsigned short wStep2Slot;                      /*STEP2ÀÛ¼ÆÊ±Ï¶Êý£¬Ä¬ÈÏÖµ60*/

+    unsigned short wStep3Slot;                      /*STEP3ÀÛ¼ÆÊ±Ï¶Êý£¬Ä¬ÈÏÖµ15*/

+    unsigned short wFsAcclength;                    /*FULLSCANÏà¹ØÀÛ¼Ó³¤¶È£¬Ä¬ÈÏÖµ4*/

+    unsigned long  wStep23ResLength;                /*STEP23ÉêÇë×ÊÔ´³¤¶È£¬Ä¬ÈÏÖµ16*38400*/

+    unsigned short wCsAbortTime;                    /*CS Abort time£¬1000,ĬÈÏÖµ10Ãë*/

+	unsigned short wEngReserved[5];                 /* ±£Áô²ÎÊý */

+}T_L1wNvCs;

+

+/********** BCH NV **********/

+typedef struct

+{

+	unsigned short	wBchAfcSlotNum;			/* BCH¼°CPICH½ÓÊս׶Σ¬¸øAFC·¢ËͶàÉÙ¸öʱ϶µÄÊý¾Ý£¬Ä¬ÈÏÖµ: 13 */

+	unsigned short	wPichAfcSlotNum;		/* PICH½ÓÊս׶Σ¬ ¸øAFC·¢ËͶàÉÙ¸öʱ϶µÄÊý¾Ý£¬Ä¬ÈÏÖµ: 3 */

+

+	unsigned short	wMinPichCfgAheadChip;	/* PICH½âÂëʱ£¬ÅäÖÃÓ²¼þÖÁÉÙÓ¦ÌáǰµÄCHIPÊý£¬Ä¬ÈÏÖµ: 2560 */

+	unsigned short	wNormBchCfgAheadChip;	/* step5Ó²¼þÌáǰÅäÖã¬Õý³£Çé¿öÏÂÌáǰ¶àÉÙ¸öCHIP£¬Ä¬ÈÏÖµ: 3072 */

+	unsigned short	wMaxBchCfgAheadChip;	/* step5Ó²¼þÌáǰÅäÖã¬×î¶àÇé¿öÏÂÌáǰ¶àÉÙ¸öCHIP£¬Ä¬ÈÏÖµ: 3584 */

+	unsigned short	wMaxBchIntDelayChip;	/* step5Ó²¼þBCH½âÂëʱ£¬ÖжϾàÀë֡β×î¶à¶àÉÙ¸öCHIP£¬ ĬÈÏÖµ: 3584 */

+	unsigned short	wBchFilterChipLen;		/* step5Ó²¼þ¹¤×÷ǰºóCPICH¼Ó´°CHIPÊý£¬Ä¬ÈÏÖµ£º2048 */

+	unsigned short	wPichStartAheadChip;	/* PICHÅäÖÃÓ²¼þ£¬Ïà¶ÔÓÚPAGE¸ø³öµÄPiPosµÄÌáǰÁ¿£¬Ä¬ÈÏÖµ£º1536 */

+

+	unsigned short	wBchSlotendIntIndex;	/* step5Ó²¼þCPICHʱ϶ÖжÏË÷Òý£¬Ä¬ÈÏÖµ: 4 */

+	unsigned short	wBchCrcIntIndex;		/* step5Ó²¼þBCH¼°PICHÖжÏË÷Òý£¬Ä¬ÈÏÖµ: 5 */

+

+	unsigned short	wAfcConvergeLen;		/* AFCƵƫÊý¾ÝÔ´×¼±¸£¬Ã¿´Î¹¤×÷»ù±¾Ö¡Êý£¬Ä¬ÈÏÖµ: 3 */

+	unsigned short	wAfcLockOldInterval;	/* AFCƵƫÊÕÁ²±êÖ¾ÀÏ»¯Ê±¼ä£¬Ä¬ÈÏÖµ: 10 */

+

+	unsigned short	wMaxBchSerialIntDelay;	/* BCH´®Ö¡½âÂëÖжϣ¬×µÈ´ýʱ¼ä£¬Ä¬ÈÏÖµ: 11 */

+	unsigned short	wMaxPreSyncTryCount;	/* ǰÖÃSFN½âÂë´¦Àí£¬×î¶à³¢ÊÔ´ÎÊý£¬Ä¬ÈÏÖµ: 8 */

+	unsigned short  wMaxBchDecodeIntCnt;	/* BCH½âÂëÖжϣ¬×î¶àÖжϴÎÊý£¬Ä¬ÈÏÖµ: 8 */

+	unsigned short  wL1wBchReserved0[1];    /* ±£Áô²ÎÊý */

+

+	unsigned short	wPathOldInterval;		/* ¶à¾¶ÀÏ»¯Ê±¼ä£¬Ä¬ÈÏÖµ: 4 */

+	unsigned short	wBchInnerSchedMinDist;	/* BCH_OPEN½×¶Î£¬ÔÊÐíÁÙʱ´¦ÀíÄÚ²¿¼¤»îÇëÇóʱµÄ×îСSIB¾àÀ룬ĬÈÏÖµ: 9 */

+

+	unsigned long	wCpichIntMask;			/* CPICHÖÐ¶ÏÆÁ±Î£¬Ä¬ÈÏÖµ: 0x000003f0 */

+	unsigned long	wMaxAfcRuntime;			/* AFC×î´ó¹¤×÷ʱ¼ä£¬Ä¬ÈÏÖµ: 0xfff */

+	unsigned short  wL1wBchReserved1[14];/* ±£Áô²ÎÊý */

+}T_L1wNvBch;

+

+/********** PSR NV **********/

+typedef struct

+{

+	unsigned short  wAdvanceTime;       /*Ìáǰ32¸ösampleÅäÖÃÓ²¼þ£¬                       ´ËֵĬÈÏΪ  32*/

+	unsigned short  wPsrWorkFrame;      /*PSRÓ²¼þ¹¤×÷µÄÖ¡Êý£¬                            ´ËÖµÏÖĬÈÏΪ4*/

+	unsigned short  wPsrCalMode;        /*PSRÓ²¼þµÄ¼ÆËãģʽ£¬                            ÏÖĬÈÏΪ4*/

+	unsigned short  wPsrUpdateRl;       /*PSR¸üÐÂÖ¡±ß½çʱҪ¼ÓµÄÖ¡Êý£¬                    ´ËֵĬÈÏΪ5*/

+	unsigned short  wSrchLength;        /*ËÑË÷´°³¤¶È,                                    ÏÖĬÈÏΪ640*/

+	unsigned short  wPathDetectDiff;    /*¾¶¼ì²âÖоàÀë²îÃÅÏÞ                             ĬÈÏΪ3*/

+	unsigned short  wPathDetectIndex;   /*¾¶¼ì²âÖÐ×îС¾àÀë²îË÷Òý                         ĬÈÏΪ1*/

+	unsigned short  wOutStepThr;        /*ͬ²½±£»¤ÖеÄʧ²½ÃÅÏÞÏÈ                         ĬÈÏΪ3*/

+	unsigned short  wSyncThr;           /*ͬ²½±£»¤ÖеÄͬ²½ÃÅÏÞÏÖ                         ĬÈÏΪ2*/

+	unsigned short  wFigUpdateFator;    /*Ö¸·åË¢ÐÂÒò×Ó0.8165¶¨±êΪU(16,15),·Ö×Ó          ĬÈÏΪ26755*/

+	unsigned short  wFigUpdateDeno;     /*Ö¸·åË¢ÐÂÒò×Ó0.8165¶¨±êΪU(16,15),ÐèÒª×óÒÆ15룬´ËֵĬÈÏΪ15*/

+	unsigned short  wCandUpdateThr;     /*ºòѡָ·åˢеľàÀëÃÅÏÞÖµ                       ÏÖĬÈÏΪ3*/

+	unsigned short  wAdrWindowFator;    /*ADRËÑË÷´°¸üÐÂÄÜÁ¿0.9¶¨±êΪU(16,16),            ´ËֵĬÈÏΪ58982*/

+	unsigned short  wAdrWindowDeno;     /*ADRËÑË÷´°¸üÐÂÄÜÁ¿0.9¶¨±êΪU(16,16),            ´ËֵĬÈÏΪ16*/

+	unsigned short  wFstStrongDiff;     /*×îÇ¿¾¶ºÍ×îÔç¾¶µÄ¾àÀë²î£¬                       ÏÖĬÈÏΪ8*/

+	unsigned short  wNoiseThrFathr;     /*¾¶¼ì²âµÄÔëÉùÃÅÏÞÖµ1.6¶¨±êΪU(16,14),           ÏÖĬÈÏΪ26214*/

+	unsigned short  wMaxThrFathr;       /*¾¶¼ì²âµÄ×î´óÖµÏÞÖµ0.28¶¨±êΪU(16,16),          ÏÖĬÈÏΪ18350*/

+	unsigned short  wIntiMaxThrFathr;   /*´Ö¾¶¼ì²âµÄ×î´óÖµÃÅÏÞÖµ0.24*1.2 ¶¨±êΪU(16,16), ÏÖĬÈÏΪ18874*/

+	unsigned short  wIntiNoiseThrFathr; /*´Ö¾¶¼ì²âµÄÔëÉùÃÅÏÞÖµ1.6*1.2 ¶¨±êΪU(16,14),    ÏÖĬÈÏΪ34157*/

+	unsigned short  wMaxDeno;           /*×î´óÖµÃÅÏÞÖµµÄÒÆÎ»£¬                           ĬÈÏΪ16*/

+	unsigned short  wNoiseDeno;         /*ÔëÉùÃÅÏÞÖµµÄÒÆÎ»£¬                             ĬÈÏΪ14*/

+	unsigned short  wDpchLeftOffset;    /*Ö÷¾¶·¶Î§ÄÚµÄ×ó±ÕÇø¼ä£¬                         ĬÈÏΪ592*/

+	unsigned short  wDpchRightOffset;   /*Ö÷¾¶·¶Î§ÄÚµÄÓÒ±ÕÇø¼ä£¬                         ĬÈÏΪ912*/

+	unsigned short  wL1wPsrReserved0[1]; /* ±£Áô²ÎÊý */

+	unsigned long   dOverFrameThr;      /*ÅжϿçÖ¡±ß½ç£¬ÃÅÏÞֵΪ76800,                   ĬÈÏ76800*/

+	unsigned short  wL1wPsrReserved1[14];/* ±£Áô²ÎÊý */

+}T_L1wNvPsr;

+

+/********** RTX NV **********/

+typedef struct

+{

+    unsigned short wDchStartCsrCycle;           /* DCHÆô¶¯CSµÄÀÏ»¯Ê±¼ä                       ȱʡֵ£º15 */

+    unsigned short wPichAndBchCheck;            /* PICHÓëBCHͬʱ½ÓÊյļì²âÌáǰÁ¿             ȱʡֵ£º3 £¨Ö¡£© */

+    unsigned short wReserved[6];

+}T_L1wNvRtxProc;

+

+typedef struct

+{

+    //RAKE

+    unsigned short wAccCtrl;                    /* ×Ófinger1ÐźŽØÎ»Êý        ȱʡֵ£º5 */

+    unsigned short wCpichInterp;                /* CPICHÐŵÀ¹À¼ÆµÄÄÚ²åģʽ    ȱʡֵ£º1  £¨ÏßÐÔ£© */

+    /*RakeÂ˲¨Æ÷²ÎÊý*/

+    unsigned short wAlphaCtrl;                  /* Â˲¨Æ÷Ñ¡Ôñ                 ȱʡֵ£º1   £¨Ñ¡ÓÃalphaÂ˲¨Æ÷£© */

+    unsigned short wAlphaA;                     /* alphaÖµ                    ȱʡֵ£º192 */

+    unsigned short wAlphaB;                     /* alphbÖµ                    ȱʡֵ£º23 */

+    unsigned short wTpcPlRlProc;                /* TpcPilot RLÄÚ¾¶ºÏ²¢´°³¤    ȱʡֵ£º82 */

+

+    unsigned short wFingerOffsetThred;          /* ¾¶¸üÐÂÃÅÏÞ                 ȱʡֵ£º2 £¨samples£© */

+    unsigned short wFingerPowerThred;           /* ¾¶Ñ¡ÔñÃÅÏÞ                 ȱʡֵ£º643 £¨8db µÄ8bit¶¨µã»¯£© */

+    unsigned short wFbiAlphaN;                  /* Fbi alpha·Ö×Ó              ȱʡֵ£º7 */

+    unsigned short wFbiAlphaD;                  /* Fbi alpha·Öĸ              ȱʡֵ£º10 */

+    unsigned short wAiAlphaN;                   /* Ai alpha·Ö×Ó               ȱʡֵ£º3 */

+    unsigned short wAiAlphaD;                   /* Ai alpha·Öĸ               ȱʡֵ£º4 */

+    unsigned short wAiPowerThred;               /* Ai ¹¦ÂÊÃÅÏÞ                ȱʡֵ£º77 £¨0.3 µÄ8bit¶¨µã»¯£© */

+    unsigned short wEAiPowerThred;              /* EAi ¹¦ÂÊÃÅÏÞ               ȱʡֵ£º73 £¨0.285 µÄ8bit¶¨µã»¯£© */

+    unsigned short wRtxPcCrcWindow;             /* PCµÄCRCͳ¼Æ³¤¶È            ȱʡֵ£º20000 */

+    unsigned short wRtxNoiseGapNum;             /* NOISE ÔëÉùÂ˲¨³õʼֵµÄ´°³¤¶È    ȱʡֵ£º5 */

+

+    signed long dRtxDpchSirThred;                /* DPCH sir¿É¿¿ÐÔÃÅÏÞ         ȱʡֵ£º-393216 fffa0000£¨-6db µÄ16bit¶¨µã»¯£© */

+    signed long dRtxFdpchSirThred;               /* FdPCH sir¿É¿¿ÐÔÃÅÏÞ        ȱʡֵ£º-262144 fffc0000£¨-4db µÄ16bit¶¨µã»¯£© */

+

+    unsigned short  wRakeReserved[16];

+

+    //GDTR

+    unsigned short wDtrTurboMapNum;             /* turbo ½âÂëµü´ú´°³¤¶È    ȱʡֵ£º16 */

+    unsigned short wDtrOverlapSize;             /* turbo ½âÂëÒç³ö´°³¤¶È    ȱʡֵ£º32 */

+    unsigned short wDtrMaxAlgMode;              /* ×î´óË㷨ģʽ            ȱʡֵ£º0 */

+    unsigned short wDtrInterMapMode;            /* µÚÒ»´Î½»Ö¯Êý¾Ý·´×ªÄ£Ê½  ȱʡֵ£º0 */

+    unsigned short wDtrByteOrder;               /* ½âÂëÉϱ¨Êý¾Ý·´×ªÄ£Ê½    ȱʡֵ£º1 */

+    unsigned short wDtrAgcMode;                 /* AGCµ÷Õûģʽģʽ         ȱʡֵ£º0  £¨¹Ø±Õ£© */

+

+    unsigned short wDtrReserved[4];

+

+    //DS

+    unsigned long wDpchInSyncThred;             /* dpch ͬ²½ÃÅÏÞ    ȱʡֵ£º0x73334 */

+    unsigned long wDpchOutSyncThred;            /* dpch ʧ²½ÃÅÏÞ    ȱʡֵ£º0x11999a */

+    unsigned long wFdpchInSyncThred;            /* fdpch ͬ²½ÃÅÏÞ   ȱʡֵ£º0x73334 */

+    unsigned long wFdpchOutSyncThred;           /* fdpch ʧ²½ÃÅÏÞ   ȱʡֵ£º0x11999a */

+    unsigned short wDrxEnable;                 /* DrxʹÄܱêʶ·û    ȱʡֵ£º0 */

+

+    unsigned short wDSReserved[7];

+

+}T_L1wNvRtxRx;

+

+typedef struct

+{

+

+   //prach

+   unsigned short wPreambleStageLen;             /* preamble½×¶Î·¢Ëͳ¤¶È         ȱʡֵ£º64 */

+   //dpch

+   unsigned short wTxFirTimeOffset;              /* firÆô¶¯ÑÓ³Ù                  ȱʡֵ£º28 £¨chips£© */

+   unsigned short wReserved[8];

+

+}T_L1wNvRtxTx;

+

+typedef struct

+{

+    T_L1wNvRtxProc      tL1wNvRtxProc;       /* »ù±¾ÒµÎñ¹ý³ÌµÄÏà¹ØNV²ÎÊý */

+    T_L1wNvRtxRx        tL1wNvRtxRx;         /* RTXÏÂÐÐÉ豸²ãµÄÏà¹ØNV²ÎÊý */

+    T_L1wNvRtxTx        tL1wNvRtxTx;         /* RTXÉÏÐÐÉ豸²ãµÄÏà¹ØNV²ÎÊý */

+}T_L1wNvRtx;

+

+/********** PC NV **********/

+typedef struct

+{

+    signed long wFdpchSirTh;             /*Fdpch SirÃÅÏÞ, ĬÈÏÖµ -262144/fffc0000*/

+    signed long wDpchSirTh;              /*Dpch SirÃÅÏÞ, ĬÈÏÖµ -393216 /fffa0000*/

+    unsigned long wReserved[6];

+}T_L1wNvPc;

+

+/********** ENG NV **********/

+typedef struct

+{

+  unsigned short wEngStandardMsg;           /* ±ê×¼LOGÊÇ·ñÔÊÐíÊä³ö          (ĬÈÏÔÊÐí:1) */

+  unsigned short wEngPrintMsg;              /* ×Ô¶¨Òå´òÓ¡ÏûÏ¢ÊÇ·ñÔÊÐíÊä³ö   (ĬÈÏÔÊÐí:1) */

+  unsigned short wEngHciMsg;                /* ÓëЭÒéÕ»½Ó¿ÚÏûÏ¢ÊÇ·ñÔÊÐíÊä³ö (ĬÈÏÔÊÐí:1) */

+  unsigned short wEngHookMsg;               /* HOOKÐÅÏ¢ÊÇ·ñÔÊÐíÊä³ö         (ĬÈϽûÖ¹:0) */

+  unsigned short wEngDataDump;              /* ץȡÊý¾ÝÊÇ·ñÔÊÐíÊä³ö         (ĬÈϽûÖ¹:0) */

+  unsigned short wEngReserved[11];          /* ±£Áô²ÎÊý */

+}T_L1wNvEng;

+

+/********** MEAS NV **********/

+typedef struct

+{

+  signed short   swSidelobeThr;            /* ÅÔ°êÒÖÖÆÃÅÏÞ                (ĬÈÏÖµ:-3,0xFFFD) */

+  unsigned short wSidelobeThrMin;          /* ×îСÅÔ°êλÖÃÆ«ÒÆ            (ĬÈÏÖµ:5) */

+  unsigned short wSidelobeThrMax;          /* ×î´óÅÔ°êλÖÃÆ«ÒÆ            (ĬÈÏÖµ:7) */

+

+  unsigned short wMaxThrMan;               /* ¾¶¼ì²â×î´óÖµÃÅÏÞβÊý        (ĬÈÏÖµ:1) */

+  signed short   swMaxThrExp;              /* ¾¶¼ì²â×î´óÖµÃÅÏÞÖ¸Êý        (ĬÈÏÖµ:-3,0xFFFD) */

+  unsigned short wRscpNoiseThrMan;         /* RSCP²âÁ¿¾¶¼ì²âÔëÉùÃÅÏÞβÊý  (ĬÈÏÖµ:2150) */

+  signed short   swRscpNoiseMaxThrExp;     /* RSCP²âÁ¿¾¶¼ì²âÔëÉùÃÅÏÞÖ¸Êý  (ĬÈÏÖµ:-10,0xFFF6) */

+  unsigned short wPreSyncNoiseThrMan;      /* Ԥͬ²½¾¶¼ì²âÔëÉùÃÅÏÞβÊý    (ĬÈÏÖµ:3) */

+  signed short   swPreSyncNoiseThrExp;     /* Ԥͬ²½¾¶¼ì²âÔëÉùÃÅÏÞÖ¸Êý    (ĬÈÏÖµ:-1,0xFFFF) */

+

+  unsigned short wSttdOnCoe;               /* STTD ONµÄ¼ÆËãÒò×Ó           (ĬÈÏÖµ:2) */

+  unsigned short wSttdOffCoe;              /* STTD OFFµÄ¼ÆËãÒò×Ó          (ĬÈÏÖµ:3) */

+

+  unsigned short wHwAgcRevertEn;           /* Ó²¼þAGC»¹Ô­Ä£¿éÊÇ·ñʹÄÜ     (ĬÈÏʹÄÜ:1£¬²ÉÓÃÓ²¼þ»¹Ô­) */

+  signed short   swRscpCalcDelta;          /* CPICH RSCP¼ÆËãµÄÐÞÕýÖµ      (ĬÈÏÖµ:-17,,0xFFEF) */

+  signed short   swRssiCalcDelta;          /* RSSI¼ÆËãµÄÐÞÕýÖµ            (ĬÈÏÖµ:0) */

+

+  unsigned short wAdrWindowAlphaMan;       /* ADRËÑË÷´°ÄÜÁ¿Òò×ÓµÄβÊý     (ĬÈÏÖµ:291) */

+  signed short   swAdrWindowAlphaExp;      /* ADRËÑË÷´°ÄÜÁ¿Òò×ÓµÄÖ¸Êý     (ĬÈÏÖµ:-10,0xFFF6) */

+  unsigned short wFirstSrongRange;         /* ×îÇ¿¾¶ºÍ×îÔ羶λÖõIJîÖµ    (ĬÈÏÖµ:8) */

+

+  unsigned short wL1wMeasReserved[15];     /* ±£Áô²ÎÊý */

+}T_L1wNvMeas;

+

+/********** DPA NV **********/

+typedef struct

+{

+   unsigned short wNvRxDivMode;         /* 0-µ¥ÌìÏß½ÓÊÕ£¬1-Ë«ÌìÏß½ÓÊÕ                  ĬÈÏÖµ£º0 */

+   unsigned short wNvHsscchInfSelMode;  /* 0-ADR½ÓÊÕ£¬1-RAKE½ÓÊÕ                       ĬÈÏÖµ£º0 */

+   unsigned short wNvCirFingerSelMode;  /* 0-ÑÚÂëÑ¡¾¶£¬1-ÔëÉùÃÅÏÞÑ¡¾¶                  ĬÈÏÖµ£º1 */

+   unsigned short wNvEqNoiseSelMode;    /* 0-ʹÓÃÈí¼þÅäµÄÔëÉù¼ÆËã¾ùºâϵÊý£¬1-Ó²¼þ¼ÆËã  Ä¬ÈÏÖµ£º0 */

+   unsigned short wNvHsdschDemodMode;   /* 0-Èí¼þÅäÖ÷ù¶È¾ùÖµ 1-Ó²¼þ¼ÆËã·ù¶È¾ùÖµ       ĬÈÏÖµ£º1 */

+   unsigned short wNvCqiAdjMode;        /* 0-CQIµ÷Õû¹Ø±Õ£¬1-´ò¿ª                       ĬÈÏÖµ£º0 */

+   unsigned short wNvDataMovMode;       /* 0-¹Ø±ÕDMA°áÔË£¬1-´ò¿ª                       ĬÈÏÖµ£º1 */

+   unsigned short wPadding[121];        /* ´ýÀ©Õ¹£¬ÓÃÓÚADR¡¢SCCH¡¢DSCH¾²Ì¬ÅäÖòÎÊýµÄ¸Ä±äÐèÇó */

+}T_L1wNvHsdpa;

+

+/********** UPA NV **********/

+typedef struct

+{

+   unsigned short wNvRgHiAlg;               /* 0-RgHi¼ì²âÐÂËã·¨£¬1-RgHi¼ì²â¾ÉËã·¨£»     ĬÈÏÖµ£º0 */

+   unsigned short wNvSchCancelEn;           /* 0-SCH¸ÉÈÅÏû³ýʹÄÜ£¬1-SCH¸ÉÈÅÏû³ý²»Ê¹ÄÜ£» ĬÈÏÖµ£º0 */

+   unsigned short wNvUpaDlDelay;            /* 0,1,2,3-RgHiAg¼ì²âÓ²¼þÑÓ³Ù6,7,8,9·ûºÅ£»  ĬÈÏÖµ£º0 */

+   unsigned short wPadding[29];             /* ´ýÀ©Õ¹  */

+}T_L1wNvHsupa;

+

+/********** RFC NV **********/

+typedef struct

+{

+   unsigned long wL1wRfcReserved[20];     /* ±£Áô²ÎÊý */

+}T_L1wNvRfc;

+

+/********** »ù´øÏà¹ØNV»ã×Ü **********/

+typedef struct

+{

+    unsigned short      wTotalLen;           /* ×ܳ¤¶È£¬µ¥Î»BYTE */

+    unsigned short      wPadding;

+    T_L1wNvL1sCmn       tL1wNvL1sCmn;

+    T_L1wNvCs           tL1wNvCs;

+    T_L1wNvBch          tL1wNvBch;

+    T_L1wNvPsr          tL1wNvPsr;

+    T_L1wNvRtx          tL1wNvRtx;

+    T_L1wNvPc           tL1wNvPc;

+    T_L1wNvEng          tL1wNvEng;

+    T_L1wNvMeas         tL1wNvMeas;

+    T_L1wNvHsdpa        tL1wNvHsdpa;

+    T_L1wNvHsupa        tL1wNvHsupa;

+	T_L1wNvRfc          tL1wNvRfc;

+}T_L1wNvBb;

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/commgt_api.h b/cp/ps/modem/tools/inc/commgt_api.h
new file mode 100755
index 0000000..a8a8a6f
--- /dev/null
+++ b/cp/ps/modem/tools/inc/commgt_api.h
@@ -0,0 +1,681 @@
+/**

+ * 

+ * @file      commgt_api.h

+ * @brief     

+ *            This file is part of tools.

+ *            ¹¤¾ßCommAgt½Ó¿Ú¹«¹²ÉùÃ÷

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.4

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/14  1.0      lu.xieji       Create file

+ * 2018/09/24  1.1      jiang.fenglin  ºË¼äͨÐŹ²ÏíÄÚ´æÓÉ1Mµ÷ÕûΪ512K

+ * 2018/09/25  1.2      dai.kang       »·Ðλº³åÇøÄÚ´æÓÉ3.5Mµ÷ÕûΪ2M

+ * 2018/12/25  1.3      dai.kang       »·Ðλº³åÇøÄÚ´æÓɾ²Ì¬·ÖÅäµ÷ÕûΪzOss_GetUB¶¯Ì¬·Ö±ð

+ * 2019/02/02  1.4      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * 2019/03/11  1.5      dai.kang       Ö§³ÖÎïÀí²ãlog + ap<->cp logÇø¼ä¶¯Ì¬·ÖÅä

+ * 2019/05/13  1.6      dai.kang       psÓëphy¼äµÄ»·ÐÎbufferÉÏÏÂÐзֿªÉêÇ룻ap²àbuffer¿Õ¼äλÖõ÷Õû

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef COMM_AGT_H_

+#define COMM_AGT_H_

+

+#include "ram_config.h"

+#include "ZspTrace.h"

+

+#define MAX_PACKET_LEN                      (0x10000)

+#define MAX_ENCODE_PACKET_LEN               (MAX_PACKET_LEN * 2)

+

+// Buffer »ùµØÖ·

+extern UINT32 g_zToolAgtBaseDDR;

+

+#define COMM_SEND_BUFFER_BASE_ADDR          (g_zToolAgtBaseDDR)

+#define COMM_SEND_BUFFER_SIZE               (0x77000)

+

+#define COMM_RECV_BUFFER_BASE_ADDR          (COMM_SEND_BUFFER_BASE_ADDR + COMM_SEND_BUFFER_SIZE)

+#define COMM_RECV_BUFFER_SIZE               (0x0)

+

+#define COMM_READ_BUFFER_BASE_ADDR          (COMM_RECV_BUFFER_BASE_ADDR + COMM_RECV_BUFFER_SIZE)

+#define COMM_READ_BUFFER_SIZE               (0x0)

+

+#define COMM_ENCODE_BUFFER_BASE_ADDR        (COMM_READ_BUFFER_BASE_ADDR + COMM_READ_BUFFER_SIZE)

+#define COMM_ENCODE_BUFFER_SIZE             (0x0)

+

+#define COMM_DECODE_BUFFER_BASE_ADDR        (COMM_ENCODE_BUFFER_BASE_ADDR + COMM_ENCODE_BUFFER_SIZE)

+#define COMM_DECODE_BUFFER_SIZE             (0x0)

+

+// GSM buff

+#define ZCAT_GSM_BUFFER_BASE_ADDR           (COMM_DECODE_BUFFER_BASE_ADDR + COMM_DECODE_BUFFER_SIZE)

+

+#ifdef _USE_L1G

+#define ZCAT_GSM_BUFFER_SIZE                (0x8000)

+#else

+#define ZCAT_GSM_BUFFER_SIZE                (0x0)

+#endif

+

+#define COMM_ARM1_ALL_ADDR                  (ZCAT_GSM_BUFFER_BASE_ADDR + ZCAT_GSM_BUFFER_SIZE)

+#define COMM_ARM1_ALL_SIZE                  (0x100)

+#define COMM_ARM1_TICK_ADDR                 (COMM_ARM1_ALL_ADDR)

+#define COMM_ARM1_TICK_SIZE                 (0x4)

+#define COMM_ARM1_ORITIME_ADDR              (COMM_ARM1_TICK_ADDR + COMM_ARM1_TICK_SIZE)

+#define COMM_ARM1_ORITIME_SIZE              (0x4)

+#define COMM_ARM1_ORITICK_ADDR              (COMM_ARM1_ORITIME_ADDR + COMM_ARM1_ORITIME_SIZE)

+#define COMM_ARM1_ORITICK_SIZE              (0x4)

+

+#if ((COMM_ARM1_TICK_SIZE + COMM_ARM1_ORITIME_SIZE + COMM_ARM1_ORITICK_SIZE) > COMM_ARM1_ALL_SIZE)

+#error "tool ram overflow!"

+#endif

+

+// PS CPU <-->PHY CPU

+#define COMM_PS_TO_PHY_BASE_ADDR            (COMM_ARM1_ALL_ADDR + COMM_ARM1_ALL_SIZE)

+#define COMM_PS_TO_PHY_SIZE                 (0x100)

+

+#define COMM_PHY_TO_PS_BASE_ADDR            (COMM_PS_TO_PHY_BASE_ADDR + COMM_PS_TO_PHY_SIZE)

+#define COMM_PHY_TO_PS_SIZE                 (0x100)

+

+#define ZCAT_KERNEL_TO_CP_BASE_ADDR         (COMM_PHY_TO_PS_BASE_ADDR + COMM_PHY_TO_PS_SIZE)

+#define ZCAT_KERNEL_TO_CP_BUFFER_SIZE       (0x4000)

+ 

+#define ZCAT_APP_TO_CP_BASE_ADDR            (ZCAT_KERNEL_TO_CP_BASE_ADDR + ZCAT_KERNEL_TO_CP_BUFFER_SIZE)

+#define ZCAT_APP_TO_CP_BUFFER_SIZE          (0x4000)

+

+#define COMM_CP_TO_AP_BASE_ADDR             (ZCAT_APP_TO_CP_BASE_ADDR + ZCAT_APP_TO_CP_BUFFER_SIZE)

+#ifdef CONFIG_SINGLECORE

+#define COMM_CP_TO_AP_SIZE                  (0)

+#else

+#define COMM_CP_TO_AP_SIZE                  (0x20000)

+#endif

+

+#define COMM_AP_TO_CP_BASE_ADDR             (COMM_CP_TO_AP_BASE_ADDR + COMM_CP_TO_AP_SIZE)

+#ifdef CONFIG_SINGLECORE

+#define COMM_AP_TO_CP_SIZE                  (0)

+#else

+#define COMM_AP_TO_CP_SIZE                  (0x8000)

+#endif

+

+#define TOOL_AGENT_RAM_SIZE (COMM_SEND_BUFFER_SIZE + COMM_RECV_BUFFER_SIZE + COMM_READ_BUFFER_SIZE + COMM_ENCODE_BUFFER_SIZE + \

+	                         COMM_DECODE_BUFFER_SIZE + ZCAT_GSM_BUFFER_SIZE + COMM_ARM1_ALL_SIZE + COMM_PS_TO_PHY_SIZE + \

+	                         COMM_PHY_TO_PS_SIZE + ZCAT_KERNEL_TO_CP_BUFFER_SIZE + ZCAT_APP_TO_CP_BUFFER_SIZE + COMM_CP_TO_AP_SIZE + \

+	                         COMM_AP_TO_CP_SIZE)

+

+/* MODEM PRINT Ä£¿é±àºÅ */

+#define SUBMDL_TOOLAGENT_SET  (85)

+#define SUBMDL_ZCATAGT        (SUBMDL_TOOLAGENT_SET + 0)  /* ZCAT¹¤¾ß´úÀí */

+#define SUBMDL_TOOLCOMMON     (SUBMDL_TOOLAGENT_SET + 1)  /* TOOL COMMON  */

+#define SUBMDL_COMM           (SUBMDL_TOOLAGENT_SET + 2)  /* ¹¤¾ßͨѶ¹ÜÀí */

+#define SUBMDL_NVAGT          (SUBMDL_TOOLAGENT_SET + 3)  /* NV¹¤¾ß´úÀí       */

+

+/* ͨѶģ¿éºÅ */

+#define MDL_TOOLS_BASE        (100)

+#define MDL_WINTRACE          (MDL_TOOLS_BASE + 1)   /* WinTrace */

+#define MDL_NVEDIT            (MDL_TOOLS_BASE + 3)   /* NvTool */

+#define MDL_VUART1            (MDL_TOOLS_BASE + 4)   /* Virtual of Serial Comm1,used in SimEnv */

+#define MDL_EFSTOOL           (MDL_TOOLS_BASE + 7)   /* EfsTool */

+#define MDL_PTET              (MDL_TOOLS_BASE + 10)  /* ЭÒéÕ»²âÊÔ¹¤¾ß */

+#define MDL_ZCAT              (MDL_TOOLS_BASE + 15)  /* ZCAT¹¤¾ß          */

+#define MDL_NVTOOL            (MDL_TOOLS_BASE + 16)  /* NvTool */

+#define MDL_AUDIO              (MDL_TOOLS_BASE + 17)  /* audio */

+

+#define MDL_SIMTH             (MDL_TOOLS_BASE + 18)  /* TH */

+

+/*ÓëwincommÎÕÊÖ: Ó¦´ðÊÇ·ñ¿ªÆôHDLC±àÂë*/

+#define COMM_HEADER_PAD_HDLC         (0xAB)

+#define COMM_HEADER_MSG_TYPE_HDLC    (0x4)

+#define COMM_HEADER_RESERVED_HDLC    (0xBBBB)

+#define COMM_ACK_HDLC_READY          (0x2)

+

+#ifdef _OS_WIN

+#define MDL_PHONE                    (MDL_VUART1)  /* windows ·ÂÕæ»·¾³ */

+#else

+#define MDL_PHONE                    (1)           /* ÊÖ»ú   */

+#endif

+

+#define ZCAT_MODE_INVALID  (UINT32)0

+

+typedef enum

+{

+    ZCAT_MODE_AP_USB = 0xC1,

+    ZCAT_MODE_AP_NET,

+    ZCAT_MODE_AP_TF,

+    ZCAT_MODE_AP_FS,

+    ZCAT_MODE_CP_USB,

+    ZCAT_MODE_CP_TF,

+    ZCAT_MODE_CP_NET,

+    ZCAT_MODE_CP_FS,

+#ifdef _USE_VEHICLE_DC

+    ZCAT_MODE_CAP_EMMC

+#endif

+

+} E_ZCAT_MODE;

+

+typedef enum

+{

+    ZCAT_IPC_SYN = 0xA0,

+    ZCAT_IPC_ACK,

+    ZCAT_IPC_ESTABLISHED,

+    ZCAT_IPC_SET_TTY,

+    ZCAT_IPC_SET_PERIPHERAL_MODE,

+    ZCAT_IPC_STOP,

+    ZCAT_IPC_START,

+    ZCAT_IPC_EXIT,

+#ifdef _USE_VEHICLE_DC

+    ZCAT_IPC_ALLOC_CAP_SMLOGBUF,

+#endif

+} E_ZCAT_IPC_HANDSHAKE;

+

+

+#define COMM_AP_FD           1001

+#define COMM_SINGLE_CORE_FD  1002

+#define COMM_CP_TF_FD        1234

+

+#define ZCAT_MEM_TYPE_KERNEL 0  

+#define ZCAT_MEM_TYPE_USER   1

+

+#define HDLC_DECODE_CONTINUE           (0x00)

+#define HDLC_DECODE_OK                 (0x01)

+#define HDLC_DECODE_FIRST_ESCAPE       (0x02)

+#define HDLC_DECODE_DROP               (0x03)

+

+

+/* zcatÈ«¾ÖÐÅÏ¢ */

+typedef struct

+{

+    int  status;

+    int  peripheral_mode;

+    char usblog_path[8];

+} T_ZCAT_CONFIG_INFO;

+

+

+// Ä£¿é»Øµ÷º¯Êý

+typedef VOID (*ModuleFunc)(UINT32 msgID/*ÎÞÓÃ*/, const UINT8 *buf, UINT32 msgLen);

+

+typedef enum

+{

+    LINK_CONNECT,                   /* Á´Â·½¨Á¢ÏûÏ¢ */

+    LINK_BREAK,                     /* Á´Â·¶Ï¿ªÏûÏ¢ */

+

+    MAX_LINK_INFO

+} LINK_INFO;

+

+typedef enum

+{

+    COMM_RET_SUCCESS,               /* Êý¾Ý³É¹¦¼ÓÈë¶ÓÁÐ,µÈ´ý·¢ËÍ */

+    COMM_ERR_NOTINIT,               /* ·¢ËÍʧ°Ü,ͨѶ´úÀíûÓгõʼ»¯ */

+    COMM_ERR_LINKBREAK,             /* ·¢ËÍʧ°Ü,Á´Â·ÒѾ­¶Ï¿ª */

+    COMM_ERR_DATALEN,               /* ·¢ËÍʧ°Ü,ÏûÏ¢ÄÚÈݳ¤¶È³¬¹ý×î´ó³¤¶È */

+    COMM_ERR_MEM,                   /* ·¢ËÍʧ°Ü,ÄÚ´æ²Ù×÷ʧ°Ü */

+    COMM_ERR_MUTEX,                 /* ·¢ËÍʧ°Ü,»¥³âÌå³öÏÖ´íÎó */

+

+    MAX_COMM_ERR

+} COMM_RET;

+

+typedef enum

+{

+    FUNC_RET_FAILURE,

+    FUNC_RET_SUCCESS,

+

+    MAX_FUNC_RET

+} FUNC_RET;

+

+// Comm½á¹¹¶¨Òå

+typedef struct

+{

+    UINT8  msg_type;                /* ÏûÏ¢ÀàÐÍ */

+    UINT8  pad;                     /* Ìî³äλ */

+    UINT16 reserved;                /* ±£Áô×ֶΣ¬ÌîΪ0xAAAA */

+    UINT8  tgt_mdl_no;              /* Ä¿±ê(½ÓÊÕÏûÏ¢)Ä£¿éÄ£¿éºÅ */

+    UINT8  tgt_submdl_no;           /* Ä¿±ê(½ÓÊÕÏûÏ¢)Ä£¿é×ÓÄ£¿éºÅ */

+    UINT8  src_mdl_no;              /* Ô´(·¢ËÍÏûÏ¢)Ä£¿éÄ£¿éºÅ */

+    UINT8  src_submdl_no;           /* Ô´(·¢ËÍÏûÏ¢)Ä£¿é×ÓÄ£¿éºÅ */

+    UINT32 buf_len;                 /* ÏûÏ¢Êý¾Ý³¤¶È(²»º¬ÏûϢͷ) */

+} T_COMM_TYPE;

+

+/* ´òÓ¡»º³åÇø */

+typedef struct

+{

+    UINT32 capacity;                /* »º³åÇøÈÝÁ¿*/

+    volatile UINT32 readPoint;      /* ¶ÁÖ¸Õë */

+    volatile UINT32 writePoint;     /* дָÕë */

+    UINT32 symbol;                  /* ¿ØÖÆ¿é±êʶ·û */

+    UINT8 buf[1];                   /* ´òÓ¡»º³åÇø */

+} T_RINGBUFFER;

+

+typedef struct

+{

+    UINT8 *buf;

+    UINT32 bufIndex; // Ö¸ÕëÆ«ÒÆ

+    UINT32 bufSize;

+} T_HDLC_BUFFER_TYPE;

+

+

+/**

+ * @brief ´Ócomm»·Ðλº³åÖÐÉêÇëÒ»¿éÄÚ´æ

+ * @param[in] size ÉêÇëµÄʵ¼ÊÓÐÓÃÊý¾ÝµÄ¿Õ¼ä´óС

+ * @return Èç¹û³É¹¦£¬·µ»ØÄÚ´æÖ¸Õ룬·ñÔò·µ»ØNULL

+ * @note ÉêÇëµÄÄÚ´æÖ»ÓÃÓÚcommµÄÊý¾Ý·¢ËÍ£¬É÷ÓÃ!!! \n

+         Èç¹û·¢Ëͳɹ¦Ôò²»ÐèÊÍ·Å£»\n

+         δ·¢ËÍ»ò·¢ËͲ»³É¹¦Ôò±ØÐëµ÷ÓÃComm_Free½øÐÐÊÍ·Å£¬·ñÔòËÀÇÌÇÌ

+ * @see 

+ */

+VOID* Comm_Malloc(UINT32 size);

+

+/**

+ * @brief ÊÍ·ÅÓÉComm_MallocÉêÇëµÄÄÚ´æ

+ * @param[in] mem_ptr ´ýÊͷŵÄcomm»º³åÇøÖÐÄÚ´æ¿éµÄÖ¸Õë

+ * @return void

+ * @note

+ * @see 

+ */

+VOID Comm_Free(VOID *mem_ptr);

+

+/**

+ * @brief ZCATͨѶ¹ÜÀíÄ£¿é³õʼ»¯

+ * @param[in] void

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS£»Ê§°Ü·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 Comm_Init(VOID);

+

+/**

+ * @brief ZCATͨѶ¹ÜÀíÄ£¿é×¢Ïú½Ó¿Ú,

+ * @param[in] void

+ * @return void

+ * @note

+ * @see 

+ */

+void Comm_Release(void);

+

+

+/**

+ * @brief ZCAT×ÓÄ£¿é×¢²á½Ó¿Ú \n

+ *        Ìṩ¸ø¸÷¸ö×ÓÄ£¿éµ÷Óã¬×¢²á×ÓÄ£¿éÐÅÏ¢

+ * @param[in] submdl_no  ×¢²áµÄ×ÓÄ£¿éºÅ£¬ÒѾ­ÔÚpub_mdldef.hÖж¨ÒåºÃ

+ * @param[in] uart_name  ÕâÀïÒòΪÐèÇó±ä¸ü£¬µ¼Ö²ÎÊýuart_nameÎÞЧ,ÇëÒ»ÂÉÌîuart/0

+ * @param[in] moduleFunc ¸÷¸ö×ÓÄ£¿é»Øµ÷º¯Êý

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ʧ°Ü·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 zTools_CommReg(UINT8 submdl_no, const CHAR *uart_name, ModuleFunc moduleFunc);

+

+/**

+ * @brief ZCAT×ÓÄ£¿é×¢Ïú½Ó¿Ú \n

+ *        Ìṩ¸ø¸÷¸ö×ÓÄ£¿éµ÷Óã¬×¢Ïú×ÓÄ£¿éÐÅÏ¢

+ * @param[in] submdl_no  ½«Òª×¢ÏúµÄ×ÓÄ£¿éºÅ

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ʧ°Ü·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 zTools_CommUnReg(UINT8 submdl_no);

+

+/**

+ * @brief Ìṩ¸ø²»Í¬×ÓÄ£¿éÏò"ÍâÉè"·¢ËÍÊý¾ÝµÄ¹¦ÄÜ \n

+ *        ¸øTraceAgtÄ£¿éʹÓÃ,Õâ¸öÊÇÒì²½½Ó¿Ú£¬Ö»¹Ü·¢ËͶø²»¹ÜÊÇ·ñÄܹ»ÊÕµ½

+ *        ·¢ËÍÊý¾ÝÒ»°ãÏȵ½"ͳһ»º´æ"ÖУ¬È»ºó֪ͨ·¢ËÍÏß³ÌÓÐÊý¾Ý´ý·¢ËÍ

+ * @param[in] buf           ·¢ËÍÊý¾Ý(±ØÐëÊÇÓÉComm_MallocÉêÇëµÄÄÚ´æ!!!)

+ * @param[in] buf_len       ·¢ËÍÊý¾ÝµÄ³¤¶È

+ * @param[in] tgt_mdl_no    Ä¿±êÄ£¿éºÅ£¬ÊÖ»ú»òPCµÈ

+ * @param[in] tgt_submdl_no Ä¿±ê×ÓÄ£¿éºÅ

+ * @param[in] src_submdl_no Ô´×ÓÄ£¿éºÅ

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ·ñÔò·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+UINT32 zTools_SendData(UINT8 *buf, UINT32 buf_len,

+                       UINT8 tgt_mdl_no, UINT8 tgt_submdl_no, UINT8 src_submdl_no);

+

+/**

+ * @brief ´´½¨ÐèÒªµÄ»º³åÇø

+ *        Èç¹ûbuf²»ÎªNULL£¬ÔòÔÚÖ¸¶¨µØÖ·´´½¨»º³åÇø£»·ñÔò£¬ÉêÇëÒ»¿éÄÚ´æ×÷Ϊ»º³åÇø

+ * @param[in] buf »º³åÇøµØÖ·

+ * @param[in] bufSize »º³åÇø´óС

+ * @return ³É¹¦·µ»ØÖ¸Ïò»º³åÇø½á¹¹ÌåµÄÖ¸Õ룬·ñÔò·µ»ØNULL

+ * @note

+ * @see 

+ */

+T_RINGBUFFER* CreateRingBuffer(UINT8 *buf, UINT32 bufSize);

+

+/**

+ * @brief ´´½¨ÐèÒªµÄ»º³åÇø,²¢ÇÒÖ¸¶¨±ê¼ÇλµÄÖµ

+ *        Èç¹ûbuf²»ÎªNULL£¬ÔòÔÚÖ¸¶¨µØÖ·´´½¨»º³åÇø£»·ñÔò£¬ÉêÇëÒ»¿éÄÚ´æ×÷Ϊ»º³åÇø

+ * @param[in] buf »º³åÇøµØÖ·

+ * @param[in] bufSize »º³åÇø´óС

+ * @param[in] bufSize ±ê¼Çλ

+ * @return ³É¹¦·µ»ØÖ¸Ïò»º³åÇø½á¹¹ÌåµÄÖ¸Õ룬·ñÔò·µ»ØNULL

+ * @note

+ * @see 

+ */

+T_RINGBUFFER* CreateRingBufferWithSymbol(UINT8 *buf, UINT32 bufSize, UINT32 symbol);

+

+/**

+ * @brief Åжϻº³åÇøÊÇ·ñÓÐЧ

+ * @param[in] ringBuf »·Ðλº³å

+ * @return ÊÇ·µ»ØTRUE,·ñ·µ»ØFALSE

+ * @note

+ * @see 

+ */

+BOOL IsRingBufferValid(T_RINGBUFFER *ringBuf);

+

+/**

+ * @brief ½«»º³åÇøÖÿÕ

+ * @param[in] ringBuf »·Ðλº³åÇøÖ¸Õë

+ * @return void

+ * @note

+ * @see 

+ */

+VOID EmptyRingBuffer(T_RINGBUFFER *ringBuf);

+

+/**

+ * @brief ½«Êý¾ÝдÈë»·Ðλº³å

+ * @param[in] ringBuf »·Ðλº³åÖ¸Õë

+ * @param[in] buf Êý¾Ý»º´æÖ¸Õë

+ * @param[in] len Êý¾Ý³¤¶È

+ * @param[in] flags Êý¾Ý»º´æÄÚ´æÀàÐÍ£º0:ÄÚºË̬,1:Óû§Ì¬

+ * @return ·µ»ØÐ´ÈëµÄʵ¼Ê³¤¶È

+ * @note

+ * @see 

+ */

+UINT32 WriteRingBuffer(T_RINGBUFFER *ringBuf, UINT8 *buf, UINT32 len, UINT32 flags);

+

+/**

+ * @brief ¶Áȡһ¶Î»·Ðλº³åÇøµÄÊý¾Ýµ½Ä¿±ê»º´æ

+ * @param[in] ringBuf »·Ðλº³åÇøÖ¸Õë

+ * @param[in] buf Ä¿±ê»º´æÖ¸Õë

+ * @param[in] len Ä¿±ê»º´æ³¤¶È

+ * @param[in] flags Ä¿±ê»º´æÄÚ´æÀàÐÍ£º0:ÄÚºË̬,1:Óû§Ì¬

+ * @return ·µ»Ø¶ÁÈ¡³¤¶È

+ * @note

+ * @see 

+ */

+UINT32 ReadRingBuffer(T_RINGBUFFER *ringBuf, UINT8 *buf, UINT32 len, UINT32 flags);

+

+/**

+ * @brief »ñÈ¡µ±Ç°Ring BufferÖпÕÏÐÇøµÄ´óС

+ * @param[in] ringBuf »·Ðλº³åÇøÖ¸Õë

+ * @return ·µ»Ø×Ö½ÚÊý

+ * @note

+ * @see 

+ */

+UINT32 GetRingBufferSize(T_RINGBUFFER *ringBuf);

+

+/**

+ * @brief HDLC±àÂë

+ * @param[out] dest Ä¿±êT_HDLC_BUFFER_TYPEÖ¸Õë

+ * @param[in] src Ô´T_HDLC_BUFFER_TYPEÖ¸Õë

+ * @return ³É¹¦·µ»ØTRUE£»Ê§°Ü·µ»ØFALSE

+ * @note

+ * @see 

+ */

+BOOL hdlc_encode(T_HDLC_BUFFER_TYPE *dest, const T_HDLC_BUFFER_TYPE *src);

+

+/**

+ * @brief ½«Êý¾Ý½øÐÐHDLC½âÂëÖÁÖ¸¶¨µÄµ¥ÏòFIFOÖÐ

+ *        FIFOÖ»ÄÜ´ÓÍ·(0λÖÃ)°´Õû°ü¶Á³öÊý¾Ý»ò¶ªÆú£¬½âÂëʱ°´Ë³ÐòдÈëµ½FIFO£¬

+ *        ÿÕÒµ½Ò»´ÎÕû°ü£¬Í£Ö¹Ð´È룬Ȼºó¶Á³öÊý¾Ý»òÕß¶ªÆú

+ *        ¹ý³ÌÖÐÓò»µ½readPoint£¬Ê¼ÖÕΪ0

+ * @param[out] dest ½âÂëºó´æ´¢µÄFIFOÖ¸Õë

+ * @param[in] src ´ý½âÂëµÄ»º´æÖ¸Õë

+ * @param[in] len ´ý½âÂëµÄ»º´æ³¤¶È

+ * @return ·µ»Ø½âÂëµÄʵ¼Ê³¤¶È

+ * @note

+ * @see 

+ */

+UINT32 hdlc_decode(T_RINGBUFFER *dest, unsigned char *src, unsigned int len);

+

+/**************************************************************************

+                                                CommAgt¹«¹²½Ó¿ÚÉùÃ÷

+**************************************************************************/

+

+/**************************************************************************

+*Ä£¿é½ÓÊÕÏûÏ¢»Øµ÷º¯Êý

+*²ÎÊý˵Ã÷:

+*          (IN)

+*           ucLinkMsg    Á´Â·×´Ì¬

+*           LINK_CONNECT Á´Â·½¨Á¢

+*           LINK_BREAK   Á´Â·¶Ï¿ª

+**************************************************************************/

+typedef void (* LINKRPTFUNC)(LINK_INFO ucLinkMsg);

+

+/**************************************************************************

+*ÆÕͨ×ÓÄ£¿é(²»ÓùØÐÄÏûÏ¢ID)½ÓÊÕÊý¾Ý»Øµ÷º¯Êý

+*²ÎÊý˵Ã÷:

+*           (IN)

+*            ucSrcModNo       Ô´Ä£¿éºÅ

+*            ucSrcSubModNo    Ô´×ÓÄ£¿éºÅ

+*            pBuf             ÏûÏ¢Êý¾ÝÖ¸Õë

+*            wLen             ÏûÏ¢Êý¾Ý³¤¶È

+**************************************************************************/

+typedef void (* RECVFUNC)(unsigned char ucSrcModNo, unsigned char ucSrcSubModNo, const char *pBuf, unsigned short wLen);

+

+/**************************************************************************

+*À©Õ¹×ÓÄ£¿é(ʹÓÃÏûÏ¢ID)½ÓÊÕÊý¾Ý»Øµ÷º¯Êý

+*²ÎÊý˵Ã÷:

+*           (IN)

+*            ucSrcModNo       Ô´Ä£¿éºÅ

+*            ucSrcSubModNo    Ô´×ÓÄ£¿éºÅ

+*            dwMsgID          ÏûÏ¢±àºÅ

+*            pBuf             ÏûÏ¢Êý¾ÝÖ¸Õë

+*            wLen             ÏûÏ¢Êý¾Ý³¤¶È

+**************************************************************************/

+typedef void (* RECVFUNCEX)(unsigned char ucSrcModNo, unsigned char ucSrcSubModNo, unsigned int dwMsgID, const char *pBuf, unsigned short wLen);

+

+/**************************************************************************

+*ÐéÄâ´®¿ÚÄ£¿é½ÓÊÕÊý¾Ý»Øµ÷º¯Êý,ʹÓÃÏûÏ¢ID

+*²ÎÊý˵Ã÷:

+*           (IN)

+*            ucSrcModNo       Ô´Ä£¿éºÅ

+*            ucSrcSubModNo    Ô´×ÓÄ£¿éºÅ

+*            ucTarSubModNo    Ä¿±ê×ÓÄ£¿éºÅ

+*            dwMsgID          ÏûÏ¢±àºÅ

+*            pBuf             ÏûÏ¢Êý¾ÝÖ¸Õë

+*            wLen             ÏûÏ¢Êý¾Ý³¤¶È

+**************************************************************************/

+typedef void (* RECVFUNCUART)(unsigned char ucSrcModNo, unsigned char ucSrcSubModNo, unsigned char ucTarModNo, unsigned char ucTarSubModNo, unsigned int dwMsgID, const char *pBuf, unsigned short wLen);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_Register

+* ¹¦ÄÜÃèÊö£º ÆÕͨģ¿é(²»ÓùØÐÄÏûÏ¢ID)×¢²á½Ó¿Ú(97ÓÃ)

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo     Ä£¿éºÅ

+*             linkRptFunc Ä£¿é½ÓÊÕÏûÏ¢»Øµ÷º¯Êý

+*            (OUT)

+* ·µ »Ø Öµ£º VOID

+* ÆäËü˵Ã÷£º ûÓзµ»ØÖµ

+**************************************************************************/

+FUNC_RET Comm_Register(unsigned char ucModNo, LINKRPTFUNC linkRptFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_RegisterSub

+* ¹¦ÄÜÃèÊö£º ÆÕͨģ¿é(²»ÓùØÐÄÏûÏ¢ID)×ÓÄ£¿é×¢²á½Ó¿Ú(97ÓÃ)

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo    Ä£¿éºÅ

+*             ucSubModNo ×ÓÄ£¿éºÅ

+*             recvFunc   ×ÓÄ£¿é½ÓÊÕÊý¾Ý»Øµ÷º¯Êý

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             FUNC_RET_SUCCESS ×¢²á³É¹¦

+*             FUNC_RET_FAILURE ×¢²áʧ°Ü,Á½ÖÖ¿ÉÄÜÇé¿ö,Ò»ÊÇ×ÓÄ£¿éºÅÖØ¸´ÁË,¶þÊÇ×¢²áµÄ×ÓÄ£¿éÊýÒѾ­µ½×î´óÏÞ¶È

+* ÆäËü˵Ã÷£º Ö»ÊÇ×¢²áÔÚͨѶ´úÀíÖÐ

+**************************************************************************/

+FUNC_RET Comm_RegisterSub(unsigned char ucModNo, unsigned char ucSubModNo, RECVFUNC recvFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_SendMsg

+* ¹¦ÄÜÃèÊö£º ÆÕͨģ¿é(²»ÓùØÐÄÏûÏ¢ID)·¢ËÍÏûÏ¢½Ó¿Ú(97ÓÃ)

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucTarModNo    Ä¿±êÄ£¿éºÅ

+*             ucTarSubModNo Ä¿±ê×ÓÄ£¿éºÅ

+*             ucSrcModNo    Ô´Ä£¿éºÅ

+*             ucSrcSubModNo Ô´×ÓÄ£¿éºÅ

+*             pBuf          ÏûÏ¢Êý¾ÝÖ¸Õë

+*             wLen          ÏûÏ¢Êý¾Ý³¤¶È,²»ÄÜ´óÓÚMAX_COMM_LEN

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             COMM_RET_SUCCESS    ·¢Ëͳɹ¦

+*             COMM_ERR_NOTINIT    ·¢ËÍʧ°Ü,ͨѶ´úÀíÉÐδ³õʼ»¯

+*             COMM_ERR_LINKBREAK  ·¢ËÍʧ°Ü,ÒòΪÁ´Â·Î´Á¬½Ó(ÓÃÓÚPC²à)»ò¶Ë¿Úδ´ò¿ª(ÓÃÓÚÊÖ»ú²à)

+*             COMM_ERR_DATALEN    ·¢ËÍʧ°Ü,ÏûÏ¢ÄÚÈݳ¬¹ý×î´ó³¤¶È

+*             COMM_ERR_MEM        ·¢ËÍʧ°Ü,ÄÚ´æ²Ù×÷ʧ°Ü

+*             COMM_ERR_MUTEX      ·¢ËÍʧ°Ü,»¥³âÌå³öÏÖ´íÎó

+* ÆäËü˵Ã÷£º

+**************************************************************************/

+COMM_RET Comm_SendMsg(unsigned char ucTarModNo, unsigned char  ucTarSubModNo,  \

+                      unsigned char ucSrcModNo, unsigned char ucSrcSubModNo, \

+                      const char * pBuf, unsigned short wLen);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_GetStatus

+* ¹¦ÄÜÃèÊö£º »ñȡͨѶ´úÀíÓëͨѶ¹¤¾ßµÄÁ´Â·×´Ì¬

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo Ä£¿éºÅ

+*            (OUT)

+* ·µ »Ø Öµ£º

+*            FUNC_RET_SUCCESS Á´Â·ÒÑÁ¬½Ó

+*            FUNC_RET_FAILURE Á´Â·Î´Á¬½Ó

+* ÆäËü˵Ã÷£º

+**************************************************************************/

+FUNC_RET Comm_GetStatus(unsigned char ucModNo);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_UnRegister

+* ¹¦ÄÜÃèÊö£º Ä£¿é×¢Ïú½Ó¿Ú

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo    Ä£¿éºÅ

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             FUNC_RET_SUCCESS ×¢Ïú³É¹¦

+*             FUNC_RET_FAILURE ×¢Ïúʧ°Ü

+* ÆäËü˵Ã÷£º

+**************************************************************************/

+FUNC_RET Comm_UnRegister(unsigned char ucModNo);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_UnRegisterSub

+* ¹¦ÄÜÃèÊö£º ÆÕͨģ¿é(²»ÓùØÐÄÏûÏ¢ID)×ÓÄ£¿é×¢Ïú½Ó¿Ú

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo    Ä£¿éºÅ

+*             ucSubModNo ×ÓÄ£¿éºÅ

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             FUNC_RET_SUCCESS ×¢Ïú³É¹¦

+*             FUNC_RET_FAILURE ×¢Ïúʧ°Ü

+* ÆäËü˵Ã÷£º

+**************************************************************************/

+FUNC_RET Comm_UnRegisterSub(unsigned char ucModNo, unsigned char ucSubModNo);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_RegisterEx

+* ¹¦ÄÜÃèÊö£º À©Õ¹Ä£¿é(ʹÓÃÏûÏ¢ID)×¢²á½Ó¿Ú

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo     Ä£¿éºÅ

+*             linkRptFunc Ä£¿é½ÓÊÕÏûÏ¢»Øµ÷º¯Êý

+*            (OUT)

+* ·µ »Ø Öµ£º VOID

+* ÆäËü˵Ã÷£º ûÓзµ»ØÖµ

+**************************************************************************/

+FUNC_RET Comm_RegisterEx(unsigned char ucModNo, LINKRPTFUNC linkRptFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_RegisterSubEx

+* ¹¦ÄÜÃèÊö£º À©Õ¹Ä£¿é(ʹÓÃÏûÏ¢ID)×ÓÄ£¿é×¢²á½Ó¿Ú

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo    Ä£¿éºÅ

+*             ucSubModNo ×ÓÄ£¿éºÅ

+*             recvFunc   ×ÓÄ£¿é½ÓÊÕÊý¾Ý»Øµ÷º¯Êý

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             FUNC_RET_SUCCESS ×¢²á³É¹¦

+*             FUNC_RET_FAILURE ×¢²áʧ°Ü,Á½ÖÖ¿ÉÄÜÇé¿ö,Ò»ÊÇ×ÓÄ£¿éºÅÖØ¸´ÁË,¶þÊÇ×¢²áµÄ×ÓÄ£¿éÊýÒѾ­µ½×î´óÏÞ¶È

+* ÆäËü˵Ã÷£º Ö»ÊÇ×¢²áÔÚͨѶ´úÀíÖÐ

+**************************************************************************/

+FUNC_RET Comm_RegisterSubEx(unsigned char ucModNo, unsigned char ucSubModNo, RECVFUNCEX recvFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_SendMsgEx

+* ¹¦ÄÜÃèÊö£º À©Õ¹Ä£¿é(ʹÓÃÏûÏ¢ID)·¢ËÍÏûÏ¢½Ó¿Ú

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucTarModNo    Ä¿±êÄ£¿éºÅ

+*             ucTarSubModNo Ä¿±ê×ÓÄ£¿éºÅ

+*             ucSrcModNo    Ô´Ä£¿éºÅ

+*             ucSrcSubModNo Ô´×ÓÄ£¿éºÅ

+*             dwMsgID       ÏûÏ¢±àºÅ

+*             pBuf          ÏûÏ¢ÄÚÈÝÖ¸Õë

+*             wLen          ÏûÏ¢ÄÚÈݳ¤¶È,²»ÄÜ´óÓÚMAX_COMM_LEN - MSG_HEADER_LEN

+*            (OUT)

+* ·µ »Ø Öµ£º

+*             COMM_RET_SUCCESS    ·¢Ëͳɹ¦

+*             COMM_ERR_NOTINIT    ·¢ËÍʧ°Ü,ͨѶ´úÀíÉÐδ³õʼ»¯

+*             COMM_ERR_LINKBREAK  ·¢ËÍʧ°Ü,ÒòΪÁ´Â·Î´Á¬½Ó(ÓÃÓÚPC²à)»ò¶Ë¿Úδ´ò¿ª(ÓÃÓÚÊÖ»ú²à)

+*             COMM_ERR_DATALEN    ·¢ËÍʧ°Ü,ÏûÏ¢ÄÚÈݳ¬¹ý×î´ó³¤¶È

+*             COMM_ERR_MEM        ·¢ËÍʧ°Ü,ÄÚ´æ²Ù×÷ʧ°Ü

+*             COMM_ERR_MUTEX      ·¢ËÍʧ°Ü,»¥³âÌå³öÏÖ´íÎó

+* ÆäËü˵Ã÷£º

+**************************************************************************/

+COMM_RET Comm_SendMsgEx(unsigned char ucTarModNo, unsigned char ucTarSubModNo,  \

+                        unsigned char ucSrcModNo, unsigned char ucSrcSubModNo, \

+                        unsigned int dwMsgID, const char * pBuf, unsigned short wLen);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_RegisterUart

+* ¹¦ÄÜÃèÊö£º ÐéÄâ´®¿ÚÄ£¿é×¢²á½Ó¿Ú,Ö§³ÖÏûÏ¢ID,ÕâÖ־Ͳ»ÓÃ×¢²á×ÓÄ£¿éÁË

+* ²ÎÊý˵Ã÷£º (IN)

+*             ucModNo     Ä£¿éºÅ

+*             linkRptFunc Ä£¿é½ÓÊÕÏûÏ¢»Øµ÷º¯Êý

+*             recvFunc    Ä£¿é½ÓÊÕÊý¾Ý»Øµ÷º¯Êý

+*            (OUT)

+* ·µ »Ø Öµ£º VOID

+* ÆäËü˵Ã÷£º ûÓзµ»ØÖµ

+**************************************************************************/

+FUNC_RET Comm_RegisterUart(unsigned char ucModNo, LINKRPTFUNC linkRptFunc, RECVFUNCUART recvFunc);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£º Comm_TaskSendToPhone

+* ¹¦ÄÜÃèÊö£º ±¾½Ó¿ÚÌṩ¸øÐ­ÒéÕ»µÄ²âÊÔ¹¤¾ßʹÓÃ,Ä£ÄâÈÎÎñ¸ø·¢Ë͵ÄÈÎÎñ»Ø¸´ÏûÏ¢µÄ½Ó¿Ú

+* ²ÎÊý˵Ã÷£º(IN)

+*            msg_id      ·¢ËÍÏûÏ¢±àºÅ£¬Õâ¸ö¿ÉÒÔÓÉÓû§×Ô¼º¶¨Òå

+*            buf         ÏûÏ¢Êý¾ÝÖ¸Õë

+*            buf_len     ÏûÏ¢Êý¾Ý³¤¶È

+*            tgtMdlNo    Ä¿±êÄ£¿éºÅ£¬ÊÖ»ú»òPCµÈ

+*            tgtSubMdlNo Ä¿±ê×ÓÄ£¿éºÅ

+*            srcSubMdlNo Ô´×ÓÄ£¿éºÅ

+*            srcTask     Ô´ÈÎÎñID

+*            tgtTask     Ä¿±êÈÎÎñID

+*           (OUT)

+* ·µ »Ø Öµ£º Èç¹û·¢Ëͳɹ¦£¬·µ»ØZOSS_SUCCESS,·ñÔò·µ»ØZOSS_ERROR

+* ÆäËü˵Ã÷£º ÎÞ

+**************************************************************************/

+unsigned int Comm_TaskSendToPhone(unsigned int msg_id, const unsigned char *buf, unsigned short bufLen,  \

+                                  unsigned char tgtMdlNo, unsigned char tgtSubMdlNo, unsigned char srcSubMdlNo, void * srcTask, void * tgtTask);

+

+

+/**

+ * @brief ·¢ËÍÊý¾Ýµ½"ͳһ»º´æ"ÖÐ

+ * @param[in] buf           ·¢ËÍÊý¾Ý(±ØÐëÊÇÓÉComm_MallocÉêÇëµÄÄÚ´æ!!!)

+ * @param[in] buf_len       ·¢ËÍÊý¾ÝµÄ³¤¶È

+ * @param[in] tgt_mdl_no    Ä¿±êÄ£¿éºÅ£¬ÊÖ»ú»òPCµÈ

+ * @param[in] tgt_submdl_no Ä¿±ê×ÓÄ£¿éºÅ

+ * @param[in] src_submdl_no Ô´×ÓÄ£¿éºÅ

+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ·ñÔò·µ»ØZOSS_ERROR

+ * @note

+ * @see 

+ */

+VOID Comm_HeaderInit(T_COMM_TYPE *commHeader, UINT32 buf_len,

+                     UINT8 tgt_mdl_no, UINT8 tgt_submdl_no, UINT8 src_submdl_no);

+#endif /*COMM_PUB_H_*/

+

diff --git a/cp/ps/modem/tools/inc/ringbuf_ex.h b/cp/ps/modem/tools/inc/ringbuf_ex.h
new file mode 100755
index 0000000..fc3e65e
--- /dev/null
+++ b/cp/ps/modem/tools/inc/ringbuf_ex.h
@@ -0,0 +1,189 @@
+/**

+ * 

+ * @file      ringbuf_ex.h

+ * @brief     

+ *            This file is part of tools.

+ *            ¹¤¾ß»·Ðλº³å¹ÜÀíÄ£¿é

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/21  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * 2019/04/08  1.2      jiang.fenglin  È¥µô´íÎó¼ÆÊýÆ÷¸ÄÓöÏÑÔ£¬Ôö¼Óringbuf empty״̬

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef RINGBUF_EX_H

+#define RINGBUF_EX_H

+

+

+#define RINGBUF_PAD_CHAR 0xaa

+#define kLastBlock       -1

+#define kMinChunkSize    16

+

+enum

+{

+    kBlockNotUsed,      // ²»¿ÉÓ㬲»¿ÉÒÔ·ÖÅ䣬һ°ãÊÇĩβ²»×ãÒÔ·ÖÅäµÄ¿é

+    kBlockFree,         // ¿ÕÏУ¬¿ÉÒÔ½øÐзÖÅä

+    kBlockAllocated,    // ¿ÉÓ㬿ÉÒÔ´æÈëÊý¾ÝÖÐ

+    kBlockReady,        // Êý¾ÝÒÑ×¼±¸ºÃ£¬¿ÉÒÔÈ¡³öÊý¾Ý

+    kBlockEmpty,        // Êý¾ÝÒÑÈ¡³ö£¬¿ÉÒÔÊÍ·Å

+};

+

+

+typedef void (*mem_lock_fnc_type)(void * ptr);

+typedef void (*mem_free_fnc_type)(void * ptr);

+

+typedef struct

+{

+    unsigned long forw_offset;  /**< Forward offset. The value of the offset

+                                                  includes the size of the header and the allocated block. */

+    char          free_flag;    /**< Flag to indicate if this memory block  is free. */

+    char          last_flag;    /**< Flag to indicate if this is the last block  in the allocated section. */

+    unsigned char extra;        /**< Extra bytes at the end of a block. */

+    unsigned char pad1;         /**< Padding at the end of a block. */

+} ringbuf_ex_header_type;

+

+typedef struct

+{

+    ringbuf_ex_header_type         *first_block;

+    /**< First block in the ringbuf. */

+    ringbuf_ex_header_type         *next_free_block;

+    /**< Next free block in the ringbuf. */

+    ringbuf_ex_header_type         *next_used_block;

+    /**< Next used block in the ringbuf. */

+    unsigned long                  total_bytes;

+    void                           *base;

+    /**< Total bytes available in the ringbuf. */

+    // »¥³âÁ¿º¯Êý

+    mem_lock_fnc_type              lock_fnc_ptr;

+    mem_free_fnc_type              free_fnc_ptr;

+} ringbuf_ex_type;

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+/**

+ * @brief ringbuf³õʼ»¯

+ * @param[in] ringbuf_ex_mem_ptr µÚÒ»¸öblockµÄÖ¸Õë

+ * @param[in] ringbuf_ex_mem_size µÚÒ»¸öblockµÄ´óС

+ * @return ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @note

+ * @see 

+ */

+ringbuf_ex_type *ringbuf_ex_init(void *ringbuf_ex_mem_ptr, UINT32 ringbuf_ex_mem_size);

+

+/**

+ * @brief ringbufÉêÇëÄÚ´æ

+ * @param[out] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] size ÄÚ´æ¿é´óС

+ * @return ÉêÇëºóµÄÄÚ´æÖ¸Õë

+ * @note

+ * @see 

+ */

+void *ringbuf_ex_malloc(ringbuf_ex_type *ringbuf_ex_ptr, int size);

+

+/**

+ * @brief ringbufÊÍ·ÅÄÚ´æ

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] ptr ÄÚ´æ¿éÖ¸Õë

+ * @return void

+ * @note

+ * @see 

+ */

+void ringbuf_ex_free(ringbuf_ex_type *ringbuf_ex_ptr, void *ptr);

+

+/**

+ * @brief ringbuf½«Ò»¸öÄÚ´æ¿éÖÃΪnotused̬

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] ptr ÄÚ´æ¿éÖ¸Õë

+ * @return 1 sucess, 0 fail

+ * @note

+ * @see 

+ */

+int ringbuf_ex_set_notused(ringbuf_ex_type *ringbuf_ex_ptr, void *ptr);

+

+/**

+ * @brief ringbuf½«Ò»¸öÄÚ´æ¿éÖÃΪready̬

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] ptr ÄÚ´æ¿éÖ¸Õë

+ * @return 1 sucess, 0 fail

+ * @note

+ * @see 

+ */

+int ringbuf_ex_set_ready(ringbuf_ex_type *ringbuf_ex_ptr, void *ptr);

+

+/**

+ * @brief ringbuf½«Ò»¸öÄÚ´æ¿éÖÃΪempty̬

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] ptr ÄÚ´æ¿éÖ¸Õë

+ * @return 1 sucess, 0 fail

+ * @note

+ * @see 

+ */

+int ringbuf_ex_set_empty(ringbuf_ex_type *ringbuf_ex_ptr, void *ptr);

+

+/**

+ * @brief ringbuf»ñÈ¡µÚÒ»¸öready buf

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @param[in] ptr ÄÚ´æ¿éÖ¸Õë

+ * @param[in] size ÄÚ´æ¿é´óС

+ * @return 1 sucess, 0 fail

+ * @note

+ * @see 

+ */

+int ringbuf_ex_get_first_ready(ringbuf_ex_type *ringbuf_ex_ptr, void **ptr, UINT32 *size);

+

+/**

+ * @brief ÅжÏringbufµÄµÚÒ»¸öblockÊý¾ÝÊÇ·ñÒѾ­×¼±¸ºÃ

+ * @param[in] ringbuf_ex_ptr »·Ðλº³åÇøÖ¸Õë

+ * @return 1 sucess, 0 fail

+ * @note

+ * @see 

+ */

+int ringbuf_ex_first_block_is_ready(ringbuf_ex_type *ringbuf_ex_ptr);

+

+/**

+ * @brief ´´½¨ex2Ð͵Ļ·Ðλº³å

+ * @param[in] size Óû§Ö¸¶¨µÄ´óС£¬×¢ÒâÓû§Êµ¼Ê¿ÉÓÿռä±ÈsizeС8

+ * @return »·Ðλº³åÇøÖ¸Õë

+ * @note

+ * @see 

+ */

+void *ringbuf_ex2_create(unsigned int size);

+

+/**

+ * @brief Ïòex2Ð͵Ļ·Ðλº³åÖÐдÈëÊý¾Ý

+ * @param[in] ringbuf_ex »·Ðλº³åÇøÖ¸Õë

+ * @param[in] buf Êý¾ÝµØÖ·

+ * @param[in] len Êý¾Ý³¤¶È

+ * @return void

+ * @note

+ * @see 

+ */

+void ringbuf_ex2_write(void *ringbuf_ex, void *buf, unsigned int len);

+

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* MEMHEAP_H */

+

diff --git a/cp/ps/modem/tools/inc/tools.h b/cp/ps/modem/tools/inc/tools.h
new file mode 100644
index 0000000..b7ef6e3
--- /dev/null
+++ b/cp/ps/modem/tools/inc/tools.h
@@ -0,0 +1,68 @@
+/**

+ * 

+ * @file      tools.h

+ * @brief     

+ *            This file is part of tools.

+ *            ¹¤¾ßÊý¾ÝÀàÐͼ°¶ÔÍâ½Ó¿Ú¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef TOOLS_COMM_H

+#define TOOLS_COMM_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+

+// ´óС¶ÔÆë

+#define ALIGNED_SIZE(size, alignment) (((size) + (alignment)) & ~(alignment))

+

+#define ZTOOLS_SUCCESS         0x0

+#define ZTOOLS_FAILURE         0xFFFFFFFF

+

+#define ZCAT_PS_FILTER_LEN     0x5000

+#define ZCAT_PSEXP_FILTER_LEN  0x3000

+

+typedef enum 

+{

+    SUB_MODULE_TEST  = 0,

+    SUB_MODULE_LAST  = 256

+} SUB_MODULE_TYPE;

+

+

+typedef VOID (*LP_zPS_pack)(BYTE bFreeFg, DWORD dwMsgId, WORD wMsgLen, PBYTE pMsg, PDWORD pOut, PDWORD pOutLen);

+typedef VOID (*LP_zPS_unPack)(DWORD dwMsgId, WORD wMsgLen, PBYTE pMsg, PDWORD pOut, PWORD pOutLen, BYTE * bySendType);

+

+extern LP_zPS_pack lp_zPS_pack;

+extern LP_zPS_unPack lp_zPS_unPack;

+

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // TOOLS_COMM_H

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat.h b/cp/ps/modem/tools/inc/zcat/zcat.h
new file mode 100644
index 0000000..ca172b5
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat.h
@@ -0,0 +1,65 @@
+/**

+ * 

+ * @file      zcat.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßÊý¾ÝÀàÐͶ¨Òå¼°ZCAT½Ó¿Ú˵Ã÷

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/21  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+

+#ifndef ZCAT_H

+#define ZCAT_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+

+#include "oss_api.h"        // ²Ù×÷ϵͳÊÊÅäOSA

+#include "ram_config.h"

+#include "tools.h"

+#include "commgt_api.h"

+#include "CpTrace.h"

+#ifdef _OPTIMIZED_DRIVER

+#include "drvs_serial_device.h"     // Çý¶¯

+#endif

+#include "zcat_ue_pc_int.h"

+

+

+/**

+ * @brief »ñÈ¡apÓëcpͬ²½Ê±µÄʱ¼äºÍtick

+ * @param[in] void

+ * @return 0 on success, errno otherwise

+ * @note

+ * @see 

+ */

+UINT32 zCatAgt_GetTime(VOID);

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_ap.h b/cp/ps/modem/tools/inc/zcat/zcat_ap.h
new file mode 100644
index 0000000..5a44362
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_ap.h
@@ -0,0 +1,81 @@
+/**

+ * 

+ * @file      zcat_ap.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßAPÏûÏ¢ºÍ½á¹¹¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_AP_H

+#define ZCAT_AP_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+

+// µ¥ÌõAPÏûÏ¢×î´ó³¤¶È

+#define APLOG_MAXSIZE   MAX_PATH

+#define MAX_AP_MOD 255

+

+typedef enum

+{

+    LEVEL_EMERGENCY = 0,    // ÓÃÓÚ½ô¼±Ê¼þÏûÏ¢£¬Ò»°ãÊÇϵͳ±ÀÀ£Ö®Ç°ÌáʾµÄÏûÏ¢

+    LEVEL_ALERT,            // ÓÃÓÚÐèÒªÁ¢¼´²ÉÈ¡¶¯×÷µÄÇé¿ö

+    LEVEL_CRITICAL,         // ÁÙ½ç״̬£¬Í¨³£Éæ¼°ÑÏÖØµÄÓ²¼þ»òÈí¼þ²Ù×÷ʧ°Ü

+    LEVEL_ERROR,            // ÓÃÓÚ±¨¸æ´íÎó״̬£¬ÈçÉ豸Çý¶¯³ÌÐò¾­³£ÓÃÀ´±¨¸æÀ´×ÔÓ²¼þµÄÎÊÌâ

+    LEVEL_WARNING,          // ¶Ô¿ÉÄܳöÏÖÎÊÌâµÄÇé¿ö½øÐо¯¸æ£¬Í¨³£²»»á¶ÔϵͳÔì³ÉÑÏÖØÎÊÌâ

+    LEVEL_NOTICE,           // ÓбØÒª½øÐÐÌáʾµÄÕý³£ÇéÐΣ¬ÈçÓ밲ȫÏà¹ØµÄ×´¿ö»ã±¨

+    LEVEL_INFOMATION,       // ÌáʾÐÔÐÅÏ¢£¬ÈçÇý¶¯³ÌÐòÔÚÆô¶¯Ê±´òÓ¡ËûÃÇÕÒµ½µÄÓ²¼þÐÅÏ¢

+    LEVEL_DEBUG,            // ÓÃÓÚµ÷ÊÔÐÅÏ¢

+

+    LEVEL_PRICNT

+} E_ZCAT_AP_PRIORITY;

+

+typedef struct

+{

+    UINT8 priority;

+    UINT8 mod;

+    UINT16 len;

+} T_ZCAT_APLOG_HEADER;

+

+// ´òÓ¡ÐÅÏ¢½Úµã

+typedef struct _tagApLogNode

+{

+    T_ZCAT_APLOG_HEADER hApLog;

+    char *pBuf;

+} T_ZCAT_APLOG_NODE;

+

+/**

+ *  ½Ó¿ÚÔ­ÐÍ 

+ */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_AP_H

+

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_dbg.h b/cp/ps/modem/tools/inc/zcat/zcat_dbg.h
new file mode 100755
index 0000000..5ba093f
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_dbg.h
@@ -0,0 +1,307 @@
+/**

+ * 

+ * @file      zcat_dbg.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßDbg¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_DBG_H

+#define ZCAT_DBG_H

+

+//#include "oss_api.h"

+#include "zcat_sig.h"

+#include "zcat_event.h"

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+#define GSM_PHY_MOD_NUM         64

+#define TD_PHY_MOD_NUM          64

+#define TD_PHY_PROCCESS_NUM     16

+#define LTE_PHY_MOD_NUM         128

+#define WCDMA_PHY_MOD_NUM       64

+#define WCDMA_PHY_PROCCESS_NUM  16

+#define PS_MOD_NUM              256

+#define PS_MSG_NUM              4096

+#define PS_ERR_NUM              2046

+

+

+typedef enum

+{

+    MAX_RULE_SIG_LEN           = 2 + SIG_MASK_BYTE_NUM,

+    MAX_RULE_EVENT_LEN         = 2 + EVENT_MASK_BYTE_NUM,

+    MAX_RULE_GSM_PHY_LEN       = 2 + 2 * GSM_PHY_MOD_NUM,

+    MAX_RULE_TD_PHY_MOD_LEN    = 1 + 1 + TD_PHY_MOD_NUM,

+    MAX_RULE_TD_PHY_PRO_LEN    = 1 + 1 + TD_PHY_PROCCESS_NUM,

+    MAX_RULE_TD_PHY_LEN        = MAX_RULE_TD_PHY_MOD_LEN + MAX_RULE_TD_PHY_PRO_LEN,

+    MAX_RULE_WCDMA_PHY_MOD_LEN = 1 + 1 + WCDMA_PHY_MOD_NUM,

+    MAX_RULE_WCDMA_PHY_PRO_LEN = 1 + 1 + WCDMA_PHY_PROCCESS_NUM,

+    MAX_RULE_WCDMA_PHY_LEN     = MAX_RULE_WCDMA_PHY_MOD_LEN + MAX_RULE_WCDMA_PHY_PRO_LEN,

+    MAX_RULE_LTE_PHY_LEN       = 1 + LTE_PHY_MOD_NUM,

+    MAX_RULE_PS_MSG_LEN        = 2 + 2 + 4 * PS_MSG_NUM,

+    MAX_RULE_PS_MOD_LEN        = 2 + 2 + PS_MOD_NUM,

+    MAX_RULE_PS_ERR_LEN        = 2 + 2 + 4 * PS_ERR_NUM,

+    MAX_RULE_PS_ERR_LEVEL_LEN  = 4,

+    MAX_RULE_PS_TYPE_LEN       = 4,

+

+    MAX_RULE_LEN               = 2 * (MAX_RULE_PS_MSG_LEN + MAX_RULE_PS_MOD_LEN + MAX_RULE_PS_TYPE_LEN)      // ×î´óµÄ¹æÔòΪЭÒéջȫ¿ª ±£ÊØ*2

+}DBG_ENUM_RULE_LEN;

+

+typedef enum 

+{

+    DBG_TYPE_TOTAL   = 0,

+    DBG_GSM_PHY      = 1,

+    DBG_TD_PHY       = 2,

+    DBG_LTE_PHY      = 3,

+    DBG_WCDMA_PHY    = 4,

+    DBG_PS_PRIMARY   = 5,

+    DBG_PS_EXCEPTION = 8,

+    DBG_PS_GLOBAL    = 9,

+

+    DBG_ALL_TYPE

+} DBG_ENUM_TYPE;

+

+typedef enum 

+{

+    TD_PHY_MOD_FILTER = 1,

+    TD_PHY_PRO_FILTER = 2

+} TD_PHY_FILTER_TYPE;

+

+typedef enum 

+{

+    WCDMA_PHY_MOD_FILTER = 1,

+    WCDMA_PHY_PRO_FILTER = 2

+} WCDMA_PHY_FILTER_TYPE;

+

+typedef enum 

+{

+    PS_MOD_FILTER     = 1,

+    PS_MSG_FILTER     = 2,

+    PS_MSG_TYPE       = 3

+} PS_FILTER_TYPE;

+

+typedef enum 

+{

+    PS_EXCEPTION_MOD_FILTER        = 1,

+    PS_EXCEPTION_ERRORCODE_FILTER  = 2,

+    PS_EXCEPTION_LEVEL_FILTER      = 3,

+    PS_EXCEPTION_MSG_TYPE          = 4

+} PS_EXCEPTION_FILTER_TYPE;

+

+// GSM´òÓ¡¼¶±ð

+#define GSM_PHY_TL_NONE           (0x00)

+#define GSM_PHY_TL_MSG            (0x01)

+#define GSM_PHY_TL_SDL            (0x02)

+#define GSM_PHY_TL_FUNC_IF        (0x04)

+#define GSM_PHY_TL_CALC           (0x08)

+#define GSM_PHY_TL_HWTP           (0x10)

+#define GSM_PHY_TL_DEAC           (0x20)

+#define GSM_PHY_TL_ACT            (0x40)

+#define GSM_PHY_TL_STATE          (0x80)

+#define GSM_PHY_TL_WARN           (0x100)

+#define GSM_PHY_TL_ERROR          (0x200)

+

+// TD´òÓ¡¼¶±ð

+#define TD_PHY_LEVEL_NONE         (0x00)     /* ²»´òÓ¡ */

+#define TD_PHY_LEVEL_LOW          (0x01)     /* µÍ¼¶±ð */

+#define TD_PHY_LEVEL_MED          (0x02)     /* Öм¶±ð */

+#define TD_PHY_LEVEL_HIGH         (0x04)     /* ¸ß¼¶±ð */

+

+// LTE´òÓ¡¼¶±ð

+#define LTE_PHY_LEVEL_NONE        (0x00)     /* ²»´òÓ¡ */

+#define LTE_PHY_LEVEL_LOW         (0x01)     /* µÍ¼¶±ð */

+#define LTE_PHY_LEVEL_MED         (0x02)     /* Öм¶±ð */

+#define LTE_PHY_LEVEL_HIGH        (0x04)     /* ¸ß¼¶±ð */

+

+// WCDMA´òÓ¡¼¶±ð

+#define WCDMA_PHY_LEVEL_NONE      (0x00)     /* ²»´òÓ¡ */

+#define WCDMA_PHY_LEVEL_LOW       (0x01)     /* µÍ¼¶±ð */

+#define WCDMA_PHY_LEVEL_MED       (0x02)     /* Öм¶±ð */

+#define WCDMA_PHY_LEVEL_HIGH      (0x04)     /* ¸ß¼¶±ð */

+

+// PSÄ£¿é¹ýÂË

+#define PS_MOD_NONE               (0x00)     /* ²»´òÓ¡ */

+#define PS_MOD_OUT                (0x01)     /* ³ö¸ú×Ù */

+#define PS_MOD_IN                 (0x02)     /* Èë¸ú×Ù */

+

+// PSÒ쳣ģ¿é¹ýÂË

+#define PS_EXCEPTION_MOD_NONE     (0x00)     /* ²»´òÓ¡ */

+#define PS_EXCEPTION_MOD_TRACE    (0x01)     /* ¸ú×Ù */

+

+// PSÒì³£´òÓ¡¼¶±ð

+#define PS_EXCEPTION_LEVEL_NORMAL (0x01)     /* Ò»°ã¼¶±ð */

+#define PS_EXCEPTION_LEVEL_SEVERE (0x02)     /* ÑÏÖØ¼¶±ð */

+#define PS_EXCEPTION_LEVEL_DEBUG  (0x04)     /* µ÷ÊÔ¼¶±ð */

+

+// TDÄ£¿é¹ýÂË

+#define TD_PHY_MOD_NONE           (0x00)     /* ²»´òÓ¡ */

+#define TD_PHY_MOD_TRACE          (0x01)     /* ¸ú×Ù */

+

+#define PS_TYPE_OR_LEVEL_0        (0x00)     /* ¸ú×ÙPS0 */

+#define PS_TYPE_OR_LEVEL_1        (0x01)     /* ¸ú×ÙPS1 */

+#define PS_TYPE_OR_LEVEL_2        (0x02)     /* ¸ú×ÙPS2 */

+#define PS_TYPE_OR_LEVEL_3        (0x03)     /* ¸ú×ÙPS1ºÍPS2 */

+// DBG header

+typedef struct  

+{

+    UINT16 DbgID;

+    UINT16 Filter;

+    UINT32 MsgID;

+    UINT32 Length;

+} T_ZCAT_DBG_HEADER;

+

+// ЭÒéÕ»ÏûÏ¢½á¹¹

+typedef struct

+{

+    UINT32         msgID;               // ÐÅÁîÏûÏ¢ID

+    BYTE           bSrcModID;           // Ô´Ä£¿éID

+    BYTE           bDestModID;          // Ä¿±êÄ£¿éID

+    BYTE           Direct;

+    BYTE           bPsType;             // 0:ЭÒéÕ»1, 2:ЭÒéÕ»2

+    UINT32         gsmSFN;              // GSM³¬Ö¡ºÅ

+    UINT32         tdSFN;               // TD³¬Ö¡ºÅ

+    UINT32         lteSFN;              // LTE³¬Ö¡ºÅ

+    UINT32         wcdmaSFN;            // WCDMA³¬Ö¡ºÅ

+    BYTE          *pMsgBuf;             // ÐÅÁîÊý¾ÝÇø  

+    UINT32         msgLen;              // Êý¾ÝÇø³¤¶È

+    UINT32         wphyCFN;

+    UINT32         wphySubFrame;

+    UINT32         wphyRTCFN;

+} T_ZCAT_PS_HEADER;

+

+typedef struct

+{

+    UINT32          Errcode;

+    BYTE            ModelId;

+    BYTE            PsType;             //0:ЭÒéÕ»1,2£ºÐ­ÒéÕ»2

+    BYTE            State;

+    BYTE            Level;

+    UINT32          RecvMsgId;

+    UINT32          SendMsgId;

+    UINT32          SFN;                // SFn

+    BYTE           *pMsgBuf;

+    UINT32          MsgLen;

+    UINT32          gsmSFN; 

+    UINT32          lteSFN; 

+    UINT32          WCDMASFN; 

+} T_ZCAT_PS_EXCEPTION_HEADER;

+

+#define GSM_MAX_PARAM_NUM    20  // ×Ô¶¨Òå´òÓ¡ÏûÏ¢×î¶à²ÎÊý¸öÊý

+#define GSM_SIG_HEAD         20  // L1GÐè½âÂëÏûÏ¢µÄÏûϢͷ³¤¶È£¬½âÂëʱÐèÒªÆ«ÒÆµ½20×Ö½ÚºóȡԭʼÂëÁ÷

+

+// GSMÎïÀí²ã´òÓ¡ÏûϢͷ½á¹¹

+typedef struct

+{

+    UINT32    dwSFN;             // ³¬Ö¡ºÅ

+    UINT16    wCOState;          // CO״̬£¬°´Î»½âÎö

+    UINT16    wMsgId;

+    UINT16    wModNo;

+    UINT8     cLevel;

+    UINT8     cParamCnt;

+} T_ZCAT_GSM_PRINTINFO;

+

+// GSMÎïÀí²ãÏûÏ¢ÀàÐͶ¨Ò壬Ŀǰ֧³Ö´òÓ¡ÏûÏ¢ºÍÐÅÁîÏûÏ¢

+typedef enum

+{

+    GSM_MSG_PRN     =  0,

+    GSM_MSG_SIG     =  1,

+    GSM_MSG_OLD_PRN =  2,

+    GSM_MSG_UNKNOWN =  0x1FFFFFFF  // Ç¿ÖÆÃ¶¾ÙÀàÐÍΪ4¸ö×Ö½Ú£¬ºÍPC²à(ĬÈÏ4¸ö×Ö½Ú)¶ÔÆë

+} T_ZCAT_GSM_MSGTYPE;

+

+typedef struct

+{

+    T_ZCAT_GSM_MSGTYPE   MsgType;  // ÏûÏ¢ÀàÐÍ

+    UINT32               SFN;      // Ö¡ºÅ

+    UINT32               Tick;

+    UINT16               CoState;  // CO״̬£¬°´Î»½âÎö

+} T_ZCAT_GSM_TRACEHEADER;

+

+//GSMÎïÀí²ãÐÅÁîÏûÏ¢½á¹¹

+typedef struct

+{

+    UINT32   MsgID;         // ÏûÏ¢ID

+    UINT16   Len;           // ÂëÁ÷³¤¶È

+    UINT16   SrcModID;      // Ô´Ä£¿éID

+    UINT16   DestModID;     // Ä¿±êÄ£¿éID

+    unsigned char* Buf;     // ÂëÁ÷µØÖ·

+} T_ZCAT_GSM_SIGMSGINFO;

+

+//GSMÎïÀí²ã´òÓ¡ÏûÏ¢½á¹¹

+typedef  struct

+{

+    UINT16   MsgID;

+    UINT16   ParamNum;

+    SINT32   Buf[GSM_MAX_PARAM_NUM];

+    UINT32   ModID;

+    UINT32   Level;

+} T_ZCAT_GSM_PRNMSGINFO;

+

+//GSMÎïÀí²ã¾ßÌåijÀàÏûÏ¢½á¹¹

+typedef union

+{

+    T_ZCAT_GSM_SIGMSGINFO     sigMsgInfo;  //ÐÅÁîÏûÏ¢

+    T_ZCAT_GSM_PRNMSGINFO     prnMsgInfo;  //´òÓ¡ÏûÏ¢

+} T_ZCAT_GSM_SPECMSGINFO;

+

+//GSMÎïÀí²ãÏûÏ¢¸ú×ÙÍ·½á¹¹

+typedef struct

+{

+    T_ZCAT_GSM_TRACEHEADER    traceHeader;  //ÏûÏ¢¹«¹²Í·

+    T_ZCAT_GSM_SPECMSGINFO    specMsgInfo; //¾ßÌåijÀàÏûÏ¢ÐÅÏ¢

+} T_ZCAT_GSM_TRACEINFO;

+

+#define LTE_MAX_PARAM_NUM     32 /*×Ô¶¨Òå´òÓ¡ÏûÏ¢×î¶à²ÎÊý¸öÊý*/

+

+typedef struct

+{

+    UINT32 dwLogInfoHeader;

+    UINT16 wMsgId;

+    UINT16 wParaNum;

+    UINT32 wLteSfn;

+} T_ZCAT_LTE_PRINTINFO;

+

+typedef struct

+{

+    UINT8  operation;

+    UINT8  reserved;

+    UINT16 len;

+}T_ZCAT_LTE_CONTROL_MSG;

+

+typedef enum

+{

+    LTE_SET_FILTERNUM = 1

+} T_ZCAT_LTE_CONTROL_MSG_TYPE;

+

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_DBG_H

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_diag.h b/cp/ps/modem/tools/inc/zcat/zcat_diag.h
new file mode 100644
index 0000000..ce9618f
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_diag.h
@@ -0,0 +1,353 @@
+/**

+ * 

+ * @file      zcat_diag.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßDIAGÏûÏ¢ºÍ½á¹¹¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.2

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2013/10/11  1.1      hou.bing       Add Sys View

+ * 2019/02/02  1.2      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_DIAG_H

+#define ZCAT_DIAG_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+

+/* ϵͳ¹Û²ì */

+#define ZCAT_SYSVIEW_BASE                     (UINT32)(EV_ZOSS_TRACE_BASE + 115)

+#define ZCAT_SYSVIEW_TASK_REQ                 (UINT32)(ZCAT_SYSVIEW_BASE)         /* ÈÎÎñÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_TASK_INFO                (UINT32)(ZCAT_SYSVIEW_BASE + 1)     /* ÈÎÎñÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_TASK_RESET_REQ           (UINT32)(ZCAT_SYSVIEW_BASE + 2)     /* ÈÎÎñÔËÐдÎÊýºÍʱ¼äÇåÁãÏûÏ¢ */

+#define ZCAT_SYSVIEW_TASK_RESET_ACK           (UINT32)(ZCAT_SYSVIEW_BASE + 3)     /* ÈÎÎñÔËÐдÎÊýºÍʱ¼äÇåÁãÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_THREAD_REQ               (UINT32)(ZCAT_SYSVIEW_BASE + 4)     /* Ïß³ÌÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_THREAD_INFO              (UINT32)(ZCAT_SYSVIEW_BASE + 5)     /* Ïß³ÌÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_THREAD_RESET_REQ         (UINT32)(ZCAT_SYSVIEW_BASE + 6)     /* Ïß³ÌÔËÐдÎÊýºÍʱ¼äÇåÁãÏûÏ¢ */

+#define ZCAT_SYSVIEW_THREAD_RESET_ACK         (UINT32)(ZCAT_SYSVIEW_BASE + 7)     /* Ïß³ÌÔËÐдÎÊýºÍʱ¼äÇåÁãÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_PERF_REQ                 (UINT32)(ZCAT_SYSVIEW_BASE + 8)     /* ÐÔÄÜÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_PERF_INFO                (UINT32)(ZCAT_SYSVIEW_BASE + 9)     /* ÐÔÄÜÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_RUNLOG_NAME_REQ          (UINT32)(ZCAT_SYSVIEW_BASE + 10)    /* ËùÓÐÏ̺߳ÍÈÎÎñÃû³ÆÓëID¶Ô³Æ¹ØÏµÇëÇó */

+#define ZCAT_SYSVIEW_RUNLOG_NAME_INFO         (UINT32)(ZCAT_SYSVIEW_BASE + 11)    /* ·µ»ØËùÓÐÏ̺߳ÍÈÎÎñÃû³ÆºÍID */

+#define ZCAT_SYSVIEW_RUNLOG_SETID_REQ         (UINT32)(ZCAT_SYSVIEW_BASE + 12)    /* ÉèÖÃÑ¡ÖÐÒª¼Ç¼µÄÏ̺߳ÍÈÎÎñµÄIDÇëÇó */

+#define ZCAT_SYSVIEW_RUNLOG_SETID_ACK         (UINT32)(ZCAT_SYSVIEW_BASE + 13)    /* ÉèÖÃÑ¡ÖÐÒª¼Ç¼µÄÏ̺߳ÍÈÎÎñµÄIDµÄ»ØÓ¦ */

+#define ZCAT_SYSVIEW_RUNLOG_START_REQ         (UINT32)(ZCAT_SYSVIEW_BASE + 14)    /* ¿ªÊ¼¼Ç¼Çл»¹ì¼£ÇëÇ󣬰üÀ¨ÊÇ·ñ×Ô¶¯Í£Ö¹ÉèÖà */

+#define ZCAT_SYSVIEW_RUNLOG_START_ACK         (UINT32)(ZCAT_SYSVIEW_BASE + 15)    /* ¿ªÊ¼¼Ç¼Çл»¹ì¼£»ØÓ¦³É¹¦Óëʧ°Ü */

+#define ZCAT_SYSVIEW_RUNLOG_STOP_REQ          (UINT32)(ZCAT_SYSVIEW_BASE + 16)    /* Í£Ö¹¼Ç¼Çл»¹ì¼£ ÇëÇó */

+#define ZCAT_SYSVIEW_RUNLOG_HALF_REQ          (UINT32)(ZCAT_SYSVIEW_BASE + 17)    /* Í£Ö¹¼Ç¼Çл»¹ì¼£ ÇëÇó */

+#define ZCAT_SYSVIEW_RUNLOG_FULL_REQ          (UINT32)(ZCAT_SYSVIEW_BASE + 18)    /* Í£Ö¹¼Ç¼Çл»¹ì¼£ ÇëÇó */

+#define ZCAT_SYSVIEW_RUNLOG_INFO              (UINT32)(ZCAT_SYSVIEW_BASE + 19)    /* Éϱ¨Çл»¹ì¼£¼Ç¼ */

+#define ZCAT_SYSVIEW_RUNLOG_STOP_ACK          (UINT32)(ZCAT_SYSVIEW_BASE + 20)    /* Éϱ¨Çл»¹ì¼£¼Ç¼½áÊø*/

+#define ZCAT_SYSVIEW_RUNLOG_LINK_KEEP         (UINT32)(ZCAT_SYSVIEW_BASE + 21)    /* Ïß³ÌÇл»¼Ç¼Á¬½ÓÏûÏ¢*/

+#define ZCAT_SYSVIEW_HEAP_REQ                 (UINT32)(ZCAT_SYSVIEW_BASE + 22)    /* ¶ÑʹÓÃÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_HEAP_INFO                (UINT32)(ZCAT_SYSVIEW_BASE + 23)    /* ¶ÑʹÓÃÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_UB_USE_REQ               (UINT32)(ZCAT_SYSVIEW_BASE + 24)    /* UBÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_UB_USE_INFO              (UINT32)(ZCAT_SYSVIEW_BASE + 25)    /* UBÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_UB_LEAK_REQ              (UINT32)(ZCAT_SYSVIEW_BASE + 26)    /* UBÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_UB_LEAK_INFO             (UINT32)(ZCAT_SYSVIEW_BASE + 27)    /* UBÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_FS_REQ                   (UINT32)(ZCAT_SYSVIEW_BASE + 28)    /* ÎļþϵͳÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_FS_INFO                  (UINT32)(ZCAT_SYSVIEW_BASE + 29)    /* ÎļþϵͳÇëÇóÓ¦´ðÏûÏ¢ */

+#define ZCAT_SYSVIEW_FW_REQ                   (UINT32)(ZCAT_SYSVIEW_BASE + 30)    /* ÈíÓ²¼þÐÅÏ¢ÇëÇóÏûÏ¢ */

+#define ZCAT_SYSVIEW_FW_INFO                  (UINT32)(ZCAT_SYSVIEW_BASE + 31)    /* ÈíÓ²¼þÐÅÏ¢ÇëÇóÓ¦´ðÏûÏ¢ */

+

+

+#define ZCAT_SYSVIEW_MAX_THREAD_NAME_LEN      16                                  /* Ïß³ÌÃû×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_MAX_TASK_NAME_LEN        16                                  /* ÈÎÎñÃû×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_MAX_NAME_LEN             16                                  /* Ïß³Ì(ÈÎÎñÃû)×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_MAX_UBLEAK_FILE_NAME_LEN 8                                   /* UBй¶ÐÅÏ¢ÎļþÃû³Æ×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_MAX_DRIVER_NAME_LEN      8                                   /* Çý¶¯Æ÷ÅÌ·û×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_MAX_FW_INFO_LEN          32                                  /* ϵͳÈíÓ²¼þÐÅÏ¢ÄÚÈݳ¤¶È */

+#define ZCAT_SYSVIEW_MAX_FLASH_NAME_LEN       32                                  /* FLASH¶ÎÃû³Æ×î´ó³¤¶È */

+#define ZCAT_SYSVIEW_COMMON_SYNCBIT1          (0x07)                              /* ÏûϢͬ²½Î»1 */

+#define ZCAT_SYSVIEW_COMMON_SYNCBIT2          (0x08)                              /* ÆÕͨÏûϢͬ²½Î»2 */

+#define ZCAT_SYSVIEW_PRINT_SYNCBIT2           (0x09)                              /* WinTraceµÄ´òÓ¡ÏûϢͬ²½Î»2 */

+#define ZCAT_SYSVIEW_MA_SYNCBIT2              (0x0A)                              /* MaTraceµÄ´òÓ¡ÏûϢͬ²½Î»2 */

+#define ZCAT_SYSVIEW_DSP_SYNCBIT2             (0x0B)                              /* DspTraceµÄ´òÓ¡ÏûϢͬ²½Î»2 */

+#define ZCAT_SYSVIEW_PRINT_SUBMDL_NUM         (255)                               /* ´òÓ¡×ÓÄ£¿éÊý */

+

+

+#define ZCAT_SYSVIEW_NAME_MAX_LEN 16

+

+/* ϵͳ¹Û²ìµ¥¸öÈÎÎñÐÅÏ¢ */

+typedef struct _tagtraceTaskInfo

+{

+    ZOSS_TASK_ID task_id;                                                         /* ÈÎÎñID */

+    CHAR task_name[ZCAT_SYSVIEW_MAX_TASK_NAME_LEN];                               /* ÈÎÎñÃû³Æ */

+    ZOSS_THREAD_ID thread_id;                                                     /* ÈÎÎñËùÔÚÏß³ÌID */

+    CHAR thread_name[ZCAT_SYSVIEW_MAX_THREAD_NAME_LEN];                           /* ÈÎÎñËùÔÚÏß³ÌÃû³Æ */

+    UINT32 task_time;                                                             /* ÈÎÎñÔËÐÐʱ¼ä£¬µ¥Î»ms */

+    UINT32 task_count;                                                            /* ÈÎÎñÔËÐдÎÊý */

+    UINT32 malloc_size;                                                           /* ÈÎÎñmalloc·ÖÅäÄÚ´æ´óС */

+    UINT32 ub_size;                                                               /* ÈÎÎñub·ÖÅäÄÚ´æ´óС */

+    UINT8 thread_priority;                                                        /* ÈÎÎñËùÔÚÏß³ÌÓÅÏȼ¶ */

+    UINT8 task_status;                                                            /* ÈÎÎñÔËÐÐ״̬£¬È¡ÖµÏê¼û1.2½Ú */

+    UINT8 task_state;                                                             /* ÈÎÎñ״̬»ú£¬È¡ÖµÏê¼û1.2½Ú*/

+    UINT8 cpu_used;                                                               /* ÈÎÎñCPUʹÓÃÂÊ */

+} T_ZCAT_SYSVIEW_TaskInfo;

+

+/* ϵͳ¹Û²ìµ¥¸öÏß³ÌÐÅÏ¢ */

+typedef struct _tagtraceThreadInfo

+{

+    ZOSS_THREAD_ID thread_id;                                                     /* Ïß³ÌID */

+    CHAR thread_name[ZCAT_SYSVIEW_MAX_THREAD_NAME_LEN];                           /* Ïß³ÌÃû³Æ */

+    UINT32 stack_size;                                                            /* ¶ÑÕ»´óС */

+    UINT32 malloc_size;                                                           /* malloc·ÖÅäÄÚ´æ´óС */

+    UINT32 ub_size;                                                               /* ub·ÖÅäÄÚ´æ´óС */

+    UINT32 msg_count;                                                             /* ÏûÏ¢ÊýÁ¿ */

+    UINT32 stack_address;                                                         /* Õ»¶¥µØÖ· */

+    UINT32 thread_time;                                                           /* Ïß³ÌÔËÐÐʱ¼ä£¬µ¥Î»ms */

+    UINT32 thread_count;                                                          /* Ïß³ÌÔËÐдÎÊý */

+    UINT8 thread_priority;                                                        /* Ïß³ÌÓÅÏȼ¶(0~31) */

+    UINT8 cpu_used;                                                               /* Ïß³ÌCPUʹÓÃÂÊ */

+    UINT8 stack_used;                                                             /* ¶ÑÕ»×î´óʹÓÃÂÊ */

+    UINT8 run_status;                                                             /* Ïß³ÌÔËÐÐ״̬£¬Ôݲ»Ö§³Ö£¬Ìî0xFF */

+} T_ZCAT_SYSVIEW_ThreadInfo;

+

+/* ϵͳ¹Û²ìÐÔÄÜÐÅÏ¢ */

+typedef struct _tagtraceSysPerfInfo

+{

+    UINT32 cpu_used;                                                              /* CPUʹÓÃÂÊ */

+#if 0

+    UINT32 mem_used;                                                              /* ¶ÑÄÚ´æÊ¹ÓÃÊý */

+    UINT32 mem_total;                                                             /* ¶ÑÄÚ´æ×ÜÊý */

+#endif

+} T_ZCAT_SYSVIEW_SysPerfInfo;

+

+/* CPUÔËÐй켣Ïß³ÌÈÎÎñÇëÇóÓ¦´ðÐÅÏ¢ÖÐÏ̺߳ÍÈÎÎñÐÅÏ¢ÄÚÈÝ */

+typedef struct _tagtraceThreadTaskInfo

+{

+    ZOSS_THREAD_ID thread_id;                                                     /* Ïß³ÌID */

+    ZOSS_TASK_ID task_id;                                                         /* ÈÎÎñID(Ϊ¿Õ±íʾ¸ÃÏîΪÏß³Ì) */

+    CHAR name[ZCAT_SYSVIEW_MAX_NAME_LEN];                                                /* Ïß³ÌÃû³Æ */

+} T_ZCAT_SYSVIEW_ThreadTaskInfo;

+

+/* ϵͳ¹Û²ì¶ÑʹÓÃÐÅÏ¢ */

+typedef struct _tagtraceSysHeapInfo

+{

+    UINT32 heap_total;                                                            /* ¶Ñ×Ü´óС */

+    UINT32 heap_free;                                                             /* ¶Ñ¿ÕÏдóС */

+    UINT32 heap_zmalloc;                                                          /* ʹÓÃZOSS_MALLOC·ÖÅäµÄ¶Ñ´óС */

+} T_ZCAT_SYSVIEW_SysHeapInfo;

+

+/* UBй¶ͷ²¿ÔªËØÐÅÏ¢£¬WinTraceÏà¹Ø */

+typedef struct _tagtraceLeakUBInfo

+{

+    UINT32 block_size;                                                            /* ÄÚ´æ¿é´óС */

+    UINT32 using_size;                                                            /* ʵ¼ÊÕ¼ÓôóС */

+    char name[ZCAT_SYSVIEW_MAX_UBLEAK_FILE_NAME_LEN];                             /* ÉêÇëÎļþÃû³Æ(²»º¬Â·¾¶£¬ÎļþÃûǰ11×Ö½Ú) */

+    UINT32 line;                                                                  /* ÉêÇëÎļþÐкŠ*/

+    ZOSS_THREAD_ID thread_id;                                                     /* ÉêÇëÏß³ÌID */

+    char thread_name[ZCAT_SYSVIEW_MAX_THREAD_NAME_LEN];                           /* Ïß³ÌÃû³Æ */

+    ZOSS_TASK_ID task_id;                                                         /* ÉêÇëÈÎÎñID */

+    char task_name[ZCAT_SYSVIEW_MAX_TASK_NAME_LEN];                               /* ÈÎÎñÃû³Æ */

+    UINT32 apply_time_tick;                                                       /* ÉêÇëʱ¼ä */

+} T_ZCAT_SYSVIEW_LeakUBInfo;

+

+/* Çý¶¯Æ÷µ¥ÔªÐÅÏ¢ */

+typedef struct _tagtraceSysFSInfo

+{

+    CHAR driver_name[ZCAT_SYSVIEW_MAX_DRIVER_NAME_LEN];                           /* Çý¶¯Æ÷ÅÌ·û */

+    UINT64 size_total;                                                            /* Çý¶¯Æ÷×ܿռä´óС */

+    UINT64 size_free;                                                             /* Çý¶¯Æ÷ÒÑʹÓÿռä´óС */

+} T_ZCAT_SYSVIEW_SysFSInfo;

+

+/* FLASHÐÅÏ¢ */

+typedef struct _tagSYS_FLASH_HEADER

+{

+    UINT32 size_total;                                                            /* FLASH×Ü´óС */

+    UINT32 seg_num;                                                               /* FLASH°üº¬µÄ¶ÎÊý */

+} T_ZCAT_SYSVIEW_FLASH_HEADER;

+

+/* FLASH¶ÎÐÅÏ¢ */

+typedef struct _tagSYS_FLASH_SEGMENT

+{

+    UINT32 seg_address;                                                           /* ¶ÎµØÖ· */

+    UINT32 seg_size;                                                              /* ¶Î´óС */

+    CHAR seg_name[ZCAT_SYSVIEW_MAX_FLASH_NAME_LEN];                               /* ¶ÎÃû³Æ(ÓÃ;) */

+} T_ZCAT_SYSVIEW_FLASH_SEGMENT;

+

+typedef struct tag_traceFlashConfig

+{

+    CHAR name[ZCAT_SYSVIEW_NAME_MAX_LEN];/*»®·ÖÇøÓòÃû³Æ*/

+    UINT32 base;                  /*ÆðʼµØÖ·*/

+    UINT32 size;                  /*´óС*/

+    struct tag_traceFlashConfig *next; /*ÏÂÒ»¶ÎÇøÓò*/

+} T_ZCAT_SYSVIEW_FlashConfig;

+

+typedef struct _tagSYS_FW_INFO

+{

+    UINT32 freq;                                                                  /* ʱÖÓÆµÂÊ */

+    CHAR hw_version[ZCAT_SYSVIEW_MAX_FW_INFO_LEN];                                /* Ó²¼þ°æ±¾ */

+    CHAR sw_version[ZCAT_SYSVIEW_MAX_FW_INFO_LEN];                                /* Èí¼þ°æ±¾ */

+    CHAR build_time[ZCAT_SYSVIEW_MAX_FW_INFO_LEN];                                /* Èí¼þ°æ±¾ÖÆ×÷ʱ¼ä */

+} T_ZCAT_SYSVIEW_FW_INFO;

+

+typedef struct _tagTraceImageInfo

+{

+    UINT32 ro_base; /*RO(CODE,RO DATA)*/

+    UINT32 ro_size;

+    UINT32 rw_base;  /*RW DATA*/

+    UINT32 rw_size;

+    UINT32 zi_base; /*ZI(BSS)*/

+    UINT32 zi_size;

+} T_ZCAT_SYSVIEW_ImageInfo;

+

+typedef struct _tagtraceSysHardwareInfo

+{

+    UINT32 sys_freq;                                                              /* ʱÖÓÆµÂÊ */

+    CHAR hw_version[ZCAT_SYSVIEW_MAX_NAME_LEN];                                   /* Ó²¼þ°æ±¾ */

+} T_ZCAT_SYSVIEW_SysHardwareInfo;

+

+typedef struct _tagtraceSysSoftwareInfo

+{

+    /* ʱÖÓÆµÂÊ */

+    CHAR   sys_version[ZCAT_SYSVIEW_MAX_NAME_LEN];                                /* Èí¼þ°æ±¾ */

+    CHAR   build_date[ZCAT_SYSVIEW_MAX_NAME_LEN];                                 /* ±àÒëÈÕÆÚ */

+    CHAR   build_time[ZCAT_SYSVIEW_MAX_NAME_LEN];                                 /* ±àÒëʱ¼ä */

+    T_ZCAT_SYSVIEW_ImageInfo image_info;                                          /* binÎļþÐÅÏ¢ */

+} T_ZCAT_SYSVIEW_SysSoftwareInfo;

+

+/* FLASH¶ÎÐÅÏ¢ */

+typedef struct _tagtraceFlashSegment

+{

+    UINT32 seg_address;                                                           /* ¶ÎµØÖ· */

+    UINT32 seg_size;                                                              /* ¶Î´óС */

+    CHAR seg_name[ZCAT_SYSVIEW_MAX_FLASH_NAME_LEN];                               /* ¶ÎÃû³Æ(ÓÃ;) */

+} T_ZCAT_SYSVIEW_FlashSegment;

+

+

+

+typedef struct

+{

+    UINT16 type;

+    UINT8  operation;

+    UINT8  result;

+} T_ZCAT_DIAG_CONFIG_RSP;

+

+typedef struct

+{

+    UINT32 total_drop_count;

+    UINT32 sig_drop_count;

+    UINT32 event_drop_count;

+    UINT32 print_drop_count;

+    UINT32 ipppp_drop_count;

+    UINT32 diag_drop_count;

+    UINT32 ap_kernel_drop_count;

+    UINT32 ap_app_drop_count;

+

+    UINT32 dbg_gsm_phy_drop_count;

+    UINT32 dbg_td_phy_drop_count;

+    UINT32 dbg_lte_phy_drop_count;

+    UINT32 dbg_wcdma_phy_drop_count;

+    UINT32 dbg_ps_primary_drop_count;

+    UINT32 dbg_ps_exception_drop_count;

+} T_ZCAT_DIAG_DROP_COUNT;

+

+typedef struct

+{

+    UINT8 PsCpuLinkStatus;

+    UINT8 PhyCpuLinkStatus;

+    UINT16 reserved;

+} T_ZCAT_DIAG_UE_LINK_RSP;

+

+typedef struct

+{

+    union

+    {

+        struct

+        {

+            UINT8 PsCpuStatus;

+            UINT8 PhyCpuStatus;

+            UINT16 reserved;

+        } CpuStatus;

+

+        UINT32 Status;

+    } CpStatus;

+

+    UINT32 ApStatus;

+} T_ZCAT_DIAG_UE_STATUE;

+

+typedef struct

+{

+    T_ZCAT_HEADER zcatHeader;

+    T_ZCAT_DIAG_HEADER diagHeader;

+    T_ZCAT_DIAG_UE_LINK_REQ LinkReq;

+

+}T_ZCAT_DIAG_TEST_LINK;

+

+/**************************************************************************

+ *                            NVÏûÏ¢½á¹¹Ìå                                *

+**************************************************************************/

+//NVÏûϢͷ

+typedef struct

+{

+    UINT32 nv_OperateType;    //NVÏîµÄID, 0Ϊ¶Á£¬1Ϊд,2Ϊ°æ±¾ºÅ

+    UINT32 nv_len;   //NAÏîµÄ³¤¶È

+

+}T_NVTOOL_HEADER;

+

+

+typedef struct

+{

+    BYTE nvType;    // NVµÄÀàÐÍ, 0ΪÎïÀí²ã£¬ 1ΪЭÒéÕ»

+    BYTE bitlen;    // bitÀàÐÍʱµÄ³¤¶È

+    BYTE bitstart;  // bitÀàÐÍµÄÆðʼλÖÃ

+    BYTE ret;       // »Ø¸´µÄ±ê¼Çλ

+    DWORD wLen;     // ×Ö½Ú³¤¶È

+    DWORD dwOffset; // Æ«ÒÆµØÖ·

+}T_NVTOOL_MSG;

+typedef struct

+{

+    UINT32  msgID;

+    UINT32  optWord;

+    UINT32  length;

+} T_AU_HEADER;

+

+typedef struct

+{

+    unsigned int offset;

+    unsigned int length;

+} T_AU_ONLINE_DATA_ITEM;

+

+typedef struct

+{

+    T_AU_ONLINE_DATA_ITEM itemTx;

+    T_AU_ONLINE_DATA_ITEM itemRx;

+} T_AU_ONLINE_DATA_TABLE;

+

+

+/************************************************************************/

+/*                              ½Ó¿ÚÔ­ÐÍ                                */

+/************************************************************************/

+// ´óС¶ÔÆë

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_DIAG_H

+

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_event.h b/cp/ps/modem/tools/inc/zcat/zcat_event.h
new file mode 100644
index 0000000..f619df0
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_event.h
@@ -0,0 +1,73 @@
+/**

+ * 

+ * @file      zcatagt_event.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßeventÏûÏ¢´¦ÀíÄ£¿é

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_EVENT_H

+#define ZCAT_EVENT_H

+

+#include "StdLogMsgID.h"

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+// ÓÃÓÚ»ñÈ¡mask bit£º

+#define GET_EVENT_MASK_BIT(event_id) (0x01 << ((event_id) & 7))

+

+// Event Mask×Ü×Ö½ÚÊý

+#define EVENT_MASK_BYTE_NUM          ((EVT_TOOL_LAST + 7) / 8)

+

+/************************************************************************/

+/*                         Êý¾ÝÀàÐÍ                                     */

+/************************************************************************/

+typedef struct 

+{

+	UINT16 event_id;

+	UINT8  psType;

+    UINT8  padding;

+    UINT32 gsmSFN;

+    UINT32 tdSFN;

+    UINT32 lteSFN;

+    UINT32 wcdmaSFN;

+    UINT16 len;

+	UINT16 reserved;

+} T_ZCAT_EVENT_HEADER;

+

+/************************************************************************/

+/*                              ½Ó¿ÚÔ­ÐÍ                                */

+/************************************************************************/

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_EVENT_H

+

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_ipppp.h b/cp/ps/modem/tools/inc/zcat/zcat_ipppp.h
new file mode 100644
index 0000000..ff279f7
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_ipppp.h
@@ -0,0 +1,81 @@
+/**

+ * 

+ * @file      zcat_ipppp.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßIPPPPÏûÏ¢ºÍ½á¹¹¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      li.minghui     Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_IPPPP_H

+#define ZCAT_IPPPP_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+/************************************************************************/

+/*                             Í·Îļþ°üº¬                               */

+/************************************************************************/

+//#include "oss_api.h"            // ²Ù×÷ϵͳÊÊÅäOSA

+

+#ifdef _CORE_ARM0

+#ifndef _USE_SMALL_VERSION 

+#include "oss_ppp.h"

+#include "zpsi_api.h"

+#endif

+#endif

+

+/************************************************************************/

+/*                         Êý¾ÝÀàÐÍ                                     */

+/************************************************************************/

+typedef struct

+{

+    UINT16 pppip_id;

+    UINT16 len;

+} T_ZCAT_PPPIP_HEADER;

+

+typedef struct

+{

+    UINT16 pppip_id;

+    UINT16 enable;

+} T_ZCAT_PPPIP_SWITCH_INFO;

+

+typedef enum

+{

+    IPPPP_IP = 1,

+    IPPPP_PPP = 2,

+    IPPPP_MAC = 3

+} T_ZCAT_IPPPP_TYPE;

+

+BOOL zCatAgent_IpPpp_Export(UINT16 type, UINT8 *buf, UINT16 buf_len);

+BOOL zCatAgent_IpPpp_ExportIp(UINT8 chId , VOID *packet, SINT32 packetLen, UINT8 flag);

+BOOL zCatAgent_IpPpp_ExportPpp(UINT32 pppNum , VOID *packet, UINT32 packetLen, UINT8 flag);

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_IPPPP_H

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_print.h b/cp/ps/modem/tools/inc/zcat/zcat_print.h
new file mode 100644
index 0000000..a59004b
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_print.h
@@ -0,0 +1,71 @@
+/**

+ * 

+ * @file      zcat_print.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ß MODEM PRINTÄ£¿éºÍµÈ¼¶¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_PRINT_H

+#define ZCAT_PRINT_H

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+/************************************************************************/

+/*                         Êý¾ÝÀàÐÍ                                     */

+/************************************************************************/

+// ÁÙʱ£¬È¥³ý±àÒ뾯¸æ

+#undef  PRINT_LEVEL_FORBID

+#undef  PRINT_LEVEL_ABNORMAL

+#undef  PRINT_LEVEL_SEVERE

+#undef  PRINT_LEVEL_NORMAL

+#undef  PRINT_LEVEL_DEBUG

+////////////////////////////////////

+

+#define PRINT_LEVEL_FORBID    (0x00)   /* ²»´òÓ¡   */

+#define PRINT_LEVEL_DEBUG     (0x01)   /* µ÷ÊÔ¼¶±ð */

+#define PRINT_LEVEL_NORMAL    (0x02)   /* ÆÕͨ¼¶±ð */

+#define PRINT_LEVEL_SEVERE    (0x04)   /* ÑÏÖØ¼¶±ð */

+#define PRINT_LEVEL_ABNORMAL  (0x08)   /* Òì³£¼¶±ð */

+

+typedef struct 

+{

+	UINT8 mod;

+	UINT8 level;

+	UINT16 len;

+} T_ZCAT_PRINT_HEADER;

+/************************************************************************/

+/*                              ½Ó¿ÚÔ­ÐÍ                                */

+/************************************************************************/

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_PRINT_H

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_sig.h b/cp/ps/modem/tools/inc/zcat/zcat_sig.h
new file mode 100644
index 0000000..122adf2
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_sig.h
@@ -0,0 +1,125 @@
+/**

+ * 

+ * @file      zcat_sig.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßPS±ê×¼SIG¶¨Òå

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2012/12/27  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_SIG_H

+#define ZCAT_SIG_H

+

+#include "StdLogMsgID.h"

+

+#ifdef __cplusplus

+extern "C"

+{

+#endif

+

+// ÓÃÓÚ»ñÈ¡mask bit£º

+#define GET_SIG_MASK_BIT(sig_id) (0x01 << ((sig_id) & 7))

+

+// Sig Mask×Ü×Ö½ÚÊý

+#define SIG_MASK_BYTE_NUM        ((LOG_TOOL_LAST + 7) / 8)

+

+/************************************************************************/

+/*                         Êý¾ÝÀàÐÍ                                     */

+/************************************************************************/

+typedef struct

+{

+    UINT16 sig_id;

+    UINT8  psType;

+    UINT8  padding;

+    UINT32 gsmSFN;

+    UINT32 tdSFN;

+    UINT32 lteSFN;

+    UINT32 wcdmaSFN;

+    UINT16 len;

+    UINT16 reserved;

+} T_ZCAT_SIG_HEADER;

+

+typedef enum

+{

+    SIG_START_RESORCCO = 1,

+    SIG_STOP_RESORCCO

+} T_ZCAT_SIG_CONTROL_MSG_TYPE;

+

+typedef struct

+{

+    UINT8  operation;

+    UINT8  reserved;

+    UINT16 len;

+} T_ZCAT_SIG_CONTROL_MSG;

+

+typedef struct {

+	BYTE     bEUMacDlBlc;

+	BYTE     bEUMacUlBlc;

+	BYTE     bEUMacStatic;

+

+	BYTE     bEURlcDlAMAllPdu;

+	BYTE     bEURlcDlAMCtrlPdu;

+	BYTE     bEURlcDlAMPollPdu;

+	BYTE     bEURlcDlAMSignalPdu;

+	BYTE     bEURlcDlUMPdu;

+	BYTE     bEURlcDlStatic;

+

+	BYTE     bEURlcUlAMAllPdu;

+	BYTE     bEURlcUlAMCtrlPdu;

+	BYTE     bEURlcUlAMPollPdu;

+	BYTE     bEURlcUlAMSignalPdu;

+	BYTE     bEURlcUlUMPdu;

+	BYTE     bEURlcUlStatic;

+

+	BYTE     bEPdcpDlPdu;

+	BYTE     bEPdcpUlPdu;

+	BYTE     bEPdcpDlCipherPdu;

+	BYTE     bEPdcpUlCipherPdu;

+	BYTE     bEPdcpDlCtrlPdu;

+	BYTE     bEPdcpUlCtrlPdu;

+	BYTE     bEPdcpDlSrbIntegrityPdu;

+	BYTE     bEPdcpUlSrbIntegrityPdu;

+	BYTE     bEPDCPDlStatic;

+	BYTE     bEPDCPUlStatic;

+

+	BYTE     abPadding[3];

+

+} T_ZCAT_zEUL2_LogMask_Ind;

+/************************************************************************/

+/*                              ½Ó¿ÚÔ­ÐÍ                                */

+/************************************************************************/

+typedef struct

+{

+	UINT32 header;

+	UINT16 type;

+	UINT16 len;

+//±È½ÏÌØÊ⣬Êý¾Ý³¤¶ÈÐèÒªÔö¼Ó4MsgID

+	UINT32 MsgID;

+}THHeader;

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif // ZCAT_SIG_H

+

diff --git a/cp/ps/modem/tools/inc/zcat/zcat_ue_pc_int.h b/cp/ps/modem/tools/inc/zcat/zcat_ue_pc_int.h
new file mode 100644
index 0000000..d9fee0c
--- /dev/null
+++ b/cp/ps/modem/tools/inc/zcat/zcat_ue_pc_int.h
@@ -0,0 +1,185 @@
+/**

+ * 

+ * @file      zcat_ue_pc_int.h

+ * @brief     

+ *            This file is part of ZCAT.

+ *            ZCAT¹¤¾ßUEºÍPC¹«¹²Í·Îļþ

+ *            

+ * @details   

+ * @author    Tools Team.

+ * @email     

+ * @copyright Copyright (C) 2013 Sanechips Technology Co., Ltd.

+ * @warning   

+ * @date      2019/02/02

+ * @version   1.1

+ * @pre       

+ * @post      

+ *            

+ * @par       

+ * Change History :

+ * ---------------------------------------------------------------------------

+ * date        version  author         description

+ * ---------------------------------------------------------------------------

+ * 2013/01/21  1.0      lu.xieji       Create file

+ * 2019/02/02  1.1      jiang.fenglin  ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen

+ * ---------------------------------------------------------------------------

+ * 

+ * 

+ */

+

+#ifndef ZCAT_UE_PC_INT_H

+#define ZCAT_UE_PC_INT_H

+#include "zcat_dbg.h"

+

+//´¦ÀíUE ÄÚ´æ²é¿´

+#define ZCAT_UE_MEM_LOOKUP_READ      0

+#define ZCAT_UE_MEM_LOOKUP_WRITE     1

+#define ZCAT_UE_MEM_LOOKUP_AUDIO     2

+

+// ZCAT½á¹¹¶¨Òå

+typedef struct

+{

+    UINT8   cmd_code;

+    UINT8   padding;

+    UINT16  reserved;

+    UINT32  length;

+    UINT32  timeStamp[2];

+} T_ZCAT_HEADER;

+

+typedef struct

+{

+    UINT16 diag_id;

+    UINT16 len;

+} T_ZCAT_DIAG_HEADER;

+

+typedef struct

+{

+    T_ZCAT_HEADER       zcatHeader;

+    T_ZCAT_DIAG_HEADER  diagHeader;

+} T_ZCAT_DIAG_MSG;

+

+typedef struct

+{

+    UINT16 type;

+    UINT8  operation;

+    UINT8  reserved;

+} T_ZCAT_DIAG_CONFIG_REQ;

+

+typedef enum

+{

+    DIAG_FILTER_CONFIG = 1,

+    DIAG_DROP_COUNT,

+    DIAG_LINK_MSG,

+    DIAG_SIG_CONTROL_MSG,

+    DIAG_NV_MSG,

+    DIAG_LTE_CONTROL_MSG,

+    DIAG_PS_GLB_MSG,

+    DIAG_PS_FILTERRANK_MSG,

+    DIAG_UE_MEM_LOOKUP,

+    DIAG_RAMDUMP_MSG,

+    DIAG_TSPVERSION_MSG,

+    DIAG_SYSVIEW_MSG,

+    DIAG_NVTOOL_MSG,

+    DIAG_AUDIO_MSG,

+    DIAG_AU_OPRATE_MSG

+} T_ZCAT_DIAG_TYPE;

+

+typedef enum

+{

+    ZCAT_SIG_REPORT     = 1,        // ±ê×¼ÐÅÁîµÄps log

+    ZCAT_EVT_REPORT     = 2,        // EventÐÅÏ¢

+    ZCAT_PRN_REPORT     = 3,        // modem print

+    ZCAT_DBG_REPORT     = 4,        // phy¡¢psÔ­Óï¡¢psÒì³£

+    ZCAT_IPPPP_REPORT   = 5,        // ps EventÐÅÏ¢

+    ZCAT_DIAG_REPORT    = 6,        // diagÖ¸Áî

+    ZCAT_DIAG_NULL,                 // ֻռһ룬²»Ê¹Óã¬Ê¹ÓëPC¶ÔÆë

+

+    ZCAT_AP_KERNEL_LOG  = 8,        // ap kernel log

+    ZCAT_AP_APP_LOG     = 9,        // ap app log

+    ZCAT_SIG_PHY        = 10,       // ±ê×¼ÐÅÁîµÄphy log

+    ZCAT_SMALL_CELL_LOG = 11,       // 

+    ZCAT_SMALL_CELL_PRINT_LOG = 12, // 

+

+	ZCAT_AP2_KERNEL_LOG  = 13,      // ap kernel log

+    ZCAT_AP2_APP_LOG     = 14,      // ap app log

+    

+    ZCAT_CMDCODE_MAX

+} T_ZCAT_CMDCODE;

+

+typedef enum

+{

+    ZCAT_SIG_TYPE               = (ZCAT_SIG_REPORT),

+    ZCAT_EVENT_TYPE             = (ZCAT_EVT_REPORT),

+    ZCAT_PRINT_TYPE             = (ZCAT_PRN_REPORT),

+    ZCAT_DBG_TYPE               = (ZCAT_DBG_REPORT),

+    ZCAT_IPPPP_TYPE             = (ZCAT_IPPPP_REPORT),

+    ZCAT_DIAG_TYPE              = (ZCAT_DIAG_REPORT),

+    ZCAT_AP_KERNEL_TYPE         = (ZCAT_AP_KERNEL_LOG),

+    ZCAT_AP_APP_TYPE            = (ZCAT_AP_APP_LOG),

+    ZCAT_AP2_KERNEL_TYPE        = (ZCAT_AP2_KERNEL_LOG),

+    ZCAT_AP2_APP_TYPE           = (ZCAT_AP2_APP_LOG),

+    ZCAT_SMALL_CELL_TYPE        = (ZCAT_SMALL_CELL_LOG),

+    ZCAT_SMALL_CELL_PRINT_TYPE  = (ZCAT_SMALL_CELL_PRINT_LOG),

+    ZCAT_DBG_TYPE_TOTAL         = ((DBG_TYPE_TOTAL   << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_GSM_PHY            = ((DBG_GSM_PHY      << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_TD_PHY             = ((DBG_TD_PHY       << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_LTE_PHY            = ((DBG_LTE_PHY      << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_WCDMA_PHY          = ((DBG_WCDMA_PHY    << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_PS_PRIMARY         = ((DBG_PS_PRIMARY   << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_PS_EXCEPTION       = ((DBG_PS_EXCEPTION << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_PS_GLOBAL          = ((DBG_PS_GLOBAL    << 8) | ZCAT_DBG_REPORT),

+    ZCAT_DBG_ALL_TYPE           = ((DBG_ALL_TYPE     << 8) | ZCAT_DBG_REPORT),

+

+    ZCAT_FILTER_VIEW            = 0xFFFE,

+    ZCAT_ALL_TYPE               = 0xFFFF

+} ZCAT_ENUM_TYPE;

+

+typedef enum

+{

+    DISABLE_LOGGING = 0,

+    ENABLE_LOGGING,

+    GET_MASK,

+    SET_MASK,

+

+    DIAG_LAST_OPERATION

+} T_ZCAT_DIAG_CONFIG_OPERATION_TYPE;

+

+typedef struct

+{

+    UINT64 PCTime;

+    UINT32 APTime;

+    UINT32 CPTime;

+}T_ZCAT_DIAG_UE_LINK_REQ;

+

+typedef struct 

+{

+    UINT32      type;

+    UINT32          addr;

+    UINT32          len;

+    UINT32     total;

+    UINT32     index;

+}T_ZCAT_UE_MEM_LOOKUP;

+

+#define ZCAT_AUDIO_EXPORT_READ    0

+#define ZCAT_AUDIO_EXPORT_RESEND  1

+#define ZCAT_AUDIO_MAX_PACKET_LEN 32768

+#define ZCAT_AUDIO_MAX_TRY_TIME   3

+

+typedef struct

+{

+    UINT32 type;

+    UINT32 operation;

+    UINT32 index;

+}T_ZCAT_AUDIO_EXPORT_REQ;

+

+typedef struct

+{

+    UINT32 type;

+    UINT32 blkNum;

+    UINT32 index;

+    UINT32 filelen;

+}T_ZCAT_AUDIO_EXPORT_RSP;

+

+#define ALIGNED_SIZE(size, alignment) (((size) + (alignment)) & ~(alignment))

+

+#endif