; 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\rgb_led.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\rgb_led.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\rgb_led.crf ..\..\..\..\Platform\Drivers\rgb_led\P9813\rgb_led.c]
                          THUMB

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

                  P9813_PIN_write_data PROC
;;;57     
;;;58     static void P9813_PIN_write_data(uint8_t blue, uint8_t green, uint8_t red)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;59     {
000004  4605              MOV      r5,r0
000006  460e              MOV      r6,r1
000008  4617              MOV      r7,r2
;;;60       uint8_t check_byte = 0xC0;  // starting flag "11"
00000a  24c0              MOVS     r4,#0xc0
;;;61       uint32_t send_data = 0;
00000c  f04f0800          MOV      r8,#0
;;;62       
;;;63       // calc check data
;;;64       check_byte |= (((~blue) >> 2) & 0x30);  // B7, B6
000010  43e8              MVNS     r0,r5
000012  2130              MOVS     r1,#0x30
000014  ea0100a0          AND      r0,r1,r0,ASR #2
000018  4304              ORRS     r4,r4,r0
;;;65       check_byte |= (((~green) >> 4) & 0x0C);  // G7,G6
00001a  43f0              MVNS     r0,r6
00001c  210c              MOVS     r1,#0xc
00001e  ea011020          AND      r0,r1,r0,ASR #4
000022  4304              ORRS     r4,r4,r0
;;;66       check_byte |= (((~red) >> 6) & 0x03);   // R7,R6
000024  43f8              MVNS     r0,r7
000026  f3c01081          UBFX     r0,r0,#6,#2
00002a  4304              ORRS     r4,r4,r0
;;;67       
;;;68       // create send data 32bit
;;;69       send_data |= (check_byte << 24) | (blue << 16) | (green << 8) | (red);
00002c  0620              LSLS     r0,r4,#24
00002e  ea404005          ORR      r0,r0,r5,LSL #16
000032  ea402006          ORR      r0,r0,r6,LSL #8
000036  4338              ORRS     r0,r0,r7
000038  ea400808          ORR      r8,r0,r8
;;;70       
;;;71       //send_data = 0xFC0000FF;
;;;72       //rgb_led_log("P9813_PIN_write_data: %X", send_data);
;;;73       P9813_PIN_write_frame(send_data);
00003c  4640              MOV      r0,r8
00003e  f7fffffe          BL       P9813_PIN_write_frame
;;;74     }
000042  e8bd81f0          POP      {r4-r8,pc}
;;;75      
                          ENDP


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

                  P9813_PIN_write_frame PROC
;;;28     /* use gpio */
;;;29     static void P9813_PIN_write_frame(uint32_t data)
000000  b570              PUSH     {r4-r6,lr}
;;;30     { 
000002  4604              MOV      r4,r0
;;;31       uint8_t i;        
;;;32       uint32_t f_data = data;
000004  4625              MOV      r5,r4
;;;33       //rgb_led_log("P9813_PIN_write_frame = %X", f_data);
;;;34       
;;;35       for(i=0; i<32; i++){
000006  2600              MOVS     r6,#0
000008  e012              B        |L2.48|
                  |L2.10|
;;;36         P9813_PIN_CIN_Clr();
00000a  200d              MOVS     r0,#0xd
00000c  f7fffffe          BL       MicoGpioOutputLow
;;;37         if(f_data & 0x80000000){
000010  f0054000          AND      r0,r5,#0x80000000
000014  b118              CBZ      r0,|L2.30|
;;;38           P9813_PIN_DIN_Set();
000016  200d              MOVS     r0,#0xd
000018  f7fffffe          BL       MicoGpioOutputHigh
00001c  e002              B        |L2.36|
                  |L2.30|
;;;39         }
;;;40         else{
;;;41           P9813_PIN_DIN_Clr();
00001e  200d              MOVS     r0,#0xd
000020  f7fffffe          BL       MicoGpioOutputLow
                  |L2.36|
;;;42         }
;;;43         P9813_PIN_CIN_Set();  // raise edge to set data
000024  200d              MOVS     r0,#0xd
000026  f7fffffe          BL       MicoGpioOutputHigh
;;;44         f_data = f_data << 1;
00002a  006d              LSLS     r5,r5,#1
00002c  1c70              ADDS     r0,r6,#1              ;35
00002e  b2c6              UXTB     r6,r0                 ;35
                  |L2.48|
000030  2e20              CMP      r6,#0x20              ;35
000032  dbea              BLT      |L2.10|
;;;45         //rgb_led_log("frame_data<<1 =%x", f_data);
;;;46       } 
;;;47       
;;;48       //P9813_PIN_CIN_Clr();
;;;49       //P9813_PIN_DIN_Clr();
;;;50     }
000034  bd70              POP      {r4-r6,pc}
;;;51     
                          ENDP


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

                  P9813_PIN_write_start_frame PROC
