diff options
author | Yuval Peress <peress@chromium.org> | 2019-10-29 15:02:37 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-13 00:56:05 +0000 |
commit | 88808c3dda819f9da22272850d2b56ab1e538c9f (patch) | |
tree | 614c8f28cb17c232ac74ac252b615fcecd554ba6 /include/online_calibration.h | |
parent | 4acc29890130946ad574ea0f314b65497efb7ce2 (diff) | |
download | chrome-ec-88808c3dda819f9da22272850d2b56ab1e538c9f.tar.gz |
common: Migrate online calibration to own module
This change moves the code that handles caching the temperature
(which is the first step in online calibration) into a new
compilational unit.
TEST=None
BRANCH=None
BUG=b:138303429,chromium:1023858
Change-Id: Ib1fe3d2234dc2436e2bbfd4febd22196e5cdafef
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906340
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include/online_calibration.h')
-rw-r--r-- | include/online_calibration.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/online_calibration.h b/include/online_calibration.h new file mode 100644 index 0000000000..5d22ec5d5f --- /dev/null +++ b/include/online_calibration.h @@ -0,0 +1,29 @@ +/* Copyright 2020 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_ONLINE_CALIBRATION_H +#define __CROS_EC_ONLINE_CALIBRATION_H + +#include "motion_sense.h" + +/** + * Initialize the online calibration caches. + */ +void online_calibration_init(void); + +/** + * Process a new data measurement from a given sensor. + * + * @param data Pointer to the data that should be processed. + * @param sensor Pointer to the sensor that generated the data. + * @param timestamp The time associated with the sample + * @return EC_SUCCESS when successful. + */ +int online_calibration_process_data( + struct ec_response_motion_sensor_data *data, + struct motion_sensor_t *sensor, + uint32_t timestamp); + +#endif /* __CROS_EC_ONLINE_CALIBRATION_H */ |