diff options
author | Ching-Kang Yen <chingkang@chromium.org> | 2020-07-30 17:37:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-03 07:15:38 +0000 |
commit | 90c79d90699268d31a3a2d8f48af5955e493005b (patch) | |
tree | d6b16ac11119d1fd117ef5279ddf40e27da6cc79 /include/accelgyro.h | |
parent | e9d86fc334f71d6f0daf44f9bc0f9ee311620095 (diff) | |
download | chrome-ec-90c79d90699268d31a3a2d8f48af5955e493005b.tar.gz |
driver: bmi: add get_rms_noise() for body detection
We will need the amount of noise for body detection.
The amount of noise in accelometer will depends on several thing, e.g.,
output data rate.
Add get_rms_noise() function to get the root mean square
of noise in BMI.
BRANCH=None
BUG=b:123434029
TEST=buildall
Signed-off-by: Ching-Kang Yen <chingkang@chromium.org>
Change-Id: Ia56bbd2cdb36bee771beb9df32451d3e56f4f028
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2329112
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r-- | include/accelgyro.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h index 1417188d1a..e1226bc3e4 100644 --- a/include/accelgyro.h +++ b/include/accelgyro.h @@ -159,6 +159,12 @@ struct accelgyro_drv { uint32_t *disabled); #endif +#ifdef CONFIG_BODY_DETECTION + /** + * Get the root mean square of current noise (ug/mdps) in the sensor. + */ + int (*get_rms_noise)(const struct motion_sensor_t *s); +#endif }; /* Index values for rgb_calibration_t.coeff array */ |