Index: ICCard/prj/MDK/YC3121_Keil.uvoptx
===================================================================
--- /YC3121_demo/ModuleDemo/ICCard/ICCard/prj/MDK/YC3121_Keil.uvoptx	(revision 659)
+++ /YC3121_demo/ModuleDemo/ICCard/ICCard/prj/MDK/YC3121_Keil.uvoptx	(working copy)
@@ -248,7 +248,7 @@
       <GroupNumber>2</GroupNumber>
       <FileNumber>3</FileNumber>
       <FileType>1</FileType>
-      <tvExp>0</tvExp>
+      <tvExp>1</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
       <PathWithFileName>..\..\user\main.c</PathWithFileName>
@@ -256,18 +256,6 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
-    <File>
-      <GroupNumber>2</GroupNumber>
-      <FileNumber>4</FileNumber>
-      <FileType>1</FileType>
-      <tvExp>0</tvExp>
-      <tvExpOptDlg>0</tvExpOptDlg>
-      <bDave2>0</bDave2>
-      <PathWithFileName>..\..\user\bt_code.c</PathWithFileName>
-      <FilenameWithoutPath>bt_code.c</FilenameWithoutPath>
-      <RteFlg>0</RteFlg>
-      <bShared>0</bShared>
-    </File>
   </Group>
 
   <Group>
@@ -278,7 +266,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>5</FileNumber>
+      <FileNumber>4</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -290,7 +278,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>6</FileNumber>
+      <FileNumber>5</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -302,7 +290,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>7</FileNumber>
+      <FileNumber>6</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -322,7 +310,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>8</FileNumber>
+      <FileNumber>7</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -334,7 +322,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>9</FileNumber>
+      <FileNumber>8</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -354,13 +342,37 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>5</GroupNumber>
+      <FileNumber>9</FileNumber>
+      <FileType>1</FileType>
+      <tvExp>0</tvExp>
+      <tvExpOptDlg>0</tvExpOptDlg>
+      <bDave2>0</bDave2>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816.c</PathWithFileName>
+      <FilenameWithoutPath>yc_7816.c</FilenameWithoutPath>
+      <RteFlg>0</RteFlg>
+      <bShared>0</bShared>
+    </File>
+    <File>
+      <GroupNumber>5</GroupNumber>
       <FileNumber>10</FileNumber>
-      <FileType>4</FileType>
+      <FileType>1</FileType>
+      <tvExp>0</tvExp>
+      <tvExpOptDlg>0</tvExpOptDlg>
+      <bDave2>0</bDave2>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816_T0.c</PathWithFileName>
+      <FilenameWithoutPath>yc_7816_T0.c</FilenameWithoutPath>
+      <RteFlg>0</RteFlg>
+      <bShared>0</bShared>
+    </File>
+    <File>
+      <GroupNumber>5</GroupNumber>
+      <FileNumber>11</FileNumber>
+      <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816.lib</PathWithFileName>
-      <FilenameWithoutPath>yc_7816.lib</FilenameWithoutPath>
+      <PathWithFileName>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816_T1.c</PathWithFileName>
+      <FilenameWithoutPath>yc_7816_T1.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
Index: ICCard/prj/MDK/YC3121_Keil.uvprojx
===================================================================
--- /YC3121_demo/ModuleDemo/ICCard/ICCard/prj/MDK/YC3121_Keil.uvprojx	(revision 659)
+++ /YC3121_demo/ModuleDemo/ICCard/ICCard/prj/MDK/YC3121_Keil.uvprojx	(working copy)
@@ -401,11 +401,6 @@
               <FileType>1</FileType>
               <FilePath>..\..\user\main.c</FilePath>
             </File>
-            <File>
-              <FileName>bt_code.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\..\user\bt_code.c</FilePath>
-            </File>
           </Files>
         </Group>
         <Group>
@@ -447,9 +442,19 @@
           <GroupName>ICCard</GroupName>
           <Files>
             <File>
-              <FileName>yc_7816.lib</FileName>
-              <FileType>4</FileType>
-              <FilePath>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816.lib</FilePath>
+              <FileName>yc_7816.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816.c</FilePath>
+            </File>
+            <File>
+              <FileName>yc_7816_T0.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816_T0.c</FilePath>
+            </File>
+            <File>
+              <FileName>yc_7816_T1.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\..\..\..\..\Librarier\sdk\yc_7816\yc_7816_T1.c</FilePath>
             </File>
           </Files>
         </Group>
