diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-10-19 14:36:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-20 20:15:03 +0000 |
commit | 512823a8aa87d4b6a83f88bab05fe586de6c14aa (patch) | |
tree | 5be9dc89304498414d1e33e0b578e9c53b990b41 /include/online_calibration.h | |
parent | 28fe21716cdacac0ecc025407b727eaf5a99b720 (diff) | |
download | chrome-ec-512823a8aa87d4b6a83f88bab05fe586de6c14aa.tar.gz |
common: online_calibration: Fix compilation issue
- Fix compilation error: sizeof() of an input array
was not calculated properly.
- Fix calling convention: use sensor pointer instead of
sensor number
- Use common formula to calculate sensor number.
BUG=none
BRANCH=none
TEST=compile, unittest, load on eve with online calibration added.
Change-Id: I06ff30eb5710cbe8f91c939b2ccc084c20a37847
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2486304
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'include/online_calibration.h')
-rw-r--r-- | include/online_calibration.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/online_calibration.h b/include/online_calibration.h index 6f8fad33a7..e3b259e14d 100644 --- a/include/online_calibration.h +++ b/include/online_calibration.h @@ -41,6 +41,7 @@ bool online_calibration_has_new_values(void); * @param out The target to copy the data into. * @return True if a value was written to `out`. */ -bool online_calibration_read(int sensor_num, int16_t out[3]); +bool online_calibration_read(struct motion_sensor_t *sensor, + struct ec_response_online_calibration_data *out); #endif /* __CROS_EC_ONLINE_CALIBRATION_H */ |