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

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

                  BME280_I2C_bus_read PROC
;;;357     */
;;;358    s8 BME280_I2C_bus_read(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;359    {
000004  b088              SUB      sp,sp,#0x20
000006  4680              MOV      r8,r0
000008  460d              MOV      r5,r1
00000a  4617              MOV      r7,r2
00000c  461e              MOV      r6,r3
;;;360            mico_i2c_message_t user_i2c_msg = {NULL, NULL, 0, 0, 0, false};
00000e  2000              MOVS     r0,#0
000010  9004              STR      r0,[sp,#0x10]
000012  9005              STR      r0,[sp,#0x14]
000014  9006              STR      r0,[sp,#0x18]
000016  9007              STR      r0,[sp,#0x1c]
;;;361        
;;;362    	s32 iError = BME280_INIT_VALUE;
000018  2400              MOVS     r4,#0
;;;363    	u8 array[I2C_BUFFER_LEN] = {BME280_INIT_VALUE};
00001a  9002              STR      r0,[sp,#8]
00001c  9003              STR      r0,[sp,#0xc]
;;;364    	//u8 stringpos = BME280_INIT_VALUE;
;;;365    	array[BME280_INIT_VALUE] = reg_addr;
00001e  f88d5008          STRB     r5,[sp,#8]
;;;366    	/* Please take the below function as your reference
;;;367    	 * for read the data using I2C communication
;;;368    	 * add your I2C rad function here.
;;;369    	 * "IBME280_ERROR = I2C_WRITE_READ_STRING(DEV_ADDR, ARRAY, ARRAY, 1, CNT)"
;;;370    	 * iError is an return value of SPI write function
;;;371    	 * Please select your valid return value
;;;372         * In the driver BME280_SUCCESS defined as 0
;;;373         * and FAILURE defined as -1
;;;374    	 */
;;;375            //iError = MicoI2cBuildRxMessage(&user_i2c_msg, array, cnt + 1, 3);
;;;376            iError = MicoI2cBuildCombinedMessage(&user_i2c_msg, array, reg_data, 1, cnt, 3);
000022  2003              MOVS     r0,#3
000024  2301              MOVS     r3,#1
000026  463a              MOV      r2,r7
000028  a902              ADD      r1,sp,#8
00002a  e9cd6000          STRD     r6,r0,[sp,#0]
00002e  a804              ADD      r0,sp,#0x10
000030  f7fffffe          BL       MicoI2cBuildCombinedMessage
000034  4604              MOV      r4,r0
;;;377             if(0 != iError){
000036  b11c              CBZ      r4,|L1.64|
;;;378              return (s8)iError; 
000038  b260              SXTB     r0,r4
                  |L1.58|
;;;379            }
;;;380            iError = MicoI2cTransfer(&user_i2c_device, &user_i2c_msg, 1);
;;;381            if(0 != iError){
;;;382              return (s8)iError;
;;;383            }
;;;384            
;;;385    	//for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
;;;386    	//	*(reg_data + stringpos) = array[stringpos];
;;;387    	//}
;;;388    	return (s8)iError;
;;;389    }
00003a  b008              ADD      sp,sp,#0x20
00003c  e8bd81f0          POP      {r4-r8,pc}
                  |L1.64|
000040  2201              MOVS     r2,#1                 ;380
000042  a904              ADD      r1,sp,#0x10           ;380
000044  4804              LDR      r0,|L1.88|
000046  f7fffffe          BL       MicoI2cTransfer
00004a  4604              MOV      r4,r0                 ;380
00004c  b10c              CBZ      r4,|L1.82|
00004e  b260              SXTB     r0,r4                 ;382
000050  e7f3              B        |L1.58|
                  |L1.82|
000052  b260              SXTB     r0,r4                 ;388
000054  e7f1              B        |L1.58|
;;;390    
                          ENDP

000056  0000              DCW      0x0000
                  |L1.88|
                          DCD      user_i2c_device

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

                  BME280_I2C_bus_write PROC
;;;316     */
;;;317    s8 BME280_I2C_bus_write(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt)
000000  e92d43f0          PUSH     {r4-r9,lr}
;;;318    {
000004  b087              SUB      sp,sp,#0x1c
000006  4681              MOV      r9,r0
000008  460e              MOV      r6,r1
00000a  4617              MOV      r7,r2
00000c  461d              MOV      r5,r3
;;;319            mico_i2c_message_t user_i2c_msg = {NULL, NULL, 0, 0, 0, false};
00000e  2000              MOVS     r0,#0
000010  9003              STR      r0,[sp,#0xc]
000012  9004              STR      r0,[sp,#0x10]
000014  9005              STR      r0,[sp,#0x14]
000016  9006              STR      r0,[sp,#0x18]
;;;320      
;;;321    	s32 iError = BME280_INIT_VALUE;
000018  4680              MOV      r8,r0
;;;322    	u8 array[I2C_BUFFER_LEN];
;;;323    	u8 stringpos = BME280_INIT_VALUE;
00001a  2400              MOVS     r4,#0
;;;324    	array[BME280_INIT_VALUE] = reg_addr;
00001c  f88d6004          STRB     r6,[sp,#4]
;;;325    	for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
000020  bf00              NOP      
000022  e004              B        |L2.46|
                  |L2.36|
;;;326    		array[stringpos + BME280_ONE_U8X] = *(reg_data + stringpos);
000024  5d39              LDRB     r1,[r7,r4]
000026  aa01              ADD      r2,sp,#4
000028  1c60              ADDS     r0,r4,#1
00002a  5411              STRB     r1,[r2,r0]
00002c  b2c4              UXTB     r4,r0                 ;325
                  |L2.46|
00002e  42ac              CMP      r4,r5                 ;325
000030  dbf8              BLT      |L2.36|
;;;327    	}
;;;328    	/*
;;;329    	* Please take the below function as your reference for
;;;330    	* write the data using I2C communication
;;;331    	* "IBME280_ERROR = I2C_WRITE_STRING(DEV_ADDR, ARRAY, CNT+1)"
;;;332    	* add your I2C write function here
;;;333    	* iError is an return value of I2C read function
;;;334    	* Please select your valid return value
;;;335    	* In the driver BME280_SUCCESS defined as 0
;;;336        * and FAILURE defined as -1
;;;337    	* Note :
;;;338    	* This is a full duplex operation,
;;;339    	* The first read data is discarded, for that extra write operation
;;;340    	* have to be initiated. For that cnt+1 operation done in the I2C write string function
;;;341    	* For more information please refer data sheet SPI communication:
;;;342    	*/
;;;343            iError = MicoI2cBuildTxMessage(&user_i2c_msg, array, cnt + 1, 3);
000032  2303              MOVS     r3,#3
000034  1c6a              ADDS     r2,r5,#1
000036  a901              ADD      r1,sp,#4
000038  a803              ADD      r0,sp,#0xc
00003a  f7fffffe          BL       MicoI2cBuildTxMessage
00003e  4680              MOV      r8,r0
;;;344            iError = MicoI2cTransfer(&user_i2c_device, &user_i2c_msg, 1);
000040  2201              MOVS     r2,#1
000042  a903              ADD      r1,sp,#0xc
000044  4806              LDR      r0,|L2.96|
000046  f7fffffe          BL       MicoI2cTransfer
00004a  4680              MOV      r8,r0
;;;345            if(0 != iError){
00004c  f1b80f00          CMP      r8,#0
000050  d001              BEQ      |L2.86|
;;;346              iError = -1;
000052  f04f38ff          MOV      r8,#0xffffffff
                  |L2.86|
;;;347            }
;;;348    	return (s8)iError;
000056  fa4ff088          SXTB     r0,r8
;;;349    }
00005a  b007              ADD      sp,sp,#0x1c
00005c  e8bd83f0          POP      {r4-r9,pc}
;;;350    
                          ENDP

                  |L2.96|
                          DCD      user_i2c_device

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

                  BME280_SPI_bus_read PROC
;;;397     */
;;;398    s8 BME280_SPI_bus_read(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt)
000000  b5fc              PUSH     {r2-r7,lr}
;;;399    {
000002  4606              MOV      r6,r0
000004  460c              MOV      r4,r1
;;;400    	s32 iError=BME280_INIT_VALUE;
000006  2500              MOVS     r5,#0
;;;401    	u8 array[SPI_BUFFER_LEN]={MASK_DATA1};
000008  4f09              LDR      r7,|L3.48|
00000a  cf81              LDM      r7,{r0,r7}
00000c  e9cd0700          STRD     r0,r7,[sp,#0]
;;;402    	u8 stringpos;
;;;403    	/*	For the SPI mode only 7 bits of register addresses are used.
;;;404    	The MSB of register address is declared the bit what functionality it is
;;;405    	read/write (read as 1/write as BME280_INIT_VALUE)*/
;;;406    	array[BME280_INIT_VALUE] = reg_addr|MASK_DATA2;/*read routine is initiated register address is mask with 0x80*/
000010  f0440080          ORR      r0,r4,#0x80
000014  f88d0000          STRB     r0,[sp,#0]
;;;407    	/*
;;;408    	* Please take the below function as your reference for
;;;409    	* read the data using SPI communication
;;;410    	* " IBME280_ERROR = SPI_READ_WRITE_STRING(ARRAY, ARRAY, CNT+1)"
;;;411    	* add your SPI read function here
;;;412    	* iError is an return value of SPI read function
;;;413    	* Please select your valid return value
;;;414    	* In the driver BME280_SUCCESS defined as 0
;;;415        * and FAILURE defined as -1
;;;416    	* Note :
;;;417    	* This is a full duplex operation,
;;;418    	* The first read data is discarded, for that extra write operation
;;;419    	* have to be initiated. For that cnt+1 operation done in the SPI read
;;;420    	* and write string function
;;;421    	* For more information please refer data sheet SPI communication:
;;;422    	*/
;;;423    	for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
000018  2100              MOVS     r1,#0
00001a  e005              B        |L3.40|
                  |L3.28|
;;;424    		*(reg_data + stringpos) = array[stringpos+BME280_ONE_U8X];
00001c  1c48              ADDS     r0,r1,#1
00001e  f81d0000          LDRB     r0,[sp,r0]
000022  5450              STRB     r0,[r2,r1]
000024  1c48              ADDS     r0,r1,#1              ;423
000026  b2c1              UXTB     r1,r0                 ;423
                  |L3.40|
000028  4299              CMP      r1,r3                 ;423
00002a  dbf7              BLT      |L3.28|
;;;425    	}
;;;426    	return (s8)iError;
00002c  b268              SXTB     r0,r5
;;;427    }
00002e  bdfc              POP      {r2-r7,pc}
;;;428    
                          ENDP

                  |L3.48|
                          DCD      ||.constdata||

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

                  BME280_SPI_bus_write PROC
;;;436     */
;;;437    s8 BME280_SPI_bus_write(u8 dev_addr, u8 reg_addr, u8 *reg_data, u8 cnt)
000000  b570              PUSH     {r4-r6,lr}
;;;438    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;439      
;;;440    	s32 iError = BME280_INIT_VALUE;
000008  2200              MOVS     r2,#0
;;;441    	//u8 array[SPI_BUFFER_LEN * BME280_TWO_U8X];
;;;442    	u8 stringpos = BME280_INIT_VALUE;
00000a  2100              MOVS     r1,#0
;;;443    	for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
00000c  bf00              NOP      
00000e  e001              B        |L4.20|
                  |L4.16|
000010  1c48              ADDS     r0,r1,#1
000012  b2c1              UXTB     r1,r0
                  |L4.20|
000014  4299              CMP      r1,r3
000016  dbfb              BLT      |L4.16|
;;;444    		/* the operation of (reg_addr++)&0x7F done: because it ensure the
;;;445    		   BME280_INIT_VALUE and 1 of the given value
;;;446    		   It is done only for 8bit operation*/
;;;447    		//array[stringpos * BME280_TWO_U8X] = (reg_addr++) & MASK_DATA3;
;;;448    		//array[stringpos * BME280_TWO_U8X + BME280_ONE_U8X] = *(reg_data + stringpos);
;;;449    	}
;;;450    	/* Please take the below function as your reference
;;;451    	 * for write the data using SPI communication
;;;452    	 * add your SPI write function here.
;;;453    	 * "IBME280_ERROR = SPI_WRITE_STRING(ARRAY, CNT*2)"
;;;454    	 * iError is an return value of SPI write function
;;;455    	 * Please select your valid return value
;;;456    	 * In the driver BME280_SUCCESS defined as 0
;;;457         * and FAILURE defined as -1
;;;458    	 */
;;;459    	return (s8)iError;
000018  b250              SXTB     r0,r2
;;;460    }
00001a  bd70              POP      {r4-r6,pc}
;;;461    
                          ENDP


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

                  BME280_delay_msek PROC
;;;464    */
;;;465    void BME280_delay_msek(u16 msek)
000000  b510              PUSH     {r4,lr}
;;;466    {
000002  4604              MOV      r4,r0
;;;467    	/*Here you can write your own delay routine*/
;;;468      mico_thread_msleep(msek);
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       msleep
;;;469    }
00000a  bd10              POP      {r4,pc}
;;;470    #endif
                          ENDP


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

                  I2C_routine PROC
;;;264    *-------------------------------------------------------------------------*/
;;;265    s8 I2C_routine(void) {
000000  4805              LDR      r0,|L6.24|
;;;266    /*--------------------------------------------------------------------------*
;;;267     *  By using bme280 the following structure parameter can be accessed
;;;268     *	Bus write function pointer: BME280_WR_FUNC_PTR
;;;269     *	Bus read function pointer: BME280_RD_FUNC_PTR
;;;270     *	Delay function pointer: delay_msec
;;;271     *	I2C address: dev_addr
;;;272     *--------------------------------------------------------------------------*/
;;;273    	bme280.bus_write = BME280_I2C_bus_write;
000002  4906              LDR      r1,|L6.28|
000004  6308              STR      r0,[r1,#0x30]  ; bme280
;;;274    	bme280.bus_read = BME280_I2C_bus_read;
000006  4806              LDR      r0,|L6.32|
000008  6348              STR      r0,[r1,#0x34]  ; bme280
;;;275    	bme280.dev_addr = BME280_I2C_ADDRESS2;
00000a  2077              MOVS     r0,#0x77
00000c  f8810029          STRB     r0,[r1,#0x29]
;;;276    	bme280.delay_msec = BME280_delay_msek;
000010  4804              LDR      r0,|L6.36|
000012  6388              STR      r0,[r1,#0x38]  ; bme280
;;;277    
;;;278    	return BME280_INIT_VALUE;
000014  2000              MOVS     r0,#0
;;;279    }
000016  4770              BX       lr
;;;280    
                          ENDP

                  |L6.24|
                          DCD      BME280_I2C_bus_write
                  |L6.28|
                          DCD      bme280
                  |L6.32|
                          DCD      BME280_I2C_bus_read
                  |L6.36|
                          DCD      BME280_delay_msek

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

                  SPI_routine PROC
;;;284     *--------------------------------------------------------------------------*/
;;;285    s8 SPI_routine(void) {
000000  4804              LDR      r0,|L7.20|
;;;286    /*--------------------------------------------------------------------------*
;;;287     *  By using bme280 the following structure parameter can be accessed
;;;288     *	Bus write function pointer: BME280_WR_FUNC_PTR
;;;289     *	Bus read function pointer: BME280_RD_FUNC_PTR
;;;290     *	Delay function pointer: delay_msec
;;;291     *--------------------------------------------------------------------------*/
;;;292    
;;;293    	bme280.bus_write = BME280_SPI_bus_write;
000002  4905              LDR      r1,|L7.24|
000004  6308              STR      r0,[r1,#0x30]  ; bme280
;;;294    	bme280.bus_read = BME280_SPI_bus_read;
000006  4805              LDR      r0,|L7.28|
000008  6348              STR      r0,[r1,#0x34]  ; bme280
;;;295    	bme280.delay_msec = BME280_delay_msek;
00000a  4805              LDR      r0,|L7.32|
00000c  6388              STR      r0,[r1,#0x38]  ; bme280
;;;296    
;;;297    	return BME280_INIT_VALUE;
00000e  2000              MOVS     r0,#0
;;;298    }
000010  4770              BX       lr
;;;299    
                          ENDP

000012  0000              DCW      0x0000
                  |L7.20|
                          DCD      BME280_SPI_bus_write
                  |L7.24|
                          DCD      bme280
                  |L7.28|
                          DCD      BME280_SPI_bus_read
                  |L7.32|
                          DCD      BME280_delay_msek

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

                  bme280_data_pressure PROC
;;;590    
;;;591    OSStatus bme280_data_pressure(u32 *v_actual_press_u32)
000000  b538              PUSH     {r3-r5,lr}
;;;592    {
000002  4604              MOV      r4,r0
;;;593        	s32 com_rslt = BME280_ERROR;  // result of communication results
000004  f04f35ff          MOV      r5,#0xffffffff
;;;594    	s32 v_data_uncomp_pres_s32 = BME280_INIT_VALUE;  // uncompensated humidity
000008  2000              MOVS     r0,#0
00000a  9000              STR      r0,[sp,#0]
;;;595         
;;;596            //-------------------------- NOTE ----------------------------------
;;;597            // this is to avoid i2c pin is re-init by other module because they use the same pin.
;;;598            MicoI2cInitialize(&user_i2c_device);
00000c  4807              LDR      r0,|L8.44|
00000e  f7fffffe          BL       MicoI2cInitialize
;;;599            //------------------------------------------------------------------
;;;600            
;;;601            com_rslt = bme280_read_uncomp_pressure(&v_data_uncomp_pres_s32);
000012  4668              MOV      r0,sp
000014  f7fffffe          BL       bme280_read_uncomp_pressure
000018  4605              MOV      r5,r0
;;;602             if(0 != com_rslt){
00001a  b10d              CBZ      r5,|L8.32|
;;;603              return kReadErr;
00001c  4804              LDR      r0,|L8.48|
                  |L8.30|
;;;604            }
;;;605            
;;;606            *v_actual_press_u32 = bme280_compensate_pressure_int32(v_data_uncomp_pres_s32);
;;;607            
;;;608            return kNoErr;
;;;609    }
00001e  bd38              POP      {r3-r5,pc}
                  |L8.32|
000020  9800              LDR      r0,[sp,#0]            ;606
000022  f7fffffe          BL       bme280_compensate_pressure_int32
000026  6020              STR      r0,[r4,#0]            ;606
000028  2000              MOVS     r0,#0                 ;608
00002a  e7f8              B        |L8.30|
;;;610    
                          ENDP

                  |L8.44|
                          DCD      user_i2c_device
                  |L8.48|
                          DCD      0xffffe5a6

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

                  bme280_data_readout PROC
;;;519    
;;;520    OSStatus bme280_data_readout(s32 *v_actual_temp_s32, u32 *v_actual_press_u32, u32 *v_actual_humity_u32)
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;521    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
;;;522        OSStatus err = kUnknownErr;
00000a  4f09              LDR      r7,|L9.48|
;;;523        
;;;524    	/* result of communication results*/
;;;525    	s32 com_rslt = BME280_ERROR;
00000c  f04f38ff          MOV      r8,#0xffffffff
;;;526            
;;;527            //-------------------------- NOTE ----------------------------------
;;;528            // this is to avoid i2c pin is re-init by other module because they use the same pin.
;;;529            MicoI2cInitialize(&user_i2c_device);
000010  4808              LDR      r0,|L9.52|
000012  f7fffffe          BL       MicoI2cInitialize
;;;530            //------------------------------------------------------------------
;;;531              
;;;532    //        /************ START READ TRUE PRESSURE, TEMPERATURE AND HUMIDITY DATA *********/
;;;533    //	/* API is used to read the true temperature*/
;;;534    //	/* Input value as uncompensated temperature and output format*/
;;;535    //        	com_rslt += bme280_compensate_temperature_int32(v_data_uncomp_tem_s32);
;;;536    //        	com_rslt += bme280_compensate_pressure_int32(v_data_uncomp_pres_s32);
;;;537    //        	com_rslt += bme280_compensate_humidity_int32(v_data_uncomp_hum_s32);
;;;538            
;;;539    	/* API is used to read the true temperature, humidity and pressure*/
;;;540    	com_rslt = bme280_read_pressure_temperature_humidity(v_actual_press_u32, 
000016  4632              MOV      r2,r6
000018  4621              MOV      r1,r4
00001a  4628              MOV      r0,r5
00001c  f7fffffe          BL       bme280_read_pressure_temperature_humidity
000020  4680              MOV      r8,r0
;;;541                                                                 v_actual_temp_s32, 
;;;542                                                                 v_actual_humity_u32);
;;;543            /************ END READ TRUE PRESSURE, TEMPERATURE AND HUMIDITY ********/
;;;544            
;;;545            if(0 == com_rslt){
000022  f1b80f00          CMP      r8,#0
000026  d100              BNE      |L9.42|
;;;546              err = kNoErr;
000028  2700              MOVS     r7,#0
                  |L9.42|
;;;547            }
;;;548            return err;
00002a  4638              MOV      r0,r7
;;;549    }
00002c  e8bd81f0          POP      {r4-r8,pc}
;;;550    
                          ENDP

                  |L9.48|
                          DCD      0xffffe5d4
                  |L9.52|
                          DCD      user_i2c_device

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

                  bme280_data_readout_template PROC
;;;114     */
;;;115    s32 bme280_data_readout_template(void)
000000  b510              PUSH     {r4,lr}
;;;116    {
000002  b088              SUB      sp,sp,#0x20
;;;117    	/* The variable used to assign the standby time*/
;;;118    	u8 v_stand_by_time_u8 = BME280_INIT_VALUE;
000004  2000              MOVS     r0,#0
000006  9007              STR      r0,[sp,#0x1c]
;;;119    	/* The variable used to read uncompensated temperature*/
;;;120    	s32 v_data_uncomp_tem_s32 = BME280_INIT_VALUE;
000008  9006              STR      r0,[sp,#0x18]
;;;121    	/* The variable used to read uncompensated pressure*/
;;;122    	s32 v_data_uncomp_pres_s32 = BME280_INIT_VALUE;
00000a  9005              STR      r0,[sp,#0x14]
;;;123    	/* The variable used to read uncompensated pressure*/
;;;124    	s32 v_data_uncomp_hum_s32 = BME280_INIT_VALUE;
00000c  9004              STR      r0,[sp,#0x10]
;;;125    	/* The variable used to read real temperature*/
;;;126    	s32 v_actual_temp_s32 = BME280_INIT_VALUE;
00000e  9003              STR      r0,[sp,#0xc]
;;;127    	/* The variable used to read real pressure*/
;;;128    	u32 v_actual_press_u32 = BME280_INIT_VALUE;
000010  9002              STR      r0,[sp,#8]
;;;129    	/* The variable used to read real humidity*/
;;;130    	u32 v_actual_humity_u32 = BME280_INIT_VALUE;
000012  9001              STR      r0,[sp,#4]
;;;131    	/* result of communication results*/
;;;132    	s32 com_rslt = BME280_ERROR;
000014  1e44              SUBS     r4,r0,#1
;;;133    
;;;134    
;;;135    
;;;136     /*********************** START INITIALIZATION ************************/
;;;137      /*	Based on the user need configure I2C or SPI interface.
;;;138      *	It is example code to explain how to use the bme280 API*/
;;;139      #ifdef BME280_API
;;;140    	I2C_routine();
000016  f7fffffe          BL       I2C_routine
;;;141    	/*SPI_routine(); */
;;;142    	#endif
;;;143    /*--------------------------------------------------------------------------*
;;;144     *  This function used to assign the value/reference of
;;;145     *	the following parameters
;;;146     *	I2C address
;;;147     *	Bus Write
;;;148     *	Bus read
;;;149     *	Chip id
;;;150    *-------------------------------------------------------------------------*/
;;;151    	com_rslt = bme280_init(&bme280);
00001a  4823              LDR      r0,|L10.168|
00001c  f7fffffe          BL       bme280_init
000020  4604              MOV      r4,r0
;;;152    
;;;153    	/*	For initialization it is required to set the mode of
;;;154    	 *	the sensor as "NORMAL"
;;;155    	 *	data acquisition/read/write is possible in this mode
;;;156    	 *	by using the below API able to set the power mode as NORMAL*/
;;;157    	/* Set the power mode as NORMAL*/
;;;158    	com_rslt += bme280_set_power_mode(BME280_NORMAL_MODE);
000022  2003              MOVS     r0,#3
000024  f7fffffe          BL       bme280_set_power_mode
000028  4404              ADD      r4,r4,r0
;;;159    	/*	For reading the pressure, humidity and temperature data it is required to
;;;160    	 *	set the OSS setting of humidity, pressure and temperature
;;;161    	 * The "BME280_CTRLHUM_REG_OSRSH" register sets the humidity
;;;162    	 * data acquisition options of the device.
;;;163    	 * changes to this registers only become effective after a write operation to
;;;164    	 * "BME280_CTRLMEAS_REG" register.
;;;165    	 * In the code automated reading and writing of "BME280_CTRLHUM_REG_OSRSH"
;;;166    	 * register first set the "BME280_CTRLHUM_REG_OSRSH" and then read and write
;;;167    	 * the "BME280_CTRLMEAS_REG" register in the function*/
;;;168    	com_rslt += bme280_set_oversamp_humidity(BME280_OVERSAMP_1X);
00002a  2001              MOVS     r0,#1
00002c  f7fffffe          BL       bme280_set_oversamp_humidity
000030  4404              ADD      r4,r4,r0
;;;169    
;;;170    	/* set the pressure oversampling*/
;;;171    	com_rslt += bme280_set_oversamp_pressure(BME280_OVERSAMP_2X);
000032  2002              MOVS     r0,#2
000034  f7fffffe          BL       bme280_set_oversamp_pressure
000038  4404              ADD      r4,r4,r0
;;;172    	/* set the temperature oversampling*/
;;;173    	com_rslt += bme280_set_oversamp_temperature(BME280_OVERSAMP_4X);
00003a  2003              MOVS     r0,#3
00003c  f7fffffe          BL       bme280_set_oversamp_temperature
000040  4404              ADD      r4,r4,r0
;;;174    /*--------------------------------------------------------------------------*/
;;;175    /*------------------------------------------------------------------------*
;;;176    ************************* START GET and SET FUNCTIONS DATA ****************
;;;177    *---------------------------------------------------------------------------*/
;;;178    	/* This API used to Write the standby time of the sensor input
;;;179    	 *	value have to be given
;;;180    	 *	Normal mode comprises an automated perpetual cycling between an (active)
;;;181    	 *	Measurement period and an (inactive) standby period.
;;;182    	 *	The standby time is determined by the contents of the register t_sb.
;;;183    	 *	Standby time can be set using BME280_STANDBYTIME_125_MS.
;;;184    	 *	Usage Hint : bme280_set_standbydur(BME280_STANDBYTIME_125_MS)*/
;;;185    
;;;186    	com_rslt += bme280_set_standby_durn(BME280_STANDBY_TIME_1_MS);
000042  2000              MOVS     r0,#0
000044  f7fffffe          BL       bme280_set_standby_durn
000048  4404              ADD      r4,r4,r0
;;;187    
;;;188    	/* This API used to read back the written value of standby time*/
;;;189    	com_rslt += bme280_get_standby_durn(&v_stand_by_time_u8);
00004a  a807              ADD      r0,sp,#0x1c
00004c  f7fffffe          BL       bme280_get_standby_durn
000050  4404              ADD      r4,r4,r0
;;;190    /*-----------------------------------------------------------------*
;;;191    ************************* END GET and SET FUNCTIONS ****************
;;;192    *------------------------------------------------------------------*/
;;;193    
;;;194    /************************* END INITIALIZATION *************************/
;;;195    
;;;196    /*------------------------------------------------------------------*
;;;197    ************ START READ UNCOMPENSATED PRESSURE, TEMPERATURE
;;;198    AND HUMIDITY DATA ********
;;;199    *---------------------------------------------------------------------*/
;;;200    	/* API is used to read the uncompensated temperature*/
;;;201    	com_rslt += bme280_read_uncomp_temperature(&v_data_uncomp_tem_s32);
000052  a806              ADD      r0,sp,#0x18
000054  f7fffffe          BL       bme280_read_uncomp_temperature
000058  4404              ADD      r4,r4,r0
;;;202    
;;;203    	/* API is used to read the uncompensated pressure*/
;;;204    	com_rslt += bme280_read_uncomp_pressure(&v_data_uncomp_pres_s32);
00005a  a805              ADD      r0,sp,#0x14
00005c  f7fffffe          BL       bme280_read_uncomp_pressure
000060  4404              ADD      r4,r4,r0
;;;205    
;;;206    	/* API is used to read the uncompensated humidity*/
;;;207    	com_rslt += bme280_read_uncomp_humidity(&v_data_uncomp_hum_s32);
000062  a804              ADD      r0,sp,#0x10
000064  f7fffffe          BL       bme280_read_uncomp_humidity
000068  4404              ADD      r4,r4,r0
;;;208    
;;;209    	/* API is used to read the uncompensated temperature,pressure
;;;210    	and humidity data */
;;;211    	com_rslt += bme280_read_uncomp_pressure_temperature_humidity(
00006a  aa04              ADD      r2,sp,#0x10
00006c  a905              ADD      r1,sp,#0x14
00006e  a806              ADD      r0,sp,#0x18
000070  f7fffffe          BL       bme280_read_uncomp_pressure_temperature_humidity
000074  4404              ADD      r4,r4,r0
;;;212    	&v_data_uncomp_tem_s32, &v_data_uncomp_pres_s32, &v_data_uncomp_hum_s32);
;;;213    /*--------------------------------------------------------------------*
;;;214    ************ END READ UNCOMPENSATED PRESSURE AND TEMPERATURE********
;;;215    *-------------------------------------------------------------------------*/
;;;216    
;;;217    /*------------------------------------------------------------------*
;;;218    ************ START READ TRUE PRESSURE, TEMPERATURE
;;;219    AND HUMIDITY DATA ********
;;;220    *---------------------------------------------------------------------*/
;;;221    	/* API is used to read the true temperature*/
;;;222    	/* Input value as uncompensated temperature and output format*/
;;;223    	com_rslt += bme280_compensate_temperature_int32(v_data_uncomp_tem_s32);
000076  9806              LDR      r0,[sp,#0x18]
000078  f7fffffe          BL       bme280_compensate_temperature_int32
00007c  4404              ADD      r4,r4,r0
;;;224    
;;;225    	/* API is used to read the true pressure*/
;;;226    	/* Input value as uncompensated pressure */
;;;227    	com_rslt += bme280_compensate_pressure_int32(v_data_uncomp_pres_s32);
00007e  9805              LDR      r0,[sp,#0x14]
000080  f7fffffe          BL       bme280_compensate_pressure_int32
000084  4404              ADD      r4,r4,r0
;;;228    
;;;229    	/* API is used to read the true humidity*/
;;;230    	/* Input value as uncompensated humidity and output format*/
;;;231    	com_rslt += bme280_compensate_humidity_int32(v_data_uncomp_hum_s32);
000086  9804              LDR      r0,[sp,#0x10]
000088  f7fffffe          BL       bme280_compensate_humidity_int32
00008c  4404              ADD      r4,r4,r0
;;;232    
;;;233    	/* API is used to read the true temperature, humidity and pressure*/
;;;234    	com_rslt += bme280_read_pressure_temperature_humidity(
00008e  aa01              ADD      r2,sp,#4
000090  a903              ADD      r1,sp,#0xc
000092  a802              ADD      r0,sp,#8
000094  f7fffffe          BL       bme280_read_pressure_temperature_humidity
000098  4404              ADD      r4,r4,r0
;;;235    	&v_actual_press_u32, &v_actual_temp_s32, &v_actual_humity_u32);
;;;236    /*--------------------------------------------------------------------*
;;;237    ************ END READ TRUE PRESSURE, TEMPERATURE AND HUMIDITY ********
;;;238    *-------------------------------------------------------------------------*/
;;;239    
;;;240    /*-----------------------------------------------------------------------*
;;;241    ************************* START DE-INITIALIZATION ***********************
;;;242    *-------------------------------------------------------------------------*/
;;;243    	/*	For de-initialization it is required to set the mode of
;;;244    	 *	the sensor as "SLEEP"
;;;245    	 *	the device reaches the lowest power consumption only
;;;246    	 *	In SLEEP mode no measurements are performed
;;;247    	 *	All registers are accessible
;;;248    	 *	by using the below API able to set the power mode as SLEEP*/
;;;249    	 /* Set the power mode as SLEEP*/
;;;250    	com_rslt += bme280_set_power_mode(BME280_SLEEP_MODE);
00009a  2000              MOVS     r0,#0
00009c  f7fffffe          BL       bme280_set_power_mode
0000a0  4404              ADD      r4,r4,r0
;;;251    /*---------------------------------------------------------------------*
;;;252    ************************* END DE-INITIALIZATION **********************
;;;253    *---------------------------------------------------------------------*/
;;;254    return com_rslt;
0000a2  4620              MOV      r0,r4
;;;255    }
0000a4  b008              ADD      sp,sp,#0x20
0000a6  bd10              POP      {r4,pc}
;;;256    
                          ENDP

                  |L10.168|
                          DCD      bme280

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

                  bme280_read_humidity PROC
;;;570    
;;;571    OSStatus bme280_read_humidity(u32 *v_actual_humity_u32)
000000  b538              PUSH     {r3-r5,lr}
;;;572    {
000002  4604              MOV      r4,r0
;;;573      	s32 com_rslt = BME280_ERROR;  // result of communication results
000004  f04f35ff          MOV      r5,#0xffffffff
;;;574    	s32 v_data_uncomp_hum_s32 = BME280_INIT_VALUE;  // uncompensated humidity
000008  2000              MOVS     r0,#0
00000a  9000              STR      r0,[sp,#0]
;;;575         
;;;576            //-------------------------- NOTE ----------------------------------
;;;577            // this is to avoid i2c pin is re-init by other module because they use the same pin.
;;;578            MicoI2cInitialize(&user_i2c_device);
00000c  4807              LDR      r0,|L11.44|
00000e  f7fffffe          BL       MicoI2cInitialize
;;;579            //------------------------------------------------------------------
;;;580            
;;;581            com_rslt = bme280_read_uncomp_humidity(&v_data_uncomp_hum_s32);
000012  4668              MOV      r0,sp
000014  f7fffffe          BL       bme280_read_uncomp_humidity
000018  4605              MOV      r5,r0
;;;582             if(0 != com_rslt){
00001a  b10d              CBZ      r5,|L11.32|
;;;583              return kReadErr;
00001c  4804              LDR      r0,|L11.48|
                  |L11.30|
;;;584            }
;;;585            
;;;586            *v_actual_humity_u32 = bme280_compensate_humidity_int32(v_data_uncomp_hum_s32);
;;;587            
;;;588            return kNoErr;
;;;589    }
00001e  bd38              POP      {r3-r5,pc}
                  |L11.32|
000020  9800              LDR      r0,[sp,#0]            ;586
000022  f7fffffe          BL       bme280_compensate_humidity_int32
000026  6020              STR      r0,[r4,#0]            ;586
000028  2000              MOVS     r0,#0                 ;588
00002a  e7f8              B        |L11.30|
;;;590    
                          ENDP

                  |L11.44|
                          DCD      user_i2c_device
                  |L11.48|
                          DCD      0xffffe5a6

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

                  bme280_read_temperature PROC
;;;550    
;;;551    OSStatus bme280_read_temperature(s32 *v_actual_temp_s32)
000000  b538              PUSH     {r3-r5,lr}
;;;552    {
000002  4604              MOV      r4,r0
;;;553    	s32 com_rslt = BME280_ERROR;  // result of communication results
000004  f04f35ff          MOV      r5,#0xffffffff
;;;554    	s32 v_data_uncomp_tem_s32 = BME280_INIT_VALUE;  // uncompensated temperature
000008  2000              MOVS     r0,#0
00000a  9000              STR      r0,[sp,#0]
;;;555         
;;;556            //-------------------------- NOTE ----------------------------------
;;;557            // this is to avoid i2c pin is re-init by other module because they use the same pin.
;;;558            MicoI2cInitialize(&user_i2c_device);
00000c  4807              LDR      r0,|L12.44|
00000e  f7fffffe          BL       MicoI2cInitialize
;;;559            //------------------------------------------------------------------
;;;560            
;;;561            com_rslt = bme280_read_uncomp_temperature(&v_data_uncomp_tem_s32);
000012  4668              MOV      r0,sp
000014  f7fffffe          BL       bme280_read_uncomp_temperature
000018  4605              MOV      r5,r0
;;;562             if(0 != com_rslt){
00001a  b10d              CBZ      r5,|L12.32|
;;;563              return kReadErr;
00001c  4804              LDR      r0,|L12.48|
                  |L12.30|
;;;564            }
;;;565            
;;;566            *v_actual_temp_s32 = bme280_compensate_temperature_int32(v_data_uncomp_tem_s32);
;;;567            
;;;568            return kNoErr;
;;;569    }
00001e  bd38              POP      {r3-r5,pc}
                  |L12.32|
000020  9800              LDR      r0,[sp,#0]            ;566
000022  f7fffffe          BL       bme280_compensate_temperature_int32
000026  6020              STR      r0,[r4,#0]            ;566
000028  2000              MOVS     r0,#0                 ;568
00002a  e7f8              B        |L12.30|
;;;570    
                          ENDP

                  |L12.44|
                          DCD      user_i2c_device
                  |L12.48|
                          DCD      0xffffe5a6

                          AREA ||i.bme280_sensor_deinit||, 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
                          REQUIRE _printf_str
                  bme280_sensor_deinit PROC
;;;612    // bme280_sensor_init
;;;613    OSStatus bme280_sensor_deinit(void)
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;614    {
;;;615      OSStatus err = kUnknownErr;
000004  4c32              LDR      r4,|L13.208|
;;;616      s32 com_rslt = BME280_ERROR;
000006  1365              ASRS     r5,r4,#13
;;;617      
;;;618      err = MicoI2cFinalize(&user_i2c_device);
000008  4832              LDR      r0,|L13.212|
00000a  f7fffffe          BL       MicoI2cFinalize
00000e  4604              MOV      r4,r0
;;;619      require_noerr_action( err, exit, bme280_user_log("BME280_ERROR: MicoI2cFinalize err = %d.", err));
000010  bf00              NOP      
000012  4626              MOV      r6,r4
000014  2e00              CMP      r6,#0
000016  d04f              BEQ      |L13.184|
000018  bf00              NOP      
00001a  482f              LDR      r0,|L13.216|
00001c  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
00001e  b900              CBNZ     r0,|L13.34|
000020  e021              B        |L13.102|
                  |L13.34|
000022  482e              LDR      r0,|L13.220|
000024  f7fffffe          BL       mico_rtos_lock_mutex
000028  215c              MOVS     r1,#0x5c
00002a  a02d              ADR      r0,|L13.224|
00002c  f7fffffe          BL       strrchr
000030  b128              CBZ      r0,|L13.62|
000032  215c              MOVS     r1,#0x5c
000034  a02a              ADR      r0,|L13.224|
000036  f7fffffe          BL       strrchr
00003a  1c40              ADDS     r0,r0,#1
00003c  e000              B        |L13.64|
                  |L13.62|
00003e  a028              ADR      r0,|L13.224|
                  |L13.64|
000040  4607              MOV      r7,r0
000042  f7fffffe          BL       mico_get_time
000046  4680              MOV      r8,r0
000048  a033              ADR      r0,|L13.280|
00004a  f240216b          MOV      r1,#0x26b
00004e  4b33              LDR      r3,|L13.284|
000050  463a              MOV      r2,r7
000052  e9cd1000          STRD     r1,r0,[sp,#0]
000056  4641              MOV      r1,r8
000058  a031              ADR      r0,|L13.288|
00005a  f7fffffe          BL       __2printf
00005e  481f              LDR      r0,|L13.220|
000060  f7fffffe          BL       mico_rtos_unlock_mutex
000064  bf00              NOP      
                  |L13.102|
000066  bf00              NOP      
000068  bf00              NOP      
00006a  481b              LDR      r0,|L13.216|
00006c  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
00006e  b900              CBNZ     r0,|L13.114|
000070  e020              B        |L13.180|
                  |L13.114|
000072  481a              LDR      r0,|L13.220|
000074  f7fffffe          BL       mico_rtos_lock_mutex
000078  215c              MOVS     r1,#0x5c
00007a  a019              ADR      r0,|L13.224|
00007c  f7fffffe          BL       strrchr
000080  b128              CBZ      r0,|L13.142|
000082  215c              MOVS     r1,#0x5c
000084  a016              ADR      r0,|L13.224|
000086  f7fffffe          BL       strrchr
00008a  1c40              ADDS     r0,r0,#1
00008c  e000              B        |L13.144|
                  |L13.142|
00008e  a014              ADR      r0,|L13.224|
                  |L13.144|
000090  4607              MOV      r7,r0
000092  f7fffffe          BL       mico_get_time
000096  4680              MOV      r8,r0
000098  f240206b          MOV      r0,#0x26b
00009c  463b              MOV      r3,r7
00009e  a22a              ADR      r2,|L13.328|
0000a0  4641              MOV      r1,r8
0000a2  e9cd0400          STRD     r0,r4,[sp,#0]
0000a6  a02b              ADR      r0,|L13.340|
0000a8  f7fffffe          BL       __2printf
0000ac  480b              LDR      r0,|L13.220|
0000ae  f7fffffe          BL       mico_rtos_unlock_mutex
0000b2  bf00              NOP      
                  |L13.180|
0000b4  bf00              NOP      
0000b6  e007              B        |L13.200|
                  |L13.184|
0000b8  bf00              NOP      
;;;620      
;;;621      /*********************** START DE-INITIALIZATION ************************/
;;;622      /*	For de-initialization it is required to set the mode of
;;;623      *	the sensor as "SLEEP"
;;;624      *	the device reaches the lowest power consumption only
;;;625      *	In SLEEP mode no measurements are performed
;;;626      *	All registers are accessible
;;;627      *	by using the below API able to set the power mode as SLEEP*/
;;;628      /* Set the power mode as SLEEP*/
;;;629      com_rslt = bme280_set_power_mode(BME280_SLEEP_MODE);
0000ba  2000              MOVS     r0,#0
0000bc  f7fffffe          BL       bme280_set_power_mode
0000c0  4605              MOV      r5,r0
;;;630      /************************** END DE-INITIALIZATION ***********************/
;;;631      if(0 == com_rslt){
0000c2  b905              CBNZ     r5,|L13.198|
;;;632        err = kNoErr;
0000c4  2400              MOVS     r4,#0
                  |L13.198|
;;;633      }
;;;634      
;;;635    exit:
0000c6  bf00              NOP      
                  |L13.200|
;;;636      return err;
0000c8  4620              MOV      r0,r4
;;;637    }
0000ca  e8bd81fc          POP      {r2-r8,pc}
                          ENDP

0000ce  0000              DCW      0x0000
                  |L13.208|
                          DCD      0xffffe5d4
                  |L13.212|
                          DCD      user_i2c_device
                  |L13.216|
                          DCD      mico_debug_enabled
                  |L13.220|
                          DCD      stdio_tx_mutex
                  |L13.224|
0000e0  2e2e5c2e          DCB      "..\\..\\..\\..\\Platform\\Drivers\\sensor\\BME280\\bme2"
0000e4  2e5c2e2e
0000e8  5c2e2e5c
0000ec  506c6174
0000f0  666f726d
0000f4  5c447269
0000f8  76657273
0000fc  5c73656e
000100  736f725c
000104  424d4532
000108  38305c62
00010c  6d6532  
00010f  38305f75          DCB      "80_user.c"
000113  7365722e
000117  63      
                  |L13.280|
000118  00                DCB      0
000119  00                DCB      0
00011a  00                DCB      0
00011b  00                DCB      0
                  |L13.284|
                          DCD      |symbol_number.47|
                  |L13.288|
000120  5b25645d          DCB      "[%d][MICO:%s:%s:%4d] **ASSERT** %s\r\n",0
000124  5b4d4943
000128  4f3a2573
00012c  3a25733a
000130  2534645d
000134  202a2a41
000138  53534552
00013c  542a2a20
000140  25730d0a
000144  00      
000145  00                DCB      0
000146  00                DCB      0
000147  00                DCB      0
                  |L13.328|
000148  424d4532          DCB      "BME280_USER",0
00014c  38305f55
000150  53455200
                  |L13.340|
000154  5b25645d          DCB      "[%d][%s: %s:%4d] BME280_ERROR: MicoI2cFinalize err = %d"
000158  5b25733a
00015c  2025733a
000160  2534645d
000164  20424d45
000168  3238305f
00016c  4552524f
000170  523a204d
000174  69636f49
000178  32634669
00017c  6e616c69
000180  7a652065
000184  7272203d
000188  202564  
00018b  2e0d0a00          DCB      ".\r\n",0
00018f  00                DCB      0

                          AREA ||i.bme280_sensor_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
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                  bme280_sensor_init PROC
;;;473    // bme280_sensor_init
;;;474    OSStatus bme280_sensor_init(void)
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;475    {
;;;476      OSStatus err = kUnknownErr;
000004  4d69              LDR      r5,|L14.428|
;;;477      s32 com_rslt = BME280_ERROR;  // result of communication results
000006  136c              ASRS     r4,r5,#13
;;;478     // u8 v_stand_by_time_u8 = BME280_INIT_VALUE;  //  The variable used to assign the standby time
;;;479      
;;;480      // I2C init
;;;481      MicoI2cFinalize(&user_i2c_device);   // in case error
000008  4869              LDR      r0,|L14.432|
00000a  f7fffffe          BL       MicoI2cFinalize
;;;482      err = MicoI2cInitialize(&user_i2c_device);
00000e  4868              LDR      r0,|L14.432|
000010  f7fffffe          BL       MicoI2cInitialize
000014  4605              MOV      r5,r0
;;;483      require_noerr_action( err, exit, bme280_user_log("BME280_ERROR: MicoI2cInitialize err = %d.", err) );
000016  bf00              NOP      
000018  462e              MOV      r6,r5
00001a  2e00              CMP      r6,#0
00001c  d04f              BEQ      |L14.190|
00001e  bf00              NOP      
000020  4864              LDR      r0,|L14.436|
000022  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
000024  b900              CBNZ     r0,|L14.40|
000026  e021              B        |L14.108|
                  |L14.40|
000028  4863              LDR      r0,|L14.440|
00002a  f7fffffe          BL       mico_rtos_lock_mutex
00002e  215c              MOVS     r1,#0x5c
000030  a062              ADR      r0,|L14.444|
000032  f7fffffe          BL       strrchr
000036  b128              CBZ      r0,|L14.68|
000038  215c              MOVS     r1,#0x5c
00003a  a060              ADR      r0,|L14.444|
00003c  f7fffffe          BL       strrchr
000040  1c40              ADDS     r0,r0,#1
000042  e000              B        |L14.70|
                  |L14.68|
000044  a05d              ADR      r0,|L14.444|
                  |L14.70|
000046  4607              MOV      r7,r0
000048  f7fffffe          BL       mico_get_time
00004c  4680              MOV      r8,r0
00004e  a069              ADR      r0,|L14.500|
000050  f24011e3          MOV      r1,#0x1e3
000054  4b68              LDR      r3,|L14.504|
000056  463a              MOV      r2,r7
000058  e9cd1000          STRD     r1,r0,[sp,#0]
00005c  4641              MOV      r1,r8
00005e  a067              ADR      r0,|L14.508|
000060  f7fffffe          BL       __2printf
000064  4854              LDR      r0,|L14.440|
000066  f7fffffe          BL       mico_rtos_unlock_mutex
00006a  bf00              NOP      
                  |L14.108|
00006c  bf00              NOP      
00006e  bf00              NOP      
000070  4850              LDR      r0,|L14.436|
000072  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
000074  b900              CBNZ     r0,|L14.120|
000076  e020              B        |L14.186|
                  |L14.120|
000078  484f              LDR      r0,|L14.440|
00007a  f7fffffe          BL       mico_rtos_lock_mutex
00007e  215c              MOVS     r1,#0x5c
000080  a04e              ADR      r0,|L14.444|
000082  f7fffffe          BL       strrchr
000086  b128              CBZ      r0,|L14.148|
000088  215c              MOVS     r1,#0x5c
00008a  a04c              ADR      r0,|L14.444|
00008c  f7fffffe          BL       strrchr
000090  1c40              ADDS     r0,r0,#1
000092  e000              B        |L14.150|
                  |L14.148|
000094  a049              ADR      r0,|L14.444|
                  |L14.150|
000096  4607              MOV      r7,r0
000098  f7fffffe          BL       mico_get_time
00009c  4680              MOV      r8,r0
00009e  f24010e3          MOV      r0,#0x1e3
0000a2  463b              MOV      r3,r7
0000a4  a25f              ADR      r2,|L14.548|
0000a6  4641              MOV      r1,r8
0000a8  e9cd0500          STRD     r0,r5,[sp,#0]
0000ac  a060              ADR      r0,|L14.560|
0000ae  f7fffffe          BL       __2printf
0000b2  4841              LDR      r0,|L14.440|
0000b4  f7fffffe          BL       mico_rtos_unlock_mutex
0000b8  bf00              NOP      
                  |L14.186|
0000ba  bf00              NOP      
0000bc  e073              B        |L14.422|
                  |L14.190|
0000be  bf00              NOP      
;;;484      if( false == MicoI2cProbeDevice(&user_i2c_device, 5) ){
0000c0  2105              MOVS     r1,#5
0000c2  483b              LDR      r0,|L14.432|
0000c4  f7fffffe          BL       MicoI2cProbeDevice
0000c8  2800              CMP      r0,#0
0000ca  d128              BNE      |L14.286|
;;;485        bme280_user_log("BME280_ERROR: no i2c device found!");
0000cc  bf00              NOP      
0000ce  4839              LDR      r0,|L14.436|
0000d0  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
0000d2  b900              CBNZ     r0,|L14.214|
0000d4  e01f              B        |L14.278|
                  |L14.214|
0000d6  4838              LDR      r0,|L14.440|
0000d8  f7fffffe          BL       mico_rtos_lock_mutex
0000dc  215c              MOVS     r1,#0x5c
0000de  a037              ADR      r0,|L14.444|
0000e0  f7fffffe          BL       strrchr
0000e4  b128              CBZ      r0,|L14.242|
0000e6  215c              MOVS     r1,#0x5c
0000e8  a034              ADR      r0,|L14.444|
0000ea  f7fffffe          BL       strrchr
0000ee  1c40              ADDS     r0,r0,#1
0000f0  e000              B        |L14.244|
                  |L14.242|
0000f2  a032              ADR      r0,|L14.444|
                  |L14.244|
0000f4  4606              MOV      r6,r0
0000f6  f7fffffe          BL       mico_get_time
0000fa  4607              MOV      r7,r0
0000fc  f24010e5          MOV      r0,#0x1e5
000100  4633              MOV      r3,r6
000102  a248              ADR      r2,|L14.548|
000104  4639              MOV      r1,r7
000106  9000              STR      r0,[sp,#0]
000108  a059              ADR      r0,|L14.624|
00010a  f7fffffe          BL       __2printf
00010e  482a              LDR      r0,|L14.440|
000110  f7fffffe          BL       mico_rtos_unlock_mutex
000114  bf00              NOP      
                  |L14.278|
000116  bf00              NOP      
;;;486        err = kNotFoundErr;
000118  4d24              LDR      r5,|L14.428|
00011a  3d1b              SUBS     r5,r5,#0x1b
;;;487        goto exit;
00011c  e043              B        |L14.422|
                  |L14.286|
;;;488      }
;;;489      
;;;490      // sensor init
;;;491    
;;;492      /*********************** START INITIALIZATION ************************/
;;;493      /*	Based on the user need configure I2C or SPI interface.
;;;494      *	It is example code to explain how to use the bme280 API*/
;;;495    #ifdef BME280_API
;;;496      I2C_routine();
00011e  f7fffffe          BL       I2C_routine
;;;497      com_rslt = bme280_init(&bme280);
000122  4861              LDR      r0,|L14.680|
000124  f7fffffe          BL       bme280_init
000128  4604              MOV      r4,r0
;;;498      com_rslt += bme280_set_power_mode(BME280_NORMAL_MODE);
00012a  2003              MOVS     r0,#3
00012c  f7fffffe          BL       bme280_set_power_mode
000130  4404              ADD      r4,r4,r0
;;;499      com_rslt += bme280_set_oversamp_humidity(BME280_OVERSAMP_1X);
000132  2001              MOVS     r0,#1
000134  f7fffffe          BL       bme280_set_oversamp_humidity
000138  4404              ADD      r4,r4,r0
;;;500      com_rslt += bme280_set_oversamp_pressure(BME280_OVERSAMP_2X);
00013a  2002              MOVS     r0,#2
00013c  f7fffffe          BL       bme280_set_oversamp_pressure
000140  4404              ADD      r4,r4,r0
;;;501      com_rslt += bme280_set_oversamp_temperature(BME280_OVERSAMP_4X);
000142  2003              MOVS     r0,#3
000144  f7fffffe          BL       bme280_set_oversamp_temperature
000148  4404              ADD      r4,r4,r0
;;;502      /************************* START GET and SET FUNCTIONS DATA ****************/
;;;503      //com_rslt += bme280_set_standby_durn(BME280_STANDBY_TIME_1_MS);
;;;504      //com_rslt += bme280_get_standby_durn(&v_stand_by_time_u8);
;;;505      /************************** END GET and SET FUNCTIONS **************/
;;;506      if(com_rslt < 0){
00014a  2c00              CMP      r4,#0
00014c  da28              BGE      |L14.416|
;;;507        bme280_user_log("BME280_ERROR: bme280 sensor init failed!");
00014e  bf00              NOP      
000150  4818              LDR      r0,|L14.436|
000152  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
000154  b900              CBNZ     r0,|L14.344|
000156  e01f              B        |L14.408|
                  |L14.344|
000158  4817              LDR      r0,|L14.440|
00015a  f7fffffe          BL       mico_rtos_lock_mutex
00015e  215c              MOVS     r1,#0x5c
000160  a016              ADR      r0,|L14.444|
000162  f7fffffe          BL       strrchr
000166  b128              CBZ      r0,|L14.372|
000168  215c              MOVS     r1,#0x5c
00016a  a014              ADR      r0,|L14.444|
00016c  f7fffffe          BL       strrchr
000170  1c40              ADDS     r0,r0,#1
000172  e000              B        |L14.374|
                  |L14.372|
000174  a011              ADR      r0,|L14.444|
                  |L14.374|
000176  4606              MOV      r6,r0
000178  f7fffffe          BL       mico_get_time
00017c  4607              MOV      r7,r0
00017e  f24010fb          MOV      r0,#0x1fb
000182  4633              MOV      r3,r6
000184  a227              ADR      r2,|L14.548|
000186  4639              MOV      r1,r7
000188  9000              STR      r0,[sp,#0]
00018a  a048              ADR      r0,|L14.684|
00018c  f7fffffe          BL       __2printf
000190  4809              LDR      r0,|L14.440|
000192  f7fffffe          BL       mico_rtos_unlock_mutex
000196  bf00              NOP      
                  |L14.408|
000198  bf00              NOP      
;;;508        err = kNotInitializedErr;
00019a  4d04              LDR      r5,|L14.428|
00019c  3d12              SUBS     r5,r5,#0x12
;;;509        goto exit;
00019e  e002              B        |L14.422|
                  |L14.416|
;;;510      }
;;;511      /************************* END INITIALIZATION *************************/
;;;512    #endif
;;;513      return kNoErr;
0001a0  2000              MOVS     r0,#0
                  |L14.418|
;;;514      
;;;515    exit:
;;;516      return err;
;;;517    }
0001a2  e8bd81fc          POP      {r2-r8,pc}
                  |L14.422|
0001a6  4628              MOV      r0,r5                 ;516
0001a8  e7fb              B        |L14.418|
;;;518    
                          ENDP

0001aa  0000              DCW      0x0000
                  |L14.428|
                          DCD      0xffffe5d4
                  |L14.432|
                          DCD      user_i2c_device
                  |L14.436|
                          DCD      mico_debug_enabled
                  |L14.440|
                          DCD      stdio_tx_mutex
                  |L14.444|
0001bc  2e2e5c2e          DCB      "..\\..\\..\\..\\Platform\\Drivers\\sensor\\BME280\\bme2"
0001c0  2e5c2e2e
0001c4  5c2e2e5c
0001c8  506c6174
0001cc  666f726d
0001d0  5c447269
0001d4  76657273
0001d8  5c73656e
0001dc  736f725c
0001e0  424d4532
0001e4  38305c62
0001e8  6d6532  
0001eb  38305f75          DCB      "80_user.c"
0001ef  7365722e
0001f3  63      
                  |L14.500|
0001f4  00                DCB      0
0001f5  00                DCB      0
0001f6  00                DCB      0
0001f7  00                DCB      0
                  |L14.504|
                          DCD      __PRETTY_FUNCTION__
                  |L14.508|
0001fc  5b25645d          DCB      "[%d][MICO:%s:%s:%4d] **ASSERT** %s\r\n",0
000200  5b4d4943
000204  4f3a2573
000208  3a25733a
00020c  2534645d
000210  202a2a41
000214  53534552
000218  542a2a20
00021c  25730d0a
000220  00      
000221  00                DCB      0
000222  00                DCB      0
000223  00                DCB      0
                  |L14.548|
000224  424d4532          DCB      "BME280_USER",0
000228  38305f55
00022c  53455200
                  |L14.560|
000230  5b25645d          DCB      "[%d][%s: %s:%4d] BME280_ERROR: MicoI2cInitialize err = "
000234  5b25733a
000238  2025733a
00023c  2534645d
000240  20424d45
000244  3238305f
000248  4552524f
00024c  523a204d
000250  69636f49
000254  3263496e
000258  69746961
00025c  6c697a65
000260  20657272
000264  203d20  
000267  25642e0d          DCB      "%d.\r\n",0
00026b  0a00    
00026d  00                DCB      0
00026e  00                DCB      0
00026f  00                DCB      0
                  |L14.624|
000270  5b25645d          DCB      "[%d][%s: %s:%4d] BME280_ERROR: no i2c device found!\r\n"
000274  5b25733a
000278  2025733a
00027c  2534645d
000280  20424d45
000284  3238305f
000288  4552524f
00028c  523a206e
000290  6f206932
000294  63206465
000298  76696365
00029c  20666f75
0002a0  6e64210d
0002a4  0a      
0002a5  00                DCB      0
0002a6  00                DCB      0
0002a7  00                DCB      0
                  |L14.680|
                          DCD      bme280
                  |L14.684|
0002ac  5b25645d          DCB      "[%d][%s: %s:%4d] BME280_ERROR: bme280 sensor init faile"
0002b0  5b25733a
0002b4  2025733a
0002b8  2534645d
0002bc  20424d45
0002c0  3238305f
0002c4  4552524f
0002c8  523a2062
0002cc  6d653238
0002d0  30207365
0002d4  6e736f72
0002d8  20696e69
0002dc  74206661
0002e0  696c65  
0002e3  64210d0a          DCB      "d!\r\n",0
0002e7  00      

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

                  bme280
                          %        60

                          AREA ||.constdata||, DATA, READONLY, ALIGN=2

000000  ff000000          DCB      0xff,0x00,0x00,0x00
000004  00                DCB      0x00
                  __PRETTY_FUNCTION__
000005  736967            DCB      0x73,0x69,0x67
000008  6e656420          DCB      0x6e,0x65,0x64,0x20
00000c  696e7420          DCB      0x69,0x6e,0x74,0x20
000010  626d6532          DCB      0x62,0x6d,0x65,0x32
000014  38305f73          DCB      0x38,0x30,0x5f,0x73
000018  656e736f          DCB      0x65,0x6e,0x73,0x6f
00001c  725f696e          DCB      0x72,0x5f,0x69,0x6e
000020  69742876          DCB      0x69,0x74,0x28,0x76
000024  6f696429          DCB      0x6f,0x69,0x64,0x29
000028  00                DCB      0x00
                  |symbol_number.47|
000029  736967            DCB      0x73,0x69,0x67
00002c  6e656420          DCB      0x6e,0x65,0x64,0x20
000030  696e7420          DCB      0x69,0x6e,0x74,0x20
000034  626d6532          DCB      0x62,0x6d,0x65,0x32
000038  38305f73          DCB      0x38,0x30,0x5f,0x73
00003c  656e736f          DCB      0x65,0x6e,0x73,0x6f
000040  725f6465          DCB      0x72,0x5f,0x64,0x65
000044  696e6974          DCB      0x69,0x6e,0x69,0x74
000048  28766f69          DCB      0x28,0x76,0x6f,0x69
00004c  642900            DCB      0x64,0x29,0x00

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

                  user_i2c_device
000000  0200              DCB      0x02,0x00
000002  0076              DCW      0x0076
000004  0001              DCB      0x00,0x01

;*** Start embedded assembler ***

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

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

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
