aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk20
1 files changed, 15 insertions, 5 deletions
diff --git a/common_features.mk b/common_features.mk
index 3acc5307a..c92f98ab7 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -592,11 +592,21 @@ ifeq ($(strip $(HD44780_ENABLE)), yes)
592 OPT_DEFS += -DHD44780_ENABLE 592 OPT_DEFS += -DHD44780_ENABLE
593endif 593endif
594 594
595ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) 595VALID_OLED_DRIVER_TYPES := SSD1306 custom
596 OPT_DEFS += -DOLED_DRIVER_ENABLE 596OLED_DRIVER ?= SSD1306
597 COMMON_VPATH += $(DRIVER_PATH)/oled 597ifeq ($(strip $(OLED_ENABLE)), yes)
598 QUANTUM_LIB_SRC += i2c_master.c 598 ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),)
599 SRC += oled_driver.c 599 $(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver)
600 else
601 OPT_DEFS += -DOLED_ENABLE
602 COMMON_VPATH += $(DRIVER_PATH)/oled
603
604 OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
605 ifeq ($(strip $(OLED_DRIVER)), SSD1306)
606 SRC += ssd1306_sh1106.c
607 QUANTUM_LIB_SRC += i2c_master.c
608 endif
609 endif
600endif 610endif
601 611
602ifeq ($(strip $(ST7565_ENABLE)), yes) 612ifeq ($(strip $(ST7565_ENABLE)), yes)