summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/driver/bme680.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/driver/bme680.cc b/src/driver/bme680.cc
index 52f94bf..2a27b18 100644
--- a/src/driver/bme680.cc
+++ b/src/driver/bme680.cc
@@ -1036,18 +1036,18 @@ int8_t BME680::setMemPage(uint8_t reg_addr)
{
int8_t rslt;
uint8_t reg;
- uint8_t mem_page;
+ uint8_t new_mem_page;
/* Check for null pointers in the device structure*/
rslt = nullPtrCheck();
if (rslt == BME680_OK) {
if (reg_addr > 0x7f)
- mem_page = BME680_MEM_PAGE1;
+ new_mem_page = BME680_MEM_PAGE1;
else
- mem_page = BME680_MEM_PAGE0;
+ new_mem_page = BME680_MEM_PAGE0;
- if (mem_page != mem_page) {
- mem_page = mem_page;
+ if (new_mem_page != mem_page) {
+ mem_page = new_mem_page;
com_rslt = read(dev_id, BME680_MEM_PAGE_ADDR | BME680_SPI_RD_MSK, &reg, 1);
if (com_rslt != 0)
@@ -1136,4 +1136,4 @@ int8_t BME680::nullPtrCheck()
return rslt;
}
-BME680 bme680(BME680_I2C_ADDR_SECONDARY); \ No newline at end of file
+BME680 bme680(BME680_I2C_ADDR_SECONDARY);