diff options
author | Rob Barnes <robbarnes@google.com> | 2021-08-06 13:18:02 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-21 18:48:30 +0000 |
commit | dd46fdb485a9cdb82ae733e4cec2320931e78dbc (patch) | |
tree | 9b6e38ce3058b0575dc8d9eb80ad1b416d8c2cda /common/battery.c | |
parent | 1418bf3629b9fb767fca0a72455659bf46f06498 (diff) | |
download | chrome-ec-dd46fdb485a9cdb82ae733e4cec2320931e78dbc.tar.gz |
common: Add Milli Kelvin conversion macros
Add macros to convert to and from milli kelvin and various temperature
units. Utilize round_divide for more accurate conversions.
BUG=b:176994331
TEST=Unit test
BRANCH=None
Change-Id: Ie6750b9d2d2b8093fdf9c14f904382e91d8d95bb
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078051
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/battery.c')
-rw-r--r-- | common/battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/battery.c b/common/battery.c index c24bf59da9..6791e4d3a2 100644 --- a/common/battery.c +++ b/common/battery.c @@ -15,6 +15,7 @@ #include "gpio.h" #include "hooks.h" #include "host_command.h" +#include "math_util.h" #include "timer.h" #include "usb_pd.h" #include "util.h" |