summaryrefslogtreecommitdiff
path: root/include/battery.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/battery.h')
-rw-r--r--include/battery.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/battery.h b/include/battery.h
index b783432ded..a97745b794 100644
--- a/include/battery.h
+++ b/include/battery.h
@@ -13,8 +13,9 @@
/* Battery index, only used with CONFIG_BATTERY_V2. */
enum battery_index {
- BATT_IDX_MAIN,
- BATT_IDX_BASE,
+ BATT_IDX_INVALID = -1,
+ BATT_IDX_MAIN = 0,
+ BATT_IDX_BASE = 1,
};
#ifdef CONFIG_BATTERY_V2
@@ -377,6 +378,19 @@ void print_battery_debug(void);
*/
enum battery_disconnect_state battery_get_disconnect_state(void);
+#ifdef CONFIG_BATTERY_V2
+/**
+ * Refresh battery information in host memory mapped region, if index is
+ * currently presented.
+ */
+void battery_memmap_refresh(enum battery_index index);
+
+/**
+ * Set which index to present in host memory mapped region.
+ */
+void battery_memmap_set_index(enum battery_index index);
+#endif /* CONFIG_BATTERY_V2 */
+
#ifdef CONFIG_CMD_I2C_STRESS_TEST_BATTERY
extern struct i2c_stress_test_dev battery_i2c_stress_test_dev;
#endif