F439_CPP_BMP390_Barometric_Pressure_and_Altimeter_01 1.0
STM32F439 BMP390 barometric pressure and altimeter tutorial
Loading...
Searching...
No Matches
bmp3_defs.h
Go to the documentation of this file.
1
42#ifndef BMP3_DEFS_H_
43#define BMP3_DEFS_H_
44
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/********************************************************/
51/* header includes */
52#ifdef __KERNEL__
53#include <linux/types.h>
54#include <linux/kernel.h>
55#else
56#include <stdint.h>
57#include <stddef.h>
58#include <main.h>
59#endif
60
61/*************************** Common macros *****************************/
62
63#if !defined(UINT8_C) && !defined(INT8_C)
64#define INT8_C(x) S8_C(x)
65#define UINT8_C(x) U8_C(x)
66#endif
67
68#if !defined(UINT16_C) && !defined(INT16_C)
69#define INT16_C(x) S16_C(x)
70#define UINT16_C(x) U16_C(x)
71#endif
72
73#if !defined(INT32_C) && !defined(UINT32_C)
74#define INT32_C(x) S32_C(x)
75#define UINT32_C(x) U32_C(x)
76#endif
77
78#if !defined(INT64_C) && !defined(UINT64_C)
79#define INT64_C(x) S64_C(x)
80#define UINT64_C(x) U64_C(x)
81#endif
82
85#ifndef NULL
86#ifdef __cplusplus
87#define NULL 0
88#else
89#define NULL ((void *) 0)
90#endif
91#endif
92
93#ifndef TRUE
94#define TRUE UINT8_C(1)
95#endif
96
97#ifndef FALSE
98#define FALSE UINT8_C(0)
99#endif
100
101/********************************************************/
104#ifndef BMP3_64BIT_COMPENSATION /*< Check if 64bit (using BMP3_64BIT_COMPENSATION) is enabled */
105#ifndef BMP3_FLOAT_COMPENSATION /*< If 64 bit integer data type is not enabled then enable
106 * BMP3_FLOAT_COMPENSATION */
107#define BMP3_FLOAT_COMPENSATION
108#endif
109#endif
110
111/********************************************************/
117#ifndef BMP3_INTF_RET_TYPE
118#define BMP3_INTF_RET_TYPE int8_t
119#endif
120
124#ifndef BMP3_INTF_RET_SUCCESS
125#define BMP3_INTF_RET_SUCCESS INT8_C(0)
126#endif
127
129#define BMP3_ADDR_I2C_PRIM UINT8_C(0x76)
130#define BMP3_ADDR_I2C_SEC UINT8_C(0x77)
131
133#define BMP3_CHIP_ID UINT8_C(0x50)
134#define BMP390_CHIP_ID UINT8_C(0x60)
135
137#define BMP3_SETTLE_TIME_PRESS UINT16_C(392)
138
140#define BMP3_SETTLE_TIME_TEMP UINT16_C(313)
141
143#define BMP3_ADC_CONV_TIME UINT16_C(2000)
144
146#define BMP3_REG_CHIP_ID UINT8_C(0x00)
147#define BMP3_REG_ERR UINT8_C(0x02)
148#define BMP3_REG_SENS_STATUS UINT8_C(0x03)
149#define BMP3_REG_DATA UINT8_C(0x04)
150#define BMP3_REG_EVENT UINT8_C(0x10)
151#define BMP3_REG_INT_STATUS UINT8_C(0x11)
152#define BMP3_REG_FIFO_LENGTH UINT8_C(0x12)
153#define BMP3_REG_FIFO_DATA UINT8_C(0x14)
154#define BMP3_REG_FIFO_WM UINT8_C(0x15)
155#define BMP3_REG_FIFO_CONFIG_1 UINT8_C(0x17)
156#define BMP3_REG_FIFO_CONFIG_2 UINT8_C(0x18)
157#define BMP3_REG_INT_CTRL UINT8_C(0x19)
158#define BMP3_REG_IF_CONF UINT8_C(0x1A)
159#define BMP3_REG_PWR_CTRL UINT8_C(0x1B)
160#define BMP3_REG_OSR UINT8_C(0X1C)
161#define BMP3_REG_ODR UINT8_C(0x1D)
162#define BMP3_REG_CONFIG UINT8_C(0x1F)
163#define BMP3_REG_CALIB_DATA UINT8_C(0x31)
164#define BMP3_REG_CMD UINT8_C(0x7E)
165
167#define BMP3_ERR_FATAL UINT8_C(0x01)
168#define BMP3_ERR_CMD UINT8_C(0x02)
169#define BMP3_ERR_CONF UINT8_C(0x04)
170
172#define BMP3_CMD_RDY UINT8_C(0x10)
173#define BMP3_DRDY_PRESS UINT8_C(0x20)
174#define BMP3_DRDY_TEMP UINT8_C(0x40)
175
177#define BMP3_MODE_SLEEP UINT8_C(0x00)
178#define BMP3_MODE_FORCED UINT8_C(0x01)
179#define BMP3_MODE_NORMAL UINT8_C(0x03)
180
183#define BMP3_ENABLE UINT8_C(0x01)
184#define BMP3_DISABLE UINT8_C(0x00)
185
188#define BMP3_INT_PIN_OPEN_DRAIN UINT8_C(0x01)
189#define BMP3_INT_PIN_PUSH_PULL UINT8_C(0x00)
190
192#define BMP3_INT_PIN_ACTIVE_HIGH UINT8_C(0x01)
193#define BMP3_INT_PIN_ACTIVE_LOW UINT8_C(0x00)
194
196#define BMP3_INT_PIN_LATCH UINT8_C(0x01)
197#define BMP3_INT_PIN_NON_LATCH UINT8_C(0x00)
198
201#define BMP3_I2C_WDT_SHORT_1_25_MS UINT8_C(0x00)
202#define BMP3_I2C_WDT_LONG_40_MS UINT8_C(0x01)
203
205#define BMP3_FIFO_NO_SUBSAMPLING UINT8_C(0x00)
206#define BMP3_FIFO_SUBSAMPLING_2X UINT8_C(0x01)
207#define BMP3_FIFO_SUBSAMPLING_4X UINT8_C(0x02)
208#define BMP3_FIFO_SUBSAMPLING_8X UINT8_C(0x03)
209#define BMP3_FIFO_SUBSAMPLING_16X UINT8_C(0x04)
210#define BMP3_FIFO_SUBSAMPLING_32X UINT8_C(0x05)
211#define BMP3_FIFO_SUBSAMPLING_64X UINT8_C(0x06)
212#define BMP3_FIFO_SUBSAMPLING_128X UINT8_C(0x07)
213
215#define BMP3_NO_OVERSAMPLING UINT8_C(0x00)
216#define BMP3_OVERSAMPLING_2X UINT8_C(0x01)
217#define BMP3_OVERSAMPLING_4X UINT8_C(0x02)
218#define BMP3_OVERSAMPLING_8X UINT8_C(0x03)
219#define BMP3_OVERSAMPLING_16X UINT8_C(0x04)
220#define BMP3_OVERSAMPLING_32X UINT8_C(0x05)
221
223#define BMP3_IIR_FILTER_DISABLE UINT8_C(0x00)
224#define BMP3_IIR_FILTER_COEFF_1 UINT8_C(0x01)
225#define BMP3_IIR_FILTER_COEFF_3 UINT8_C(0x02)
226#define BMP3_IIR_FILTER_COEFF_7 UINT8_C(0x03)
227#define BMP3_IIR_FILTER_COEFF_15 UINT8_C(0x04)
228#define BMP3_IIR_FILTER_COEFF_31 UINT8_C(0x05)
229#define BMP3_IIR_FILTER_COEFF_63 UINT8_C(0x06)
230#define BMP3_IIR_FILTER_COEFF_127 UINT8_C(0x07)
231
233#define BMP3_ODR_200_HZ UINT8_C(0x00)
234#define BMP3_ODR_100_HZ UINT8_C(0x01)
235#define BMP3_ODR_50_HZ UINT8_C(0x02)
236#define BMP3_ODR_25_HZ UINT8_C(0x03)
237#define BMP3_ODR_12_5_HZ UINT8_C(0x04)
238#define BMP3_ODR_6_25_HZ UINT8_C(0x05)
239#define BMP3_ODR_3_1_HZ UINT8_C(0x06)
240#define BMP3_ODR_1_5_HZ UINT8_C(0x07)
241#define BMP3_ODR_0_78_HZ UINT8_C(0x08)
242#define BMP3_ODR_0_39_HZ UINT8_C(0x09)
243#define BMP3_ODR_0_2_HZ UINT8_C(0x0A)
244#define BMP3_ODR_0_1_HZ UINT8_C(0x0B)
245#define BMP3_ODR_0_05_HZ UINT8_C(0x0C)
246#define BMP3_ODR_0_02_HZ UINT8_C(0x0D)
247#define BMP3_ODR_0_01_HZ UINT8_C(0x0E)
248#define BMP3_ODR_0_006_HZ UINT8_C(0x0F)
249#define BMP3_ODR_0_003_HZ UINT8_C(0x10)
250#define BMP3_ODR_0_001_HZ UINT8_C(0x11)
251
253#define BMP3_SOFT_RESET UINT8_C(0xB6)
254
256#define BMP3_FIFO_FLUSH UINT8_C(0xB0)
257
259#define BMP3_OK INT8_C(0)
260
262#define BMP3_E_NULL_PTR INT8_C(-1)
263#define BMP3_E_COMM_FAIL INT8_C(-2)
264#define BMP3_E_INVALID_ODR_OSR_SETTINGS INT8_C(-3)
265#define BMP3_E_CMD_EXEC_FAILED INT8_C(-4)
266#define BMP3_E_CONFIGURATION_ERR INT8_C(-5)
267#define BMP3_E_INVALID_LEN INT8_C(-6)
268#define BMP3_E_DEV_NOT_FOUND INT8_C(-7)
269#define BMP3_E_FIFO_WATERMARK_NOT_REACHED INT8_C(-8)
270
272#define BMP3_W_SENSOR_NOT_ENABLED INT8_C(1)
273#define BMP3_W_INVALID_FIFO_REQ_FRAME_CNT INT8_C(2)
274#define BMP3_W_MIN_TEMP INT8_C(3)
275#define BMP3_W_MAX_TEMP INT8_C(4)
276#define BMP3_W_MIN_PRES INT8_C(5)
277#define BMP3_W_MAX_PRES INT8_C(6)
278
282#define BMP3_SEL_PRESS_EN UINT16_C(1 << 1)
283#define BMP3_SEL_TEMP_EN UINT16_C(1 << 2)
284#define BMP3_SEL_DRDY_EN UINT16_C(1 << 3)
285#define BMP3_SEL_PRESS_OS UINT16_C(1 << 4)
286#define BMP3_SEL_TEMP_OS UINT16_C(1 << 5)
287#define BMP3_SEL_IIR_FILTER UINT16_C(1 << 6)
288#define BMP3_SEL_ODR UINT16_C(1 << 7)
289#define BMP3_SEL_OUTPUT_MODE UINT16_C(1 << 8)
290#define BMP3_SEL_LEVEL UINT16_C(1 << 9)
291#define BMP3_SEL_LATCH UINT16_C(1 << 10)
292#define BMP3_SEL_I2C_WDT_EN UINT16_C(1 << 11)
293#define BMP3_SEL_I2C_WDT UINT16_C(1 << 12)
294#define BMP3_SEL_ALL UINT16_C(0x7FF)
295
299#define BMP3_SEL_FIFO_MODE UINT16_C(1 << 1)
300#define BMP3_SEL_FIFO_STOP_ON_FULL_EN UINT16_C(1 << 2)
301#define BMP3_SEL_FIFO_TIME_EN UINT16_C(1 << 3)
302#define BMP3_SEL_FIFO_PRESS_EN UINT16_C(1 << 4)
303#define BMP3_SEL_FIFO_TEMP_EN UINT16_C(1 << 5)
304#define BMP3_SEL_FIFO_DOWN_SAMPLING UINT16_C(1 << 6)
305#define BMP3_SEL_FIFO_FILTER_EN UINT16_C(1 << 7)
306#define BMP3_SEL_FIFO_FWTM_EN UINT16_C(1 << 8)
307#define BMP3_SEL_FIFO_FULL_EN UINT16_C(1 << 9)
308
312#define BMP3_PRESS UINT8_C(1)
313#define BMP3_TEMP UINT8_C(2)
314#define BMP3_PRESS_TEMP UINT8_C(3)
315
317#define BMP3_MIN_TEMP_INT INT64_C(-4000)
318#define BMP3_MAX_TEMP_INT INT64_C(8500)
319#define BMP3_MIN_TEMP_DOUBLE -40.0f
320#define BMP3_MAX_TEMP_DOUBLE 85.0f
321
323#define BMP3_MIN_PRES_INT UINT64_C(3000000)
324#define BMP3_MAX_PRES_INT UINT64_C(12500000)
325#define BMP3_MIN_PRES_DOUBLE 30000.0f
326#define BMP3_MAX_PRES_DOUBLE 125000.0f
327
329#define BMP3_ERR_FATAL_MSK UINT8_C(0x01)
330
331#define BMP3_ERR_CMD_MSK UINT8_C(0x02)
332#define BMP3_ERR_CMD_POS UINT8_C(0x01)
333
334#define BMP3_ERR_CONF_MSK UINT8_C(0x04)
335#define BMP3_ERR_CONF_POS UINT8_C(0x02)
336
337#define BMP3_STATUS_CMD_RDY_MSK UINT8_C(0x10)
338#define BMP3_STATUS_CMD_RDY_POS UINT8_C(0x04)
339
340#define BMP3_STATUS_DRDY_PRESS_MSK UINT8_C(0x20)
341#define BMP3_STATUS_DRDY_PRESS_POS UINT8_C(0x05)
342
343#define BMP3_STATUS_DRDY_TEMP_MSK UINT8_C(0x40)
344#define BMP3_STATUS_DRDY_TEMP_POS UINT8_C(0x06)
345
346#define BMP3_OP_MODE_MSK UINT8_C(0x30)
347#define BMP3_OP_MODE_POS UINT8_C(0x04)
348
349#define BMP3_PRESS_EN_MSK UINT8_C(0x01)
350
351#define BMP3_TEMP_EN_MSK UINT8_C(0x02)
352#define BMP3_TEMP_EN_POS UINT8_C(0x01)
353
354#define BMP3_IIR_FILTER_MSK UINT8_C(0x0E)
355#define BMP3_IIR_FILTER_POS UINT8_C(0x01)
356
357#define BMP3_ODR_MSK UINT8_C(0x1F)
358
359#define BMP3_PRESS_OS_MSK UINT8_C(0x07)
360
361#define BMP3_TEMP_OS_MSK UINT8_C(0x38)
362#define BMP3_TEMP_OS_POS UINT8_C(0x03)
363
364#define BMP3_FIFO_MODE_MSK UINT8_C(0x01)
365
366#define BMP3_FIFO_STOP_ON_FULL_MSK UINT8_C(0x02)
367#define BMP3_FIFO_STOP_ON_FULL_POS UINT8_C(0x01)
368
369#define BMP3_FIFO_TIME_EN_MSK UINT8_C(0x04)
370#define BMP3_FIFO_TIME_EN_POS UINT8_C(0x02)
371
372#define BMP3_FIFO_PRESS_EN_MSK UINT8_C(0x08)
373#define BMP3_FIFO_PRESS_EN_POS UINT8_C(0x03)
374
375#define BMP3_FIFO_TEMP_EN_MSK UINT8_C(0x10)
376#define BMP3_FIFO_TEMP_EN_POS UINT8_C(0x04)
377
378#define BMP3_FIFO_FILTER_EN_MSK UINT8_C(0x18)
379#define BMP3_FIFO_FILTER_EN_POS UINT8_C(0x03)
380
381#define BMP3_FIFO_DOWN_SAMPLING_MSK UINT8_C(0x07)
382
383#define BMP3_FIFO_FWTM_EN_MSK UINT8_C(0x08)
384#define BMP3_FIFO_FWTM_EN_POS UINT8_C(0x03)
385
386#define BMP3_FIFO_FULL_EN_MSK UINT8_C(0x10)
387#define BMP3_FIFO_FULL_EN_POS UINT8_C(0x04)
388
389#define BMP3_INT_OUTPUT_MODE_MSK UINT8_C(0x01)
390
391#define BMP3_INT_LEVEL_MSK UINT8_C(0x02)
392#define BMP3_INT_LEVEL_POS UINT8_C(0x01)
393
394#define BMP3_INT_LATCH_MSK UINT8_C(0x04)
395#define BMP3_INT_LATCH_POS UINT8_C(0x02)
396
397#define BMP3_INT_DRDY_EN_MSK UINT8_C(0x40)
398#define BMP3_INT_DRDY_EN_POS UINT8_C(0x06)
399
400#define BMP3_I2C_WDT_EN_MSK UINT8_C(0x02)
401#define BMP3_I2C_WDT_EN_POS UINT8_C(0x01)
402
403#define BMP3_I2C_WDT_SEL_MSK UINT8_C(0x04)
404#define BMP3_I2C_WDT_SEL_POS UINT8_C(0x02)
405
406#define BMP3_INT_STATUS_FWTM_MSK UINT8_C(0x01)
407
408#define BMP3_INT_STATUS_FFULL_MSK UINT8_C(0x02)
409#define BMP3_INT_STATUS_FFULL_POS UINT8_C(0x01)
410
411#define BMP3_INT_STATUS_DRDY_MSK UINT8_C(0x08)
412#define BMP3_INT_STATUS_DRDY_POS UINT8_C(0x03)
413
415#define BMP3_SET_LOW_BYTE UINT16_C(0x00FF)
416#define BMP3_SET_HIGH_BYTE UINT16_C(0xFF00)
417
419#define BMP3_CONCAT_BYTES(msb, lsb) (((uint16_t)msb << 8) | (uint16_t)lsb)
420
421#define BMP3_SET_BITS(reg_data, bitname, data) \
422 ((reg_data & ~(bitname##_MSK)) | \
423 ((data << bitname##_POS) & bitname##_MSK))
424
425/* Macro variant to handle the bitname position if it is zero */
426#define BMP3_SET_BITS_POS_0(reg_data, bitname, data) \
427 ((reg_data & ~(bitname##_MSK)) | \
428 (data & bitname##_MSK))
429
430#define BMP3_GET_BITS(reg_data, bitname) ((reg_data & (bitname##_MSK)) >> \
431 (bitname##_POS))
432
433/* Macro variant to handle the bitname position if it is zero */
434#define BMP3_GET_BITS_POS_0(reg_data, bitname) (reg_data & (bitname##_MSK))
435
436#define BMP3_GET_LSB(var) (uint8_t)(var & BMP3_SET_LOW_BYTE)
437#define BMP3_GET_MSB(var) (uint8_t)((var & BMP3_SET_HIGH_BYTE) >> 8)
438
440#define BMP3_LEN_CALIB_DATA UINT8_C(21)
441#define BMP3_LEN_P_AND_T_HEADER_DATA UINT8_C(7)
442#define BMP3_LEN_P_OR_T_HEADER_DATA UINT8_C(4)
443#define BMP3_LEN_P_T_DATA UINT8_C(6)
444#define BMP3_LEN_GEN_SETT UINT8_C(7)
445#define BMP3_LEN_P_DATA UINT8_C(3)
446#define BMP3_LEN_T_DATA UINT8_C(3)
447#define BMP3_LEN_SENSOR_TIME UINT8_C(3)
448#define BMP3_FIFO_MAX_FRAMES UINT8_C(73)
449
451#define BMP3_POWER_CNTL UINT16_C(0x0006)
452
454#define BMP3_ODR_FILTER UINT16_C(0x00F0)
455
457#define BMP3_INT_CTRL UINT16_C(0x0708)
458
460#define BMP3_ADV_SETT UINT16_C(0x1800)
461
466#define BMP3_FIFO_CONFIG_1 UINT16_C(0x003E)
467
469#define BMP3_FIFO_CONFIG_2 UINT16_C(0x00C0)
470
472#define BMP3_FIFO_INT_CTRL UINT16_C(0x0300)
473
476#define BMP3_FIFO_TEMP_PRESS_FRAME UINT8_C(0x94)
477
479#define BMP3_FIFO_TEMP_FRAME UINT8_C(0x90)
480
482#define BMP3_FIFO_PRESS_FRAME UINT8_C(0x84)
483
485#define BMP3_FIFO_TIME_FRAME UINT8_C(0xA0)
486
488#define BMP3_FIFO_ERROR_FRAME UINT8_C(0x44)
489
491#define BMP3_FIFO_CONFIG_CHANGE UINT8_C(0x48)
492
494#define BMP3_FIFO_EMPTY_FRAME UINT8_C(0x80)
495
497#define BMP3_SENSORTIME_OVERHEAD_BYTES UINT8_C(20)
498
499/********************************************************/
500
510
511/********************************************************/
512
529typedef BMP3_INTF_RET_TYPE (*bmp3_read_fptr_t)(uint8_t reg_addr, uint8_t *read_data, uint32_t len, void *intf_ptr);
530
544typedef BMP3_INTF_RET_TYPE (*bmp3_write_fptr_t)(uint8_t reg_addr, const uint8_t *read_data, uint32_t len,
545 void *intf_ptr);
546
556typedef void (*bmp3_delay_us_fptr_t)(uint32_t period, void *intf_ptr);
557
558/********************************************************/
559
564{
567 uint16_t par_t1;
568 uint16_t par_t2;
569 int8_t par_t3;
570 int16_t par_p1;
571 int16_t par_p2;
572 int8_t par_p3;
573 int8_t par_p4;
574 uint16_t par_p5;
575 uint16_t par_p6;
576 int8_t par_p7;
577 int8_t par_p8;
578 int16_t par_p9;
579 int8_t par_p10;
580 int8_t par_p11;
581 int64_t t_lin;
582};
583
588{
590 uint8_t i2c_wdt_en;
591
593 uint8_t i2c_wdt_sel;
594};
595
600{
602 uint8_t press_os;
603
605 uint8_t temp_os;
606
608 uint8_t iir_filter;
609
611 uint8_t odr;
612};
613
618{
620 uint8_t cmd_rdy;
621
623 uint8_t drdy_press;
624
626 uint8_t drdy_temp;
627};
628
633{
635 uint8_t fifo_wm;
636
638 uint8_t fifo_full;
639
641 uint8_t drdy;
642};
643
648{
650 uint8_t fatal;
651
653 uint8_t cmd;
654
656 uint8_t conf;
657};
658
663{
666
669
672
674 uint8_t pwr_on_rst;
675};
676
681{
683 uint8_t output_mode;
684
686 uint8_t level;
687
689 uint8_t latch;
690
692 uint8_t drdy_en;
693};
694
718
723{
726 uint8_t *buffer;
727
729 uint16_t byte_count;
730
732 uint8_t req_frames;
733
735 uint16_t start_idx;
736
739
741 uint8_t config_err;
742
744 uint32_t sensor_time;
745
748
751};
752
757{
759 uint8_t mode;
760
763
765 uint8_t time_en;
766
768 uint8_t press_en;
769
771 uint8_t temp_en;
772
775
777 uint8_t filter_en;
778
780 uint8_t fwtm_en;
781
783 uint8_t ffull_en;
784};
785
786#ifdef BMP3_FLOAT_COMPENSATION
787
792{
795 double par_t1;
796 double par_t2;
797 double par_t3;
798 double par_p1;
799 double par_p2;
800 double par_p3;
801 double par_p4;
802 double par_p5;
803 double par_p6;
804 double par_p7;
805 double par_p8;
806 double par_p9;
807 double par_p10;
808 double par_p11;
809 double t_lin;
810};
811
823
829{
832
834 double pressure;
835};
836
837#else
838
843struct bmp3_data
844{
846 int64_t temperature;
847
849 uint64_t pressure;
850};
851
855struct bmp3_calib_data
856{
859};
860
861#endif /* BMP3_FLOAT_COMPENSATION */
862
868{
870 uint64_t pressure;
871
873 int64_t temperature;
874};
875
916
917#ifdef __cplusplus
918}
919#endif /* End of CPP guard */
920
921#endif /* BMP3_DEFS_H_ */
BMP3_INTF_RET_TYPE(* bmp3_write_fptr_t)(uint8_t reg_addr, const uint8_t *read_data, uint32_t len, void *intf_ptr)
Bus communication function pointer which should be mapped to the platform specific write functions of...
Definition bmp3_defs.h:544
#define BMP3_INTF_RET_TYPE
Definition bmp3_defs.h:118
bmp3_intf
Interface selection Enums.
Definition bmp3_defs.h:504
@ BMP3_SPI_INTF
Definition bmp3_defs.h:506
@ BMP3_I2C_INTF
Definition bmp3_defs.h:508
void(* bmp3_delay_us_fptr_t)(uint32_t period, void *intf_ptr)
Delay function pointer which should be mapped to delay function of the user.
Definition bmp3_defs.h:556
BMP3_INTF_RET_TYPE(* bmp3_read_fptr_t)(uint8_t reg_addr, uint8_t *read_data, uint32_t len, void *intf_ptr)
Type definitions.
Definition bmp3_defs.h:529
: Header for main.c file. This file contains the common defines of the application.
bmp3 advance settings
Definition bmp3_defs.h:588
uint8_t i2c_wdt_sel
Definition bmp3_defs.h:593
Calibration data.
Definition bmp3_defs.h:816
struct bmp3_reg_calib_data reg_calib_data
Definition bmp3_defs.h:821
struct bmp3_quantized_calib_data quantized_calib_data
Definition bmp3_defs.h:818
bmp3 sensor structure which comprises of temperature and pressure data.
Definition bmp3_defs.h:829
double pressure
Definition bmp3_defs.h:834
double temperature
Definition bmp3_defs.h:831
bmp3 device structure
Definition bmp3_defs.h:880
bmp3_read_fptr_t read
Definition bmp3_defs.h:905
BMP3_INTF_RET_TYPE intf_rslt
Definition bmp3_defs.h:899
bmp3_write_fptr_t write
Definition bmp3_defs.h:908
uint8_t chip_id
Definition bmp3_defs.h:882
enum bmp3_intf intf
Definition bmp3_defs.h:896
struct bmp3_calib_data calib_data
Definition bmp3_defs.h:914
bmp3_delay_us_fptr_t delay_us
Definition bmp3_defs.h:911
uint8_t dummy_byte
Definition bmp3_defs.h:902
void * intf_ptr
Definition bmp3_defs.h:890
bmp3 error status flags
Definition bmp3_defs.h:648
bmp3 fifo frame
Definition bmp3_defs.h:723
uint8_t frame_not_available
Definition bmp3_defs.h:750
uint16_t byte_count
Definition bmp3_defs.h:729
uint8_t req_frames
Definition bmp3_defs.h:732
uint16_t start_idx
Definition bmp3_defs.h:735
uint32_t sensor_time
Definition bmp3_defs.h:744
uint8_t config_err
Definition bmp3_defs.h:741
uint8_t config_change
Definition bmp3_defs.h:747
uint8_t * buffer
Definition bmp3_defs.h:726
uint8_t parsed_frames
Definition bmp3_defs.h:738
bmp3 fifo configuration
Definition bmp3_defs.h:757
uint8_t down_sampling
Definition bmp3_defs.h:774
uint8_t stop_on_full_en
Definition bmp3_defs.h:762
bmp3 interrupt pin settings
Definition bmp3_defs.h:681
bmp3 interrupt status flags
Definition bmp3_defs.h:633
uint8_t fifo_wm
Definition bmp3_defs.h:635
uint8_t fifo_full
Definition bmp3_defs.h:638
bmp3 odr and filter settings
Definition bmp3_defs.h:600
Quantized Trim Variables.
Definition bmp3_defs.h:792
Register Trim Variables.
Definition bmp3_defs.h:564
bmp3 sensor status flags
Definition bmp3_defs.h:618
uint8_t drdy_press
Definition bmp3_defs.h:623
uint8_t drdy_temp
Definition bmp3_defs.h:626
bmp3 device settings
Definition bmp3_defs.h:699
uint8_t op_mode
Definition bmp3_defs.h:701
uint8_t temp_en
Definition bmp3_defs.h:707
uint8_t press_en
Definition bmp3_defs.h:704
struct bmp3_int_ctrl_settings int_settings
Definition bmp3_defs.h:713
struct bmp3_adv_settings adv_settings
Definition bmp3_defs.h:716
struct bmp3_odr_filter_settings odr_filter
Definition bmp3_defs.h:710
bmp3 status flags
Definition bmp3_defs.h:663
struct bmp3_sens_status sensor
Definition bmp3_defs.h:668
struct bmp3_err_status err
Definition bmp3_defs.h:671
uint8_t pwr_on_rst
Definition bmp3_defs.h:674
struct bmp3_int_status intr
Definition bmp3_defs.h:665
bmp3 sensor structure which comprises of un-compensated temperature and pressure data.
Definition bmp3_defs.h:868
uint64_t pressure
Definition bmp3_defs.h:870
int64_t temperature
Definition bmp3_defs.h:873