BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
416e763f
Commit
416e763f
authored
Jun 01, 2018
by
David Clark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated interleaved reading
parent
7d905f13
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
bme680_patch.txt
linux_kernel_modules/bme680/bme680_patch.txt
+34
-3
No files found.
linux_kernel_modules/bme680/bme680_patch.txt
View file @
416e763f
--- ./BME680_driver/bme680.c 2018-05-15 10:35:44.730819635 -0700
+++ ./bme680.c 2018-05-15 09:55:23.278858200 -0700
@@ -991,7 +991,12 @@
diff --git a/bme680.c b/bme680.c
index 5b6bfd7..aefa886 100644
--- a/bme680.c
+++ b/bme680.c
@@ -358,13 +358,20 @@ int8_t bme680_set_regs(const uint8_t *reg_addr, const uint8_t *reg_data, uint8_t
tmp_buff[(2 * index)] = reg_addr[index];
}
tmp_buff[(2 * index) + 1] = reg_data[index];
+#ifdef SIERRA
+ dev->com_rslt = dev->write(dev->dev_id, tmp_buff[2 * index], &tmp_buff[(2 * index) + 1], 1);
+ if (dev->com_rslt != 0)
+ rslt = BME680_E_COM_FAIL;
+#endif
}
+#ifndef SIERRA
/* Write the interleaved array */
if (rslt == BME680_OK) {
dev->com_rslt = dev->write(dev->dev_id, tmp_buff[0], &tmp_buff[1], (2 * len) - 1);
if (dev->com_rslt != 0)
rslt = BME680_E_COM_FAIL;
}
+#endif
} else {
rslt = BME680_E_INVALID_LENGTH;
}
@@ -770,6 +777,7 @@ static int8_t get_calib_data(struct bme680_dev *dev)
| (coeff_array[BME680_H1_LSB_REG] & BME680_BIT_H1_DATA_MSK));
dev->calib.par_h2 = (uint16_t) (((uint16_t) coeff_array[BME680_H2_MSB_REG] << BME680_HUM_REG_SHIFT_VAL)
| ((coeff_array[BME680_H2_LSB_REG]) >> BME680_HUM_REG_SHIFT_VAL));
+
dev->calib.par_h3 = (int8_t) coeff_array[BME680_H3_REG];
dev->calib.par_h4 = (int8_t) coeff_array[BME680_H4_REG];
dev->calib.par_h5 = (int8_t) coeff_array[BME680_H5_REG];
@@ -991,7 +999,12 @@ static uint32_t calc_gas_resistance(uint16_t gas_res_adc, uint8_t gas_range, con
((int64_t) lookupTable1[gas_range])) >> 16;
var2 = (((int64_t) ((int64_t) gas_res_adc << 15) - (int64_t) (16777216)) + var1);
var3 = (((int64_t) lookupTable2[gas_range] * (int64_t) var1) >> 9);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment