; generated by Component: ARM Compiler 5.05 update 2 (build 169) Tool: ArmCC [4d0f38]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\button.o --asm_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\button.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --diag_suppress=9931,1,1293 -I..\..\..\..\Board\fire_F429 -I..\..\..\..\Demos\fire\ov2640 -I..\..\..\..\include -I..\..\..\..\libraries\utilities -I..\..\..\..\libraries\utilities\json_c -I..\..\..\..\MICO\core -I..\..\..\..\MICO\security -I..\..\..\..\MICO\system -I..\..\..\..\MICO\system\command_console -I..\..\..\..\Platform\include -I..\..\..\..\Platform\Cortex-M4 -I..\..\..\..\Platform\Cortex-M4\CMSIS -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries -I..\..\..\..\Platform\MCU\STM32F4xx\wlan_bus_driver -I..\..\..\..\Platform\Drivers\spi_flash -I..\..\..\..\Platform\Drivers -I..\..\..\..\libraries\daemons\homekit_server -I..\..\..\..\libraries\daemons\http_server -I..\..\..\..\Platform\Drivers\malloc -I..\..\..\..\Platform\Drivers\SDRAM -I..\..\..\..\Platform\Drivers\ov5640 -IG:\GIT_OSC\STM32_develop\F429-V2\develop\6-WIFI\STM32-WiFi\3.wifi_ov5640\Projects\STM32F429\demo\RVMDK\RTE -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -IC:\Keil_v5\ARM\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__UVISION_VERSION=515 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DDEBUG -DHSE_VALUE=25000000 -DOV5640 --omf_browse=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\button.crf ..\..\..\..\Platform\Drivers\keypad\gpio_button\button.c]
                          THUMB

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

                  button_init PROC
