summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-08-06 13:18:02 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-21 18:48:30 +0000
commitdd46fdb485a9cdb82ae733e4cec2320931e78dbc (patch)
tree9b6e38ce3058b0575dc8d9eb80ad1b416d8c2cda /common
parent1418bf3629b9fb767fca0a72455659bf46f06498 (diff)
downloadchrome-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')
-rw-r--r--common/battery.c1
-rw-r--r--common/build.mk2
2 files changed, 2 insertions, 1 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"
diff --git a/common/build.mk b/common/build.mk
index caed246a74..7c505c066f 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -43,7 +43,7 @@ common-$(CONFIG_BACKLIGHT_LID)+=backlight_lid.o
common-$(CONFIG_BASE32)+=base32.o
common-$(CONFIG_BLINK)+=blink.o
common-$(CONFIG_DETACHABLE_BASE)+=base_state.o
-common-$(CONFIG_BATTERY)+=battery.o
+common-$(CONFIG_BATTERY)+=battery.o math_util.o
common-$(CONFIG_BATTERY_FUEL_GAUGE)+=battery_fuel_gauge.o
common-$(CONFIG_BLUETOOTH_LE)+=bluetooth_le.o
common-$(CONFIG_BLUETOOTH_LE_STACK)+=btle_hci_controller.o btle_ll.o