Set battery charging thresholds in common.mk

Battery threshold control is entirely software-defined and does not
depend on any board-specific behavior.
This commit is contained in:
Tim Crawford
2021-05-14 10:41:01 -06:00
committed by Jeremy Soller
parent 285d622fbc
commit 76e02c9514
14 changed files with 5 additions and 65 deletions

View File

@@ -24,6 +24,11 @@ SRC+=$(wildcard $(SYSTEM76_COMMON_DIR)/*.c)
INCLUDE+=$(wildcard $(SYSTEM76_COMMON_DIR)/include/common/*.h) $(SYSTEM76_COMMON_DIR)/common.mk
CFLAGS+=-I$(SYSTEM76_COMMON_DIR)/include
# Set battery charging thresholds
CFLAGS+=\
-DBATTERY_START_THRESHOLD=0 \
-DBATTERY_END_THRESHOLD=100
# Add charger
CHARGER?=bq24780s
SRC+=$(SYSTEM76_COMMON_DIR)/charger/$(CHARGER).c