; 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\bme280_user.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\bme280_user.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\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  b510              PUSH     {r4,lr}
;;;359    {
000002  b088              SUB      sp,sp,#0x20
;;;360            mico_i2c_message_t user_i2c_msg = {NULL, NULL, 0, 0, 0, false};
000004  2400              MOVS     r4,#0
;;;361        
;;;362    	s32 iError = BME280_INIT_VALUE;
;;;363    	u8 array[I2C_BUFFER_LEN] = {BME280_INIT_VALUE};
000006  9406              STR      r4,[sp,#0x18]
;;;364    	//u8 stringpos = BME280_INIT_VALUE;
;;;365    	array[BME280_INIT_VALUE] = reg_addr;
000008  f88d1018          STRB     r1,[sp,#0x18]
00000c  9405              STR      r4,[sp,#0x14]         ;363
;;;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);
00000e  2003              MOVS     r0,#3
000010  e9cd3000          STRD     r3,r0,[sp,#0]
000014  9402              STR      r4,[sp,#8]            ;360
000016  9403              STR      r4,[sp,#0xc]          ;360
000018  9404              STR      r4,[sp,#0x10]         ;360
00001a  9407              STR      r4,[sp,#0x1c]         ;365
00001c  2301              MOVS     r3,#1
00001e  a906              ADD      r1,sp,#0x18
000020  a802              ADD      r0,sp,#8
000022  f7fffffe          BL       MicoI2cBuildCombinedMessage
;;;377             if(0 != iError){
000026  b928              CBNZ     r0,|L1.52|
;;;378              return (s8)iError; 
;;;379            }
;;;380            iError = MicoI2cTransfer(&user_i2c_device, &user_i2c_msg, 1);
000028  2201              MOVS     r2,#1
00002a  a902              ADD      r1,sp,#8
00002c  4804              LDR      r0,|L1.64|
00002e  f7fffffe          BL       MicoI2cTransfer
;;;381            if(0 != iError){
000032  b110              CBZ      r0,|L1.58|
                  |L1.52|
;;;382              return (s8)iError;
000034  b240              SXTB     r0,r0
                  |L1.54|
;;;383            }
;;;384            
;;;385    	//for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
;;;386    	//	*(reg_data + stringpos) = array[stringpos];
;;;387    	//}
;;;388    	return (s8)iError;
;;;389    }
000036  b008              ADD      sp,sp,#0x20
000038  bd10              POP      {r4,pc}
                  |L1.58|
00003a  4620              MOV      r0,r4                 ;388
00003c  e7fb              B        |L1.54|
;;;390    
                          ENDP

00003e  0000              DCW      0x0000
                  |L1.64|
                          DCD      ||.data||

                          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  b530              PUSH     {r4,r5,lr}
;;;318    {
000002  b087              SUB      sp,sp,#0x1c
;;;319            mico_i2c_message_t user_i2c_msg = {NULL, NULL, 0, 0, 0, false};
000004  2000              MOVS     r0,#0
;;;320      
;;;321    	s32 iError = BME280_INIT_VALUE;
;;;322    	u8 array[I2C_BUFFER_LEN];
;;;323    	u8 stringpos = BME280_INIT_VALUE;
;;;324    	array[BME280_INIT_VALUE] = reg_addr;
000006  f88d1010          STRB     r1,[sp,#0x10]
00000a  461c              MOV      r4,r3                 ;318
00000c  9000              STR      r0,[sp,#0]            ;319
00000e  9001              STR      r0,[sp,#4]            ;319
000010  9002              STR      r0,[sp,#8]            ;319
000012  9003              STR      r0,[sp,#0xc]
000014  a904              ADD      r1,sp,#0x10           ;322
000016  e004              B        |L2.34|
                  |L2.24|
;;;325    	for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
;;;326    		array[stringpos + BME280_ONE_U8X] = *(reg_data + stringpos);
000018  5c13              LDRB     r3,[r2,r0]
00001a  180d              ADDS     r5,r1,r0
00001c  1c40              ADDS     r0,r0,#1
00001e  706b              STRB     r3,[r5,#1]
000020  b2c0              UXTB     r0,r0                 ;325
                  |L2.34|
000022  42a0              CMP      r0,r4                 ;325
000024  d3f8              BCC      |L2.24|
;;;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);
000026  2303              MOVS     r3,#3
000028  1c62              ADDS     r2,r4,#1
00002a  4668              MOV      r0,sp
00002c  f7fffffe          BL       MicoI2cBuildTxMessage
;;;344            iError = MicoI2cTransfer(&user_i2c_device, &user_i2c_msg, 1);
000030  2201              MOVS     r2,#1
000032  4669              MOV      r1,sp
000034  4804              LDR      r0,|L2.72|
000036  f7fffffe          BL       MicoI2cTransfer
;;;345            if(0 != iError){
00003a  b108              CBZ      r0,|L2.64|
;;;346              iError = -1;
00003c  f04f30ff          MOV      r0,#0xffffffff
                  |L2.64|
;;;347            }
;;;348    	return (s8)iError;
;;;349    }
000040  b007              ADD      sp,sp,#0x1c
000042  b240              SXTB     r0,r0                 ;348
000044  bd30              POP      {r4,r5,pc}
;;;350    
                          ENDP

000046  0000              DCW      0x0000
                  |L2.72|
                          DCD      ||.data||

                          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  b53c              PUSH     {r2-r5,lr}
;;;399    {
;;;400    	s32 iError=BME280_INIT_VALUE;
;;;401    	u8 array[SPI_BUFFER_LEN]={MASK_DATA1};
000002  4c0a              LDR      r4,|L3.44|
;;;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*/
000004  f0410180          ORR      r1,r1,#0x80
000008  2000              MOVS     r0,#0                 ;400
00000a  e9d45400          LDRD     r5,r4,[r4,#0]         ;401
00000e  e9cd5400          STRD     r5,r4,[sp,#0]
000012  f88d1000          STRB     r1,[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++) {
000016  4601              MOV      r1,r0
000018  466c              MOV      r4,sp                 ;401
00001a  e004              B        |L3.38|
                  |L3.28|
;;;424    		*(reg_data + stringpos) = array[stringpos+BME280_ONE_U8X];
00001c  1865              ADDS     r5,r4,r1
00001e  786d              LDRB     r5,[r5,#1]
000020  5455              STRB     r5,[r2,r1]
000022  1c49              ADDS     r1,r1,#1
000024  b2c9              UXTB     r1,r1                 ;423
                  |L3.38|
000026  4299              CMP      r1,r3                 ;423
000028  d3f8              BCC      |L3.28|
;;;425    	}
;;;426    	return (s8)iError;
;;;427    }
00002a  bd3c              POP      {r2-r5,pc}
;;;428    
                          ENDP

                  |L3.44|
                          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  2000              MOVS     r0,#0
;;;438    {
;;;439      
;;;440    	s32 iError = BME280_INIT_VALUE;
;;;441    	//u8 array[SPI_BUFFER_LEN * BME280_TWO_U8X];
;;;442    	u8 stringpos = BME280_INIT_VALUE;
000002  4601              MOV      r1,r0
000004  e001              B        |L4.10|
                  |L4.6|
000006  1c49              ADDS     r1,r1,#1              ;438
;;;443    	for (stringpos = BME280_INIT_VALUE; stringpos < cnt; stringpos++) {
000008  b2c9              UXTB     r1,r1
                  |L4.10|
00000a  4299              CMP      r1,r3
00000c  d3fb              BCC      |L4.6|
;;;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;
;;;460    }
00000e  4770              BX       lr
;;;461    
                          ENDP


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

                  BME280_delay_msek PROC
;;;464    */
;;;465    void BME280_delay_msek(u16 msek)
000000  f7ffbffe          B.W      mico_thread_msleep_no_os
;;;466    {
;;;467    	/*Here you can write your own delay routine*/
;;;468      mico_thread_msleep(msek);
;;;469    }
;;;470    #endif
                          ENDP


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

                  I2C_routine PROC
;;;264    *-------------------------------------------------------------------------*/
;;;265    s8 I2C_routine(void) {
000000  4806              LDR      r0,|L6.28|
;;;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  4905              LDR      r1,|L6.24|
;;;274    	bme280.bus_read = BME280_I2C_bus_read;
000004  6301              STR      r1,[r0,#0x30]  ; bme280
000006  4906              LDR      r1,|L6.32|
;;;275    	bme280.dev_addr = BME280_I2C_ADDRESS2;
000008  6341              STR      r1,[r0,#0x34]  ; bme280
00000a  2177              MOVS     r1,#0x77
00000c  f8801029          STRB     r1,[r0,#0x29]
;;;276    	bme280.delay_msec = BME280_delay_msek;
000010  4904              LDR      r1,|L6.36|
;;;277    
;;;278    	return BME280_INIT_VALUE;
000012  6381              STR      r1,[r0,#0x38]  ; bme280
000014  2000              MOVS     r0,#0
;;;279    }
000016  4770              BX       lr
;;;280    
                          ENDP

                  |L6.24|
                          DCD      BME280_I2C_bus_write
                  |L6.28|
                          DCD      ||.bss||
                  |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  4805              LDR      r0,|L7.24|
;;;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  4904              LDR      r1,|L7.20|
;;;294    	bme280.bus_read = BME280_SPI_bus_read;
000004  6301              STR      r1,[r0,#0x30]  ; bme280
000006  4905              LDR      r1,|L7.28|
;;;295    	bme280.delay_msec = BME280_delay_msek;
000008  6341              STR      r1,[r0,#0x34]  ; bme280
00000a  4905              LDR      r1,|L7.32|
;;;296    
;;;297    	return BME280_INIT_VALUE;
00000c  6381              STR      r1,[r0,#0x38]  ; bme280
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      ||.bss||
                  |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
;;;594    	s32 v_data_uncomp_pres_s32 = BME280_INIT_VALUE;  // uncompensated humidity
000004  2000              MOVS     r0,#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);
000006  9000              STR      r0,[sp,#0]
000008  4807              LDR      r0,|L8.40|
00000a  f7fffffe          BL       MicoI2cInitialize
;;;599            //------------------------------------------------------------------
;;;600            
;;;601            com_rslt = bme280_read_uncomp_pressure(&v_data_uncomp_pres_s32);
00000e  4668              MOV      r0,sp
000010  f7fffffe          BL       bme280_read_uncomp_pressure
;;;602             if(0 != com_rslt){
000014  b108              CBZ      r0,|L8.26|
;;;603              return kReadErr;
000016  4805              LDR      r0,|L8.44|
;;;604            }
;;;605            
;;;606            *v_actual_press_u32 = bme280_compensate_pressure_int32(v_data_uncomp_pres_s32);
;;;607            
;;;608            return kNoErr;
;;;609    }
000018  bd38              POP      {r3-r5,pc}
                  |L8.26|
00001a  9800              LDR      r0,[sp,#0]            ;606
00001c  f7fffffe          BL       bme280_compensate_pressure_int32
000020  6020              STR      r0,[r4,#0]            ;608
000022  2000              MOVS     r0,#0                 ;608
000024  bd38              POP      {r3-r5,pc}
;;;610    
                          ENDP

000026  0000              DCW      0x0000
                  |L8.40|
                          DCD      ||.data||
                  |L8.44|
                          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  4605              MOV      r5,r0
000006  4616              MOV      r6,r2
000008  460f              MOV      r7,r1
;;;522        OSStatus err = kUnknownErr;
00000a  4c07              LDR      r4,|L9.40|
;;;523        
;;;524    	/* result of communication results*/
;;;525    	s32 com_rslt = BME280_ERROR;
;;;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);
00000c  4807              LDR      r0,|L9.44|
00000e  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, 
000012  4632              MOV      r2,r6
000014  4629              MOV      r1,r5
000016  4638              MOV      r0,r7
000018  f7fffffe          BL       bme280_read_pressure_temperature_humidity
;;;541                                                                 v_actual_temp_s32, 
;;;542                                                                 v_actual_humity_u32);
;;;543            /************ END READ TRUE PRESSURE, TEMPERATURE AND HUMIDITY ********/
;;;544            
;;;545            if(0 == com_rslt){
00001c  b900              CBNZ     r0,|L9.32|
;;;546              err = kNoErr;
00001e  2400              MOVS     r4,#0
                  |L9.32|
;;;547            }
;;;548            return err;
000020  4620              MOV      r0,r4
;;;549    }
000022  e8bd81f0          POP      {r4-r8,pc}
;;;550    
                          ENDP

000026  0000              DCW      0x0000
                  |L9.40|
                          DCD      0xffffe5d4
                  |L9.44|
                          DCD      ||.data||

                          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  f88d0000          STRB     r0,[sp,#0]
;;;119    	/* The variable used to read uncompensated temperature*/
;;;120    	s32 v_data_uncomp_tem_s32 = BME280_INIT_VALUE;
;;;121    	/* The variable used to read uncompensated pressure*/
;;;122    	s32 v_data_uncomp_pres_s32 = BME280_INIT_VALUE;
00000a  9001              STR      r0,[sp,#4]
;;;123    	/* The variable used to read uncompensated pressure*/
;;;124    	s32 v_data_uncomp_hum_s32 = BME280_INIT_VALUE;
00000c  9002              STR      r0,[sp,#8]
;;;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  9004              STR      r0,[sp,#0x10]
;;;129    	/* The variable used to read real humidity*/
;;;130    	u32 v_actual_humity_u32 = BME280_INIT_VALUE;
000012  9005              STR      r0,[sp,#0x14]
;;;131    	/* result of communication results*/
;;;132    	s32 com_rslt = BME280_ERROR;
;;;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();
000014  9006              STR      r0,[sp,#0x18]
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  4668              MOV      r0,sp
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  a801              ADD      r0,sp,#4
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  a802              ADD      r0,sp,#8
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  a803              ADD      r0,sp,#0xc
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  aa03              ADD      r2,sp,#0xc
00006c  a902              ADD      r1,sp,#8
00006e  a801              ADD      r0,sp,#4
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  9801              LDR      r0,[sp,#4]
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  9802              LDR      r0,[sp,#8]
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  9803              LDR      r0,[sp,#0xc]
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  aa06              ADD      r2,sp,#0x18
000090  a904              ADD      r1,sp,#0x10
000092  a805              ADD      r0,sp,#0x14
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
;;;251    /*---------------------------------------------------------------------*
;;;252    ************************* END DE-INITIALIZATION **********************
;;;253    *---------------------------------------------------------------------*/
;;;254    return com_rslt;
;;;255    }
0000a0  b008              ADD      sp,sp,#0x20
0000a2  4420              ADD      r0,r0,r4              ;250
0000a4  bd10              POP      {r4,pc}
;;;256    
                          ENDP

0000a6  0000              DCW      0x0000
                  |L10.168|
                          DCD      ||.bss||

                          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
;;;574    	s32 v_data_uncomp_hum_s32 = BME280_INIT_VALUE;  // uncompensated humidity
000004  2000              MOVS     r0,#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);
000006  9000              STR      r0,[sp,#0]
000008  4807              LDR      r0,|L11.40|
00000a  f7fffffe          BL       MicoI2cInitialize
;;;579            //------------------------------------------------------------------
;;;580            
;;;581            com_rslt = bme280_read_uncomp_humidity(&v_data_uncomp_hum_s32);
00000e  4668              MOV      r0,sp
000010  f7fffffe          BL       bme280_read_uncomp_humidity
;;;582             if(0 != com_rslt){
000014  b108              CBZ      r0,|L11.26|
;;;583              return kReadErr;
000016  4805              LDR      r0,|L11.44|
;;;584            }
;;;585            
;;;586            *v_actual_humity_u32 = bme280_compensate_humidity_int32(v_data_uncomp_hum_s32);
;;;587            
;;;588            return kNoErr;
;;;589    }
000018  bd38              POP      {r3-r5,pc}
                  |L11.26|
00001a  9800              LDR      r0,[sp,#0]            ;586
00001c  f7fffffe          BL       bme280_compensate_humidity_int32
000020  6020              STR      r0,[r4,#0]            ;588
000022  2000              MOVS     r0,#0                 ;588
000024  bd38              POP      {r3-r5,pc}
;;;590    
                          ENDP

000026  0000              DCW      0x0000
                  |L11.40|
                          DCD      ||.data||
                  |L11.44|
                          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
;;;554    	s32 v_data_uncomp_tem_s32 = BME280_INIT_VALUE;  // uncompensated temperature
000004  2000              MOVS     r0,#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);
000006  9000              STR      r0,[sp,#0]
000008  4807              LDR      r0,|L12.40|
00000a  f7fffffe          BL       MicoI2cInitialize
;;;559            //------------------------------------------------------------------
;;;560            
;;;561            com_rslt = bme280_read_uncomp_temperature(&v_data_uncomp_tem_s32);
00000e  4668              MOV      r0,sp
000010  f7fffffe          BL       bme280_read_uncomp_temperature
;;;562             if(0 != com_rslt){
000014  b108              CBZ      r0,|L12.26|
;;;563              return kReadErr;
000016  4805              LDR      r0,|L12.44|
;;;564            }
;;;565            
;;;566            *v_actual_temp_s32 = bme280_compensate_temperature_int32(v_data_uncomp_tem_s32);
;;;567            
;;;568            return kNoErr;
;;;569    }
000018  bd38              POP      {r3-r5,pc}
                  |L12.26|
00001a  9800              LDR      r0,[sp,#0]            ;566
00001c  f7fffffe          BL       bme280_compensate_temperature_int32
000020  6020              STR      r0,[r4,#0]            ;568
000022  2000              MOVS     r0,#0                 ;568
000024  bd38              POP      {r3-r5,pc}
;;;570    
                          ENDP

000026  0000              DCW      0x0000
                  |L12.40|
                          DCD      ||.data||
                  |L12.44|
                          DCD      0xffffe5a6

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

                  bme280_sensor_deinit PROC
;;;612    // bme280_sensor_init
;;;613    OSStatus bme280_sensor_deinit(void)
000000  b510              PUSH     {r4,lr}
;;;614    {
;;;615      OSStatus err = kUnknownErr;
;;;616      s32 com_rslt = BME280_ERROR;
;;;617      
;;;618      err = MicoI2cFinalize(&user_i2c_device);
000002  4804              LDR      r0,|L13.20|
000004  f7fffffe          BL       MicoI2cFinalize
000008  0004              MOVS     r4,r0
;;;619      require_noerr_action( err, exit, bme280_user_log("BME280_ERROR: MicoI2cFinalize err = %d.", err));
00000a  d101              BNE      |L13.16|
;;;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);
00000c  f7fffffe          BL       bme280_set_power_mode
                  |L13.16|
;;;630      /************************** END DE-INITIALIZATION ***********************/
;;;631      if(0 == com_rslt){
;;;632        err = kNoErr;
;;;633      }
;;;634      
;;;635    exit:
;;;636      return err;
000010  4620              MOV      r0,r4
;;;637    }
000012  bd10              POP      {r4,pc}
                          ENDP

                  |L13.20|
                          DCD      ||.data||

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

                  bme280_sensor_init PROC
;;;473    // bme280_sensor_init
;;;474    OSStatus bme280_sensor_init(void)
000000  b510              PUSH     {r4,lr}
;;;475    {
;;;476      OSStatus err = kUnknownErr;
;;;477      s32 com_rslt = BME280_ERROR;  // result of communication results
;;;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
000002  4815              LDR      r0,|L14.88|
000004  f7fffffe          BL       MicoI2cFinalize
;;;482      err = MicoI2cInitialize(&user_i2c_device);
000008  4813              LDR      r0,|L14.88|
00000a  f7fffffe          BL       MicoI2cInitialize
;;;483      require_noerr_action( err, exit, bme280_user_log("BME280_ERROR: MicoI2cInitialize err = %d.", err) );
00000e  2800              CMP      r0,#0
000010  d11c              BNE      |L14.76|
;;;484      if( false == MicoI2cProbeDevice(&user_i2c_device, 5) ){
000012  2105              MOVS     r1,#5
000014  4810              LDR      r0,|L14.88|
000016  f7fffffe          BL       MicoI2cProbeDevice
00001a  b1c0              CBZ      r0,|L14.78|
;;;485        bme280_user_log("BME280_ERROR: no i2c device found!");
;;;486        err = kNotFoundErr;
;;;487        goto exit;
;;;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();
00001c  f7fffffe          BL       I2C_routine
;;;497      com_rslt = bme280_init(&bme280);
000020  480e              LDR      r0,|L14.92|
000022  f7fffffe          BL       bme280_init
000026  4604              MOV      r4,r0
;;;498      com_rslt += bme280_set_power_mode(BME280_NORMAL_MODE);
000028  2003              MOVS     r0,#3
00002a  f7fffffe          BL       bme280_set_power_mode
00002e  4404              ADD      r4,r4,r0
;;;499      com_rslt += bme280_set_oversamp_humidity(BME280_OVERSAMP_1X);
000030  2001              MOVS     r0,#1
000032  f7fffffe          BL       bme280_set_oversamp_humidity
000036  4404              ADD      r4,r4,r0
;;;500      com_rslt += bme280_set_oversamp_pressure(BME280_OVERSAMP_2X);
000038  2002              MOVS     r0,#2
00003a  f7fffffe          BL       bme280_set_oversamp_pressure
00003e  4404              ADD      r4,r4,r0
;;;501      com_rslt += bme280_set_oversamp_temperature(BME280_OVERSAMP_4X);
000040  2003              MOVS     r0,#3
000042  f7fffffe          BL       bme280_set_oversamp_temperature
000046  42e0              CMN      r0,r4
;;;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){
000048  d504              BPL      |L14.84|
;;;507        bme280_user_log("BME280_ERROR: bme280 sensor init failed!");
;;;508        err = kNotInitializedErr;
00004a  4805              LDR      r0,|L14.96|
                  |L14.76|
;;;509        goto exit;
;;;510      }
;;;511      /************************* END INITIALIZATION *************************/
;;;512    #endif
;;;513      return kNoErr;
;;;514      
;;;515    exit:
;;;516      return err;
;;;517    }
00004c  bd10              POP      {r4,pc}
                  |L14.78|
00004e  4804              LDR      r0,|L14.96|
000050  3809              SUBS     r0,r0,#9              ;486
000052  bd10              POP      {r4,pc}
                  |L14.84|
000054  2000              MOVS     r0,#0                 ;513
000056  bd10              POP      {r4,pc}
;;;518    
                          ENDP

                  |L14.88|
                          DCD      ||.data||
                  |L14.92|
                          DCD      ||.bss||
                  |L14.96|
                          DCD      0xffffe5c2

                          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

                          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 ***