Index: ICCard/user/main.c
===================================================================
--- /YC3121_demo/ModuleDemo/ICCard/ICCard/user/main.c	(revision 659)
+++ /YC3121_demo/ModuleDemo/ICCard/ICCard/user/main.c	(working copy)
@@ -2,21 +2,21 @@
   ******************************************************************************
   * @file    3121Demo\ModuleDemo\ICCard\ICCard\user\main.c
   * @author  Yichip Application Team
-  * @version V1.0.0
-  * @date    19-Feb-2020
+  * @version V1.0.1
+  * @date    15-July-2020
   * @brief   ICCard test program.
   ******************************************************************************
   * @attention
   *
   * COPYRIGHT 2019 Yichip Microelectronics
   *
-  * The purpose of this firmware is to provide guidance to customers engaged in 
-	* programming work to guide them smoothly to product development, 
-	* so as to save their time.
-	*
-	* Therefore, Yichip microelectronics shall not be responsible for any direct, 
-	* indirect or consequential damages caused by any content of this gu jiang 
-	* and/or contained in this code used by the customer in its products.
+  * The purpose of this firmware is to provide guidance to customers engaged in
+  * programming work to guide them smoothly to product development,
+  * so as to save their time.
+  *
+  * Therefore, Yichip microelectronics shall not be responsible for any direct,
+  * indirect or consequential damages caused by any content of this gu jiang
+  * and/or contained in this code used by the customer in its products.
   *
   ******************************************************************************
   */
@@ -31,6 +31,17 @@
 /* Private typedef -----------------------------------------------------------*/
 /* Private define ------------------------------------------------------------*/
 #define uartBaud 115200
+#define MPOS_BOARD
+
+#ifdef MPOS_BOARD
+    #define DET_PORT GPIOC
+    #define DET_PIN  GPIO_Pin_12
+#endif
+
+#ifdef EPOS_BOARD
+    #define DET_PORT GPIOA
+    #define DET_PIN  GPIO_Pin_4
+#endif
 
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
@@ -41,19 +52,26 @@
 
 void ISO7816_IO_Config(void)
 {
-	sci_pin.clk.gpio_group = GPIOC;
-	sci_pin.clk.gpio_pin = GPIO_Pin_13;
-	
-	sci_pin.io.gpio_group = GPIOC;
-	sci_pin.io.gpio_pin = GPIO_Pin_14;
-	
-	sci_pin.reset.gpio_group = GPIOC;
-	sci_pin.reset.gpio_pin = GPIO_Pin_15;
-	
-	sci_pin.detect.gpio_group = GPIOC;
-	sci_pin.detect.gpio_pin = GPIO_Pin_12;
-	
-	sci_pin.detect_state = 1;
+    sci_pin.clk.gpio_group = GPIOC;
+    sci_pin.clk.gpio_pin = GPIO_Pin_13;
+
+    sci_pin.io.gpio_group = GPIOC;
+    sci_pin.io.gpio_pin = GPIO_Pin_14;
+
+    sci_pin.reset.gpio_group = GPIOC;
+    sci_pin.reset.gpio_pin = GPIO_Pin_15;
+
+    sci_pin.detect.gpio_group = DET_PORT;
+    sci_pin.detect.gpio_pin = DET_PIN;
+#ifdef EPOS_BOARD
+    GPIO_Config(GPIOC, GPIO_Pin_12, GPCFG_PU);
+#endif
+    sci_pin.detect_state = 1;
+
+    period_7816 = (CPU_MHZ / 4000000 / 2) - 1;
+    contact_reset_l_cnt = 42000 * (CPU_MHZ/1000000) / 4;
+    contact_atr_rfb_time_cnt = 47000 * (CPU_MHZ/1000000) / 4;
+    contact_atr_rab_time_cnt = (20164 * (CPU_MHZ/1000000) / 4) * 372;
 }
 
 /**
@@ -63,16 +81,20 @@
   */
 int main(void)
 {
-	UART_Configuration();
+#ifdef EPOS_BOARD
+    QSPI_CTRL  |= (0x80);
+    SYSCTRL_HCLK_CON = 0;
+#endif
+    UART_Configuration();
+
+    MyPrintf("Yc3121 7816 Demo!\r\n");
 
-	MyPrintf("7816 Demo !\n\n");
+    ISO7816_IO_Config();
 
-	ISO7816_IO_Config();	
-	
-	while (1)
-	{
-		ISO7816_loopBack();
-	}
+    while (1)
+    {
+        ISO7816_loopBack();
+    }
 }
 
 /**
@@ -82,178 +104,179 @@
   */
 void UART_Configuration(void)
 {
-	UART_InitTypeDef UART_InitStruct;
+    UART_InitTypeDef UART_InitStruct;
 
-	/* Configure serial ports 0 RX and TX for IO. */
-	GPIO_Config(GPIOA, GPIO_Pin_1, UART0_TXD);
-	GPIO_Config(GPIOA, GPIO_Pin_0, UART0_RXD);
-
-	/* USARTx configured as follow:
-  - BaudRate = 115200 baud  
-  - Word Length = 8 Bits
-  - Stop Bit = 1 Stop Bit
-  - Parity = No Parity
-  - Hardware flow control disabled (RTS and CTS signals)
-  - Receive and transmit enabled
-  */
-	UART_InitStruct.BaudRate = uartBaud;			//Configure serial port baud rate, the baud rate defaults to 128000.
-	UART_InitStruct.DataBits = Databits_8b;
-	UART_InitStruct.StopBits = StopBits_1;
-	UART_InitStruct.Parity = Parity_None;
-	UART_InitStruct.FlowCtrl = FlowCtrl_None;
-	UART_InitStruct.Mode = Mode_duplex;
-	
-	UART_Init(UART0, &UART_InitStruct);
+    /* Configure serial ports 0 RX and TX for IO. */
+    GPIO_Config(GPIOA, GPIO_Pin_1, UART0_TXD);
+    GPIO_Config(GPIOA, GPIO_Pin_0, UART0_RXD);
+
+    /* USARTx configured as follow:
+    - BaudRate = 115200 baud
+    - Word Length = 8 Bits
+    - Stop Bit = 1 Stop Bit
+    - Parity = No Parity
+    - Hardware flow control disabled (RTS and CTS signals)
+    - Receive and transmit enabled
+    */
+    UART_InitStruct.BaudRate = uartBaud;			//Configure serial port baud rate, the baud rate defaults to 128000.
+    UART_InitStruct.DataBits = Databits_8b;
+    UART_InitStruct.StopBits = StopBits_1;
+    UART_InitStruct.Parity = Parity_None;
+    UART_InitStruct.FlowCtrl = FlowCtrl_None;
+    UART_InitStruct.Mode = Mode_duplex;
+
+    UART_Init(UART0, &UART_InitStruct);
 }
