; 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 -O0 --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:\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\touch\app_tp_transfer.c]
                          THUMB

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

                  app_tp_i2cs_callback PROC
;;;299    #if PHONE_SLAVE_TRANSFER_I2C                //消除warning
;;;300    static void app_tp_i2cs_callback(e_i2c_s_int_status int_status, size_t recieve_num)
000000  b570              PUSH     {r4-r6,lr}
;;;301    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;302        static bool i2cs_transfer = true;       //确保一次通信只解析一次
;;;303        if (i2cs_transfer)
000006  480c              LDR      r0,|L1.56|
000008  7800              LDRB     r0,[r0,#0]  ; i2cs_transfer
00000a  2800              CMP      r0,#0
00000c  d005              BEQ      |L1.26|
;;;304        {
;;;305            i2cs_transfer = false;
00000e  2000              MOVS     r0,#0
000010  4909              LDR      r1,|L1.56|
000012  7008              STRB     r0,[r1,#0]
;;;306            app_tp_transfer_phone(recieve_num);
000014  4628              MOV      r0,r5
000016  f7fffffe          BL       app_tp_transfer_phone
                  |L1.26|
;;;307        }
;;;308        if (int_status == I2C_S_INT_READ)
00001a  2c00              CMP      r4,#0
00001c  d106              BNE      |L1.44|
;;;309        {
;;;310            app_tp_s_write(s_slave_txbuffer, s_slave_txbuffer_size);
00001e  4807              LDR      r0,|L1.60|
000020  6801              LDR      r1,[r0,#0]  ; s_slave_txbuffer_size
000022  4807              LDR      r0,|L1.64|
000024  6800              LDR      r0,[r0,#0]  ; s_slave_txbuffer
000026  f7fffffe          BL       app_tp_s_write
00002a  e004              B        |L1.54|
                  |L1.44|
;;;311        }
;;;312        else if (int_status == I2C_S_INT_STOP)
00002c  2c02              CMP      r4,#2
00002e  d102              BNE      |L1.54|
;;;313        {
;;;314            i2cs_transfer = true;
000030  2001              MOVS     r0,#1
000032  4901              LDR      r1,|L1.56|
000034  7008              STRB     r0,[r1,#0]
                  |L1.54|
;;;315        }
;;;316    }
000036  bd70              POP      {r4-r6,pc}
;;;317    #endif
                          ENDP

                  |L1.56|
                          DCD      i2cs_transfer
                  |L1.60|
                          DCD      s_slave_txbuffer_size
                  |L1.64|
                          DCD      s_slave_txbuffer

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

                  app_tp_init PROC
;;;140    **************************************************************************/
;;;141    void app_tp_init(void)
000000  b510              PUSH     {r4,lr}
;;;142    {
;;;143    //    app_tp_phone_reset_init();                                        //初始化手机复位的IO口
;;;144        app_tp_screen_int_init();                                         //配置screen中断输入引脚
000002  f7fffffe          BL       app_tp_screen_int_init
;;;145        hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_HIGH);        //配置phone报点输出中断IO口
000006  2101              MOVS     r1,#1
000008  480a              LDR      r0,|L2.52|
00000a  7800              LDRB     r0,[r0,#0]  ; g_phone_output_int_pad
00000c  f7fffffe          BL       hal_gpio_init_output
;;;146    
;;;147    #if SCREEN_MASTER_TRANSFER_I2C
;;;148        hal_i2c_m_dma_init(SCREEN_I2C_ADDRESS, SCREEN_I2C_ADDR_BITS, I2C_MASTER_SPEED);
000010  4a09              LDR      r2,|L2.56|
000012  2107              MOVS     r1,#7
000014  2049              MOVS     r0,#0x49
000016  f7fffffe          BL       hal_i2c_m_dma_init
;;;149    #elif SCREEN_MASTER_TRANSFER_SPI
;;;150        hal_spi_m_dma_init(SPI_MASTER_SPEED, SCREEN_SPI_CPHA, SCREEN_SPI_CPOL);
;;;151    #endif
;;;152    
;;;153    #if PHONE_SLAVE_TRANSFER_I2C
;;;154        hal_i2c_s_init(CHIP_I2C_ADDRESS, CHIP_I2C_ADDR_BITS);
00001a  2107              MOVS     r1,#7
00001c  2048              MOVS     r0,#0x48
00001e  f7fffffe          BL       hal_i2c_s_init
;;;155        hal_i2c_s_set_transfer(app_tp_i2cs_callback);
000022  4806              LDR      r0,|L2.60|
000024  f7fffffe          BL       hal_i2c_s_set_transfer
;;;156        hal_i2c_s_nonblocking_read(s_phone_read_buffer, BUFFER_SIZE_MAX); //先配置接收 buffer
000028  21fa              MOVS     r1,#0xfa
00002a  4805              LDR      r0,|L2.64|
00002c  f7fffffe          BL       hal_i2c_s_nonblocking_read
;;;157    #elif PHONE_SLAVE_TRANSFER_SPI
;;;158        hal_spi_slave_init(PHONE_SPI_CPHA, PHONE_SPI_CPOL, true);                                   // 初始化spi以及dma
;;;159        hal_spi_slave_register_callback(app_tp_spis_callback);            // 注册回调
;;;160        hal_spi_slave_auto_transfer_abort();                              // 停止传输
;;;161        hal_spi_slave_flush_fifo();                                       // Flush FIFO
;;;162    
;;;163        /* 每个packet自动接收, circle       mode 为false, 即收到buffer     max size数据后buffer不再更新, packet完成后调用回调    */
;;;164        hal_spi_slave_set_auto_rx_buffer(s_phone_read_buffer, BUFFER_SIZE_MAX, false); // 设置auto   rx buffer
;;;165        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
;;;166    
;;;167        hal_spi_slave_enable();                                           // 启动spis
;;;168        hal_spi_slave_auto_transfer_start();                              // 启动tx自动发送
;;;169    #endif
;;;170    }
000030  bd10              POP      {r4,pc}
;;;171    
                          ENDP

000032  0000              DCW      0x0000
                  |L2.52|
                          DCD      g_phone_output_int_pad
                  |L2.56|
                          DCD      0x00061a80
                  |L2.60|
                          DCD      app_tp_i2cs_callback
                  |L2.64|
                          DCD      s_phone_read_buffer

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

                  app_tp_m_read PROC
;;;235    **************************************************************************/
;;;236    void app_tp_m_read(const uint8_t *cmd, size_t cmd_size, uint8_t *data_buffer, size_t data_size)
000000  b5ff              PUSH     {r0-r7,lr}
;;;237    {
000002  b081              SUB      sp,sp,#4
000004  4605              MOV      r5,r0
000006  460e              MOV      r6,r1
;;;238    #if SCREEN_MASTER_TRANSFER_I2C
;;;239        uint8_t i = 0;
000008  2400              MOVS     r4,#0
;;;240        uint32_t address = 0;
00000a  2700              MOVS     r7,#0
;;;241    
;;;242        for (i = 0; i < cmd_size; i++)                          //先将要发送的数据整合到 address
00000c  bf00              NOP      
00000e  e005              B        |L3.28|
                  |L3.16|
;;;243        {
;;;244            address |= (uint32_t)cmd[i] << i * 8;
000010  5d28              LDRB     r0,[r5,r4]
000012  00e1              LSLS     r1,r4,#3
000014  4088              LSLS     r0,r0,r1
000016  4307              ORRS     r7,r7,r0
000018  1c60              ADDS     r0,r4,#1              ;242
00001a  b2c4              UXTB     r4,r0                 ;242
                  |L3.28|
00001c  42b4              CMP      r4,r6                 ;242
00001e  d3f7              BCC      |L3.16|
;;;245        }
;;;246        hal_i2c_m_dma_read(address, cmd_size, data_buffer, data_size);
000020  4631              MOV      r1,r6
000022  4638              MOV      r0,r7
000024  9b04              LDR      r3,[sp,#0x10]
000026  9a03              LDR      r2,[sp,#0xc]
000028  f7fffffe          BL       hal_i2c_m_dma_read
;;;247    #elif SCREEN_MASTER_TRANSFER_SPI
;;;248        hal_spi_m_dma_read(cmd, cmd_size, data_buffer, data_size);
;;;249    #endif
;;;250    }
00002c  b005              ADD      sp,sp,#0x14
00002e  bdf0              POP      {r4-r7,pc}
;;;251    
                          ENDP


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

                  app_tp_m_transfer_complate PROC
;;;178    **************************************************************************/
;;;179    bool app_tp_m_transfer_complate(void)
000000  b510              PUSH     {r4,lr}
;;;180    {
;;;181    #if SCREEN_MASTER_TRANSFER_I2C
;;;182        return hal_i2c_m_transfer_complate();
000002  f7fffffe          BL       hal_i2c_m_transfer_complate
;;;183    #elif SCREEN_MASTER_TRANSFER_SPI
;;;184        return hal_spi_m_get_transfer_complate();
;;;185    #else
;;;186        return true;
;;;187    #endif
;;;188    }
000006  bd10              POP      {r4,pc}
;;;189    
                          ENDP


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

                  app_tp_m_write PROC
;;;215    **************************************************************************/
;;;216    void app_tp_m_write(const uint8_t *txbuffer, size_t buffer_size)
000000  b570              PUSH     {r4-r6,lr}
;;;217    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;218    #if SCREEN_MASTER_TRANSFER_I2C
;;;219        hal_i2c_m_dma_write(txbuffer, buffer_size);
000006  4629              MOV      r1,r5
000008  4620              MOV      r0,r4
00000a  f7fffffe          BL       hal_i2c_m_dma_write
;;;220    #elif SCREEN_MASTER_TRANSFER_SPI
;;;221        hal_spi_m_dma_write(txbuffer, buffer_size);
;;;222        s_spim_write = true;
;;;223    #endif
;;;224    }
00000e  bd70              POP      {r4-r6,pc}
;;;225    
                          ENDP


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

                  app_tp_phone_clear_reset_on PROC
;;;600    **************************************************************************/
;;;601    void app_tp_phone_clear_reset_on(void)
000000  2000              MOVS     r0,#0
;;;602    {
;;;603        s_phone_reset_flag = false;
000002  4901              LDR      r1,|L6.8|
000004  7008              STRB     r0,[r1,#0]
;;;604    }
000006  4770              BX       lr
;;;605    
                          ENDP

                  |L6.8|
                          DCD      s_phone_reset_flag

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

                  app_tp_phone_reset_init PROC
;;;102    **************************************************************************/
;;;103    static void app_tp_phone_reset_init(void)
000000  b510              PUSH     {r4,lr}
;;;104    {
;;;105        /*0.配置为输入*/
;;;106        hal_gpio_init_input(g_phone_input_rst_pad);
000002  480c              LDR      r0,|L7.52|
000004  7800              LDRB     r0,[r0,#0]  ; g_phone_input_rst_pad
000006  f7fffffe          BL       hal_gpio_init_input
;;;107        /*1.关闭中断*/
;;;108        hal_gpio_ctrl_eint(g_phone_input_rst_pad, DISABLE);
00000a  2100              MOVS     r1,#0
00000c  4809              LDR      r0,|L7.52|
00000e  7800              LDRB     r0,[r0,#0]  ; g_phone_input_rst_pad
000010  f7fffffe          BL       hal_gpio_ctrl_eint
;;;109        /*2.中断初始化*/
;;;110        hal_gpio_init_eint(g_phone_input_rst_pad, DETECT_RISING_EDGE);
000014  2102              MOVS     r1,#2
000016  4807              LDR      r0,|L7.52|
000018  7800              LDRB     r0,[r0,#0]  ; g_phone_input_rst_pad
00001a  f7fffffe          BL       hal_gpio_init_eint
;;;111        /*3.注册回调*/
;;;112        hal_gpio_reg_eint_cb(g_phone_input_rst_pad, app_tp_reset_callback);
00001e  4906              LDR      r1,|L7.56|
000020  4804              LDR      r0,|L7.52|
000022  7800              LDRB     r0,[r0,#0]  ; g_phone_input_rst_pad
000024  f7fffffe          BL       hal_gpio_reg_eint_cb
;;;113        /*4.使能中断*/
;;;114        hal_gpio_ctrl_eint(g_phone_input_rst_pad, ENABLE);
000028  2101              MOVS     r1,#1
00002a  4802              LDR      r0,|L7.52|
00002c  7800              LDRB     r0,[r0,#0]  ; g_phone_input_rst_pad
00002e  f7fffffe          BL       hal_gpio_ctrl_eint
;;;115    }
000032  bd10              POP      {r4,pc}
;;;116    
                          ENDP

                  |L7.52|
                          DCD      g_phone_input_rst_pad
                  |L7.56|
                          DCD      app_tp_reset_callback

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

                  app_tp_phone_reset_on PROC
;;;588    **************************************************************************/
;;;589    bool app_tp_phone_reset_on(void)
000000  4801              LDR      r0,|L8.8|
;;;590    {
;;;591        return s_phone_reset_flag;
000002  7800              LDRB     r0,[r0,#0]  ; s_phone_reset_flag
;;;592    }
000004  4770              BX       lr
;;;593    
                          ENDP

000006  0000              DCW      0x0000
                  |L8.8|
                          DCD      s_phone_reset_flag

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

                  app_tp_reset_callback PROC
;;;356    **************************************************************************/
;;;357    static void app_tp_reset_callback(void *data)
000000  2101              MOVS     r1,#1
;;;358    {
;;;359        s_phone_reset_flag = true;
000002  4a01              LDR      r2,|L9.8|
000004  7011              STRB     r1,[r2,#0]
;;;360        //app_tp_s_write(phone_reg_const_data[0].write_back, phone_reg_const_data[0].write_back_size);    ///////S8 s8p
;;;361    
;;;362    #if PHONE_SLAVE_TRANSFER_SPI
;;;363        hal_gpio_set_output_data(IO_PAD_AP_INT, IO_LVL_LOW);
;;;364    #endif
;;;365        //TAU_LOGD("app_tp_reset_callback\n");
;;;366    }
000006  4770              BX       lr
;;;367    
                          ENDP

                  |L9.8|
                          DCD      s_phone_reset_flag

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

                  app_tp_s_read PROC
;;;284    **************************************************************************/
;;;285    void app_tp_s_read(void *rxBuffer, size_t data_size)
000000  b570              PUSH     {r4-r6,lr}
;;;286    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;287    #if PHONE_SLAVE_TRANSFER_I2C
;;;288        hal_i2c_s_nonblocking_read(rxBuffer, data_size);
000006  4629              MOV      r1,r5
000008  4620              MOV      r0,r4
00000a  f7fffffe          BL       hal_i2c_s_nonblocking_read
;;;289    #endif
;;;290    }
00000e  bd70              POP      {r4-r6,pc}
;;;291    
                          ENDP


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

                  app_tp_s_transfer_complate PROC
;;;196    **************************************************************************/
;;;197    bool app_tp_s_transfer_complate(void)
000000  b510              PUSH     {r4,lr}
;;;198    {
;;;199    #if PHONE_SLAVE_TRANSFER_I2C
;;;200        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
                  |L11.20|
;;;201    #elif PHONE_SLAVE_TRANSFER_SPI
;;;202        return !hal_spi_slave_busy();
;;;203    #else
;;;204        return true;
;;;205    #endif
;;;206    }
000014  bd10              POP      {r4,pc}
                  |L11.22|
000016  2000              MOVS     r0,#0                 ;200
000018  e7fc              B        |L11.20|
;;;207    
                          ENDP


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

                  app_tp_s_write PROC
;;;259    **************************************************************************/
;;;260    void app_tp_s_write(const uint8_t *txbuffer, size_t buffer_size)
000000  b570              PUSH     {r4-r6,lr}
;;;261    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;262    #if PHONE_SLAVE_TRANSFER_I2C
;;;263        hal_i2c_s_dma_write(txbuffer, buffer_size);
000006  4629              MOV      r1,r5
000008  4620              MOV      r0,r4
00000a  f7fffffe          BL       hal_i2c_s_dma_write
;;;264    #elif PHONE_SLAVE_TRANSFER_SPI
;;;265        //while (hal_spi_slave_busy());
;;;266    #if 1
;;;267        hal_spi_slave_reset_tx(txbuffer, buffer_size, true);
;;;268    #else
;;;269        hal_spi_slave_auto_transfer_abort();
;;;270        hal_spi_slave_flush_fifo();
;;;271        hal_spi_slave_set_auto_tx_buffer(txbuffer, buffer_size, true);
;;;272        hal_spi_slave_auto_transfer_start();
;;;273    #endif
;;;274    #endif
;;;275    }
00000e  bd70              POP      {r4-r6,pc}
;;;276    
                          ENDP


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

                  app_tp_screen_init PROC
;;;123    **************************************************************************/
;;;124    void app_tp_screen_init(void)
000000  b510              PUSH     {r4,lr}
;;;125    {
;;;126        hal_gpio_init_output(g_screen_input_rst_pad, IO_LVL_HIGH);
000002  2101              MOVS     r1,#1
000004  480c              LDR      r0,|L13.56|
000006  7800              LDRB     r0,[r0,#0]  ; g_screen_input_rst_pad
000008  f7fffffe          BL       hal_gpio_init_output
;;;127        delayUs(200);
00000c  20c8              MOVS     r0,#0xc8
00000e  f7fffffe          BL       delayUs
;;;128        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_LOW);
000012  2100              MOVS     r1,#0
000014  4808              LDR      r0,|L13.56|
000016  7800              LDRB     r0,[r0,#0]  ; g_screen_input_rst_pad
000018  f7fffffe          BL       hal_gpio_set_output_data
;;;129        delayUs(200);
00001c  20c8              MOVS     r0,#0xc8
00001e  f7fffffe          BL       delayUs
;;;130        hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_HIGH);
000022  2101              MOVS     r1,#1
000024  4804              LDR      r0,|L13.56|
000026  7800              LDRB     r0,[r0,#0]  ; g_screen_input_rst_pad
000028  f7fffffe          BL       hal_gpio_set_output_data
;;;131        delayUs(400);
00002c  20ff              MOVS     r0,#0xff
00002e  3091              ADDS     r0,r0,#0x91
000030  f7fffffe          BL       delayUs
;;;132    }
000034  bd10              POP      {r4,pc}
;;;133    
                          ENDP

000036  0000              DCW      0x0000
                  |L13.56|
                          DCD      g_screen_input_rst_pad

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

                  app_tp_screen_int_callback PROC
;;;53     **************************************************************************/
;;;54     static void app_tp_screen_int_callback(void *data)
000000  2101              MOVS     r1,#1
;;;55     {
;;;56         s_screen_int_flag = true;
000002  4a01              LDR      r2,|L14.8|
000004  7011              STRB     r1,[r2,#0]
;;;57     }
000006  4770              BX       lr
;;;58     
                          ENDP

                  |L14.8|
                          DCD      s_screen_int_flag

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

                  app_tp_screen_int_init PROC
;;;81     **************************************************************************/
;;;82     static void app_tp_screen_int_init(void)
000000  b510              PUSH     {r4,lr}
;;;83     {
;;;84         hal_gpio_ctrl_eint(g_screen_input_int_pad, DISABLE);                      // 1.关闭中断
000002  2100              MOVS     r1,#0
000004  480c              LDR      r0,|L15.56|
000006  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000008  f7fffffe          BL       hal_gpio_ctrl_eint
;;;85     #if SCREEN_INT_LOW_DEFAULT
;;;86         hal_gpio_set_pull_state(g_screen_input_int_pad, DISABLE, ENABLE);         // 2.配置下拉
;;;87         hal_gpio_init_eint(g_screen_input_int_pad, DETECT_RISING_EDGE);           // 3.中断初始化,INT 上升沿触发中断
;;;88     #else
;;;89         hal_gpio_set_pull_state(g_screen_input_int_pad, ENABLE, DISABLE);         // 2.配置上拉
00000c  2200              MOVS     r2,#0
00000e  2101              MOVS     r1,#1
000010  4809              LDR      r0,|L15.56|
000012  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000014  f7fffffe          BL       hal_gpio_set_pull_state
;;;90         hal_gpio_init_eint(g_screen_input_int_pad, DETECT_FALLING_EDGE);          // 3.中断初始化,INT 下降沿触发中断
000018  2103              MOVS     r1,#3
00001a  4807              LDR      r0,|L15.56|
00001c  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
00001e  f7fffffe          BL       hal_gpio_init_eint
;;;91     #endif
;;;92         hal_gpio_reg_eint_cb(g_screen_input_int_pad, app_tp_screen_int_callback); // 4.注册回调
000022  4906              LDR      r1,|L15.60|
000024  4804              LDR      r0,|L15.56|
000026  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000028  f7fffffe          BL       hal_gpio_reg_eint_cb
;;;93         hal_gpio_ctrl_eint(g_screen_input_int_pad, ENABLE);                       // 5.使能中断
00002c  2101              MOVS     r1,#1
00002e  4802              LDR      r0,|L15.56|
000030  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000032  f7fffffe          BL       hal_gpio_ctrl_eint
;;;94     }
000036  bd10              POP      {r4,pc}
;;;95     
                          ENDP

                  |L15.56|
                          DCD      g_screen_input_int_pad
                  |L15.60|
                          DCD      app_tp_screen_int_callback

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

                  app_tp_screen_int_lvl_low PROC
;;;65     **************************************************************************/
;;;66     static bool app_tp_screen_int_lvl_low(void)
000000  b510              PUSH     {r4,lr}
;;;67     {
;;;68     #if SCREEN_INT_LOW_DEFAULT
;;;69         return hal_gpio_get_input_data(g_screen_input_int_pad);     //INT 为高电平时，说明还有报点数据没读出
;;;70     #else
;;;71         return !hal_gpio_get_input_data(g_screen_input_int_pad);    //INT 为低电平时，说明还有报点数据没读出
000002  4805              LDR      r0,|L16.24|
000004  7800              LDRB     r0,[r0,#0]  ; g_screen_input_int_pad
000006  f7fffffe          BL       hal_gpio_get_input_data
00000a  2800              CMP      r0,#0
00000c  d101              BNE      |L16.18|
00000e  2001              MOVS     r0,#1
                  |L16.16|
;;;72     #endif
;;;73     }
000010  bd10              POP      {r4,pc}
                  |L16.18|
000012  2000              MOVS     r0,#0                 ;71
000014  e7fc              B        |L16.16|
;;;74     
                          ENDP

000016  0000              DCW      0x0000
                  |L16.24|
                          DCD      g_screen_input_int_pad

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

                  app_tp_transfer_phone PROC
;;;570    **************************************************************************/
;;;571    static void app_tp_transfer_phone(size_t recieve_num)
000000  b510              PUSH     {r4,lr}
;;;572    {
000002  4604              MOV      r4,r0
;;;573        /* 数据解析，判断是否需要答复以及答复的buffer指针 */
;;;574        if (recieve_num > 0)
000004  2c00              CMP      r4,#0
000006  d005              BEQ      |L17.20|
;;;575        {
;;;576            app_tp_phone_analysis_data(s_phone_read_buffer, recieve_num, &s_slave_txbuffer, &s_slave_txbuffer_size);
000008  4b05              LDR      r3,|L17.32|
00000a  4a06              LDR      r2,|L17.36|
00000c  4621              MOV      r1,r4
00000e  4806              LDR      r0,|L17.40|
000010  f7fffffe          BL       app_tp_phone_analysis_data
                  |L17.20|
;;;577        }
;;;578    
;;;579        app_tp_s_read(s_phone_read_buffer, BUFFER_SIZE_MAX);
000014  21fa              MOVS     r1,#0xfa
000016  4804              LDR      r0,|L17.40|
000018  f7fffffe          BL       app_tp_s_read
;;;580    }
00001c  bd10              POP      {r4,pc}
;;;581    
                          ENDP

00001e  0000              DCW      0x0000
                  |L17.32|
                          DCD      s_slave_txbuffer_size
                  |L17.36|
                          DCD      s_slave_txbuffer
                  |L17.40|
                          DCD      s_phone_read_buffer

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

                  app_tp_transfer_screen_const PROC
;;;374    **************************************************************************/
;;;375    static void app_tp_transfer_screen_const(void)
000000  b510              PUSH     {r4,lr}
;;;376    {
;;;377        static bool    screen_const_transfer_buffer_ready = true;            //发送 buffer 是否已准备好
;;;378    		
;;;379        /**** 1. 判断当前状态通信已结束, 并且开机初始化流程还未走完****/
;;;380        if (app_tp_m_transfer_complate() && (s_screen_const_transfer_count < screen_reg_start_data_size))
000002  f7fffffe          BL       app_tp_m_transfer_complate
000006  2800              CMP      r0,#0
000008  d06d              BEQ      |L18.230|
00000a  4837              LDR      r0,|L18.232|
00000c  7800              LDRB     r0,[r0,#0]  ; s_screen_const_transfer_count
00000e  4937              LDR      r1,|L18.236|
000010  7809              LDRB     r1,[r1,#0]  ; screen_reg_start_data_size
000012  4288              CMP      r0,r1
000014  da67              BGE      |L18.230|
;;;381        {
;;;382            if (s_spim_write)                                                //SPI 写数据后需要把接收FIFO的数据读出，不然会影响下一次读取
000016  4836              LDR      r0,|L18.240|
000018  7800              LDRB     r0,[r0,#0]  ; s_spim_write
00001a  2800              CMP      r0,#0
00001c  d004              BEQ      |L18.40|
;;;383            {
;;;384                hal_spi_m_clear_rxfifo();
00001e  f7fffffe          BL       hal_spi_m_clear_rxfifo
;;;385                s_spim_write = false;
000022  2000              MOVS     r0,#0
000024  4932              LDR      r1,|L18.240|
000026  7008              STRB     r0,[r1,#0]
                  |L18.40|
;;;386            }
;;;387    
;;;388            /**** 2. 发送或读取从机数据 ****/
;;;389            if (screen_const_transfer_buffer_ready)
000028  4832              LDR      r0,|L18.244|
00002a  7800              LDRB     r0,[r0,#0]  ; screen_const_transfer_buffer_ready
00002c  2800              CMP      r0,#0
00002e  d038              BEQ      |L18.162|
;;;390            {
;;;391                screen_const_transfer_buffer_ready = false;
000030  2000              MOVS     r0,#0
000032  4930              LDR      r1,|L18.244|
000034  7008              STRB     r0,[r1,#0]
;;;392    						g_screen_tp_init_start = true;
000036  2001              MOVS     r0,#1
000038  492f              LDR      r1,|L18.248|
00003a  7008              STRB     r0,[r1,#0]
;;;393    						
;;;394                if (!screen_reg_start_data[s_screen_const_transfer_count].read_flag)     //当前通信不需要读回，直接写
00003c  482a              LDR      r0,|L18.232|
00003e  7800              LDRB     r0,[r0,#0]  ; s_screen_const_transfer_count
000040  2114              MOVS     r1,#0x14
000042  4348              MULS     r0,r1,r0
000044  492d              LDR      r1,|L18.252|
000046  1840              ADDS     r0,r0,r1
000048  7c00              LDRB     r0,[r0,#0x10]
00004a  2800              CMP      r0,#0
00004c  d110              BNE      |L18.112|
;;;395                {
;;;396                    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);
00004e  4a26              LDR      r2,|L18.232|
000050  7812              LDRB     r2,[r2,#0]  ; s_screen_const_transfer_count
000052  2314              MOVS     r3,#0x14
000054  435a              MULS     r2,r3,r2
000056  460b              MOV      r3,r1
000058  18d2              ADDS     r2,r2,r3
00005a  6891              LDR      r1,[r2,#8]
00005c  4a22              LDR      r2,|L18.232|
00005e  7812              LDRB     r2,[r2,#0]  ; s_screen_const_transfer_count
000060  2314              MOVS     r3,#0x14
000062  435a              MULS     r2,r3,r2
000064  4b25              LDR      r3,|L18.252|
000066  18d2              ADDS     r2,r2,r3
000068  6850              LDR      r0,[r2,#4]
00006a  f7fffffe          BL       app_tp_m_write
00006e  e03a              B        |L18.230|
                  |L18.112|
;;;397                }
;;;398                else                                                             //当前通信需要读回，先写再读
;;;399                {
;;;400                    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, \
000070  4a1d              LDR      r2,|L18.232|
000072  7812              LDRB     r2,[r2,#0]  ; s_screen_const_transfer_count
000074  2414              MOVS     r4,#0x14
000076  4362              MULS     r2,r4,r2
000078  4c20              LDR      r4,|L18.252|
00007a  1912              ADDS     r2,r2,r4
00007c  68d3              LDR      r3,[r2,#0xc]
00007e  4a1a              LDR      r2,|L18.232|
000080  7812              LDRB     r2,[r2,#0]  ; s_screen_const_transfer_count
000082  2414              MOVS     r4,#0x14
000084  4362              MULS     r2,r4,r2
000086  4c1d              LDR      r4,|L18.252|
000088  1912              ADDS     r2,r2,r4
00008a  6891              LDR      r1,[r2,#8]
00008c  4a16              LDR      r2,|L18.232|
00008e  7812              LDRB     r2,[r2,#0]  ; s_screen_const_transfer_count
000090  2414              MOVS     r4,#0x14
000092  4362              MULS     r2,r4,r2
000094  4c19              LDR      r4,|L18.252|
000096  1912              ADDS     r2,r2,r4
000098  6850              LDR      r0,[r2,#4]
00009a  4a19              LDR      r2,|L18.256|
00009c  f7fffffe          BL       app_tp_m_read
0000a0  e021              B        |L18.230|
                  |L18.162|
;;;401                                  s_screen_read_buffer, screen_reg_start_data[s_screen_const_transfer_count].rxbuffer_size);
;;;402                }
;;;403    					
;;;404            }
;;;405            /**** 3. 解析本次通信数据，并准备下一次通信的buffer ****/
;;;406            else
;;;407            {
;;;408                screen_const_transfer_buffer_ready = true;
0000a2  2001              MOVS     r0,#1
0000a4  4913              LDR      r1,|L18.244|
0000a6  7008              STRB     r0,[r1,#0]
;;;409                s_screen_const_transfer_count = app_tp_screen_analysis_const(s_screen_const_transfer_count, s_screen_read_buffer, \
0000a8  480f              LDR      r0,|L18.232|
0000aa  7800              LDRB     r0,[r0,#0]  ; s_screen_const_transfer_count
0000ac  2114              MOVS     r1,#0x14
0000ae  4348              MULS     r0,r1,r0
0000b0  4912              LDR      r1,|L18.252|
0000b2  1840              ADDS     r0,r0,r1
0000b4  4912              LDR      r1,|L18.256|
0000b6  68c2              LDR      r2,[r0,#0xc]
0000b8  480b              LDR      r0,|L18.232|
0000ba  7800              LDRB     r0,[r0,#0]  ; s_screen_const_transfer_count
0000bc  f7fffffe          BL       app_tp_screen_analysis_const
0000c0  4909              LDR      r1,|L18.232|
0000c2  7008              STRB     r0,[r1,#0]
;;;410                                                screen_reg_start_data[s_screen_const_transfer_count].rxbuffer_size);
;;;411    
;;;412                if (s_screen_const_transfer_count >= screen_reg_start_data_size)
0000c4  4608              MOV      r0,r1
0000c6  7800              LDRB     r0,[r0,#0]  ; s_screen_const_transfer_count
0000c8  4908              LDR      r1,|L18.236|
0000ca  7809              LDRB     r1,[r1,#0]  ; screen_reg_start_data_size
0000cc  4288              CMP      r0,r1
0000ce  db0a              BLT      |L18.230|
;;;413                {
;;;414                    s_screen_init_complate = true;
0000d0  2001              MOVS     r0,#1
0000d2  490c              LDR      r1,|L18.260|
0000d4  7008              STRB     r0,[r1,#0]
;;;415    				TAU_LOGD("tp init done\n");
0000d6  bf00              NOP      
0000d8  22ff              MOVS     r2,#0xff
0000da  32a0              ADDS     r2,r2,#0xa0
0000dc  a10a              ADR      r1,|L18.264|
0000de  a00c              ADR      r0,|L18.272|
0000e0  f7fffffe          BL       LOG_printf
0000e4  bf00              NOP      
                  |L18.230|
;;;416                }
;;;417            }
;;;418        }
;;;419    }
0000e6  bd10              POP      {r4,pc}
;;;420    
                          ENDP

                  |L18.232|
                          DCD      s_screen_const_transfer_count
                  |L18.236|
                          DCD      screen_reg_start_data_size
                  |L18.240|
                          DCD      s_spim_write
                  |L18.244|
                          DCD      screen_const_transfer_buffer_ready
                  |L18.248|
                          DCD      g_screen_tp_init_start
                  |L18.252|
                          DCD      screen_reg_start_data
                  |L18.256|
                          DCD      s_screen_read_buffer
                  |L18.260|
                          DCD      s_screen_init_complate
                  |L18.264|
000108  7461755f          DCB      "tau_log",0
00010c  6c6f6700
                  |L18.272|
000110  5b25735d          DCB      "[%s] (%04d) tp init done\n",0
000114  20282530
000118  34642920
00011c  74702069
000120  6e697420
000124  646f6e65
000128  0a00    
00012a  00                DCB      0
00012b  00                DCB      0

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

                  app_tp_transfer_screen_int PROC
;;;460    **************************************************************************/
;;;461    void app_tp_transfer_screen_int(void)
000000  b538              PUSH     {r3-r5,lr}
;;;462    {
;;;463        static uint8_t len = 0;
;;;464    	  bool screen_gpio_int = false;
000002  2400              MOVS     r4,#0
;;;465        static uint8_t screen_int_transfer_count = 0;            //记录当前通信到哪一步
;;;466        static bool    screen_int_transfer_buffer_ready = true;  //发送 buffer 是否已准备好
;;;467        volatile bool init_gpio = false;
000004  2000              MOVS     r0,#0
000006  9000              STR      r0,[sp,#0]
;;;468        if (!s_screen_init_complate)                             //TP 初始化还未完成，则先进行初始化操作
000008  483e              LDR      r0,|L19.260|
00000a  7800              LDRB     r0,[r0,#0]  ; s_screen_init_complate
00000c  2800              CMP      r0,#0
00000e  d102              BNE      |L19.22|
;;;469        {
;;;470            app_tp_transfer_screen_const();
000010  f7fffffe          BL       app_tp_transfer_screen_const
                  |L19.20|
;;;471            return;
;;;472        }
;;;473    
;;;474    	app_tp_transfer_screen_restart();
;;;475    	app_tp_screen_analysis_wake_up_exec();
;;;476    
;;;477        /**** 1. 判断 screen 是否发出中断信号 ****/
;;;478        // s_screen_int_flag:           中断信号标志位
;;;479        // app_tp_screen_int_lvl_low :  SPI 长时间通信时，偶尔会出现cs拉高导致通信异常卡死，该标志位用于解决卡死的问题
;;;480        init_gpio = app_tp_screen_int_lvl_low();
;;;481        screen_gpio_int = (s_screen_int_flag || init_gpio);
;;;482        if (((screen_gpio_int) || (s_screen_int_transfer_status)) && app_tp_m_transfer_complate()) //判断当前不处于通信状态，并且准备通信
;;;483        {
;;;484            s_screen_int_flag = false;
;;;485            if (s_spim_write)                                    //SPI 写数据后需要把接收FIFO的数据读出，不然会影响下一次读取
;;;486            {
;;;487                hal_spi_m_clear_rxfifo();
;;;488                s_spim_write = false;
;;;489            }
;;;490    
;;;491            /**** 2. 发送或读取从机数据 ****/
;;;492            if (screen_int_transfer_buffer_ready)
;;;493            {
;;;494                screen_int_transfer_buffer_ready = false;
;;;495                s_screen_int_transfer_status = true;
;;;496    			len = 0;
;;;497    						#if 1
;;;498    						app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
;;;499    						while(!hal_i2c_m_transfer_complate());
;;;500    						if(s_screen_read_buffer[7]>0)
;;;501    						{
;;;502    							len = s_screen_read_buffer[7]*8;
;;;503    							app_tp_m_read(screen_reg_int_data[0].buffer, 1, &s_screen_read_buffer[8], len);
;;;504    							while(!hal_i2c_m_transfer_complate());		
;;;505    						}	
;;;506    /*						delayUs(100);
;;;507    						while(!hal_gpio_get_input_data(g_screen_input_int_pad))
;;;508    						{
;;;509    							app_tp_m_read(screen_reg_int_data[0].buffer, 1, s_screen_read_buffer, 8);
;;;510    							while(!hal_i2c_m_transfer_complate());		
;;;511    							delayUs(100);
;;;512    							if(s_screen_read_buffer[7]>0)
;;;513    							{
;;;514    								len = s_screen_read_buffer[7]*8;
;;;515    								app_tp_m_read(screen_reg_int_data[0].buffer, 1, &s_screen_read_buffer[8], len);
;;;516    								while(!hal_i2c_m_transfer_complate());
;;;517    								delayUs(100);			
;;;518    							}				
;;;519    						}
;;;520    */
;;;521    	//					ap_tp_st_touch_error_handler_F3(s_screen_read_buffer);
;;;522        //        ap_tp_st_touch_error_handler_FF(s_screen_read_buffer);
;;;523        //        ap_tp_st_touch_scan_point_record_event(s_screen_read_buffer, len + 8);
;;;524    
;;;525    		
;;;526    						#else
;;;527                if (!screen_reg_int_data[screen_int_transfer_count].read_flag)  //当前通信不需要读回，直接写
;;;528                {
;;;529                    app_tp_m_write(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size);
;;;530                }
;;;531                else                                                            //当前通信需要读回，先写再读
;;;532                {
;;;533                    app_tp_m_read(screen_reg_int_data[screen_int_transfer_count].buffer, screen_reg_int_data[screen_int_transfer_count].txbuffer_size, \
;;;534                                  s_screen_read_buffer, screen_reg_int_data[screen_int_transfer_count].rxbuffer_size);
;;;535                }
;;;536    
;;;537    		//	ap_tp_st_touch_error_handler_F3(s_screen_read_buffer);
;;;538            //    ap_tp_st_touch_error_handler_FF(s_screen_read_buffer);
;;;539            //    ap_tp_st_touch_scan_point_record_event(s_screen_read_buffer, 8);
;;;540    			
;;;541    						#endif
;;;542            }
;;;543            /**** 3. 解析本次通信数据，并准备下一次通信的buffer ****/
;;;544            else
;;;545            {
;;;546                screen_int_transfer_buffer_ready = true;
;;;547    
;;;548    			screen_int_transfer_count = app_tp_screen_analysis_int(screen_int_transfer_count, s_screen_read_buffer, \
;;;549                                            (len + 8));
;;;550    			 
;;;551     //          screen_int_transfer_count = app_tp_screen_analysis_int(screen_int_transfer_count, s_screen_read_buffer, \
;;;552     //                                      screen_reg_int_data[screen_int_transfer_count].rxbuffer_size);
;;;553    
;;;554                if (screen_int_transfer_count >= screen_reg_int_data_size)       //解析需要等最后一次通信结束，最后一次数据解析后，停止通信
;;;555                {
;;;556                    screen_int_transfer_count = 0;
;;;557                    s_screen_int_transfer_status = false;
;;;558                    return;
;;;559                }
;;;560            }
;;;561        }
;;;562    }
000014  bd38              POP      {r3-r5,pc}
                  |L19.22|
000016  f7fffffe          BL       app_tp_transfer_screen_restart
00001a  f7fffffe          BL       app_tp_screen_analysis_wake_up_exec
00001e  f7fffffe          BL       app_tp_screen_int_lvl_low
000022  9000              STR      r0,[sp,#0]            ;480
000024  4838              LDR      r0,|L19.264|
000026  7800              LDRB     r0,[r0,#0]            ;481  ; s_screen_int_flag
000028  2800              CMP      r0,#0                 ;481
00002a  d103              BNE      |L19.52|
00002c  4668              MOV      r0,sp                 ;481
00002e  7800              LDRB     r0,[r0,#0]            ;481
000030  2800              CMP      r0,#0                 ;481
000032  d001              BEQ      |L19.56|
                  |L19.52|
000034  2001              MOVS     r0,#1                 ;481
000036  e000              B        |L19.58|
                  |L19.56|
000038  2000              MOVS     r0,#0                 ;481
                  |L19.58|
00003a  4604              MOV      r4,r0                 ;481
00003c  2c00              CMP      r4,#0                 ;482
00003e  d103              BNE      |L19.72|
000040  4832              LDR      r0,|L19.268|
000042  7800              LDRB     r0,[r0,#0]            ;482  ; s_screen_int_transfer_status
000044  2800              CMP      r0,#0                 ;482
000046  d05a              BEQ      |L19.254|
                  |L19.72|
000048  f7fffffe          BL       app_tp_m_transfer_complate
00004c  2800              CMP      r0,#0                 ;482
00004e  d056              BEQ      |L19.254|
000050  2000              MOVS     r0,#0                 ;484
000052  492d              LDR      r1,|L19.264|
000054  7008              STRB     r0,[r1,#0]            ;484
000056  482e              LDR      r0,|L19.272|
000058  7800              LDRB     r0,[r0,#0]            ;485  ; s_spim_write
00005a  2800              CMP      r0,#0                 ;485
00005c  d004              BEQ      |L19.104|
00005e  f7fffffe          BL       hal_spi_m_clear_rxfifo
000062  2000              MOVS     r0,#0                 ;488
000064  492a              LDR      r1,|L19.272|
000066  7008              STRB     r0,[r1,#0]            ;488
                  |L19.104|
000068  482a              LDR      r0,|L19.276|
00006a  7800              LDRB     r0,[r0,#0]            ;492  ; screen_int_transfer_buffer_ready
00006c  2800              CMP      r0,#0                 ;492
00006e  d02d              BEQ      |L19.204|
000070  2000              MOVS     r0,#0                 ;494
000072  4928              LDR      r1,|L19.276|
000074  7008              STRB     r0,[r1,#0]            ;494
000076  2001              MOVS     r0,#1                 ;495
000078  4924              LDR      r1,|L19.268|
00007a  7008              STRB     r0,[r1,#0]            ;495
00007c  2000              MOVS     r0,#0                 ;496
00007e  4926              LDR      r1,|L19.280|
000080  7008              STRB     r0,[r1,#0]            ;496
000082  4926              LDR      r1,|L19.284|
000084  2308              MOVS     r3,#8                 ;498
000086  4a26              LDR      r2,|L19.288|
000088  6808              LDR      r0,[r1,#0]            ;498  ; screen_reg_int_data
00008a  2101              MOVS     r1,#1                 ;498
00008c  f7fffffe          BL       app_tp_m_read
000090  bf00              NOP                            ;499
                  |L19.146|
000092  f7fffffe          BL       hal_i2c_m_transfer_complate
000096  2800              CMP      r0,#0                 ;499
000098  d0fb              BEQ      |L19.146|
00009a  4821              LDR      r0,|L19.288|
00009c  79c0              LDRB     r0,[r0,#7]            ;500  ; s_screen_read_buffer
00009e  2800              CMP      r0,#0                 ;500
0000a0  dd2d              BLE      |L19.254|
0000a2  481f              LDR      r0,|L19.288|
0000a4  79c0              LDRB     r0,[r0,#7]            ;502  ; s_screen_read_buffer
0000a6  06c0              LSLS     r0,r0,#27             ;502
0000a8  0e00              LSRS     r0,r0,#24             ;502
0000aa  491b              LDR      r1,|L19.280|
0000ac  7008              STRB     r0,[r1,#0]            ;502
0000ae  491b              LDR      r1,|L19.284|
0000b0  6808              LDR      r0,[r1,#0]            ;503  ; screen_reg_int_data
0000b2  4919              LDR      r1,|L19.280|
0000b4  780b              LDRB     r3,[r1,#0]            ;503  ; len
0000b6  4a1a              LDR      r2,|L19.288|
0000b8  3208              ADDS     r2,r2,#8              ;503
0000ba  2101              MOVS     r1,#1                 ;503
0000bc  f7fffffe          BL       app_tp_m_read
0000c0  bf00              NOP                            ;504
                  |L19.194|
0000c2  f7fffffe          BL       hal_i2c_m_transfer_complate
0000c6  2800              CMP      r0,#0                 ;504
0000c8  d0fb              BEQ      |L19.194|
0000ca  e018              B        |L19.254|
                  |L19.204|
0000cc  2001              MOVS     r0,#1                 ;546
0000ce  4911              LDR      r1,|L19.276|
0000d0  7008              STRB     r0,[r1,#0]            ;546
0000d2  4811              LDR      r0,|L19.280|
0000d4  7802              LDRB     r2,[r0,#0]            ;548  ; len
0000d6  3208              ADDS     r2,r2,#8              ;548
0000d8  4911              LDR      r1,|L19.288|
0000da  4812              LDR      r0,|L19.292|
0000dc  7800              LDRB     r0,[r0,#0]            ;548  ; screen_int_transfer_count
0000de  f7fffffe          BL       app_tp_screen_analysis_int
0000e2  4910              LDR      r1,|L19.292|
0000e4  7008              STRB     r0,[r1,#0]            ;548
0000e6  4608              MOV      r0,r1                 ;554
0000e8  7800              LDRB     r0,[r0,#0]            ;554  ; screen_int_transfer_count
0000ea  490f              LDR      r1,|L19.296|
0000ec  7809              LDRB     r1,[r1,#0]            ;554  ; screen_reg_int_data_size
0000ee  4288              CMP      r0,r1                 ;554
0000f0  db05              BLT      |L19.254|
0000f2  2000              MOVS     r0,#0                 ;556
0000f4  490b              LDR      r1,|L19.292|
0000f6  7008              STRB     r0,[r1,#0]            ;556
0000f8  4904              LDR      r1,|L19.268|
0000fa  7008              STRB     r0,[r1,#0]            ;557
0000fc  e78a              B        |L19.20|
                  |L19.254|
0000fe  bf00              NOP      
000100  e788              B        |L19.20|
;;;563    
                          ENDP

000102  0000              DCW      0x0000
                  |L19.260|
                          DCD      s_screen_init_complate
                  |L19.264|
                          DCD      s_screen_int_flag
                  |L19.268|
                          DCD      s_screen_int_transfer_status
                  |L19.272|
                          DCD      s_spim_write
                  |L19.276|
                          DCD      screen_int_transfer_buffer_ready
                  |L19.280|
                          DCD      len
                  |L19.284|
                          DCD      screen_reg_int_data
                  |L19.288|
                          DCD      s_screen_read_buffer
                  |L19.292|
                          DCD      screen_int_transfer_count
                  |L19.296|
                          DCD      screen_reg_int_data_size

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

                  app_tp_transfer_screen_restart PROC
;;;435    
;;;436    void app_tp_transfer_screen_restart(void)
000000  b510              PUSH     {r4,lr}
;;;437    {
;;;438    	if(g_screen_tp_init_restart == true)
000002  480b              LDR      r0,|L20.48|
000004  7800              LDRB     r0,[r0,#0]  ; g_screen_tp_init_restart
000006  2801              CMP      r0,#1
000008  d111              BNE      |L20.46|
;;;439    	{
;;;440    		if(s_tp_restart_count < (65536/5))  // 65536*3 = 900ms  65536/5 = 60ms
00000a  480a              LDR      r0,|L20.52|
00000c  6800              LDR      r0,[r0,#0]  ; s_tp_restart_count
00000e  490a              LDR      r1,|L20.56|
000010  4288              CMP      r0,r1
000012  d205              BCS      |L20.32|
;;;441    		{
;;;442    	        s_tp_restart_count ++;
000014  4807              LDR      r0,|L20.52|
000016  6800              LDR      r0,[r0,#0]  ; s_tp_restart_count
000018  1c40              ADDS     r0,r0,#1
00001a  4906              LDR      r1,|L20.52|
00001c  6008              STR      r0,[r1,#0]  ; s_tp_restart_count
00001e  e006              B        |L20.46|
                  |L20.32|
;;;443    	    }else
;;;444    		{
;;;445    			s_tp_restart_count = 0;
000020  2000              MOVS     r0,#0
000022  4904              LDR      r1,|L20.52|
000024  6008              STR      r0,[r1,#0]  ; s_tp_restart_count
;;;446    	        g_screen_tp_init_restart = false;
000026  4902              LDR      r1,|L20.48|
000028  7008              STRB     r0,[r1,#0]
;;;447    	//		app_tp_transfer_screen_start();
;;;448    			ap_tp_st_touch_hardware_reset();
00002a  f7fffffe          BL       ap_tp_st_touch_hardware_reset
                  |L20.46|
;;;449    	    }
;;;450    	}
;;;451        
;;;452    }
00002e  bd10              POP      {r4,pc}
;;;453    
                          ENDP

                  |L20.48|
                          DCD      g_screen_tp_init_restart
                  |L20.52|
                          DCD      s_tp_restart_count
                  |L20.56|
                          DCD      0x00003333

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

                  app_tp_transfer_screen_start PROC
;;;427    **************************************************************************/
;;;428    void app_tp_transfer_screen_start(void)
000000  b510              PUSH     {r4,lr}
;;;429    {
;;;430        s_screen_init_complate = false;
000002  2000              MOVS     r0,#0
000004  4904              LDR      r1,|L21.24|
000006  7008              STRB     r0,[r1,#0]
;;;431        s_screen_const_transfer_count = 0;
000008  4904              LDR      r1,|L21.28|
00000a  7008              STRB     r0,[r1,#0]
;;;432        app_tp_screen_init();
00000c  f7fffffe          BL       app_tp_screen_init
;;;433        app_tp_transfer_screen_const();
000010  f7fffffe          BL       app_tp_transfer_screen_const
;;;434    }
000014  bd10              POP      {r4,pc}
;;;435    
                          ENDP

000016  0000              DCW      0x0000
                  |L21.24|
                          DCD      s_screen_init_complate
                  |L21.28|
                          DCD      s_screen_const_transfer_count

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

                  s_screen_read_buffer
                          %        250
                  s_phone_read_buffer
                          %        250

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

                  s_slave_txbuffer
                          DCD      0x00000000
                  s_slave_txbuffer_size
                          DCD      0x00000000
                  s_spim_write
000008  00                DCB      0x00
                  s_screen_int_flag
000009  00                DCB      0x00
                  s_phone_reset_flag
00000a  00                DCB      0x00
                  s_screen_int_transfer_status
00000b  00                DCB      0x00
                  s_screen_init_complate
00000c  01                DCB      0x01
                  s_screen_const_transfer_count
00000d  ff0000            DCB      0xff,0x00,0x00
                  s_tp_restart_count
                          DCD      0x00000000
                  i2cs_transfer
000014  01                DCB      0x01
                  screen_const_transfer_buffer_ready
000015  01                DCB      0x01
                  len
000016  00                DCB      0x00
                  screen_int_transfer_count
000017  00                DCB      0x00
                  screen_int_transfer_buffer_ready
000018  01                DCB      0x01

;*** Start embedded assembler ***

#line 1 "..\\..\\src\\app\\touch\\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 ***
