B3M38SPD seminar project - beehive monitor with LoRa reporting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spd-lorabees/build/bme680.lst

5480 lines
227 KiB

ARM GAS /tmp/ccvbgJts.s page 1
1 .cpu cortex-m0plus
2 .eabi_attribute 20, 1
3 .eabi_attribute 21, 1
4 .eabi_attribute 23, 3
5 .eabi_attribute 24, 1
6 .eabi_attribute 25, 1
7 .eabi_attribute 26, 1
8 .eabi_attribute 30, 1
9 .eabi_attribute 34, 0
10 .eabi_attribute 18, 4
11 .file "bme680.c"
12 .text
13 .Ltext0:
14 .cfi_sections .debug_frame
15 .section .text.set_mem_page,"ax",%progbits
16 .align 1
17 .syntax unified
18 .code 16
19 .thumb_func
20 .fpu softvfp
22 set_mem_page:
23 .LFB21:
24 .file 1 "Drivers/BME680/bme680.c"
1:Drivers/BME680/bme680.c **** /**\mainpage
2:Drivers/BME680/bme680.c **** * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH
3:Drivers/BME680/bme680.c **** *
4:Drivers/BME680/bme680.c **** * Redistribution and use in source and binary forms, with or without
5:Drivers/BME680/bme680.c **** * modification, are permitted provided that the following conditions are met:
6:Drivers/BME680/bme680.c **** *
7:Drivers/BME680/bme680.c **** * Redistributions of source code must retain the above copyright
8:Drivers/BME680/bme680.c **** * notice, this list of conditions and the following disclaimer.
9:Drivers/BME680/bme680.c **** *
10:Drivers/BME680/bme680.c **** * Redistributions in binary form must reproduce the above copyright
11:Drivers/BME680/bme680.c **** * notice, this list of conditions and the following disclaimer in the
12:Drivers/BME680/bme680.c **** * documentation and/or other materials provided with the distribution.
13:Drivers/BME680/bme680.c **** *
14:Drivers/BME680/bme680.c **** * Neither the name of the copyright holder nor the names of the
15:Drivers/BME680/bme680.c **** * contributors may be used to endorse or promote products derived from
16:Drivers/BME680/bme680.c **** * this software without specific prior written permission.
17:Drivers/BME680/bme680.c **** *
18:Drivers/BME680/bme680.c **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19:Drivers/BME680/bme680.c **** * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
20:Drivers/BME680/bme680.c **** * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21:Drivers/BME680/bme680.c **** * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22:Drivers/BME680/bme680.c **** * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
23:Drivers/BME680/bme680.c **** * OR CONTRIBUTORS BE LIABLE FOR ANY
24:Drivers/BME680/bme680.c **** * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
25:Drivers/BME680/bme680.c **** * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
26:Drivers/BME680/bme680.c **** * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27:Drivers/BME680/bme680.c **** * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28:Drivers/BME680/bme680.c **** * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29:Drivers/BME680/bme680.c **** * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30:Drivers/BME680/bme680.c **** * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31:Drivers/BME680/bme680.c **** * ANY WAY OUT OF THE USE OF THIS
32:Drivers/BME680/bme680.c **** * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
33:Drivers/BME680/bme680.c **** *
34:Drivers/BME680/bme680.c **** * The information provided is believed to be accurate and reliable.
ARM GAS /tmp/ccvbgJts.s page 2
35:Drivers/BME680/bme680.c **** * The copyright holder assumes no responsibility
36:Drivers/BME680/bme680.c **** * for the consequences of use
37:Drivers/BME680/bme680.c **** * of such information nor for any infringement of patents or
38:Drivers/BME680/bme680.c **** * other rights of third parties which may result from its use.
39:Drivers/BME680/bme680.c **** * No license is granted by implication or otherwise under any patent or
40:Drivers/BME680/bme680.c **** * patent rights of the copyright holder.
41:Drivers/BME680/bme680.c **** *
42:Drivers/BME680/bme680.c **** * File bme680.c
43:Drivers/BME680/bme680.c **** * @date 30 Oct 2017
44:Drivers/BME680/bme680.c **** * @version 3.5.3
45:Drivers/BME680/bme680.c **** *
46:Drivers/BME680/bme680.c **** */
47:Drivers/BME680/bme680.c ****
48:Drivers/BME680/bme680.c **** /*! @file bme680.c
49:Drivers/BME680/bme680.c **** @brief Sensor driver for BME680 sensor */
50:Drivers/BME680/bme680.c **** #include "bme680.h"
51:Drivers/BME680/bme680.c ****
52:Drivers/BME680/bme680.c **** /**static variables */
53:Drivers/BME680/bme680.c **** /**Look up table for the possible gas range values */
54:Drivers/BME680/bme680.c **** uint32_t lookupTable1[16] = { UINT32_C(2147483647), UINT32_C(2147483647), UINT32_C(2147483647), UIN
55:Drivers/BME680/bme680.c **** UINT32_C(2147483647), UINT32_C(2126008810), UINT32_C(2147483647), UINT32_C(2130303777), UINT32_C(2
56:Drivers/BME680/bme680.c **** UINT32_C(2147483647), UINT32_C(2143188679), UINT32_C(2136746228), UINT32_C(2147483647), UINT32_C(2
57:Drivers/BME680/bme680.c **** UINT32_C(2147483647), UINT32_C(2147483647) };
58:Drivers/BME680/bme680.c **** /**Look up table for the possible gas range values */
59:Drivers/BME680/bme680.c **** uint32_t lookupTable2[16] = { UINT32_C(4096000000), UINT32_C(2048000000), UINT32_C(1024000000), UIN
60:Drivers/BME680/bme680.c **** UINT32_C(255744255), UINT32_C(127110228), UINT32_C(64000000), UINT32_C(32258064), UINT32_C(1601601
61:Drivers/BME680/bme680.c **** 8000000), UINT32_C(4000000), UINT32_C(2000000), UINT32_C(1000000), UINT32_C(500000), UINT32_C(250
62:Drivers/BME680/bme680.c **** UINT32_C(125000) };
63:Drivers/BME680/bme680.c ****
64:Drivers/BME680/bme680.c **** /*!
65:Drivers/BME680/bme680.c **** * @brief This internal API is used to read the calibrated data from the sensor.
66:Drivers/BME680/bme680.c **** *
67:Drivers/BME680/bme680.c **** * This function is used to retrieve the calibration
68:Drivers/BME680/bme680.c **** * data from the image registers of the sensor.
69:Drivers/BME680/bme680.c **** *
70:Drivers/BME680/bme680.c **** * @note Registers 89h to A1h for calibration data 1 to 24
71:Drivers/BME680/bme680.c **** * from bit 0 to 7
72:Drivers/BME680/bme680.c **** * @note Registers E1h to F0h for calibration data 25 to 40
73:Drivers/BME680/bme680.c **** * from bit 0 to 7
74:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
75:Drivers/BME680/bme680.c **** *
76:Drivers/BME680/bme680.c **** * @return Result of API execution status.
77:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
78:Drivers/BME680/bme680.c **** */
79:Drivers/BME680/bme680.c **** static int8_t get_calib_data(struct bme680_dev *dev);
80:Drivers/BME680/bme680.c ****
81:Drivers/BME680/bme680.c **** /*!
82:Drivers/BME680/bme680.c **** * @brief This internal API is used to set the gas configuration of the sensor.
83:Drivers/BME680/bme680.c **** *
84:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
85:Drivers/BME680/bme680.c **** *
86:Drivers/BME680/bme680.c **** * @return Result of API execution status.
87:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
88:Drivers/BME680/bme680.c **** */
89:Drivers/BME680/bme680.c **** static int8_t set_gas_config(struct bme680_dev *dev);
90:Drivers/BME680/bme680.c ****
91:Drivers/BME680/bme680.c **** /*!
ARM GAS /tmp/ccvbgJts.s page 3
92:Drivers/BME680/bme680.c **** * @brief This internal API is used to get the gas configuration of the sensor.
93:Drivers/BME680/bme680.c **** *
94:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
95:Drivers/BME680/bme680.c **** *
96:Drivers/BME680/bme680.c **** * @return Result of API execution status.
97:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
98:Drivers/BME680/bme680.c **** */
99:Drivers/BME680/bme680.c **** static int8_t get_gas_config(struct bme680_dev *dev);
100:Drivers/BME680/bme680.c ****
101:Drivers/BME680/bme680.c **** /*!
102:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Heat duration value.
103:Drivers/BME680/bme680.c **** *
104:Drivers/BME680/bme680.c **** * @param[in] dur :Value of the duration to be shared.
105:Drivers/BME680/bme680.c **** *
106:Drivers/BME680/bme680.c **** * @return uint8_t threshold duration after calculation.
107:Drivers/BME680/bme680.c **** */
108:Drivers/BME680/bme680.c **** static uint8_t calc_heater_dur(uint16_t dur);
109:Drivers/BME680/bme680.c ****
110:Drivers/BME680/bme680.c **** /*!
111:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the temperature value.
112:Drivers/BME680/bme680.c **** *
113:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
114:Drivers/BME680/bme680.c **** * @param[in] temp_adc :Contains the temperature ADC value .
115:Drivers/BME680/bme680.c **** *
116:Drivers/BME680/bme680.c **** * @return uint32_t calculated temperature.
117:Drivers/BME680/bme680.c **** */
118:Drivers/BME680/bme680.c **** static int16_t calc_temperature(uint32_t temp_adc, struct bme680_dev *dev);
119:Drivers/BME680/bme680.c ****
120:Drivers/BME680/bme680.c **** /*!
121:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the pressure value.
122:Drivers/BME680/bme680.c **** *
123:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
124:Drivers/BME680/bme680.c **** * @param[in] pres_adc :Contains the pressure ADC value .
125:Drivers/BME680/bme680.c **** *
126:Drivers/BME680/bme680.c **** * @return uint32_t calculated pressure.
127:Drivers/BME680/bme680.c **** */
128:Drivers/BME680/bme680.c **** static uint32_t calc_pressure(uint32_t pres_adc, const struct bme680_dev *dev);
129:Drivers/BME680/bme680.c ****
130:Drivers/BME680/bme680.c **** /*!
131:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the humidity value.
132:Drivers/BME680/bme680.c **** *
133:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
134:Drivers/BME680/bme680.c **** * @param[in] hum_adc :Contains the humidity ADC value.
135:Drivers/BME680/bme680.c **** *
136:Drivers/BME680/bme680.c **** * @return uint32_t calculated humidity.
137:Drivers/BME680/bme680.c **** */
138:Drivers/BME680/bme680.c **** static uint32_t calc_humidity(uint16_t hum_adc, const struct bme680_dev *dev);
139:Drivers/BME680/bme680.c ****
140:Drivers/BME680/bme680.c **** /*!
141:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Gas Resistance value.
142:Drivers/BME680/bme680.c **** *
143:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
144:Drivers/BME680/bme680.c **** * @param[in] gas_res_adc :Contains the Gas Resistance ADC value.
145:Drivers/BME680/bme680.c **** * @param[in] gas_range :Contains the range of gas values.
146:Drivers/BME680/bme680.c **** *
147:Drivers/BME680/bme680.c **** * @return uint32_t calculated gas resistance.
148:Drivers/BME680/bme680.c **** */
ARM GAS /tmp/ccvbgJts.s page 4
149:Drivers/BME680/bme680.c **** static uint32_t calc_gas_resistance(uint16_t gas_res_adc, uint8_t gas_range, const struct bme680_de
150:Drivers/BME680/bme680.c ****
151:Drivers/BME680/bme680.c **** /*!
152:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Heat Resistance value.
153:Drivers/BME680/bme680.c **** *
154:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
155:Drivers/BME680/bme680.c **** * @param[in] temp :Contains the temporary value.
156:Drivers/BME680/bme680.c **** *
157:Drivers/BME680/bme680.c **** * @return uint8_t calculated heater resistance.
158:Drivers/BME680/bme680.c **** */
159:Drivers/BME680/bme680.c **** static uint8_t calc_heater_res(uint16_t temp, const struct bme680_dev *dev);
160:Drivers/BME680/bme680.c ****
161:Drivers/BME680/bme680.c **** /*!
162:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the field data of sensor.
163:Drivers/BME680/bme680.c **** *
164:Drivers/BME680/bme680.c **** * @param[out] data :Structure instance to hold the data
165:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
166:Drivers/BME680/bme680.c **** *
167:Drivers/BME680/bme680.c **** * @return int8_t result of the field data from sensor.
168:Drivers/BME680/bme680.c **** */
169:Drivers/BME680/bme680.c **** static int8_t read_field_data(struct bme680_field_data *data, struct bme680_dev *dev);
170:Drivers/BME680/bme680.c ****
171:Drivers/BME680/bme680.c **** /*!
172:Drivers/BME680/bme680.c **** * @brief This internal API is used to set the memory page
173:Drivers/BME680/bme680.c **** * based on register address.
174:Drivers/BME680/bme680.c **** *
175:Drivers/BME680/bme680.c **** * The value of memory page
176:Drivers/BME680/bme680.c **** * value | Description
177:Drivers/BME680/bme680.c **** * --------|--------------
178:Drivers/BME680/bme680.c **** * 0 | BME680_PAGE0_SPI
179:Drivers/BME680/bme680.c **** * 1 | BME680_PAGE1_SPI
180:Drivers/BME680/bme680.c **** *
181:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
182:Drivers/BME680/bme680.c **** * @param[in] reg_addr :Contains the register address array.
183:Drivers/BME680/bme680.c **** *
184:Drivers/BME680/bme680.c **** * @return Result of API execution status
185:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
186:Drivers/BME680/bme680.c **** */
187:Drivers/BME680/bme680.c **** static int8_t set_mem_page(uint8_t reg_addr, struct bme680_dev *dev);
188:Drivers/BME680/bme680.c ****
189:Drivers/BME680/bme680.c **** /*!
190:Drivers/BME680/bme680.c **** * @brief This internal API is used to get the memory page based
191:Drivers/BME680/bme680.c **** * on register address.
192:Drivers/BME680/bme680.c **** *
193:Drivers/BME680/bme680.c **** * The value of memory page
194:Drivers/BME680/bme680.c **** * value | Description
195:Drivers/BME680/bme680.c **** * --------|--------------
196:Drivers/BME680/bme680.c **** * 0 | BME680_PAGE0_SPI
197:Drivers/BME680/bme680.c **** * 1 | BME680_PAGE1_SPI
198:Drivers/BME680/bme680.c **** *
199:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
200:Drivers/BME680/bme680.c **** *
201:Drivers/BME680/bme680.c **** * @return Result of API execution status
202:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
203:Drivers/BME680/bme680.c **** */
204:Drivers/BME680/bme680.c **** static int8_t get_mem_page(struct bme680_dev *dev);
205:Drivers/BME680/bme680.c ****
ARM GAS /tmp/ccvbgJts.s page 5
206:Drivers/BME680/bme680.c **** /*!
207:Drivers/BME680/bme680.c **** * @brief This internal API is used to validate the device pointer for
208:Drivers/BME680/bme680.c **** * null conditions.
209:Drivers/BME680/bme680.c **** *
210:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
211:Drivers/BME680/bme680.c **** *
212:Drivers/BME680/bme680.c **** * @return Result of API execution status
213:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
214:Drivers/BME680/bme680.c **** */
215:Drivers/BME680/bme680.c **** static int8_t null_ptr_check(const struct bme680_dev *dev);
216:Drivers/BME680/bme680.c ****
217:Drivers/BME680/bme680.c **** /*!
218:Drivers/BME680/bme680.c **** * @brief This internal API is used to check the boundary
219:Drivers/BME680/bme680.c **** * conditions.
220:Drivers/BME680/bme680.c **** *
221:Drivers/BME680/bme680.c **** * @param[in] value :pointer to the value.
222:Drivers/BME680/bme680.c **** * @param[in] min :minimum value.
223:Drivers/BME680/bme680.c **** * @param[in] max :maximum value.
224:Drivers/BME680/bme680.c **** * @param[in] dev :Structure instance of bme680_dev.
225:Drivers/BME680/bme680.c **** *
226:Drivers/BME680/bme680.c **** * @return Result of API execution status
227:Drivers/BME680/bme680.c **** * @retval zero -> Success / +ve value -> Warning / -ve value -> Error
228:Drivers/BME680/bme680.c **** */
229:Drivers/BME680/bme680.c **** static int8_t boundary_check(uint8_t *value, uint8_t min, uint8_t max, struct bme680_dev *dev);
230:Drivers/BME680/bme680.c ****
231:Drivers/BME680/bme680.c **** /****************** Global Function Definitions *******************************/
232:Drivers/BME680/bme680.c **** /*!
233:Drivers/BME680/bme680.c **** *@brief This API is the entry point.
234:Drivers/BME680/bme680.c **** *It reads the chip-id and calibration data from the sensor.
235:Drivers/BME680/bme680.c **** */
236:Drivers/BME680/bme680.c **** int8_t bme680_init(struct bme680_dev *dev)
237:Drivers/BME680/bme680.c **** {
238:Drivers/BME680/bme680.c **** int8_t rslt;
239:Drivers/BME680/bme680.c ****
240:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
241:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
242:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
243:Drivers/BME680/bme680.c **** /* Soft reset to restore it to default values*/
244:Drivers/BME680/bme680.c **** rslt = bme680_soft_reset(dev);
245:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
246:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_CHIP_ID_ADDR, &dev->chip_id, 1, dev);
247:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
248:Drivers/BME680/bme680.c **** if (dev->chip_id == BME680_CHIP_ID) {
249:Drivers/BME680/bme680.c **** /* Get the Calibration data */
250:Drivers/BME680/bme680.c **** rslt = get_calib_data(dev);
251:Drivers/BME680/bme680.c **** } else {
252:Drivers/BME680/bme680.c **** rslt = BME680_E_DEV_NOT_FOUND;
253:Drivers/BME680/bme680.c **** }
254:Drivers/BME680/bme680.c **** }
255:Drivers/BME680/bme680.c **** }
256:Drivers/BME680/bme680.c **** }
257:Drivers/BME680/bme680.c ****
258:Drivers/BME680/bme680.c **** return rslt;
259:Drivers/BME680/bme680.c **** }
260:Drivers/BME680/bme680.c ****
261:Drivers/BME680/bme680.c **** /*!
262:Drivers/BME680/bme680.c **** * @brief This API reads the data from the given register address of the sensor.
ARM GAS /tmp/ccvbgJts.s page 6
263:Drivers/BME680/bme680.c **** */
264:Drivers/BME680/bme680.c **** int8_t bme680_get_regs(uint8_t reg_addr, uint8_t *reg_data, uint16_t len, struct bme680_dev *dev)
265:Drivers/BME680/bme680.c **** {
266:Drivers/BME680/bme680.c **** int8_t rslt;
267:Drivers/BME680/bme680.c ****
268:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
269:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
270:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
271:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF) {
272:Drivers/BME680/bme680.c **** /* Set the memory page */
273:Drivers/BME680/bme680.c **** rslt = set_mem_page(reg_addr, dev);
274:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
275:Drivers/BME680/bme680.c **** reg_addr = reg_addr | BME680_SPI_RD_MSK;
276:Drivers/BME680/bme680.c **** }
277:Drivers/BME680/bme680.c **** dev->com_rslt = dev->read(dev->dev_id, reg_addr, reg_data, len);
278:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
279:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
280:Drivers/BME680/bme680.c **** }
281:Drivers/BME680/bme680.c ****
282:Drivers/BME680/bme680.c **** return rslt;
283:Drivers/BME680/bme680.c **** }
284:Drivers/BME680/bme680.c ****
285:Drivers/BME680/bme680.c **** /*!
286:Drivers/BME680/bme680.c **** * @brief This API writes the given data to the register address
287:Drivers/BME680/bme680.c **** * of the sensor.
288:Drivers/BME680/bme680.c **** */
289:Drivers/BME680/bme680.c **** int8_t bme680_set_regs(const uint8_t *reg_addr, const uint8_t *reg_data, uint8_t len, struct bme680
290:Drivers/BME680/bme680.c **** {
291:Drivers/BME680/bme680.c **** int8_t rslt;
292:Drivers/BME680/bme680.c **** /* Length of the temporary buffer is 2*(length of register)*/
293:Drivers/BME680/bme680.c **** uint8_t tmp_buff[BME680_TMP_BUFFER_LENGTH] = { 0 };
294:Drivers/BME680/bme680.c **** uint16_t index;
295:Drivers/BME680/bme680.c ****
296:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
297:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
298:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
299:Drivers/BME680/bme680.c **** if ((len > 0) && (len < BME680_TMP_BUFFER_LENGTH / 2)) {
300:Drivers/BME680/bme680.c **** /* Interleave the 2 arrays */
301:Drivers/BME680/bme680.c **** for (index = 0; index < len; index++) {
302:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF) {
303:Drivers/BME680/bme680.c **** /* Set the memory page */
304:Drivers/BME680/bme680.c **** rslt = set_mem_page(reg_addr[index], dev);
305:Drivers/BME680/bme680.c **** tmp_buff[(2 * index)] = reg_addr[index] & BME680_SPI_WR_MSK;
306:Drivers/BME680/bme680.c **** } else {
307:Drivers/BME680/bme680.c **** tmp_buff[(2 * index)] = reg_addr[index];
308:Drivers/BME680/bme680.c **** }
309:Drivers/BME680/bme680.c **** tmp_buff[(2 * index) + 1] = reg_data[index];
310:Drivers/BME680/bme680.c **** }
311:Drivers/BME680/bme680.c **** /* Write the interleaved array */
312:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
313:Drivers/BME680/bme680.c **** dev->com_rslt = dev->write(dev->dev_id, tmp_buff[0], &tmp_buff[1], (2 * len) - 1);
314:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
315:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
316:Drivers/BME680/bme680.c **** }
317:Drivers/BME680/bme680.c **** } else {
318:Drivers/BME680/bme680.c **** rslt = BME680_E_INVALID_LENGTH;
319:Drivers/BME680/bme680.c **** }
ARM GAS /tmp/ccvbgJts.s page 7
320:Drivers/BME680/bme680.c **** }
321:Drivers/BME680/bme680.c ****
322:Drivers/BME680/bme680.c **** return rslt;
323:Drivers/BME680/bme680.c **** }
324:Drivers/BME680/bme680.c ****
325:Drivers/BME680/bme680.c **** /*!
326:Drivers/BME680/bme680.c **** * @brief This API performs the soft reset of the sensor.
327:Drivers/BME680/bme680.c **** */
328:Drivers/BME680/bme680.c **** int8_t bme680_soft_reset(struct bme680_dev *dev)
329:Drivers/BME680/bme680.c **** {
330:Drivers/BME680/bme680.c **** int8_t rslt;
331:Drivers/BME680/bme680.c **** uint8_t reg_addr = BME680_SOFT_RESET_ADDR;
332:Drivers/BME680/bme680.c **** /* 0xb6 is the soft reset command */
333:Drivers/BME680/bme680.c **** uint8_t soft_rst_cmd = BME680_SOFT_RESET_CMD;
334:Drivers/BME680/bme680.c ****
335:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
336:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
337:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
338:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF)
339:Drivers/BME680/bme680.c **** rslt = get_mem_page(dev);
340:Drivers/BME680/bme680.c ****
341:Drivers/BME680/bme680.c **** /* Reset the device */
342:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
343:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &soft_rst_cmd, 1, dev);
344:Drivers/BME680/bme680.c **** /* Wait for 5ms */
345:Drivers/BME680/bme680.c **** dev->delay_ms(BME680_RESET_PERIOD);
346:Drivers/BME680/bme680.c ****
347:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
348:Drivers/BME680/bme680.c **** /* After reset get the memory page */
349:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF)
350:Drivers/BME680/bme680.c **** rslt = get_mem_page(dev);
351:Drivers/BME680/bme680.c **** }
352:Drivers/BME680/bme680.c **** }
353:Drivers/BME680/bme680.c **** }
354:Drivers/BME680/bme680.c ****
355:Drivers/BME680/bme680.c **** return rslt;
356:Drivers/BME680/bme680.c **** }
357:Drivers/BME680/bme680.c ****
358:Drivers/BME680/bme680.c **** /*!
359:Drivers/BME680/bme680.c **** * @brief This API is used to set the oversampling, filter and T,P,H, gas selection
360:Drivers/BME680/bme680.c **** * settings in the sensor.
361:Drivers/BME680/bme680.c **** */
362:Drivers/BME680/bme680.c **** int8_t bme680_set_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev)
363:Drivers/BME680/bme680.c **** {
364:Drivers/BME680/bme680.c **** int8_t rslt;
365:Drivers/BME680/bme680.c **** uint8_t reg_addr;
366:Drivers/BME680/bme680.c **** uint8_t data = 0;
367:Drivers/BME680/bme680.c **** uint8_t count = 0;
368:Drivers/BME680/bme680.c **** uint8_t reg_array[BME680_REG_BUFFER_LENGTH] = { 0 };
369:Drivers/BME680/bme680.c **** uint8_t data_array[BME680_REG_BUFFER_LENGTH] = { 0 };
370:Drivers/BME680/bme680.c **** uint8_t intended_power_mode = dev->power_mode; /* Save intended power mode */
371:Drivers/BME680/bme680.c ****
372:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
373:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
374:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
375:Drivers/BME680/bme680.c **** if (desired_settings & BME680_GAS_MEAS_SEL)
376:Drivers/BME680/bme680.c **** rslt = set_gas_config(dev);
ARM GAS /tmp/ccvbgJts.s page 8
377:Drivers/BME680/bme680.c ****
378:Drivers/BME680/bme680.c **** dev->power_mode = BME680_SLEEP_MODE;
379:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
380:Drivers/BME680/bme680.c **** rslt = bme680_set_sensor_mode(dev);
381:Drivers/BME680/bme680.c ****
382:Drivers/BME680/bme680.c **** /* Selecting the filter */
383:Drivers/BME680/bme680.c **** if (desired_settings & BME680_FILTER_SEL) {
384:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.filter, BME680_FILTER_SIZE_0, BME680_FILTER_SIZE_127, dev);
385:Drivers/BME680/bme680.c **** reg_addr = BME680_CONF_ODR_FILT_ADDR;
386:Drivers/BME680/bme680.c ****
387:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
388:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, &data, 1, dev);
389:Drivers/BME680/bme680.c ****
390:Drivers/BME680/bme680.c **** if (desired_settings & BME680_FILTER_SEL)
391:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_FILTER, dev->tph_sett.filter);
392:Drivers/BME680/bme680.c ****
393:Drivers/BME680/bme680.c **** reg_array[count] = reg_addr; /* Append configuration */
394:Drivers/BME680/bme680.c **** data_array[count] = data;
395:Drivers/BME680/bme680.c **** count++;
396:Drivers/BME680/bme680.c **** }
397:Drivers/BME680/bme680.c ****
398:Drivers/BME680/bme680.c **** /* Selecting heater control for the sensor */
399:Drivers/BME680/bme680.c **** if (desired_settings & BME680_HCNTRL_SEL) {
400:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->gas_sett.heatr_ctrl, BME680_ENABLE_HEATER,
401:Drivers/BME680/bme680.c **** BME680_DISABLE_HEATER, dev);
402:Drivers/BME680/bme680.c **** reg_addr = BME680_CONF_HEAT_CTRL_ADDR;
403:Drivers/BME680/bme680.c ****
404:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
405:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, &data, 1, dev);
406:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_HCTRL, dev->gas_sett.heatr_ctrl);
407:Drivers/BME680/bme680.c ****
408:Drivers/BME680/bme680.c **** reg_array[count] = reg_addr; /* Append configuration */
409:Drivers/BME680/bme680.c **** data_array[count] = data;
410:Drivers/BME680/bme680.c **** count++;
411:Drivers/BME680/bme680.c **** }
412:Drivers/BME680/bme680.c ****
413:Drivers/BME680/bme680.c **** /* Selecting heater T,P oversampling for the sensor */
414:Drivers/BME680/bme680.c **** if (desired_settings & (BME680_OST_SEL | BME680_OSP_SEL)) {
415:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.os_temp, BME680_OS_NONE, BME680_OS_16X, dev);
416:Drivers/BME680/bme680.c **** reg_addr = BME680_CONF_T_P_MODE_ADDR;
417:Drivers/BME680/bme680.c ****
418:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
419:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, &data, 1, dev);
420:Drivers/BME680/bme680.c ****
421:Drivers/BME680/bme680.c **** if (desired_settings & BME680_OST_SEL)
422:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_OST, dev->tph_sett.os_temp);
423:Drivers/BME680/bme680.c ****
424:Drivers/BME680/bme680.c **** if (desired_settings & BME680_OSP_SEL)
425:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_OSP, dev->tph_sett.os_pres);
426:Drivers/BME680/bme680.c ****
427:Drivers/BME680/bme680.c **** reg_array[count] = reg_addr;
428:Drivers/BME680/bme680.c **** data_array[count] = data;
429:Drivers/BME680/bme680.c **** count++;
430:Drivers/BME680/bme680.c **** }
431:Drivers/BME680/bme680.c ****
432:Drivers/BME680/bme680.c **** /* Selecting humidity oversampling for the sensor */
433:Drivers/BME680/bme680.c **** if (desired_settings & BME680_OSH_SEL) {
ARM GAS /tmp/ccvbgJts.s page 9
434:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.os_hum, BME680_OS_NONE, BME680_OS_16X, dev);
435:Drivers/BME680/bme680.c **** reg_addr = BME680_CONF_OS_H_ADDR;
436:Drivers/BME680/bme680.c ****
437:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
438:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, &data, 1, dev);
439:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_OSH, dev->tph_sett.os_hum);
440:Drivers/BME680/bme680.c ****
441:Drivers/BME680/bme680.c **** reg_array[count] = reg_addr; /* Append configuration */
442:Drivers/BME680/bme680.c **** data_array[count] = data;
443:Drivers/BME680/bme680.c **** count++;
444:Drivers/BME680/bme680.c **** }
445:Drivers/BME680/bme680.c ****
446:Drivers/BME680/bme680.c **** /* Selecting the runGas and NB conversion settings for the sensor */
447:Drivers/BME680/bme680.c **** if (desired_settings & (BME680_RUN_GAS_SEL | BME680_NBCONV_SEL)) {
448:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->gas_sett.run_gas, BME680_RUN_GAS_DISABLE,
449:Drivers/BME680/bme680.c **** BME680_RUN_GAS_ENABLE, dev);
450:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
451:Drivers/BME680/bme680.c **** /* Validate boundary conditions */
452:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->gas_sett.nb_conv, BME680_NBCONV_MIN,
453:Drivers/BME680/bme680.c **** BME680_NBCONV_MAX, dev);
454:Drivers/BME680/bme680.c **** }
455:Drivers/BME680/bme680.c ****
456:Drivers/BME680/bme680.c **** reg_addr = BME680_CONF_ODR_RUN_GAS_NBC_ADDR;
457:Drivers/BME680/bme680.c ****
458:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
459:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, &data, 1, dev);
460:Drivers/BME680/bme680.c ****
461:Drivers/BME680/bme680.c **** if (desired_settings & BME680_RUN_GAS_SEL)
462:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_RUN_GAS, dev->gas_sett.run_gas);
463:Drivers/BME680/bme680.c ****
464:Drivers/BME680/bme680.c **** if (desired_settings & BME680_NBCONV_SEL)
465:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_NBCONV, dev->gas_sett.nb_conv);
466:Drivers/BME680/bme680.c ****
467:Drivers/BME680/bme680.c **** reg_array[count] = reg_addr; /* Append configuration */
468:Drivers/BME680/bme680.c **** data_array[count] = data;
469:Drivers/BME680/bme680.c **** count++;
470:Drivers/BME680/bme680.c **** }
471:Drivers/BME680/bme680.c ****
472:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
473:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(reg_array, data_array, count, dev);
474:Drivers/BME680/bme680.c ****
475:Drivers/BME680/bme680.c **** /* Restore previous intended power mode */
476:Drivers/BME680/bme680.c **** dev->power_mode = intended_power_mode;
477:Drivers/BME680/bme680.c **** }
478:Drivers/BME680/bme680.c ****
479:Drivers/BME680/bme680.c **** return rslt;
480:Drivers/BME680/bme680.c **** }
481:Drivers/BME680/bme680.c ****
482:Drivers/BME680/bme680.c **** /*!
483:Drivers/BME680/bme680.c **** * @brief This API is used to get the oversampling, filter and T,P,H, gas selection
484:Drivers/BME680/bme680.c **** * settings in the sensor.
485:Drivers/BME680/bme680.c **** */
486:Drivers/BME680/bme680.c **** int8_t bme680_get_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev)
487:Drivers/BME680/bme680.c **** {
488:Drivers/BME680/bme680.c **** int8_t rslt;
489:Drivers/BME680/bme680.c **** /* starting address of the register array for burst read*/
490:Drivers/BME680/bme680.c **** uint8_t reg_addr = BME680_CONF_HEAT_CTRL_ADDR;
ARM GAS /tmp/ccvbgJts.s page 10
491:Drivers/BME680/bme680.c **** uint8_t data_array[BME680_REG_BUFFER_LENGTH] = { 0 };
492:Drivers/BME680/bme680.c ****
493:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
494:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
495:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
496:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr, data_array, BME680_REG_BUFFER_LENGTH, dev);
497:Drivers/BME680/bme680.c ****
498:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
499:Drivers/BME680/bme680.c **** if (desired_settings & BME680_GAS_MEAS_SEL)
500:Drivers/BME680/bme680.c **** rslt = get_gas_config(dev);
501:Drivers/BME680/bme680.c ****
502:Drivers/BME680/bme680.c **** /* get the T,P,H ,Filter,ODR settings here */
503:Drivers/BME680/bme680.c **** if (desired_settings & BME680_FILTER_SEL)
504:Drivers/BME680/bme680.c **** dev->tph_sett.filter = BME680_GET_BITS(data_array[BME680_REG_FILTER_INDEX],
505:Drivers/BME680/bme680.c **** BME680_FILTER);
506:Drivers/BME680/bme680.c ****
507:Drivers/BME680/bme680.c **** if (desired_settings & (BME680_OST_SEL | BME680_OSP_SEL)) {
508:Drivers/BME680/bme680.c **** dev->tph_sett.os_temp = BME680_GET_BITS(data_array[BME680_REG_TEMP_INDEX], BME680_OST);
509:Drivers/BME680/bme680.c **** dev->tph_sett.os_pres = BME680_GET_BITS(data_array[BME680_REG_PRES_INDEX], BME680_OSP);
510:Drivers/BME680/bme680.c **** }
511:Drivers/BME680/bme680.c ****
512:Drivers/BME680/bme680.c **** if (desired_settings & BME680_OSH_SEL)
513:Drivers/BME680/bme680.c **** dev->tph_sett.os_hum = BME680_GET_BITS_POS_0(data_array[BME680_REG_HUM_INDEX],
514:Drivers/BME680/bme680.c **** BME680_OSH);
515:Drivers/BME680/bme680.c ****
516:Drivers/BME680/bme680.c **** /* get the gas related settings */
517:Drivers/BME680/bme680.c **** if (desired_settings & BME680_HCNTRL_SEL)
518:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_ctrl = BME680_GET_BITS_POS_0(data_array[BME680_REG_HCTRL_INDEX],
519:Drivers/BME680/bme680.c **** BME680_HCTRL);
520:Drivers/BME680/bme680.c ****
521:Drivers/BME680/bme680.c **** if (desired_settings & (BME680_RUN_GAS_SEL | BME680_NBCONV_SEL)) {
522:Drivers/BME680/bme680.c **** dev->gas_sett.nb_conv = BME680_GET_BITS_POS_0(data_array[BME680_REG_NBCONV_INDEX],
523:Drivers/BME680/bme680.c **** BME680_NBCONV);
524:Drivers/BME680/bme680.c **** dev->gas_sett.run_gas = BME680_GET_BITS(data_array[BME680_REG_RUN_GAS_INDEX],
525:Drivers/BME680/bme680.c **** BME680_RUN_GAS);
526:Drivers/BME680/bme680.c **** }
527:Drivers/BME680/bme680.c **** }
528:Drivers/BME680/bme680.c **** } else {
529:Drivers/BME680/bme680.c **** rslt = BME680_E_NULL_PTR;
530:Drivers/BME680/bme680.c **** }
531:Drivers/BME680/bme680.c ****
532:Drivers/BME680/bme680.c **** return rslt;
533:Drivers/BME680/bme680.c **** }
534:Drivers/BME680/bme680.c ****
535:Drivers/BME680/bme680.c **** /*!
536:Drivers/BME680/bme680.c **** * @brief This API is used to set the power mode of the sensor.
537:Drivers/BME680/bme680.c **** */
538:Drivers/BME680/bme680.c **** int8_t bme680_set_sensor_mode(struct bme680_dev *dev)
539:Drivers/BME680/bme680.c **** {
540:Drivers/BME680/bme680.c **** int8_t rslt;
541:Drivers/BME680/bme680.c **** uint8_t tmp_pow_mode;
542:Drivers/BME680/bme680.c **** uint8_t pow_mode = 0;
543:Drivers/BME680/bme680.c **** uint8_t reg_addr = BME680_CONF_T_P_MODE_ADDR;
544:Drivers/BME680/bme680.c ****
545:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
546:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
547:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
ARM GAS /tmp/ccvbgJts.s page 11
548:Drivers/BME680/bme680.c **** /* Call recursively until in sleep */
549:Drivers/BME680/bme680.c **** do {
550:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_CONF_T_P_MODE_ADDR, &tmp_pow_mode, 1, dev);
551:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
552:Drivers/BME680/bme680.c **** /* Put to sleep before changing mode */
553:Drivers/BME680/bme680.c **** pow_mode = (tmp_pow_mode & BME680_MODE_MSK);
554:Drivers/BME680/bme680.c ****
555:Drivers/BME680/bme680.c **** if (pow_mode != BME680_SLEEP_MODE) {
556:Drivers/BME680/bme680.c **** tmp_pow_mode = tmp_pow_mode & (~BME680_MODE_MSK); /* Set to sleep */
557:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &tmp_pow_mode, 1, dev);
558:Drivers/BME680/bme680.c **** dev->delay_ms(BME680_POLL_PERIOD_MS);
559:Drivers/BME680/bme680.c **** }
560:Drivers/BME680/bme680.c **** }
561:Drivers/BME680/bme680.c **** } while (pow_mode != BME680_SLEEP_MODE);
562:Drivers/BME680/bme680.c ****
563:Drivers/BME680/bme680.c **** /* Already in sleep */
564:Drivers/BME680/bme680.c **** if (dev->power_mode != BME680_SLEEP_MODE) {
565:Drivers/BME680/bme680.c **** tmp_pow_mode = (tmp_pow_mode & ~BME680_MODE_MSK) | (dev->power_mode & BME680_MODE_MSK);
566:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
567:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &tmp_pow_mode, 1, dev);
568:Drivers/BME680/bme680.c **** }
569:Drivers/BME680/bme680.c **** }
570:Drivers/BME680/bme680.c ****
571:Drivers/BME680/bme680.c **** return rslt;
572:Drivers/BME680/bme680.c **** }
573:Drivers/BME680/bme680.c ****
574:Drivers/BME680/bme680.c **** /*!
575:Drivers/BME680/bme680.c **** * @brief This API is used to get the power mode of the sensor.
576:Drivers/BME680/bme680.c **** */
577:Drivers/BME680/bme680.c **** int8_t bme680_get_sensor_mode(struct bme680_dev *dev)
578:Drivers/BME680/bme680.c **** {
579:Drivers/BME680/bme680.c **** int8_t rslt;
580:Drivers/BME680/bme680.c **** uint8_t mode;
581:Drivers/BME680/bme680.c ****
582:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
583:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
584:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
585:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_CONF_T_P_MODE_ADDR, &mode, 1, dev);
586:Drivers/BME680/bme680.c **** /* Masking the other register bit info*/
587:Drivers/BME680/bme680.c **** dev->power_mode = mode & BME680_MODE_MSK;
588:Drivers/BME680/bme680.c **** }
589:Drivers/BME680/bme680.c ****
590:Drivers/BME680/bme680.c **** return rslt;
591:Drivers/BME680/bme680.c **** }
592:Drivers/BME680/bme680.c ****
593:Drivers/BME680/bme680.c **** /*!
594:Drivers/BME680/bme680.c **** * @brief This API is used to set the profile duration of the sensor.
595:Drivers/BME680/bme680.c **** */
596:Drivers/BME680/bme680.c **** void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev)
597:Drivers/BME680/bme680.c **** {
598:Drivers/BME680/bme680.c **** uint32_t tph_dur; /* Calculate in us */
599:Drivers/BME680/bme680.c ****
600:Drivers/BME680/bme680.c **** /* TPH measurement duration */
601:Drivers/BME680/bme680.c **** tph_dur = ((uint32_t) (dev->tph_sett.os_temp + dev->tph_sett.os_pres + dev->tph_sett.os_hum) * UIN
602:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
603:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 5); /* Gas measurement duration */
604:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(500); /* Get it to the closest whole number.*/
ARM GAS /tmp/ccvbgJts.s page 12
605:Drivers/BME680/bme680.c **** tph_dur /= UINT32_C(1000); /* Convert to ms */
606:Drivers/BME680/bme680.c ****
607:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(1); /* Wake up duration of 1ms */
608:Drivers/BME680/bme680.c **** /* The remaining time should be used for heating */
609:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_dur = duration - (uint16_t) tph_dur;
610:Drivers/BME680/bme680.c **** }
611:Drivers/BME680/bme680.c ****
612:Drivers/BME680/bme680.c **** /*!
613:Drivers/BME680/bme680.c **** * @brief This API is used to get the profile duration of the sensor.
614:Drivers/BME680/bme680.c **** */
615:Drivers/BME680/bme680.c **** void bme680_get_profile_dur(uint16_t *duration, const struct bme680_dev *dev)
616:Drivers/BME680/bme680.c **** {
617:Drivers/BME680/bme680.c **** uint32_t tph_dur; /* Calculate in us */
618:Drivers/BME680/bme680.c ****
619:Drivers/BME680/bme680.c **** /* TPH measurement duration */
620:Drivers/BME680/bme680.c **** tph_dur = ((uint32_t) (dev->tph_sett.os_temp + dev->tph_sett.os_pres + dev->tph_sett.os_hum) * UIN
621:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
622:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 5); /* Gas measurement duration */
623:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(500); /* Get it to the closest whole number.*/
624:Drivers/BME680/bme680.c **** tph_dur /= UINT32_C(1000); /* Convert to ms */
625:Drivers/BME680/bme680.c ****
626:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(1); /* Wake up duration of 1ms */
627:Drivers/BME680/bme680.c ****
628:Drivers/BME680/bme680.c **** *duration = (uint16_t) tph_dur;
629:Drivers/BME680/bme680.c ****
630:Drivers/BME680/bme680.c **** /* Get the gas duration only when the run gas is enabled */
631:Drivers/BME680/bme680.c **** if (dev->gas_sett.run_gas) {
632:Drivers/BME680/bme680.c **** /* The remaining time should be used for heating */
633:Drivers/BME680/bme680.c **** *duration += dev->gas_sett.heatr_dur;
634:Drivers/BME680/bme680.c **** }
635:Drivers/BME680/bme680.c **** }
636:Drivers/BME680/bme680.c ****
637:Drivers/BME680/bme680.c **** /*!
638:Drivers/BME680/bme680.c **** * @brief This API reads the pressure, temperature and humidity and gas data
639:Drivers/BME680/bme680.c **** * from the sensor, compensates the data and store it in the bme680_data
640:Drivers/BME680/bme680.c **** * structure instance passed by the user.
641:Drivers/BME680/bme680.c **** */
642:Drivers/BME680/bme680.c **** int8_t bme680_get_sensor_data(struct bme680_field_data *data, struct bme680_dev *dev)
643:Drivers/BME680/bme680.c **** {
644:Drivers/BME680/bme680.c **** int8_t rslt;
645:Drivers/BME680/bme680.c ****
646:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
647:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
648:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
649:Drivers/BME680/bme680.c **** /* Reading the sensor data in forced mode only */
650:Drivers/BME680/bme680.c **** rslt = read_field_data(data, dev);
651:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
652:Drivers/BME680/bme680.c **** if (data->status & BME680_NEW_DATA_MSK)
653:Drivers/BME680/bme680.c **** dev->new_fields = 1;
654:Drivers/BME680/bme680.c **** else
655:Drivers/BME680/bme680.c **** dev->new_fields = 0;
656:Drivers/BME680/bme680.c **** }
657:Drivers/BME680/bme680.c **** }
658:Drivers/BME680/bme680.c ****
659:Drivers/BME680/bme680.c **** return rslt;
660:Drivers/BME680/bme680.c **** }
661:Drivers/BME680/bme680.c ****
ARM GAS /tmp/ccvbgJts.s page 13
662:Drivers/BME680/bme680.c **** /*!
663:Drivers/BME680/bme680.c **** * @brief This internal API is used to read the calibrated data from the sensor.
664:Drivers/BME680/bme680.c **** */
665:Drivers/BME680/bme680.c **** static int8_t get_calib_data(struct bme680_dev *dev)
666:Drivers/BME680/bme680.c **** {
667:Drivers/BME680/bme680.c **** int8_t rslt;
668:Drivers/BME680/bme680.c **** uint8_t coeff_array[BME680_COEFF_SIZE] = { 0 };
669:Drivers/BME680/bme680.c **** uint8_t temp_var = 0; /* Temporary variable */
670:Drivers/BME680/bme680.c ****
671:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
672:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
673:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
674:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_COEFF_ADDR1, coeff_array, BME680_COEFF_ADDR1_LEN, dev);
675:Drivers/BME680/bme680.c **** /* Append the second half in the same array */
676:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
677:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_COEFF_ADDR2, &coeff_array[BME680_COEFF_ADDR1_LEN]
678:Drivers/BME680/bme680.c **** , BME680_COEFF_ADDR2_LEN, dev);
679:Drivers/BME680/bme680.c ****
680:Drivers/BME680/bme680.c **** /* Temperature related coefficients */
681:Drivers/BME680/bme680.c **** dev->calib.par_t1 = (uint16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_T1_MSB_REG],
682:Drivers/BME680/bme680.c **** coeff_array[BME680_T1_LSB_REG]));
683:Drivers/BME680/bme680.c **** dev->calib.par_t2 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_T2_MSB_REG],
684:Drivers/BME680/bme680.c **** coeff_array[BME680_T2_LSB_REG]));
685:Drivers/BME680/bme680.c **** dev->calib.par_t3 = (int8_t) (coeff_array[BME680_T3_REG]);
686:Drivers/BME680/bme680.c ****
687:Drivers/BME680/bme680.c **** /* Pressure related coefficients */
688:Drivers/BME680/bme680.c **** dev->calib.par_p1 = (uint16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P1_MSB_REG],
689:Drivers/BME680/bme680.c **** coeff_array[BME680_P1_LSB_REG]));
690:Drivers/BME680/bme680.c **** dev->calib.par_p2 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P2_MSB_REG],
691:Drivers/BME680/bme680.c **** coeff_array[BME680_P2_LSB_REG]));
692:Drivers/BME680/bme680.c **** dev->calib.par_p3 = (int8_t) coeff_array[BME680_P3_REG];
693:Drivers/BME680/bme680.c **** dev->calib.par_p4 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P4_MSB_REG],
694:Drivers/BME680/bme680.c **** coeff_array[BME680_P4_LSB_REG]));
695:Drivers/BME680/bme680.c **** dev->calib.par_p5 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P5_MSB_REG],
696:Drivers/BME680/bme680.c **** coeff_array[BME680_P5_LSB_REG]));
697:Drivers/BME680/bme680.c **** dev->calib.par_p6 = (int8_t) (coeff_array[BME680_P6_REG]);
698:Drivers/BME680/bme680.c **** dev->calib.par_p7 = (int8_t) (coeff_array[BME680_P7_REG]);
699:Drivers/BME680/bme680.c **** dev->calib.par_p8 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P8_MSB_REG],
700:Drivers/BME680/bme680.c **** coeff_array[BME680_P8_LSB_REG]));
701:Drivers/BME680/bme680.c **** dev->calib.par_p9 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P9_MSB_REG],
702:Drivers/BME680/bme680.c **** coeff_array[BME680_P9_LSB_REG]));
703:Drivers/BME680/bme680.c **** dev->calib.par_p10 = (uint8_t) (coeff_array[BME680_P10_REG]);
704:Drivers/BME680/bme680.c ****
705:Drivers/BME680/bme680.c **** /* Humidity related coefficients */
706:Drivers/BME680/bme680.c **** dev->calib.par_h1 = (uint16_t) (((uint16_t) coeff_array[BME680_H1_MSB_REG] << BME680_HUM_REG_SHIF
707:Drivers/BME680/bme680.c **** | (coeff_array[BME680_H1_LSB_REG] & BME680_BIT_H1_DATA_MSK));
708:Drivers/BME680/bme680.c **** dev->calib.par_h2 = (uint16_t) (((uint16_t) coeff_array[BME680_H2_MSB_REG] << BME680_HUM_REG_SHIF
709:Drivers/BME680/bme680.c **** | ((coeff_array[BME680_H2_LSB_REG]) >> BME680_HUM_REG_SHIFT_VAL));
710:Drivers/BME680/bme680.c **** dev->calib.par_h3 = (int8_t) coeff_array[BME680_H3_REG];
711:Drivers/BME680/bme680.c **** dev->calib.par_h4 = (int8_t) coeff_array[BME680_H4_REG];
712:Drivers/BME680/bme680.c **** dev->calib.par_h5 = (int8_t) coeff_array[BME680_H5_REG];
713:Drivers/BME680/bme680.c **** dev->calib.par_h6 = (uint8_t) coeff_array[BME680_H6_REG];
714:Drivers/BME680/bme680.c **** dev->calib.par_h7 = (int8_t) coeff_array[BME680_H7_REG];
715:Drivers/BME680/bme680.c ****
716:Drivers/BME680/bme680.c **** /* Gas heater related coefficients */
717:Drivers/BME680/bme680.c **** dev->calib.par_gh1 = (int8_t) coeff_array[BME680_GH1_REG];
718:Drivers/BME680/bme680.c **** dev->calib.par_gh2 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_GH2_MSB_REG],
ARM GAS /tmp/ccvbgJts.s page 14
719:Drivers/BME680/bme680.c **** coeff_array[BME680_GH2_LSB_REG]));
720:Drivers/BME680/bme680.c **** dev->calib.par_gh3 = (int8_t) coeff_array[BME680_GH3_REG];
721:Drivers/BME680/bme680.c ****
722:Drivers/BME680/bme680.c **** /* Other coefficients */
723:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
724:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RES_HEAT_RANGE_ADDR, &temp_var, 1, dev);
725:Drivers/BME680/bme680.c ****
726:Drivers/BME680/bme680.c **** dev->calib.res_heat_range = ((temp_var & BME680_RHRANGE_MSK) / 16);
727:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
728:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RES_HEAT_VAL_ADDR, &temp_var, 1, dev);
729:Drivers/BME680/bme680.c ****
730:Drivers/BME680/bme680.c **** dev->calib.res_heat_val = (int8_t) temp_var;
731:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
732:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RANGE_SW_ERR_ADDR, &temp_var, 1, dev);
733:Drivers/BME680/bme680.c **** }
734:Drivers/BME680/bme680.c **** }
735:Drivers/BME680/bme680.c **** dev->calib.range_sw_err = ((int8_t) temp_var & (int8_t) BME680_RSERROR_MSK) / 16;
736:Drivers/BME680/bme680.c **** }
737:Drivers/BME680/bme680.c ****
738:Drivers/BME680/bme680.c **** return rslt;
739:Drivers/BME680/bme680.c **** }
740:Drivers/BME680/bme680.c ****
741:Drivers/BME680/bme680.c **** /*!
742:Drivers/BME680/bme680.c **** * @brief This internal API is used to set the gas configuration of the sensor.
743:Drivers/BME680/bme680.c **** */
744:Drivers/BME680/bme680.c **** static int8_t set_gas_config(struct bme680_dev *dev)
745:Drivers/BME680/bme680.c **** {
746:Drivers/BME680/bme680.c **** int8_t rslt;
747:Drivers/BME680/bme680.c ****
748:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
749:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
750:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
751:Drivers/BME680/bme680.c ****
752:Drivers/BME680/bme680.c **** uint8_t reg_addr[2] = {0};
753:Drivers/BME680/bme680.c **** uint8_t reg_data[2] = {0};
754:Drivers/BME680/bme680.c ****
755:Drivers/BME680/bme680.c **** if (dev->power_mode == BME680_FORCED_MODE) {
756:Drivers/BME680/bme680.c **** reg_addr[0] = BME680_RES_HEAT0_ADDR;
757:Drivers/BME680/bme680.c **** reg_data[0] = calc_heater_res(dev->gas_sett.heatr_temp, dev);
758:Drivers/BME680/bme680.c **** reg_addr[1] = BME680_GAS_WAIT0_ADDR;
759:Drivers/BME680/bme680.c **** reg_data[1] = calc_heater_dur(dev->gas_sett.heatr_dur);
760:Drivers/BME680/bme680.c **** dev->gas_sett.nb_conv = 0;
761:Drivers/BME680/bme680.c **** } else {
762:Drivers/BME680/bme680.c **** rslt = BME680_W_DEFINE_PWR_MODE;
763:Drivers/BME680/bme680.c **** }
764:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
765:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(reg_addr, reg_data, 2, dev);
766:Drivers/BME680/bme680.c **** }
767:Drivers/BME680/bme680.c ****
768:Drivers/BME680/bme680.c **** return rslt;
769:Drivers/BME680/bme680.c **** }
770:Drivers/BME680/bme680.c ****
771:Drivers/BME680/bme680.c **** /*!
772:Drivers/BME680/bme680.c **** * @brief This internal API is used to get the gas configuration of the sensor.
773:Drivers/BME680/bme680.c **** */
774:Drivers/BME680/bme680.c **** static int8_t get_gas_config(struct bme680_dev *dev)
775:Drivers/BME680/bme680.c **** {
ARM GAS /tmp/ccvbgJts.s page 15
776:Drivers/BME680/bme680.c **** int8_t rslt;
777:Drivers/BME680/bme680.c **** /* starting address of the register array for burst read*/
778:Drivers/BME680/bme680.c **** uint8_t reg_addr1 = BME680_ADDR_SENS_CONF_START;
779:Drivers/BME680/bme680.c **** uint8_t reg_addr2 = BME680_ADDR_GAS_CONF_START;
780:Drivers/BME680/bme680.c **** uint8_t data_array[BME680_GAS_HEATER_PROF_LEN_MAX] = { 0 };
781:Drivers/BME680/bme680.c **** uint8_t index;
782:Drivers/BME680/bme680.c ****
783:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
784:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
785:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
786:Drivers/BME680/bme680.c **** if (BME680_SPI_INTF == dev->intf) {
787:Drivers/BME680/bme680.c **** /* Memory page switch the SPI address*/
788:Drivers/BME680/bme680.c **** rslt = set_mem_page(reg_addr1, dev);
789:Drivers/BME680/bme680.c **** }
790:Drivers/BME680/bme680.c ****
791:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
792:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr1, data_array, BME680_GAS_HEATER_PROF_LEN_MAX, dev);
793:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
794:Drivers/BME680/bme680.c **** for (index = 0; index < BME680_GAS_HEATER_PROF_LEN_MAX; index++)
795:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_temp = data_array[index];
796:Drivers/BME680/bme680.c **** }
797:Drivers/BME680/bme680.c ****
798:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr2, data_array, BME680_GAS_HEATER_PROF_LEN_MAX, dev);
799:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
800:Drivers/BME680/bme680.c **** for (index = 0; index < BME680_GAS_HEATER_PROF_LEN_MAX; index++)
801:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_dur = data_array[index];
802:Drivers/BME680/bme680.c **** }
803:Drivers/BME680/bme680.c **** }
804:Drivers/BME680/bme680.c **** }
805:Drivers/BME680/bme680.c ****
806:Drivers/BME680/bme680.c **** return rslt;
807:Drivers/BME680/bme680.c **** }
808:Drivers/BME680/bme680.c ****
809:Drivers/BME680/bme680.c **** /*!
810:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the temperature value.
811:Drivers/BME680/bme680.c **** */
812:Drivers/BME680/bme680.c **** static int16_t calc_temperature(uint32_t temp_adc, struct bme680_dev *dev)
813:Drivers/BME680/bme680.c **** {
814:Drivers/BME680/bme680.c **** int64_t var1;
815:Drivers/BME680/bme680.c **** int64_t var2;
816:Drivers/BME680/bme680.c **** int64_t var3;
817:Drivers/BME680/bme680.c **** int16_t calc_temp;
818:Drivers/BME680/bme680.c ****
819:Drivers/BME680/bme680.c **** var1 = ((int32_t) temp_adc >> 3) - ((int32_t) dev->calib.par_t1 << 1);
820:Drivers/BME680/bme680.c **** var2 = (var1 * (int32_t) dev->calib.par_t2) >> 11;
821:Drivers/BME680/bme680.c **** var3 = ((var1 >> 1) * (var1 >> 1)) >> 12;
822:Drivers/BME680/bme680.c **** var3 = ((var3) * ((int32_t) dev->calib.par_t3 << 4)) >> 14;
823:Drivers/BME680/bme680.c **** dev->calib.t_fine = (int32_t) (var2 + var3);
824:Drivers/BME680/bme680.c **** calc_temp = (int16_t) (((dev->calib.t_fine * 5) + 128) >> 8);
825:Drivers/BME680/bme680.c ****
826:Drivers/BME680/bme680.c **** return calc_temp;
827:Drivers/BME680/bme680.c **** }
828:Drivers/BME680/bme680.c ****
829:Drivers/BME680/bme680.c **** /*!
830:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the pressure value.
831:Drivers/BME680/bme680.c **** */
832:Drivers/BME680/bme680.c **** static uint32_t calc_pressure(uint32_t pres_adc, const struct bme680_dev *dev)
ARM GAS /tmp/ccvbgJts.s page 16
833:Drivers/BME680/bme680.c **** {
834:Drivers/BME680/bme680.c **** int32_t var1 = 0;
835:Drivers/BME680/bme680.c **** int32_t var2 = 0;
836:Drivers/BME680/bme680.c **** int32_t var3 = 0;
837:Drivers/BME680/bme680.c **** int32_t var4 = 0;
838:Drivers/BME680/bme680.c **** int32_t pressure_comp = 0;
839:Drivers/BME680/bme680.c ****
840:Drivers/BME680/bme680.c **** var1 = (((int32_t)dev->calib.t_fine) >> 1) - 64000;
841:Drivers/BME680/bme680.c **** var2 = ((((var1 >> 2) * (var1 >> 2)) >> 11) *
842:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p6) >> 2;
843:Drivers/BME680/bme680.c **** var2 = var2 + ((var1 * (int32_t)dev->calib.par_p5) << 1);
844:Drivers/BME680/bme680.c **** var2 = (var2 >> 2) + ((int32_t)dev->calib.par_p4 << 16);
845:Drivers/BME680/bme680.c **** var1 = (((((var1 >> 2) * (var1 >> 2)) >> 13) *
846:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p3 << 5)) >> 3) +
847:Drivers/BME680/bme680.c **** (((int32_t)dev->calib.par_p2 * var1) >> 1);
848:Drivers/BME680/bme680.c **** var1 = var1 >> 18;
849:Drivers/BME680/bme680.c **** var1 = ((32768 + var1) * (int32_t)dev->calib.par_p1) >> 15;
850:Drivers/BME680/bme680.c **** pressure_comp = 1048576 - pres_adc;
851:Drivers/BME680/bme680.c **** pressure_comp = (int32_t)((pressure_comp - (var2 >> 12)) * ((uint32_t)3125));
852:Drivers/BME680/bme680.c **** var4 = (1 << 31);
853:Drivers/BME680/bme680.c **** if (pressure_comp >= var4)
854:Drivers/BME680/bme680.c **** pressure_comp = ((pressure_comp / (uint32_t)var1) << 1);
855:Drivers/BME680/bme680.c **** else
856:Drivers/BME680/bme680.c **** pressure_comp = ((pressure_comp << 1) / (uint32_t)var1);
857:Drivers/BME680/bme680.c **** var1 = ((int32_t)dev->calib.par_p9 * (int32_t)(((pressure_comp >> 3) *
858:Drivers/BME680/bme680.c **** (pressure_comp >> 3)) >> 13)) >> 12;
859:Drivers/BME680/bme680.c **** var2 = ((int32_t)(pressure_comp >> 2) *
860:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p8) >> 13;
861:Drivers/BME680/bme680.c **** var3 = ((int32_t)(pressure_comp >> 8) * (int32_t)(pressure_comp >> 8) *
862:Drivers/BME680/bme680.c **** (int32_t)(pressure_comp >> 8) *
863:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p10) >> 17;
864:Drivers/BME680/bme680.c ****
865:Drivers/BME680/bme680.c **** pressure_comp = (int32_t)(pressure_comp) + ((var1 + var2 + var3 +
866:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p7 << 7)) >> 4);
867:Drivers/BME680/bme680.c ****
868:Drivers/BME680/bme680.c **** return (uint32_t)pressure_comp;
869:Drivers/BME680/bme680.c ****
870:Drivers/BME680/bme680.c **** }
871:Drivers/BME680/bme680.c ****
872:Drivers/BME680/bme680.c **** /*!
873:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the humidity value.
874:Drivers/BME680/bme680.c **** */
875:Drivers/BME680/bme680.c **** static uint32_t calc_humidity(uint16_t hum_adc, const struct bme680_dev *dev)
876:Drivers/BME680/bme680.c **** {
877:Drivers/BME680/bme680.c **** int32_t var1;
878:Drivers/BME680/bme680.c **** int32_t var2;
879:Drivers/BME680/bme680.c **** int32_t var3;
880:Drivers/BME680/bme680.c **** int32_t var4;
881:Drivers/BME680/bme680.c **** int32_t var5;
882:Drivers/BME680/bme680.c **** int32_t var6;
883:Drivers/BME680/bme680.c **** int32_t temp_scaled;
884:Drivers/BME680/bme680.c **** int32_t calc_hum;
885:Drivers/BME680/bme680.c ****
886:Drivers/BME680/bme680.c **** temp_scaled = (((int32_t) dev->calib.t_fine * 5) + 128) >> 8;
887:Drivers/BME680/bme680.c **** var1 = (int32_t) (hum_adc - ((int32_t) ((int32_t) dev->calib.par_h1 * 16)))
888:Drivers/BME680/bme680.c **** - (((temp_scaled * (int32_t) dev->calib.par_h3) / ((int32_t) 100)) >> 1);
889:Drivers/BME680/bme680.c **** var2 = ((int32_t) dev->calib.par_h2
ARM GAS /tmp/ccvbgJts.s page 17
890:Drivers/BME680/bme680.c **** * (((temp_scaled * (int32_t) dev->calib.par_h4) / ((int32_t) 100))
891:Drivers/BME680/bme680.c **** + (((temp_scaled * ((temp_scaled * (int32_t) dev->calib.par_h5) / ((int32_t) 100))) >> 6)
892:Drivers/BME680/bme680.c **** / ((int32_t) 100)) + (int32_t) (1 << 14))) >> 10;
893:Drivers/BME680/bme680.c **** var3 = var1 * var2;
894:Drivers/BME680/bme680.c **** var4 = (int32_t) dev->calib.par_h6 << 7;
895:Drivers/BME680/bme680.c **** var4 = ((var4) + ((temp_scaled * (int32_t) dev->calib.par_h7) / ((int32_t) 100))) >> 4;
896:Drivers/BME680/bme680.c **** var5 = ((var3 >> 14) * (var3 >> 14)) >> 10;
897:Drivers/BME680/bme680.c **** var6 = (var4 * var5) >> 1;
898:Drivers/BME680/bme680.c **** calc_hum = (((var3 + var6) >> 10) * ((int32_t) 1000)) >> 12;
899:Drivers/BME680/bme680.c ****
900:Drivers/BME680/bme680.c **** if (calc_hum > 100000) /* Cap at 100%rH */
901:Drivers/BME680/bme680.c **** calc_hum = 100000;
902:Drivers/BME680/bme680.c **** else if (calc_hum < 0)
903:Drivers/BME680/bme680.c **** calc_hum = 0;
904:Drivers/BME680/bme680.c ****
905:Drivers/BME680/bme680.c **** return (uint32_t) calc_hum;
906:Drivers/BME680/bme680.c **** }
907:Drivers/BME680/bme680.c ****
908:Drivers/BME680/bme680.c **** /*!
909:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Gas Resistance value.
910:Drivers/BME680/bme680.c **** */
911:Drivers/BME680/bme680.c **** static uint32_t calc_gas_resistance(uint16_t gas_res_adc, uint8_t gas_range, const struct bme680_de
912:Drivers/BME680/bme680.c **** {
913:Drivers/BME680/bme680.c **** int64_t var1;
914:Drivers/BME680/bme680.c **** uint64_t var2;
915:Drivers/BME680/bme680.c **** int64_t var3;
916:Drivers/BME680/bme680.c **** uint32_t calc_gas_res;
917:Drivers/BME680/bme680.c ****
918:Drivers/BME680/bme680.c **** var1 = (int64_t) ((1340 + (5 * (int64_t) dev->calib.range_sw_err)) *
919:Drivers/BME680/bme680.c **** ((int64_t) lookupTable1[gas_range])) >> 16;
920:Drivers/BME680/bme680.c **** var2 = (((int64_t) ((int64_t) gas_res_adc << 15) - (int64_t) (16777216)) + var1);
921:Drivers/BME680/bme680.c **** var3 = (((int64_t) lookupTable2[gas_range] * (int64_t) var1) >> 9);
922:Drivers/BME680/bme680.c **** calc_gas_res = (uint32_t) ((var3 + ((int64_t) var2 >> 1)) / (int64_t) var2);
923:Drivers/BME680/bme680.c ****
924:Drivers/BME680/bme680.c **** return calc_gas_res;
925:Drivers/BME680/bme680.c **** }
926:Drivers/BME680/bme680.c ****
927:Drivers/BME680/bme680.c **** /*!
928:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Heat Resistance value.
929:Drivers/BME680/bme680.c **** */
930:Drivers/BME680/bme680.c **** static uint8_t calc_heater_res(uint16_t temp, const struct bme680_dev *dev)
931:Drivers/BME680/bme680.c **** {
932:Drivers/BME680/bme680.c **** uint8_t heatr_res;
933:Drivers/BME680/bme680.c **** int32_t var1;
934:Drivers/BME680/bme680.c **** int32_t var2;
935:Drivers/BME680/bme680.c **** int32_t var3;
936:Drivers/BME680/bme680.c **** int32_t var4;
937:Drivers/BME680/bme680.c **** int32_t var5;
938:Drivers/BME680/bme680.c **** int32_t heatr_res_x100;
939:Drivers/BME680/bme680.c ****
940:Drivers/BME680/bme680.c **** if (temp < 200) /* Cap temperature */
941:Drivers/BME680/bme680.c **** temp = 200;
942:Drivers/BME680/bme680.c **** else if (temp > 400)
943:Drivers/BME680/bme680.c **** temp = 400;
944:Drivers/BME680/bme680.c ****
945:Drivers/BME680/bme680.c **** var1 = (((int32_t) dev->amb_temp * dev->calib.par_gh3) / 1000) * 256;
946:Drivers/BME680/bme680.c **** var2 = (dev->calib.par_gh1 + 784) * (((((dev->calib.par_gh2 + 154009) * temp * 5) / 100) + 3276800
ARM GAS /tmp/ccvbgJts.s page 18
947:Drivers/BME680/bme680.c **** var3 = var1 + (var2 / 2);
948:Drivers/BME680/bme680.c **** var4 = (var3 / (dev->calib.res_heat_range + 4));
949:Drivers/BME680/bme680.c **** var5 = (131 * dev->calib.res_heat_val) + 65536;
950:Drivers/BME680/bme680.c **** heatr_res_x100 = (int32_t) (((var4 / var5) - 250) * 34);
951:Drivers/BME680/bme680.c **** heatr_res = (uint8_t) ((heatr_res_x100 + 50) / 100);
952:Drivers/BME680/bme680.c ****
953:Drivers/BME680/bme680.c **** return heatr_res;
954:Drivers/BME680/bme680.c **** }
955:Drivers/BME680/bme680.c ****
956:Drivers/BME680/bme680.c **** /*!
957:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the Heat duration value.
958:Drivers/BME680/bme680.c **** */
959:Drivers/BME680/bme680.c **** static uint8_t calc_heater_dur(uint16_t dur)
960:Drivers/BME680/bme680.c **** {
961:Drivers/BME680/bme680.c **** uint8_t factor = 0;
962:Drivers/BME680/bme680.c **** uint8_t durval;
963:Drivers/BME680/bme680.c ****
964:Drivers/BME680/bme680.c **** if (dur >= 0xfc0) {
965:Drivers/BME680/bme680.c **** durval = 0xff; /* Max duration*/
966:Drivers/BME680/bme680.c **** } else {
967:Drivers/BME680/bme680.c **** while (dur > 0x3F) {
968:Drivers/BME680/bme680.c **** dur = dur / 4;
969:Drivers/BME680/bme680.c **** factor += 1;
970:Drivers/BME680/bme680.c **** }
971:Drivers/BME680/bme680.c **** durval = (uint8_t) (dur + (factor * 64));
972:Drivers/BME680/bme680.c **** }
973:Drivers/BME680/bme680.c ****
974:Drivers/BME680/bme680.c **** return durval;
975:Drivers/BME680/bme680.c **** }
976:Drivers/BME680/bme680.c ****
977:Drivers/BME680/bme680.c **** /*!
978:Drivers/BME680/bme680.c **** * @brief This internal API is used to calculate the field data of sensor.
979:Drivers/BME680/bme680.c **** */
980:Drivers/BME680/bme680.c **** static int8_t read_field_data(struct bme680_field_data *data, struct bme680_dev *dev)
981:Drivers/BME680/bme680.c **** {
982:Drivers/BME680/bme680.c **** int8_t rslt;
983:Drivers/BME680/bme680.c **** uint8_t buff[BME680_FIELD_LENGTH] = { 0 };
984:Drivers/BME680/bme680.c **** uint8_t gas_range;
985:Drivers/BME680/bme680.c **** uint32_t adc_temp;
986:Drivers/BME680/bme680.c **** uint32_t adc_pres;
987:Drivers/BME680/bme680.c **** uint16_t adc_hum;
988:Drivers/BME680/bme680.c **** uint16_t adc_gas_res;
989:Drivers/BME680/bme680.c **** uint8_t tries = 10;
990:Drivers/BME680/bme680.c ****
991:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
992:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
993:Drivers/BME680/bme680.c **** do {
994:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
995:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(((uint8_t) (BME680_FIELD0_ADDR)), buff, (uint16_t) BME680_FIELD_LENGTH,
996:Drivers/BME680/bme680.c **** dev);
997:Drivers/BME680/bme680.c ****
998:Drivers/BME680/bme680.c **** data->status = buff[0] & BME680_NEW_DATA_MSK;
999:Drivers/BME680/bme680.c **** data->gas_index = buff[0] & BME680_GAS_INDEX_MSK;
1000:Drivers/BME680/bme680.c **** data->meas_index = buff[1];
1001:Drivers/BME680/bme680.c ****
1002:Drivers/BME680/bme680.c **** /* read the raw data from the sensor */
1003:Drivers/BME680/bme680.c **** adc_pres = (uint32_t) (((uint32_t) buff[2] * 4096) | ((uint32_t) buff[3] * 16)
ARM GAS /tmp/ccvbgJts.s page 19
1004:Drivers/BME680/bme680.c **** | ((uint32_t) buff[4] / 16));
1005:Drivers/BME680/bme680.c **** adc_temp = (uint32_t) (((uint32_t) buff[5] * 4096) | ((uint32_t) buff[6] * 16)
1006:Drivers/BME680/bme680.c **** | ((uint32_t) buff[7] / 16));
1007:Drivers/BME680/bme680.c **** adc_hum = (uint16_t) (((uint32_t) buff[8] * 256) | (uint32_t) buff[9]);
1008:Drivers/BME680/bme680.c **** adc_gas_res = (uint16_t) ((uint32_t) buff[13] * 4 | (((uint32_t) buff[14]) / 64));
1009:Drivers/BME680/bme680.c **** gas_range = buff[14] & BME680_GAS_RANGE_MSK;
1010:Drivers/BME680/bme680.c ****
1011:Drivers/BME680/bme680.c **** data->status |= buff[14] & BME680_GASM_VALID_MSK;
1012:Drivers/BME680/bme680.c **** data->status |= buff[14] & BME680_HEAT_STAB_MSK;
1013:Drivers/BME680/bme680.c ****
1014:Drivers/BME680/bme680.c **** if (data->status & BME680_NEW_DATA_MSK) {
1015:Drivers/BME680/bme680.c **** data->temperature = calc_temperature(adc_temp, dev);
1016:Drivers/BME680/bme680.c **** data->pressure = calc_pressure(adc_pres, dev);
1017:Drivers/BME680/bme680.c **** data->humidity = calc_humidity(adc_hum, dev);
1018:Drivers/BME680/bme680.c **** data->gas_resistance = calc_gas_resistance(adc_gas_res, gas_range, dev);
1019:Drivers/BME680/bme680.c **** break;
1020:Drivers/BME680/bme680.c **** }
1021:Drivers/BME680/bme680.c **** /* Delay to poll the data */
1022:Drivers/BME680/bme680.c **** dev->delay_ms(BME680_POLL_PERIOD_MS);
1023:Drivers/BME680/bme680.c **** }
1024:Drivers/BME680/bme680.c **** tries--;
1025:Drivers/BME680/bme680.c **** } while (tries);
1026:Drivers/BME680/bme680.c ****
1027:Drivers/BME680/bme680.c **** if (!tries)
1028:Drivers/BME680/bme680.c **** rslt = BME680_W_NO_NEW_DATA;
1029:Drivers/BME680/bme680.c ****
1030:Drivers/BME680/bme680.c **** return rslt;
1031:Drivers/BME680/bme680.c **** }
1032:Drivers/BME680/bme680.c ****
1033:Drivers/BME680/bme680.c **** /*!
1034:Drivers/BME680/bme680.c **** * @brief This internal API is used to set the memory page based on register address.
1035:Drivers/BME680/bme680.c **** */
1036:Drivers/BME680/bme680.c **** static int8_t set_mem_page(uint8_t reg_addr, struct bme680_dev *dev)
1037:Drivers/BME680/bme680.c **** {
25 .loc 1 1037 0
26 .cfi_startproc
27 @ args = 0, pretend = 0, frame = 8
28 @ frame_needed = 0, uses_anonymous_args = 0
29 .LVL0:
30 0000 30B5 push {r4, r5, lr}
31 .LCFI0:
32 .cfi_def_cfa_offset 12
33 .cfi_offset 4, -12
34 .cfi_offset 5, -8
35 .cfi_offset 14, -4
36 0002 83B0 sub sp, sp, #12
37 .LCFI1:
38 .cfi_def_cfa_offset 24
39 0004 0C1E subs r4, r1, #0
40 .LVL1:
41 .LBB51:
42 .LBB52:
1038:Drivers/BME680/bme680.c **** int8_t rslt;
1039:Drivers/BME680/bme680.c **** uint8_t reg;
1040:Drivers/BME680/bme680.c **** uint8_t mem_page;
1041:Drivers/BME680/bme680.c ****
1042:Drivers/BME680/bme680.c **** /* Check for null pointers in the device structure*/
ARM GAS /tmp/ccvbgJts.s page 20
1043:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
1044:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1045:Drivers/BME680/bme680.c **** if (reg_addr > 0x7f)
1046:Drivers/BME680/bme680.c **** mem_page = BME680_MEM_PAGE1;
1047:Drivers/BME680/bme680.c **** else
1048:Drivers/BME680/bme680.c **** mem_page = BME680_MEM_PAGE0;
1049:Drivers/BME680/bme680.c ****
1050:Drivers/BME680/bme680.c **** if (mem_page != dev->mem_page) {
1051:Drivers/BME680/bme680.c **** dev->mem_page = mem_page;
1052:Drivers/BME680/bme680.c ****
1053:Drivers/BME680/bme680.c **** dev->com_rslt = dev->read(dev->dev_id, BME680_MEM_PAGE_ADDR | BME680_SPI_RD_MSK, &reg, 1);
1054:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
1055:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
1056:Drivers/BME680/bme680.c ****
1057:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1058:Drivers/BME680/bme680.c **** reg = reg & (~BME680_MEM_PAGE_MSK);
1059:Drivers/BME680/bme680.c **** reg = reg | (dev->mem_page & BME680_MEM_PAGE_MSK);
1060:Drivers/BME680/bme680.c ****
1061:Drivers/BME680/bme680.c **** dev->com_rslt = dev->write(dev->dev_id, BME680_MEM_PAGE_ADDR & BME680_SPI_WR_MSK,
1062:Drivers/BME680/bme680.c **** &reg, 1);
1063:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
1064:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
1065:Drivers/BME680/bme680.c **** }
1066:Drivers/BME680/bme680.c **** }
1067:Drivers/BME680/bme680.c **** }
1068:Drivers/BME680/bme680.c ****
1069:Drivers/BME680/bme680.c **** return rslt;
1070:Drivers/BME680/bme680.c **** }
1071:Drivers/BME680/bme680.c ****
1072:Drivers/BME680/bme680.c **** /*!
1073:Drivers/BME680/bme680.c **** * @brief This internal API is used to get the memory page based on register address.
1074:Drivers/BME680/bme680.c **** */
1075:Drivers/BME680/bme680.c **** static int8_t get_mem_page(struct bme680_dev *dev)
1076:Drivers/BME680/bme680.c **** {
1077:Drivers/BME680/bme680.c **** int8_t rslt;
1078:Drivers/BME680/bme680.c **** uint8_t reg;
1079:Drivers/BME680/bme680.c ****
1080:Drivers/BME680/bme680.c **** /* Check for null pointer in the device structure*/
1081:Drivers/BME680/bme680.c **** rslt = null_ptr_check(dev);
1082:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1083:Drivers/BME680/bme680.c **** dev->com_rslt = dev->read(dev->dev_id, BME680_MEM_PAGE_ADDR | BME680_SPI_RD_MSK, &reg, 1);
1084:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
1085:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
1086:Drivers/BME680/bme680.c **** else
1087:Drivers/BME680/bme680.c **** dev->mem_page = reg & BME680_MEM_PAGE_MSK;
1088:Drivers/BME680/bme680.c **** }
1089:Drivers/BME680/bme680.c ****
1090:Drivers/BME680/bme680.c **** return rslt;
1091:Drivers/BME680/bme680.c **** }
1092:Drivers/BME680/bme680.c ****
1093:Drivers/BME680/bme680.c **** /*!
1094:Drivers/BME680/bme680.c **** * @brief This internal API is used to validate the boundary
1095:Drivers/BME680/bme680.c **** * conditions.
1096:Drivers/BME680/bme680.c **** */
1097:Drivers/BME680/bme680.c **** static int8_t boundary_check(uint8_t *value, uint8_t min, uint8_t max, struct bme680_dev *dev)
1098:Drivers/BME680/bme680.c **** {
1099:Drivers/BME680/bme680.c **** int8_t rslt = BME680_OK;
ARM GAS /tmp/ccvbgJts.s page 21
1100:Drivers/BME680/bme680.c ****
1101:Drivers/BME680/bme680.c **** if (value != NULL) {
1102:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
1103:Drivers/BME680/bme680.c **** if (*value < min) {
1104:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
1105:Drivers/BME680/bme680.c **** *value = min;
1106:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MIN_CORRECTION;
1107:Drivers/BME680/bme680.c **** }
1108:Drivers/BME680/bme680.c **** /* Check if value is above maximum value */
1109:Drivers/BME680/bme680.c **** if (*value > max) {
1110:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
1111:Drivers/BME680/bme680.c **** *value = max;
1112:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
1113:Drivers/BME680/bme680.c **** }
1114:Drivers/BME680/bme680.c **** } else {
1115:Drivers/BME680/bme680.c **** rslt = BME680_E_NULL_PTR;
1116:Drivers/BME680/bme680.c **** }
1117:Drivers/BME680/bme680.c ****
1118:Drivers/BME680/bme680.c **** return rslt;
1119:Drivers/BME680/bme680.c **** }
1120:Drivers/BME680/bme680.c ****
1121:Drivers/BME680/bme680.c **** /*!
1122:Drivers/BME680/bme680.c **** * @brief This internal API is used to validate the device structure pointer for
1123:Drivers/BME680/bme680.c **** * null conditions.
1124:Drivers/BME680/bme680.c **** */
1125:Drivers/BME680/bme680.c **** static int8_t null_ptr_check(const struct bme680_dev *dev)
1126:Drivers/BME680/bme680.c **** {
1127:Drivers/BME680/bme680.c **** int8_t rslt;
1128:Drivers/BME680/bme680.c ****
1129:Drivers/BME680/bme680.c **** if ((dev == NULL) || (dev->read == NULL) || (dev->write == NULL) || (dev->delay_ms == NULL)) {
43 .loc 1 1129 0
44 0006 33D0 beq .L4
45 0008 8D6C ldr r5, [r1, #72]
46 000a 002D cmp r5, #0
47 000c 33D0 beq .L5
48 000e CB6C ldr r3, [r1, #76]
49 0010 002B cmp r3, #0
50 0012 33D0 beq .L6
51 0014 0B6D ldr r3, [r1, #80]
52 0016 002B cmp r3, #0
53 0018 33D0 beq .L7
54 .LVL2:
55 .LBE52:
56 .LBE51:
1045:Drivers/BME680/bme680.c **** mem_page = BME680_MEM_PAGE1;
57 .loc 1 1045 0
58 001a 40B2 sxtb r0, r0
59 001c 0028 cmp r0, #0
60 001e 25DB blt .L12
1048:Drivers/BME680/bme680.c ****
61 .loc 1 1048 0
62 0020 1023 movs r3, #16
63 .L3:
64 .LVL3:
1050:Drivers/BME680/bme680.c **** dev->mem_page = mem_page;
65 .loc 1 1050 0
66 0022 E278 ldrb r2, [r4, #3]
ARM GAS /tmp/ccvbgJts.s page 22
67 0024 9A42 cmp r2, r3
68 0026 2FD0 beq .L9
1051:Drivers/BME680/bme680.c ****
69 .loc 1 1051 0
70 0028 E370 strb r3, [r4, #3]
1053:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
71 .loc 1 1053 0
72 002a 6078 ldrb r0, [r4, #1]
73 .LVL4:
74 002c 0123 movs r3, #1
75 .LVL5:
76 002e 6A46 mov r2, sp
77 0030 0732 adds r2, r2, #7
78 0032 F321 movs r1, #243
79 .LVL6:
80 0034 A847 blx r5
81 .LVL7:
82 0036 5423 movs r3, #84
83 0038 E054 strb r0, [r4, r3]
1054:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
84 .loc 1 1054 0
85 003a 0028 cmp r0, #0
86 003c 26D1 bne .L10
87 .LVL8:
1058:Drivers/BME680/bme680.c **** reg = reg | (dev->mem_page & BME680_MEM_PAGE_MSK);
88 .loc 1 1058 0
89 003e 6B46 mov r3, sp
90 0040 DA1D adds r2, r3, #7
91 0042 1378 ldrb r3, [r2]
92 0044 1021 movs r1, #16
93 0046 8B43 bics r3, r1
94 0048 1900 movs r1, r3
1059:Drivers/BME680/bme680.c ****
95 .loc 1 1059 0
96 004a 0320 movs r0, #3
97 004c 2056 ldrsb r0, [r4, r0]
98 004e 1023 movs r3, #16
99 0050 0340 ands r3, r0
100 0052 0B43 orrs r3, r1
101 0054 1370 strb r3, [r2]
1061:Drivers/BME680/bme680.c **** &reg, 1);
102 .loc 1 1061 0
103 0056 6078 ldrb r0, [r4, #1]
104 0058 0123 movs r3, #1
105 005a 7321 movs r1, #115
106 005c E56C ldr r5, [r4, #76]
107 005e A847 blx r5
108 .LVL9:
109 0060 5422 movs r2, #84
110 0062 A054 strb r0, [r4, r2]
1063:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
111 .loc 1 1063 0
112 0064 0028 cmp r0, #0
113 0066 14D1 bne .L13
114 .LVL10:
115 .L2:
1070:Drivers/BME680/bme680.c ****
ARM GAS /tmp/ccvbgJts.s page 23
116 .loc 1 1070 0
117 0068 03B0 add sp, sp, #12
118 @ sp needed
119 .LVL11:
120 006a 30BD pop {r4, r5, pc}
121 .LVL12:
122 .L12:
1046:Drivers/BME680/bme680.c **** else
123 .loc 1 1046 0
124 006c 0023 movs r3, #0
125 006e D8E7 b .L3
126 .LVL13:
127 .L4:
128 .LBB54:
129 .LBB53:
1130:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1131:Drivers/BME680/bme680.c **** rslt = BME680_E_NULL_PTR;
130 .loc 1 1131 0
131 0070 0120 movs r0, #1
132 .LVL14:
133 0072 4042 rsbs r0, r0, #0
134 0074 F8E7 b .L2
135 .LVL15:
136 .L5:
137 0076 0120 movs r0, #1
138 .LVL16:
139 0078 4042 rsbs r0, r0, #0
140 007a F5E7 b .L2
141 .LVL17:
142 .L6:
143 007c 0120 movs r0, #1
144 .LVL18:
145 007e 4042 rsbs r0, r0, #0
146 0080 F2E7 b .L2
147 .LVL19:
148 .L7:
149 0082 0120 movs r0, #1
150 .LVL20:
151 0084 4042 rsbs r0, r0, #0
152 0086 EFE7 b .L2
153 .LVL21:
154 .L9:
1132:Drivers/BME680/bme680.c **** } else {
1133:Drivers/BME680/bme680.c **** /* Device structure is fine */
1134:Drivers/BME680/bme680.c **** rslt = BME680_OK;
155 .loc 1 1134 0
156 0088 0020 movs r0, #0
157 008a EDE7 b .L2
158 .LVL22:
159 .L10:
160 .LBE53:
161 .LBE54:
1055:Drivers/BME680/bme680.c ****
162 .loc 1 1055 0
163 008c 0220 movs r0, #2
164 008e 4042 rsbs r0, r0, #0
165 0090 EAE7 b .L2
ARM GAS /tmp/ccvbgJts.s page 24
166 .LVL23:
167 .L13:
1064:Drivers/BME680/bme680.c **** }
168 .loc 1 1064 0
169 0092 0220 movs r0, #2
170 0094 4042 rsbs r0, r0, #0
171 0096 E7E7 b .L2
172 .cfi_endproc
173 .LFE21:
175 .section .text.get_mem_page,"ax",%progbits
176 .align 1
177 .syntax unified
178 .code 16
179 .thumb_func
180 .fpu softvfp
182 get_mem_page:
183 .LFB22:
1076:Drivers/BME680/bme680.c **** int8_t rslt;
184 .loc 1 1076 0
185 .cfi_startproc
186 @ args = 0, pretend = 0, frame = 8
187 @ frame_needed = 0, uses_anonymous_args = 0
188 .LVL24:
189 0000 30B5 push {r4, r5, lr}
190 .LCFI2:
191 .cfi_def_cfa_offset 12
192 .cfi_offset 4, -12
193 .cfi_offset 5, -8
194 .cfi_offset 14, -4
195 0002 83B0 sub sp, sp, #12
196 .LCFI3:
197 .cfi_def_cfa_offset 24
198 0004 041E subs r4, r0, #0
199 .LVL25:
200 .LBB55:
201 .LBB56:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
202 .loc 1 1129 0
203 0006 19D0 beq .L16
204 0008 856C ldr r5, [r0, #72]
205 000a 002D cmp r5, #0
206 000c 19D0 beq .L17
207 000e C36C ldr r3, [r0, #76]
208 0010 002B cmp r3, #0
209 0012 19D0 beq .L18
210 0014 036D ldr r3, [r0, #80]
211 0016 002B cmp r3, #0
212 0018 19D0 beq .L19
213 .LVL26:
214 .LBE56:
215 .LBE55:
1083:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
216 .loc 1 1083 0
217 001a 4078 ldrb r0, [r0, #1]
218 .LVL27:
219 001c 0123 movs r3, #1
220 001e 6A46 mov r2, sp
ARM GAS /tmp/ccvbgJts.s page 25
221 0020 0732 adds r2, r2, #7
222 0022 F321 movs r1, #243
223 0024 A847 blx r5
224 .LVL28:
225 0026 5422 movs r2, #84
226 0028 A054 strb r0, [r4, r2]
1084:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
227 .loc 1 1084 0
228 002a 0028 cmp r0, #0
229 002c 12D1 bne .L20
1087:Drivers/BME680/bme680.c **** }
230 .loc 1 1087 0
231 002e 6B46 mov r3, sp
232 0030 DA79 ldrb r2, [r3, #7]
233 0032 1023 movs r3, #16
234 0034 1340 ands r3, r2
235 0036 E370 strb r3, [r4, #3]
236 .L15:
237 .LVL29:
1091:Drivers/BME680/bme680.c ****
238 .loc 1 1091 0
239 0038 03B0 add sp, sp, #12
240 @ sp needed
241 .LVL30:
242 003a 30BD pop {r4, r5, pc}
243 .LVL31:
244 .L16:
245 .LBB58:
246 .LBB57:
1131:Drivers/BME680/bme680.c **** } else {
247 .loc 1 1131 0
248 003c 0120 movs r0, #1
249 .LVL32:
250 003e 4042 rsbs r0, r0, #0
251 0040 FAE7 b .L15
252 .LVL33:
253 .L17:
254 0042 0120 movs r0, #1
255 .LVL34:
256 0044 4042 rsbs r0, r0, #0
257 0046 F7E7 b .L15
258 .LVL35:
259 .L18:
260 0048 0120 movs r0, #1
261 .LVL36:
262 004a 4042 rsbs r0, r0, #0
263 004c F4E7 b .L15
264 .LVL37:
265 .L19:
266 004e 0120 movs r0, #1
267 .LVL38:
268 0050 4042 rsbs r0, r0, #0
269 0052 F1E7 b .L15
270 .LVL39:
271 .L20:
272 .LBE57:
273 .LBE58:
ARM GAS /tmp/ccvbgJts.s page 26
1085:Drivers/BME680/bme680.c **** else
274 .loc 1 1085 0
275 0054 0220 movs r0, #2
276 0056 4042 rsbs r0, r0, #0
277 0058 EEE7 b .L15
278 .cfi_endproc
279 .LFE22:
281 .section .text.bme680_get_regs,"ax",%progbits
282 .align 1
283 .global bme680_get_regs
284 .syntax unified
285 .code 16
286 .thumb_func
287 .fpu softvfp
289 bme680_get_regs:
290 .LFB1:
265:Drivers/BME680/bme680.c **** int8_t rslt;
291 .loc 1 265 0
292 .cfi_startproc
293 @ args = 0, pretend = 0, frame = 8
294 @ frame_needed = 0, uses_anonymous_args = 0
295 .LVL40:
296 0000 F0B5 push {r4, r5, r6, r7, lr}
297 .LCFI4:
298 .cfi_def_cfa_offset 20
299 .cfi_offset 4, -20
300 .cfi_offset 5, -16
301 .cfi_offset 6, -12
302 .cfi_offset 7, -8
303 .cfi_offset 14, -4
304 0002 83B0 sub sp, sp, #12
305 .LCFI5:
306 .cfi_def_cfa_offset 32
307 0004 0500 movs r5, r0
308 0006 0191 str r1, [sp, #4]
309 0008 1700 movs r7, r2
310 000a 1E1E subs r6, r3, #0
311 .LVL41:
312 .LBB59:
313 .LBB60:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
314 .loc 1 1129 0
315 000c 23D0 beq .L24
316 000e 9B6C ldr r3, [r3, #72]
317 .LVL42:
318 0010 002B cmp r3, #0
319 0012 23D0 beq .L25
320 0014 F36C ldr r3, [r6, #76]
321 0016 002B cmp r3, #0
322 0018 23D0 beq .L26
323 001a 336D ldr r3, [r6, #80]
324 001c 002B cmp r3, #0
325 001e 23D0 beq .L27
326 .LVL43:
327 .LBE60:
328 .LBE59:
271:Drivers/BME680/bme680.c **** /* Set the memory page */
ARM GAS /tmp/ccvbgJts.s page 27
329 .loc 1 271 0
330 0020 B378 ldrb r3, [r6, #2]
331 0022 002B cmp r3, #0
332 0024 0DD0 beq .L30
333 .LBB63:
334 .LBB61:
335 .loc 1 1134 0
336 0026 0024 movs r4, #0
337 .LVL44:
338 .L23:
339 .LBE61:
340 .LBE63:
277:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
341 .loc 1 277 0
342 0028 7078 ldrb r0, [r6, #1]
343 002a 3B00 movs r3, r7
344 002c 019A ldr r2, [sp, #4]
345 002e 2900 movs r1, r5
346 0030 B56C ldr r5, [r6, #72]
347 .LVL45:
348 0032 A847 blx r5
349 .LVL46:
350 0034 5423 movs r3, #84
351 0036 F054 strb r0, [r6, r3]
278:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
352 .loc 1 278 0
353 0038 0028 cmp r0, #0
354 003a 18D1 bne .L31
355 .LVL47:
356 .L22:
283:Drivers/BME680/bme680.c ****
357 .loc 1 283 0
358 003c 2000 movs r0, r4
359 003e 03B0 add sp, sp, #12
360 @ sp needed
361 .LVL48:
362 .LVL49:
363 0040 F0BD pop {r4, r5, r6, r7, pc}
364 .LVL50:
365 .L30:
273:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
366 .loc 1 273 0
367 0042 3100 movs r1, r6
368 .LVL51:
369 0044 FFF7FEFF bl set_mem_page
370 .LVL52:
371 0048 041E subs r4, r0, #0
372 .LVL53:
274:Drivers/BME680/bme680.c **** reg_addr = reg_addr | BME680_SPI_RD_MSK;
373 .loc 1 274 0
374 004a EDD1 bne .L23
275:Drivers/BME680/bme680.c **** }
375 .loc 1 275 0
376 004c 8023 movs r3, #128
377 004e 5B42 rsbs r3, r3, #0
378 0050 1D43 orrs r5, r3
379 0052 EDB2 uxtb r5, r5
ARM GAS /tmp/ccvbgJts.s page 28
380 .LVL54:
381 0054 E8E7 b .L23
382 .LVL55:
383 .L24:
384 .LBB64:
385 .LBB62:
1131:Drivers/BME680/bme680.c **** } else {
386 .loc 1 1131 0
387 0056 0124 movs r4, #1
388 0058 6442 rsbs r4, r4, #0
389 005a EFE7 b .L22
390 .LVL56:
391 .L25:
392 005c 0124 movs r4, #1
393 005e 6442 rsbs r4, r4, #0
394 0060 ECE7 b .L22
395 .L26:
396 0062 0124 movs r4, #1
397 0064 6442 rsbs r4, r4, #0
398 0066 E9E7 b .L22
399 .L27:
400 0068 0124 movs r4, #1
401 006a 6442 rsbs r4, r4, #0
402 006c E6E7 b .L22
403 .LVL57:
404 .L31:
405 .LBE62:
406 .LBE64:
279:Drivers/BME680/bme680.c **** }
407 .loc 1 279 0
408 006e 0224 movs r4, #2
409 .LVL58:
410 0070 6442 rsbs r4, r4, #0
411 0072 E3E7 b .L22
412 .cfi_endproc
413 .LFE1:
415 .section .text.bme680_set_regs,"ax",%progbits
416 .align 1
417 .global bme680_set_regs
418 .syntax unified
419 .code 16
420 .thumb_func
421 .fpu softvfp
423 bme680_set_regs:
424 .LFB2:
290:Drivers/BME680/bme680.c **** int8_t rslt;
425 .loc 1 290 0
426 .cfi_startproc
427 @ args = 0, pretend = 0, frame = 48
428 @ frame_needed = 0, uses_anonymous_args = 0
429 .LVL59:
430 0000 F0B5 push {r4, r5, r6, r7, lr}
431 .LCFI6:
432 .cfi_def_cfa_offset 20
433 .cfi_offset 4, -20
434 .cfi_offset 5, -16
435 .cfi_offset 6, -12
ARM GAS /tmp/ccvbgJts.s page 29
436 .cfi_offset 7, -8
437 .cfi_offset 14, -4
438 0002 D646 mov lr, r10
439 0004 00B5 push {lr}
440 .LCFI7:
441 .cfi_def_cfa_offset 24
442 .cfi_offset 10, -24
443 0006 8CB0 sub sp, sp, #48
444 .LCFI8:
445 .cfi_def_cfa_offset 72
446 0008 0500 movs r5, r0
447 000a 0E00 movs r6, r1
448 000c 1400 movs r4, r2
449 000e 0092 str r2, [sp]
450 0010 1F00 movs r7, r3
293:Drivers/BME680/bme680.c **** uint16_t index;
451 .loc 1 293 0
452 0012 2822 movs r2, #40
453 .LVL60:
454 0014 0021 movs r1, #0
455 .LVL61:
456 0016 02A8 add r0, sp, #8
457 .LVL62:
458 0018 FFF7FEFF bl memset
459 .LVL63:
460 .LBB65:
461 .LBB66:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
462 .loc 1 1129 0
463 001c 002F cmp r7, #0
464 001e 4AD0 beq .L38
465 0020 BB6C ldr r3, [r7, #72]
466 0022 002B cmp r3, #0
467 0024 4BD0 beq .L39
468 0026 FB6C ldr r3, [r7, #76]
469 0028 002B cmp r3, #0
470 002a 4CD0 beq .L40
471 002c 3B6D ldr r3, [r7, #80]
472 002e 002B cmp r3, #0
473 0030 4DD0 beq .L41
474 .LVL64:
475 .LBE66:
476 .LBE65:
299:Drivers/BME680/bme680.c **** /* Interleave the 2 arrays */
477 .loc 1 299 0
478 0032 631E subs r3, r4, #1
479 0034 DBB2 uxtb r3, r3
480 0036 122B cmp r3, #18
481 0038 03D8 bhi .L44
301:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF) {
482 .loc 1 301 0
483 003a 0024 movs r4, #0
484 .LBB69:
485 .LBB67:
486 .loc 1 1134 0
487 003c 0023 movs r3, #0
488 003e 0193 str r3, [sp, #4]
ARM GAS /tmp/ccvbgJts.s page 30
489 0040 18E0 b .L34
490 .L44:
491 .LBE67:
492 .LBE69:
318:Drivers/BME680/bme680.c **** }
493 .loc 1 318 0
494 0042 0423 movs r3, #4
495 0044 5B42 rsbs r3, r3, #0
496 0046 0193 str r3, [sp, #4]
497 0048 30E0 b .L33
498 .LVL65:
499 .L46:
304:Drivers/BME680/bme680.c **** tmp_buff[(2 * index)] = reg_addr[index] & BME680_SPI_WR_MSK;
500 .loc 1 304 0
501 004a 2B19 adds r3, r5, r4
502 004c 9A46 mov r10, r3
503 004e 1878 ldrb r0, [r3]
504 0050 3900 movs r1, r7
505 0052 FFF7FEFF bl set_mem_page
506 .LVL66:
507 0056 0190 str r0, [sp, #4]
508 .LVL67:
305:Drivers/BME680/bme680.c **** } else {
509 .loc 1 305 0
510 0058 6300 lsls r3, r4, #1
511 005a 5246 mov r2, r10
512 005c 1178 ldrb r1, [r2]
513 005e 7F22 movs r2, #127
514 0060 0A40 ands r2, r1
515 0062 02A9 add r1, sp, #8
516 0064 CA54 strb r2, [r1, r3]
517 .LVL68:
518 .L36:
309:Drivers/BME680/bme680.c **** }
519 .loc 1 309 0 discriminator 2
520 0066 6300 lsls r3, r4, #1
521 0068 0133 adds r3, r3, #1
522 006a 325D ldrb r2, [r6, r4]
523 006c 02A9 add r1, sp, #8
524 006e CA54 strb r2, [r1, r3]
301:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF) {
525 .loc 1 301 0 discriminator 2
526 0070 0134 adds r4, r4, #1
527 .LVL69:
528 0072 A4B2 uxth r4, r4
529 .LVL70:
530 .L34:
301:Drivers/BME680/bme680.c **** if (dev->intf == BME680_SPI_INTF) {
531 .loc 1 301 0 is_stmt 0 discriminator 1
532 0074 6B46 mov r3, sp
533 0076 1B88 ldrh r3, [r3]
534 0078 A342 cmp r3, r4
535 007a 07D9 bls .L45
302:Drivers/BME680/bme680.c **** /* Set the memory page */
536 .loc 1 302 0 is_stmt 1
537 007c BB78 ldrb r3, [r7, #2]
538 007e 002B cmp r3, #0
ARM GAS /tmp/ccvbgJts.s page 31
539 0080 E3D0 beq .L46
307:Drivers/BME680/bme680.c **** }
540 .loc 1 307 0
541 0082 6300 lsls r3, r4, #1
542 0084 2A5D ldrb r2, [r5, r4]
543 0086 02A9 add r1, sp, #8
544 0088 CA54 strb r2, [r1, r3]
545 008a ECE7 b .L36
546 .L45:
312:Drivers/BME680/bme680.c **** dev->com_rslt = dev->write(dev->dev_id, tmp_buff[0], &tmp_buff[1], (2 * len) - 1);
547 .loc 1 312 0
548 008c 019A ldr r2, [sp, #4]
549 008e 002A cmp r2, #0
550 0090 0CD1 bne .L33
313:Drivers/BME680/bme680.c **** if (dev->com_rslt != 0)
551 .loc 1 313 0
552 0092 5B00 lsls r3, r3, #1
553 0094 013B subs r3, r3, #1
554 0096 9BB2 uxth r3, r3
555 0098 02AA add r2, sp, #8
556 009a 1178 ldrb r1, [r2]
557 009c 7878 ldrb r0, [r7, #1]
558 009e 0132 adds r2, r2, #1
559 00a0 FC6C ldr r4, [r7, #76]
560 .LVL71:
561 00a2 A047 blx r4
562 .LVL72:
563 00a4 5423 movs r3, #84
564 00a6 F854 strb r0, [r7, r3]
314:Drivers/BME680/bme680.c **** rslt = BME680_E_COM_FAIL;
565 .loc 1 314 0
566 00a8 0028 cmp r0, #0
567 00aa 14D1 bne .L47
568 .LVL73:
569 .L33:
323:Drivers/BME680/bme680.c ****
570 .loc 1 323 0
571 00ac 0198 ldr r0, [sp, #4]
572 00ae 0CB0 add sp, sp, #48
573 @ sp needed
574 .LVL74:
575 .LVL75:
576 .LVL76:
577 00b0 04BC pop {r2}
578 00b2 9246 mov r10, r2
579 00b4 F0BD pop {r4, r5, r6, r7, pc}
580 .LVL77:
581 .L38:
582 .LBB70:
583 .LBB68:
1131:Drivers/BME680/bme680.c **** } else {
584 .loc 1 1131 0
585 00b6 0123 movs r3, #1
586 00b8 5B42 rsbs r3, r3, #0
587 00ba 0193 str r3, [sp, #4]
588 00bc F6E7 b .L33
589 .L39:
ARM GAS /tmp/ccvbgJts.s page 32
590 00be 0123 movs r3, #1
591 00c0 5B42 rsbs r3, r3, #0
592 00c2 0193 str r3, [sp, #4]
593 00c4 F2E7 b .L33
594 .L40:
595 00c6 0123 movs r3, #1
596 00c8 5B42 rsbs r3, r3, #0
597 00ca 0193 str r3, [sp, #4]
598 00cc EEE7 b .L33
599 .L41:
600 00ce 0123 movs r3, #1
601 00d0 5B42 rsbs r3, r3, #0
602 00d2 0193 str r3, [sp, #4]
603 00d4 EAE7 b .L33
604 .LVL78:
605 .L47:
606 .LBE68:
607 .LBE70:
315:Drivers/BME680/bme680.c **** }
608 .loc 1 315 0
609 00d6 0223 movs r3, #2
610 00d8 5B42 rsbs r3, r3, #0
611 00da 0193 str r3, [sp, #4]
612 .LVL79:
613 00dc E6E7 b .L33
614 .cfi_endproc
615 .LFE2:
617 .section .text.bme680_soft_reset,"ax",%progbits
618 .align 1
619 .global bme680_soft_reset
620 .syntax unified
621 .code 16
622 .thumb_func
623 .fpu softvfp
625 bme680_soft_reset:
626 .LFB3:
329:Drivers/BME680/bme680.c **** int8_t rslt;
627 .loc 1 329 0
628 .cfi_startproc
629 @ args = 0, pretend = 0, frame = 8
630 @ frame_needed = 0, uses_anonymous_args = 0
631 .LVL80:
632 0000 30B5 push {r4, r5, lr}
633 .LCFI9:
634 .cfi_def_cfa_offset 12
635 .cfi_offset 4, -12
636 .cfi_offset 5, -8
637 .cfi_offset 14, -4
638 0002 83B0 sub sp, sp, #12
639 .LCFI10:
640 .cfi_def_cfa_offset 24
641 0004 0400 movs r4, r0
331:Drivers/BME680/bme680.c **** /* 0xb6 is the soft reset command */
642 .loc 1 331 0
643 0006 6B46 mov r3, sp
644 0008 E022 movs r2, #224
645 000a DA71 strb r2, [r3, #7]
ARM GAS /tmp/ccvbgJts.s page 33
333:Drivers/BME680/bme680.c ****
646 .loc 1 333 0
647 000c 6B46 mov r3, sp
648 000e 2A3A subs r2, r2, #42
649 0010 9A71 strb r2, [r3, #6]
650 .LVL81:
651 .LBB71:
652 .LBB72:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
653 .loc 1 1129 0
654 0012 0028 cmp r0, #0
655 0014 2BD0 beq .L51
656 0016 836C ldr r3, [r0, #72]
657 0018 002B cmp r3, #0
658 001a 2BD0 beq .L52
659 001c C36C ldr r3, [r0, #76]
660 001e 002B cmp r3, #0
661 0020 2BD0 beq .L53
662 0022 036D ldr r3, [r0, #80]
663 0024 002B cmp r3, #0
664 0026 2BD0 beq .L54
665 .LVL82:
666 .LBE72:
667 .LBE71:
338:Drivers/BME680/bme680.c **** rslt = get_mem_page(dev);
668 .loc 1 338 0
669 0028 8378 ldrb r3, [r0, #2]
670 002a 002B cmp r3, #0
671 002c 05D0 beq .L56
672 .LBB75:
673 .LBB73:
674 .loc 1 1134 0
675 002e 0025 movs r5, #0
676 .LVL83:
677 .L50:
678 .LBE73:
679 .LBE75:
342:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &soft_rst_cmd, 1, dev);
680 .loc 1 342 0
681 0030 002D cmp r5, #0
682 0032 06D0 beq .L57
683 .LVL84:
684 .L49:
356:Drivers/BME680/bme680.c ****
685 .loc 1 356 0
686 0034 2800 movs r0, r5
687 0036 03B0 add sp, sp, #12
688 @ sp needed
689 .LVL85:
690 .LVL86:
691 0038 30BD pop {r4, r5, pc}
692 .LVL87:
693 .L56:
339:Drivers/BME680/bme680.c ****
694 .loc 1 339 0
695 003a FFF7FEFF bl get_mem_page
696 .LVL88:
ARM GAS /tmp/ccvbgJts.s page 34
697 003e 0500 movs r5, r0
698 .LVL89:
699 0040 F6E7 b .L50
700 .LVL90:
701 .L57:
343:Drivers/BME680/bme680.c **** /* Wait for 5ms */
702 .loc 1 343 0
703 0042 2300 movs r3, r4
704 0044 0122 movs r2, #1
705 0046 6946 mov r1, sp
706 0048 0631 adds r1, r1, #6
707 004a 6846 mov r0, sp
708 004c 0730 adds r0, r0, #7
709 004e FFF7FEFF bl bme680_set_regs
710 .LVL91:
711 0052 0500 movs r5, r0
712 .LVL92:
345:Drivers/BME680/bme680.c ****
713 .loc 1 345 0
714 0054 0A20 movs r0, #10
715 .LVL93:
716 0056 236D ldr r3, [r4, #80]
717 0058 9847 blx r3
718 .LVL94:
347:Drivers/BME680/bme680.c **** /* After reset get the memory page */
719 .loc 1 347 0
720 005a 002D cmp r5, #0
721 005c EAD1 bne .L49
349:Drivers/BME680/bme680.c **** rslt = get_mem_page(dev);
722 .loc 1 349 0
723 005e A378 ldrb r3, [r4, #2]
724 0060 002B cmp r3, #0
725 0062 E7D1 bne .L49
350:Drivers/BME680/bme680.c **** }
726 .loc 1 350 0
727 0064 2000 movs r0, r4
728 0066 FFF7FEFF bl get_mem_page
729 .LVL95:
730 006a 0500 movs r5, r0
731 .LVL96:
732 006c E2E7 b .L49
733 .LVL97:
734 .L51:
735 .LBB76:
736 .LBB74:
1131:Drivers/BME680/bme680.c **** } else {
737 .loc 1 1131 0
738 006e 0125 movs r5, #1
739 0070 6D42 rsbs r5, r5, #0
740 0072 DFE7 b .L49
741 .L52:
742 0074 0125 movs r5, #1
743 0076 6D42 rsbs r5, r5, #0
744 0078 DCE7 b .L49
745 .L53:
746 007a 0125 movs r5, #1
747 007c 6D42 rsbs r5, r5, #0
ARM GAS /tmp/ccvbgJts.s page 35
748 007e D9E7 b .L49
749 .L54:
750 0080 0125 movs r5, #1
751 0082 6D42 rsbs r5, r5, #0
752 0084 D6E7 b .L49
753 .LBE74:
754 .LBE76:
755 .cfi_endproc
756 .LFE3:
758 .section .text.bme680_init,"ax",%progbits
759 .align 1
760 .global bme680_init
761 .syntax unified
762 .code 16
763 .thumb_func
764 .fpu softvfp
766 bme680_init:
767 .LFB0:
237:Drivers/BME680/bme680.c **** int8_t rslt;
768 .loc 1 237 0
769 .cfi_startproc
770 @ args = 0, pretend = 0, frame = 72
771 @ frame_needed = 0, uses_anonymous_args = 0
772 .LVL98:
773 0000 F0B5 push {r4, r5, r6, r7, lr}
774 .LCFI11:
775 .cfi_def_cfa_offset 20
776 .cfi_offset 4, -20
777 .cfi_offset 5, -16
778 .cfi_offset 6, -12
779 .cfi_offset 7, -8
780 .cfi_offset 14, -4
781 0002 93B0 sub sp, sp, #76
782 .LCFI12:
783 .cfi_def_cfa_offset 96
784 0004 041E subs r4, r0, #0
785 .LVL99:
786 .LBB83:
787 .LBB84:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
788 .loc 1 1129 0
789 0006 00D1 bne .LCB858
790 0008 E1E0 b .L63 @long jump
791 .LCB858:
792 000a 836C ldr r3, [r0, #72]
793 000c 002B cmp r3, #0
794 000e 00D1 bne .LCB862
795 0010 E0E0 b .L64 @long jump
796 .LCB862:
797 0012 C36C ldr r3, [r0, #76]
798 0014 002B cmp r3, #0
799 0016 00D1 bne .LCB866
800 0018 DFE0 b .L65 @long jump
801 .LCB866:
802 001a 036D ldr r3, [r0, #80]
803 001c 002B cmp r3, #0
804 001e 00D1 bne .LCB870
ARM GAS /tmp/ccvbgJts.s page 36
805 0020 DEE0 b .L66 @long jump
806 .LCB870:
807 .LVL100:
808 .LBE84:
809 .LBE83:
244:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
810 .loc 1 244 0
811 0022 FFF7FEFF bl bme680_soft_reset
812 .LVL101:
245:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_CHIP_ID_ADDR, &dev->chip_id, 1, dev);
813 .loc 1 245 0
814 0026 0028 cmp r0, #0
815 0028 01D0 beq .L72
816 .LVL102:
817 .L59:
259:Drivers/BME680/bme680.c ****
818 .loc 1 259 0
819 002a 13B0 add sp, sp, #76
820 @ sp needed
821 .LVL103:
822 002c F0BD pop {r4, r5, r6, r7, pc}
823 .LVL104:
824 .L72:
246:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
825 .loc 1 246 0
826 002e 2300 movs r3, r4
827 0030 0122 movs r2, #1
828 0032 2100 movs r1, r4
829 0034 D030 adds r0, r0, #208
830 .LVL105:
831 0036 FFF7FEFF bl bme680_get_regs
832 .LVL106:
247:Drivers/BME680/bme680.c **** if (dev->chip_id == BME680_CHIP_ID) {
833 .loc 1 247 0
834 003a 0028 cmp r0, #0
835 003c F5D1 bne .L59
248:Drivers/BME680/bme680.c **** /* Get the Calibration data */
836 .loc 1 248 0
837 003e 2378 ldrb r3, [r4]
838 0040 612B cmp r3, #97
839 0042 00D0 beq .LCB912
840 0044 CFE0 b .L67 @long jump
841 .LCB912:
842 .LVL107:
843 .LBB86:
844 .LBB87:
668:Drivers/BME680/bme680.c **** uint8_t temp_var = 0; /* Temporary variable */
845 .loc 1 668 0
846 0046 4122 movs r2, #65
847 0048 0021 movs r1, #0
848 004a 01A8 add r0, sp, #4
849 .LVL108:
850 004c FFF7FEFF bl memset
851 .LVL109:
669:Drivers/BME680/bme680.c ****
852 .loc 1 669 0
853 0050 6B46 mov r3, sp
ARM GAS /tmp/ccvbgJts.s page 37
854 0052 0022 movs r2, #0
855 0054 DA70 strb r2, [r3, #3]
856 .LVL110:
857 .LBB88:
858 .LBB89:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
859 .loc 1 1129 0
860 0056 002C cmp r4, #0
861 0058 00D1 bne .LCB929
862 005a ACE0 b .L68 @long jump
863 .LCB929:
864 005c A36C ldr r3, [r4, #72]
865 005e 002B cmp r3, #0
866 0060 00D1 bne .LCB933
867 0062 ABE0 b .L69 @long jump
868 .LCB933:
869 0064 E36C ldr r3, [r4, #76]
870 0066 002B cmp r3, #0
871 0068 00D1 bne .LCB937
872 006a AAE0 b .L70 @long jump
873 .LCB937:
874 006c 236D ldr r3, [r4, #80]
875 006e 002B cmp r3, #0
876 0070 00D1 bne .LCB941
877 0072 A9E0 b .L71 @long jump
878 .LCB941:
879 .LVL111:
880 .LBE89:
881 .LBE88:
674:Drivers/BME680/bme680.c **** /* Append the second half in the same array */
882 .loc 1 674 0
883 0074 2300 movs r3, r4
884 0076 1932 adds r2, r2, #25
885 0078 01A9 add r1, sp, #4
886 007a 8920 movs r0, #137
887 007c FFF7FEFF bl bme680_get_regs
888 .LVL112:
676:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_COEFF_ADDR2, &coeff_array[BME680_COEFF_ADDR1_LEN]
889 .loc 1 676 0
890 0080 0028 cmp r0, #0
891 0082 6BD0 beq .L73
892 .LVL113:
893 .L61:
681:Drivers/BME680/bme680.c **** coeff_array[BME680_T1_LSB_REG]));
894 .loc 1 681 0
895 0084 01AB add r3, sp, #4
896 0086 2222 movs r2, #34
897 0088 995C ldrb r1, [r3, r2]
898 008a 0902 lsls r1, r1, #8
899 008c 013A subs r2, r2, #1
900 008e 9A5C ldrb r2, [r3, r2]
901 0090 0A43 orrs r2, r1
902 0092 E282 strh r2, [r4, #22]
683:Drivers/BME680/bme680.c **** coeff_array[BME680_T2_LSB_REG]));
903 .loc 1 683 0
904 0094 9978 ldrb r1, [r3, #2]
905 0096 0902 lsls r1, r1, #8
ARM GAS /tmp/ccvbgJts.s page 38
906 0098 5A78 ldrb r2, [r3, #1]
907 009a 0A43 orrs r2, r1
908 009c 2283 strh r2, [r4, #24]
685:Drivers/BME680/bme680.c ****
909 .loc 1 685 0
910 009e 0322 movs r2, #3
911 00a0 9A56 ldrsb r2, [r3, r2]
912 00a2 A276 strb r2, [r4, #26]
688:Drivers/BME680/bme680.c **** coeff_array[BME680_P1_LSB_REG]));
913 .loc 1 688 0
914 00a4 9979 ldrb r1, [r3, #6]
915 00a6 0902 lsls r1, r1, #8
916 00a8 5A79 ldrb r2, [r3, #5]
917 00aa 0A43 orrs r2, r1
918 00ac A283 strh r2, [r4, #28]
690:Drivers/BME680/bme680.c **** coeff_array[BME680_P2_LSB_REG]));
919 .loc 1 690 0
920 00ae 197A ldrb r1, [r3, #8]
921 00b0 0902 lsls r1, r1, #8
922 00b2 DA79 ldrb r2, [r3, #7]
923 00b4 0A43 orrs r2, r1
924 00b6 E283 strh r2, [r4, #30]
692:Drivers/BME680/bme680.c **** dev->calib.par_p4 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P4_MSB_REG],
925 .loc 1 692 0
926 00b8 0922 movs r2, #9
927 00ba 9A56 ldrsb r2, [r3, r2]
928 00bc 2026 movs r6, #32
929 00be A255 strb r2, [r4, r6]
693:Drivers/BME680/bme680.c **** coeff_array[BME680_P4_LSB_REG]));
930 .loc 1 693 0
931 00c0 197B ldrb r1, [r3, #12]
932 00c2 0902 lsls r1, r1, #8
933 00c4 DA7A ldrb r2, [r3, #11]
934 00c6 0A43 orrs r2, r1
935 00c8 6284 strh r2, [r4, #34]
695:Drivers/BME680/bme680.c **** coeff_array[BME680_P5_LSB_REG]));
936 .loc 1 695 0
937 00ca 997B ldrb r1, [r3, #14]
938 00cc 0902 lsls r1, r1, #8
939 00ce 5A7B ldrb r2, [r3, #13]
940 00d0 0A43 orrs r2, r1
941 00d2 A284 strh r2, [r4, #36]
697:Drivers/BME680/bme680.c **** dev->calib.par_p7 = (int8_t) (coeff_array[BME680_P7_REG]);
942 .loc 1 697 0
943 00d4 1022 movs r2, #16
944 00d6 9A56 ldrsb r2, [r3, r2]
945 00d8 2625 movs r5, #38
946 00da 6255 strb r2, [r4, r5]
698:Drivers/BME680/bme680.c **** dev->calib.par_p8 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_P8_MSB_REG],
947 .loc 1 698 0
948 00dc 0F21 movs r1, #15
949 00de 5956 ldrsb r1, [r3, r1]
950 00e0 2722 movs r2, #39
951 00e2 A154 strb r1, [r4, r2]
699:Drivers/BME680/bme680.c **** coeff_array[BME680_P8_LSB_REG]));
952 .loc 1 699 0
953 00e4 197D ldrb r1, [r3, #20]
ARM GAS /tmp/ccvbgJts.s page 39
954 00e6 0902 lsls r1, r1, #8
955 00e8 DA7C ldrb r2, [r3, #19]
956 00ea 0A43 orrs r2, r1
957 00ec 2285 strh r2, [r4, #40]
701:Drivers/BME680/bme680.c **** coeff_array[BME680_P9_LSB_REG]));
958 .loc 1 701 0
959 00ee 997D ldrb r1, [r3, #22]
960 00f0 0902 lsls r1, r1, #8
961 00f2 5A7D ldrb r2, [r3, #21]
962 00f4 0A43 orrs r2, r1
963 00f6 6285 strh r2, [r4, #42]
703:Drivers/BME680/bme680.c ****
964 .loc 1 703 0
965 00f8 D97D ldrb r1, [r3, #23]
966 00fa 2C22 movs r2, #44
967 00fc A154 strb r1, [r4, r2]
706:Drivers/BME680/bme680.c **** | (coeff_array[BME680_H1_LSB_REG] & BME680_BIT_H1_DATA_MSK));
968 .loc 1 706 0
969 00fe DF7E ldrb r7, [r3, #27]
970 0100 3F01 lsls r7, r7, #4
707:Drivers/BME680/bme680.c **** dev->calib.par_h2 = (uint16_t) (((uint16_t) coeff_array[BME680_H2_MSB_REG] << BME680_HUM_REG_SHIF
971 .loc 1 707 0
972 0102 9A7E ldrb r2, [r3, #26]
973 0104 0F21 movs r1, #15
974 0106 1140 ands r1, r2
706:Drivers/BME680/bme680.c **** | (coeff_array[BME680_H1_LSB_REG] & BME680_BIT_H1_DATA_MSK));
975 .loc 1 706 0
976 0108 3943 orrs r1, r7
977 010a 2181 strh r1, [r4, #8]
708:Drivers/BME680/bme680.c **** | ((coeff_array[BME680_H2_LSB_REG]) >> BME680_HUM_REG_SHIFT_VAL));
978 .loc 1 708 0
979 010c 597E ldrb r1, [r3, #25]
980 010e 0901 lsls r1, r1, #4
709:Drivers/BME680/bme680.c **** dev->calib.par_h3 = (int8_t) coeff_array[BME680_H3_REG];
981 .loc 1 709 0
982 0110 1209 lsrs r2, r2, #4
708:Drivers/BME680/bme680.c **** | ((coeff_array[BME680_H2_LSB_REG]) >> BME680_HUM_REG_SHIFT_VAL));
983 .loc 1 708 0
984 0112 0A43 orrs r2, r1
985 0114 6281 strh r2, [r4, #10]
710:Drivers/BME680/bme680.c **** dev->calib.par_h4 = (int8_t) coeff_array[BME680_H4_REG];
986 .loc 1 710 0
987 0116 1C22 movs r2, #28
988 0118 9A56 ldrsb r2, [r3, r2]
989 011a 2273 strb r2, [r4, #12]
711:Drivers/BME680/bme680.c **** dev->calib.par_h5 = (int8_t) coeff_array[BME680_H5_REG];
990 .loc 1 711 0
991 011c 1D22 movs r2, #29
992 011e 9A56 ldrsb r2, [r3, r2]
993 0120 6273 strb r2, [r4, #13]
712:Drivers/BME680/bme680.c **** dev->calib.par_h6 = (uint8_t) coeff_array[BME680_H6_REG];
994 .loc 1 712 0
995 0122 1E22 movs r2, #30
996 0124 9A56 ldrsb r2, [r3, r2]
997 0126 A273 strb r2, [r4, #14]
713:Drivers/BME680/bme680.c **** dev->calib.par_h7 = (int8_t) coeff_array[BME680_H7_REG];
998 .loc 1 713 0
ARM GAS /tmp/ccvbgJts.s page 40
999 0128 DA7F ldrb r2, [r3, #31]
1000 012a E273 strb r2, [r4, #15]
714:Drivers/BME680/bme680.c ****
1001 .loc 1 714 0
1002 012c 9A57 ldrsb r2, [r3, r6]
1003 012e 2274 strb r2, [r4, #16]
717:Drivers/BME680/bme680.c **** dev->calib.par_gh2 = (int16_t) (BME680_CONCAT_BYTES(coeff_array[BME680_GH2_MSB_REG],
1004 .loc 1 717 0
1005 0130 2522 movs r2, #37
1006 0132 9A56 ldrsb r2, [r3, r2]
1007 0134 6274 strb r2, [r4, #17]
718:Drivers/BME680/bme680.c **** coeff_array[BME680_GH2_LSB_REG]));
1008 .loc 1 718 0
1009 0136 2422 movs r2, #36
1010 0138 995C ldrb r1, [r3, r2]
1011 013a 0902 lsls r1, r1, #8
1012 013c 013A subs r2, r2, #1
1013 013e 9A5C ldrb r2, [r3, r2]
1014 0140 0A43 orrs r2, r1
1015 0142 6282 strh r2, [r4, #18]
720:Drivers/BME680/bme680.c ****
1016 .loc 1 720 0
1017 0144 5B57 ldrsb r3, [r3, r5]
1018 0146 2375 strb r3, [r4, #20]
723:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RES_HEAT_RANGE_ADDR, &temp_var, 1, dev);
1019 .loc 1 723 0
1020 0148 0028 cmp r0, #0
1021 014a 0FD0 beq .L74
1022 .LVL114:
1023 .L62:
735:Drivers/BME680/bme680.c **** }
1024 .loc 1 735 0
1025 014c 6B46 mov r3, sp
1026 014e 0333 adds r3, r3, #3
1027 0150 1B78 ldrb r3, [r3]
1028 0152 5BB2 sxtb r3, r3
1029 0154 1B11 asrs r3, r3, #4
1030 0156 3622 movs r2, #54
1031 0158 A354 strb r3, [r4, r2]
1032 015a 66E7 b .L59
1033 .L73:
677:Drivers/BME680/bme680.c **** , BME680_COEFF_ADDR2_LEN, dev);
1034 .loc 1 677 0
1035 015c 2300 movs r3, r4
1036 015e 1022 movs r2, #16
1037 0160 1D21 movs r1, #29
1038 0162 6944 add r1, r1, sp
1039 0164 E130 adds r0, r0, #225
1040 .LVL115:
1041 0166 FFF7FEFF bl bme680_get_regs
1042 .LVL116:
1043 016a 8BE7 b .L61
1044 .L74:
724:Drivers/BME680/bme680.c ****
1045 .loc 1 724 0
1046 016c 6B46 mov r3, sp
1047 016e DD1C adds r5, r3, #3
ARM GAS /tmp/ccvbgJts.s page 41
1048 0170 2300 movs r3, r4
1049 0172 0122 movs r2, #1
1050 0174 2900 movs r1, r5
1051 0176 0230 adds r0, r0, #2
1052 .LVL117:
1053 0178 FFF7FEFF bl bme680_get_regs
1054 .LVL118:
726:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1055 .loc 1 726 0
1056 017c 2A78 ldrb r2, [r5]
1057 017e 3023 movs r3, #48
1058 0180 1340 ands r3, r2
1059 0182 1B11 asrs r3, r3, #4
1060 0184 3422 movs r2, #52
1061 0186 A354 strb r3, [r4, r2]
727:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RES_HEAT_VAL_ADDR, &temp_var, 1, dev);
1062 .loc 1 727 0
1063 0188 0028 cmp r0, #0
1064 018a DFD1 bne .L62
728:Drivers/BME680/bme680.c ****
1065 .loc 1 728 0
1066 018c 6B46 mov r3, sp
1067 018e DD1C adds r5, r3, #3
1068 0190 2300 movs r3, r4
1069 0192 333A subs r2, r2, #51
1070 0194 2900 movs r1, r5
1071 0196 FFF7FEFF bl bme680_get_regs
1072 .LVL119:
730:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
1073 .loc 1 730 0
1074 019a 0022 movs r2, #0
1075 019c AA56 ldrsb r2, [r5, r2]
1076 019e 3523 movs r3, #53
1077 01a0 E254 strb r2, [r4, r3]
731:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(BME680_ADDR_RANGE_SW_ERR_ADDR, &temp_var, 1, dev);
1078 .loc 1 731 0
1079 01a2 0028 cmp r0, #0
1080 01a4 D2D1 bne .L62
732:Drivers/BME680/bme680.c **** }
1081 .loc 1 732 0
1082 01a6 2300 movs r3, r4
1083 01a8 0122 movs r2, #1
1084 01aa 6946 mov r1, sp
1085 01ac 0331 adds r1, r1, #3
1086 01ae 0430 adds r0, r0, #4
1087 .LVL120:
1088 01b0 FFF7FEFF bl bme680_get_regs
1089 .LVL121:
1090 01b4 CAE7 b .L62
1091 .LVL122:
1092 .L68:
1093 .LBB91:
1094 .LBB90:
1131:Drivers/BME680/bme680.c **** } else {
1095 .loc 1 1131 0
1096 01b6 0120 movs r0, #1
1097 01b8 4042 rsbs r0, r0, #0
ARM GAS /tmp/ccvbgJts.s page 42
1098 01ba 36E7 b .L59
1099 .L69:
1100 01bc 0120 movs r0, #1
1101 01be 4042 rsbs r0, r0, #0
1102 01c0 33E7 b .L59
1103 .L70:
1104 01c2 0120 movs r0, #1
1105 01c4 4042 rsbs r0, r0, #0
1106 01c6 30E7 b .L59
1107 .L71:
1108 01c8 0120 movs r0, #1
1109 01ca 4042 rsbs r0, r0, #0
1110 .LVL123:
1111 01cc 2DE7 b .L59
1112 .LVL124:
1113 .L63:
1114 .LBE90:
1115 .LBE91:
1116 .LBE87:
1117 .LBE86:
1118 .LBB92:
1119 .LBB85:
1120 01ce 0120 movs r0, #1
1121 .LVL125:
1122 01d0 4042 rsbs r0, r0, #0
1123 01d2 2AE7 b .L59
1124 .LVL126:
1125 .L64:
1126 01d4 0120 movs r0, #1
1127 .LVL127:
1128 01d6 4042 rsbs r0, r0, #0
1129 01d8 27E7 b .L59
1130 .LVL128:
1131 .L65:
1132 01da 0120 movs r0, #1
1133 .LVL129:
1134 01dc 4042 rsbs r0, r0, #0
1135 01de 24E7 b .L59
1136 .LVL130:
1137 .L66:
1138 01e0 0120 movs r0, #1
1139 .LVL131:
1140 01e2 4042 rsbs r0, r0, #0
1141 01e4 21E7 b .L59
1142 .LVL132:
1143 .L67:
1144 .LBE85:
1145 .LBE92:
252:Drivers/BME680/bme680.c **** }
1146 .loc 1 252 0
1147 01e6 0320 movs r0, #3
1148 .LVL133:
1149 01e8 4042 rsbs r0, r0, #0
1150 01ea 1EE7 b .L59
1151 .cfi_endproc
1152 .LFE0:
1154 .section .text.bme680_get_sensor_settings,"ax",%progbits
ARM GAS /tmp/ccvbgJts.s page 43
1155 .align 1
1156 .global bme680_get_sensor_settings
1157 .syntax unified
1158 .code 16
1159 .thumb_func
1160 .fpu softvfp
1162 bme680_get_sensor_settings:
1163 .LFB5:
487:Drivers/BME680/bme680.c **** int8_t rslt;
1164 .loc 1 487 0
1165 .cfi_startproc
1166 @ args = 0, pretend = 0, frame = 24
1167 @ frame_needed = 0, uses_anonymous_args = 0
1168 .LVL134:
1169 0000 70B5 push {r4, r5, r6, lr}
1170 .LCFI13:
1171 .cfi_def_cfa_offset 16
1172 .cfi_offset 4, -16
1173 .cfi_offset 5, -12
1174 .cfi_offset 6, -8
1175 .cfi_offset 14, -4
1176 0002 86B0 sub sp, sp, #24
1177 .LCFI14:
1178 .cfi_def_cfa_offset 40
1179 0004 0600 movs r6, r0
1180 0006 0C00 movs r4, r1
1181 .LVL135:
491:Drivers/BME680/bme680.c ****
1182 .loc 1 491 0
1183 0008 0622 movs r2, #6
1184 000a 0021 movs r1, #0
1185 .LVL136:
1186 000c 04A8 add r0, sp, #16
1187 .LVL137:
1188 000e FFF7FEFF bl memset
1189 .LVL138:
1190 .LBB99:
1191 .LBB100:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1192 .loc 1 1129 0
1193 0012 002C cmp r4, #0
1194 0014 00D1 bne .LCB1301
1195 0016 98E0 b .L89 @long jump
1196 .LCB1301:
1197 0018 A36C ldr r3, [r4, #72]
1198 001a 002B cmp r3, #0
1199 001c 00D1 bne .LCB1305
1200 001e 97E0 b .L90 @long jump
1201 .LCB1305:
1202 0020 E36C ldr r3, [r4, #76]
1203 0022 002B cmp r3, #0
1204 0024 00D1 bne .LCB1309
1205 0026 96E0 b .L91 @long jump
1206 .LCB1309:
1207 0028 236D ldr r3, [r4, #80]
1208 002a 002B cmp r3, #0
1209 002c 00D1 bne .LCB1313
ARM GAS /tmp/ccvbgJts.s page 44
1210 002e 95E0 b .L92 @long jump
1211 .LCB1313:
1212 .LVL139:
1213 .LBE100:
1214 .LBE99:
496:Drivers/BME680/bme680.c ****
1215 .loc 1 496 0
1216 0030 2300 movs r3, r4
1217 0032 0622 movs r2, #6
1218 0034 04A9 add r1, sp, #16
1219 0036 7020 movs r0, #112
1220 0038 FFF7FEFF bl bme680_get_regs
1221 .LVL140:
1222 003c 051E subs r5, r0, #0
1223 .LVL141:
498:Drivers/BME680/bme680.c **** if (desired_settings & BME680_GAS_MEAS_SEL)
1224 .loc 1 498 0
1225 003e 34D1 bne .L76
499:Drivers/BME680/bme680.c **** rslt = get_gas_config(dev);
1226 .loc 1 499 0
1227 0040 3307 lsls r3, r6, #28
1228 0042 35D4 bmi .L99
1229 .LVL142:
1230 .L77:
503:Drivers/BME680/bme680.c **** dev->tph_sett.filter = BME680_GET_BITS(data_array[BME680_REG_FILTER_INDEX],
1231 .loc 1 503 0
1232 0044 F306 lsls r3, r6, #27
1233 0046 06D5 bpl .L85
504:Drivers/BME680/bme680.c **** BME680_FILTER);
1234 .loc 1 504 0
1235 0048 04AB add r3, sp, #16
1236 004a 5A79 ldrb r2, [r3, #5]
1237 004c 9210 asrs r2, r2, #2
1238 004e 0723 movs r3, #7
1239 0050 1340 ands r3, r2
1240 0052 3B22 movs r2, #59
1241 0054 A354 strb r3, [r4, r2]
1242 .L85:
507:Drivers/BME680/bme680.c **** dev->tph_sett.os_temp = BME680_GET_BITS(data_array[BME680_REG_TEMP_INDEX], BME680_OST);
1243 .loc 1 507 0
1244 0056 B307 lsls r3, r6, #30
1245 0058 09D0 beq .L86
508:Drivers/BME680/bme680.c **** dev->tph_sett.os_pres = BME680_GET_BITS(data_array[BME680_REG_PRES_INDEX], BME680_OSP);
1246 .loc 1 508 0
1247 005a 04AB add r3, sp, #16
1248 005c 1B79 ldrb r3, [r3, #4]
1249 005e 5909 lsrs r1, r3, #5
1250 0060 3922 movs r2, #57
1251 0062 A154 strb r1, [r4, r2]
509:Drivers/BME680/bme680.c **** }
1252 .loc 1 509 0
1253 0064 9B10 asrs r3, r3, #2
1254 0066 323A subs r2, r2, #50
1255 0068 1340 ands r3, r2
1256 006a 3332 adds r2, r2, #51
1257 006c A354 strb r3, [r4, r2]
1258 .L86:
ARM GAS /tmp/ccvbgJts.s page 45
512:Drivers/BME680/bme680.c **** dev->tph_sett.os_hum = BME680_GET_BITS_POS_0(data_array[BME680_REG_HUM_INDEX],
1259 .loc 1 512 0
1260 006e 7307 lsls r3, r6, #29
1261 0070 05D5 bpl .L87
513:Drivers/BME680/bme680.c **** BME680_OSH);
1262 .loc 1 513 0
1263 0072 04AB add r3, sp, #16
1264 0074 9A78 ldrb r2, [r3, #2]
1265 0076 0723 movs r3, #7
1266 0078 1340 ands r3, r2
1267 007a 3822 movs r2, #56
1268 007c A354 strb r3, [r4, r2]
1269 .L87:
517:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_ctrl = BME680_GET_BITS_POS_0(data_array[BME680_REG_HCTRL_INDEX],
1270 .loc 1 517 0
1271 007e B306 lsls r3, r6, #26
1272 0080 05D5 bpl .L88
518:Drivers/BME680/bme680.c **** BME680_HCTRL);
1273 .loc 1 518 0
1274 0082 04AB add r3, sp, #16
1275 0084 1A78 ldrb r2, [r3]
1276 0086 0823 movs r3, #8
1277 0088 1340 ands r3, r2
1278 008a 3D22 movs r2, #61
1279 008c A354 strb r3, [r4, r2]
1280 .L88:
521:Drivers/BME680/bme680.c **** dev->gas_sett.nb_conv = BME680_GET_BITS_POS_0(data_array[BME680_REG_NBCONV_INDEX],
1281 .loc 1 521 0
1282 008e C023 movs r3, #192
1283 0090 3342 tst r3, r6
1284 0092 0AD0 beq .L76
522:Drivers/BME680/bme680.c **** BME680_NBCONV);
1285 .loc 1 522 0
1286 0094 04AB add r3, sp, #16
1287 0096 5B78 ldrb r3, [r3, #1]
1288 0098 0F22 movs r2, #15
1289 009a 1A40 ands r2, r3
1290 009c 3C21 movs r1, #60
1291 009e 6254 strb r2, [r4, r1]
524:Drivers/BME680/bme680.c **** BME680_RUN_GAS);
1292 .loc 1 524 0
1293 00a0 1B11 asrs r3, r3, #4
1294 00a2 0122 movs r2, #1
1295 00a4 1340 ands r3, r2
1296 00a6 3D32 adds r2, r2, #61
1297 00a8 A354 strb r3, [r4, r2]
1298 .LVL143:
1299 .L76:
533:Drivers/BME680/bme680.c ****
1300 .loc 1 533 0
1301 00aa 2800 movs r0, r5
1302 00ac 06B0 add sp, sp, #24
1303 @ sp needed
1304 .LVL144:
1305 .LVL145:
1306 00ae 70BD pop {r4, r5, r6, pc}
1307 .LVL146:
ARM GAS /tmp/ccvbgJts.s page 46
1308 .L99:
1309 .LBB101:
1310 .LBB102:
780:Drivers/BME680/bme680.c **** uint8_t index;
1311 .loc 1 780 0
1312 00b0 0A22 movs r2, #10
1313 00b2 0021 movs r1, #0
1314 00b4 01A8 add r0, sp, #4
1315 .LVL147:
1316 00b6 FFF7FEFF bl memset
1317 .LVL148:
1318 .LBB103:
1319 .LBB104:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1320 .loc 1 1129 0
1321 00ba 002C cmp r4, #0
1322 00bc 39D0 beq .L93
1323 00be A36C ldr r3, [r4, #72]
1324 00c0 002B cmp r3, #0
1325 00c2 39D0 beq .L94
1326 00c4 E36C ldr r3, [r4, #76]
1327 00c6 002B cmp r3, #0
1328 00c8 39D0 beq .L95
1329 00ca 236D ldr r3, [r4, #80]
1330 00cc 002B cmp r3, #0
1331 00ce 39D0 beq .L96
1332 .LVL149:
1333 .LBE104:
1334 .LBE103:
786:Drivers/BME680/bme680.c **** /* Memory page switch the SPI address*/
1335 .loc 1 786 0
1336 00d0 A378 ldrb r3, [r4, #2]
1337 00d2 002B cmp r3, #0
1338 00d4 13D0 beq .L100
1339 .LVL150:
1340 .L79:
791:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(reg_addr1, data_array, BME680_GAS_HEATER_PROF_LEN_MAX, dev);
1341 .loc 1 791 0
1342 00d6 002D cmp r5, #0
1343 00d8 B4D1 bne .L77
792:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1344 .loc 1 792 0
1345 00da 2300 movs r3, r4
1346 00dc 0A22 movs r2, #10
1347 00de 01A9 add r1, sp, #4
1348 00e0 5A20 movs r0, #90
1349 00e2 FFF7FEFF bl bme680_get_regs
1350 .LVL151:
793:Drivers/BME680/bme680.c **** for (index = 0; index < BME680_GAS_HEATER_PROF_LEN_MAX; index++)
1351 .loc 1 793 0
1352 00e6 0028 cmp r0, #0
1353 00e8 18D0 beq .L97
1354 .L81:
798:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1355 .loc 1 798 0
1356 00ea 2300 movs r3, r4
1357 00ec 0A22 movs r2, #10
ARM GAS /tmp/ccvbgJts.s page 47
1358 00ee 01A9 add r1, sp, #4
1359 00f0 6420 movs r0, #100
1360 .LVL152:
1361 00f2 FFF7FEFF bl bme680_get_regs
1362 .LVL153:
1363 00f6 051E subs r5, r0, #0
1364 .LVL154:
799:Drivers/BME680/bme680.c **** for (index = 0; index < BME680_GAS_HEATER_PROF_LEN_MAX; index++)
1365 .loc 1 799 0
1366 00f8 A4D1 bne .L77
800:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_dur = data_array[index];
1367 .loc 1 800 0
1368 00fa 0023 movs r3, #0
1369 00fc 16E0 b .L83
1370 .LVL155:
1371 .L100:
788:Drivers/BME680/bme680.c **** }
1372 .loc 1 788 0
1373 00fe 2100 movs r1, r4
1374 0100 5A20 movs r0, #90
1375 0102 FFF7FEFF bl set_mem_page
1376 .LVL156:
1377 0106 0500 movs r5, r0
1378 .LVL157:
1379 0108 E5E7 b .L79
1380 .LVL158:
1381 .L82:
795:Drivers/BME680/bme680.c **** }
1382 .loc 1 795 0
1383 010a 01AA add r2, sp, #4
1384 010c D15C ldrb r1, [r2, r3]
1385 010e 4022 movs r2, #64
1386 0110 A152 strh r1, [r4, r2]
794:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_temp = data_array[index];
1387 .loc 1 794 0
1388 0112 0133 adds r3, r3, #1
1389 .LVL159:
1390 0114 DBB2 uxtb r3, r3
1391 .LVL160:
1392 .L80:
1393 0116 092B cmp r3, #9
1394 0118 F7D9 bls .L82
1395 011a E6E7 b .L81
1396 .LVL161:
1397 .L97:
1398 011c 0023 movs r3, #0
1399 011e FAE7 b .L80
1400 .LVL162:
1401 .L84:
801:Drivers/BME680/bme680.c **** }
1402 .loc 1 801 0
1403 0120 01AA add r2, sp, #4
1404 0122 D15C ldrb r1, [r2, r3]
1405 0124 4222 movs r2, #66
1406 0126 A152 strh r1, [r4, r2]
800:Drivers/BME680/bme680.c **** dev->gas_sett.heatr_dur = data_array[index];
1407 .loc 1 800 0
ARM GAS /tmp/ccvbgJts.s page 48
1408 0128 0133 adds r3, r3, #1
1409 .LVL163:
1410 012a DBB2 uxtb r3, r3
1411 .LVL164:
1412 .L83:
1413 012c 092B cmp r3, #9
1414 012e F7D9 bls .L84
1415 0130 88E7 b .L77
1416 .LVL165:
1417 .L93:
1418 .LBB106:
1419 .LBB105:
1131:Drivers/BME680/bme680.c **** } else {
1420 .loc 1 1131 0
1421 0132 0125 movs r5, #1
1422 .LVL166:
1423 0134 6D42 rsbs r5, r5, #0
1424 0136 85E7 b .L77
1425 .LVL167:
1426 .L94:
1427 0138 0125 movs r5, #1
1428 .LVL168:
1429 013a 6D42 rsbs r5, r5, #0
1430 013c 82E7 b .L77
1431 .LVL169:
1432 .L95:
1433 013e 0125 movs r5, #1
1434 .LVL170:
1435 0140 6D42 rsbs r5, r5, #0
1436 0142 7FE7 b .L77
1437 .LVL171:
1438 .L96:
1439 0144 0125 movs r5, #1
1440 .LVL172:
1441 0146 6D42 rsbs r5, r5, #0
1442 .LVL173:
1443 0148 7CE7 b .L77
1444 .LVL174:
1445 .L89:
1446 .LBE105:
1447 .LBE106:
1448 .LBE102:
1449 .LBE101:
529:Drivers/BME680/bme680.c **** }
1450 .loc 1 529 0
1451 014a 0125 movs r5, #1
1452 014c 6D42 rsbs r5, r5, #0
1453 014e ACE7 b .L76
1454 .L90:
1455 0150 0125 movs r5, #1
1456 0152 6D42 rsbs r5, r5, #0
1457 0154 A9E7 b .L76
1458 .L91:
1459 0156 0125 movs r5, #1
1460 0158 6D42 rsbs r5, r5, #0
1461 015a A6E7 b .L76
1462 .L92:
ARM GAS /tmp/ccvbgJts.s page 49
1463 015c 0125 movs r5, #1
1464 015e 6D42 rsbs r5, r5, #0
1465 0160 A3E7 b .L76
1466 .cfi_endproc
1467 .LFE5:
1469 .section .text.bme680_set_sensor_mode,"ax",%progbits
1470 .align 1
1471 .global bme680_set_sensor_mode
1472 .syntax unified
1473 .code 16
1474 .thumb_func
1475 .fpu softvfp
1477 bme680_set_sensor_mode:
1478 .LFB6:
539:Drivers/BME680/bme680.c **** int8_t rslt;
1479 .loc 1 539 0
1480 .cfi_startproc
1481 @ args = 0, pretend = 0, frame = 8
1482 @ frame_needed = 0, uses_anonymous_args = 0
1483 .LVL175:
1484 0000 70B5 push {r4, r5, r6, lr}
1485 .LCFI15:
1486 .cfi_def_cfa_offset 16
1487 .cfi_offset 4, -16
1488 .cfi_offset 5, -12
1489 .cfi_offset 6, -8
1490 .cfi_offset 14, -4
1491 0002 82B0 sub sp, sp, #8
1492 .LCFI16:
1493 .cfi_def_cfa_offset 24
1494 0004 0600 movs r6, r0
1495 .LVL176:
543:Drivers/BME680/bme680.c ****
1496 .loc 1 543 0
1497 0006 6B46 mov r3, sp
1498 0008 7422 movs r2, #116
1499 000a 9A71 strb r2, [r3, #6]
1500 .LVL177:
1501 .LBB107:
1502 .LBB108:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1503 .loc 1 1129 0
1504 000c 0028 cmp r0, #0
1505 000e 48D0 beq .L105
1506 0010 836C ldr r3, [r0, #72]
1507 0012 002B cmp r3, #0
1508 0014 48D0 beq .L106
1509 0016 C36C ldr r3, [r0, #76]
1510 0018 002B cmp r3, #0
1511 001a 48D0 beq .L107
1512 001c 036D ldr r3, [r0, #80]
1513 001e 002B cmp r3, #0
1514 0020 48D0 beq .L108
1515 .LBE108:
1516 .LBE107:
542:Drivers/BME680/bme680.c **** uint8_t reg_addr = BME680_CONF_T_P_MODE_ADDR;
1517 .loc 1 542 0
ARM GAS /tmp/ccvbgJts.s page 50
1518 0022 0025 movs r5, #0
1519 0024 01E0 b .L104
1520 .LVL178:
1521 .L103:
561:Drivers/BME680/bme680.c ****
1522 .loc 1 561 0
1523 0026 002D cmp r5, #0
1524 0028 1ED0 beq .L109
1525 .LVL179:
1526 .L104:
550:Drivers/BME680/bme680.c **** if (rslt == BME680_OK) {
1527 .loc 1 550 0
1528 002a 3300 movs r3, r6
1529 002c 0122 movs r2, #1
1530 002e 6946 mov r1, sp
1531 0030 0731 adds r1, r1, #7
1532 0032 7420 movs r0, #116
1533 0034 FFF7FEFF bl bme680_get_regs
1534 .LVL180:
1535 0038 041E subs r4, r0, #0
1536 .LVL181:
551:Drivers/BME680/bme680.c **** /* Put to sleep before changing mode */
1537 .loc 1 551 0
1538 003a F4D1 bne .L103
553:Drivers/BME680/bme680.c ****
1539 .loc 1 553 0
1540 003c 6B46 mov r3, sp
1541 003e 0733 adds r3, r3, #7
1542 0040 1B78 ldrb r3, [r3]
1543 0042 0325 movs r5, #3
1544 .LVL182:
1545 0044 1D40 ands r5, r3
1546 .LVL183:
555:Drivers/BME680/bme680.c **** tmp_pow_mode = tmp_pow_mode & (~BME680_MODE_MSK); /* Set to sleep */
1547 .loc 1 555 0
1548 0046 EED0 beq .L103
556:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &tmp_pow_mode, 1, dev);
1549 .loc 1 556 0
1550 0048 0322 movs r2, #3
1551 004a 9343 bics r3, r2
1552 004c 6A46 mov r2, sp
1553 004e D11D adds r1, r2, #7
1554 0050 0B70 strb r3, [r1]
557:Drivers/BME680/bme680.c **** dev->delay_ms(BME680_POLL_PERIOD_MS);
1555 .loc 1 557 0
1556 0052 3300 movs r3, r6
1557 0054 0122 movs r2, #1
1558 0056 6846 mov r0, sp
1559 .LVL184:
1560 0058 0630 adds r0, r0, #6
1561 005a FFF7FEFF bl bme680_set_regs
1562 .LVL185:
1563 005e 0400 movs r4, r0
1564 .LVL186:
558:Drivers/BME680/bme680.c **** }
1565 .loc 1 558 0
1566 0060 0A20 movs r0, #10
ARM GAS /tmp/ccvbgJts.s page 51
1567 .LVL187:
1568 0062 336D ldr r3, [r6, #80]
1569 0064 9847 blx r3
1570 .LVL188:
1571 0066 DEE7 b .L103
1572 .L109:
564:Drivers/BME680/bme680.c **** tmp_pow_mode = (tmp_pow_mode & ~BME680_MODE_MSK) | (dev->power_mode & BME680_MODE_MSK);
1573 .loc 1 564 0
1574 0068 4423 movs r3, #68
1575 006a F25C ldrb r2, [r6, r3]
1576 006c 002A cmp r2, #0
1577 006e 0BD0 beq .L102
565:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
1578 .loc 1 565 0
1579 0070 6B46 mov r3, sp
1580 0072 D91D adds r1, r3, #7
1581 0074 DB79 ldrb r3, [r3, #7]
1582 0076 0320 movs r0, #3
1583 0078 8343 bics r3, r0
1584 007a 5BB2 sxtb r3, r3
1585 007c 52B2 sxtb r2, r2
1586 007e 0240 ands r2, r0
1587 0080 1343 orrs r3, r2
1588 0082 0B70 strb r3, [r1]
566:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(&reg_addr, &tmp_pow_mode, 1, dev);
1589 .loc 1 566 0
1590 0084 002C cmp r4, #0
1591 0086 02D0 beq .L110
1592 .LVL189:
1593 .L102:
572:Drivers/BME680/bme680.c ****
1594 .loc 1 572 0
1595 0088 2000 movs r0, r4
1596 008a 02B0 add sp, sp, #8
1597 @ sp needed
1598 .LVL190:
1599 .LVL191:
1600 008c 70BD pop {r4, r5, r6, pc}
1601 .LVL192:
1602 .L110:
567:Drivers/BME680/bme680.c **** }
1603 .loc 1 567 0
1604 008e 3300 movs r3, r6
1605 0090 0122 movs r2, #1
1606 0092 6946 mov r1, sp
1607 0094 0731 adds r1, r1, #7
1608 0096 6846 mov r0, sp
1609 0098 0630 adds r0, r0, #6
1610 009a FFF7FEFF bl bme680_set_regs
1611 .LVL193:
1612 009e 0400 movs r4, r0
1613 .LVL194:
1614 00a0 F2E7 b .L102
1615 .LVL195:
1616 .L105:
1617 .LBB110:
1618 .LBB109:
ARM GAS /tmp/ccvbgJts.s page 52
1131:Drivers/BME680/bme680.c **** } else {
1619 .loc 1 1131 0
1620 00a2 0124 movs r4, #1
1621 00a4 6442 rsbs r4, r4, #0
1622 00a6 EFE7 b .L102
1623 .L106:
1624 00a8 0124 movs r4, #1
1625 00aa 6442 rsbs r4, r4, #0
1626 00ac ECE7 b .L102
1627 .L107:
1628 00ae 0124 movs r4, #1
1629 00b0 6442 rsbs r4, r4, #0
1630 00b2 E9E7 b .L102
1631 .L108:
1632 00b4 0124 movs r4, #1
1633 00b6 6442 rsbs r4, r4, #0
1634 00b8 E6E7 b .L102
1635 .LBE109:
1636 .LBE110:
1637 .cfi_endproc
1638 .LFE6:
1640 .global __aeabi_idiv
1641 .section .text.bme680_set_sensor_settings,"ax",%progbits
1642 .align 1
1643 .global bme680_set_sensor_settings
1644 .syntax unified
1645 .code 16
1646 .thumb_func
1647 .fpu softvfp
1649 bme680_set_sensor_settings:
1650 .LFB4:
363:Drivers/BME680/bme680.c **** int8_t rslt;
1651 .loc 1 363 0
1652 .cfi_startproc
1653 @ args = 0, pretend = 0, frame = 24
1654 @ frame_needed = 0, uses_anonymous_args = 0
1655 .LVL196:
1656 0000 F0B5 push {r4, r5, r6, r7, lr}
1657 .LCFI17:
1658 .cfi_def_cfa_offset 20
1659 .cfi_offset 4, -20
1660 .cfi_offset 5, -16
1661 .cfi_offset 6, -12
1662 .cfi_offset 7, -8
1663 .cfi_offset 14, -4
1664 0002 D646 mov lr, r10
1665 0004 4F46 mov r7, r9
1666 0006 4646 mov r6, r8
1667 0008 C0B5 push {r6, r7, lr}
1668 .LCFI18:
1669 .cfi_def_cfa_offset 32
1670 .cfi_offset 8, -32
1671 .cfi_offset 9, -28
1672 .cfi_offset 10, -24
1673 000a 86B0 sub sp, sp, #24
1674 .LCFI19:
1675 .cfi_def_cfa_offset 56
ARM GAS /tmp/ccvbgJts.s page 53
1676 000c 0600 movs r6, r0
1677 000e 0C00 movs r4, r1
366:Drivers/BME680/bme680.c **** uint8_t count = 0;
1678 .loc 1 366 0
1679 0010 1723 movs r3, #23
1680 0012 6B44 add r3, r3, sp
1681 0014 0022 movs r2, #0
1682 0016 1A70 strb r2, [r3]
1683 .LVL197:
368:Drivers/BME680/bme680.c **** uint8_t data_array[BME680_REG_BUFFER_LENGTH] = { 0 };
1684 .loc 1 368 0
1685 0018 0632 adds r2, r2, #6
1686 001a 0021 movs r1, #0
1687 .LVL198:
1688 001c 04A8 add r0, sp, #16
1689 .LVL199:
1690 001e FFF7FEFF bl memset
1691 .LVL200:
369:Drivers/BME680/bme680.c **** uint8_t intended_power_mode = dev->power_mode; /* Save intended power mode */
1692 .loc 1 369 0
1693 0022 0622 movs r2, #6
1694 0024 0021 movs r1, #0
1695 0026 02A8 add r0, sp, #8
1696 0028 FFF7FEFF bl memset
1697 .LVL201:
370:Drivers/BME680/bme680.c ****
1698 .loc 1 370 0
1699 002c 4423 movs r3, #68
1700 002e E35C ldrb r3, [r4, r3]
1701 0030 9A46 mov r10, r3
1702 .LVL202:
1703 .LBB134:
1704 .LBB135:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1705 .loc 1 1129 0
1706 0032 002C cmp r4, #0
1707 0034 00D1 bne .LCB1900
1708 0036 F6E1 b .L142 @long jump
1709 .LCB1900:
1710 0038 A36C ldr r3, [r4, #72]
1711 003a 002B cmp r3, #0
1712 003c 00D1 bne .LCB1904
1713 003e F5E1 b .L143 @long jump
1714 .LCB1904:
1715 0040 E36C ldr r3, [r4, #76]
1716 0042 002B cmp r3, #0
1717 0044 00D1 bne .LCB1908
1718 0046 F4E1 b .L144 @long jump
1719 .LCB1908:
1720 0048 236D ldr r3, [r4, #80]
1721 004a 002B cmp r3, #0
1722 004c 00D1 bne .LCB1912
1723 004e F3E1 b .L145 @long jump
1724 .LCB1912:
1725 .LVL203:
1726 .LBE135:
1727 .LBE134:
ARM GAS /tmp/ccvbgJts.s page 54
375:Drivers/BME680/bme680.c **** rslt = set_gas_config(dev);
1728 .loc 1 375 0
1729 0050 3307 lsls r3, r6, #28
1730 0052 35D4 bmi .L162
1731 .LBB138:
1732 .LBB136:
1733 .loc 1 1134 0
1734 0054 0020 movs r0, #0
1735 .L113:
1736 .LVL204:
1737 .LBE136:
1738 .LBE138:
378:Drivers/BME680/bme680.c **** if (rslt == BME680_OK)
1739 .loc 1 378 0
1740 0056 4423 movs r3, #68
1741 0058 0022 movs r2, #0
1742 005a E254 strb r2, [r4, r3]
379:Drivers/BME680/bme680.c **** rslt = bme680_set_sensor_mode(dev);
1743 .loc 1 379 0
1744 005c 0028 cmp r0, #0
1745 005e 00D1 bne .LCB1933
1746 0060 C9E0 b .L163 @long jump
1747 .LCB1933:
1748 .LVL205:
1749 .L120:
383:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.filter, BME680_FILTER_SIZE_0, BME680_FILTER_SIZE_127, dev);
1750 .loc 1 383 0
1751 0062 F306 lsls r3, r6, #27
1752 0064 00D4 bmi .LCB1941
1753 0066 CDE0 b .L155 @long jump
1754 .LCB1941:
1755 .LVL206:
1756 .LBB139:
1757 .LBB140:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
1758 .loc 1 1101 0
1759 0068 2300 movs r3, r4
1760 006a 3B33 adds r3, r3, #59
1761 006c 00D1 bne .LCB1952
1762 006e C6E0 b .L156 @long jump
1763 .LCB1952:
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
1764 .loc 1 1103 0
1765 0070 3B23 movs r3, #59
1766 0072 E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
1767 .loc 1 1109 0
1768 0074 072B cmp r3, #7
1769 0076 07D9 bls .L123
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
1770 .loc 1 1111 0
1771 0078 3B23 movs r3, #59
1772 007a 0722 movs r2, #7
1773 007c E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
1774 .loc 1 1112 0
1775 007e 3F32 adds r2, r2, #63
ARM GAS /tmp/ccvbgJts.s page 55
1776 0080 A35C ldrb r3, [r4, r2]
1777 0082 0221 movs r1, #2
1778 0084 0B43 orrs r3, r1
1779 0086 A354 strb r3, [r4, r2]
1780 .LVL207:
1781 .L123:
1782 .LBE140:
1783 .LBE139:
388:Drivers/BME680/bme680.c ****
1784 .loc 1 388 0
1785 0088 2300 movs r3, r4
1786 008a 0122 movs r2, #1
1787 008c 1721 movs r1, #23
1788 008e 6944 add r1, r1, sp
1789 0090 7520 movs r0, #117
1790 0092 FFF7FEFF bl bme680_get_regs
1791 .LVL208:
1792 .L122:
391:Drivers/BME680/bme680.c ****
1793 .loc 1 391 0
1794 0096 1722 movs r2, #23
1795 0098 6A44 add r2, r2, sp
1796 009a 1378 ldrb r3, [r2]
1797 009c 1C21 movs r1, #28
1798 009e 8B43 bics r3, r1
1799 00a0 5BB2 sxtb r3, r3
1800 00a2 1F31 adds r1, r1, #31
1801 00a4 655C ldrb r5, [r4, r1]
1802 00a6 AD00 lsls r5, r5, #2
1803 00a8 1F39 subs r1, r1, #31
1804 00aa 2940 ands r1, r5
1805 00ac 0B43 orrs r3, r1
1806 00ae DBB2 uxtb r3, r3
1807 00b0 1370 strb r3, [r2]
393:Drivers/BME680/bme680.c **** data_array[count] = data;
1808 .loc 1 393 0
1809 00b2 04AA add r2, sp, #16
1810 00b4 7521 movs r1, #117
1811 00b6 1170 strb r1, [r2]
394:Drivers/BME680/bme680.c **** count++;
1812 .loc 1 394 0
1813 00b8 02AA add r2, sp, #8
1814 00ba 1370 strb r3, [r2]
1815 .LVL209:
395:Drivers/BME680/bme680.c **** }
1816 .loc 1 395 0
1817 00bc 0125 movs r5, #1
1818 00be A2E0 b .L121
1819 .LVL210:
1820 .L162:
1821 .LBB142:
1822 .LBB143:
1823 .LBB144:
1824 .LBB145:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
1825 .loc 1 1129 0
1826 00c0 002C cmp r4, #0
ARM GAS /tmp/ccvbgJts.s page 56
1827 00c2 00D1 bne .LCB2028
1828 00c4 8BE0 b .L147 @long jump
1829 .LCB2028:
1830 00c6 A36C ldr r3, [r4, #72]
1831 00c8 002B cmp r3, #0
1832 00ca 00D1 bne .LCB2032
1833 00cc 8AE0 b .L148 @long jump
1834 .LCB2032:
1835 00ce E36C ldr r3, [r4, #76]
1836 00d0 002B cmp r3, #0
1837 00d2 00D1 bne .LCB2036
1838 00d4 89E0 b .L149 @long jump
1839 .LCB2036:
1840 00d6 236D ldr r3, [r4, #80]
1841 00d8 002B cmp r3, #0
1842 00da 00D1 bne .LCB2040
1843 00dc 88E0 b .L150 @long jump
1844 .LCB2040:
1845 .LVL211:
1846 .LBE145:
1847 .LBE144:
1848 .LBB147:
752:Drivers/BME680/bme680.c **** uint8_t reg_data[2] = {0};
1849 .loc 1 752 0
1850 00de 0023 movs r3, #0
1851 00e0 6A46 mov r2, sp
1852 00e2 1380 strh r3, [r2]
753:Drivers/BME680/bme680.c ****
1853 .loc 1 753 0
1854 00e4 01AA add r2, sp, #4
1855 00e6 1380 strh r3, [r2]
755:Drivers/BME680/bme680.c **** reg_addr[0] = BME680_RES_HEAT0_ADDR;
1856 .loc 1 755 0
1857 00e8 4433 adds r3, r3, #68
1858 00ea E35C ldrb r3, [r4, r3]
1859 00ec 012B cmp r3, #1
1860 00ee 01D0 beq .L164
762:Drivers/BME680/bme680.c **** }
1861 .loc 1 762 0
1862 00f0 0120 movs r0, #1
1863 .LVL212:
1864 00f2 B0E7 b .L113
1865 .LVL213:
1866 .L164:
756:Drivers/BME680/bme680.c **** reg_data[0] = calc_heater_res(dev->gas_sett.heatr_temp, dev);
1867 .loc 1 756 0
1868 00f4 5933 adds r3, r3, #89
1869 00f6 6A46 mov r2, sp
1870 00f8 1370 strb r3, [r2]
757:Drivers/BME680/bme680.c **** reg_addr[1] = BME680_GAS_WAIT0_ADDR;
1871 .loc 1 757 0
1872 00fa 1A3B subs r3, r3, #26
1873 00fc E55A ldrh r5, [r4, r3]
1874 .LVL214:
1875 .LBB148:
1876 .LBB149:
940:Drivers/BME680/bme680.c **** temp = 200;
ARM GAS /tmp/ccvbgJts.s page 57
1877 .loc 1 940 0
1878 00fe C72D cmp r5, #199
1879 0100 06D9 bls .L152
942:Drivers/BME680/bme680.c **** temp = 400;
1880 .loc 1 942 0
1881 0102 5133 adds r3, r3, #81
1882 0104 FF33 adds r3, r3, #255
1883 0106 9D42 cmp r5, r3
1884 0108 03D9 bls .L116
943:Drivers/BME680/bme680.c ****
1885 .loc 1 943 0
1886 010a C825 movs r5, #200
1887 .LVL215:
1888 010c 6D00 lsls r5, r5, #1
1889 010e 00E0 b .L116
1890 .LVL216:
1891 .L152:
941:Drivers/BME680/bme680.c **** else if (temp > 400)
1892 .loc 1 941 0
1893 0110 C825 movs r5, #200
1894 .LVL217:
1895 .L116:
945:Drivers/BME680/bme680.c **** var2 = (dev->calib.par_gh1 + 784) * (((((dev->calib.par_gh2 + 154009) * temp * 5) / 100) + 3276800
1896 .loc 1 945 0
1897 0112 0423 movs r3, #4
1898 0114 E356 ldrsb r3, [r4, r3]
1899 0116 1420 movs r0, #20
1900 0118 2056 ldrsb r0, [r4, r0]
1901 011a 5843 muls r0, r3
1902 011c FA21 movs r1, #250
1903 011e 8900 lsls r1, r1, #2
1904 0120 FFF7FEFF bl __aeabi_idiv
1905 .LVL218:
1906 0124 0302 lsls r3, r0, #8
1907 0126 9946 mov r9, r3
1908 .LVL219:
946:Drivers/BME680/bme680.c **** var3 = var1 + (var2 / 2);
1909 .loc 1 946 0
1910 0128 1123 movs r3, #17
1911 .LVL220:
1912 012a E356 ldrsb r3, [r4, r3]
1913 012c C422 movs r2, #196
1914 012e 9200 lsls r2, r2, #2
1915 0130 9046 mov r8, r2
1916 0132 9844 add r8, r8, r3
1917 0134 1222 movs r2, #18
1918 0136 A35E ldrsh r3, [r4, r2]
1919 0138 C14A ldr r2, .L166
1920 013a 9446 mov ip, r2
1921 013c 6344 add r3, r3, ip
1922 013e 6B43 muls r3, r5
1923 0140 9800 lsls r0, r3, #2
1924 0142 C018 adds r0, r0, r3
1925 0144 6421 movs r1, #100
1926 0146 FFF7FEFF bl __aeabi_idiv
1927 .LVL221:
1928 014a C823 movs r3, #200
ARM GAS /tmp/ccvbgJts.s page 58
1929 014c 9B03 lsls r3, r3, #14
1930 014e 9C46 mov ip, r3
1931 0150 6044 add r0, r0, ip
1932 0152 0A21 movs r1, #10
1933 0154 FFF7FEFF bl __aeabi_idiv
1934 .LVL222:
1935 0158 4346 mov r3, r8
1936 015a 4343 muls r3, r0
1937 .LVL223:
947:Drivers/BME680/bme680.c **** var4 = (var3 / (dev->calib.res_heat_range + 4));
1938 .loc 1 947 0
1939 015c D80F lsrs r0, r3, #31
1940 015e C018 adds r0, r0, r3
1941 0160 4010 asrs r0, r0, #1
1942 0162 4844 add r0, r0, r9
1943 .LVL224:
948:Drivers/BME680/bme680.c **** var5 = (131 * dev->calib.res_heat_val) + 65536;
1944 .loc 1 948 0
1945 0164 3423 movs r3, #52
1946 .LVL225:
1947 0166 E15C ldrb r1, [r4, r3]
1948 0168 0431 adds r1, r1, #4
1949 016a FFF7FEFF bl __aeabi_idiv
1950 .LVL226:
949:Drivers/BME680/bme680.c **** heatr_res_x100 = (int32_t) (((var4 / var5) - 250) * 34);
1951 .loc 1 949 0
1952 016e 3523 movs r3, #53
1953 0170 E356 ldrsb r3, [r4, r3]
1954 0172 9901 lsls r1, r3, #6
1955 0174 C918 adds r1, r1, r3
1956 0176 4900 lsls r1, r1, #1
1957 0178 C918 adds r1, r1, r3
1958 017a 8023 movs r3, #128
1959 017c 5B02 lsls r3, r3, #9
1960 017e 9C46 mov ip, r3
1961 0180 6144 add r1, r1, ip
1962 .LVL227:
950:Drivers/BME680/bme680.c **** heatr_res = (uint8_t) ((heatr_res_x100 + 50) / 100);
1963 .loc 1 950 0
1964 0182 FFF7FEFF bl __aeabi_idiv
1965 .LVL228:
1966 0186 0300 movs r3, r0
1967 0188 FA3B subs r3, r3, #250
1968 018a 1801 lsls r0, r3, #4
1969 018c C018 adds r0, r0, r3
1970 018e 4000 lsls r0, r0, #1
1971 .LVL229:
951:Drivers/BME680/bme680.c ****
1972 .loc 1 951 0
1973 0190 3230 adds r0, r0, #50
1974 .LVL230:
1975 0192 6421 movs r1, #100
1976 0194 FFF7FEFF bl __aeabi_idiv
1977 .LVL231:
1978 .LBE149:
1979 .LBE148:
757:Drivers/BME680/bme680.c **** reg_addr[1] = BME680_GAS_WAIT0_ADDR;
ARM GAS /tmp/ccvbgJts.s page 59
1980 .loc 1 757 0
1981 0198 01AB add r3, sp, #4
1982 019a 1870 strb r0, [r3]
758:Drivers/BME680/bme680.c **** reg_data[1] = calc_heater_dur(dev->gas_sett.heatr_dur);
1983 .loc 1 758 0
1984 019c 6423 movs r3, #100
1985 019e 6A46 mov r2, sp
1986 01a0 5370 strb r3, [r2, #1]
759:Drivers/BME680/bme680.c **** dev->gas_sett.nb_conv = 0;
1987 .loc 1 759 0
1988 01a2 223B subs r3, r3, #34
1989 01a4 E35A ldrh r3, [r4, r3]
1990 .LVL232:
1991 .LBB150:
1992 .LBB151:
964:Drivers/BME680/bme680.c **** durval = 0xff; /* Max duration*/
1993 .loc 1 964 0
1994 01a6 A74A ldr r2, .L166+4
1995 01a8 9342 cmp r3, r2
1996 01aa 16D8 bhi .L154
961:Drivers/BME680/bme680.c **** uint8_t durval;
1997 .loc 1 961 0
1998 01ac 0022 movs r2, #0
1999 01ae 02E0 b .L118
2000 .LVL233:
2001 .L119:
968:Drivers/BME680/bme680.c **** factor += 1;
2002 .loc 1 968 0
2003 01b0 9B08 lsrs r3, r3, #2
2004 .LVL234:
969:Drivers/BME680/bme680.c **** }
2005 .loc 1 969 0
2006 01b2 0132 adds r2, r2, #1
2007 .LVL235:
2008 01b4 D2B2 uxtb r2, r2
2009 .LVL236:
2010 .L118:
967:Drivers/BME680/bme680.c **** dur = dur / 4;
2011 .loc 1 967 0
2012 01b6 3F2B cmp r3, #63
2013 01b8 FAD8 bhi .L119
971:Drivers/BME680/bme680.c **** }
2014 .loc 1 971 0
2015 01ba DBB2 uxtb r3, r3
2016 .LVL237:
2017 01bc 9201 lsls r2, r2, #6
2018 .LVL238:
2019 01be D2B2 uxtb r2, r2
2020 01c0 9B18 adds r3, r3, r2
2021 01c2 DBB2 uxtb r3, r3
2022 .LVL239:
2023 .L117:
2024 .LBE151:
2025 .LBE150:
759:Drivers/BME680/bme680.c **** dev->gas_sett.nb_conv = 0;
2026 .loc 1 759 0
2027 01c4 01A9 add r1, sp, #4
ARM GAS /tmp/ccvbgJts.s page 60
2028 01c6 4B70 strb r3, [r1, #1]
760:Drivers/BME680/bme680.c **** } else {
2029 .loc 1 760 0
2030 01c8 3C23 movs r3, #60
2031 01ca 0022 movs r2, #0
2032 01cc E254 strb r2, [r4, r3]
2033 .LVL240:
765:Drivers/BME680/bme680.c **** }
2034 .loc 1 765 0
2035 01ce 2300 movs r3, r4
2036 01d0 0232 adds r2, r2, #2
2037 01d2 6846 mov r0, sp
2038 01d4 FFF7FEFF bl bme680_set_regs
2039 .LVL241:
2040 01d8 3DE7 b .L113
2041 .LVL242:
2042 .L154:
2043 .LBB153:
2044 .LBB152:
965:Drivers/BME680/bme680.c **** } else {
2045 .loc 1 965 0
2046 01da FF23 movs r3, #255
2047 .LVL243:
2048 01dc F2E7 b .L117
2049 .LVL244:
2050 .L147:
2051 .LBE152:
2052 .LBE153:
2053 .LBE147:
2054 .LBB154:
2055 .LBB146:
1131:Drivers/BME680/bme680.c **** } else {
2056 .loc 1 1131 0
2057 01de 0120 movs r0, #1
2058 01e0 4042 rsbs r0, r0, #0
2059 01e2 38E7 b .L113
2060 .L148:
2061 01e4 0120 movs r0, #1
2062 01e6 4042 rsbs r0, r0, #0
2063 01e8 35E7 b .L113
2064 .L149:
2065 01ea 0120 movs r0, #1
2066 01ec 4042 rsbs r0, r0, #0
2067 01ee 32E7 b .L113
2068 .L150:
2069 01f0 0120 movs r0, #1
2070 01f2 4042 rsbs r0, r0, #0
2071 .LVL245:
2072 01f4 2FE7 b .L113
2073 .LVL246:
2074 .L163:
2075 .LBE146:
2076 .LBE154:
2077 .LBE143:
2078 .LBE142:
380:Drivers/BME680/bme680.c ****
2079 .loc 1 380 0
ARM GAS /tmp/ccvbgJts.s page 61
2080 01f6 2000 movs r0, r4
2081 .LVL247:
2082 01f8 FFF7FEFF bl bme680_set_sensor_mode
2083 .LVL248:
2084 01fc 31E7 b .L120
2085 .LVL249:
2086 .L156:
2087 .LBB155:
2088 .LBB141:
1115:Drivers/BME680/bme680.c **** }
2089 .loc 1 1115 0
2090 01fe 0120 movs r0, #1
2091 .LVL250:
2092 0200 4042 rsbs r0, r0, #0
2093 0202 48E7 b .L122
2094 .LVL251:
2095 .L155:
2096 .LBE141:
2097 .LBE155:
367:Drivers/BME680/bme680.c **** uint8_t reg_array[BME680_REG_BUFFER_LENGTH] = { 0 };
2098 .loc 1 367 0
2099 0204 0025 movs r5, #0
2100 .LVL252:
2101 .L121:
399:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->gas_sett.heatr_ctrl, BME680_ENABLE_HEATER,
2102 .loc 1 399 0
2103 0206 B306 lsls r3, r6, #26
2104 0208 2CD5 bpl .L124
2105 .LVL253:
2106 .LBB156:
2107 .LBB157:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
2108 .loc 1 1101 0
2109 020a 2300 movs r3, r4
2110 020c 3D33 adds r3, r3, #61
2111 020e 00D1 bne .LCB2366
2112 0210 F3E0 b .L157 @long jump
2113 .LCB2366:
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
2114 .loc 1 1103 0
2115 0212 3D23 movs r3, #61
2116 0214 E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
2117 .loc 1 1109 0
2118 0216 082B cmp r3, #8
2119 0218 07D9 bls .L126
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
2120 .loc 1 1111 0
2121 021a 3D23 movs r3, #61
2122 021c 0822 movs r2, #8
2123 021e E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
2124 .loc 1 1112 0
2125 0220 3E32 adds r2, r2, #62
2126 0222 A35C ldrb r3, [r4, r2]
2127 0224 0221 movs r1, #2
2128 0226 0B43 orrs r3, r1
ARM GAS /tmp/ccvbgJts.s page 62
2129 0228 A354 strb r3, [r4, r2]
2130 .LVL254:
2131 .L126:
2132 .LBE157:
2133 .LBE156:
405:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_HCTRL, dev->gas_sett.heatr_ctrl);
2134 .loc 1 405 0
2135 022a 2300 movs r3, r4
2136 022c 0122 movs r2, #1
2137 022e 1721 movs r1, #23
2138 0230 6944 add r1, r1, sp
2139 0232 7020 movs r0, #112
2140 0234 FFF7FEFF bl bme680_get_regs
2141 .LVL255:
2142 .L125:
406:Drivers/BME680/bme680.c ****
2143 .loc 1 406 0
2144 0238 1722 movs r2, #23
2145 023a 6A44 add r2, r2, sp
2146 023c 1378 ldrb r3, [r2]
2147 023e 0821 movs r1, #8
2148 0240 8B43 bics r3, r1
2149 0242 5BB2 sxtb r3, r3
2150 0244 3531 adds r1, r1, #53
2151 0246 6156 ldrsb r1, [r4, r1]
2152 0248 8C46 mov ip, r1
2153 024a 0821 movs r1, #8
2154 024c 6746 mov r7, ip
2155 024e 3940 ands r1, r7
2156 0250 0B43 orrs r3, r1
2157 0252 DBB2 uxtb r3, r3
2158 0254 1370 strb r3, [r2]
408:Drivers/BME680/bme680.c **** data_array[count] = data;
2159 .loc 1 408 0
2160 0256 04AA add r2, sp, #16
2161 0258 7021 movs r1, #112
2162 025a 5155 strb r1, [r2, r5]
409:Drivers/BME680/bme680.c **** count++;
2163 .loc 1 409 0
2164 025c 02AA add r2, sp, #8
2165 025e 5355 strb r3, [r2, r5]
410:Drivers/BME680/bme680.c **** }
2166 .loc 1 410 0
2167 0260 0135 adds r5, r5, #1
2168 .LVL256:
2169 0262 EDB2 uxtb r5, r5
2170 .LVL257:
2171 .L124:
414:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.os_temp, BME680_OS_NONE, BME680_OS_16X, dev);
2172 .loc 1 414 0
2173 0264 B307 lsls r3, r6, #30
2174 0266 3DD0 beq .L127
2175 .LVL258:
2176 .LBB159:
2177 .LBB160:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
2178 .loc 1 1101 0
ARM GAS /tmp/ccvbgJts.s page 63
2179 0268 2300 movs r3, r4
2180 026a 3933 adds r3, r3, #57
2181 026c 00D1 bne .LCB2453
2182 026e C7E0 b .L158 @long jump
2183 .LCB2453:
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
2184 .loc 1 1103 0
2185 0270 3923 movs r3, #57
2186 0272 E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
2187 .loc 1 1109 0
2188 0274 052B cmp r3, #5
2189 0276 07D9 bls .L129
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
2190 .loc 1 1111 0
2191 0278 3923 movs r3, #57
2192 027a 0522 movs r2, #5
2193 027c E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
2194 .loc 1 1112 0
2195 027e 4132 adds r2, r2, #65
2196 0280 A35C ldrb r3, [r4, r2]
2197 0282 0221 movs r1, #2
2198 0284 0B43 orrs r3, r1
2199 0286 A354 strb r3, [r4, r2]
2200 .LVL259:
2201 .L129:
2202 .LBE160:
2203 .LBE159:
419:Drivers/BME680/bme680.c ****
2204 .loc 1 419 0
2205 0288 2300 movs r3, r4
2206 028a 0122 movs r2, #1
2207 028c 1721 movs r1, #23
2208 028e 6944 add r1, r1, sp
2209 0290 7420 movs r0, #116
2210 0292 FFF7FEFF bl bme680_get_regs
2211 .LVL260:
2212 .L128:
421:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_OST, dev->tph_sett.os_temp);
2213 .loc 1 421 0
2214 0296 F307 lsls r3, r6, #31
2215 0298 09D5 bpl .L130
422:Drivers/BME680/bme680.c ****
2216 .loc 1 422 0
2217 029a 1722 movs r2, #23
2218 029c 6A44 add r2, r2, sp
2219 029e 1178 ldrb r1, [r2]
2220 02a0 1F23 movs r3, #31
2221 02a2 0B40 ands r3, r1
2222 02a4 3921 movs r1, #57
2223 02a6 615C ldrb r1, [r4, r1]
2224 02a8 4901 lsls r1, r1, #5
2225 02aa 0B43 orrs r3, r1
2226 02ac 1370 strb r3, [r2]
2227 .L130:
424:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_OSP, dev->tph_sett.os_pres);
ARM GAS /tmp/ccvbgJts.s page 64
2228 .loc 1 424 0
2229 02ae B307 lsls r3, r6, #30
2230 02b0 0ED5 bpl .L131
425:Drivers/BME680/bme680.c ****
2231 .loc 1 425 0
2232 02b2 1722 movs r2, #23
2233 02b4 6A44 add r2, r2, sp
2234 02b6 1378 ldrb r3, [r2]
2235 02b8 1C21 movs r1, #28
2236 02ba 8B43 bics r3, r1
2237 02bc 5BB2 sxtb r3, r3
2238 02be 1E31 adds r1, r1, #30
2239 02c0 615C ldrb r1, [r4, r1]
2240 02c2 8900 lsls r1, r1, #2
2241 02c4 8C46 mov ip, r1
2242 02c6 1C21 movs r1, #28
2243 02c8 6746 mov r7, ip
2244 02ca 3940 ands r1, r7
2245 02cc 0B43 orrs r3, r1
2246 02ce 1370 strb r3, [r2]
2247 .L131:
427:Drivers/BME680/bme680.c **** data_array[count] = data;
2248 .loc 1 427 0
2249 02d0 04AB add r3, sp, #16
2250 02d2 7422 movs r2, #116
2251 02d4 5A55 strb r2, [r3, r5]
428:Drivers/BME680/bme680.c **** count++;
2252 .loc 1 428 0
2253 02d6 1723 movs r3, #23
2254 02d8 6B44 add r3, r3, sp
2255 02da 1A78 ldrb r2, [r3]
2256 02dc 02AB add r3, sp, #8
2257 02de 5A55 strb r2, [r3, r5]
429:Drivers/BME680/bme680.c **** }
2258 .loc 1 429 0
2259 02e0 0135 adds r5, r5, #1
2260 .LVL261:
2261 02e2 EDB2 uxtb r5, r5
2262 .LVL262:
2263 .L127:
433:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->tph_sett.os_hum, BME680_OS_NONE, BME680_OS_16X, dev);
2264 .loc 1 433 0
2265 02e4 7307 lsls r3, r6, #29
2266 02e6 2CD5 bpl .L132
2267 .LVL263:
2268 .LBB162:
2269 .LBB163:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
2270 .loc 1 1101 0
2271 02e8 2300 movs r3, r4
2272 02ea 3833 adds r3, r3, #56
2273 02ec 00D1 bne .LCB2572
2274 02ee 8AE0 b .L159 @long jump
2275 .LCB2572:
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
2276 .loc 1 1103 0
2277 02f0 3823 movs r3, #56
ARM GAS /tmp/ccvbgJts.s page 65
2278 02f2 E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
2279 .loc 1 1109 0
2280 02f4 052B cmp r3, #5
2281 02f6 07D9 bls .L134
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
2282 .loc 1 1111 0
2283 02f8 3823 movs r3, #56
2284 02fa 0522 movs r2, #5
2285 02fc E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
2286 .loc 1 1112 0
2287 02fe 4132 adds r2, r2, #65
2288 0300 A35C ldrb r3, [r4, r2]
2289 0302 0221 movs r1, #2
2290 0304 0B43 orrs r3, r1
2291 0306 A354 strb r3, [r4, r2]
2292 .LVL264:
2293 .L134:
2294 .LBE163:
2295 .LBE162:
438:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_OSH, dev->tph_sett.os_hum);
2296 .loc 1 438 0
2297 0308 2300 movs r3, r4
2298 030a 0122 movs r2, #1
2299 030c 1721 movs r1, #23
2300 030e 6944 add r1, r1, sp
2301 0310 7220 movs r0, #114
2302 0312 FFF7FEFF bl bme680_get_regs
2303 .LVL265:
2304 .L133:
439:Drivers/BME680/bme680.c ****
2305 .loc 1 439 0
2306 0316 1722 movs r2, #23
2307 0318 6A44 add r2, r2, sp
2308 031a 1378 ldrb r3, [r2]
2309 031c 0721 movs r1, #7
2310 031e 8B43 bics r3, r1
2311 0320 5BB2 sxtb r3, r3
2312 0322 3131 adds r1, r1, #49
2313 0324 6156 ldrsb r1, [r4, r1]
2314 0326 8C46 mov ip, r1
2315 0328 0721 movs r1, #7
2316 032a 6746 mov r7, ip
2317 032c 3940 ands r1, r7
2318 032e 0B43 orrs r3, r1
2319 0330 DBB2 uxtb r3, r3
2320 0332 1370 strb r3, [r2]
441:Drivers/BME680/bme680.c **** data_array[count] = data;
2321 .loc 1 441 0
2322 0334 04AA add r2, sp, #16
2323 0336 7221 movs r1, #114
2324 0338 5155 strb r1, [r2, r5]
442:Drivers/BME680/bme680.c **** count++;
2325 .loc 1 442 0
2326 033a 02AA add r2, sp, #8
2327 033c 5355 strb r3, [r2, r5]
ARM GAS /tmp/ccvbgJts.s page 66
443:Drivers/BME680/bme680.c **** }
2328 .loc 1 443 0
2329 033e 0135 adds r5, r5, #1
2330 .LVL266:
2331 0340 EDB2 uxtb r5, r5
2332 .LVL267:
2333 .L132:
447:Drivers/BME680/bme680.c **** rslt = boundary_check(&dev->gas_sett.run_gas, BME680_RUN_GAS_DISABLE,
2334 .loc 1 447 0
2335 0342 C023 movs r3, #192
2336 0344 3342 tst r3, r6
2337 0346 4DD0 beq .L135
2338 .LVL268:
2339 .LBB165:
2340 .LBB166:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
2341 .loc 1 1101 0
2342 0348 2300 movs r3, r4
2343 034a 3E33 adds r3, r3, #62
2344 034c 5ED0 beq .L160
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
2345 .loc 1 1103 0
2346 034e 3E23 movs r3, #62
2347 0350 E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
2348 .loc 1 1109 0
2349 0352 012B cmp r3, #1
2350 0354 07D9 bls .L137
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
2351 .loc 1 1111 0
2352 0356 3E23 movs r3, #62
2353 0358 0122 movs r2, #1
2354 035a E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
2355 .loc 1 1112 0
2356 035c 4532 adds r2, r2, #69
2357 035e A35C ldrb r3, [r4, r2]
2358 0360 0221 movs r1, #2
2359 0362 0B43 orrs r3, r1
2360 0364 A354 strb r3, [r4, r2]
2361 .LVL269:
2362 .L137:
2363 .LBE166:
2364 .LBE165:
2365 .LBB168:
2366 .LBB169:
1101:Drivers/BME680/bme680.c **** /* Check if value is below minimum value */
2367 .loc 1 1101 0
2368 0366 2300 movs r3, r4
2369 0368 3C33 adds r3, r3, #60
2370 036a 52D0 beq .L161
1103:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to minimum value */
2371 .loc 1 1103 0
2372 036c 3C23 movs r3, #60
2373 036e E35C ldrb r3, [r4, r3]
1109:Drivers/BME680/bme680.c **** /* Auto correct the invalid value to maximum value */
2374 .loc 1 1109 0
ARM GAS /tmp/ccvbgJts.s page 67
2375 0370 0A2B cmp r3, #10
2376 0372 07D9 bls .L138
1111:Drivers/BME680/bme680.c **** dev->info_msg |= BME680_I_MAX_CORRECTION;
2377 .loc 1 1111 0
2378 0374 3C23 movs r3, #60
2379 0376 0A22 movs r2, #10
2380 0378 E254 strb r2, [r4, r3]
1112:Drivers/BME680/bme680.c **** }
2381 .loc 1 1112 0
2382 037a 3C32 adds r2, r2, #60
2383 037c A35C ldrb r3, [r4, r2]
2384 037e 0221 movs r1, #2
2385 0380 0B43 orrs r3, r1
2386 0382 A354 strb r3, [r4, r2]
2387 .LVL270:
2388 .L138:
2389 .LBE169:
2390 .LBE168:
459:Drivers/BME680/bme680.c ****
2391 .loc 1 459 0
2392 0384 2300 movs r3, r4
2393 0386 0122 movs r2, #1
2394 0388 1721 movs r1, #23
2395 038a 6944 add r1, r1, sp
2396 038c 7120 movs r0, #113
2397 038e FFF7FEFF bl bme680_get_regs
2398 .LVL271:
2399 .L136:
461:Drivers/BME680/bme680.c **** data = BME680_SET_BITS(data, BME680_RUN_GAS, dev->gas_sett.run_gas);
2400 .loc 1 461 0
2401 0392 7306 lsls r3, r6, #25
2402 0394 0ED5 bpl .L139
462:Drivers/BME680/bme680.c ****
2403 .loc 1 462 0
2404 0396 1722 movs r2, #23
2405 0398 6A44 add r2, r2, sp
2406 039a 1378 ldrb r3, [r2]
2407 039c 1021 movs r1, #16
2408 039e 8B43 bics r3, r1
2409 03a0 5BB2 sxtb r3, r3
2410 03a2 2E31 adds r1, r1, #46
2411 03a4 615C ldrb r1, [r4, r1]
2412 03a6 0901 lsls r1, r1, #4
2413 03a8 8C46 mov ip, r1
2414 03aa 1021 movs r1, #16
2415 03ac 6746 mov r7, ip
2416 03ae 3940 ands r1, r7
2417 03b0 0B43 orrs r3, r1
2418 03b2 1370 strb r3, [r2]
2419 .L139:
464:Drivers/BME680/bme680.c **** data = BME680_SET_BITS_POS_0(data, BME680_NBCONV, dev->gas_sett.nb_conv);
2420 .loc 1 464 0
2421 03b4 3306 lsls r3, r6, #24
2422 03b6 0BD5 bpl .L140
465:Drivers/BME680/bme680.c ****
2423 .loc 1 465 0
2424 03b8 1722 movs r2, #23
ARM GAS /tmp/ccvbgJts.s page 68
2425 03ba 6A44 add r2, r2, sp
2426 03bc 1378 ldrb r3, [r2]
2427 03be 0F21 movs r1, #15
2428 03c0 8B43 bics r3, r1
2429 03c2 5BB2 sxtb r3, r3
2430 03c4 2D31 adds r1, r1, #45
2431 03c6 6656 ldrsb r6, [r4, r1]
2432 03c8 2D39 subs r1, r1, #45
2433 03ca 3140 ands r1, r6
2434 03cc 0B43 orrs r3, r1
2435 03ce 1370 strb r3, [r2]
2436 .L140:
467:Drivers/BME680/bme680.c **** data_array[count] = data;
2437 .loc 1 467 0
2438 03d0 04AB add r3, sp, #16
2439 03d2 7122 movs r2, #113
2440 03d4 5A55 strb r2, [r3, r5]
468:Drivers/BME680/bme680.c **** count++;
2441 .loc 1 468 0
2442 03d6 1723 movs r3, #23
2443 03d8 6B44 add r3, r3, sp
2444 03da 1A78 ldrb r2, [r3]
2445 03dc 02AB add r3, sp, #8
2446 03de 5A55 strb r2, [r3, r5]
469:Drivers/BME680/bme680.c **** }
2447 .loc 1 469 0
2448 03e0 0135 adds r5, r5, #1
2449 .LVL272:
2450 03e2 EDB2 uxtb r5, r5
2451 .LVL273:
2452 .L135:
472:Drivers/BME680/bme680.c **** rslt = bme680_set_regs(reg_array, data_array, count, dev);
2453 .loc 1 472 0
2454 03e4 0028 cmp r0, #0
2455 03e6 17D0 beq .L165
2456 .LVL274:
2457 .L141:
476:Drivers/BME680/bme680.c **** }
2458 .loc 1 476 0
2459 03e8 4423 movs r3, #68
2460 03ea 5246 mov r2, r10
2461 03ec E254 strb r2, [r4, r3]
2462 .LVL275:
2463 .L112:
480:Drivers/BME680/bme680.c ****
2464 .loc 1 480 0
2465 03ee 06B0 add sp, sp, #24
2466 @ sp needed
2467 .LVL276:
2468 .LVL277:
2469 03f0 1CBC pop {r2, r3, r4}
2470 03f2 9046 mov r8, r2
2471 03f4 9946 mov r9, r3
2472 03f6 A246 mov r10, r4
2473 03f8 F0BD pop {r4, r5, r6, r7, pc}
2474 .LVL278:
2475 .L157:
ARM GAS /tmp/ccvbgJts.s page 69
2476 .LBB171:
2477 .LBB158:
1115:Drivers/BME680/bme680.c **** }
2478 .loc 1 1115 0
2479 03fa 0120 movs r0, #1
2480 .LVL279:
2481 03fc 4042 rsbs r0, r0, #0
2482 03fe 1BE7 b .L125
2483 .LVL280:
2484 .L158:
2485 .LBE158:
2486 .LBE171:
2487 .LBB172:
2488 .LBB161:
2489 0400 0120 movs r0, #1
2490 .LVL281:
2491 0402 4042 rsbs r0, r0, #0
2492 0404 47E7 b .L128
2493 .LVL282:
2494 .L159:
2495 .LBE161:
2496 .LBE172:
2497 .LBB173:
2498 .LBB164:
2499 0406 0120 movs r0, #1
2500 .LVL283:
2501 0408 4042 rsbs r0, r0, #0
2502 040a 84E7 b .L133
2503 .LVL284:
2504 .L160:
2505 .LBE164:
2506 .LBE173:
2507 .LBB174:
2508 .LBB167:
2509 040c 0120 movs r0, #1
2510 .LVL285:
2511 040e 4042 rsbs r0, r0, #0
2512 0410 BFE7 b .L136
2513 .LVL286:
2514 .L161:
2515 .LBE167:
2516 .LBE174:
2517 .LBB175:
2518 .LBB170:
2519 0412 0120 movs r0, #1
2520 0414 4042 rsbs r0, r0, #0
2521 0416 BCE7 b .L136
2522 .LVL287:
2523 .L165:
2524 .LBE170:
2525 .LBE175:
473:Drivers/BME680/bme680.c ****
2526 .loc 1 473 0
2527 0418 2300 movs r3, r4
2528 041a 2A00 movs r2, r5
2529 041c 02A9 add r1, sp, #8
2530 041e 04A8 add r0, sp, #16
ARM GAS /tmp/ccvbgJts.s page 70
2531 .LVL288:
2532 0420 FFF7FEFF bl bme680_set_regs
2533 .LVL289:
2534 0424 E0E7 b .L141
2535 .LVL290:
2536 .L142:
2537 .LBB176:
2538 .LBB137:
1131:Drivers/BME680/bme680.c **** } else {
2539 .loc 1 1131 0
2540 0426 0120 movs r0, #1
2541 0428 4042 rsbs r0, r0, #0
2542 042a E0E7 b .L112
2543 .L143:
2544 042c 0120 movs r0, #1
2545 042e 4042 rsbs r0, r0, #0
2546 0430 DDE7 b .L112
2547 .L144:
2548 0432 0120 movs r0, #1
2549 0434 4042 rsbs r0, r0, #0
2550 0436 DAE7 b .L112
2551 .L145:
2552 0438 0120 movs r0, #1
2553 043a 4042 rsbs r0, r0, #0
2554 043c D7E7 b .L112
2555 .L167:
2556 043e C046 .align 2
2557 .L166:
2558 0440 99590200 .word 154009
2559 0444 BF0F0000 .word 4031
2560 .LBE137:
2561 .LBE176:
2562 .cfi_endproc
2563 .LFE4:
2565 .section .text.bme680_get_sensor_mode,"ax",%progbits
2566 .align 1
2567 .global bme680_get_sensor_mode
2568 .syntax unified
2569 .code 16
2570 .thumb_func
2571 .fpu softvfp
2573 bme680_get_sensor_mode:
2574 .LFB7:
578:Drivers/BME680/bme680.c **** int8_t rslt;
2575 .loc 1 578 0
2576 .cfi_startproc
2577 @ args = 0, pretend = 0, frame = 8
2578 @ frame_needed = 0, uses_anonymous_args = 0
2579 .LVL291:
2580 0000 30B5 push {r4, r5, lr}
2581 .LCFI20:
2582 .cfi_def_cfa_offset 12
2583 .cfi_offset 4, -12
2584 .cfi_offset 5, -8
2585 .cfi_offset 14, -4
2586 0002 83B0 sub sp, sp, #12
2587 .LCFI21:
ARM GAS /tmp/ccvbgJts.s page 71
2588 .cfi_def_cfa_offset 24
2589 0004 041E subs r4, r0, #0
2590 .LVL292:
2591 .LBB177:
2592 .LBB178:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
2593 .loc 1 1129 0
2594 0006 17D0 beq .L170
2595 0008 836C ldr r3, [r0, #72]
2596 000a 002B cmp r3, #0
2597 000c 17D0 beq .L171
2598 000e C36C ldr r3, [r0, #76]
2599 0010 002B cmp r3, #0
2600 0012 17D0 beq .L172
2601 0014 036D ldr r3, [r0, #80]
2602 0016 002B cmp r3, #0
2603 0018 17D0 beq .L173
2604 .LVL293:
2605 .LBE178:
2606 .LBE177:
585:Drivers/BME680/bme680.c **** /* Masking the other register bit info*/
2607 .loc 1 585 0
2608 001a 6B46 mov r3, sp
2609 001c DD1D adds r5, r3, #7
2610 001e 0300 movs r3, r0
2611 0020 0122 movs r2, #1
2612 0022 2900 movs r1, r5
2613 0024 7420 movs r0, #116
2614 .LVL294:
2615 0026 FFF7FEFF bl bme680_get_regs
2616 .LVL295:
587:Drivers/BME680/bme680.c **** }
2617 .loc 1 587 0
2618 002a 2A78 ldrb r2, [r5]
2619 002c 0323 movs r3, #3
2620 002e 1340 ands r3, r2
2621 0030 4422 movs r2, #68
2622 0032 A354 strb r3, [r4, r2]
2623 .LVL296:
2624 .L169:
591:Drivers/BME680/bme680.c ****
2625 .loc 1 591 0
2626 0034 03B0 add sp, sp, #12
2627 @ sp needed
2628 .LVL297:
2629 0036 30BD pop {r4, r5, pc}
2630 .LVL298:
2631 .L170:
2632 .LBB180:
2633 .LBB179:
1131:Drivers/BME680/bme680.c **** } else {
2634 .loc 1 1131 0
2635 0038 0120 movs r0, #1
2636 .LVL299:
2637 003a 4042 rsbs r0, r0, #0
2638 003c FAE7 b .L169
2639 .LVL300:
ARM GAS /tmp/ccvbgJts.s page 72
2640 .L171:
2641 003e 0120 movs r0, #1
2642 .LVL301:
2643 0040 4042 rsbs r0, r0, #0
2644 0042 F7E7 b .L169
2645 .LVL302:
2646 .L172:
2647 0044 0120 movs r0, #1
2648 .LVL303:
2649 0046 4042 rsbs r0, r0, #0
2650 0048 F4E7 b .L169
2651 .LVL304:
2652 .L173:
2653 004a 0120 movs r0, #1
2654 .LVL305:
2655 004c 4042 rsbs r0, r0, #0
2656 004e F1E7 b .L169
2657 .LBE179:
2658 .LBE180:
2659 .cfi_endproc
2660 .LFE7:
2662 .global __aeabi_uidiv
2663 .section .text.bme680_set_profile_dur,"ax",%progbits
2664 .align 1
2665 .global bme680_set_profile_dur
2666 .syntax unified
2667 .code 16
2668 .thumb_func
2669 .fpu softvfp
2671 bme680_set_profile_dur:
2672 .LFB8:
597:Drivers/BME680/bme680.c **** uint32_t tph_dur; /* Calculate in us */
2673 .loc 1 597 0
2674 .cfi_startproc
2675 @ args = 0, pretend = 0, frame = 0
2676 @ frame_needed = 0, uses_anonymous_args = 0
2677 .LVL306:
2678 0000 70B5 push {r4, r5, r6, lr}
2679 .LCFI22:
2680 .cfi_def_cfa_offset 16
2681 .cfi_offset 4, -16
2682 .cfi_offset 5, -12
2683 .cfi_offset 6, -8
2684 .cfi_offset 14, -4
2685 0002 0500 movs r5, r0
2686 0004 0C00 movs r4, r1
601:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
2687 .loc 1 601 0
2688 0006 3923 movs r3, #57
2689 0008 C85C ldrb r0, [r1, r3]
2690 .LVL307:
2691 000a 0133 adds r3, r3, #1
2692 000c CB5C ldrb r3, [r1, r3]
2693 000e C018 adds r0, r0, r3
2694 0010 3823 movs r3, #56
2695 0012 CB5C ldrb r3, [r1, r3]
2696 0014 C318 adds r3, r0, r3
ARM GAS /tmp/ccvbgJts.s page 73
2697 0016 0748 ldr r0, .L175
2698 0018 5843 muls r0, r3
2699 .LVL308:
604:Drivers/BME680/bme680.c **** tph_dur /= UINT32_C(1000); /* Convert to ms */
2700 .loc 1 604 0
2701 001a 074B ldr r3, .L175+4
2702 001c 9C46 mov ip, r3
2703 001e 6044 add r0, r0, ip
2704 .LVL309:
605:Drivers/BME680/bme680.c ****
2705 .loc 1 605 0
2706 0020 FA21 movs r1, #250
2707 .LVL310:
2708 0022 8900 lsls r1, r1, #2
2709 0024 FFF7FEFF bl __aeabi_uidiv
2710 .LVL311:
607:Drivers/BME680/bme680.c **** /* The remaining time should be used for heating */
2711 .loc 1 607 0
2712 0028 0130 adds r0, r0, #1
2713 .LVL312:
609:Drivers/BME680/bme680.c **** }
2714 .loc 1 609 0
2715 002a 80B2 uxth r0, r0
2716 .LVL313:
2717 002c 281A subs r0, r5, r0
2718 002e 4223 movs r3, #66
2719 0030 E052 strh r0, [r4, r3]
610:Drivers/BME680/bme680.c ****
2720 .loc 1 610 0
2721 @ sp needed
2722 .LVL314:
2723 0032 70BD pop {r4, r5, r6, pc}
2724 .L176:
2725 .align 2
2726 .L175:
2727 0034 AB070000 .word 1963
2728 0038 B9120000 .word 4793
2729 .cfi_endproc
2730 .LFE8:
2732 .section .text.bme680_get_profile_dur,"ax",%progbits
2733 .align 1
2734 .global bme680_get_profile_dur
2735 .syntax unified
2736 .code 16
2737 .thumb_func
2738 .fpu softvfp
2740 bme680_get_profile_dur:
2741 .LFB9:
616:Drivers/BME680/bme680.c **** uint32_t tph_dur; /* Calculate in us */
2742 .loc 1 616 0
2743 .cfi_startproc
2744 @ args = 0, pretend = 0, frame = 0
2745 @ frame_needed = 0, uses_anonymous_args = 0
2746 .LVL315:
2747 0000 70B5 push {r4, r5, r6, lr}
2748 .LCFI23:
2749 .cfi_def_cfa_offset 16
ARM GAS /tmp/ccvbgJts.s page 74
2750 .cfi_offset 4, -16
2751 .cfi_offset 5, -12
2752 .cfi_offset 6, -8
2753 .cfi_offset 14, -4
2754 0002 0400 movs r4, r0
2755 0004 0D00 movs r5, r1
620:Drivers/BME680/bme680.c **** tph_dur += UINT32_C(477 * 4); /* TPH switching duration */
2756 .loc 1 620 0
2757 0006 3923 movs r3, #57
2758 0008 C85C ldrb r0, [r1, r3]
2759 .LVL316:
2760 000a 0133 adds r3, r3, #1
2761 000c CB5C ldrb r3, [r1, r3]
2762 000e C018 adds r0, r0, r3
2763 0010 3823 movs r3, #56
2764 0012 CB5C ldrb r3, [r1, r3]
2765 0014 C318 adds r3, r0, r3
2766 0016 0A48 ldr r0, .L179
2767 0018 5843 muls r0, r3
2768 .LVL317:
623:Drivers/BME680/bme680.c **** tph_dur /= UINT32_C(1000); /* Convert to ms */
2769 .loc 1 623 0
2770 001a 0A4B ldr r3, .L179+4
2771 001c 9C46 mov ip, r3
2772 001e 6044 add r0, r0, ip
2773 .LVL318:
624:Drivers/BME680/bme680.c ****
2774 .loc 1 624 0
2775 0020 FA21 movs r1, #250
2776 .LVL319:
2777 0022 8900 lsls r1, r1, #2
2778 0024 FFF7FEFF bl __aeabi_uidiv
2779 .LVL320:
626:Drivers/BME680/bme680.c ****
2780 .loc 1 626 0
2781 0028 0130 adds r0, r0, #1
2782 .LVL321:
628:Drivers/BME680/bme680.c ****
2783 .loc 1 628 0
2784 002a 80B2 uxth r0, r0
2785 .LVL322:
2786 002c 2080 strh r0, [r4]
631:Drivers/BME680/bme680.c **** /* The remaining time should be used for heating */
2787 .loc 1 631 0
2788 002e 3E23 movs r3, #62
2789 0030 EB5C ldrb r3, [r5, r3]
2790 0032 002B cmp r3, #0
2791 0034 03D0 beq .L177
633:Drivers/BME680/bme680.c **** }
2792 .loc 1 633 0
2793 0036 4223 movs r3, #66
2794 0038 EB5A ldrh r3, [r5, r3]
2795 003a C018 adds r0, r0, r3
2796 003c 2080 strh r0, [r4]
2797 .L177:
635:Drivers/BME680/bme680.c ****
2798 .loc 1 635 0
ARM GAS /tmp/ccvbgJts.s page 75
2799 @ sp needed
2800 .LVL323:
2801 .LVL324:
2802 003e 70BD pop {r4, r5, r6, pc}
2803 .L180:
2804 .align 2
2805 .L179:
2806 0040 AB070000 .word 1963
2807 0044 B9120000 .word 4793
2808 .cfi_endproc
2809 .LFE9:
2811 .global __aeabi_lmul
2812 .global __aeabi_ldivmod
2813 .section .text.bme680_get_sensor_data,"ax",%progbits
2814 .align 1
2815 .global bme680_get_sensor_data
2816 .syntax unified
2817 .code 16
2818 .thumb_func
2819 .fpu softvfp
2821 bme680_get_sensor_data:
2822 .LFB10:
643:Drivers/BME680/bme680.c **** int8_t rslt;
2823 .loc 1 643 0
2824 .cfi_startproc
2825 @ args = 0, pretend = 0, frame = 40
2826 @ frame_needed = 0, uses_anonymous_args = 0
2827 .LVL325:
2828 0000 F0B5 push {r4, r5, r6, r7, lr}
2829 .LCFI24:
2830 .cfi_def_cfa_offset 20
2831 .cfi_offset 4, -20
2832 .cfi_offset 5, -16
2833 .cfi_offset 6, -12
2834 .cfi_offset 7, -8
2835 .cfi_offset 14, -4
2836 0002 DE46 mov lr, fp
2837 0004 5746 mov r7, r10
2838 0006 4E46 mov r6, r9
2839 0008 4546 mov r5, r8
2840 000a E0B5 push {r5, r6, r7, lr}
2841 .LCFI25:
2842 .cfi_def_cfa_offset 36
2843 .cfi_offset 8, -36
2844 .cfi_offset 9, -32
2845 .cfi_offset 10, -28
2846 .cfi_offset 11, -24
2847 000c 8BB0 sub sp, sp, #44
2848 .LCFI26:
2849 .cfi_def_cfa_offset 80
2850 000e 8146 mov r9, r0
2851 0010 0D1E subs r5, r1, #0
2852 .LVL326:
2853 .LBB195:
2854 .LBB196:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
2855 .loc 1 1129 0
ARM GAS /tmp/ccvbgJts.s page 76
2856 0012 00D1 bne .LCB3283
2857 0014 C8E1 b .L191 @long jump
2858 .LCB3283:
2859 0016 8B6C ldr r3, [r1, #72]
2860 0018 002B cmp r3, #0
2861 001a 00D1 bne .LCB3287
2862 001c C8E1 b .L192 @long jump
2863 .LCB3287:
2864 001e CB6C ldr r3, [r1, #76]
2865 0020 002B cmp r3, #0
2866 0022 00D1 bne .LCB3291
2867 0024 C8E1 b .L193 @long jump
2868 .LCB3291:
2869 0026 0B6D ldr r3, [r1, #80]
2870 0028 002B cmp r3, #0
2871 002a 00D1 bne .LCB3295
2872 002c C8E1 b .L194 @long jump
2873 .LCB3295:
2874 .LVL327:
2875 .LBE196:
2876 .LBE195:
2877 .LBB198:
2878 .LBB199:
983:Drivers/BME680/bme680.c **** uint8_t gas_range;
2879 .loc 1 983 0
2880 002e 0F22 movs r2, #15
2881 0030 0021 movs r1, #0
2882 .LVL328:
2883 0032 06A8 add r0, sp, #24
2884 .LVL329:
2885 0034 FFF7FEFF bl memset
2886 .LVL330:
2887 .LBB200:
2888 .LBB201:
1129:Drivers/BME680/bme680.c **** /* Device structure pointer is not valid */
2889 .loc 1 1129 0
2890 0038 002D cmp r5, #0
2891 003a 0ED0 beq .L195
2892 003c AB6C ldr r3, [r5, #72]
2893 003e 002B cmp r3, #0
2894 0040 12D0 beq .L196
2895 0042 EB6C ldr r3, [r5, #76]
2896 0044 002B cmp r3, #0
2897 0046 13D0 beq .L197
2898 0048 2B6D ldr r3, [r5, #80]
2899 004a 002B cmp r3, #0
2900 004c 02D0 beq .L202
2901 .loc 1 1134 0
2902 004e 0023 movs r3, #0
2903 0050 0193 str r3, [sp, #4]
2904 0052 05E0 b .L183
2905 .L202:
1131:Drivers/BME680/bme680.c **** } else {
2906 .loc 1 1131 0
2907 0054 013B subs r3, r3, #1
2908 0056 0193 str r3, [sp, #4]
2909 0058 02E0 b .L183
ARM GAS /tmp/ccvbgJts.s page 77
2910 .L195:
2911 005a 0123 movs r3, #1
2912 005c 5B42 rsbs r3, r3, #0
2913 005e 0193 str r3, [sp, #4]
2914 .L183:
2915 .loc 1 1134 0
2916 0060 0A24 movs r4, #10
2917 0062 019E ldr r6, [sp, #4]
2918 0064 4F46 mov r7, r9
2919 0066 28E1 b .L188
2920 .L196:
1131:Drivers/BME680/bme680.c **** } else {
2921 .loc 1 1131 0
2922 0068 0123 movs r3, #1
2923 006a 5B42 rsbs r3, r3, #0
2924 006c 0193 str r3, [sp, #4]
2925 006e F7E7 b .L183
2926 .L197:
2927 0070 0123 movs r3, #1
2928 0072 5B42 rsbs r3, r3, #0
2929 0074 0193 str r3, [sp, #4]
2930 0076 F3E7 b .L183
2931 .LVL331:
2932 .L204:
2933 0078 0196 str r6, [sp, #4]
2934 007a B946 mov r9, r7
2935 007c 029F ldr r7, [sp, #8]
2936 .LVL332:
2937 .LBE201:
2938 .LBE200:
2939 .LBB202:
2940 .LBB203:
819:Drivers/BME680/bme680.c **** var2 = (var1 * (int32_t) dev->calib.par_t2) >> 11;
2941 .loc 1 819 0
2942 007e C010 asrs r0, r0, #3
2943 .LVL333:
2944 0080 EB8A ldrh r3, [r5, #22]
2945 0082 5B00 lsls r3, r3, #1
2946 0084 C01A subs r0, r0, r3
2947 0086 C117 asrs r1, r0, #31
2948 .LVL334:
820:Drivers/BME680/bme680.c **** var3 = ((var1 >> 1) * (var1 >> 1)) >> 12;
2949 .loc 1 820 0
2950 0088 1823 movs r3, #24
2951 008a EA5E ldrsh r2, [r5, r3]
2952 008c D317 asrs r3, r2, #31
2953 008e 0290 str r0, [sp, #8]
2954 .LVL335:
2955 0090 0491 str r1, [sp, #16]
2956 0092 FFF7FEFF bl __aeabi_lmul
2957 .LVL336:
2958 0096 4905 lsls r1, r1, #21
2959 0098 C60A lsrs r6, r0, #11
2960 .LVL337:
2961 009a 0E43 orrs r6, r1
2962 .LVL338:
821:Drivers/BME680/bme680.c **** var3 = ((var3) * ((int32_t) dev->calib.par_t3 << 4)) >> 14;
ARM GAS /tmp/ccvbgJts.s page 78
2963 .loc 1 821 0
2964 009c 0499 ldr r1, [sp, #16]
2965 009e CB07 lsls r3, r1, #31
2966 00a0 0298 ldr r0, [sp, #8]
2967 00a2 4008 lsrs r0, r0, #1
2968 00a4 1843 orrs r0, r3
2969 00a6 0200 movs r2, r0
2970 00a8 0B00 movs r3, r1
2971 00aa FFF7FEFF bl __aeabi_lmul
2972 .LVL339:
2973 00ae 0B05 lsls r3, r1, #20
2974 00b0 000B lsrs r0, r0, #12
2975 00b2 1843 orrs r0, r3
2976 00b4 0913 asrs r1, r1, #12
2977 .LVL340:
822:Drivers/BME680/bme680.c **** dev->calib.t_fine = (int32_t) (var2 + var3);
2978 .loc 1 822 0
2979 00b6 1A22 movs r2, #26
2980 00b8 AA56 ldrsb r2, [r5, r2]
2981 00ba 1201 lsls r2, r2, #4
2982 00bc D317 asrs r3, r2, #31
2983 00be FFF7FEFF bl __aeabi_lmul
2984 .LVL341:
2985 00c2 8904 lsls r1, r1, #18
2986 00c4 800B lsrs r0, r0, #14
2987 00c6 0843 orrs r0, r1
823:Drivers/BME680/bme680.c **** calc_temp = (int16_t) (((dev->calib.t_fine * 5) + 128) >> 8);
2988 .loc 1 823 0
2989 00c8 3018 adds r0, r6, r0
2990 00ca 2863 str r0, [r5, #48]
824:Drivers/BME680/bme680.c ****
2991 .loc 1 824 0
2992 00cc 8300 lsls r3, r0, #2
2993 00ce 1B18 adds r3, r3, r0
2994 00d0 8033 adds r3, r3, #128
2995 00d2 1B12 asrs r3, r3, #8
2996 .LVL342:
2997 .LBE203:
2998 .LBE202:
1015:Drivers/BME680/bme680.c **** data->pressure = calc_pressure(adc_pres, dev);
2999 .loc 1 1015 0
3000 00d4 4A46 mov r2, r9
3001 00d6 9380 strh r3, [r2, #4]
3002 .LVL343:
3003 .LBB204:
3004 .LBB205:
840:Drivers/BME680/bme680.c **** var2 = ((((var1 >> 2) * (var1 >> 2)) >> 11) *
3005 .loc 1 840 0
3006 00d8 2B6B ldr r3, [r5, #48]
3007 00da 5A10 asrs r2, r3, #1
3008 00dc BA4B ldr r3, .L207
3009 00de 9C46 mov ip, r3
3010 00e0 6244 add r2, r2, ip
3011 .LVL344:
841:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p6) >> 2;
3012 .loc 1 841 0
3013 00e2 9110 asrs r1, r2, #2
ARM GAS /tmp/ccvbgJts.s page 79
3014 00e4 4943 muls r1, r1
3015 00e6 C812 asrs r0, r1, #11
842:Drivers/BME680/bme680.c **** var2 = var2 + ((var1 * (int32_t)dev->calib.par_p5) << 1);
3016 .loc 1 842 0
3017 00e8 2623 movs r3, #38
3018 00ea EB56 ldrsb r3, [r5, r3]
841:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p6) >> 2;
3019 .loc 1 841 0
3020 00ec 4343 muls r3, r0
3021 00ee 9B10 asrs r3, r3, #2
3022 .LVL345:
843:Drivers/BME680/bme680.c **** var2 = (var2 >> 2) + ((int32_t)dev->calib.par_p4 << 16);
3023 .loc 1 843 0
3024 00f0 2426 movs r6, #36
3025 00f2 A85F ldrsh r0, [r5, r6]
3026 00f4 5043 muls r0, r2
3027 00f6 4000 lsls r0, r0, #1
3028 00f8 1B18 adds r3, r3, r0
3029 .LVL346:
844:Drivers/BME680/bme680.c **** var1 = (((((var1 >> 2) * (var1 >> 2)) >> 13) *
3030 .loc 1 844 0
3031 00fa 9B10 asrs r3, r3, #2
3032 .LVL347:
3033 00fc 2226 movs r6, #34
3034 00fe A85F ldrsh r0, [r5, r6]
3035 .LVL348:
3036 0100 0004 lsls r0, r0, #16
3037 0102 1B18 adds r3, r3, r0
3038 .LVL349:
845:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p3 << 5)) >> 3) +
3039 .loc 1 845 0
3040 0104 4813 asrs r0, r1, #13
846:Drivers/BME680/bme680.c **** (((int32_t)dev->calib.par_p2 * var1) >> 1);
3041 .loc 1 846 0
3042 0106 2021 movs r1, #32
3043 0108 6956 ldrsb r1, [r5, r1]
3044 010a 4901 lsls r1, r1, #5
845:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p3 << 5)) >> 3) +
3045 .loc 1 845 0
3046 010c 4143 muls r1, r0
846:Drivers/BME680/bme680.c **** (((int32_t)dev->calib.par_p2 * var1) >> 1);
3047 .loc 1 846 0
3048 010e C910 asrs r1, r1, #3
847:Drivers/BME680/bme680.c **** var1 = var1 >> 18;
3049 .loc 1 847 0
3050 0110 1E26 movs r6, #30
3051 0112 A85F ldrsh r0, [r5, r6]
3052 0114 4243 muls r2, r0
3053 .LVL350:
3054 0116 5210 asrs r2, r2, #1
845:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p3 << 5)) >> 3) +
3055 .loc 1 845 0
3056 0118 8918 adds r1, r1, r2
3057 .LVL351:
848:Drivers/BME680/bme680.c **** var1 = ((32768 + var1) * (int32_t)dev->calib.par_p1) >> 15;
3058 .loc 1 848 0
3059 011a 8914 asrs r1, r1, #18
ARM GAS /tmp/ccvbgJts.s page 80
3060 .LVL352:
849:Drivers/BME680/bme680.c **** pressure_comp = 1048576 - pres_adc;
3061 .loc 1 849 0
3062 011c 8022 movs r2, #128
3063 011e 1202 lsls r2, r2, #8
3064 0120 9446 mov ip, r2
3065 0122 6144 add r1, r1, ip
3066 .LVL353:
3067 0124 AA8B ldrh r2, [r5, #28]
3068 0126 5143 muls r1, r2
3069 .LVL354:
3070 0128 C913 asrs r1, r1, #15
3071 .LVL355:
850:Drivers/BME680/bme680.c **** pressure_comp = (int32_t)((pressure_comp - (var2 >> 12)) * ((uint32_t)3125));
3072 .loc 1 850 0
3073 012a 8020 movs r0, #128
3074 012c 4003 lsls r0, r0, #13
3075 012e C01B subs r0, r0, r7
3076 .LVL356:
851:Drivers/BME680/bme680.c **** var4 = (1 << 31);
3077 .loc 1 851 0
3078 0130 1B13 asrs r3, r3, #12
3079 .LVL357:
3080 0132 C01A subs r0, r0, r3
3081 .LVL358:
3082 0134 A54B ldr r3, .L207+4
3083 0136 5843 muls r0, r3
3084 .LVL359:
854:Drivers/BME680/bme680.c **** else
3085 .loc 1 854 0
3086 0138 FFF7FEFF bl __aeabi_uidiv
3087 .LVL360:
3088 013c 4000 lsls r0, r0, #1
3089 .LVL361:
857:Drivers/BME680/bme680.c **** (pressure_comp >> 3)) >> 13)) >> 12;
3090 .loc 1 857 0
3091 013e 2A23 movs r3, #42
3092 0140 E95E ldrsh r1, [r5, r3]
3093 0142 C210 asrs r2, r0, #3
3094 0144 5243 muls r2, r2
858:Drivers/BME680/bme680.c **** var2 = ((int32_t)(pressure_comp >> 2) *
3095 .loc 1 858 0
3096 0146 5313 asrs r3, r2, #13
857:Drivers/BME680/bme680.c **** (pressure_comp >> 3)) >> 13)) >> 12;
3097 .loc 1 857 0
3098 0148 4B43 muls r3, r1
3099 014a 1A13 asrs r2, r3, #12
3100 .LVL362:
859:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p8) >> 13;
3101 .loc 1 859 0
3102 014c 8310 asrs r3, r0, #2
860:Drivers/BME680/bme680.c **** var3 = ((int32_t)(pressure_comp >> 8) * (int32_t)(pressure_comp >> 8) *
3103 .loc 1 860 0
3104 014e 2826 movs r6, #40
3105 0150 A95F ldrsh r1, [r5, r6]
859:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p8) >> 13;
3106 .loc 1 859 0
ARM GAS /tmp/ccvbgJts.s page 81
3107 0152 5943 muls r1, r3
3108 0154 4913 asrs r1, r1, #13
3109 .LVL363:
861:Drivers/BME680/bme680.c **** (int32_t)(pressure_comp >> 8) *
3110 .loc 1 861 0
3111 0156 0612 asrs r6, r0, #8
3112 0158 3300 movs r3, r6
3113 015a 7343 muls r3, r6
3114 015c 5E43 muls r6, r3
863:Drivers/BME680/bme680.c ****
3115 .loc 1 863 0
3116 015e 2C23 movs r3, #44
3117 0160 EB5C ldrb r3, [r5, r3]
862:Drivers/BME680/bme680.c **** (int32_t)dev->calib.par_p10) >> 17;
3118 .loc 1 862 0
3119 0162 7343 muls r3, r6
861:Drivers/BME680/bme680.c **** (int32_t)(pressure_comp >> 8) *
3120 .loc 1 861 0
3121 0164 5B14 asrs r3, r3, #17
3122 .LVL364:
865:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p7 << 7)) >> 4);
3123 .loc 1 865 0
3124 0166 5118 adds r1, r2, r1
3125 .LVL365:
3126 0168 5B18 adds r3, r3, r1
3127 .LVL366:
866:Drivers/BME680/bme680.c ****
3128 .loc 1 866 0
3129 016a 2722 movs r2, #39
3130 .LVL367:
3131 016c AA56 ldrsb r2, [r5, r2]
3132 016e D201 lsls r2, r2, #7
865:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p7 << 7)) >> 4);
3133 .loc 1 865 0
3134 0170 9B18 adds r3, r3, r2
866:Drivers/BME680/bme680.c ****
3135 .loc 1 866 0
3136 0172 1B11 asrs r3, r3, #4
865:Drivers/BME680/bme680.c **** ((int32_t)dev->calib.par_p7 << 7)) >> 4);
3137 .loc 1 865 0
3138 0174 C018 adds r0, r0, r3
3139 .LVL368:
3140 .LBE205:
3141 .LBE204:
1016:Drivers/BME680/bme680.c **** data->humidity = calc_humidity(adc_hum, dev);
3142 .loc 1 1016 0
3143 0176 4B46 mov r3, r9
3144 0178 9860 str r0, [r3, #8]
3145 .LVL369:
3146 .LBB206:
3147 .LBB207:
886:Drivers/BME680/bme680.c **** var1 = (int32_t) (hum_adc - ((int32_t) ((int32_t) dev->calib.par_h1 * 16)))
3148 .loc 1 886 0
3149 017a 2B6B ldr r3, [r5, #48]
3150 017c 9E00 lsls r6, r3, #2
3151 017e F618 adds r6, r6, r3
3152 0180 8036 adds r6, r6, #128
ARM GAS /tmp/ccvbgJts.s page 82
3153 0182 3612 asrs r6, r6, #8
3154 .LVL370:
887:Drivers/BME680/bme680.c **** - (((temp_scaled * (int32_t) dev->calib.par_h3) / ((int32_t) 100)) >> 1);
3155 .loc 1 887 0
3156 0184 2F89 ldrh r7, [r5, #8]
3157 0186 3F01 lsls r7, r7, #4
3158 0188 5B46 mov r3, fp
3159 018a DF1B subs r7, r3, r7
888:Drivers/BME680/bme680.c **** var2 = ((int32_t) dev->calib.par_h2
3160 .loc 1 888 0
3161 018c 0C20 movs r0, #12
3162 018e 2856 ldrsb r0, [r5, r0]
3163 0190 7043 muls r0, r6
3164 0192 6421 movs r1, #100
3165 0194 FFF7FEFF bl __aeabi_idiv
3166 .LVL371:
3167 0198 4010 asrs r0, r0, #1
887:Drivers/BME680/bme680.c **** - (((temp_scaled * (int32_t) dev->calib.par_h3) / ((int32_t) 100)) >> 1);
3168 .loc 1 887 0
3169 019a 3B1A subs r3, r7, r0
3170 019c 0293 str r3, [sp, #8]
3171 .LVL372:
889:Drivers/BME680/bme680.c **** * (((temp_scaled * (int32_t) dev->calib.par_h4) / ((int32_t) 100))
3172 .loc 1 889 0
3173 019e 6A89 ldrh r2, [r5, #10]
3174 01a0 9346 mov fp, r2
3175 .LVL373:
890:Drivers/BME680/bme680.c **** + (((temp_scaled * ((temp_scaled * (int32_t) dev->calib.par_h5) / ((int32_t) 100))) >> 6)
3176 .loc 1 890 0
3177 01a2 0D20 movs r0, #13
3178 01a4 2856 ldrsb r0, [r5, r0]
3179 01a6 7043 muls r0, r6
3180 01a8 6421 movs r1, #100
3181 01aa FFF7FEFF bl __aeabi_idiv
3182 .LVL374:
3183 01ae 0700 movs r7, r0
891:Drivers/BME680/bme680.c **** / ((int32_t) 100)) + (int32_t) (1 << 14))) >> 10;
3184 .loc 1 891 0
3185 01b0 0E20 movs r0, #14
3186 01b2 2856 ldrsb r0, [r5, r0]
3187 01b4 7043 muls r0, r6
3188 01b6 6421 movs r1, #100
3189 01b8 FFF7FEFF bl __aeabi_idiv
3190 .LVL375:
3191 01bc 7043 muls r0, r6
3192 01be 8011 asrs r0, r0, #6
892:Drivers/BME680/bme680.c **** var3 = var1 * var2;
3193 .loc 1 892 0
3194 01c0 6421 movs r1, #100
3195 01c2 FFF7FEFF bl __aeabi_idiv
3196 .LVL376:
891:Drivers/BME680/bme680.c **** / ((int32_t) 100)) + (int32_t) (1 << 14))) >> 10;
3197 .loc 1 891 0
3198 01c6 3F18 adds r7, r7, r0
892:Drivers/BME680/bme680.c **** var3 = var1 * var2;
3199 .loc 1 892 0
3200 01c8 8022 movs r2, #128
ARM GAS /tmp/ccvbgJts.s page 83
3201 01ca D201 lsls r2, r2, #7
3202 01cc 9446 mov ip, r2
3203 01ce 6744 add r7, r7, ip
890:Drivers/BME680/bme680.c **** + (((temp_scaled * ((temp_scaled * (int32_t) dev->calib.par_h5) / ((int32_t) 100))) >> 6)
3204 .loc 1 890 0
3205 01d0 5A46 mov r2, fp
3206 01d2 5743 muls r7, r2
889:Drivers/BME680/bme680.c **** * (((temp_scaled * (int32_t) dev->calib.par_h4) / ((int32_t) 100))
3207 .loc 1 889 0
3208 01d4 BF12 asrs r7, r7, #10
3209 .LVL377:
893:Drivers/BME680/bme680.c **** var4 = (int32_t) dev->calib.par_h6 << 7;
3210 .loc 1 893 0
3211 01d6 029B ldr r3, [sp, #8]
3212 01d8 5F43 muls r7, r3
3213 .LVL378:
894:Drivers/BME680/bme680.c **** var4 = ((var4) + ((temp_scaled * (int32_t) dev->calib.par_h7) / ((int32_t) 100))) >> 4;
3214 .loc 1 894 0
3215 01da E87B ldrb r0, [r5, #15]
3216 01dc C301 lsls r3, r0, #7
3217 01de 9B46 mov fp, r3
3218 .LVL379:
895:Drivers/BME680/bme680.c **** var5 = ((var3 >> 14) * (var3 >> 14)) >> 10;
3219 .loc 1 895 0
3220 01e0 1020 movs r0, #16
3221 01e2 2856 ldrsb r0, [r5, r0]
3222 01e4 7043 muls r0, r6
3223 01e6 6421 movs r1, #100
3224 01e8 FFF7FEFF bl __aeabi_idiv
3225 .LVL380:
3226 01ec 5844 add r0, r0, fp
3227 01ee 0011 asrs r0, r0, #4
3228 .LVL381:
896:Drivers/BME680/bme680.c **** var6 = (var4 * var5) >> 1;
3229 .loc 1 896 0
3230 01f0 BB13 asrs r3, r7, #14
3231 01f2 5B43 muls r3, r3
3232 01f4 9B12 asrs r3, r3, #10
3233 .LVL382:
897:Drivers/BME680/bme680.c **** calc_hum = (((var3 + var6) >> 10) * ((int32_t) 1000)) >> 12;
3234 .loc 1 897 0
3235 01f6 4343 muls r3, r0
3236 .LVL383:
3237 01f8 5B10 asrs r3, r3, #1
3238 .LVL384:
898:Drivers/BME680/bme680.c ****
3239 .loc 1 898 0
3240 01fa FF18 adds r7, r7, r3
3241 .LVL385:
3242 01fc BF12 asrs r7, r7, #10
3243 01fe 7B01 lsls r3, r7, #5
3244 .LVL386:
3245 0200 DB1B subs r3, r3, r7
3246 0202 9B00 lsls r3, r3, #2
3247 0204 DB19 adds r3, r3, r7
3248 0206 DB00 lsls r3, r3, #3
3249 0208 1B13 asrs r3, r3, #12
ARM GAS /tmp/ccvbgJts.s page 84
3250 .LVL387:
900:Drivers/BME680/bme680.c **** calc_hum = 100000;
3251 .loc 1 900 0
3252 020a 714A ldr r2, .L207+8
3253 020c 9342 cmp r3, r2
3254 020e 03DC bgt .L199
902:Drivers/BME680/bme680.c **** calc_hum = 0;
3255 .loc 1 902 0
3256 0210 002B cmp r3, #0
3257 0212 02DA bge .L186
903:Drivers/BME680/bme680.c ****
3258 .loc 1 903 0
3259 0214 0023 movs r3, #0
3260 .LVL388:
3261 0216 00E0 b .L186
3262 .LVL389:
3263 .L199:
901:Drivers/BME680/bme680.c **** else if (calc_hum < 0)
3264 .loc 1 901 0
3265 0218 6D4B ldr r3, .L207+8
3266 .LVL390:
3267 .L186:
3268 .LBE207:
3269 .LBE206:
1017:Drivers/BME680/bme680.c **** data->gas_resistance = calc_gas_resistance(adc_gas_res, gas_range, dev);
3270 .loc 1 1017 0
3271 021a 4A46 mov r2, r9
3272 021c D360 str r3, [r2, #12]
3273 .LVL391:
3274 .LBB208:
3275 .LBB209:
918:Drivers/BME680/bme680.c **** ((int64_t) lookupTable1[gas_range])) >> 16;
3276 .loc 1 918 0
3277 021e 3623 movs r3, #54
3278 0220 EE56 ldrsb r6, [r5, r3]
3279 0222 3000 movs r0, r6
3280 0224 F617 asrs r6, r6, #31
3281 0226 3100 movs r1, r6
3282 0228 870F lsrs r7, r0, #30
3283 022a B300 lsls r3, r6, #2
3284 022c 3B43 orrs r3, r7
3285 022e 8200 lsls r2, r0, #2
3286 0230 1218 adds r2, r2, r0
3287 0232 4B41 adcs r3, r3, r1
3288 0234 6748 ldr r0, .L207+12
3289 0236 0021 movs r1, #0
3290 0238 8018 adds r0, r0, r2
3291 023a 5941 adcs r1, r1, r3
919:Drivers/BME680/bme680.c **** var2 = (((int64_t) ((int64_t) gas_res_adc << 15) - (int64_t) (16777216)) + var1);
3292 .loc 1 919 0
3293 023c 5346 mov r3, r10
3294 023e 9B00 lsls r3, r3, #2
3295 0240 9A46 mov r10, r3
3296 .LVL392:
3297 0242 654B ldr r3, .L207+16
3298 0244 5246 mov r2, r10
3299 0246 D258 ldr r2, [r2, r3]
ARM GAS /tmp/ccvbgJts.s page 85
918:Drivers/BME680/bme680.c **** ((int64_t) lookupTable1[gas_range])) >> 16;
3300 .loc 1 918 0
3301 0248 0023 movs r3, #0
3302 024a FFF7FEFF bl __aeabi_lmul
3303 .LVL393:
3304 024e 0B04 lsls r3, r1, #16
3305 0250 060C lsrs r6, r0, #16
3306 0252 1E43 orrs r6, r3
3307 0254 0F14 asrs r7, r1, #16
3308 .LVL394:
920:Drivers/BME680/bme680.c **** var3 = (((int64_t) lookupTable2[gas_range] * (int64_t) var1) >> 9);
3309 .loc 1 920 0
3310 0256 0021 movs r1, #0
3311 0258 4346 mov r3, r8
3312 025a D803 lsls r0, r3, #15
3313 025c FF22 movs r2, #255
3314 025e 1206 lsls r2, r2, #24
3315 0260 0123 movs r3, #1
3316 0262 5B42 rsbs r3, r3, #0
3317 0264 1218 adds r2, r2, r0
3318 0266 4B41 adcs r3, r3, r1
3319 0268 9219 adds r2, r2, r6
3320 026a 7B41 adcs r3, r3, r7
3321 026c 0492 str r2, [sp, #16]
3322 026e 0593 str r3, [sp, #20]
3323 .LVL395:
921:Drivers/BME680/bme680.c **** calc_gas_res = (uint32_t) ((var3 + ((int64_t) var2 >> 1)) / (int64_t) var2);
3324 .loc 1 921 0
3325 0270 5A4B ldr r3, .L207+20
3326 0272 5146 mov r1, r10
3327 0274 CA58 ldr r2, [r1, r3]
3328 .LVL396:
3329 0276 0023 movs r3, #0
3330 0278 3000 movs r0, r6
3331 027a 3900 movs r1, r7
3332 027c FFF7FEFF bl __aeabi_lmul
3333 .LVL397:
3334 0280 CE05 lsls r6, r1, #23
3335 .LVL398:
3336 0282 430A lsrs r3, r0, #9
3337 0284 3343 orrs r3, r6
3338 0286 0293 str r3, [sp, #8]
3339 0288 4B12 asrs r3, r1, #9
3340 028a 0393 str r3, [sp, #12]
3341 .LVL399:
922:Drivers/BME680/bme680.c ****
3342 .loc 1 922 0
3343 028c 049A ldr r2, [sp, #16]
3344 028e 059B ldr r3, [sp, #20]
3345 0290 DE07 lsls r6, r3, #31
3346 0292 5008 lsrs r0, r2, #1
3347 0294 3043 orrs r0, r6
3348 0296 1600 movs r6, r2
3349 0298 1F00 movs r7, r3
3350 029a 5910 asrs r1, r3, #1
3351 029c 029A ldr r2, [sp, #8]
3352 029e 039B ldr r3, [sp, #12]
ARM GAS /tmp/ccvbgJts.s page 86
3353 02a0 8018 adds r0, r0, r2
3354 02a2 5941 adcs r1, r1, r3
3355 02a4 3200 movs r2, r6
3356 02a6 3B00 movs r3, r7
3357 02a8 FFF7FEFF bl __aeabi_ldivmod
3358 .LVL400:
3359 .LBE209:
3360 .LBE208:
1018:Drivers/BME680/bme680.c **** break;
3361 .loc 1 1018 0
3362 02ac 4B46 mov r3, r9
3363 02ae 1861 str r0, [r3, #16]
3364 02b0 5EE0 b .L187
3365 .LVL401:
3366 .L184:
1024:Drivers/BME680/bme680.c **** } while (tries);
3367 .loc 1 1024 0
3368 02b2 013C subs r4, r4, #1
3369 .LVL402:
3370 02b4 E4B2 uxtb r4, r4
3371 .LVL403:
1025:Drivers/BME680/bme680.c ****
3372 .loc 1 1025 0
3373 02b6 002C cmp r4, #0
3374 02b8 58D0 beq .L203
3375 .LVL404:
3376 .L188:
994:Drivers/BME680/bme680.c **** rslt = bme680_get_regs(((uint8_t) (BME680_FIELD0_ADDR)), buff, (uint16_t) BME680_FIELD_LENGTH,
3377 .loc 1 994 0
3378 02ba 002E cmp r6, #0
3379 02bc F9D1 bne .L184
995:Drivers/BME680/bme680.c **** dev);
3380 .loc 1 995 0
3381 02be 2B00 movs r3, r5
3382 02c0 0F22 movs r2, #15
3383 02c2 06A9 add r1, sp, #24
3384 02c4 1D20 movs r0, #29
3385 02c6 FFF7FEFF bl bme680_get_regs
3386 .LVL405:
3387 02ca 0600 movs r6, r0
3388 .LVL406:
998:Drivers/BME680/bme680.c **** data->gas_index = buff[0] & BME680_GAS_INDEX_MSK;
3389 .loc 1 998 0
3390 02cc 06AB add r3, sp, #24
3391 02ce 1B78 ldrb r3, [r3]
3392 02d0 7F22 movs r2, #127
3393 02d2 1900 movs r1, r3
3394 02d4 9143 bics r1, r2
3395 02d6 8C46 mov ip, r1
999:Drivers/BME680/bme680.c **** data->meas_index = buff[1];
3396 .loc 1 999 0
3397 02d8 703A subs r2, r2, #112
3398 02da 9246 mov r10, r2
3399 02dc 1340 ands r3, r2
3400 02de 7B70 strb r3, [r7, #1]
1000:Drivers/BME680/bme680.c ****
3401 .loc 1 1000 0
ARM GAS /tmp/ccvbgJts.s page 87
3402 02e0 06AB add r3, sp, #24
3403 02e2 5B78 ldrb r3, [r3, #1]
3404 02e4 BB70 strb r3, [r7, #2]
1003:Drivers/BME680/bme680.c **** | ((uint32_t) buff[4] / 16));
3405 .loc 1 1003 0
3406 02e6 06AB add r3, sp, #24
3407 02e8 9A78 ldrb r2, [r3, #2]
3408 02ea 1203 lsls r2, r2, #12
3409 02ec DB78 ldrb r3, [r3, #3]
3410 02ee 1B01 lsls r3, r3, #4
3411 02f0 1A43 orrs r2, r3
1004:Drivers/BME680/bme680.c **** adc_temp = (uint32_t) (((uint32_t) buff[5] * 4096) | ((uint32_t) buff[6] * 16)
3412 .loc 1 1004 0
3413 02f2 06AB add r3, sp, #24
3414 02f4 1B79 ldrb r3, [r3, #4]
3415 02f6 1B09 lsrs r3, r3, #4
1003:Drivers/BME680/bme680.c **** | ((uint32_t) buff[4] / 16));
3416 .loc 1 1003 0
3417 02f8 1A43 orrs r2, r3
3418 02fa 0292 str r2, [sp, #8]
3419 .LVL407:
1005:Drivers/BME680/bme680.c **** | ((uint32_t) buff[7] / 16));
3420 .loc 1 1005 0
3421 02fc 06AB add r3, sp, #24
3422 02fe 5879 ldrb r0, [r3, #5]
3423 .LVL408:
3424 0300 0003 lsls r0, r0, #12
3425 0302 9B79 ldrb r3, [r3, #6]
3426 0304 1B01 lsls r3, r3, #4
3427 0306 1843 orrs r0, r3
1006:Drivers/BME680/bme680.c **** adc_hum = (uint16_t) (((uint32_t) buff[8] * 256) | (uint32_t) buff[9]);
3428 .loc 1 1006 0
3429 0308 06AB add r3, sp, #24
3430 030a DB79 ldrb r3, [r3, #7]
3431 030c 1B09 lsrs r3, r3, #4
1005:Drivers/BME680/bme680.c **** | ((uint32_t) buff[7] / 16));
3432 .loc 1 1005 0
3433 030e 1843 orrs r0, r3
3434 .LVL409:
1007:Drivers/BME680/bme680.c **** adc_gas_res = (uint16_t) ((uint32_t) buff[13] * 4 | (((uint32_t) buff[14]) / 64));
3435 .loc 1 1007 0
3436 0310 06AB add r3, sp, #24
3437 0312 197A ldrb r1, [r3, #8]
3438 0314 0902 lsls r1, r1, #8
3439 0316 5B7A ldrb r3, [r3, #9]
3440 0318 1943 orrs r1, r3
3441 031a 8B46 mov fp, r1
3442 .LVL410:
1008:Drivers/BME680/bme680.c **** gas_range = buff[14] & BME680_GAS_RANGE_MSK;
3443 .loc 1 1008 0
3444 031c 06AB add r3, sp, #24
3445 031e 5B7B ldrb r3, [r3, #13]
3446 0320 9B00 lsls r3, r3, #2
3447 0322 9846 mov r8, r3
3448 0324 06AB add r3, sp, #24
3449 0326 9B7B ldrb r3, [r3, #14]
3450 0328 9A09 lsrs r2, r3, #6
ARM GAS /tmp/ccvbgJts.s page 88
3451 .LVL411:
3452 032a 9146 mov r9, r2
3453 032c 4246 mov r2, r8
3454 032e 4946 mov r1, r9
3455 0330 0A43 orrs r2, r1
3456 0332 9046 mov r8, r2
3457 .LVL412:
1009:Drivers/BME680/bme680.c ****
3458 .loc 1 1009 0
3459 0334 5246 mov r2, r10
3460 0336 1A40 ands r2, r3
3461 0338 9246 mov r10, r2
3462 .LVL413:
1011:Drivers/BME680/bme680.c **** data->status |= buff[14] & BME680_HEAT_STAB_MSK;
3463 .loc 1 1011 0
3464 033a 5BB2 sxtb r3, r3
3465 033c 9946 mov r9, r3
3466 033e 2023 movs r3, #32
3467 0340 4A46 mov r2, r9
3468 0342 1340 ands r3, r2
3469 0344 6246 mov r2, ip
3470 0346 1343 orrs r3, r2
3471 0348 5BB2 sxtb r3, r3
1012:Drivers/BME680/bme680.c ****
3472 .loc 1 1012 0
3473 034a 06AA add r2, sp, #24
3474 034c 927B ldrb r2, [r2, #14]
3475 034e 52B2 sxtb r2, r2
3476 0350 9146 mov r9, r2
3477 0352 1022 movs r2, #16
3478 0354 9446 mov ip, r2
3479 0356 4A46 mov r2, r9
3480 0358 6146 mov r1, ip
3481 035a 0A40 ands r2, r1
3482 035c 1343 orrs r3, r2
3483 035e 3B70 strb r3, [r7]
1014:Drivers/BME680/bme680.c **** data->temperature = calc_temperature(adc_temp, dev);
3484 .loc 1 1014 0
3485 0360 00D5 bpl .LCB3947
3486 0362 89E6 b .L204 @long jump
3487 .LCB3947:
1022:Drivers/BME680/bme680.c **** }
3488 .loc 1 1022 0
3489 0364 0A20 movs r0, #10
3490 .LVL414:
3491 0366 2B6D ldr r3, [r5, #80]
3492 0368 9847 blx r3
3493 .LVL415:
3494 036a A2E7 b .L184
3495 .LVL416:
3496 .L203:
3497 036c 0196 str r6, [sp, #4]
3498 036e B946 mov r9, r7
3499 .LVL417:
3500 .L187:
1027:Drivers/BME680/bme680.c **** rslt = BME680_W_NO_NEW_DATA;
3501 .loc 1 1027 0
ARM GAS /tmp/ccvbgJts.s page 89
3502 0370 002C cmp r4, #0
3503 0372 12D0 beq .L205
3504 .LVL418:
3505 .L189:
3506 .LBE199:
3507 .LBE198:
651:Drivers/BME680/bme680.c **** if (data->status & BME680_NEW_DATA_MSK)
3508 .loc 1 651 0
3509 0374 019B ldr r3, [sp, #4]
3510 0376 002B cmp r3, #0
3511 0378 07D1 bne .L182
652:Drivers/BME680/bme680.c **** dev->new_fields = 1;
3512 .loc 1 652 0
3513 037a 4B46 mov r3, r9
3514 037c 1B78 ldrb r3, [r3]
3515 037e 5BB2 sxtb r3, r3
3516 0380 002B cmp r3, #0
3517 0382 0DDB blt .L206
655:Drivers/BME680/bme680.c **** }
3518 .loc 1 655 0
3519 0384 4523 movs r3, #69
3520 0386 0022 movs r2, #0
3521 0388 EA54 strb r2, [r5, r3]
3522 .LVL419:
3523 .L182:
660:Drivers/BME680/bme680.c ****
3524 .loc 1 660 0
3525 038a 0198 ldr r0, [sp, #4]
3526 038c 0BB0 add sp, sp, #44
3527 @ sp needed
3528 .LVL420:
3529 .LVL421:
3530 038e 3CBC pop {r2, r3, r4, r5}
3531 0390 9046 mov r8, r2
3532 0392 9946 mov r9, r3
3533 0394 A246 mov r10, r4
3534 0396 AB46 mov fp, r5
3535 0398 F0BD pop {r4, r5, r6, r7, pc}
3536 .LVL422:
3537 .L205:
3538 .LBB211:
3539 .LBB210:
1028:Drivers/BME680/bme680.c ****
3540 .loc 1 1028 0
3541 039a 0223 movs r3, #2
3542 039c 0193 str r3, [sp, #4]
3543 .LVL423:
3544 039e E9E7 b .L189
3545 .LVL424:
3546 .L206:
3547 .LBE210:
3548 .LBE211:
653:Drivers/BME680/bme680.c **** else
3549 .loc 1 653 0
3550 03a0 4523 movs r3, #69
3551 03a2 0122 movs r2, #1
3552 03a4 EA54 strb r2, [r5, r3]
ARM GAS /tmp/ccvbgJts.s page 90
3553 03a6 F0E7 b .L182
3554 .LVL425:
3555 .L191:
3556 .LBB212:
3557 .LBB197:
1131:Drivers/BME680/bme680.c **** } else {
3558 .loc 1 1131 0
3559 03a8 0123 movs r3, #1
3560 03aa 5B42 rsbs r3, r3, #0
3561 03ac 0193 str r3, [sp, #4]
3562 03ae ECE7 b .L182
3563 .L192:
3564 03b0 0123 movs r3, #1
3565 03b2 5B42 rsbs r3, r3, #0
3566 03b4 0193 str r3, [sp, #4]
3567 03b6 E8E7 b .L182
3568 .L193:
3569 03b8 0123 movs r3, #1
3570 03ba 5B42 rsbs r3, r3, #0
3571 03bc 0193 str r3, [sp, #4]
3572 03be E4E7 b .L182
3573 .L194:
3574 03c0 0123 movs r3, #1
3575 03c2 5B42 rsbs r3, r3, #0
3576 03c4 0193 str r3, [sp, #4]
3577 03c6 E0E7 b .L182
3578 .L208:
3579 .align 2
3580 .L207:
3581 03c8 0006FFFF .word -64000
3582 03cc 350C0000 .word 3125
3583 03d0 A0860100 .word 100000
3584 03d4 3C050000 .word 1340
3585 03d8 00000000 .word .LANCHOR0
3586 03dc 00000000 .word .LANCHOR1
3587 .LBE197:
3588 .LBE212:
3589 .cfi_endproc
3590 .LFE10:
3592 .global lookupTable2
3593 .global lookupTable1
3594 .section .data.lookupTable1,"aw",%progbits
3595 .align 2
3596 .set .LANCHOR0,. + 0
3599 lookupTable1:
3600 0000 FFFFFF7F .word 2147483647
3601 0004 FFFFFF7F .word 2147483647
3602 0008 FFFFFF7F .word 2147483647
3603 000c FFFFFF7F .word 2147483647
3604 0010 FFFFFF7F .word 2147483647
3605 0014 EA51B87E .word 2126008810
3606 0018 FFFFFF7F .word 2147483647
3607 001c 21DBF97E .word 2130303777
3608 0020 FFFFFF7F .word 2147483647
3609 0024 FFFFFF7F .word 2147483647
3610 0028 C776BE7F .word 2143188679
3611 002c F4285C7F .word 2136746228
ARM GAS /tmp/ccvbgJts.s page 91
3612 0030 FFFFFF7F .word 2147483647
3613 0034 EA51B87E .word 2126008810
3614 0038 FFFFFF7F .word 2147483647
3615 003c FFFFFF7F .word 2147483647
3616 .section .data.lookupTable2,"aw",%progbits
3617 .align 2
3618 .set .LANCHOR1,. + 0
3621 lookupTable2:
3622 0000 000024F4 .word -198967296
3623 0004 0000127A .word 2048000000
3624 0008 0000093D .word 1024000000
3625 000c 0080841E .word 512000000
3626 0010 FF583E0F .word 255744255
3627 0014 548C9307 .word 127110228
3628 0018 0090D003 .word 64000000
3629 001c 1038EC01 .word 32258064
3630 0020 9062F400 .word 16016016
3631 0024 00127A00 .word 8000000
3632 0028 00093D00 .word 4000000
3633 002c 80841E00 .word 2000000
3634 0030 40420F00 .word 1000000
3635 0034 20A10700 .word 500000
3636 0038 90D00300 .word 250000
3637 003c 48E80100 .word 125000
3638 .text
3639 .Letext0:
3640 .file 2 "/usr/arm-none-eabi/include/machine/_default_types.h"
3641 .file 3 "/usr/arm-none-eabi/include/sys/_stdint.h"
3642 .file 4 "Drivers/BME680/bme680_defs.h"
3643 .file 5 "<built-in>"
ARM GAS /tmp/ccvbgJts.s page 92
DEFINED SYMBOLS
*ABS*:0000000000000000 bme680.c
/tmp/ccvbgJts.s:16 .text.set_mem_page:0000000000000000 $t
/tmp/ccvbgJts.s:22 .text.set_mem_page:0000000000000000 set_mem_page
/tmp/ccvbgJts.s:176 .text.get_mem_page:0000000000000000 $t
/tmp/ccvbgJts.s:182 .text.get_mem_page:0000000000000000 get_mem_page
/tmp/ccvbgJts.s:282 .text.bme680_get_regs:0000000000000000 $t
/tmp/ccvbgJts.s:289 .text.bme680_get_regs:0000000000000000 bme680_get_regs
/tmp/ccvbgJts.s:416 .text.bme680_set_regs:0000000000000000 $t
/tmp/ccvbgJts.s:423 .text.bme680_set_regs:0000000000000000 bme680_set_regs
/tmp/ccvbgJts.s:618 .text.bme680_soft_reset:0000000000000000 $t
/tmp/ccvbgJts.s:625 .text.bme680_soft_reset:0000000000000000 bme680_soft_reset
/tmp/ccvbgJts.s:759 .text.bme680_init:0000000000000000 $t
/tmp/ccvbgJts.s:766 .text.bme680_init:0000000000000000 bme680_init
/tmp/ccvbgJts.s:1155 .text.bme680_get_sensor_settings:0000000000000000 $t
/tmp/ccvbgJts.s:1162 .text.bme680_get_sensor_settings:0000000000000000 bme680_get_sensor_settings
/tmp/ccvbgJts.s:1470 .text.bme680_set_sensor_mode:0000000000000000 $t
/tmp/ccvbgJts.s:1477 .text.bme680_set_sensor_mode:0000000000000000 bme680_set_sensor_mode
/tmp/ccvbgJts.s:1642 .text.bme680_set_sensor_settings:0000000000000000 $t
/tmp/ccvbgJts.s:1649 .text.bme680_set_sensor_settings:0000000000000000 bme680_set_sensor_settings
/tmp/ccvbgJts.s:2558 .text.bme680_set_sensor_settings:0000000000000440 $d
/tmp/ccvbgJts.s:2566 .text.bme680_get_sensor_mode:0000000000000000 $t
/tmp/ccvbgJts.s:2573 .text.bme680_get_sensor_mode:0000000000000000 bme680_get_sensor_mode
/tmp/ccvbgJts.s:2664 .text.bme680_set_profile_dur:0000000000000000 $t
/tmp/ccvbgJts.s:2671 .text.bme680_set_profile_dur:0000000000000000 bme680_set_profile_dur
/tmp/ccvbgJts.s:2727 .text.bme680_set_profile_dur:0000000000000034 $d
/tmp/ccvbgJts.s:2733 .text.bme680_get_profile_dur:0000000000000000 $t
/tmp/ccvbgJts.s:2740 .text.bme680_get_profile_dur:0000000000000000 bme680_get_profile_dur
/tmp/ccvbgJts.s:2806 .text.bme680_get_profile_dur:0000000000000040 $d
/tmp/ccvbgJts.s:2814 .text.bme680_get_sensor_data:0000000000000000 $t
/tmp/ccvbgJts.s:2821 .text.bme680_get_sensor_data:0000000000000000 bme680_get_sensor_data
/tmp/ccvbgJts.s:3581 .text.bme680_get_sensor_data:00000000000003c8 $d
/tmp/ccvbgJts.s:3621 .data.lookupTable2:0000000000000000 lookupTable2
/tmp/ccvbgJts.s:3599 .data.lookupTable1:0000000000000000 lookupTable1
/tmp/ccvbgJts.s:3595 .data.lookupTable1:0000000000000000 $d
/tmp/ccvbgJts.s:3617 .data.lookupTable2:0000000000000000 $d
.debug_frame:0000000000000010 $d
UNDEFINED SYMBOLS
memset
__aeabi_idiv
__aeabi_uidiv
__aeabi_lmul
__aeabi_ldivmod