Skip to content

Commit e9d7d5c

Browse files
Leonard Pollakcarlescufi
authored andcommitted
drivers: sensor: bme680: fix constants
This fixes the constant for the mem page and replaces a magic number with the already defined `BME680_LEN_COEFF2` constant. Signed-off-by: Leonard Pollak <[email protected]>
1 parent 20cb60e commit e9d7d5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/sensor/bme680/bme680.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static int bme680_read_compensation(const struct device *dev)
292292
}
293293

294294
err = bme680_reg_read(dev, BME680_REG_COEFF2, &buff[BME680_LEN_COEFF1],
295-
16);
295+
BME680_LEN_COEFF2);
296296
if (err < 0) {
297297
return err;
298298
}

drivers/sensor/bme680/bme680.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#define BME680_REG_CTRL_HUM 0x72
3030
#define BME680_REG_CTRL_MEAS 0x74
3131
#define BME680_REG_CONFIG 0x75
32-
#define BME680_REG_MEM_PAGE 0xf3
32+
#define BME680_REG_MEM_PAGE 0x73
3333
#define BME680_REG_UNIQUE_ID 0x83
3434
#define BME680_REG_COEFF1 0x8a
3535
#define BME680_REG_CHIP_ID 0xd0

0 commit comments

Comments
 (0)