-uint16_t iso7816_init(uint8_t vcc_sel, uint8_t *out_atr,uint8_t *atrlen)
+
+uint16_t iso7816_init(uint8_t vcc_sel, uint8_t *out_atr, uint8_t *atrlen)
 {
-	uint8_t ATRLen;
-	uint16_t Ret;
-	uint8_t vcard_num = 0;;
-	vcard_num = vcc_sel;
+    uint8_t ATRLen;
+    uint16_t Ret;
+    uint8_t vcard_num = 0;;
+    vcard_num = vcc_sel;
 TOResetCard:
-	atr_time_start();
-	//激活卡片
-	Ret = ISO7816_OperateSelect(ISO7816_ACTIVE_CARD,vcard_num);
-	if(Ret != OK)
-	{
-		return Ret;
-	}
+    atr_time_start();
+    //激活卡片
+    Ret = ISO7816_OperateSelect(ISO7816_ACTIVE_CARD, vcard_num);
+    if (Ret != OK)
+    {
+        return Ret;
+    }
 TOWarmResetCard:
-	//接收复位信息
-	Ret = ISO7816_GetAtr(&g_7816Para.aAtr[1], &ATRLen);
+    //接收复位信息
+    Ret = ISO7816_GetAtr(&g_7816Para.aAtr[1], &ATRLen);
 #ifdef DEBUG_7816
-	MyPrintf("ISO7816_GetAtr Result = %x\n",Ret);
+    MyPrintf("ISO7816_GetAtr Result = %x\n", Ret);
 #endif
-	//清除atr相关计算器 
-	if(OK != Ret)
-	{
-		if((ISO7816_ATR_LEN_ERROR == Ret))
-		{
-			if((g_7816Para.bFlag & BIT1) == 0)
-			{
-				delay_ms(5);
-				ISO7816_OperateSelect(ISO7816_WARM_RESET,vcard_num);
-				goto TOWarmResetCard;
-			}
-
-		}
-		iso7816_deactive();
-		return Ret;
-	}
-	//goto TOResetCard;
-	g_7816Para.aAtr[0] = ATRLen;
-	memcpy(out_atr,g_7816Para.aAtr+1,ATRLen);
-	*atrlen = ATRLen;
-	//delay_ms(50);
-	//自动发送C0
-	g_7816Para.bFlag |= BIT2;
-	memset(&g_T1.bIFSC, 0, sizeof(g_T1));
-
-	g_T1.bIFSC = 32;
-	//ATR数据处理
-	Ret = ISO7816_DisposeATR(&g_7816Para.aAtr[1], ATRLen);
-	if(OK != Ret)
-	{
-		if((Ret == ISO7816_ATR_TA1_ERROR) || (Ret == ISO7816_ATR_TB1_ERROR)
-			|| (Ret == ISO7816_ATR_TB3_ERROR) || (Ret == ISO7816_ATR_TA3_ERROR)
-			|| (Ret == ISO7816_ATR_TC2_ERROR) || (Ret == ISO7816_ATR_TC3_ERROR) 
-			|| (Ret == ISO7816_ATR_TA2_ERROR) || (Ret == ISO7816_ATR_TD2_ERROR) 
-			|| (Ret == ISO7816_ATR_TB2_ERROR) )
-		{
-			if((g_7816Para.bFlag & BIT1) == 0)
-			{
-				ISO7816_OperateSelect(ISO7816_WARM_RESET,vcard_num);
-				goto TOWarmResetCard;				
-			}
-			else
-			{
-				ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,vcard_num);
-				delay_ms(10);
-				goto TOResetCard;				
-			}				
-		}
-		else
-		{
-			ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,vcard_num);
-			delay_ms(10);
-			goto TOResetCard;			
-		} 
-	}
-	
-	ISO7816_config_mode_fun();
-	
-	if((g_7816Para.bFlag & BIT0) == 1)
+    //清除atr相关计算器
+    if (OK != Ret)
+    {
+        if ((ISO7816_ATR_LEN_ERROR == Ret))
+        {
+            if ((g_7816Para.bFlag & BIT1) == 0)
+            {
+                delay_ms(5);
+                ISO7816_OperateSelect(ISO7816_WARM_RESET, vcard_num);
+                goto TOWarmResetCard;
+            }
+
+        }
+        iso7816_deactive();
+        return Ret;
+    }
+    //goto TOResetCard;
+    g_7816Para.aAtr[0] = ATRLen;
+    memcpy(out_atr, g_7816Para.aAtr + 1, ATRLen);
+    *atrlen = ATRLen;
+    //delay_ms(50);
+    //自动发送C0
+    g_7816Para.bFlag |= BIT2;
+    memset(&g_T1.bIFSC, 0, sizeof(g_T1));
+
+    g_T1.bIFSC = 32;
+    //ATR数据处理
+    Ret = ISO7816_DisposeATR(&g_7816Para.aAtr[1], ATRLen);
+    if (OK != Ret)
     {
-        if(g_7816Para.bTA1 != 0x11)
+        if ((Ret == ISO7816_ATR_TA1_ERROR) || (Ret == ISO7816_ATR_TB1_ERROR)
+                || (Ret == ISO7816_ATR_TB3_ERROR) || (Ret == ISO7816_ATR_TA3_ERROR)
+                || (Ret == ISO7816_ATR_TC2_ERROR) || (Ret == ISO7816_ATR_TC3_ERROR)
+                || (Ret == ISO7816_ATR_TA2_ERROR) || (Ret == ISO7816_ATR_TD2_ERROR)
+                || (Ret == ISO7816_ATR_TB2_ERROR))
+        {
+            if ((g_7816Para.bFlag & BIT1) == 0)
+            {
+                ISO7816_OperateSelect(ISO7816_WARM_RESET, vcard_num);
+                goto TOWarmResetCard;
+            }
+            else
+            {
+                ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, vcard_num);
+                delay_ms(10);
+                goto TOResetCard;
+            }
+        }
+        else
+        {
+            ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, vcard_num);
+            delay_ms(10);
+            goto TOResetCard;
+        }
+    }
+
+    ISO7816_config_mode_fun();
+
+    if ((g_7816Para.bFlag & BIT0) == 1)
+    {
+        if (g_7816Para.bTA1 != 0x11)
         {
             Ret = ISO7816_DisposePPS(g_7816Para.bTA1);
-            if(OK != Ret)
+            if (OK != Ret)
             {
-                ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,vcard_num);
+                ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, vcard_num);
                 delay_ms(10);
                 goto TOResetCard;
-            }           
-        } 
+            }
+        }
     }
