summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/blaze/board.c9
-rw-r--r--board/blaze/board.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/board/blaze/board.c b/board/blaze/board.c
index c46161a7bc..b7978013c7 100644
--- a/board/blaze/board.c
+++ b/board/blaze/board.c
@@ -22,6 +22,7 @@
#include "task.h"
#include "util.h"
#include "timer.h"
+#include "charger.h"
#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH)
#define GPIO_KB_OUTPUT GPIO_ODR_HIGH
@@ -117,3 +118,11 @@ const struct pwm_t pwm_channels[] = {
PWM_CONFIG_ACTIVE_LOW, GPIO_LED_POWER_L},
};
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
+
+/**
+ * Discharge battery when on AC power for factory test.
+ */
+int board_discharge_on_ac(int enable)
+{
+ return charger_discharge_on_ac(enable);
+}
diff --git a/board/blaze/board.h b/board/blaze/board.h
index f6c23dfe74..3a4fdcff5e 100644
--- a/board/blaze/board.h
+++ b/board/blaze/board.h
@@ -25,6 +25,7 @@
#define CONFIG_POWER_BUTTON
#define CONFIG_VBOOT_HASH
#define CONFIG_LED_COMMON
+#define CONFIG_CHARGER_DISCHARGE_ON_AC
#ifndef __ASSEMBLER__
@@ -116,6 +117,9 @@ enum pwm_channel {
#define CONFIG_CHARGER_INPUT_CURRENT 4032 /* mA, based on Link HW design */
#define CONFIG_CHARGER_CURRENT_LIMIT 3000 /* PL102 inductor 3.0A(3.8A) */
+/* Discharge battery when on AC power for factory test. */
+int board_discharge_on_ac(int enable);
+
#endif /* !__ASSEMBLER__ */
#endif /* __BOARD_H */