bme680_defs.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. /**
  2. * Copyright (C) 2017 - 2018 Bosch Sensortec GmbH
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. *
  10. * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * Neither the name of the copyright holder nor the names of the
  15. * contributors may be used to endorse or promote products derived from
  16. * this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  19. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  20. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
  23. * OR CONTRIBUTORS BE LIABLE FOR ANY
  24. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
  25. * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
  26. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  27. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  29. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31. * ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
  33. *
  34. * The information provided is believed to be accurate and reliable.
  35. * The copyright holder assumes no responsibility
  36. * for the consequences of use
  37. * of such information nor for any infringement of patents or
  38. * other rights of third parties which may result from its use.
  39. * No license is granted by implication or otherwise under any patent or
  40. * patent rights of the copyright holder.
  41. *
  42. * @file bme680_defs.h
  43. * @date 19 Jun 2018
  44. * @version 3.5.9
  45. * @brief Sensor driver for BME680 sensor
  46. */
  47. #ifndef BME680_DEFS_H_
  48. #define BME680_DEFS_H_
  49. /** header includes **/
  50. #ifdef __KERNEL__
  51. #include <linux/types.h>
  52. #include <linux/kernel.h>
  53. #else
  54. #include <stdint.h>
  55. #include <stddef.h>
  56. #endif
  57. /** Common macros **/
  58. #if !defined(UINT8_C) && !defined(INT8_C)
  59. #define INT8_C(x) S8_C(x)
  60. #define UINT8_C(x) U8_C(x)
  61. #endif
  62. #if !defined(UINT16_C) && !defined(INT16_C)
  63. #define INT16_C(x) S16_C(x)
  64. #define UINT16_C(x) U16_C(x)
  65. #endif
  66. #if !defined(INT32_C) && !defined(UINT32_C)
  67. #define INT32_C(x) S32_C(x)
  68. #define UINT32_C(x) U32_C(x)
  69. #endif
  70. #if !defined(INT64_C) && !defined(UINT64_C)
  71. #define INT64_C(x) S64_C(x)
  72. #define UINT64_C(x) U64_C(x)
  73. #endif
  74. /** C standard macros **/
  75. #ifndef NULL
  76. #ifdef __cplusplus
  77. #define NULL 0
  78. #else
  79. #define NULL ((void *) 0)
  80. #endif
  81. #endif
  82. /** BME680 configuration macros */
  83. /** Enable or un-comment the macro to provide floating point data output **/
  84. #ifndef BME680_FLOAT_POINT_COMPENSATION
  85. /* #define BME680_FLOAT_POINT_COMPENSATION **/
  86. #endif
  87. /** BME680 General config **/
  88. #define BME680_POLL_PERIOD_MS UINT8_C(10)
  89. /** BME680 I2C addresses **/
  90. #define BME680_I2C_ADDR_PRIMARY UINT8_C(0x76)
  91. #define BME680_I2C_ADDR_SECONDARY UINT8_C(0x77)
  92. /** BME680 unique chip identifier **/
  93. #define BME680_CHIP_ID UINT8_C(0x61)
  94. /** BME680 coefficients related defines **/
  95. #define BME680_COEFF_SIZE UINT8_C(41)
  96. #define BME680_COEFF_ADDR1_LEN UINT8_C(25)
  97. #define BME680_COEFF_ADDR2_LEN UINT8_C(16)
  98. /** BME680 field_x related defines **/
  99. #define BME680_FIELD_LENGTH UINT8_C(15)
  100. #define BME680_FIELD_ADDR_OFFSET UINT8_C(17)
  101. /** Soft reset command **/
  102. #define BME680_SOFT_RESET_CMD UINT8_C(0xb6)
  103. /** Error code definitions **/
  104. #define BME680_OK INT8_C(0)
  105. /* Errors */
  106. #define BME680_E_NULL_PTR INT8_C(-1)
  107. #define BME680_E_COM_FAIL INT8_C(-2)
  108. #define BME680_E_DEV_NOT_FOUND INT8_C(-3)
  109. #define BME680_E_INVALID_LENGTH INT8_C(-4)
  110. /* Warnings */
  111. #define BME680_W_DEFINE_PWR_MODE INT8_C(1)
  112. #define BME680_W_NO_NEW_DATA INT8_C(2)
  113. /* Info's */
  114. #define BME680_I_MIN_CORRECTION UINT8_C(1)
  115. #define BME680_I_MAX_CORRECTION UINT8_C(2)
  116. /** Register map **/
  117. /** Other coefficient's address **/
  118. #define BME680_ADDR_RES_HEAT_VAL_ADDR UINT8_C(0x00)
  119. #define BME680_ADDR_RES_HEAT_RANGE_ADDR UINT8_C(0x02)
  120. #define BME680_ADDR_RANGE_SW_ERR_ADDR UINT8_C(0x04)
  121. #define BME680_ADDR_SENS_CONF_START UINT8_C(0x5A)
  122. #define BME680_ADDR_GAS_CONF_START UINT8_C(0x64)
  123. /** Field settings **/
  124. #define BME680_FIELD0_ADDR UINT8_C(0x1d)
  125. /** Heater settings **/
  126. #define BME680_RES_HEAT0_ADDR UINT8_C(0x5a)
  127. #define BME680_GAS_WAIT0_ADDR UINT8_C(0x64)
  128. /** Sensor configuration registers **/
  129. #define BME680_CONF_HEAT_CTRL_ADDR UINT8_C(0x70)
  130. #define BME680_CONF_ODR_RUN_GAS_NBC_ADDR UINT8_C(0x71)
  131. #define BME680_CONF_OS_H_ADDR UINT8_C(0x72)
  132. #define BME680_MEM_PAGE_ADDR UINT8_C(0xf3)
  133. #define BME680_CONF_T_P_MODE_ADDR UINT8_C(0x74)
  134. #define BME680_CONF_ODR_FILT_ADDR UINT8_C(0x75)
  135. /** Coefficient's address **/
  136. #define BME680_COEFF_ADDR1 UINT8_C(0x89)
  137. #define BME680_COEFF_ADDR2 UINT8_C(0xe1)
  138. /** Chip identifier **/
  139. #define BME680_CHIP_ID_ADDR UINT8_C(0xd0)
  140. /** Soft reset register **/
  141. #define BME680_SOFT_RESET_ADDR UINT8_C(0xe0)
  142. /** Heater control settings **/
  143. #define BME680_ENABLE_HEATER UINT8_C(0x00)
  144. #define BME680_DISABLE_HEATER UINT8_C(0x08)
  145. /** Gas measurement settings **/
  146. #define BME680_DISABLE_GAS_MEAS UINT8_C(0x00)
  147. #define BME680_ENABLE_GAS_MEAS UINT8_C(0x01)
  148. /** Over-sampling settings **/
  149. #define BME680_OS_NONE UINT8_C(0)
  150. #define BME680_OS_1X UINT8_C(1)
  151. #define BME680_OS_2X UINT8_C(2)
  152. #define BME680_OS_4X UINT8_C(3)
  153. #define BME680_OS_8X UINT8_C(4)
  154. #define BME680_OS_16X UINT8_C(5)
  155. /** IIR filter settings **/
  156. #define BME680_FILTER_SIZE_0 UINT8_C(0)
  157. #define BME680_FILTER_SIZE_1 UINT8_C(1)
  158. #define BME680_FILTER_SIZE_3 UINT8_C(2)
  159. #define BME680_FILTER_SIZE_7 UINT8_C(3)
  160. #define BME680_FILTER_SIZE_15 UINT8_C(4)
  161. #define BME680_FILTER_SIZE_31 UINT8_C(5)
  162. #define BME680_FILTER_SIZE_63 UINT8_C(6)
  163. #define BME680_FILTER_SIZE_127 UINT8_C(7)
  164. /** Power mode settings */
  165. #define BME680_SLEEP_MODE UINT8_C(0)
  166. #define BME680_FORCED_MODE UINT8_C(1)
  167. /** Delay related macro declaration **/
  168. #define BME680_RESET_PERIOD UINT32_C(10)
  169. /** SPI memory page settings **/
  170. #define BME680_MEM_PAGE0 UINT8_C(0x10)
  171. #define BME680_MEM_PAGE1 UINT8_C(0x00)
  172. /** Ambient humidity shift value for compensation **/
  173. #define BME680_HUM_REG_SHIFT_VAL UINT8_C(4)
  174. /** Run gas enable and disable settings **/
  175. #define BME680_RUN_GAS_DISABLE UINT8_C(0)
  176. #define BME680_RUN_GAS_ENABLE UINT8_C(1)
  177. /** Buffer length macro declaration **/
  178. #define BME680_TMP_BUFFER_LENGTH UINT8_C(40)
  179. #define BME680_REG_BUFFER_LENGTH UINT8_C(6)
  180. #define BME680_FIELD_DATA_LENGTH UINT8_C(3)
  181. #define BME680_GAS_REG_BUF_LENGTH UINT8_C(20)
  182. /** Settings selector **/
  183. #define BME680_OST_SEL UINT16_C(1)
  184. #define BME680_OSP_SEL UINT16_C(2)
  185. #define BME680_OSH_SEL UINT16_C(4)
  186. #define BME680_GAS_MEAS_SEL UINT16_C(8)
  187. #define BME680_FILTER_SEL UINT16_C(16)
  188. #define BME680_HCNTRL_SEL UINT16_C(32)
  189. #define BME680_RUN_GAS_SEL UINT16_C(64)
  190. #define BME680_NBCONV_SEL UINT16_C(128)
  191. #define BME680_GAS_SENSOR_SEL (BME680_GAS_MEAS_SEL | BME680_RUN_GAS_SEL | BME680_NBCONV_SEL)
  192. /** Number of conversion settings **/
  193. #define BME680_NBCONV_MIN UINT8_C(0)
  194. #define BME680_NBCONV_MAX UINT8_C(10)
  195. /** Mask definitions **/
  196. #define BME680_GAS_MEAS_MSK UINT8_C(0x30)
  197. #define BME680_NBCONV_MSK UINT8_C(0X0F)
  198. #define BME680_FILTER_MSK UINT8_C(0X1C)
  199. #define BME680_OST_MSK UINT8_C(0XE0)
  200. #define BME680_OSP_MSK UINT8_C(0X1C)
  201. #define BME680_OSH_MSK UINT8_C(0X07)
  202. #define BME680_HCTRL_MSK UINT8_C(0x08)
  203. #define BME680_RUN_GAS_MSK UINT8_C(0x10)
  204. #define BME680_MODE_MSK UINT8_C(0x03)
  205. #define BME680_RHRANGE_MSK UINT8_C(0x30)
  206. #define BME680_RSERROR_MSK UINT8_C(0xf0)
  207. #define BME680_NEW_DATA_MSK UINT8_C(0x80)
  208. #define BME680_GAS_INDEX_MSK UINT8_C(0x0f)
  209. #define BME680_GAS_RANGE_MSK UINT8_C(0x0f)
  210. #define BME680_GASM_VALID_MSK UINT8_C(0x20)
  211. #define BME680_HEAT_STAB_MSK UINT8_C(0x10)
  212. #define BME680_MEM_PAGE_MSK UINT8_C(0x10)
  213. #define BME680_SPI_RD_MSK UINT8_C(0x80)
  214. #define BME680_SPI_WR_MSK UINT8_C(0x7f)
  215. #define BME680_BIT_H1_DATA_MSK UINT8_C(0x0F)
  216. /** Bit position definitions for sensor settings **/
  217. #define BME680_GAS_MEAS_POS UINT8_C(4)
  218. #define BME680_FILTER_POS UINT8_C(2)
  219. #define BME680_OST_POS UINT8_C(5)
  220. #define BME680_OSP_POS UINT8_C(2)
  221. #define BME680_RUN_GAS_POS UINT8_C(4)
  222. /** Array Index to Field data mapping for Calibration Data **/
  223. #define BME680_T2_LSB_REG (1)
  224. #define BME680_T2_MSB_REG (2)
  225. #define BME680_T3_REG (3)
  226. #define BME680_P1_LSB_REG (5)
  227. #define BME680_P1_MSB_REG (6)
  228. #define BME680_P2_LSB_REG (7)
  229. #define BME680_P2_MSB_REG (8)
  230. #define BME680_P3_REG (9)
  231. #define BME680_P4_LSB_REG (11)
  232. #define BME680_P4_MSB_REG (12)
  233. #define BME680_P5_LSB_REG (13)
  234. #define BME680_P5_MSB_REG (14)
  235. #define BME680_P7_REG (15)
  236. #define BME680_P6_REG (16)
  237. #define BME680_P8_LSB_REG (19)
  238. #define BME680_P8_MSB_REG (20)
  239. #define BME680_P9_LSB_REG (21)
  240. #define BME680_P9_MSB_REG (22)
  241. #define BME680_P10_REG (23)
  242. #define BME680_H2_MSB_REG (25)
  243. #define BME680_H2_LSB_REG (26)
  244. #define BME680_H1_LSB_REG (26)
  245. #define BME680_H1_MSB_REG (27)
  246. #define BME680_H3_REG (28)
  247. #define BME680_H4_REG (29)
  248. #define BME680_H5_REG (30)
  249. #define BME680_H6_REG (31)
  250. #define BME680_H7_REG (32)
  251. #define BME680_T1_LSB_REG (33)
  252. #define BME680_T1_MSB_REG (34)
  253. #define BME680_GH2_LSB_REG (35)
  254. #define BME680_GH2_MSB_REG (36)
  255. #define BME680_GH1_REG (37)
  256. #define BME680_GH3_REG (38)
  257. /** BME680 register buffer index settings **/
  258. #define BME680_REG_FILTER_INDEX UINT8_C(5)
  259. #define BME680_REG_TEMP_INDEX UINT8_C(4)
  260. #define BME680_REG_PRES_INDEX UINT8_C(4)
  261. #define BME680_REG_HUM_INDEX UINT8_C(2)
  262. #define BME680_REG_NBCONV_INDEX UINT8_C(1)
  263. #define BME680_REG_RUN_GAS_INDEX UINT8_C(1)
  264. #define BME680_REG_HCTRL_INDEX UINT8_C(0)
  265. /** BME680 pressure calculation macros **/
  266. /*! This max value is used to provide precedence to multiplication or division
  267. * in pressure compensation equation to achieve least loss of precision and
  268. * avoiding overflows.
  269. * i.e Comparing value, BME680_MAX_OVERFLOW_VAL = INT32_C(1 << 30)
  270. */
  271. #define BME680_MAX_OVERFLOW_VAL INT32_C(0x40000000)
  272. /** Macro to combine two 8 bit data's to form a 16 bit data **/
  273. #define BME680_CONCAT_BYTES(msb, lsb) (((uint16_t)msb << 8) | (uint16_t)lsb)
  274. /** Macro to SET and GET BITS of a register **/
  275. #define BME680_SET_BITS(reg_data, bitname, data) \
  276. ((reg_data & ~(bitname##_MSK)) | \
  277. ((data << bitname##_POS) & bitname##_MSK))
  278. #define BME680_GET_BITS(reg_data, bitname) ((reg_data & (bitname##_MSK)) >> \
  279. (bitname##_POS))
  280. /** Macro variant to handle the bitname position if it is zero **/
  281. #define BME680_SET_BITS_POS_0(reg_data, bitname, data) \
  282. ((reg_data & ~(bitname##_MSK)) | \
  283. (data & bitname##_MSK))
  284. #define BME680_GET_BITS_POS_0(reg_data, bitname) (reg_data & (bitname##_MSK))
  285. /** Type definitions **/
  286. /*!
  287. * @brief Generic communication function pointer
  288. * @param[in] dev_id
  289. * Place holder to store the id of the device structure
  290. * Can be used to store the index of the Chip select or
  291. * I2C address of the device.
  292. * @param[in] reg_addr
  293. * Used to select the register the where data needs to
  294. * be read from or written to.
  295. * @param[in/out] reg_data
  296. * Data array to read/write
  297. * @param[in] len
  298. * Length of the data array
  299. */
  300. typedef int8_t (*bme680_com_fptr_t)(uint8_t dev_id, uint8_t reg_addr, uint8_t *data, uint16_t len);
  301. /*!
  302. * @brief Delay function pointer
  303. * @param[in] period
  304. * Time period in milliseconds
  305. */
  306. typedef void (*bme680_delay_fptr_t)(uint32_t period);
  307. /*!
  308. * @brief Interface selection Enumerations
  309. */
  310. enum bme680_intf {
  311. /*! SPI interface */
  312. BME680_SPI_INTF,
  313. /*! I2C interface */
  314. BME680_I2C_INTF
  315. };
  316. /** structure definitions **/
  317. /*!
  318. * @brief Sensor field data structure
  319. */
  320. struct bme680_field_data {
  321. /*! Contains new_data, gasm_valid & heat_stab */
  322. uint8_t status;
  323. /*! The index of the heater profile used */
  324. uint8_t gas_index;
  325. /*! Measurement index to track order */
  326. uint8_t meas_index;
  327. #ifndef BME680_FLOAT_POINT_COMPENSATION
  328. /*! Temperature in degree celsius x100 */
  329. int16_t temperature;
  330. /*! Pressure in Pascal */
  331. uint32_t pressure;
  332. /*! Humidity in % relative humidity x1000 */
  333. uint32_t humidity;
  334. /*! Gas resistance in Ohms */
  335. uint32_t gas_resistance;
  336. #else
  337. /*! Temperature in degree celsius */
  338. float temperature;
  339. /*! Pressure in Pascal */
  340. float pressure;
  341. /*! Humidity in % relative humidity x1000 */
  342. float humidity;
  343. /*! Gas resistance in Ohms */
  344. float gas_resistance;
  345. #endif
  346. };
  347. /*!
  348. * @brief Structure to hold the Calibration data
  349. */
  350. struct bme680_calib_data {
  351. /*! Variable to store calibrated humidity data */
  352. uint16_t par_h1;
  353. /*! Variable to store calibrated humidity data */
  354. uint16_t par_h2;
  355. /*! Variable to store calibrated humidity data */
  356. int8_t par_h3;
  357. /*! Variable to store calibrated humidity data */
  358. int8_t par_h4;
  359. /*! Variable to store calibrated humidity data */
  360. int8_t par_h5;
  361. /*! Variable to store calibrated humidity data */
  362. uint8_t par_h6;
  363. /*! Variable to store calibrated humidity data */
  364. int8_t par_h7;
  365. /*! Variable to store calibrated gas data */
  366. int8_t par_gh1;
  367. /*! Variable to store calibrated gas data */
  368. int16_t par_gh2;
  369. /*! Variable to store calibrated gas data */
  370. int8_t par_gh3;
  371. /*! Variable to store calibrated temperature data */
  372. uint16_t par_t1;
  373. /*! Variable to store calibrated temperature data */
  374. int16_t par_t2;
  375. /*! Variable to store calibrated temperature data */
  376. int8_t par_t3;
  377. /*! Variable to store calibrated pressure data */
  378. uint16_t par_p1;
  379. /*! Variable to store calibrated pressure data */
  380. int16_t par_p2;
  381. /*! Variable to store calibrated pressure data */
  382. int8_t par_p3;
  383. /*! Variable to store calibrated pressure data */
  384. int16_t par_p4;
  385. /*! Variable to store calibrated pressure data */
  386. int16_t par_p5;
  387. /*! Variable to store calibrated pressure data */
  388. int8_t par_p6;
  389. /*! Variable to store calibrated pressure data */
  390. int8_t par_p7;
  391. /*! Variable to store calibrated pressure data */
  392. int16_t par_p8;
  393. /*! Variable to store calibrated pressure data */
  394. int16_t par_p9;
  395. /*! Variable to store calibrated pressure data */
  396. uint8_t par_p10;
  397. #ifndef BME680_FLOAT_POINT_COMPENSATION
  398. /*! Variable to store t_fine size */
  399. int32_t t_fine;
  400. #else
  401. /*! Variable to store t_fine size */
  402. float t_fine;
  403. #endif
  404. /*! Variable to store heater resistance range */
  405. uint8_t res_heat_range;
  406. /*! Variable to store heater resistance value */
  407. int8_t res_heat_val;
  408. /*! Variable to store error range */
  409. int8_t range_sw_err;
  410. };
  411. /*!
  412. * @brief BME680 sensor settings structure which comprises of ODR,
  413. * over-sampling and filter settings.
  414. */
  415. struct bme680_tph_sett {
  416. /*! Humidity oversampling */
  417. uint8_t os_hum;
  418. /*! Temperature oversampling */
  419. uint8_t os_temp;
  420. /*! Pressure oversampling */
  421. uint8_t os_pres;
  422. /*! Filter coefficient */
  423. uint8_t filter;
  424. };
  425. /*!
  426. * @brief BME680 gas sensor which comprises of gas settings
  427. * and status parameters
  428. */
  429. struct bme680_gas_sett {
  430. /*! Variable to store nb conversion */
  431. uint8_t nb_conv;
  432. /*! Variable to store heater control */
  433. uint8_t heatr_ctrl;
  434. /*! Run gas enable value */
  435. uint8_t run_gas;
  436. /*! Heater temperature value */
  437. uint16_t heatr_temp;
  438. /*! Duration profile value */
  439. uint16_t heatr_dur;
  440. };
  441. /*!
  442. * @brief BME680 device structure
  443. */
  444. struct bme680_dev {
  445. /*! Chip Id */
  446. uint8_t chip_id;
  447. /*! Device Id */
  448. uint8_t dev_id;
  449. /*! SPI/I2C interface */
  450. enum bme680_intf intf;
  451. /*! Memory page used */
  452. uint8_t mem_page;
  453. /*! Ambient temperature in Degree C */
  454. int8_t amb_temp;
  455. /*! Sensor calibration data */
  456. struct bme680_calib_data calib;
  457. /*! Sensor settings */
  458. struct bme680_tph_sett tph_sett;
  459. /*! Gas Sensor settings */
  460. struct bme680_gas_sett gas_sett;
  461. /*! Sensor power modes */
  462. uint8_t power_mode;
  463. /*! New sensor fields */
  464. uint8_t new_fields;
  465. /*! Store the info messages */
  466. uint8_t info_msg;
  467. /*! Bus read function pointer */
  468. bme680_com_fptr_t read;
  469. /*! Bus write function pointer */
  470. bme680_com_fptr_t write;
  471. /*! delay function pointer */
  472. bme680_delay_fptr_t delay_ms;
  473. /*! Communication function result */
  474. int8_t com_rslt;
  475. };
  476. #endif /* BME680_DEFS_H_ */
  477. /** @}*/
  478. /** @}*/