[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/cp/ps/amt/modem/inc/amt_baseband.h b/cp/ps/amt/modem/inc/amt_baseband.h
new file mode 100644
index 0000000..d16f0b1
--- /dev/null
+++ b/cp/ps/amt/modem/inc/amt_baseband.h
@@ -0,0 +1,52 @@
+/**
+ *
+ * @file amt_baseband.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
+ * ---------------------------------------------------------------------------
+ * 2016/12/12 1.0 lu.xieji Create file
+ * 2019/02/02 1.1 jiang.fenglin ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen
+ * ---------------------------------------------------------------------------
+ *
+ *
+ */
+
+#ifndef _AMT_BASEBAND_H
+#define _AMT_BASEBAND_H
+
+
+// Message ID
+#define MSG_TEST_SIM (0xE4)
+
+#define MSG_CUSTOM_START (0x8000)
+#define MSG_CUSTOM_END (0xFFFF)
+
+/**
+ * @brief ´´½¨AMT»ØÓ¦ÏûÏ¢£¬²¢·¢ËÍ
+ * @param[in] msg_id ÏûÏ¢ID
+ * @param[in] buf ÏûÏ¢ÌåÖ¸Õë
+ * @param[in] buf_len ÏûÏ¢Ì峤¶È
+ * @return N/A
+ * @note
+ * @see
+ */
+extern void AmtAgent_CreateResponse(unsigned int msg_id, unsigned char* buf, unsigned int buf_len);
+
+#endif
+
diff --git a/cp/ps/amt/modem/src/amt_agent_sim.c b/cp/ps/amt/modem/src/amt_agent_sim.c
new file mode 100644
index 0000000..08fab7e
--- /dev/null
+++ b/cp/ps/amt/modem/src/amt_agent_sim.c
@@ -0,0 +1,76 @@
+/**
+ *
+ * @file amt_agent_sim.c
+ * @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
+ * ---------------------------------------------------------------------------
+ * 2016/12/12 1.0 lu.xieji Create file
+ * 2019/02/02 1.1 jiang.fenglin ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen
+ * ---------------------------------------------------------------------------
+ *
+ *
+ */
+
+
+/**
+ * Í·Îļþ°üº¬
+ */
+#include "oss_api.h"
+#include "drv_api.h"
+#include "amt_baseband.h"
+
+
+
+/**
+ * º¯ÊýʵÏÖ
+ */
+
+/**
+ * @brief sim¿¨²âÊÔÏûÏ¢´¦Àíº¯Êý
+ * @param[in] msg_id FID
+ * @param[in] msg_buf »º´æÖ¸Õë
+ * @param[in] msg_len »º´æ³¤¶È
+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ʧ°Ü·µ»ØZOSS_ERROR
+ * @note
+ * @see
+ */
+UINT32 AmtAgent_Sim_ProcessMsg(UINT32 msg_id, UINT8* msg_buf, UINT32 msg_len)
+{
+ UINT8 ret = 0;
+ int resetResult;
+
+ zOss_Printf(SUBMDL_AMT, PRINT_LEVEL_NORMAL, "%s: Test sim", __FUNCTION__);
+
+ resetResult = zDrvUicc_ResetCard(UICC_PRIMARY_CARD);
+
+ if (resetResult == 0)
+ {
+ zOss_Printf(SUBMDL_AMT, PRINT_LEVEL_NORMAL, "%s: The SIM-card reset is OK!", __FUNCTION__);
+ ret = 1;
+ }
+ else
+ {
+ zOss_Printf(SUBMDL_AMT, PRINT_LEVEL_ABNORMAL, "%s: The SIM-card reset is failed! resetResult=%d", __FUNCTION__,resetResult);
+ ret = 0;
+ }
+
+ AmtAgent_CreateResponse(msg_id, (UINT8*)&ret, sizeof(UINT8));
+ return ZOSS_SUCCESS;
+}
+
diff --git a/cp/ps/amt/modem/src/amt_baseband.c b/cp/ps/amt/modem/src/amt_baseband.c
new file mode 100644
index 0000000..101c54e
--- /dev/null
+++ b/cp/ps/amt/modem/src/amt_baseband.c
@@ -0,0 +1,82 @@
+/**
+ *
+ * @file amt_baseband.c
+ * @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
+ * ---------------------------------------------------------------------------
+ * 2016/12/12 1.0 lu.xieji Create file
+ * 2019/02/02 1.1 jiang.fenglin ÐÞ¸Ä×¢ÊÍ·½Ê½Îªdoxygen
+ * ---------------------------------------------------------------------------
+ *
+ *
+ */
+
+#include "oss_api.h"
+#include "amt.h"
+#include "amt_baseband.h"
+
+/**
+ * Íⲿº¯ÊýÒýÓÃ
+ */
+extern void RegBaseBandProcessPFunction(pfBaseBand pf);
+extern UINT32 AmtAgent_Sim_ProcessMsg(UINT32 msg_id, UINT8* msg_buf, UINT32 msg_len);
+
+
+
+/**
+ * º¯ÊýʵÏÖ
+ */
+
+/**
+ * @brief »ù´øÄ£¿éÏûÏ¢´¦Àíº¯Êý
+ * @param[in] msg_id FID
+ * @param[in] msg_buf »º´æÖ¸Õë
+ * @param[in] msg_len »º´æ³¤¶È
+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ʧ°Ü·µ»ØZOSS_ERROR
+ * @note
+ * @see
+ */
+UINT32 AmtAgent_Baseband_ProcessMsg(UINT16 msg_id, UINT8* msg_buf, UINT32 msg_len)
+{
+ if (msg_id == MSG_TEST_SIM)
+ {
+ AmtAgent_Sim_ProcessMsg(msg_id, msg_buf, msg_len);
+ }
+ else
+ {
+ return ZOSS_ERROR;
+ }
+
+ return ZOSS_SUCCESS;
+}
+
+/**
+ * @brief »ù´øÄ£¿é³õʼ»¯
+ * @return ³É¹¦·µ»ØZOSS_SUCCESS, ʧ°Ü·µ»ØZOSS_ERROR
+ * @note
+ * @see
+ */
+SINT32 zAmt_Init(VOID)
+{
+ // ×¢²á»Øµ÷º¯Êý¹©´úÀíÖÐÐĽ«»ù´øµÄÏûϢת·¢µ½ÕâÀï
+ RegBaseBandProcessPFunction(AmtAgent_Baseband_ProcessMsg);
+
+ return ZOSS_SUCCESS;
+}
+
diff --git a/cp/ps/amt/modem/src/makefile b/cp/ps/amt/modem/src/makefile
new file mode 100644
index 0000000..e490675
--- /dev/null
+++ b/cp/ps/amt/modem/src/makefile
@@ -0,0 +1,43 @@
+#******************************************************************************
+# Copyright (C) 2007, ZTE Corporation.
+#
+# File Name: makefile
+# File Mark:
+# Description:
+# Others:
+# Version: v0.1
+# Author: lankai
+# Date: 2015-01-19
+#*******************************************************************************/
+include $(PRJ_PATH)/config/project.mk
+
+_MDL_NAME = amt
+
+_MDL_SRC_PATH = ./
+_MDL_INC_PATH = $(AMT_INC_PATH)
+_MDL_OBJ_PATH = $(AMT_OBJ_PATH)
+
+#============================================
+#¸÷Ä£¿éÒÀÀµ¹«¹²Í·ÎļþÉèÖÃ
+#============================================
+INCLUDE += $(_EXTERNAL_INC_PATH) \
+ -I$(_MDL_INC_PATH) \
+ -I$(TOOL_PATH)/inc/amt \
+ -I$(COMMOM_PATH)/inc/ \
+ -I$(DRV_PATH)/inc \
+ -I$(DRV_PATH)/inc/io
+
+#============================================
+#Ä£¿éÎļþÐÅÏ¢
+#============================================
+_C_SOURCE = $(wildcard $(_MDL_SRC_PATH)/*.c)
+
+_s_SOURCE =
+
+_S_SOURCE =
+
+#============================================
+# ±àÒë¹æÔò
+#============================================
+include $(FRAME_PATH)/rules/mdl_rules.mk
+
diff --git a/cp/ps/amt/modem/ws/makefile b/cp/ps/amt/modem/ws/makefile
new file mode 100644
index 0000000..fab51fe
--- /dev/null
+++ b/cp/ps/amt/modem/ws/makefile
@@ -0,0 +1,41 @@
+#***********************************************************************
+# °æÈ¨ËùÓÐ (C)2001,ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£
+#
+# ÎļþÃû³Æ£º makefile
+# Îļþ±êʶ£º
+# ÄÚÈÝÕªÒª£º
+#
+# ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
+# ---------------------------------------------------------------------
+# 2015/01/19 V1.0 lankai create
+#***********************************************************************/
+include $(PRJ_PATH)/config/project.mk
+
+#===============================================
+#config
+#===============================================
+_SUBSYS_NAME = amt
+_SUBSYS_LIB_PATH = $(AMT_LIB_PATH)
+
+export AMT_SRC_PATH = $(AMT_PATH)/src
+export AMT_INC_PATH = $(AMT_PATH)/inc
+
+#===============================================
+# ref_amt Compile
+#===============================================
+amt:
+ @$(GNUMAKE) --no-print-directory -C $(AMT_SRC_PATH)
+amtclean:
+ @$(GNUMAKE) --no-print-directory -C $(AMT_SRC_PATH) clean
+
+ifeq ($(USE_SMALL_VERSION),no)
+_ALL_MDLS += amt
+endif
+
+ifeq ($(findstring amt,$(_ALL_MDLS)),amt)
+_ALL_OBJECTS += $(wildcard $(AMT_OBJ_PATH)/*.o)
+endif
+#============================================
+# ±àÒë¹æÔò
+#============================================
+include $(FRAME_PATH)/rules/lib_rules.mk