summaryrefslogtreecommitdiff
path: root/common/battery_wolf.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/battery_wolf.c')
-rw-r--r--common/battery_wolf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/battery_wolf.c b/common/battery_wolf.c
index b9fb590092..4eb0966950 100644
--- a/common/battery_wolf.c
+++ b/common/battery_wolf.c
@@ -6,6 +6,7 @@
*/
#include "battery_pack.h"
+#include "gpio.h"
const struct battery_temperature_ranges bat_temp_ranges = {
.start_charging_min_c = 0,
@@ -38,3 +39,8 @@ void battery_vendor_params(struct batt_params *batt)
{
}
+int battery_is_connected(void)
+{
+ return (gpio_get_level(GPIO_BAT_DETECT_L) == 0);
+}
+