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 <leonardp@tr-host.de>
This commit is contained in:
Leonard Pollak 2022-02-20 09:55:18 +01:00 committed by Carles Cufí
commit 8e7907aa6f
2 changed files with 2 additions and 2 deletions

View file

@ -292,7 +292,7 @@ static int bme680_read_compensation(const struct device *dev)
}
err = bme680_reg_read(dev, BME680_REG_COEFF2, &buff[BME680_LEN_COEFF1],
16);
BME680_LEN_COEFF2);
if (err < 0) {
return err;
}

View file

@ -29,7 +29,7 @@
#define BME680_REG_CTRL_HUM 0x72
#define BME680_REG_CTRL_MEAS 0x74
#define BME680_REG_CONFIG 0x75
#define BME680_REG_MEM_PAGE 0xf3
#define BME680_REG_MEM_PAGE 0x73
#define BME680_REG_UNIQUE_ID 0x83
#define BME680_REG_COEFF1 0x8a
#define BME680_REG_CHIP_ID 0xd0