-	return 0;
+    return 0;
 }
 
 uint16_t ISO7816_loopBack(void)
 {
-	uint8_t ATRLen;
-    uint16_t SendLen; 
-	uint16_t RecLen;
+    uint8_t ATRLen;
+    uint16_t SendLen;
+    uint16_t RecLen;
     uint8_t ApduCmd[280];
-	uint16_t Ret;
-	uint8_t SELECT_PSE[]	= {0x00,0xA4,0x04,0x00,0x0E,
-						   0x31,0x50,0x41,0x59,0x2E,0x53,0x59,0x53,0x2E,0x44,0x44,0x46,0x30,0x31,0x00};  /* SELECT_PPSE */
-	
+    uint16_t Ret;
+    uint8_t SELECT_PSE[]	= {0x00, 0xA4, 0x04, 0x00, 0x0E,
+                               0x31, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31, 0x00
+                           };  /* SELECT_PPSE */
+
 TOResetCard:
-	Ret = iso7816_init(1,&g_7816Para.aAtr[1], &ATRLen);
-	if(Ret != OK)
-	{
-		ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,1);
-		delay_ms(10);
-		goto TOResetCard;	
-	
-	}
-	memcpy(ApduCmd,SELECT_PSE,20);
-TOSendCMD:						   
-	
-    SendLen= 20;
+    Ret = iso7816_init(1, &g_7816Para.aAtr[1], &ATRLen);
+    if (Ret != OK)
+    {
+        ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, 1);
+        delay_ms(10);
+        goto TOResetCard;
+    }
+    memcpy(ApduCmd, SELECT_PSE, 20);
+TOSendCMD:
+
+    SendLen = 20;
     Ret = ISO7816_Dispose_CMD(ApduCmd, SendLen, g_7816Para.aRecBuff, &RecLen);
