make: Add config for each ITE EC

EC_VARIANT is only used on AVR as a parameter to avrdude.

Replace its use on ITE with 2 choices:

- CONFIG_EC_ITE_IT8587E
- CONFIG_EC_ITE_IT5570E

Replace the EC defines with a matching define for the variable.
This commit is contained in:
Tim Crawford
2022-10-17 10:12:06 -06:00
committed by Tim Crawford
parent ac9631f948
commit 861f1f2cc8
35 changed files with 44 additions and 42 deletions

View File

@@ -43,7 +43,7 @@ SRC += $(foreach src, $(keyboard-y), $(KEYBOARD_DIR)/$(src))
# Include the embedded controller's source
EC_DIR=src/ec/$(EC)
INCLUDE+=$(wildcard $(EC_DIR)/include/ec/*.h) $(EC_DIR)/ec.mk
CFLAGS+=-I$(EC_DIR)/include -D__EC__=$(EC_VARIANT) -D$(EC_VARIANT)
CFLAGS+=-I$(EC_DIR)/include
include $(EC_DIR)/ec.mk
SRC += $(foreach src, $(ec-y), $(EC_DIR)/$(src))