; 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\uvis25.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\uvis25.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\uvis25.crf ..\..\..\..\Platform\Drivers\sensor\UVIS25\uvis25.c]
                          THUMB

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

                  UVIS25_GetUXindex PROC
;;;129    
;;;130    static OSStatus UVIS25_GetUXindex(float *pfData) 
000000  b57c              PUSH     {r2-r6,lr}
;;;131    {
000002  4604              MOV      r4,r0
;;;132      OSStatus err = kNoErr;
000004  2500              MOVS     r5,#0
;;;133      uint8_t temp = 0x00;
000006  2000              MOVS     r0,#0
000008  9001              STR      r0,[sp,#4]
;;;134      uint8_t data = 0;
00000a  9000              STR      r0,[sp,#0]
;;;135      
;;;136      do{
00000c  bf00              NOP      
                  |L1.14|
;;;137        UVIS25_IO_Read(&temp, UVIS25_STATUS_REG, 1);
00000e  2201              MOVS     r2,#1
000010  2127              MOVS     r1,#0x27
000012  a801              ADD      r0,sp,#4
000014  f7fffffe          BL       UVIS25_IO_Read
;;;138      }while( temp != 0x01 );
000018  f89d0004          LDRB     r0,[sp,#4]
00001c  2801              CMP      r0,#1
00001e  d1f6              BNE      |L1.14|
;;;139      
;;;140      if((err = UVIS25_IO_Read(&data, UVIS25_UV_OUT_REG, 1)) != kNoErr){
000020  2201              MOVS     r2,#1
000022  2128              MOVS     r1,#0x28
000024  4668              MOV      r0,sp
000026  f7fffffe          BL       UVIS25_IO_Read
00002a  0005              MOVS     r5,r0
00002c  d001              BEQ      |L1.50|
;;;141        return err;
00002e  4628              MOV      r0,r5
                  |L1.48|
;;;142      }
;;;143      
;;;144      *pfData = (float)data/16;
;;;145      
;;;146      return err;
;;;147    }
000030  bd7c              POP      {r2-r6,pc}
                  |L1.50|
000032  f89d0000          LDRB     r0,[sp,#0]            ;144
000036  ee000a10          VMOV     s0,r0                 ;144
00003a  eeb80a40          VCVT.F32.U32 s0,s0                 ;144
00003e  eef30a00          VMOV.F32 s1,#16.00000000       ;144
000042  ee801a20          VDIV.F32 s2,s0,s1              ;144
000046  ed841a00          VSTR     s2,[r4,#0]            ;144
00004a  4628              MOV      r0,r5                 ;146
00004c  e7f0              B        |L1.48|
;;;148    
                          ENDP


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

                          REQUIRE _printf_pre_padding
                          REQUIRE _printf_percent
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_d
                          REQUIRE _printf_s
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_str
                  UVIS25_IO_Init PROC
;;;44     
;;;45     OSStatus UVIS25_IO_Init(void)
000000  b538              PUSH     {r3-r5,lr}
;;;46     {
;;;47       // I2C init
;;;48       MicoI2cFinalize(&uvis25_i2c_device);   // in case error
000002  481a              LDR      r0,|L2.108|
000004  f7fffffe          BL       MicoI2cFinalize
;;;49       MicoI2cInitialize(&uvis25_i2c_device);
000008  4818              LDR      r0,|L2.108|
00000a  f7fffffe          BL       MicoI2cInitialize
;;;50     
;;;51       if( false == MicoI2cProbeDevice(&uvis25_i2c_device, 5) ){
00000e  2105              MOVS     r1,#5
000010  4816              LDR      r0,|L2.108|
000012  f7fffffe          BL       MicoI2cProbeDevice
000016  2800              CMP      r0,#0
000018  d126              BNE      |L2.104|
;;;52         uvis25_log("UVI25S_ERROR: no i2c device found!");
00001a  bf00              NOP      
00001c  4814              LDR      r0,|L2.112|
00001e  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
000020  b900              CBNZ     r0,|L2.36|
000022  e01e              B        |L2.98|
                  |L2.36|
000024  4813              LDR      r0,|L2.116|
000026  f7fffffe          BL       mico_rtos_lock_mutex
00002a  215c              MOVS     r1,#0x5c
00002c  a012              ADR      r0,|L2.120|
00002e  f7fffffe          BL       strrchr
000032  b128              CBZ      r0,|L2.64|
000034  215c              MOVS     r1,#0x5c
000036  a010              ADR      r0,|L2.120|
000038  f7fffffe          BL       strrchr
00003c  1c40              ADDS     r0,r0,#1
00003e  e000              B        |L2.66|
                  |L2.64|
000040  a00d              ADR      r0,|L2.120|
                  |L2.66|
000042  4604              MOV      r4,r0
000044  f7fffffe          BL       mico_get_time
000048  4605              MOV      r5,r0
00004a  2034              MOVS     r0,#0x34
00004c  4623              MOV      r3,r4
00004e  a217              ADR      r2,|L2.172|
000050  4629              MOV      r1,r5
000052  9000              STR      r0,[sp,#0]
000054  a017              ADR      r0,|L2.180|
000056  f7fffffe          BL       __2printf
00005a  4806              LDR      r0,|L2.116|
00005c  f7fffffe          BL       mico_rtos_unlock_mutex
000060  bf00              NOP      
                  |L2.98|
000062  bf00              NOP      
;;;53         return kNotInitializedErr;
000064  4821              LDR      r0,|L2.236|
                  |L2.102|
;;;54       }
;;;55       return kNoErr;
;;;56     }
000066  bd38              POP      {r3-r5,pc}
                  |L2.104|
000068  2000              MOVS     r0,#0                 ;55
00006a  e7fc              B        |L2.102|
;;;57     
                          ENDP

                  |L2.108|
                          DCD      uvis25_i2c_device
                  |L2.112|
                          DCD      mico_debug_enabled
                  |L2.116|
                          DCD      stdio_tx_mutex
                  |L2.120|
000078  2e2e5c2e          DCB      "..\\..\\..\\..\\Platform\\Drivers\\sensor\\UVIS25\\uvis"
00007c  2e5c2e2e
000080  5c2e2e5c
000084  506c6174
000088  666f726d
00008c  5c447269
000090  76657273
000094  5c73656e
000098  736f725c
00009c  55564953
0000a0  32355c75
0000a4  766973  
0000a7  32352e63          DCB      "25.c",0
0000ab  00      
                  |L2.172|
0000ac  55564953          DCB      "UVIS25",0
0000b0  323500  
0000b3  00                DCB      0
                  |L2.180|
0000b4  5b25645d          DCB      "[%d][%s: %s:%4d] UVI25S_ERROR: no i2c device found!\r\n"
0000b8  5b25733a
0000bc  2025733a
0000c0  2534645d
0000c4  20555649
0000c8  3235535f
0000cc  4552524f
0000d0  523a206e
0000d4  6f206932
0000d8  63206465
0000dc  76696365
0000e0  20666f75
0000e4  6e64210d
0000e8  0a      
0000e9  00                DCB      0
0000ea  00                DCB      0
0000eb  00                DCB      0
                  |L2.236|
                          DCD      0xffffe5c2

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

                  UVIS25_IO_Read PROC
;;;93     */
;;;94     OSStatus UVIS25_IO_Read(uint8_t* pBuffer, uint8_t RegisterAddr, uint16_t NumByteToRead)
000000  b5f0              PUSH     {r4-r7,lr}
;;;95     {
000002  b089              SUB      sp,sp,#0x24
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4617              MOV      r7,r2
;;;96       mico_i2c_message_t uvis25_i2c_msg = {NULL, NULL, 0, 0, 0, false};
00000a  2000              MOVS     r0,#0
00000c  9005              STR      r0,[sp,#0x14]
00000e  9006              STR      r0,[sp,#0x18]
000010  9007              STR      r0,[sp,#0x1c]
000012  9008              STR      r0,[sp,#0x20]
;;;97       OSStatus iError = kNoErr;
000014  2600              MOVS     r6,#0
;;;98       uint8_t array[8] = {0};
000016  9003              STR      r0,[sp,#0xc]
000018  9004              STR      r0,[sp,#0x10]
;;;99       array[0] = RegisterAddr;
00001a  f88d500c          STRB     r5,[sp,#0xc]
;;;100      
;;;101      iError = MicoI2cBuildCombinedMessage(&uvis25_i2c_msg, array, pBuffer, 1, NumByteToRead, 3);
00001e  2003              MOVS     r0,#3
000020  2301              MOVS     r3,#1
000022  4622              MOV      r2,r4
000024  a903              ADD      r1,sp,#0xc
000026  e9cd7000          STRD     r7,r0,[sp,#0]
00002a  a805              ADD      r0,sp,#0x14
00002c  f7fffffe          BL       MicoI2cBuildCombinedMessage
000030  4606              MOV      r6,r0
;;;102      if(kNoErr != iError){
000032  b116              CBZ      r6,|L3.58|
;;;103        return kReadErr; 
000034  4806              LDR      r0,|L3.80|
                  |L3.54|
;;;104      }
;;;105      iError = MicoI2cTransfer(&uvis25_i2c_device, &uvis25_i2c_msg, 1);
;;;106      if(kNoErr != iError){
;;;107        return kReadErr;
;;;108      }
;;;109      return kNoErr;
;;;110    }
000036  b009              ADD      sp,sp,#0x24
000038  bdf0              POP      {r4-r7,pc}
                  |L3.58|
00003a  2201              MOVS     r2,#1                 ;105
00003c  a905              ADD      r1,sp,#0x14           ;105
00003e  4805              LDR      r0,|L3.84|
000040  f7fffffe          BL       MicoI2cTransfer
000044  4606              MOV      r6,r0                 ;105
000046  b10e              CBZ      r6,|L3.76|
000048  4801              LDR      r0,|L3.80|
00004a  e7f4              B        |L3.54|
                  |L3.76|
00004c  2000              MOVS     r0,#0                 ;109
00004e  e7f2              B        |L3.54|
;;;111    
                          ENDP

                  |L3.80|
                          DCD      0xffffe5a6
                  |L3.84|
                          DCD      uvis25_i2c_device

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

                  UVIS25_IO_Write PROC
;;;66     */
;;;67     OSStatus UVIS25_IO_Write(uint8_t* pBuffer, uint8_t RegisterAddr, uint16_t NumByteToWrite)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;68     {
000004  b086              SUB      sp,sp,#0x18
000006  4606              MOV      r6,r0
000008  460f              MOV      r7,r1
00000a  4615              MOV      r5,r2
;;;69       mico_i2c_message_t uvis25_i2c_msg = {NULL, NULL, 0, 0, 0, false};
00000c  2000              MOVS     r0,#0
00000e  9002              STR      r0,[sp,#8]
000010  9003              STR      r0,[sp,#0xc]
000012  9004              STR      r0,[sp,#0x10]
000014  9005              STR      r0,[sp,#0x14]
;;;70       OSStatus iError = kNoErr;
000016  4680              MOV      r8,r0
;;;71       uint8_t array[8];
;;;72       uint8_t stringpos;
;;;73       array[0] = RegisterAddr;
000018  f88d7000          STRB     r7,[sp,#0]
;;;74       for (stringpos = 0; stringpos < NumByteToWrite; stringpos++) {
00001c  2400              MOVS     r4,#0
00001e  e004              B        |L4.42|
                  |L4.32|
;;;75         array[stringpos + 1] = *(pBuffer + stringpos);
000020  5d31              LDRB     r1,[r6,r4]
000022  1c60              ADDS     r0,r4,#1
000024  f80d1000          STRB     r1,[sp,r0]
000028  b2c4              UXTB     r4,r0                 ;74
                  |L4.42|
00002a  42ac              CMP      r4,r5                 ;74
00002c  dbf8              BLT      |L4.32|
;;;76       }
;;;77       
;;;78       iError = MicoI2cBuildTxMessage(&uvis25_i2c_msg, array, NumByteToWrite + 1, 3);
00002e  1c68              ADDS     r0,r5,#1
000030  b282              UXTH     r2,r0
000032  2303              MOVS     r3,#3
000034  4669              MOV      r1,sp
000036  a802              ADD      r0,sp,#8
000038  f7fffffe          BL       MicoI2cBuildTxMessage
00003c  4680              MOV      r8,r0
;;;79       iError = MicoI2cTransfer(&uvis25_i2c_device, &uvis25_i2c_msg, 1);
00003e  2201              MOVS     r2,#1
000040  a902              ADD      r1,sp,#8
000042  4806              LDR      r0,|L4.92|
000044  f7fffffe          BL       MicoI2cTransfer
000048  4680              MOV      r8,r0
;;;80       if(kNoErr != iError){
00004a  f1b80f00          CMP      r8,#0
00004e  d001              BEQ      |L4.84|
;;;81         iError = kWriteErr;
000050  f8df800c          LDR      r8,|L4.96|
                  |L4.84|
;;;82       }
;;;83       
;;;84       return kNoErr;
000054  2000              MOVS     r0,#0
;;;85     }
000056  b006              ADD      sp,sp,#0x18
000058  e8bd81f0          POP      {r4-r8,pc}
;;;86     
                          ENDP

                  |L4.92|
                          DCD      uvis25_i2c_device
                  |L4.96|
                          DCD      0xffffe5a5

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

                  UVIS25_Init PROC
;;;112    
;;;113    static OSStatus UVIS25_Init(void)
000000  b538              PUSH     {r3-r5,lr}
;;;114    {
;;;115      OSStatus err = kNoErr;
000002  2400              MOVS     r4,#0
;;;116      uint8_t temp = 0x03;
000004  2003              MOVS     r0,#3
000006  9000              STR      r0,[sp,#0]
;;;117      
;;;118      if((err = UVIS25_IO_Init()) != kNoErr){
000008  f7fffffe          BL       UVIS25_IO_Init
00000c  0004              MOVS     r4,r0
00000e  d001              BEQ      |L5.20|
;;;119        return err;
000010  4620              MOV      r0,r4
                  |L5.18|
;;;120      }
;;;121      
;;;122      if((err = UVIS25_IO_Write(&temp, UVIS25_CTRL_REG1, 1)) != kNoErr){
;;;123        return err;
;;;124      }
;;;125      
;;;126      return err;
;;;127    }
000012  bd38              POP      {r3-r5,pc}
                  |L5.20|
000014  2201              MOVS     r2,#1                 ;122
000016  2120              MOVS     r1,#0x20              ;122
000018  4668              MOV      r0,sp                 ;122
00001a  f7fffffe          BL       UVIS25_IO_Write
00001e  0004              MOVS     r4,r0                 ;122
000020  d001              BEQ      |L5.38|
000022  4620              MOV      r0,r4                 ;123
000024  e7f5              B        |L5.18|
                  |L5.38|
000026  4620              MOV      r0,r4                 ;126
000028  e7f3              B        |L5.18|
;;;128    
                          ENDP


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

                  uvis25_Read_Data PROC
;;;153    
;;;154    OSStatus uvis25_Read_Data(float *uv_index)
000000  b510              PUSH     {r4,lr}
;;;155    {
000002  4604              MOV      r4,r0
;;;156      return UVIS25_GetUXindex(uv_index);
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       UVIS25_GetUXindex
;;;157    }
00000a  bd10              POP      {r4,pc}
;;;158    
                          ENDP


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

                  uvis25_sensor_deinit PROC
;;;158    
;;;159    OSStatus uvis25_sensor_deinit(void)
000000  b510              PUSH     {r4,lr}
;;;160    {
;;;161      return MicoI2cFinalize(&uvis25_i2c_device);
000002  4802              LDR      r0,|L7.12|
000004  f7fffffe          BL       MicoI2cFinalize
;;;162    }
000008  bd10              POP      {r4,pc}
;;;163    
                          ENDP

00000a  0000              DCW      0x0000
                  |L7.12|
                          DCD      uvis25_i2c_device

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

                  uvis25_sensor_init PROC
;;;148    
;;;149    OSStatus uvis25_sensor_init(void)
000000  b510              PUSH     {r4,lr}
;;;150    { 
;;;151      return UVIS25_Init();
000002  f7fffffe          BL       UVIS25_Init
;;;152    }
000006  bd10              POP      {r4,pc}
;;;153    
                          ENDP


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

                  uvis25_i2c_device
000000  0200              DCB      0x02,0x00
000002  0047              DCW      0x0047
000004  0001              DCB      0x00,0x01

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\Drivers\\sensor\\UVIS25\\uvis25.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___8_uvis25_c_698813fa____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___8_uvis25_c_698813fa____REV16| PROC
#line 115

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
