Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
bmx280_internals.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2016 Kees Bakker, SODAQ
3
* SPDX-FileCopyrightText: 2017 Inria
4
* SPDX-License-Identifier: LGPL-2.1-only
5
*/
6
7
#pragma once
8
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
28
#if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
29
#define BMX280_CHIP_ID_VAL (0x60)
30
#else
31
#define BMX280_CHIP_ID_VAL (0x58)
32
#endif
34
39
#define BMX280_CHIP_ID_REG (0xD0)
40
#define BMEX80_RST_REG (0xE0)
/* Softreset Reg */
41
42
#define BMX280_DIG_T1_LSB_REG (0x88)
43
#define BMX280_DIG_T1_MSB_REG (0x89)
44
#define BMX280_DIG_T2_LSB_REG (0x8A)
45
#define BMX280_DIG_T2_MSB_REG (0x8B)
46
#define BMX280_DIG_T3_LSB_REG (0x8C)
47
#define BMX280_DIG_T3_MSB_REG (0x8D)
48
#define BMX280_DIG_P1_LSB_REG (0x8E)
49
#define BMX280_DIG_P1_MSB_REG (0x8F)
50
#define BMX280_DIG_P2_LSB_REG (0x90)
51
#define BMX280_DIG_P2_MSB_REG (0x91)
52
#define BMX280_DIG_P3_LSB_REG (0x92)
53
#define BMX280_DIG_P3_MSB_REG (0x93)
54
#define BMX280_DIG_P4_LSB_REG (0x94)
55
#define BMX280_DIG_P4_MSB_REG (0x95)
56
#define BMX280_DIG_P5_LSB_REG (0x96)
57
#define BMX280_DIG_P5_MSB_REG (0x97)
58
#define BMX280_DIG_P6_LSB_REG (0x98)
59
#define BMX280_DIG_P6_MSB_REG (0x99)
60
#define BMX280_DIG_P7_LSB_REG (0x9A)
61
#define BMX280_DIG_P7_MSB_REG (0x9B)
62
#define BMX280_DIG_P8_LSB_REG (0x9C)
63
#define BMX280_DIG_P8_MSB_REG (0x9D)
64
#define BMX280_DIG_P9_LSB_REG (0x9E)
65
#define BMX280_DIG_P9_MSB_REG (0x9F)
66
67
#define BME280_DIG_H1_REG (0xA1)
68
#define BME280_DIG_H2_LSB_REG (0xE1)
69
#define BME280_DIG_H2_MSB_REG (0xE2)
70
#define BME280_DIG_H3_REG (0xE3)
71
#define BME280_DIG_H4_MSB_REG (0xE4)
/* H4[11:4] */
72
#define BME280_DIG_H4_H5_REG (0xE5)
/* H5[3:0] H4[3:0] */
73
#define BME280_DIG_H5_MSB_REG (0xE6)
/* H5[11:4] */
74
#define BME280_DIG_H6_REG (0xE7)
75
76
#define BMX280_STAT_REG (0xF3)
/* Status Reg */
77
#define BMX280_CTRL_MEAS_REG (0xF4)
/* Ctrl Measure Reg */
78
#define BMX280_CONFIG_REG (0xF5)
/* Configuration Reg */
79
#define BMX280_PRESSURE_MSB_REG (0xF7)
/* Pressure MSB */
80
#define BMX280_PRESSURE_LSB_REG (0xF8)
/* Pressure LSB */
81
#define BMX280_PRESSURE_XLSB_REG (0xF9)
/* Pressure XLSB */
82
#define BMX280_TEMPERATURE_MSB_REG (0xFA)
/* Temperature MSB */
83
#define BMX280_TEMPERATURE_LSB_REG (0xFB)
/* Temperature LSB */
84
#define BMX280_TEMPERATURE_XLSB_REG (0xFC)
/* Temperature XLSB */
85
#define BME280_CTRL_HUM_REG (0xF2)
/* Ctrl Humidity Reg */
86
#define BME280_HUMIDITY_MSB_REG (0xFD)
/* Humidity MSB */
87
#define BME280_HUMIDITY_LSB_REG (0xFE)
/* Humidity LSB */
89
94
#define MEAS_OSRS_T_POS (5U)
95
#define MEAS_OSRS_P_POS (2U)
96
#define STAT_MEASURING (1 << 3)
97
#define RESET_WORD (0xB6)
99
104
#define DATA_BASE BMX280_PRESSURE_MSB_REG
106
111
#define CALIB_T_P_BASE (BMX280_DIG_T1_LSB_REG)
112
#define CALIB_T_P_LEN (24U)
113
#define OFFSET_T_P(x) (x - CALIB_T_P_BASE)
114
#if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
115
#define CALIB_H_BASE (BME280_DIG_H2_LSB_REG)
116
#define CALIB_H_LEN (7U)
117
#define OFFSET_H(x) (x - CALIB_H_BASE)
118
#endif
120
121
#ifdef __cplusplus
122
}
123
#endif
124
Generated on Wed Apr 15 2026 03:46:09 by
1.13.2