29 #define BMP280_DEFAULT_I2C_BUS 0 30 #define BMP280_DEFAULT_SPI_BUS 0 31 #define BMP280_DEFAULT_ADDR 0x77 32 #define BMP280_CHIPID 0x58 35 #define BME280_DEFAULT_I2C_BUS 0 36 #define BME280_DEFAULT_SPI_BUS 0 37 #define BME280_DEFAULT_ADDR 0x77 38 #define BME280_CHIPID 0x60 41 #define BMP280_SEA_LEVEL_HPA (1013.25) 44 #define BMP280_RESET_BYTE 0xb6 57 BMP280_REG_CALIB00 = 0x88,
58 BMP280_REG_CALIB01 = 0x89,
59 BMP280_REG_CALIB02 = 0x8a,
60 BMP280_REG_CALIB03 = 0x8b,
61 BMP280_REG_CALIB04 = 0x8c,
62 BMP280_REG_CALIB05 = 0x8d,
63 BMP280_REG_CALIB06 = 0x8e,
64 BMP280_REG_CALIB07 = 0x8f,
65 BMP280_REG_CALIB08 = 0x90,
66 BMP280_REG_CALIB09 = 0x91,
67 BMP280_REG_CALIB10 = 0x92,
68 BMP280_REG_CALIB11 = 0x93,
69 BMP280_REG_CALIB12 = 0x94,
70 BMP280_REG_CALIB13 = 0x95,
71 BMP280_REG_CALIB14 = 0x96,
72 BMP280_REG_CALIB15 = 0x97,
73 BMP280_REG_CALIB16 = 0x98,
74 BMP280_REG_CALIB17 = 0x99,
75 BMP280_REG_CALIB18 = 0x9a,
76 BMP280_REG_CALIB19 = 0x9b,
77 BMP280_REG_CALIB20 = 0x9c,
78 BMP280_REG_CALIB21 = 0x9d,
79 BMP280_REG_CALIB22 = 0x9e,
80 BMP280_REG_CALIB23 = 0x9f,
81 BMP280_REG_CALIB24 = 0xa0,
82 BMP280_REG_CALIB25 = 0xa1,
84 BMP280_REG_CHIPID = 0xd0,
85 BMP280_REG_RESET = 0xe0,
86 BMP280_REG_STATUS = 0xf3,
87 BMP280_REG_CTRL_MEAS = 0xf4,
88 BMP280_REG_CONFIG = 0xf5,
90 BMP280_REG_PRESSURE_MSB = 0xf7,
91 BMP280_REG_PRESSURE_LSB = 0xf8,
92 BMP280_REG_PRESSURE_XLSB = 0xf9,
94 BMP280_REG_TEMPERATURE_MSB = 0xfa,
95 BMP280_REG_TEMPERATURE_LSB = 0xfb,
96 BMP280_REG_TEMPERATURE_XLSB = 0xfc
103 BMP280_CONFIG_SPI3W_EN = 0x01,
107 BMP280_CONFIG_FILTER0 = 0x04,
108 BMP280_CONFIG_FILTER1 = 0x08,
109 BMP280_CONFIG_FILTER2 = 0x10,
110 _BMP280_CONFIG_FILTER_MASK = 7,
111 _BMP280_CONFIG_FILTER_SHIFT = 2,
113 BMP280_CONFIG_T_SB0 = 0x20,
114 BMP280_CONFIG_T_SB1 = 0x40,
115 BMP280_CONFIG_T_SB2 = 0x80,
116 _BMP280_CONFIG_T_SB_MASK = 7,
117 _BMP280_CONFIG_T_SB_SHIFT = 5
118 } BMP280_CONFIG_BITS_T;
124 BMP280_FILTER_OFF = 0,
136 BMP280_T_SB_62_5 = 1,
140 BMP280_T_SB_1000 = 5,
141 BMP280_T_SB_2000 = 6,
150 BMP280_CTRL_MEAS_MODE0 = 0x01,
151 BMP280_CTRL_MEAS_MODE1 = 0x02,
152 _BMP280_CTRL_MEAS_MODE_MASK = 3,
153 _BMP280_CTRL_MEAS_MODE_SHIFT = 0,
155 BMP280_CTRL_MEAS_OSRS_P0 = 0x04,
156 BMP280_CTRL_MEAS_OSRS_P1 = 0x08,
157 BMP280_CTRL_MEAS_OSRS_P2 = 0x10,
158 _BMP280_CTRL_MEAS_OSRS_P_MASK = 7,
159 _BMP280_CTRL_MEAS_OSRS_P_SHIFT = 2,
161 BMP280_CTRL_MEAS_OSRS_T0 = 0x04,
162 BMP280_CTRL_MEAS_OSRS_T1 = 0x08,
163 BMP280_CTRL_MEAS_OSRS_T2 = 0x10,
164 _BMP280_CTRL_MEAS_OSRS_T_MASK = 7,
165 _BMP280_CTRL_MEAS_OSRS_T_SHIFT = 5
166 } BMP280_CTRL_MEAS_T;
172 BMP280_MODE_SLEEP = 0,
173 BMP280_MODE_FORCED = 1,
175 BMP280_MODE_NORMAL = 3
182 BMP280_OSRS_P_SKIPPED = 0,
183 BMP280_OSRS_P_OVERSAMPLING_1 = 1,
184 BMP280_OSRS_P_OVERSAMPLING_2 = 2,
185 BMP280_OSRS_P_OVERSAMPLING_4 = 3,
186 BMP280_OSRS_P_OVERSAMPLING_8 = 4,
187 BMP280_OSRS_P_OVERSAMPLING_16 = 5
194 BMP280_OSRS_T_SKIPPED = 0,
195 BMP280_OSRS_T_OVERSAMPLING_1 = 1,
196 BMP280_OSRS_T_OVERSAMPLING_2 = 2,
197 BMP280_OSRS_T_OVERSAMPLING_4 = 3,
198 BMP280_OSRS_T_OVERSAMPLING_8 = 4,
199 BMP280_OSRS_T_OVERSAMPLING_16 = 5
206 BMP280_STATUS_IM_UPDATE = 0x01,
208 BMP280_STATUS_MEASURING = 0x08
218 BMP280_USAGE_MODE_HANDHELD_LOW_POWER = 0,
219 BMP280_USAGE_MODE_HANDHELD_DYNAMIC = 1,
220 BMP280_USAGE_MODE_WEATHER_MONITOR = 2,
221 BMP280_USAGE_MODE_FLOOR_CHG_DETECT = 3,
222 BMP280_USAGE_MODE_DROP_DETECT = 4,
223 BMP280_USAGE_MODE_INDOOR_NAV = 5
224 } BMP280_USAGE_MODE_T;
242 BME280_REG_CALIB_DIG_H1 = 0xa1,
244 BME280_REG_CALIB_DIG_H2_LSB = 0xe1,
245 BME280_REG_CALIB_DIG_H2_MSB = 0xe2,
247 BME280_REG_CALIB_DIG_H3 = 0xe3,
249 BME280_REG_CALIB_DIG_H4_0 = 0xe4,
250 BME280_REG_CALIB_DIG_H4_1 = 0xe5,
252 BME280_REG_CALIB_DIG_H5_0 = 0xe5,
253 BME280_REG_CALIB_DIG_H5_1 = 0xe6,
255 BME280_REG_CALIB_DIG_H6 = 0xe7,
257 BME280_REG_CTRL_HUM = 0xf2,
259 BME280_REG_HUMIDITY_MSB = 0xfd,
260 BME280_REG_HUMIDITY_LSB = 0xfe
267 BME280_CTRL_HUM_OSRS_H0 = 0x01,
268 BME280_CTRL_HUM_OSRS_H1 = 0x02,
269 BME280_CTRL_HUM_OSRS_H2 = 0x04,
270 _BME280_CTRL_HUM_OSRS_H_MASK = 3,
271 _BME280_CTRL_HUM_OSRS_H_SHIFT = 0
280 BME280_OSRS_H_SKIPPED = 0,
281 BME280_OSRS_H_OVERSAMPLING_1 = 1,
282 BME280_OSRS_H_OVERSAMPLING_2 = 2,
283 BME280_OSRS_H_OVERSAMPLING_4 = 3,
284 BME280_OSRS_H_OVERSAMPLING_8 = 4,
285 BME280_OSRS_H_OVERSAMPLING_16 = 5