; 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\bootloader\mico-fire_f429\obj_rvmdk\button.o --asm_dir=..\..\..\..\Build\Bootloader\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\Bootloader\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\bootloader\mico-fire_f429\obj_rvmdk\button.d --cpu=Cortex-M4.fp --apcs=interwork --diag_suppress=9931,1,1293 -I..\..\..\..\Bootloader -I..\..\..\..\Board\fire_F429 -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 -IG:\GIT_OSC\F429_OV2640_MICO_SDRAM\Projects\STM32F429\bootloader\RVMDK\RTE -ID:\work\keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -ID:\work\keil5\ARM\CMSIS\Include -ID:\work\keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__MICROLIB -D__UVISION_VERSION=516 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DBOOTLOADER -DNO_MICO_RTOS -DHSE_VALUE=25000000 --omf_browse=..\..\..\..\build\bootloader\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  e92d41f0          PUSH     {r4-r8,lr}
;;;86     {
000004  b2cf              UXTB     r7,r1
000006  4605              MOV      r5,r0
;;;87       context[index].gpio = init.gpio;
000008  4910              LDR      r1,|L1.76|
00000a  9806              LDR      r0,[sp,#0x18]
00000c  eb011445          ADD      r4,r1,r5,LSL #5
;;;88       context[index].start_time = 0;
000010  2100              MOVS     r1,#0
000012  7027              STRB     r7,[r4,#0]            ;87
;;;89       context[index].timeout = init.long_pressed_timeout;
;;;90       context[index].pressed_func = init.pressed_func;
000014  6163              STR      r3,[r4,#0x14]
000016  6062              STR      r2,[r4,#4]
000018  e9c40106          STRD     r0,r1,[r4,#0x18]
00001c  4616              MOV      r6,r2                 ;86
00001e  4638              MOV      r0,r7
;;;91       context[index].long_pressed_func = init.long_pressed_func;
;;;92     
;;;93       MicoGpioInitialize( init.gpio, INPUT_PULL_UP );
000020  f7fffffe          BL       MicoGpioInitialize
;;;94       mico_init_timer( &context[index]._user_button_timer, init.long_pressed_timeout, button_timeout_handler_array[index], &context[index] );
000024  480a              LDR      r0,|L1.80|
000026  4623              MOV      r3,r4
000028  4631              MOV      r1,r6
00002a  f8502025          LDR      r2,[r0,r5,LSL #2]
00002e  f1040008          ADD      r0,r4,#8
000032  f7fffffe          BL       mico_init_timer
;;;95       MicoGpioEnableIRQ( init.gpio, IRQ_TRIGGER_FALLING_EDGE, button_irq_handler_array[index], &context[index] );
000036  4806              LDR      r0,|L1.80|
000038  4623              MOV      r3,r4                 ;94
00003a  3814              SUBS     r0,r0,#0x14
00003c  2102              MOVS     r1,#2
00003e  f8502025          LDR      r2,[r0,r5,LSL #2]
000042  4638              MOV      r0,r7
000044  e8bd41f0          POP      {r4-r8,lr}
000048  f7ffbffe          B.W      MicoGpioEnableIRQ
;;;96     }
;;;97     
                          ENDP

                  |L1.76|
                          DCD      ||.bss||
                  |L1.80|
                          DCD      ||.data||+0x14

                          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  4604              MOV      r4,r0
;;;48       button_context_t *_context = arg;
;;;49     
;;;50       int interval = -1;
;;;51       
;;;52       if ( MicoGpioInputGet( _context->gpio ) == 0 ) {
000004  7800              LDRB     r0,[r0,#0]
000006  f7fffffe          BL       mico_gpio_input_get
;;;53         MicoGpioEnableIRQ( _context->gpio, IRQ_TRIGGER_RISING_EDGE, button_irq_handler, _context );
;;;54         _context->start_time = mico_get_time()+1;
;;;55         mico_start_timer(&_context->_user_button_timer);
00000a  f1040508          ADD      r5,r4,#8
00000e  b1c8              CBZ      r0,|L2.68|
;;;56       } else {
;;;57         interval = mico_get_time() + 1 - _context->start_time ;
000010  f7fffffe          BL       mico_get_time
000014  69e1              LDR      r1,[r4,#0x1c]
000016  1a40              SUBS     r0,r0,r1
000018  1c40              ADDS     r0,r0,#1
;;;58         if ( (_context->start_time  != 0) && interval > 50 && interval < _context->timeout){
00001a  b139              CBZ      r1,|L2.44|
00001c  2832              CMP      r0,#0x32
00001e  dd05              BLE      |L2.44|
000020  6861              LDR      r1,[r4,#4]
000022  4281              CMP      r1,r0
000024  dd02              BLE      |L2.44|
;;;59           /* button clicked once */
;;;60           if( _context->pressed_func != NULL )
000026  6960              LDR      r0,[r4,#0x14]
000028  b100              CBZ      r0,|L2.44|
;;;61             (_context->pressed_func)();
00002a  4780              BLX      r0
                  |L2.44|
;;;62         }
;;;63         MicoGpioEnableIRQ( _context->gpio, IRQ_TRIGGER_FALLING_EDGE, button_irq_handler, _context );
00002c  7820              LDRB     r0,[r4,#0]
00002e  4623              MOV      r3,r4
000030  4a0b              LDR      r2,|L2.96|
000032  2102              MOVS     r1,#2
000034  f7fffffe          BL       MicoGpioEnableIRQ
000038  4628              MOV      r0,r5
;;;64         mico_stop_timer(&_context->_user_button_timer);
00003a  f7fffffe          BL       mico_stop_timer
;;;65         _context->start_time  = 0;
00003e  2000              MOVS     r0,#0
000040  61e0              STR      r0,[r4,#0x1c]
;;;66       }
;;;67     }
000042  bd70              POP      {r4-r6,pc}
                  |L2.68|
000044  7820              LDRB     r0,[r4,#0]            ;53
000046  4623              MOV      r3,r4                 ;53
000048  4a05              LDR      r2,|L2.96|
00004a  2101              MOVS     r1,#1                 ;53
00004c  f7fffffe          BL       MicoGpioEnableIRQ
000050  f7fffffe          BL       mico_get_time
000054  1c40              ADDS     r0,r0,#1              ;54
000056  61e0              STR      r0,[r4,#0x1c]         ;54
000058  4628              MOV      r0,r5                 ;54
00005a  f7fffffe          BL       mico_start_timer
00005e  bd70              POP      {r4-r6,pc}
;;;68     
                          ENDP

                  |L2.96|
                          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  2100              MOVS     r1,#0
;;;73     {
;;;74       button_context_t *_context = arg;
;;;75     
;;;76       _context->start_time = 0;
;;;77       if( _context->long_pressed_func != NULL )
000002  61c1              STR      r1,[r0,#0x1c]
000004  6980              LDR      r0,[r0,#0x18]
000006  2800              CMP      r0,#0                 ;73
000008  d000              BEQ      |L3.12|
;;;78         (_context->long_pressed_func)();
00000a  4700              BX       r0
                  |L3.12|
;;;79     }
00000c  4770              BX       lr
;;;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 ***