;;;84     
;;;85     void button_init( int index, button_init_t init)
000000  b40f              PUSH     {r0-r3}
;;;86     {
000002  b570              PUSH     {r4-r6,lr}
000004  4604              MOV      r4,r0
;;;87       context[index].gpio = init.gpio;
000006  f89d0014          LDRB     r0,[sp,#0x14]
00000a  491c              LDR      r1,|L1.124|
00000c  eb011144          ADD      r1,r1,r4,LSL #5
000010  7008              STRB     r0,[r1,#0]
;;;88       context[index].start_time = 0;
000012  2000              MOVS     r0,#0
000014  4919              LDR      r1,|L1.124|
000016  eb011144          ADD      r1,r1,r4,LSL #5
00001a  61c8              STR      r0,[r1,#0x1c]
;;;89       context[index].timeout = init.long_pressed_timeout;
00001c  4917              LDR      r1,|L1.124|
00001e  eb011144          ADD      r1,r1,r4,LSL #5
000022  9806              LDR      r0,[sp,#0x18]
000024  6048              STR      r0,[r1,#4]
;;;90       context[index].pressed_func = init.pressed_func;
000026  4915              LDR      r1,|L1.124|
000028  eb011144          ADD      r1,r1,r4,LSL #5
00002c  9807              LDR      r0,[sp,#0x1c]
00002e  6148              STR      r0,[r1,#0x14]
;;;91       context[index].long_pressed_func = init.long_pressed_func;
000030  4912              LDR      r1,|L1.124|
000032  eb011144          ADD      r1,r1,r4,LSL #5
000036  9808              LDR      r0,[sp,#0x20]
000038  6188              STR      r0,[r1,#0x18]
;;;92     
;;;93       MicoGpioInitialize( init.gpio, INPUT_PULL_UP );
00003a  f89d0014          LDRB     r0,[sp,#0x14]
00003e  2100              MOVS     r1,#0
000040  f7fffffe          BL       MicoGpioInitialize
;;;94       mico_init_timer( &context[index]._user_button_timer, init.long_pressed_timeout, button_timeout_handler_array[index], &context[index] );
000044  4d0d              LDR      r5,|L1.124|
000046  eb051344          ADD      r3,r5,r4,LSL #5
00004a  4d0d              LDR      r5,|L1.128|
00004c  f8552024          LDR      r2,[r5,r4,LSL #2]
000050  4d0a              LDR      r5,|L1.124|
000052  eb051544          ADD      r5,r5,r4,LSL #5
000056  f1050008          ADD      r0,r5,#8
00005a  9906              LDR      r1,[sp,#0x18]
00005c  f7fffffe          BL       mico_init_timer
;;;95       MicoGpioEnableIRQ( init.gpio, IRQ_TRIGGER_FALLING_EDGE, button_irq_handler_array[index], &context[index] );
000060  4906              LDR      r1,|L1.124|
000062  eb011344          ADD      r3,r1,r4,LSL #5
000066  4907              LDR      r1,|L1.132|
000068  f8512024          LDR      r2,[r1,r4,LSL #2]
00006c  f89d0014          LDRB     r0,[sp,#0x14]
000070  2102              MOVS     r1,#2
000072  f7fffffe          BL       MicoGpioEnableIRQ
;;;96     }
000076  bc70              POP      {r4-r6}
000078  f85dfb14          LDR      pc,[sp],#0x14
;;;97     
                          ENDP

                  |L1.124|
                          DCD      context
                  |L1.128|
                          DCD      button_timeout_handler_array
                  |L1.132|
                          DCD      button_irq_handler_array

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

                  button_irq_handler PROC
;;;45     
;;;46     static void button_irq_handler( void* arg )
000000  b570              PUSH     {r4-r6,lr}
;;;47     {
000002  4605              MOV      r5,r0
;;;48       button_context_t *_context = arg;
000004  462c              MOV      r4,r5
;;;49     
;;;50       int interval = -1;
000006  f04f36ff          MOV      r6,#0xffffffff
;;;51       
;;;52       if ( MicoGpioInputGet( _context->gpio ) == 0 ) {
00000a  7820              LDRB     r0,[r4,#0]
00000c  f7fffffe          BL       mico_gpio_input_get
000010  b970              CBNZ     r0,|L2.48|
;;;53         MicoGpioEnableIRQ( _context->gpio, IRQ_TRIGGER_RISING_EDGE, button_irq_handler, _context );
000012  7820              LDRB     r0,[r4,#0]
000014  4623              MOV      r3,r4
000016  4a15              LDR      r2,|L2.108|
000018  2101              MOVS     r1,#1
00001a  f7fffffe          BL       MicoGpioEnableIRQ
;;;54         _context->start_time = mico_get_time()+1;
00001e  f7fffffe          BL       mico_get_time
000022  1c40              ADDS     r0,r0,#1
000024  61e0              STR      r0,[r4,#0x1c]
;;;55         mico_start_timer(&_context->_user_button_timer);
000026  f1040008          ADD      r0,r4,#8
00002a  f7fffffe          BL       mico_start_timer
00002e  e01b              B        |L2.104|
                  |L2.48|
;;;56       } else {
;;;57         interval = mico_get_time() + 1 - _context->start_time ;
000030  f7fffffe          BL       mico_get_time
000034  1c40              ADDS     r0,r0,#1
000036  69e1              LDR      r1,[r4,#0x1c]
000038  1a46              SUBS     r6,r0,r1
;;;58         if ( (_context->start_time  != 0) && interval > 50 && interval < _context->timeout){
00003a  69e0              LDR      r0,[r4,#0x1c]
00003c  b140              CBZ      r0,|L2.80|
00003e  2e32              CMP      r6,#0x32
000040  dd06              BLE      |L2.80|
000042  6860              LDR      r0,[r4,#4]
000044  42b0              CMP      r0,r6
000046  dd03              BLE      |L2.80|
;;;59           /* button clicked once */
;;;60           if( _context->pressed_func != NULL )
000048  6960              LDR      r0,[r4,#0x14]
00004a  b108              CBZ      r0,|L2.80|
;;;61             (_context->pressed_func)();
00004c  6960              LDR      r0,[r4,#0x14]
00004e  4780              BLX      r0
                  |L2.80|
;;;62         }
;;;63         MicoGpioEnableIRQ( _context->gpio, IRQ_TRIGGER_FALLING_EDGE, button_irq_handler, _context );
000050  7820              LDRB     r0,[r4,#0]
000052  4623              MOV      r3,r4
000054  4a05              LDR      r2,|L2.108|
000056  2102              MOVS     r1,#2
000058  f7fffffe          BL       MicoGpioEnableIRQ
;;;64         mico_stop_timer(&_context->_user_button_timer);
00005c  f1040008          ADD      r0,r4,#8
000060  f7fffffe          BL       mico_stop_timer
;;;65         _context->start_time  = 0;
000064  2000              MOVS     r0,#0
000066  61e0              STR      r0,[r4,#0x1c]
                  |L2.104|
;;;66       }
;;;67     }
000068  bd70              POP      {r4-r6,pc}
;;;68     
                          ENDP

00006a  0000              DCW      0x0000
                  |L2.108|
                          DCD      button_irq_handler

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

                  button_timeout_handler PROC
;;;71     
;;;72     static void button_timeout_handler( void* arg )
000000  b570              PUSH     {r4-r6,lr}
;;;73     {
000002  4604              MOV      r4,r0
;;;74       button_context_t *_context = arg;
000004  4625              MOV      r5,r4
;;;75     
;;;76       _context->start_time = 0;
000006  2000              MOVS     r0,#0
000008  61e8              STR      r0,[r5,#0x1c]
;;;77       if( _context->long_pressed_func != NULL )
00000a  69a8              LDR      r0,[r5,#0x18]
00000c  b108              CBZ      r0,|L3.18|
;;;78         (_context->long_pressed_func)();
00000e  69a8              LDR      r0,[r5,#0x18]
000010  4780              BLX      r0
                  |L3.18|
;;;79     }
000012  bd70              POP      {r4-r6,pc}
;;;80     
                          ENDP


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

                  context
                          %        160

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

                  button_irq_handler_array
                          DCD      button_irq_handler
                          DCD      button_irq_handler
                          DCD      button_irq_handler
                          DCD      button_irq_handler
                          DCD      button_irq_handler
                  button_timeout_handler_array
                          DCD      button_timeout_handler
                          DCD      button_timeout_handler
                          DCD      button_timeout_handler
                          DCD      button_timeout_handler
                          DCD      button_timeout_handler

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\Drivers\\keypad\\gpio_button\\button.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___8_button_c_0653fdfd____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___8_button_c_0653fdfd____REV16| PROC
#line 115

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___8_button_c_0653fdfd____REVSH|
#line 128
|__asm___8_button_c_0653fdfd____REVSH| PROC
#line 129

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
