; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave --gnu -o.\objects\app_tp_st_touch.o --asm_dir=.\Listings\ --list_dir=.\Listings\ --depend=.\objects\app_tp_st_touch.d --cpu=Cortex-M0 --apcs=interwork -O1 --diag_suppress=9931 -I..\..\src -I..\..\src\board -I..\..\src\common -I..\..\src\sdk\include -I..\..\src\app\demo -I..\..\src\sdk\include\M0 -I..\..\src\app -I..\..\src\app\module_demo -I..\..\src\app\touch -I..\..\src\app\S8 -I..\..\src\app\S9 -I..\CVWL568 -I..\..\src\app\s21p -I.\RTE\_ISP_568T -IC:\Users\55\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\55\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__MICROLIB -D__UVISION_VERSION=528 -D_RTE_ -DARMCM0 -DISP_568 --omf_browse=.\objects\app_tp_st_touch.crf ..\..\src\app\touch\app_tp_st_touch.c]
                          THUMB

                          AREA ||i.CRC16_2||, CODE, READONLY, ALIGN=2

                  CRC16_2 PROC
;;;145    
;;;146    unsigned short CRC16_2(unsigned char* pchMsg, unsigned short wDataLen)
000000  b570              PUSH     {r4-r6,lr}
;;;147    {
000002  4603              MOV      r3,r0
;;;148        unsigned short wCRC = 0xFFFF;
000004  480c              LDR      r0,|L1.56|
;;;149        unsigned short i;
;;;150        unsigned char  chChar;
;;;151    
;;;152        for(i = 0; i < wDataLen; i++)
000006  2200              MOVS     r2,#0
;;;153        {
;;;154            chChar = *pchMsg++;
;;;155            wCRC = wCRCTalbeAbs[(chChar ^ wCRC) & 15] ^ (wCRC >> 4);
000008  4e0c              LDR      r6,|L1.60|
00000a  e011              B        |L1.48|
                  |L1.12|
00000c  781c              LDRB     r4,[r3,#0]            ;154
00000e  1c5b              ADDS     r3,r3,#1              ;154
000010  4625              MOV      r5,r4
000012  4045              EORS     r5,r5,r0
000014  072d              LSLS     r5,r5,#28
000016  0eed              LSRS     r5,r5,#27
000018  5b75              LDRH     r5,[r6,r5]
00001a  0900              LSRS     r0,r0,#4
00001c  4045              EORS     r5,r5,r0
;;;156            wCRC = wCRCTalbeAbs[((chChar >> 4) ^ wCRC) & 15] ^ (wCRC >> 4);
00001e  0920              LSRS     r0,r4,#4
000020  4068              EORS     r0,r0,r5
000022  0700              LSLS     r0,r0,#28
000024  0ec0              LSRS     r0,r0,#27
000026  5a30              LDRH     r0,[r6,r0]
000028  092c              LSRS     r4,r5,#4
00002a  4060              EORS     r0,r0,r4
00002c  1c52              ADDS     r2,r2,#1              ;152
00002e  b292              UXTH     r2,r2                 ;152
                  |L1.48|
000030  428a              CMP      r2,r1                 ;152
000032  d3eb              BCC      |L1.12|
;;;157        }
;;;158    
;;;159        return wCRC;
;;;160    }
000034  bd70              POP      {r4-r6,pc}
;;;161    
                          ENDP

000036  0000              DCW      0x0000
                  |L1.56|
                          DCD      0x0000ffff
                  |L1.60|
                          DCD      ||.constdata||

                          AREA ||i.ap_get_tp_calibration_status_01||, CODE, READONLY, ALIGN=2

                  ap_get_tp_calibration_status_01 PROC
;;;270    
;;;271    bool ap_get_tp_calibration_status_01(hal_dsi_rx_ctrl_handle_t* handler, uint8_t param)
000000  b508              PUSH     {r3,lr}
;;;272    {
;;;273    //	if( param == 0x5A )
;;;274        {
;;;275            if(s_calibration_correct_flag)	// У׼ɹ
000002  490a              LDR      r1,|L2.44|
000004  7849              LDRB     r1,[r1,#1]  ; s_calibration_correct_flag
000006  2900              CMP      r1,#0
000008  d007              BEQ      |L2.26|
;;;276            {
;;;277                hal_dsi_rx_ctrl_send_ack_cmd(handler,
00000a  215a              MOVS     r1,#0x5a
00000c  9100              STR      r1,[sp,#0]
00000e  2301              MOVS     r3,#1
000010  2200              MOVS     r2,#0
000012  2121              MOVS     r1,#0x21
000014  f7fffffe          BL       hal_dsi_rx_ctrl_send_ack_cmd
000018  e006              B        |L2.40|
                  |L2.26|
;;;278                                             DSI_ACK_DT_DSC_SHORT_RESPONSE_1B,     //xxx
;;;279                                             DSI_VC_0,
;;;280                                             1, ST_TP_CALIBRATION_SUCCESS);
;;;281            }
;;;282            else	// У׼ʧ
;;;283            {
;;;284                hal_dsi_rx_ctrl_send_ack_cmd(handler,
00001a  2100              MOVS     r1,#0
00001c  460a              MOV      r2,r1
00001e  9100              STR      r1,[sp,#0]
000020  2301              MOVS     r3,#1
000022  2121              MOVS     r1,#0x21
000024  f7fffffe          BL       hal_dsi_rx_ctrl_send_ack_cmd
                  |L2.40|
;;;285                                             DSI_ACK_DT_DSC_SHORT_RESPONSE_1B,     //xxx
;;;286                                             DSI_VC_0,
;;;287                                             1, 0x00);
;;;288            }
;;;289        }
;;;290    
;;;291        return true;
000028  2001              MOVS     r0,#1
;;;292    }
00002a  bd08              POP      {r3,pc}
;;;293    
                          ENDP

                  |L2.44|
                          DCD      ||.data||

                          AREA ||i.ap_set_tp_calibration_04||, CODE, READONLY, ALIGN=2

                  ap_set_tp_calibration_04 PROC
;;;169    
;;;170    bool ap_set_tp_calibration_04(hal_dsi_rx_ctrl_handle_t* handler, hal_dcs_packet_t* dcs_packet)
000000  b530              PUSH     {r4,r5,lr}
;;;171    {
000002  b089              SUB      sp,sp,#0x24
000004  460c              MOV      r4,r1
;;;172        uint8_t i, crch, crcl, command, param[30] = {0};
000006  2120              MOVS     r1,#0x20
000008  a801              ADD      r0,sp,#4
00000a  f7fffffe          BL       __aeabi_memclr4
;;;173        unsigned short crc;
;;;174    
;;;175        // CRCֵ
;;;176        for(i = 0; i < dcs_packet->param_length; i++)
00000e  2000              MOVS     r0,#0
000010  a901              ADD      r1,sp,#4              ;172
000012  e005              B        |L3.32|
                  |L3.20|
;;;177        {
;;;178            param[i + 1] = dcs_packet->packet_param[i];
000014  68e2              LDR      r2,[r4,#0xc]
000016  180b              ADDS     r3,r1,r0
000018  5c12              LDRB     r2,[r2,r0]
00001a  705a              STRB     r2,[r3,#1]
00001c  1c40              ADDS     r0,r0,#1              ;176
00001e  b2c0              UXTB     r0,r0                 ;176
                  |L3.32|
000020  68a2              LDR      r2,[r4,#8]            ;176
000022  4282              CMP      r2,r0                 ;176
000024  d8f6              BHI      |L3.20|
;;;179    //		printf("%02x ",dcs_packet->packet_param[i]);
;;;180        }
;;;181    
;;;182        param[0] = 0x04;
000026  2004              MOVS     r0,#4
000028  4669              MOV      r1,sp
00002a  7108              STRB     r0,[r1,#4]
;;;183        crc = CRC16_2(param, dcs_packet->param_length - 1);
00002c  8920              LDRH     r0,[r4,#8]
00002e  1e40              SUBS     r0,r0,#1
000030  b281              UXTH     r1,r0
000032  a801              ADD      r0,sp,#4
000034  f7fffffe          BL       CRC16_2
;;;184        crch = (crc >> 8);
;;;185        crcl = crc;
;;;186    
;;;187        // CRCУж
;;;188    //	if(crch == dcs_packet->packet_param[dcs_packet->param_length-2] && crcl == dcs_packet->packet_param[dcs_packet->param_length-1])
;;;189        {
;;;190            command = param[3];
000038  4669              MOV      r1,sp
00003a  79c8              LDRB     r0,[r1,#7]
;;;191            switch(command)
00003c  2200              MOVS     r2,#0
00003e  382a              SUBS     r0,r0,#0x2a
;;;192            {
;;;193            case CMD_TP_CABLIBRATION:	// TouchУ׼
;;;194                if((param[4] == 0x01) && (param[5] == 0x01) && (param[6] == 0x01))
000040  2501              MOVS     r5,#1
;;;195                {
;;;196                    s_calibration_flag = true;
000042  4910              LDR      r1,|L3.132|
000044  2800              CMP      r0,#0                 ;191
000046  d80d              BHI      |L3.100|
000048  4668              MOV      r0,sp                 ;194
00004a  7a00              LDRB     r0,[r0,#8]            ;194
00004c  2801              CMP      r0,#1                 ;194
00004e  d109              BNE      |L3.100|
000050  4668              MOV      r0,sp                 ;194
000052  7a40              LDRB     r0,[r0,#9]            ;194
000054  2801              CMP      r0,#1                 ;194
000056  d105              BNE      |L3.100|
000058  4668              MOV      r0,sp                 ;194
00005a  7a80              LDRB     r0,[r0,#0xa]          ;194
00005c  2801              CMP      r0,#1                 ;194
00005e  d101              BNE      |L3.100|
000060  700d              STRB     r5,[r1,#0]
;;;197                    s_calibration_correct_flag = false;
000062  704a              STRB     r2,[r1,#1]
                  |L3.100|
;;;198    
;;;199                }
;;;200                /*			if( (param[4] == 0xA5) && (param[5] == 0x5A) && (param[6] == 0xA5) )
;;;201                		    {
;;;202                		    	if(s_calibration_correct_flag)	// У׼ɹ
;;;203                		    	{
;;;204                		    		hal_dsi_rx_ctrl_send_ack_cmd(handler,
;;;205                									 DSI_ACK_DT_GEN_LONG_RESPONSE,     //xxx
;;;206                									 DSI_VC_0,
;;;207                									 0x7, 0x04,0x02,0x07,0x2A,ST_TP_CALIBRATION_SUCCESS,0x00,0x00);
;;;208                					printf("cali. send ok ");
;;;209                		    	}
;;;210                				else	// У׼ʧ
;;;211                				{
;;;212                					hal_dsi_rx_ctrl_send_ack_cmd(handler,
;;;213                									 DSI_ACK_DT_GEN_LONG_RESPONSE,     //xxx
;;;214                									 DSI_VC_0,
;;;215                									 0x7, 0x04,0x02,0x07,0x2A,0x00,0x00,0x00);
;;;216                				}
;;;217                		    	printf("%02x ",s_calibration_correct_flag);
;;;218                		    }
;;;219                */
;;;220                break;
;;;221            case CMD_SET_IMAGE_RGB:		// Image RGB
;;;222                break;
;;;223            case CMD_SEND_COMMAND:		// Command Send
;;;224                break;
;;;225            case CMD_WRITE_GAMMA:		// GammaУд
;;;226                break;
;;;227            case CMD_START_GAMMA:
;;;228                break;
;;;229            default:
;;;230                break;
;;;231            }
;;;232        }
;;;233    
;;;234        // ݾɰ汾tp calibration
;;;235        if((dcs_packet->packet_param[0] == 0x01) && (dcs_packet->packet_param[1] == 0x01) && (dcs_packet->packet_param[2] == 0x01))
000064  68e0              LDR      r0,[r4,#0xc]
000066  7803              LDRB     r3,[r0,#0]
000068  2b01              CMP      r3,#1
00006a  d107              BNE      |L3.124|
00006c  7843              LDRB     r3,[r0,#1]
00006e  2b01              CMP      r3,#1
000070  d104              BNE      |L3.124|
000072  7880              LDRB     r0,[r0,#2]
000074  2801              CMP      r0,#1
000076  d101              BNE      |L3.124|
;;;236        {
;;;237            s_calibration_flag = true;
000078  700d              STRB     r5,[r1,#0]
;;;238            s_calibration_correct_flag = false;
00007a  704a              STRB     r2,[r1,#1]
                  |L3.124|
;;;239        }
;;;240        /*
;;;241        	if( (dcs_packet->packet_param[0] == 0xA5) && (dcs_packet->packet_param[1] == 0x5A) && (dcs_packet->packet_param[2] == 0xA5) )
;;;242            {
;;;243            	if(s_calibration_correct_flag)	// У׼ɹ
;;;244            	{
;;;245            		hal_dsi_rx_ctrl_send_ack_cmd(handler,
;;;246        							 DSI_ACK_DT_GEN_LONG_RESPONSE,     //xxx
;;;247        							 DSI_VC_0,
;;;248        							 0x7, 0x04,0x02,0x07,0x2A,ST_TP_CALIBRATION_SUCCESS,0x00,0x00);
;;;249            	}
;;;250        		else	// У׼ʧ
;;;251        		{
;;;252        			hal_dsi_rx_ctrl_send_ack_cmd(handler,
;;;253        							 DSI_ACK_DT_GEN_LONG_RESPONSE,     //xxx
;;;254        							 DSI_VC_0,
;;;255        							 0x7, 0x04,0x02,0x07,0x2A,0x00,0x00,0x00);
;;;256        		}
;;;257            }
;;;258        */
;;;259        return true;
00007c  2001              MOVS     r0,#1
;;;260    }
00007e  b009              ADD      sp,sp,#0x24
000080  bd30              POP      {r4,r5,pc}
;;;261    
                          ENDP

000082  0000              DCW      0x0000
                  |L3.132|
                          DCD      ||.data||

                          AREA ||i.ap_tp_st_touch_calibration||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_calibration PROC
;;;103    
;;;104    void ap_tp_st_touch_calibration(void)
000000  b510              PUSH     {r4,lr}
;;;105    {
;;;106        // app_tp_m_write(st_touch_tp_tuning_reset, sizeof(st_touch_tp_tuning_reset));    // System Reset
;;;107        // while(!hal_i2c_m_transfer_complate());
;;;108        // delayMs(10);
;;;109        app_tp_m_write(st_touch_tp_tuning_FpnlInit, sizeof(st_touch_tp_tuning_FpnlInit));     // FPnl Init
000002  2103              MOVS     r1,#3
000004  4829              LDR      r0,|L4.172|
000006  f7fffffe          BL       app_tp_m_write
                  |L4.10|
;;;110        while(!hal_i2c_m_transfer_complate());
00000a  f7fffffe          BL       hal_i2c_m_transfer_complate
00000e  2800              CMP      r0,#0
000010  d0fb              BEQ      |L4.10|
;;;111        delayMs(1);
000012  2001              MOVS     r0,#1
000014  f7fffffe          BL       delayMs
;;;112        app_tp_m_write(st_touch_tp_tuning_PnlInit, sizeof(st_touch_tp_tuning_PnlInit));     // Pnl Init
000018  4824              LDR      r0,|L4.172|
00001a  2103              MOVS     r1,#3
00001c  1cc0              ADDS     r0,r0,#3
00001e  f7fffffe          BL       app_tp_m_write
                  |L4.34|
;;;113        while(!hal_i2c_m_transfer_complate());
000022  f7fffffe          BL       hal_i2c_m_transfer_complate
000026  2800              CMP      r0,#0
000028  d0fb              BEQ      |L4.34|
;;;114        delayMs(1);
00002a  2001              MOVS     r0,#1
00002c  f7fffffe          BL       delayMs
;;;115        app_tp_m_write(st_touch_tp_tuning_TuneM, sizeof(st_touch_tp_tuning_TuneM));    // TuneM
000030  481e              LDR      r0,|L4.172|
000032  2104              MOVS     r1,#4
000034  3015              ADDS     r0,r0,#0x15
000036  f7fffffe          BL       app_tp_m_write
                  |L4.58|
;;;116        while(!hal_i2c_m_transfer_complate());
00003a  f7fffffe          BL       hal_i2c_m_transfer_complate
00003e  2800              CMP      r0,#0
000040  d0fb              BEQ      |L4.58|
;;;117        delayMs(1);
000042  2001              MOVS     r0,#1
000044  f7fffffe          BL       delayMs
;;;118        app_tp_m_write(st_touch_tp_tuning_TuneS, sizeof(st_touch_tp_tuning_TuneS));    // TuneS
000048  4818              LDR      r0,|L4.172|
00004a  2104              MOVS     r1,#4
00004c  3019              ADDS     r0,r0,#0x19
00004e  f7fffffe          BL       app_tp_m_write
                  |L4.82|
;;;119        while(!hal_i2c_m_transfer_complate());
000052  f7fffffe          BL       hal_i2c_m_transfer_complate
000056  2800              CMP      r0,#0
000058  d0fb              BEQ      |L4.82|
;;;120        delayMs(1);
00005a  2001              MOVS     r0,#1
00005c  f7fffffe          BL       delayMs
;;;121        app_tp_m_write(st_touch_tp_tuning_SvCfg, sizeof(st_touch_tp_tuning_SvCfg));    // SvCfg
000060  4812              LDR      r0,|L4.172|
000062  2103              MOVS     r1,#3
000064  1d80              ADDS     r0,r0,#6
000066  f7fffffe          BL       app_tp_m_write
                  |L4.106|
;;;122        while(!hal_i2c_m_transfer_complate());
00006a  f7fffffe          BL       hal_i2c_m_transfer_complate
00006e  2800              CMP      r0,#0
000070  d0fb              BEQ      |L4.106|
;;;123        delayMs(1);
000072  2001              MOVS     r0,#1
000074  f7fffffe          BL       delayMs
;;;124        app_tp_m_write(st_touch_tp_tuning_SvCx, sizeof(st_touch_tp_tuning_SvCx));    // SvCx
000078  480c              LDR      r0,|L4.172|
00007a  2103              MOVS     r1,#3
00007c  3009              ADDS     r0,r0,#9
00007e  f7fffffe          BL       app_tp_m_write
                  |L4.130|
;;;125        while(!hal_i2c_m_transfer_complate());
000082  f7fffffe          BL       hal_i2c_m_transfer_complate
000086  2800              CMP      r0,#0
000088  d0fb              BEQ      |L4.130|
;;;126        delayMs(1);
00008a  2001              MOVS     r0,#1
00008c  f7fffffe          BL       delayMs
;;;127        app_tp_m_write(st_touch_tp_tuning_SvPnl, sizeof(st_touch_tp_tuning_SvPnl));    // SvPnl
000090  4806              LDR      r0,|L4.172|
000092  2103              MOVS     r1,#3
000094  300c              ADDS     r0,r0,#0xc
000096  f7fffffe          BL       app_tp_m_write
                  |L4.154|
;;;128        while(!hal_i2c_m_transfer_complate());
00009a  f7fffffe          BL       hal_i2c_m_transfer_complate
00009e  2800              CMP      r0,#0
0000a0  d0fb              BEQ      |L4.154|
;;;129        delayMs(1);
0000a2  2001              MOVS     r0,#1
0000a4  f7fffffe          BL       delayMs
;;;130    }
0000a8  bd10              POP      {r4,pc}
;;;131    
                          ENDP

0000aa  0000              DCW      0x0000
                  |L4.172|
                          DCD      ||.data||+0xb

                          AREA ||i.ap_tp_st_touch_error_handler_F3||, CODE, READONLY, ALIGN=1

                  ap_tp_st_touch_error_handler_F3 PROC
;;;540    
;;;541    void ap_tp_st_touch_error_handler_F3(uint8_t* screendata)
000000  b510              PUSH     {r4,lr}
;;;542    {
;;;543        // յ TP 쳣ظ 0xF3 0x02 0x00 0x00 0x00 0x00 0x00 0x00
;;;544        if(screendata[0] == 0xF3 && screendata[1] == 0x02 && screendata[2] == 0x00)
000002  7801              LDRB     r1,[r0,#0]
000004  29f3              CMP      r1,#0xf3
000006  d107              BNE      |L5.24|
000008  7841              LDRB     r1,[r0,#1]
00000a  2902              CMP      r1,#2
00000c  d104              BNE      |L5.24|
00000e  7880              LDRB     r0,[r0,#2]
000010  2800              CMP      r0,#0
000012  d101              BNE      |L5.24|
;;;545        {
;;;546            ap_tp_st_touch_software_reset();
000014  f7fffffe          BL       ap_tp_st_touch_software_reset
                  |L5.24|
;;;547        }
;;;548    
;;;549    //	if(screendata[0] == 0xF3 && screendata[1] == 0x91 && screendata[2] == 0x00)
;;;550    //	{
;;;551    //		ap_tp_st_touch_software_reset();
;;;552    //	}
;;;553    }
000018  bd10              POP      {r4,pc}
;;;554    
                          ENDP


                          AREA ||i.ap_tp_st_touch_error_handler_FF||, CODE, READONLY, ALIGN=1

                  ap_tp_st_touch_error_handler_FF PROC
;;;562    
;;;563    void ap_tp_st_touch_error_handler_FF(uint8_t* screendata)
000000  b510              PUSH     {r4,lr}
;;;564    {
;;;565        // յ TP 쳣ظ 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
;;;566        if(screendata[1] == 0xFF && screendata[2] == 0xFF && screendata[3] == 0xFF && screendata[4] == 0xFF)
000002  7841              LDRB     r1,[r0,#1]
000004  29ff              CMP      r1,#0xff
000006  d10a              BNE      |L6.30|
000008  7881              LDRB     r1,[r0,#2]
00000a  29ff              CMP      r1,#0xff
00000c  d107              BNE      |L6.30|
00000e  78c1              LDRB     r1,[r0,#3]
000010  29ff              CMP      r1,#0xff
000012  d104              BNE      |L6.30|
000014  7900              LDRB     r0,[r0,#4]
000016  28ff              CMP      r0,#0xff
000018  d101              BNE      |L6.30|
;;;567        {
;;;568            ap_tp_st_touch_software_reset();
00001a  f7fffffe          BL       ap_tp_st_touch_software_reset
                  |L6.30|
;;;569        }
;;;570    }
00001e  bd10              POP      {r4,pc}
;;;571    
                          ENDP


                          AREA ||i.ap_tp_st_touch_get_calibration_success_mark||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_get_calibration_success_mark PROC
;;;57     
;;;58     void ap_tp_st_touch_get_calibration_success_mark(void)
000000  b500              PUSH     {lr}
;;;59     {
000002  b08d              SUB      sp,sp,#0x34
;;;60         uint8_t cali_send_buff[6] = {0xFA, 0x20, 0x01, 0x00, 0x00, 0x00};
000004  a024              ADR      r0,|L7.152|
000006  c803              LDM      r0,{r0,r1}
000008  910c              STR      r1,[sp,#0x30]
00000a  900b              STR      r0,[sp,#0x2c]
;;;61         uint8_t cali_send_buff1[3] = {0xA4, 0x06, 0x01};
00000c  a024              ADR      r0,|L7.160|
00000e  6800              LDR      r0,[r0,#0]
000010  900a              STR      r0,[sp,#0x28]
;;;62         uint8_t cali_read_buff[40] = {0};
000012  2128              MOVS     r1,#0x28
000014  4668              MOV      r0,sp
000016  f7fffffe          BL       __aeabi_memclr4
;;;63         uint8_t i = 0;
;;;64     
;;;65         app_tp_m_read(cali_send_buff, 5, cali_read_buff, 4);
00001a  2304              MOVS     r3,#4
00001c  466a              MOV      r2,sp
00001e  2105              MOVS     r1,#5
000020  a80b              ADD      r0,sp,#0x2c
000022  f7fffffe          BL       app_tp_m_read
                  |L7.38|
;;;66         while(!hal_i2c_m_transfer_complate());
000026  f7fffffe          BL       hal_i2c_m_transfer_complate
00002a  2800              CMP      r0,#0
00002c  d0fb              BEQ      |L7.38|
;;;67         delayMs(1);
00002e  2001              MOVS     r0,#1
000030  f7fffffe          BL       delayMs
;;;68     
;;;69         app_tp_m_write(cali_send_buff1, 3);
000034  2103              MOVS     r1,#3
000036  a80a              ADD      r0,sp,#0x28
000038  f7fffffe          BL       app_tp_m_write
                  |L7.60|
;;;70         while(!hal_i2c_m_transfer_complate());
00003c  f7fffffe          BL       hal_i2c_m_transfer_complate
000040  2800              CMP      r0,#0
000042  d0fb              BEQ      |L7.60|
;;;71         delayMs(1);
000044  2001              MOVS     r0,#1
000046  f7fffffe          BL       delayMs
;;;72     
;;;73         app_tp_m_read(cali_send_buff, 5, cali_read_buff, 4);
00004a  2304              MOVS     r3,#4
00004c  466a              MOV      r2,sp
00004e  2105              MOVS     r1,#5
000050  a80b              ADD      r0,sp,#0x2c
000052  f7fffffe          BL       app_tp_m_read
                  |L7.86|
;;;74         while(!hal_i2c_m_transfer_complate());
000056  f7fffffe          BL       hal_i2c_m_transfer_complate
00005a  2800              CMP      r0,#0
00005c  d0fb              BEQ      |L7.86|
;;;75         delayMs(1);
00005e  2001              MOVS     r0,#1
000060  f7fffffe          BL       delayMs
;;;76     
;;;77         app_tp_m_read(cali_send_buff, 5, cali_read_buff, 32);
000064  2320              MOVS     r3,#0x20
000066  466a              MOV      r2,sp
000068  2105              MOVS     r1,#5
00006a  a80b              ADD      r0,sp,#0x2c
00006c  f7fffffe          BL       app_tp_m_read
                  |L7.112|
;;;78         while(!hal_i2c_m_transfer_complate());
000070  f7fffffe          BL       hal_i2c_m_transfer_complate
000074  2800              CMP      r0,#0
000076  d0fb              BEQ      |L7.112|
;;;79     
;;;80         if((cali_read_buff[20] == 0xFF) && (cali_read_buff[21] == 0xFF))
000078  4668              MOV      r0,sp
00007a  7d01              LDRB     r1,[r0,#0x14]
;;;81         {
;;;82             s_calibration_correct_flag = ST_TP_CALIBRATION_SUCCESS;  // У׼ɹ
00007c  4809              LDR      r0,|L7.164|
00007e  29ff              CMP      r1,#0xff              ;80
000080  d103              BNE      |L7.138|
000082  4669              MOV      r1,sp                 ;80
000084  7d49              LDRB     r1,[r1,#0x15]         ;80
000086  29ff              CMP      r1,#0xff              ;80
000088  d003              BEQ      |L7.146|
                  |L7.138|
;;;83         }
;;;84         else
;;;85         {
;;;86             s_calibration_correct_flag = 0x00;	// У׼ʧ
00008a  2100              MOVS     r1,#0
00008c  7041              STRB     r1,[r0,#1]
                  |L7.142|
;;;87         }
;;;88         /*
;;;89         	for(i=0;i<32;i++)
;;;90         	{
;;;91         		printf("%02x ",cali_read_buff[i]);
;;;92         	}
;;;93         */
;;;94     }
00008e  b00d              ADD      sp,sp,#0x34
000090  bd00              POP      {pc}
                  |L7.146|
000092  215a              MOVS     r1,#0x5a              ;82
000094  7041              STRB     r1,[r0,#1]            ;82
000096  e7fa              B        |L7.142|
;;;95     
                          ENDP

                  |L7.152|
000098  fa200100          DCB      250," ",1,0
00009c  00                DCB      0
00009d  00                DCB      0
00009e  00                DCB      0
00009f  00                DCB      0
                  |L7.160|
0000a0  a4060100          DCB      164,6,1,0
                  |L7.164|
                          DCD      ||.data||

                          AREA ||i.ap_tp_st_touch_hardware_reset||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_hardware_reset PROC
;;;412    **************************************************************************/
;;;413    void ap_tp_st_touch_hardware_reset(void)
000000  b510              PUSH     {r4,lr}
;;;414    {
;;;415        TAU_LOGD("st_touch_hardware_reset \n");
000002  22ff              MOVS     r2,#0xff
000004  32a0              ADDS     r2,r2,#0xa0
000006  a121              ADR      r1,|L8.140|
000008  a022              ADR      r0,|L8.148|
00000a  f7fffffe          BL       LOG_printf
;;;416        ap_tp_st_touch_simulate_finger_release_event();
00000e  f7fffffe          BL       ap_tp_st_touch_simulate_finger_release_event
;;;417        ap_tp_st_touch_scan_point_init();
000012  f7fffffe          BL       ap_tp_st_touch_scan_point_init
;;;418        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_HIGH);
000016  4c29              LDR      r4,|L8.188|
000018  2101              MOVS     r1,#1
00001a  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
00001c  f7fffffe          BL       hal_gpio_set_output_data
;;;419        delayMs(2);
000020  2002              MOVS     r0,#2
000022  f7fffffe          BL       delayMs
;;;420        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_LOW);
000026  2100              MOVS     r1,#0
000028  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
00002a  f7fffffe          BL       hal_gpio_set_output_data
;;;421        delayMs(2);
00002e  2002              MOVS     r0,#2
000030  f7fffffe          BL       delayMs
;;;422        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_HIGH);
000034  2101              MOVS     r1,#1
000036  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
000038  f7fffffe          BL       hal_gpio_set_output_data
;;;423        delayMs(2);
00003c  2002              MOVS     r0,#2
00003e  f7fffffe          BL       delayMs
;;;424    
;;;425        app_tp_m_write(st_touch_tp_tuning_clearfifo, sizeof(st_touch_tp_tuning_clearfifo));//0xA4,0x00,0x01}
000042  2103              MOVS     r1,#3
000044  481e              LDR      r0,|L8.192|
000046  f7fffffe          BL       app_tp_m_write
                  |L8.74|
;;;426        while(!hal_i2c_m_transfer_complate());
00004a  f7fffffe          BL       hal_i2c_m_transfer_complate
00004e  2800              CMP      r0,#0
000050  d0fb              BEQ      |L8.74|
;;;427        delayMs(5);
000052  2005              MOVS     r0,#5
000054  f7fffffe          BL       delayMs
;;;428        app_tp_m_write(st_touch_init_sensor_off, sizeof(st_touch_init_sensor_off));//0xA0,0x00,0x00
000058  4819              LDR      r0,|L8.192|
00005a  2103              MOVS     r1,#3
00005c  3818              SUBS     r0,r0,#0x18
00005e  f7fffffe          BL       app_tp_m_write
                  |L8.98|
;;;429        while(!hal_i2c_m_transfer_complate());
000062  f7fffffe          BL       hal_i2c_m_transfer_complate
000066  2800              CMP      r0,#0
000068  d0fb              BEQ      |L8.98|
;;;430        delayMs(5);
00006a  2005              MOVS     r0,#5
00006c  f7fffffe          BL       delayMs
;;;431        app_tp_m_write(st_touch_init_sensor_on, sizeof(st_touch_init_sensor_on));//0xA0,0x00,0x01
000070  4813              LDR      r0,|L8.192|
000072  2103              MOVS     r1,#3
000074  3815              SUBS     r0,r0,#0x15
000076  f7fffffe          BL       app_tp_m_write
                  |L8.122|
;;;432        while(!hal_i2c_m_transfer_complate());
00007a  f7fffffe          BL       hal_i2c_m_transfer_complate
00007e  2800              CMP      r0,#0
000080  d0fb              BEQ      |L8.122|
;;;433        delayMs(5);
000082  2005              MOVS     r0,#5
000084  f7fffffe          BL       delayMs
;;;434    }
000088  bd10              POP      {r4,pc}
;;;435    
                          ENDP

00008a  0000              DCW      0x0000
                  |L8.140|
00008c  7461755f          DCB      "tau_log",0
000090  6c6f6700
                  |L8.148|
000094  5b25735d          DCB      "[%s] (%04d) st_touch_hardware_reset \n",0
000098  20282530
00009c  34642920
0000a0  73745f74
0000a4  6f756368
0000a8  5f686172
0000ac  64776172
0000b0  655f7265
0000b4  73657420
0000b8  0a00    
0000ba  00                DCB      0
0000bb  00                DCB      0
                  |L8.188|
                          DCD      g_screen_input_rst_pad
                  |L8.192|
                          DCD      ||.data||+0x1a

                          AREA ||i.ap_tp_st_touch_scan_point_init||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_scan_point_init PROC
;;;336    
;;;337    void ap_tp_st_touch_scan_point_init(void)
000000  2000              MOVS     r0,#0
;;;338    {
;;;339        uint8_t i = 0;
;;;340    
;;;341        for(i = 0; i < ST_TP_SCAN_POINT_NUMBER_MAX; i++)
;;;342            tp_scan_data.tp_point_buffer[i] = 0;
000002  4a05              LDR      r2,|L9.24|
000004  2100              MOVS     r1,#0                 ;341
                  |L9.6|
000006  5411              STRB     r1,[r2,r0]
000008  1c40              ADDS     r0,r0,#1              ;341
00000a  b2c0              UXTB     r0,r0                 ;341
00000c  2806              CMP      r0,#6                 ;341
00000e  d3fa              BCC      |L9.6|
;;;343        tp_scan_data.tp_point_up_error_flag = 0;
000010  71d1              STRB     r1,[r2,#7]
;;;344        tp_scan_data.tp_read_point_counter = 0;
000012  7191              STRB     r1,[r2,#6]
;;;345        tp_scan_data.tp_point_error_time_counter = 0;
000014  6091              STR      r1,[r2,#8]  ; tp_scan_data
;;;346    }
000016  4770              BX       lr
;;;347    
                          ENDP

                  |L9.24|
                          DCD      ||.bss||

                          AREA ||i.ap_tp_st_touch_scan_point_record_event||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_scan_point_record_event PROC
;;;443    
;;;444    void ap_tp_st_touch_scan_point_record_event(uint8_t* screendata, uint8_t len)
000000  b5f0              PUSH     {r4-r7,lr}
;;;445    {
000002  468c              MOV      r12,r1
;;;446        uint8_t i = 0, j, flag = 0, eventdata = 0, eventid = 0;
000004  2100              MOVS     r1,#0
000006  2500              MOVS     r5,#0
;;;447    
;;;448        for(i = 0; i < len; i++)
;;;449        {
;;;450            eventdata = screendata[i];
;;;451            eventid = (screendata[i + 1] >> 4) + 1;
;;;452            i += 7;
;;;453    
;;;454            if(eventdata == 0x13)	// ¼
;;;455            {
;;;456                for(j = 0; j < ST_TP_SCAN_POINT_NUMBER_MAX; j++)
;;;457                {
;;;458                    if(tp_scan_data.tp_point_buffer[j] == eventid)
000008  4e23              LDR      r6,|L10.152|
00000a  e041              B        |L10.144|
                  |L10.12|
00000c  5c44              LDRB     r4,[r0,r1]            ;450
00000e  1842              ADDS     r2,r0,r1              ;451
000010  7852              LDRB     r2,[r2,#1]            ;451
000012  0913              LSRS     r3,r2,#4              ;451
000014  1c5b              ADDS     r3,r3,#1              ;451
000016  1dc9              ADDS     r1,r1,#7              ;452
000018  b2cf              UXTB     r7,r1                 ;452
00001a  2c13              CMP      r4,#0x13              ;454
00001c  d113              BNE      |L10.70|
00001e  2200              MOVS     r2,#0                 ;456
                  |L10.32|
000020  5cb1              LDRB     r1,[r6,r2]
000022  4299              CMP      r1,r3
000024  d101              BNE      |L10.42|
;;;459                    {
;;;460                        flag = 1;
000026  2501              MOVS     r5,#1
;;;461                        break;
000028  e003              B        |L10.50|
                  |L10.42|
00002a  1c52              ADDS     r2,r2,#1              ;456
00002c  b2d2              UXTB     r2,r2                 ;456
00002e  2a06              CMP      r2,#6                 ;456
000030  d3f6              BCC      |L10.32|
                  |L10.50|
;;;462                    }
;;;463                }
;;;464    
;;;465                if(flag == 0)		// ѯûиIDҪ
000032  2d00              CMP      r5,#0
000034  d107              BNE      |L10.70|
;;;466                {
;;;467                    for(j = 0; j < ST_TP_SCAN_POINT_NUMBER_MAX; j++) //Ѱҿλ
000036  2200              MOVS     r2,#0
                  |L10.56|
;;;468                    {
;;;469                        if(tp_scan_data.tp_point_buffer[j] == 0x00)
000038  5cb1              LDRB     r1,[r6,r2]
00003a  2900              CMP      r1,#0
00003c  d006              BEQ      |L10.76|
00003e  1c52              ADDS     r2,r2,#1              ;467
000040  b2d2              UXTB     r2,r2                 ;467
000042  2a06              CMP      r2,#6                 ;467
000044  d3f8              BCC      |L10.56|
                  |L10.70|
;;;470                        {
;;;471                            tp_scan_data.tp_point_buffer[j] = eventid;
;;;472                            tp_scan_data.tp_read_point_counter++;
;;;473                            break;
;;;474                        }
;;;475                    }
;;;476    
;;;477                }
;;;478            }
;;;479    
;;;480            if(eventdata == 0x33 && (tp_scan_data.tp_read_point_counter > 0))	// ͷ¼
000046  2c33              CMP      r4,#0x33
000048  d005              BEQ      |L10.86|
00004a  e019              B        |L10.128|
                  |L10.76|
00004c  54b3              STRB     r3,[r6,r2]            ;471
00004e  79b2              LDRB     r2,[r6,#6]            ;472  ; tp_scan_data
000050  1c52              ADDS     r2,r2,#1              ;472
000052  71b2              STRB     r2,[r6,#6]            ;472
000054  e7f7              B        |L10.70|
                  |L10.86|
000056  79b2              LDRB     r2,[r6,#6]  ; tp_scan_data
000058  2a00              CMP      r2,#0
00005a  d011              BEQ      |L10.128|
;;;481            {
;;;482                for(j = 0; j < ST_TP_SCAN_POINT_NUMBER_MAX; j++)
00005c  2200              MOVS     r2,#0
                  |L10.94|
;;;483                {
;;;484                    if(tp_scan_data.tp_point_buffer[j] == eventid)  // и¼Ҫͷ
00005e  5cb1              LDRB     r1,[r6,r2]
000060  4299              CMP      r1,r3
000062  d105              BNE      |L10.112|
;;;485                    {
;;;486                        tp_scan_data.tp_point_buffer[j] = 0;
000064  2300              MOVS     r3,#0
000066  54b3              STRB     r3,[r6,r2]
;;;487                        tp_scan_data.tp_read_point_counter--;
000068  79b2              LDRB     r2,[r6,#6]  ; tp_scan_data
00006a  1e52              SUBS     r2,r2,#1
00006c  71b2              STRB     r2,[r6,#6]
;;;488                        break;
00006e  e003              B        |L10.120|
                  |L10.112|
000070  1c52              ADDS     r2,r2,#1              ;482
000072  b2d2              UXTB     r2,r2                 ;482
000074  2a06              CMP      r2,#6                 ;482
000076  d3f2              BCC      |L10.94|
                  |L10.120|
;;;489                    }
;;;490                }
;;;491    
;;;492                tp_scan_data.tp_point_up_error_flag = 1;
000078  2101              MOVS     r1,#1
00007a  71f1              STRB     r1,[r6,#7]
;;;493                tp_scan_data.tp_point_error_time_counter = 0;
00007c  2100              MOVS     r1,#0
00007e  60b1              STR      r1,[r6,#8]  ; tp_scan_data
                  |L10.128|
;;;494            }
;;;495    
;;;496            if(eventdata == 0x23)	// ƶMOVE¼
000080  2c23              CMP      r4,#0x23
000082  d103              BNE      |L10.140|
;;;497            {
;;;498                tp_scan_data.tp_point_up_error_flag = 1;
000084  2101              MOVS     r1,#1
000086  71f1              STRB     r1,[r6,#7]
;;;499                tp_scan_data.tp_point_error_time_counter = 0;
000088  2100              MOVS     r1,#0
00008a  60b1              STR      r1,[r6,#8]  ; tp_scan_data
                  |L10.140|
00008c  1c7f              ADDS     r7,r7,#1              ;448
00008e  b2f9              UXTB     r1,r7                 ;448
                  |L10.144|
000090  4561              CMP      r1,r12                ;448
000092  d3bb              BCC      |L10.12|
;;;500            }
;;;501        }
;;;502    }
000094  bdf0              POP      {r4-r7,pc}
;;;503    
                          ENDP

000096  0000              DCW      0x0000
                  |L10.152|
                          DCD      ||.bss||

                          AREA ||i.ap_tp_st_touch_scan_point_record_event_exec||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_scan_point_record_event_exec PROC
;;;511    
;;;512    void ap_tp_st_touch_scan_point_record_event_exec(void)
000000  b510              PUSH     {r4,lr}
;;;513    {
;;;514        if(tp_scan_data.tp_point_up_error_flag == 1)
000002  490a              LDR      r1,|L11.44|
000004  79c8              LDRB     r0,[r1,#7]  ; tp_scan_data
000006  2801              CMP      r0,#1
000008  d105              BNE      |L11.22|
;;;515        {
;;;516            if(tp_scan_data.tp_point_error_time_counter < (65536 / 10)) // 65536*3 = 900ms  65536/10 = 30ms
00000a  4a09              LDR      r2,|L11.48|
00000c  6888              LDR      r0,[r1,#8]  ; tp_scan_data
00000e  4290              CMP      r0,r2
000010  d202              BCS      |L11.24|
;;;517            {
;;;518                tp_scan_data.tp_point_error_time_counter ++;
000012  1c40              ADDS     r0,r0,#1
000014  6088              STR      r0,[r1,#8]  ; tp_scan_data
                  |L11.22|
;;;519            }
;;;520            else	// ûյmove release ʱ䳬ʱ
;;;521            {
;;;522                if(tp_scan_data.tp_read_point_counter > 0)	// в
;;;523                {
;;;524    //				printf("release finger %2d\n",tp_scan_data.tp_read_point_counter);
;;;525                    tp_scan_data.tp_read_point_counter = 0;
;;;526                    ap_tp_st_touch_simulate_finger_release_event();
;;;527                }
;;;528                ap_tp_st_touch_scan_point_init();
;;;529            }
;;;530        }
;;;531    }
000016  bd10              POP      {r4,pc}
                  |L11.24|
000018  7988              LDRB     r0,[r1,#6]            ;522  ; tp_scan_data
00001a  2800              CMP      r0,#0                 ;522
00001c  d003              BEQ      |L11.38|
00001e  2000              MOVS     r0,#0                 ;525
000020  7188              STRB     r0,[r1,#6]            ;525
000022  f7fffffe          BL       ap_tp_st_touch_simulate_finger_release_event
                  |L11.38|
000026  f7fffffe          BL       ap_tp_st_touch_scan_point_init
00002a  bd10              POP      {r4,pc}
;;;532    
                          ENDP

                  |L11.44|
                          DCD      ||.bss||
                  |L11.48|
                          DCD      0x00001999

                          AREA ||i.ap_tp_st_touch_simulate_finger_release_event||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_simulate_finger_release_event PROC
;;;356    
;;;357    void ap_tp_st_touch_simulate_finger_release_event(void)
000000  b51c              PUSH     {r2-r4,lr}
;;;358    {
;;;359        uint8_t i, temp = 0, ap_tp_release_buf[8] = {0x33, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
000002  a00a              ADR      r0,|L12.44|
000004  c803              LDM      r0,{r0,r1}
000006  9101              STR      r1,[sp,#4]
000008  9000              STR      r0,[sp,#0]
;;;360    
;;;361        for(i = 0; i < 5; i++)
00000a  2400              MOVS     r4,#0
                  |L12.12|
;;;362        {
;;;363            temp = i;
;;;364            ap_tp_release_buf[1] = (temp << 4) | 0x01;
00000c  0120              LSLS     r0,r4,#4
00000e  1c40              ADDS     r0,r0,#1
000010  4669              MOV      r1,sp
000012  7048              STRB     r0,[r1,#1]
;;;365    
;;;366            app_tp_screen_analysis_int(0, ap_tp_release_buf, 8);
000014  2208              MOVS     r2,#8
000016  2000              MOVS     r0,#0
000018  f7fffffe          BL       app_tp_screen_analysis_int
;;;367    
;;;368            delayMs(6);
00001c  2006              MOVS     r0,#6
00001e  f7fffffe          BL       delayMs
000022  1c64              ADDS     r4,r4,#1              ;361
000024  b2e4              UXTB     r4,r4                 ;361
000026  2c05              CMP      r4,#5                 ;361
000028  d3f0              BCC      |L12.12|
;;;369        }
;;;370    }
00002a  bd1c              POP      {r2-r4,pc}
;;;371    
                          ENDP

                  |L12.44|
00002c  330100            DCB      "3",1,0
00002f  00                DCB      0
000030  00                DCB      0
000031  00                DCB      0
000032  00                DCB      0
000033  00                DCB      0

                          AREA ||i.ap_tp_st_touch_software_reset||, CODE, READONLY, ALIGN=2

                  ap_tp_st_touch_software_reset PROC
;;;379    
;;;380    void ap_tp_st_touch_software_reset(void)
000000  b510              PUSH     {r4,lr}
;;;381    {
;;;382        TAU_LOGD("st_touch_software_reset \n");
000002  22ff              MOVS     r2,#0xff
000004  327f              ADDS     r2,r2,#0x7f
000006  a11c              ADR      r1,|L13.120|
000008  a01d              ADR      r0,|L13.128|
00000a  f7fffffe          BL       LOG_printf
;;;383        ap_tp_st_touch_simulate_finger_release_event();
00000e  f7fffffe          BL       ap_tp_st_touch_simulate_finger_release_event
;;;384        ap_tp_st_touch_scan_point_init();
000012  f7fffffe          BL       ap_tp_st_touch_scan_point_init
;;;385    
;;;386        app_tp_m_write(st_touch_tp_tuning_clkreset, sizeof(st_touch_tp_tuning_clkreset));    // clk reset
000016  2103              MOVS     r1,#3
000018  4823              LDR      r0,|L13.168|
00001a  f7fffffe          BL       app_tp_m_write
                  |L13.30|
;;;387        while(!hal_i2c_m_transfer_complate());
00001e  f7fffffe          BL       hal_i2c_m_transfer_complate
000022  2800              CMP      r0,#0
000024  d0fb              BEQ      |L13.30|
;;;388        delayMs(5);
000026  2005              MOVS     r0,#5
000028  f7fffffe          BL       delayMs
;;;389    
;;;390        app_tp_m_write(st_touch_tp_tuning_reset, sizeof(st_touch_tp_tuning_reset));    // System Reset  A4 00 00
00002c  481e              LDR      r0,|L13.168|
00002e  2103              MOVS     r1,#3
000030  3815              SUBS     r0,r0,#0x15
000032  f7fffffe          BL       app_tp_m_write
                  |L13.54|
;;;391        while(!hal_i2c_m_transfer_complate());
000036  f7fffffe          BL       hal_i2c_m_transfer_complate
00003a  2800              CMP      r0,#0
00003c  d0fb              BEQ      |L13.54|
;;;392        delayMs(5);
00003e  2005              MOVS     r0,#5
000040  f7fffffe          BL       delayMs
;;;393    
;;;394        app_tp_m_write(st_touch_tp_tuning_clearfifo, sizeof(st_touch_tp_tuning_clearfifo));//0xA4,0x00,0x01
000044  4818              LDR      r0,|L13.168|
000046  2103              MOVS     r1,#3
000048  1ec0              SUBS     r0,r0,#3
00004a  f7fffffe          BL       app_tp_m_write
                  |L13.78|
;;;395        while(!hal_i2c_m_transfer_complate());
00004e  f7fffffe          BL       hal_i2c_m_transfer_complate
000052  2800              CMP      r0,#0
000054  d0fb              BEQ      |L13.78|
;;;396        delayMs(5);
000056  2005              MOVS     r0,#5
000058  f7fffffe          BL       delayMs
;;;397    
;;;398        app_tp_m_write(st_touch_init_sensor_on, sizeof(st_touch_init_sensor_on));//0xA0,0x00,0x01
00005c  4812              LDR      r0,|L13.168|
00005e  2103              MOVS     r1,#3
000060  3818              SUBS     r0,r0,#0x18
000062  f7fffffe          BL       app_tp_m_write
                  |L13.102|
;;;399        while(!hal_i2c_m_transfer_complate());
000066  f7fffffe          BL       hal_i2c_m_transfer_complate
00006a  2800              CMP      r0,#0
00006c  d0fb              BEQ      |L13.102|
;;;400        delayMs(5);
00006e  2005              MOVS     r0,#5
000070  f7fffffe          BL       delayMs
;;;401    
;;;402    //	app_tp_screen_reset();
;;;403    }
000074  bd10              POP      {r4,pc}
;;;404    
                          ENDP

000076  0000              DCW      0x0000
                  |L13.120|
000078  7461755f          DCB      "tau_log",0
00007c  6c6f6700
                  |L13.128|
000080  5b25735d          DCB      "[%s] (%04d) st_touch_software_reset \n",0
000084  20282530
000088  34642920
00008c  73745f74
000090  6f756368
000094  5f736f66
000098  74776172
00009c  655f7265
0000a0  73657420
0000a4  0a00    
0000a6  00                DCB      0
0000a7  00                DCB      0
                  |L13.168|
                          DCD      ||.data||+0x1d

                          AREA ||i.app_tp_calibration_exec||, CODE, READONLY, ALIGN=2

                  app_tp_calibration_exec PROC
;;;301    
;;;302    void app_tp_calibration_exec(void)
000000  b5f8              PUSH     {r3-r7,lr}
;;;303    {
;;;304        uint8_t i = 0;
000002  2400              MOVS     r4,#0
;;;305    
;;;306        if(s_calibration_flag)
000004  4d12              LDR      r5,|L14.80|
000006  7828              LDRB     r0,[r5,#0]  ; s_calibration_flag
000008  2800              CMP      r0,#0
00000a  d018              BEQ      |L14.62|
;;;307        {
;;;308            s_calibration_flag = false;
00000c  2000              MOVS     r0,#0
00000e  7028              STRB     r0,[r5,#0]
;;;309            for(i = 0; i < 3; i++)
;;;310            {
;;;311                ap_tp_st_touch_calibration();
;;;312                delayMs(4000);
000010  267d              MOVS     r6,#0x7d
;;;313                ap_tp_st_touch_get_calibration_success_mark();
;;;314                if(s_calibration_correct_flag == ST_TP_CALIBRATION_SUCCESS)
;;;315                {
;;;316                    TAU_LOGD("calibration successful \n");
;;;317                    break;
;;;318                }
;;;319                else
;;;320                {
;;;321                    TAU_LOGD("calibration failure \n");
000012  27ff              MOVS     r7,#0xff
000014  0176              LSLS     r6,r6,#5              ;312
000016  3742              ADDS     r7,r7,#0x42
                  |L14.24|
000018  f7fffffe          BL       ap_tp_st_touch_calibration
00001c  4630              MOV      r0,r6                 ;312
00001e  f7fffffe          BL       delayMs
000022  f7fffffe          BL       ap_tp_st_touch_get_calibration_success_mark
000026  7868              LDRB     r0,[r5,#1]            ;314  ; s_calibration_correct_flag
000028  285a              CMP      r0,#0x5a              ;314
00002a  d009              BEQ      |L14.64|
00002c  463a              MOV      r2,r7
00002e  a109              ADR      r1,|L14.84|
000030  a00a              ADR      r0,|L14.92|
000032  f7fffffe          BL       LOG_printf
000036  1c64              ADDS     r4,r4,#1              ;309
000038  b2e4              UXTB     r4,r4                 ;309
00003a  2c03              CMP      r4,#3                 ;309
00003c  d3ec              BCC      |L14.24|
                  |L14.62|
;;;322                }
;;;323            }
;;;324    
;;;325        }
;;;326    }
00003e  bdf8              POP      {r3-r7,pc}
                  |L14.64|
000040  22ff              MOVS     r2,#0xff              ;316
000042  323d              ADDS     r2,r2,#0x3d           ;316
000044  a103              ADR      r1,|L14.84|
000046  a00e              ADR      r0,|L14.128|
000048  f7fffffe          BL       LOG_printf
00004c  bdf8              POP      {r3-r7,pc}
;;;327    
                          ENDP

00004e  0000              DCW      0x0000
                  |L14.80|
                          DCD      ||.data||
                  |L14.84|
000054  7461755f          DCB      "tau_log",0
000058  6c6f6700
                  |L14.92|
00005c  5b25735d          DCB      "[%s] (%04d) calibration failure \n",0
000060  20282530
000064  34642920
000068  63616c69
00006c  62726174
000070  696f6e20
000074  6661696c
000078  75726520
00007c  0a00    
00007e  00                DCB      0
00007f  00                DCB      0
                  |L14.128|
000080  5b25735d          DCB      "[%s] (%04d) calibration successful \n",0
000084  20282530
000088  34642920
00008c  63616c69
000090  62726174
000094  696f6e20
000098  73756363
00009c  65737366
0000a0  756c200a
0000a4  00      
0000a5  00                DCB      0
0000a6  00                DCB      0
0000a7  00                DCB      0

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  tp_scan_data
                          %        12

                          AREA ||.constdata||, DATA, READONLY, ALIGN=1

                  wCRCTalbeAbs
000000  0000cc01          DCW      0x0000,0xcc01
000004  d8011400          DCW      0xd801,0x1400
000008  f0013c00          DCW      0xf001,0x3c00
00000c  2800e401          DCW      0x2800,0xe401
000010  a0016c00          DCW      0xa001,0x6c00
000014  7800b401          DCW      0x7800,0xb401
000018  50009c01          DCW      0x5000,0x9c01
00001c  88014400          DCW      0x8801,0x4400

                          AREA ||.data||, DATA, ALIGN=0

                  s_calibration_flag
000000  00                DCB      0x00
                  s_calibration_correct_flag
000001  00                DCB      0x00
                  st_touch_init_sensor_off
000002  a000              DCB      0xa0,0x00
000004  00                DCB      0x00
                  st_touch_init_sensor_on
000005  a00001            DCB      0xa0,0x00,0x01
                  st_touch_tp_tuning_reset
000008  a40000            DCB      0xa4,0x00,0x00
                  st_touch_tp_tuning_FpnlInit
00000b  a4                DCB      0xa4
00000c  0003              DCB      0x00,0x03
                  st_touch_tp_tuning_PnlInit
00000e  a400              DCB      0xa4,0x00
000010  02                DCB      0x02
                  st_touch_tp_tuning_SvCfg
000011  a40501            DCB      0xa4,0x05,0x01
                  st_touch_tp_tuning_SvCx
000014  a40502            DCB      0xa4,0x05,0x02
                  st_touch_tp_tuning_SvPnl
000017  a4                DCB      0xa4
000018  0504              DCB      0x05,0x04
                  st_touch_tp_tuning_clearfifo
00001a  a400              DCB      0xa4,0x00
00001c  01                DCB      0x01
                  st_touch_tp_tuning_clkreset
00001d  a40005            DCB      0xa4,0x00,0x05
                  st_touch_tp_tuning_TuneM
000020  a4031300          DCB      0xa4,0x03,0x13,0x00
                  st_touch_tp_tuning_TuneS
000024  a4030c00          DCB      0xa4,0x03,0x0c,0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\src\\app\\touch\\app_tp_st_touch.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___17_app_tp_st_touch_c_377841ef____REV16|
#line 467 "C:\\Users\\55\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
|__asm___17_app_tp_st_touch_c_377841ef____REV16| PROC
#line 468

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___17_app_tp_st_touch_c_377841ef____REVSH|
#line 482
|__asm___17_app_tp_st_touch_c_377841ef____REVSH| PROC
#line 483

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