;;;51     
;;;52     static void P9813_PIN_write_start_frame(void)
000000  b510              PUSH     {r4,lr}
;;;53     { 
;;;54       uint32_t start_frame = 0x00000000;
000002  2400              MOVS     r4,#0
;;;55       P9813_PIN_write_frame(start_frame);     
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       P9813_PIN_write_frame
;;;56     }
00000a  bd10              POP      {r4,pc}
;;;57     
                          ENDP


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

                  rgb_led_close PROC
;;;90     
;;;91     void rgb_led_close(void)
000000  b510              PUSH     {r4,lr}
;;;92     {
;;;93       rgb_led_init();
000002  f7fffffe          BL       rgb_led_init
;;;94       rgb_led_open(0, 0, 0);
000006  2200              MOVS     r2,#0
000008  4611              MOV      r1,r2
00000a  4610              MOV      r0,r2
00000c  f7fffffe          BL       rgb_led_open
;;;95     }
000010  bd10              POP      {r4,pc}
                          ENDP


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

                  rgb_led_init PROC
;;;77     
;;;78     void rgb_led_init(void)
000000  b510              PUSH     {r4,lr}
;;;79     {
;;;80       MicoGpioInitialize( (mico_gpio_t)P9813_PIN_CIN, OUTPUT_PUSH_PULL );
000002  2103              MOVS     r1,#3
000004  200d              MOVS     r0,#0xd
000006  f7fffffe          BL       MicoGpioInitialize
;;;81       MicoGpioInitialize( (mico_gpio_t)P9813_PIN_DIN, OUTPUT_PUSH_PULL );
00000a  2103              MOVS     r1,#3
00000c  200d              MOVS     r0,#0xd
00000e  f7fffffe          BL       MicoGpioInitialize
;;;82     }
000012  bd10              POP      {r4,pc}
;;;83     
                          ENDP


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

                  rgb_led_open PROC
;;;83     
;;;84     void rgb_led_open(uint8_t red, uint8_t green, uint8_t blue)
000000  b570              PUSH     {r4-r6,lr}
;;;85     {
000002  4604              MOV      r4,r0
000004  460e              MOV      r6,r1
000006  4615              MOV      r5,r2
;;;86       P9813_PIN_write_start_frame();
000008  f7fffffe          BL       P9813_PIN_write_start_frame
;;;87       P9813_PIN_write_data(blue, green, red);
00000c  4622              MOV      r2,r4
00000e  4631              MOV      r1,r6
000010  4628              MOV      r0,r5
000012  f7fffffe          BL       P9813_PIN_write_data
;;;88       P9813_PIN_write_start_frame();  // fix led bink bug
000016  f7fffffe          BL       P9813_PIN_write_start_frame
;;;89     }
00001a  bd70              POP      {r4-r6,pc}
;;;90     
                          ENDP


;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\Drivers\\rgb_led\\P9813\\rgb_led.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___9_rgb_led_c_226ef8dd____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___9_rgb_led_c_226ef8dd____REV16| PROC
#line 115

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
