Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
bmx280_internals.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Kees Bakker, SODAQ
3
* 2017 Inria
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser
6
* General Public License v2.1. See the file LICENSE in the top level
7
* directory for more details.
8
*/
9
10
#pragma once
11
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
32
#define BMX280_CHIP_ID_VAL (0x60)
33
#else
34
#define BMX280_CHIP_ID_VAL (0x58)
35
#endif
42
#define BMX280_CHIP_ID_REG (0xD0)
43
#define BMEX80_RST_REG (0xE0)
/* Softreset Reg */
44
45
#define BMX280_DIG_T1_LSB_REG (0x88)
46
#define BMX280_DIG_T1_MSB_REG (0x89)
47
#define BMX280_DIG_T2_LSB_REG (0x8A)
48
#define BMX280_DIG_T2_MSB_REG (0x8B)
49
#define BMX280_DIG_T3_LSB_REG (0x8C)
50
#define BMX280_DIG_T3_MSB_REG (0x8D)
51
#define BMX280_DIG_P1_LSB_REG (0x8E)
52
#define BMX280_DIG_P1_MSB_REG (0x8F)
53
#define BMX280_DIG_P2_LSB_REG (0x90)
54
#define BMX280_DIG_P2_MSB_REG (0x91)
55
#define BMX280_DIG_P3_LSB_REG (0x92)
56
#define BMX280_DIG_P3_MSB_REG (0x93)
57
#define BMX280_DIG_P4_LSB_REG (0x94)
58
#define BMX280_DIG_P4_MSB_REG (0x95)
59
#define BMX280_DIG_P5_LSB_REG (0x96)
60
#define BMX280_DIG_P5_MSB_REG (0x97)
61
#define BMX280_DIG_P6_LSB_REG (0x98)
62
#define BMX280_DIG_P6_MSB_REG (0x99)
63
#define BMX280_DIG_P7_LSB_REG (0x9A)
64
#define BMX280_DIG_P7_MSB_REG (0x9B)
65
#define BMX280_DIG_P8_LSB_REG (0x9C)
66
#define BMX280_DIG_P8_MSB_REG (0x9D)
67
#define BMX280_DIG_P9_LSB_REG (0x9E)
68
#define BMX280_DIG_P9_MSB_REG (0x9F)
69
70
#define BME280_DIG_H1_REG (0xA1)
71
#define BME280_DIG_H2_LSB_REG (0xE1)
72
#define BME280_DIG_H2_MSB_REG (0xE2)
73
#define BME280_DIG_H3_REG (0xE3)
74
#define BME280_DIG_H4_MSB_REG (0xE4)
/* H4[11:4] */
75
#define BME280_DIG_H4_H5_REG (0xE5)
/* H5[3:0] H4[3:0] */
76
#define BME280_DIG_H5_MSB_REG (0xE6)
/* H5[11:4] */
77
#define BME280_DIG_H6_REG (0xE7)
78
79
#define BMX280_STAT_REG (0xF3)
/* Status Reg */
80
#define BMX280_CTRL_MEAS_REG (0xF4)
/* Ctrl Measure Reg */
81
#define BMX280_CONFIG_REG (0xF5)
/* Configuration Reg */
82
#define BMX280_PRESSURE_MSB_REG (0xF7)
/* Pressure MSB */
83
#define BMX280_PRESSURE_LSB_REG (0xF8)
/* Pressure LSB */
84
#define BMX280_PRESSURE_XLSB_REG (0xF9)
/* Pressure XLSB */
85
#define BMX280_TEMPERATURE_MSB_REG (0xFA)
/* Temperature MSB */
86
#define BMX280_TEMPERATURE_LSB_REG (0xFB)
/* Temperature LSB */
87
#define BMX280_TEMPERATURE_XLSB_REG (0xFC)
/* Temperature XLSB */
88
#define BME280_CTRL_HUM_REG (0xF2)
/* Ctrl Humidity Reg */
89
#define BME280_HUMIDITY_MSB_REG (0xFD)
/* Humidity MSB */
90
#define BME280_HUMIDITY_LSB_REG (0xFE)
/* Humidity LSB */
97
#define MEAS_OSRS_T_POS (5U)
98
#define MEAS_OSRS_P_POS (2U)
99
#define STAT_MEASURING (1 << 3)
100
#define RESET_WORD (0xB6)
107
#define DATA_BASE BMX280_PRESSURE_MSB_REG
114
#define CALIB_T_P_BASE (BMX280_DIG_T1_LSB_REG)
115
#define CALIB_T_P_LEN (24U)
116
#define OFFSET_T_P(x) (x - CALIB_T_P_BASE)
117
#if defined(MODULE_BME280_SPI) || defined(MODULE_BME280_I2C)
118
#define CALIB_H_BASE (BME280_DIG_H2_LSB_REG)
119
#define CALIB_H_LEN (7U)
120
#define OFFSET_H(x) (x - CALIB_H_BASE)
121
#endif
124
#ifdef __cplusplus
125
}
126
#endif
127
Generated on Fri Jun 20 2025 21:02:36 by
1.9.1