-    if(OK != Ret)
+    if (OK != Ret)
     {
-        if((ISO7816_PARITY_ERROR == Ret))
+        if ((ISO7816_PARITY_ERROR == Ret))
         {
-            ISO7816_OperateSelect(ISO7816_WARM_RESET,1);
+            ISO7816_OperateSelect(ISO7816_WARM_RESET, 1);
             delay_ms(10);
             goto TOResetCard;
         }
 
-        ISO7816_OperateSelect( ISO7816_DEACTIVE_CARD,1);
+        ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, 1);
         delay_ms(10);
         goto TOResetCard;
 
     }
-	#ifdef DEBUG_7816_EMV
-	MyPrintf("cmd ok\n");
-	#endif
-	delay_ms(2);
+#ifdef DEBUG_7816_EMV
+    MyPrintf("cmd ok\n");
+#endif
+    delay_ms(2);
 
-    if(RecLen >= 6)
+    if (RecLen >= 6)
     {
-        if(g_7816Para.aRecBuff[1] == 0x70)
+        if (g_7816Para.aRecBuff[1] == 0x70)
         {
-            ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,1);
+            ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, 1);
             delay_ms(100);
             goto TOResetCard;
         }
         else
         {
-            SendLen = RecLen-2;
-            memcpy(ApduCmd,g_7816Para.aRecBuff,SendLen);
+            SendLen = RecLen - 2;
+            memcpy(ApduCmd, g_7816Para.aRecBuff, SendLen);
 
             delay_ms(2);
             goto TOSendCMD;
@@ -261,20 +284,19 @@
     }
     else
     {
-        if(g_7816Para.aRecBuff[0] == 0xff)
+        if (g_7816Para.aRecBuff[0] == 0xff)
         {
-            ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD,1);
+            ISO7816_OperateSelect(ISO7816_DEACTIVE_CARD, 1);
             delay_ms(10);
             goto TOResetCard;
-        }       
+        }
     }
 
     delay_ms(2);
 
-    memcpy(ApduCmd,SELECT_PSE,20);
-    SendLen= 20;
-	goto TOSendCMD ;
- 
+    memcpy(ApduCmd, SELECT_PSE, 20);
+    SendLen = 20;
+    goto TOSendCMD ;
 }
 
 /************************ (C) COPYRIGHT Yichip Microelectronics *****END OF FILE****/

