; 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_transfer.o --asm_dir=.\Listings\ --list_dir=.\Listings\ --depend=.\objects\app_tp_transfer.d --cpu=Cortex-M0 --apcs=interwork --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.\RTE\_ISP_568 -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Keil_v5\ARM\PACK\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_transfer.crf ..\..\src\app\demo\app_tp_transfer.c]
                          THUMB

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

                  S20_Start_init PROC
;;;393    
;;;394    void S20_Start_init(void)
000000  b5f8              PUSH     {r3-r7,lr}
;;;395    {
;;;396    	uint8_t len=0;
;;;397    	uint8_t temp=0;
;;;398    	uint8_t temp_start_flag=0;	
;;;399    	//    if(phone_start_flag==1)
;;;400    	{
;;;401    		app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
000002  4d4c              LDR      r5,|L1.308|
000004  2600              MOVS     r6,#0                 ;398
000006  2308              MOVS     r3,#8
000008  4a4b              LDR      r2,|L1.312|
00000a  2101              MOVS     r1,#1
00000c  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
00000e  f7fffffe          BL       app_tp_m_read
                  |L1.18|
;;;402    		while(!hal_i2c_m_transfer_complate());		
000012  f7fffffe          BL       hal_i2c_m_transfer_complate
000016  2800              CMP      r0,#0
000018  d0fb              BEQ      |L1.18|
;;;403    		delayMs(2);			
00001a  2002              MOVS     r0,#2
00001c  f7fffffe          BL       delayMs
;;;404    		while(!hal_gpio_get_input_data(g_screen_input_int_pad))
000020  4c46              LDR      r4,|L1.316|
000022  e00c              B        |L1.62|
                  |L1.36|
;;;405    		{
;;;406    			app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
000024  2308              MOVS     r3,#8
000026  4a44              LDR      r2,|L1.312|
000028  2101              MOVS     r1,#1
00002a  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
00002c  f7fffffe          BL       app_tp_m_read
                  |L1.48|
;;;407    			while(!hal_i2c_m_transfer_complate());		
000030  f7fffffe          BL       hal_i2c_m_transfer_complate
000034  2800              CMP      r0,#0
000036  d0fb              BEQ      |L1.48|
;;;408    			delayMs(2);
000038  2002              MOVS     r0,#2
00003a  f7fffffe          BL       delayMs
                  |L1.62|
00003e  7820              LDRB     r0,[r4,#0]            ;404  ; g_screen_input_int_pad
000040  f7fffffe          BL       hal_gpio_get_input_data
000044  2800              CMP      r0,#0                 ;404
000046  d0ed              BEQ      |L1.36|
;;;409    		}
;;;410    		temp=s_screen_read_buffer[0]&0xf0;
000048  4f3b              LDR      r7,|L1.312|
00004a  7838              LDRB     r0,[r7,#0]  ; s_screen_read_buffer
00004c  0900              LSRS     r0,r0,#4
00004e  0100              LSLS     r0,r0,#4
;;;411        if((temp==0x10)||(temp==0x20)||(temp==0x30))
000050  2810              CMP      r0,#0x10
000052  d04c              BEQ      |L1.238|
000054  2820              CMP      r0,#0x20
000056  d04a              BEQ      |L1.238|
000058  2830              CMP      r0,#0x30
00005a  d048              BEQ      |L1.238|
;;;412    		{
;;;413    		 temp_start_flag=1;
;;;414    		}
;;;415    		if(temp_start_flag==0)
00005c  2e00              CMP      r6,#0
00005e  d146              BNE      |L1.238|
;;;416    		{
;;;417    		app_tp_m_write(MI10_PRO_screen_init_data1, sizeof(MI10_PRO_screen_init_data1));//0xA0,0x00,0x01
000060  2103              MOVS     r1,#3
000062  4837              LDR      r0,|L1.320|
000064  f7fffffe          BL       app_tp_m_write
                  |L1.104|
;;;418    		while(!hal_i2c_m_transfer_complate());
000068  f7fffffe          BL       hal_i2c_m_transfer_complate
00006c  2800              CMP      r0,#0
00006e  d0fb              BEQ      |L1.104|
;;;419    		delayMs(1);
000070  2001              MOVS     r0,#1
000072  f7fffffe          BL       delayMs
;;;420    		app_tp_m_write(MI10_PRO_screen_init_data2, sizeof(MI10_PRO_screen_init_data2));//0xA2,0x03,0x00,0x00,0x00,0x03
000076  4832              LDR      r0,|L1.320|
000078  2106              MOVS     r1,#6
00007a  3009              ADDS     r0,r0,#9
00007c  f7fffffe          BL       app_tp_m_write
                  |L1.128|
;;;421    		while(!hal_i2c_m_transfer_complate());
000080  f7fffffe          BL       hal_i2c_m_transfer_complate
000084  2800              CMP      r0,#0
000086  d0fb              BEQ      |L1.128|
;;;422    		delayMs(1);		
000088  2001              MOVS     r0,#1
00008a  f7fffffe          BL       delayMs
;;;423    		app_tp_m_write(MI10_PRO_screen_init_data3, sizeof(MI10_PRO_screen_init_data3));//0xA2,0x02,0x00
00008e  482c              LDR      r0,|L1.320|
000090  2103              MOVS     r1,#3
000092  1cc0              ADDS     r0,r0,#3
000094  f7fffffe          BL       app_tp_m_write
                  |L1.152|
;;;424    		while(!hal_i2c_m_transfer_complate());
000098  f7fffffe          BL       hal_i2c_m_transfer_complate
00009c  2800              CMP      r0,#0
00009e  d0fb              BEQ      |L1.152|
;;;425    		delayMs(1);	
0000a0  2001              MOVS     r0,#1
0000a2  f7fffffe          BL       delayMs
;;;426    		app_tp_m_write(MI10_PRO_screen_init_data4, sizeof(MI10_PRO_screen_init_data4));//0xC0,0x07,0x01
0000a6  4826              LDR      r0,|L1.320|
0000a8  2103              MOVS     r1,#3
0000aa  1d80              ADDS     r0,r0,#6
0000ac  f7fffffe          BL       app_tp_m_write
                  |L1.176|
;;;427    		while(!hal_i2c_m_transfer_complate());
0000b0  f7fffffe          BL       hal_i2c_m_transfer_complate
0000b4  2800              CMP      r0,#0
0000b6  d0fb              BEQ      |L1.176|
;;;428    		delayMs(1);		
0000b8  2001              MOVS     r0,#1
0000ba  f7fffffe          BL       delayMs
;;;429    		app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
0000be  2308              MOVS     r3,#8
0000c0  4a1d              LDR      r2,|L1.312|
0000c2  2101              MOVS     r1,#1
0000c4  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
0000c6  f7fffffe          BL       app_tp_m_read
                  |L1.202|
;;;430    		while(!hal_i2c_m_transfer_complate());
0000ca  f7fffffe          BL       hal_i2c_m_transfer_complate
0000ce  2800              CMP      r0,#0
0000d0  d0fb              BEQ      |L1.202|
;;;431    		if(s_screen_read_buffer[7]>0)
0000d2  79f8              LDRB     r0,[r7,#7]  ; s_screen_read_buffer
0000d4  2800              CMP      r0,#0
0000d6  d00a              BEQ      |L1.238|
;;;432    		{
;;;433    			len=s_screen_read_buffer[7]*8;
0000d8  06c0              LSLS     r0,r0,#27
0000da  0e03              LSRS     r3,r0,#24
;;;434    			app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, len);
0000dc  4a16              LDR      r2,|L1.312|
0000de  2101              MOVS     r1,#1
0000e0  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
0000e2  f7fffffe          BL       app_tp_m_read
                  |L1.230|
;;;435    			while(!hal_i2c_m_transfer_complate());		
0000e6  f7fffffe          BL       hal_i2c_m_transfer_complate
0000ea  2800              CMP      r0,#0
0000ec  d0fb              BEQ      |L1.230|
                  |L1.238|
;;;436    		}
;;;437    	  }
;;;438    #endif
;;;439    		if(hal_gpio_get_input_data(g_screen_input_int_pad))
0000ee  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
0000f0  f7fffffe          BL       hal_gpio_get_input_data
0000f4  2800              CMP      r0,#0
0000f6  d01b              BEQ      |L1.304|
;;;440    		{
;;;441    			s_screen_init_complate = true;
0000f8  4911              LDR      r1,|L1.320|
0000fa  2001              MOVS     r0,#1
0000fc  3908              SUBS     r1,r1,#8
0000fe  7108              STRB     r0,[r1,#4]
000100  4601              MOV      r1,r0
000102  2200              MOVS     r2,#0
000104  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
000106  f7fffffe          BL       hal_gpio_set_pull_state
00010a  2100              MOVS     r1,#0
00010c  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
00010e  f7fffffe          BL       hal_gpio_ctrl_eint
000112  2103              MOVS     r1,#3
000114  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
000116  f7fffffe          BL       hal_gpio_init_eint
00011a  490a              LDR      r1,|L1.324|
00011c  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
00011e  f7fffffe          BL       hal_gpio_reg_eint_cb
000122  2101              MOVS     r1,#1
000124  7820              LDRB     r0,[r4,#0]  ; g_screen_input_int_pad
000126  f7fffffe          BL       hal_gpio_ctrl_eint
;;;442    			app_tp_screen_int_init();
;;;443    			phone_start_flag=0;
00012a  4907              LDR      r1,|L1.328|
00012c  2000              MOVS     r0,#0
00012e  7008              STRB     r0,[r1,#0]
                  |L1.304|
;;;444    		}
;;;445    	}
;;;446    }
000130  bdf8              POP      {r3-r7,pc}
;;;447    
                          ENDP

000132  0000              DCW      0x0000
                  |L1.308|
                          DCD      screen_reg_int_data
                  |L1.312|
                          DCD      ||.bss||
                  |L1.316|
                          DCD      g_screen_input_int_pad
                  |L1.320|
                          DCD      ||.data||+0x8
                  |L1.324|
                          DCD      app_tp_screen_int_callback
                  |L1.328|
                          DCD      phone_start_flag

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

                  app_tp_I2C_init PROC
;;;149    
;;;150    void app_tp_I2C_init(void)
000000  b510              PUSH     {r4,lr}
;;;151    {
;;;152        hal_i2c_s_init(CHIP_I2C_ADDRESS, CHIP_I2C_ADDR_BITS);
000002  2107              MOVS     r1,#7
000004  2048              MOVS     r0,#0x48
000006  f7fffffe          BL       hal_i2c_s_init
;;;153        hal_i2c_s_set_transfer(app_tp_i2cs_callback);
00000a  4804              LDR      r0,|L2.28|
00000c  f7fffffe          BL       hal_i2c_s_set_transfer
;;;154        hal_i2c_s_nonblocking_read(s_phone_read_buffer, BUFFER_SIZE_MAX); //先配置接收 buffer
000010  21c8              MOVS     r1,#0xc8
000012  4803              LDR      r0,|L2.32|
000014  f7fffffe          BL       hal_i2c_s_nonblocking_read
;;;155    }
000018  bd10              POP      {r4,pc}
;;;156    
                          ENDP

00001a  0000              DCW      0x0000
                  |L2.28|
                          DCD      app_tp_i2cs_callback
                  |L2.32|
                          DCD      ||.bss||+0xc8

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

                  app_tp_i2cs_callback PROC
;;;345    //recieve_num为接收到的指令个数
;;;346    static void app_tp_i2cs_callback(e_i2c_s_int_status int_status, size_t recieve_num)
000000  b51c              PUSH     {r2-r4,lr}
000002  2000              MOVS     r0,#0
000004  9000              STR      r0,[sp,#0]
000006  2900              CMP      r1,#0
;;;347    {
000008  d004              BEQ      |L3.20|
00000a  466b              MOV      r3,sp
00000c  aa01              ADD      r2,sp,#4
00000e  4807              LDR      r0,|L3.44|
000010  f7fffffe          BL       app_tp_phone_analysis_data
                  |L3.20|
000014  21c8              MOVS     r1,#0xc8
000016  4805              LDR      r0,|L3.44|
000018  f7fffffe          BL       app_tp_s_read
00001c  9900              LDR      r1,[sp,#0]
00001e  2900              CMP      r1,#0
000020  d002              BEQ      |L3.40|
000022  9801              LDR      r0,[sp,#4]
000024  f7fffffe          BL       app_tp_s_write
                  |L3.40|
;;;348    #if 0 // 1: test
;;;349    	if (int_status >2)
;;;350    	{
;;;351    		s_phone_read_buffer[2]=int_status;
;;;352    		s_phone_read_buffer[3]=recieve_num;
;;;353    		app_tp_m_write(s_phone_read_buffer, 4);
;;;354    	}
;;;355    #endif
;;;356        app_tp_transfer_phone(recieve_num);
;;;357    }
000028  bd1c              POP      {r2-r4,pc}
;;;358    #endif
                          ENDP

00002a  0000              DCW      0x0000
                  |L3.44|
                          DCD      ||.bss||+0xc8

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

                  app_tp_init PROC
;;;166    **************************************************************************/
;;;167    void app_tp_init(void)
000000  b510              PUSH     {r4,lr}
;;;168    {
;;;169    #ifdef DISABLE_TDDI_I2C_FUNCTION
;;;170        hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_HIGH);    //配置phone报点输出中断IO口
;;;171        hal_gpio_init_output(g_screen_input_rst_pad, IO_LVL_HIGH);	 //配置模组TP RESET
;;;172        
;;;173    	hal_gpio_set_mode(IO_PAD_TD_SPIM_CLK,IO_MODE_I2C1_SCL);
;;;174    	hal_gpio_set_mode(IO_PAD_TD_SPIM_CSN,IO_MODE_I2C1_SDA);
;;;175    
;;;176    	return;
;;;177    #else	
;;;178    	hal_gpio_set_pull_state(IO_PAD_TD_SPIM_CLK, ENABLE, DISABLE);
000002  2200              MOVS     r2,#0
000004  2101              MOVS     r1,#1
000006  2018              MOVS     r0,#0x18
000008  f7fffffe          BL       hal_gpio_set_pull_state
;;;179    	hal_gpio_set_pull_state(IO_PAD_TD_SPIM_CSN, ENABLE, DISABLE);	
00000c  2200              MOVS     r2,#0
00000e  2101              MOVS     r1,#1
000010  2019              MOVS     r0,#0x19
000012  f7fffffe          BL       hal_gpio_set_pull_state
;;;180    #endif
;;;181    
;;;182     //   app_tp_screen_init();                                        //初始化手机复位的IO口
;;;183    //app_tp_screen_int_init();                                         //配置screen中断输入引脚
;;;184    #ifdef G_PHONE_INT_DEFAULT_LOW
;;;185    	hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_LOW);	  //配置phone报点输出中断IO口
;;;186    #else
;;;187        hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_HIGH);    //配置phone报点输出中断IO口
000016  4808              LDR      r0,|L4.56|
000018  2101              MOVS     r1,#1
00001a  7800              LDRB     r0,[r0,#0]  ; g_phone_output_int_pad
00001c  f7fffffe          BL       hal_gpio_init_output
;;;188    #endif 
;;;189        hal_gpio_init_input(g_screen_input_int_pad);
000020  4806              LDR      r0,|L4.60|
000022  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000024  f7fffffe          BL       hal_gpio_init_input
;;;190    //    hal_gpio_init_output(g_screen_input_rst_pad, IO_LVL_HIGH);	 //配置模组TP RESET
;;;191    
;;;192    #if SCREEN_MASTER_TRANSFER_I2C
;;;193        hal_i2c_m_dma_init(SCREEN_I2C_ADDRESS, SCREEN_I2C_ADDR_BITS, I2C_MASTER_SPEED);
000028  4a05              LDR      r2,|L4.64|
00002a  2107              MOVS     r1,#7
00002c  2049              MOVS     r0,#0x49
00002e  f7fffffe          BL       hal_i2c_m_dma_init
;;;194    #elif SCREEN_MASTER_TRANSFER_SPI
;;;195        hal_spi_m_dma_init(SPI_MASTER_SPEED, SCREEN_SPI_CPHA, SCREEN_SPI_CPOL);
;;;196    #endif
;;;197    
;;;198    #if PHONE_SLAVE_TRANSFER_I2C
;;;199    //    hal_i2c_s_init(CHIP_I2C_ADDRESS, CHIP_I2C_ADDR_BITS);
;;;200    //    hal_i2c_s_set_transfer(app_tp_i2cs_callback);
;;;201    //    hal_i2c_s_nonblocking_read(s_phone_read_buffer, BUFFER_SIZE_MAX); //先配置接收 buffer
;;;202    #elif PHONE_SLAVE_TRANSFER_SPI
;;;203        hal_spi_slave_init(PHONE_SPI_CPHA, PHONE_SPI_CPOL, true);                                   // 初始化spi以及dma
;;;204        hal_spi_slave_register_callback(app_tp_spis_callback);            // 注册回调
;;;205        hal_spi_slave_auto_transfer_abort();                              // 停止传输
;;;206        hal_spi_slave_flush_fifo();                                       // Flush FIFO
;;;207    
;;;208        /* 每个packet自动接收, circle       mode 为false, 即收到buffer     max size数据后buffer不再更新, packet完成后调用回调    */
;;;209        hal_spi_slave_set_auto_rx_buffer(s_phone_read_buffer, BUFFER_SIZE_MAX, false); // 设置auto   rx buffer
;;;210        hal_spi_slave_set_auto_tx_buffer(phone_reg_const_data[0].write_back, phone_reg_const_data[0].write_back_size, false);   // 配置TX BUFFER
;;;211    
;;;212        hal_spi_slave_enable();                                           // 启动spis
;;;213        hal_spi_slave_auto_transfer_start();                              // 启动rx自动接收
;;;214    #endif
;;;215    
;;;216    	ap_tp_st_touch_scan_point_init();
000032  f7fffffe          BL       ap_tp_st_touch_scan_point_init
;;;217    }
000036  bd10              POP      {r4,pc}
;;;218    
                          ENDP

                  |L4.56|
                          DCD      g_phone_output_int_pad
                  |L4.60|
                          DCD      g_screen_input_int_pad
                  |L4.64|
                          DCD      0x000c3500

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

                  app_tp_m_read PROC
;;;283    **************************************************************************/
;;;284    void app_tp_m_read(const uint8_t *cmd, size_t cmd_size, uint8_t *data_buffer, size_t data_size)
000000  b5f8              PUSH     {r3-r7,lr}
;;;285    {
000002  4606              MOV      r6,r0
;;;286    #if SCREEN_MASTER_TRANSFER_I2C
;;;287        uint8_t i = 0;
000004  2400              MOVS     r4,#0
;;;288        uint32_t address = 0;
000006  4620              MOV      r0,r4
000008  e005              B        |L5.22|
                  |L5.10|
;;;289    
;;;290        for (i = 0; i < cmd_size; i++)                          //先将要发送的数据整合到 address
;;;291        {
;;;292            address |= (uint32_t)cmd[i] << i * 8;
00000a  5d35              LDRB     r5,[r6,r4]
00000c  00e7              LSLS     r7,r4,#3
00000e  40bd              LSLS     r5,r5,r7
000010  4328              ORRS     r0,r0,r5
000012  1c64              ADDS     r4,r4,#1
000014  b2e4              UXTB     r4,r4                 ;290
                  |L5.22|
000016  428c              CMP      r4,r1                 ;290
000018  d3f7              BCC      |L5.10|
;;;293        }
;;;294        hal_i2c_m_dma_read(address, cmd_size, data_buffer, data_size);
00001a  f7fffffe          BL       hal_i2c_m_dma_read
;;;295    #elif SCREEN_MASTER_TRANSFER_SPI
;;;296        hal_spi_m_dma_read(cmd, cmd_size, data_buffer, data_size);
;;;297    #endif
;;;298    }
00001e  bdf8              POP      {r3-r7,pc}
;;;299    
                          ENDP


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

                  app_tp_m_transfer_complate PROC
;;;226    **************************************************************************/
;;;227    bool app_tp_m_transfer_complate(void)
000000  b510              PUSH     {r4,lr}
;;;228    {
;;;229    #if SCREEN_MASTER_TRANSFER_I2C
;;;230        return hal_i2c_m_transfer_complate();
000002  f7fffffe          BL       hal_i2c_m_transfer_complate
;;;231    #elif SCREEN_MASTER_TRANSFER_SPI
;;;232        return hal_spi_m_get_transfer_complate();
;;;233    #else
;;;234        return true;
;;;235    #endif
;;;236    }
000006  bd10              POP      {r4,pc}
;;;237    
                          ENDP


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

                  app_tp_m_write PROC
;;;263    **************************************************************************/
;;;264    void app_tp_m_write(const uint8_t *txbuffer, size_t buffer_size)
000000  b510              PUSH     {r4,lr}
;;;265    {
;;;266    #if SCREEN_MASTER_TRANSFER_I2C
;;;267        hal_i2c_m_dma_write(txbuffer, buffer_size);
000002  f7fffffe          BL       hal_i2c_m_dma_write
;;;268    #elif SCREEN_MASTER_TRANSFER_SPI
;;;269        hal_spi_m_dma_write(txbuffer, buffer_size);
;;;270        s_spim_write = true;
;;;271    #endif
;;;272    }
000006  bd10              POP      {r4,pc}
;;;273    
                          ENDP


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

                  app_tp_phone_clear_reset_on PROC
;;;851    **************************************************************************/
;;;852    void app_tp_phone_clear_reset_on(void)
000000  4901              LDR      r1,|L8.8|
;;;853    {
;;;854        s_phone_reset_flag = false;
000002  2000              MOVS     r0,#0
000004  7088              STRB     r0,[r1,#2]
;;;855    }
000006  4770              BX       lr
;;;856    
                          ENDP

                  |L8.8|
                          DCD      ||.data||

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

                  app_tp_phone_reset_on PROC
;;;839    **************************************************************************/
;;;840    bool app_tp_phone_reset_on(void)
000000  4801              LDR      r0,|L9.8|
;;;841    {
;;;842        return s_phone_reset_flag;
000002  7880              LDRB     r0,[r0,#2]  ; s_phone_reset_flag
;;;843    }
000004  4770              BX       lr
;;;844    
                          ENDP

000006  0000              DCW      0x0000
                  |L9.8|
                          DCD      ||.data||

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

                  app_tp_s_read PROC
;;;328    **************************************************************************/
;;;329    void app_tp_s_read(void *rxBuffer, size_t data_size)
000000  b510              PUSH     {r4,lr}
;;;330    {
;;;331    #if PHONE_SLAVE_TRANSFER_I2C
;;;332        hal_i2c_s_nonblocking_read(rxBuffer, data_size);
000002  f7fffffe          BL       hal_i2c_s_nonblocking_read
;;;333    #endif
;;;334    }
000006  bd10              POP      {r4,pc}
;;;335    
                          ENDP


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

                  app_tp_s_transfer_complate PROC
;;;244    **************************************************************************/
;;;245    bool app_tp_s_transfer_complate(void)
000000  b510              PUSH     {r4,lr}
;;;246    {
;;;247    #if SCREEN_MASTER_TRANSFER_I2C
;;;248        return hal_i2c_s_write_complate() && hal_i2c_s_read_complate();
000002  f7fffffe          BL       hal_i2c_s_write_complate
000006  2800              CMP      r0,#0
000008  d005              BEQ      |L11.22|
00000a  f7fffffe          BL       hal_i2c_s_read_complate
00000e  2800              CMP      r0,#0
000010  d001              BEQ      |L11.22|
000012  2001              MOVS     r0,#1
;;;249    #elif SCREEN_MASTER_TRANSFER_SPI
;;;250        return !hal_spi_slave_busy();
;;;251    #else
;;;252        return true;
;;;253    #endif
;;;254    }
000014  bd10              POP      {r4,pc}
                  |L11.22|
000016  2000              MOVS     r0,#0                 ;248
000018  bd10              POP      {r4,pc}
;;;255    
                          ENDP


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

                  app_tp_s_write PROC
;;;307    **************************************************************************/
;;;308    void app_tp_s_write(const uint8_t *txbuffer, size_t buffer_size)
000000  b510              PUSH     {r4,lr}
;;;309    {
;;;310    #if PHONE_SLAVE_TRANSFER_I2C
;;;311        hal_i2c_s_dma_write(txbuffer, buffer_size);
000002  f7fffffe          BL       hal_i2c_s_dma_write
;;;312    #elif PHONE_SLAVE_TRANSFER_SPI
;;;313        //while (hal_spi_slave_busy());
;;;314        hal_spi_slave_auto_transfer_abort();
;;;315        hal_spi_slave_flush_fifo();
;;;316        hal_spi_slave_set_auto_tx_buffer(txbuffer, buffer_size, true);
;;;317        hal_spi_slave_auto_transfer_start();
;;;318    #endif
;;;319    }
000006  bd10              POP      {r4,pc}
;;;320    
                          ENDP


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

                  app_tp_screen_init PROC
;;;140    **************************************************************************/
;;;141    void app_tp_screen_init(void)
000000  b510              PUSH     {r4,lr}
;;;142    {
;;;143        hal_gpio_init_output(g_screen_input_rst_pad, IO_LVL_HIGH);
000002  4c0a              LDR      r4,|L13.44|
000004  2101              MOVS     r1,#1
000006  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
000008  f7fffffe          BL       hal_gpio_init_output
;;;144        delayUs(200);
00000c  20c8              MOVS     r0,#0xc8
00000e  f7fffffe          BL       delayUs
;;;145        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_LOW);
000012  2100              MOVS     r1,#0
000014  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
000016  f7fffffe          BL       hal_gpio_set_output_data
;;;146        delayUs(200);
00001a  20c8              MOVS     r0,#0xc8
00001c  f7fffffe          BL       delayUs
;;;147        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_HIGH);
000020  2101              MOVS     r1,#1
000022  7820              LDRB     r0,[r4,#0]  ; g_screen_input_rst_pad
000024  f7fffffe          BL       hal_gpio_set_output_data
;;;148    }
000028  bd10              POP      {r4,pc}
;;;149    
                          ENDP

00002a  0000              DCW      0x0000
                  |L13.44|
                          DCD      g_screen_input_rst_pad

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

                  app_tp_screen_int_callback PROC
;;;70     **************************************************************************/
;;;71     static void app_tp_screen_int_callback(void *data)
000000  4901              LDR      r1,|L14.8|
;;;72     {
;;;73         s_screen_int_flag = true;
000002  2001              MOVS     r0,#1
000004  7048              STRB     r0,[r1,#1]
;;;74     }
000006  4770              BX       lr
;;;75     
                          ENDP

                  |L14.8|
                          DCD      ||.data||

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

                  app_tp_transfer_screen_const PROC
;;;458    **************************************************************************/
;;;459    static void app_tp_transfer_screen_const(void)
000000  b510              PUSH     {r4,lr}
000002  f7fffffe          BL       hal_i2c_m_transfer_complate
;;;460    {
;;;461    //    static bool    screen_const_transfer_buffer_ready = true;            //发送 buffer 是否已准备好
;;;462    	uint8_t ii;
;;;463    //	uint8_t len=0;
;;;464        /**** 1. 判断当前状态通信已结束, 状态通信已结束，并且开机初始化流程还未走完****/
;;;465    #if 0 // test
;;;466    	uint8_t test_master_read_buffer[10] = {0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
;;;467    	uint8_t write_buffer[10] = {0x04, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
;;;468    
;;;469    //	for (ii =0x20; ii<0x7F; ii++)
;;;470    	{
;;;471    		//hal_i2c_m_dma_init(ii, SCREEN_I2C_ADDR_BITS);
;;;472    		//delayMs(100);
;;;473    		if (hal_i2c_m_dma_write(write_buffer, 1))
;;;474    		{
;;;475    			//break;
;;;476    		}
;;;477    		while(!hal_i2c_m_transfer_complate());
;;;478    		hal_i2c_m_dma_read(test_master_read_buffer, 1, test_master_read_buffer, 2);
;;;479    	}
;;;480    #endif
;;;481    
;;;482    
;;;483        if (app_tp_m_transfer_complate() && (s_screen_const_transfer_count < screen_reg_start_data_size))
000006  2800              CMP      r0,#0
000008  d012              BEQ      |L15.48|
00000a  4c0a              LDR      r4,|L15.52|
00000c  490a              LDR      r1,|L15.56|
00000e  7960              LDRB     r0,[r4,#5]  ; s_screen_const_transfer_count
000010  7809              LDRB     r1,[r1,#0]  ; screen_reg_start_data_size
000012  4288              CMP      r0,r1
000014  d20c              BCS      |L15.48|
;;;484        {
;;;485            if (s_spim_write)                                                //SPI 写数据后需要把接收FIFO的数据读出，不然会影响下一次读取
000016  7820              LDRB     r0,[r4,#0]  ; s_spim_write
000018  2800              CMP      r0,#0
00001a  d003              BEQ      |L15.36|
;;;486            {
;;;487                hal_spi_m_clear_rxfifo();
00001c  f7fffffe          BL       hal_spi_m_clear_rxfifo
;;;488                s_spim_write = false;
000020  2000              MOVS     r0,#0
000022  7020              STRB     r0,[r4,#0]
                  |L15.36|
;;;489            }
;;;490    
;;;491    	#if 1
;;;492    		
;;;493    //		#ifndef USE_FOR_SUMSUNG_S20
;;;494    //		for (ii =0; ii<screen_reg_start_data_size; ii++)
;;;495    //		{
;;;496    //            if (!screen_reg_start_data[ii].read_flag)     //当前通信不需要读回，直接写
;;;497    //            {
;;;498    //                app_tp_m_write(screen_reg_start_data[ii].buffer, screen_reg_start_data[ii].txbuffer_size);
;;;499    //            }
;;;500    //            else                                             //当前通信需要读回，先写再读
;;;501    //            {
;;;502    //                app_tp_m_read(screen_reg_start_data[ii].buffer, screen_reg_start_data[ii].txbuffer_size, \
;;;503    //                              s_screen_read_bak, screen_reg_start_data[ii].rxbuffer_size);
;;;504    //            }
;;;505    //			while(!hal_i2c_m_transfer_complate());
;;;506    //		}
;;;507    //		#endif
;;;508    		#ifdef USE_FOR_SUMSUNG_S20PLUS
;;;509    		
;;;510    	#if 1	
;;;511    		if(phone_start_flag==1)
000024  4805              LDR      r0,|L15.60|
000026  7800              LDRB     r0,[r0,#0]  ; phone_start_flag
000028  2801              CMP      r0,#1
00002a  d101              BNE      |L15.48|
;;;512    		{
;;;513    			S20_Start_init();
00002c  f7fffffe          BL       S20_Start_init
                  |L15.48|
;;;514    		}
;;;515    	#endif					
;;;516    	
;;;517    	#if 0//
;;;518    		delayMs(100);
;;;519    		app_tp_m_read(screen_reg_int_data[0].buffer, screen_reg_int_data[0].txbuffer_size, s_screen_number, screen_reg_int_data[0].rxbuffer_size);
;;;520    		while(!hal_i2c_m_transfer_complate());
;;;521    	#endif
;;;522    	#ifdef USE_FOR_SUMSUNG_S20
;;;523    		s_screen_init_complate = true;
;;;524    	#endif
;;;525    		
;;;526    	#else
;;;527            /**** 2. 发送或读取从机数据 ****/
;;;528            if (screen_const_transfer_buffer_ready)
;;;529            {
;;;530                screen_const_transfer_buffer_ready = false;
;;;531                if (!screen_reg_start_data[s_screen_const_transfer_count].read_flag)     //当前通信不需要读回，直接写
;;;532                {
;;;533                    app_tp_m_write(screen_reg_start_data[s_screen_const_transfer_count].buffer, screen_reg_start_data[s_screen_const_transfer_count].txbuffer_size);
;;;534                }
;;;535                else                                                             //当前通信需要读回，先写再读
;;;536                {
;;;537                    app_tp_m_read(screen_reg_start_data[s_screen_const_transfer_count].buffer, screen_reg_start_data[s_screen_const_transfer_count].txbuffer_size, \
;;;538                                  s_screen_number, screen_reg_start_data[s_screen_const_transfer_count].rxbuffer_size);
;;;539                }
;;;540    			s_screen_init_complate = true;
;;;541            }
;;;542            /**** 3. 解析本次通信数据，并准备下一次通信的buffer ****/
;;;543            else
;;;544            {
;;;545                screen_const_transfer_buffer_ready = true;
;;;546                s_screen_const_transfer_count = app_tp_screen_analysis_const(s_screen_const_transfer_count, s_screen_number, \
;;;547                                                screen_reg_start_data[s_screen_const_transfer_count].rxbuffer_size);
;;;548    
;;;549                if (s_screen_const_transfer_count >= screen_reg_start_data_size)
;;;550                {
;;;551                    s_screen_init_complate = true;
;;;552                }
;;;553            }
;;;554    	#endif	
;;;555        }
;;;556    }
000030  bd10              POP      {r4,pc}
;;;557    
                          ENDP

000032  0000              DCW      0x0000
                  |L15.52|
                          DCD      ||.data||
                  |L15.56|
                          DCD      screen_reg_start_data_size
                  |L15.60|
                          DCD      phone_start_flag

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

                  app_tp_transfer_screen_int PROC
;;;584    **************************************************************************/
;;;585    void app_tp_transfer_screen_int(void)
000000  b5f8              PUSH     {r3-r7,lr}
;;;586    {
;;;587    	uint8_t len=0;
;;;588    	uint8_t temp_len=0;
;;;589    	bool screen_gpio_int = false;
;;;590    	static uint8_t screen_int_transfer_count = 0;            //记录当前通信到哪一步
;;;591    	static bool    screen_int_transfer_buffer_ready = true;  //发送 buffer 是否已准备好
;;;592    	//    static uint8_t test_flag = 0;
;;;593    	//	  s_screen_init_complate=false;//为了在线烧录，特意将码片设置为不下发数据，而是FT8719与敦泰的工具通讯
;;;594        if (!s_screen_init_complate)                             //TP 初始化还未完成，则先进行初始化操作
000002  4e4d              LDR      r6,|L16.312|
000004  2400              MOVS     r4,#0                 ;587
000006  7930              LDRB     r0,[r6,#4]  ; s_screen_init_complate
000008  4627              MOV      r7,r4                 ;588
00000a  2800              CMP      r0,#0
00000c  d050              BEQ      |L16.176|
;;;595        {
;;;596            app_tp_transfer_screen_const();
;;;597            return;
;;;598        }
;;;599    
;;;600    #if 0 //test
;;;601    	test_flag++;
;;;602    	if (test_flag >1000000)
;;;603    	{
;;;604    		test_flag =0;
;;;605    		//TAU_LOGD("Run ok!!\n");
;;;606    		//app_tp_m_read(screen_reg_int_data[0].buffer, screen_reg_int_data[0].txbuffer_size, s_screen_number, screen_reg_int_data[0].rxbuffer_size);
;;;607    		//while(!hal_i2c_m_transfer_complate());
;;;608    	}
;;;609    #endif
;;;610    
;;;611        /**** 1. 判断 screen 是否发出中断信号 ****/
;;;612        // s_screen_int_flag:           中断信号标志位
;;;613        // app_tp_screen_int_lvl_low :  SPI 长时间通信时，偶尔会出现cs拉高导致通信异常卡死，该标志位用于解决卡死的问题
;;;614        screen_gpio_int = s_screen_int_flag || app_tp_screen_int_lvl_low();
00000e  7870              LDRB     r0,[r6,#1]  ; s_screen_int_flag
000010  2800              CMP      r0,#0
000012  d000              BEQ      |L16.22|
000014  2001              MOVS     r0,#1
                  |L16.22|
;;;615        if (((screen_gpio_int) || (s_screen_int_transfer_status)) && app_tp_m_transfer_complate()) //判断当前不处于通信状态，并且准备通信
000016  78f1              LDRB     r1,[r6,#3]  ; s_screen_int_transfer_status
000018  4308              ORRS     r0,r0,r1
00001a  d04b              BEQ      |L16.180|
00001c  f7fffffe          BL       hal_i2c_m_transfer_complate
000020  2800              CMP      r0,#0
000022  d047              BEQ      |L16.180|
;;;616        {
;;;617            s_screen_int_flag = false;
000024  2500              MOVS     r5,#0
000026  7075              STRB     r5,[r6,#1]
;;;618            if (s_spim_write)                                    //SPI 写数据后需要把接收FIFO的数据读出，不然会影响下一次读取
000028  7830              LDRB     r0,[r6,#0]  ; s_spim_write
00002a  2800              CMP      r0,#0
00002c  d002              BEQ      |L16.52|
;;;619            {
;;;620                hal_spi_m_clear_rxfifo();
00002e  f7fffffe          BL       hal_spi_m_clear_rxfifo
;;;621                s_spim_write = false;
000032  7035              STRB     r5,[r6,#0]
                  |L16.52|
;;;622            }
;;;623    
;;;624            /**** 2. 发送或读取从机数据 ****/
;;;625            if (screen_int_transfer_buffer_ready)
000034  79f0              LDRB     r0,[r6,#7]  ; screen_int_transfer_buffer_ready
000036  2201              MOVS     r2,#1                 ;614
;;;626            {
;;;627    		#ifndef READ_MODULE_TP_ONE_BY_ONE
;;;628    			screen_int_transfer_buffer_ready = false;
;;;629    			s_screen_int_transfer_status = true;
;;;630    		#ifdef USE_FOR_SUMSUNG_S20PLUS
;;;631    			app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
000038  4940              LDR      r1,|L16.316|
00003a  2800              CMP      r0,#0                 ;625
00003c  d072              BEQ      |L16.292|
00003e  483e              LDR      r0,|L16.312|
000040  2308              MOVS     r3,#8
000042  71c5              STRB     r5,[r0,#7]            ;628
000044  70c2              STRB     r2,[r0,#3]            ;629
000046  460d              MOV      r5,r1
000048  6808              LDR      r0,[r1,#0]  ; screen_reg_int_data
00004a  4a3d              LDR      r2,|L16.320|
00004c  2101              MOVS     r1,#1
00004e  f7fffffe          BL       app_tp_m_read
                  |L16.82|
;;;632    			while(!hal_i2c_m_transfer_complate());
000052  f7fffffe          BL       hal_i2c_m_transfer_complate
000056  2800              CMP      r0,#0
000058  d0fb              BEQ      |L16.82|
;;;633    			if(s_screen_read_buffer[7]>0)
00005a  4e39              LDR      r6,|L16.320|
00005c  4631              MOV      r1,r6                 ;631
00005e  79f0              LDRB     r0,[r6,#7]  ; s_screen_read_buffer
000060  3108              ADDS     r1,r1,#8              ;631
000062  9100              STR      r1,[sp,#0]
000064  2800              CMP      r0,#0
000066  d00d              BEQ      |L16.132|
;;;634    			{
;;;635    				len=s_screen_read_buffer[7]*8;
000068  06c0              LSLS     r0,r0,#27
00006a  0e04              LSRS     r4,r0,#24
;;;636    				app_tp_m_read(screen_reg_int_data[0].buffer, 1, &s_screen_read_buffer[8], len);
00006c  460a              MOV      r2,r1
00006e  4623              MOV      r3,r4
000070  2101              MOVS     r1,#1
000072  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
000074  f7fffffe          BL       app_tp_m_read
                  |L16.120|
;;;637    				while(!hal_i2c_m_transfer_complate());
000078  f7fffffe          BL       hal_i2c_m_transfer_complate
00007c  2800              CMP      r0,#0
00007e  d0fb              BEQ      |L16.120|
;;;638    				temp_len=len+7;
000080  1de0              ADDS     r0,r4,#7
000082  b2c7              UXTB     r7,r0
                  |L16.132|
;;;639    			}
;;;640    			if(s_screen_read_buffer[temp_len]>0)
000084  5df0              LDRB     r0,[r6,r7]
000086  2800              CMP      r0,#0
000088  d00d              BEQ      |L16.166|
;;;641    			{
;;;642    				len=s_screen_read_buffer[7]*8;
00008a  79f0              LDRB     r0,[r6,#7]  ; s_screen_read_buffer
;;;643    				app_tp_m_read(screen_reg_int_data[0].buffer, 1, &s_screen_read_buffer[temp_len+1], len);
00008c  19f2              ADDS     r2,r6,r7
00008e  06c0              LSLS     r0,r0,#27             ;642
000090  0e04              LSRS     r4,r0,#24             ;642
000092  4623              MOV      r3,r4
000094  2101              MOVS     r1,#1
000096  1c52              ADDS     r2,r2,#1
000098  6828              LDR      r0,[r5,#0]  ; screen_reg_int_data
00009a  f7fffffe          BL       app_tp_m_read
                  |L16.158|
;;;644    				while(!hal_i2c_m_transfer_complate());		
00009e  f7fffffe          BL       hal_i2c_m_transfer_complate
0000a2  2800              CMP      r0,#0
0000a4  d0fb              BEQ      |L16.158|
                  |L16.166|
;;;645    			}			
;;;646    			delayUs(100);
0000a6  2064              MOVS     r0,#0x64
0000a8  f7fffffe          BL       delayUs
;;;647    /*			
;;;648    			if(s_screen_read_buffer[0] == 0xF3 && s_screen_read_buffer[1] == 0x02 && s_screen_read_buffer[2] == 0x00)  // 收到 TP 异常回复 0xF3 0x02 0x00 0x00 0x00 0x00 0x00 0x00 
;;;649    			{
;;;650    				ap_tp_st_touch_software_reset();
;;;651    				TAU_LOGD("TP system reset\n");
;;;652    				return;
;;;653    			}
;;;654    */			
;;;655    			while(!hal_gpio_get_input_data(g_screen_input_int_pad))
0000ac  4f25              LDR      r7,|L16.324|
0000ae  e021              B        |L16.244|
                  |L16.176|
0000b0  f7fffffe          BL       app_tp_transfer_screen_const
                  |L16.180|
;;;656    			{
;;;657    				app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
;;;658    				while(!hal_i2c_m_transfer_complate());		
;;;659    				delayMs(2);
;;;660    				if(s_screen_read_buffer[7]>0)
;;;661    				{
;;;662    					len=s_screen_read_buffer[7]*8;
;;;663    					app_tp_m_read(screen_reg_int_data[0].buffer, 1, &s_screen_read_buffer[8], len);
;;;664    					while(!hal_i2c_m_transfer_complate());
;;;665    					delayMs(2);			
;;;666    				}	
;;;667    		//		printf("%2x,%2x\n",s_screen_read_buffer[0],s_screen_read_buffer[1]);
;;;668    			}		
;;;669    
;;;670    		#else
;;;671    			app_tp_m_read(screen_reg_int_data[0].buffer, screen_reg_int_data[0].txbuffer_size, s_screen_temp, screen_reg_int_data[0].rxbuffer_size);
;;;672    			while(!hal_i2c_m_transfer_complate());
;;;673    			app_tp_m_read(screen_reg_int_data[1].buffer, screen_reg_int_data[1].txbuffer_size, s_screen_number, screen_reg_int_data[1].rxbuffer_size);
;;;674    			while(!hal_i2c_m_transfer_complate());
;;;675    			//TAU_LOGD("s_screen_number[%4x], size[%4x]", ((s_screen_number[1]<<8)|s_screen_number[0]), ((s_screen_temp[1]<<8)|s_screen_temp[0]));
;;;676    			
;;;677    			if(s_screen_number[1])
;;;678    			{
;;;679    				if (s_screen_number[1]>3)
;;;680    				{
;;;681    					read_point =1;
;;;682    					s_screen_int_transfer_status = false;
;;;683    				}
;;;684    				else if (s_screen_number[1] &0x02)
;;;685    					read_point =10;
;;;686    				else
;;;687    					read_point =9;
;;;688    			}
;;;689    			else
;;;690    			{
;;;691    				if(s_screen_number[0] &0x80)
;;;692    					read_point =8;
;;;693    				else if(s_screen_number[0] &0x40)
;;;694    					read_point =7;
;;;695    				else if(s_screen_number[0] &0x20)
;;;696    					read_point =6;
;;;697    				else if(s_screen_number[0] &0x10)
;;;698    					read_point =5;
;;;699    				else if(s_screen_number[0] &0x08)
;;;700    					read_point =4;
;;;701    				else if(s_screen_number[0] &0x04)
;;;702    					read_point =3;
;;;703    				else if(s_screen_number[0] &0x02)
;;;704    					read_point =2;
;;;705    				else
;;;706    					read_point =1;
;;;707    			}
;;;708    			read_point =8*read_point;
;;;709    			app_tp_m_read(screen_reg_int_data[2].buffer, screen_reg_int_data[2].txbuffer_size, s_screen_read_buffer, read_point);
;;;710    			while(!hal_i2c_m_transfer_complate());
;;;711    		#endif	
;;;712    		#else
;;;713                if (!screen_reg_int_data[screen_int_transfer_count].read_flag)  //当前通信不需要读回，直接写
;;;714                {
;;;715                    app_tp_m_write(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size);
;;;716                }
;;;717                else                                                            //当前通信需要读回，先写再读
;;;718                {
;;;719    				s_screen_int_transfer_status = true;
;;;720                	if (screen_int_transfer_count==0)
;;;721                	{
;;;722    	                app_tp_m_read(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size, \
;;;723    	                              s_screen_temp, screen_reg_int_data[screen_int_transfer_count].rxbuffer_size);
;;;724    					screen_int_transfer_count =1;
;;;725                	}
;;;726                	else if (screen_int_transfer_count==1)
;;;727                	{
;;;728    	                app_tp_m_read(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size, \
;;;729    	                              s_screen_number, screen_reg_int_data[screen_int_transfer_count].rxbuffer_size);
;;;730    					screen_int_transfer_count =2;
;;;731                	}
;;;732                	else if (screen_int_transfer_count==2)
;;;733                	{
;;;734    					if(s_screen_number[1])
;;;735    					{
;;;736    						TAU_LOGD("s_screen_number[%4x], size[%4x]", ((s_screen_number[1]<<8)|s_screen_number[0]), ((s_screen_temp[1]<<8)|s_screen_temp[0]));
;;;737    						if (s_screen_number[1] &0x02)
;;;738    							read_point =10;
;;;739    						else
;;;740    							read_point =9;
;;;741    					}
;;;742    					else
;;;743    					{
;;;744    						if(s_screen_number[0] &0x80)
;;;745    							read_point =8;
;;;746    						else if(s_screen_number[0] &0x40)
;;;747    							read_point =7;
;;;748    						else if(s_screen_number[0] &0x20)
;;;749    							read_point =6;
;;;750    						else if(s_screen_number[0] &0x10)
;;;751    							read_point =5;
;;;752    						else if(s_screen_number[0] &0x08)
;;;753    							read_point =4;
;;;754    						else if(s_screen_number[0] &0x04)
;;;755    							read_point =3;
;;;756    						else if(s_screen_number[0] &0x02)
;;;757    							read_point =2;
;;;758    						else
;;;759    							read_point =1;
;;;760    					}
;;;761    					read_point =8*read_point;
;;;762    					
;;;763    	                app_tp_m_read(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size, \
;;;764    	                              s_screen_read_buffer, read_point);
;;;765    					screen_int_transfer_count =0;
;;;766    					screen_int_transfer_buffer_ready = false;
;;;767                	}
;;;768                }
;;;769    		#endif	
;;;770                ap_tp_st_touch_error_handler_F3(s_screen_read_buffer);
;;;771                ap_tp_st_touch_error_handler_FF(s_screen_read_buffer);
;;;772                ap_tp_st_touch_scan_point_record_event(s_screen_read_buffer, len + 8); 
;;;773           		app_tp_screen_analysis_int(screen_int_transfer_count, s_screen_read_buffer,screen_reg_int_data[2].rxbuffer_size);
;;;774    			
;;;775            }
;;;776            /**** 3. 解析本次通信数据，并准备下一次通信的buffer ****/
;;;777            else
;;;778            {
;;;779            #if 1
;;;780    			#ifdef USE_FOR_SUMSUNG_S20
;;;781    			u16TouchID=0x0000;
;;;782    			#endif	
;;;783    
;;;784    			screen_int_transfer_buffer_ready = true;
;;;785    			screen_int_transfer_count = app_tp_screen_analysis_int(screen_int_transfer_count, s_screen_read_buffer,screen_reg_int_data[2].rxbuffer_size);
;;;786    			screen_int_transfer_count = 0;
;;;787    			s_screen_int_transfer_status = false;
;;;788    
;;;789    		#else
;;;790                screen_int_transfer_buffer_ready = true;
;;;791                screen_int_transfer_count = app_tp_screen_analysis_int(screen_int_transfer_count, s_screen_read_buffer, \
;;;792                                            screen_reg_int_data[screen_int_transfer_count].rxbuffer_size);
;;;793    
;;;794                if (screen_int_transfer_count > screen_reg_int_data_size)       //解析需要等最后一次通信结束，最后一次数据解析后，停止通信
;;;795                {
;;;796                    screen_int_transfer_count = 0;
;;;797                    s_screen_int_transfer_status = false;
;;;798                    return;
;;;799                }
;;;800    		#endif	
;;;801            }
;;;802        }
;;;803    }
0000b4  bdf8              POP      {r3-r7,pc}
                  |L16.182|
0000b6  2308              MOVS     r3,#8                 ;657
0000b8  4a21              LDR      r2,|L16.320|
0000ba  2101              MOVS     r1,#1                 ;657
0000bc  6828              LDR      r0,[r5,#0]            ;657  ; screen_reg_int_data
0000be  f7fffffe          BL       app_tp_m_read
                  |L16.194|
0000c2  f7fffffe          BL       hal_i2c_m_transfer_complate
0000c6  2800              CMP      r0,#0                 ;658
0000c8  d0fb              BEQ      |L16.194|
0000ca  2002              MOVS     r0,#2                 ;659
0000cc  f7fffffe          BL       delayMs
0000d0  79f0              LDRB     r0,[r6,#7]            ;660  ; s_screen_read_buffer
0000d2  2800              CMP      r0,#0                 ;660
0000d4  d00e              BEQ      |L16.244|
0000d6  06c0              LSLS     r0,r0,#27             ;662
0000d8  0e04              LSRS     r4,r0,#24             ;662
0000da  4623              MOV      r3,r4                 ;663
0000dc  6828              LDR      r0,[r5,#0]            ;663  ; screen_reg_int_data
0000de  2101              MOVS     r1,#1                 ;663
0000e0  9a00              LDR      r2,[sp,#0]            ;663
0000e2  f7fffffe          BL       app_tp_m_read
                  |L16.230|
0000e6  f7fffffe          BL       hal_i2c_m_transfer_complate
0000ea  2800              CMP      r0,#0                 ;664
0000ec  d0fb              BEQ      |L16.230|
0000ee  2002              MOVS     r0,#2                 ;665
0000f0  f7fffffe          BL       delayMs
                  |L16.244|
0000f4  7838              LDRB     r0,[r7,#0]            ;655  ; g_screen_input_int_pad
0000f6  f7fffffe          BL       hal_gpio_get_input_data
0000fa  2800              CMP      r0,#0                 ;655
0000fc  d0db              BEQ      |L16.182|
0000fe  4810              LDR      r0,|L16.320|
000100  f7fffffe          BL       ap_tp_st_touch_error_handler_F3
000104  480e              LDR      r0,|L16.320|
000106  f7fffffe          BL       ap_tp_st_touch_error_handler_FF
00010a  3408              ADDS     r4,r4,#8              ;771
00010c  b2e1              UXTB     r1,r4                 ;772
00010e  480c              LDR      r0,|L16.320|
000110  f7fffffe          BL       ap_tp_st_touch_scan_point_record_event
000114  4808              LDR      r0,|L16.312|
000116  490a              LDR      r1,|L16.320|
000118  7980              LDRB     r0,[r0,#6]            ;773  ; screen_int_transfer_count
00011a  6aaa              LDR      r2,[r5,#0x28]         ;773  ; screen_reg_int_data
00011c  f7fffffe          BL       app_tp_screen_analysis_int
                  |L16.288|
000120  bdf8              POP      {r3-r7,pc}
000122  e7ff              B        |L16.292|
                  |L16.292|
000124  71f2              STRB     r2,[r6,#7]            ;784
000126  6a8a              LDR      r2,[r1,#0x28]         ;785  ; screen_reg_int_data
000128  4905              LDR      r1,|L16.320|
00012a  79b0              LDRB     r0,[r6,#6]            ;785  ; screen_int_transfer_count
00012c  f7fffffe          BL       app_tp_screen_analysis_int
000130  71b5              STRB     r5,[r6,#6]            ;786
000132  70f5              STRB     r5,[r6,#3]            ;787
000134  e7f4              B        |L16.288|
;;;804    
                          ENDP

000136  0000              DCW      0x0000
                  |L16.312|
                          DCD      ||.data||
                  |L16.316|
                          DCD      screen_reg_int_data
                  |L16.320|
                          DCD      ||.bss||
                  |L16.324|
                          DCD      g_screen_input_int_pad

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

                  app_tp_transfer_screen_start PROC
;;;564    **************************************************************************/
;;;565    void app_tp_transfer_screen_start(void)
000000  b570              PUSH     {r4-r6,lr}
;;;566    {
;;;567        s_screen_init_complate = false;
000002  4c04              LDR      r4,|L17.20|
000004  2500              MOVS     r5,#0
000006  7125              STRB     r5,[r4,#4]
;;;568        s_screen_const_transfer_count = 0;
000008  7165              STRB     r5,[r4,#5]
;;;569        //app_tp_screen_init();
;;;570    #ifndef DISABLE_I2C_INIT_CODE    
;;;571        app_tp_transfer_screen_const();
00000a  f7fffffe          BL       app_tp_transfer_screen_const
;;;572    #endif
;;;573    	s_screen_int_flag = false;
00000e  7065              STRB     r5,[r4,#1]
;;;574    }
000010  bd70              POP      {r4-r6,pc}
;;;575    
                          ENDP

000012  0000              DCW      0x0000
                  |L17.20|
                          DCD      ||.data||

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

                  s_screen_read_buffer
                          %        200
                  s_phone_read_buffer
                          %        200

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

                  s_spim_write
000000  00                DCB      0x00
                  s_screen_int_flag
000001  00                DCB      0x00
                  s_phone_reset_flag
000002  00                DCB      0x00
                  s_screen_int_transfer_status
000003  00                DCB      0x00
                  s_screen_init_complate
000004  00                DCB      0x00
                  s_screen_const_transfer_count
000005  ff                DCB      0xff
                  screen_int_transfer_count
000006  00                DCB      0x00
                  screen_int_transfer_buffer_ready
000007  01                DCB      0x01
                  MI10_PRO_screen_init_data1
000008  a00001            DCB      0xa0,0x00,0x01
                  MI10_PRO_screen_init_data3
00000b  a2                DCB      0xa2
00000c  0200              DCB      0x02,0x00
                  MI10_PRO_screen_init_data4
00000e  c007              DCB      0xc0,0x07
000010  01                DCB      0x01
                  MI10_PRO_screen_init_data2
000011  a20300            DCB      0xa2,0x03,0x00
000014  000003            DCB      0x00,0x00,0x03

                          AREA ||area_number.22||, DATA, ALIGN=0

                          EXPORTAS ||area_number.22||, ||.data||
                  MI10_PRO_screen_init_data5
000000  a40670            DCB      0xa4,0x06,0x70

                          AREA ||area_number.23||, DATA, ALIGN=0

                          EXPORTAS ||area_number.23||, ||.data||
                  MI10_PRO_screen_init_data6
000000  a60000            DCB      0xa6,0x00,0x00

                          AREA ||area_number.24||, DATA, ALIGN=0

                          EXPORTAS ||area_number.24||, ||.data||
                  MI10_PRO_screen_init_data7
000000  fa200000          DCB      0xfa,0x20,0x00,0x00
000004  78                DCB      0x78

                          AREA ||area_number.25||, DATA, ALIGN=0

                          EXPORTAS ||area_number.25||, ||.data||
                  MI10_PRO_screen_init_data8
000000  a2032000          DCB      0xa2,0x03,0x20,0x00
000004  0000              DCB      0x00,0x00

                          AREA ||area_number.26||, DATA, ALIGN=0

                          EXPORTAS ||area_number.26||, ||.data||
                  MI10_PRO_screen_init_data9
000000  a001              DCB      0xa0,0x01

                          AREA ||area_number.27||, DATA, ALIGN=0

                          EXPORTAS ||area_number.27||, ||.data||
                  MI10_PRO_screen_init_data10
000000  a00000            DCB      0xa0,0x00,0x00

                          AREA ||area_number.28||, DATA, ALIGN=0

                          EXPORTAS ||area_number.28||, ||.data||
                  read_point
000000  00                DCB      0x00

                          AREA ||area_number.29||, DATA, ALIGN=0

                          EXPORTAS ||area_number.29||, ||.data||
                  s_screen_number
000000  0000              DCB      0x00,0x00

                          AREA ||area_number.30||, DATA, ALIGN=0

                          EXPORTAS ||area_number.30||, ||.data||
                  s_screen_temp
000000  0000              DCB      0x00,0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\src\\app\\demo\\app_tp_transfer.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___17_app_tp_transfer_c_e672c05a____REV16|
#line 467 "C:\\Keil_v5\\ARM\\PACK\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
|__asm___17_app_tp_transfer_c_e672c05a____REV16| PROC
#line 468

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
