diff options
author | Xelus22 <17491233+Xelus22@users.noreply.github.com> | 2021-08-24 16:28:26 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 16:28:26 +1000 |
commit | 4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 (patch) | |
tree | 24ff5bdf570a6a9f5a77a517005bffbb35e46b22 /common_features.mk | |
parent | 6fd20acf4be76e7a2bd82d3dfd0a9bcca8c507eb (diff) | |
download | qmk_firmware-4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0.tar.gz qmk_firmware-4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0.zip |
[Core] Refactor OLED to allow easy addition of other types (#13454)
* add docs
* core changes
* update keyboards to new OLED
* updated users to new OLED
* update layouts to new OLED
* fixup docs
* drashna's suggestion
* fix up docs
* new keyboards with oled
* core split changes
* remaining keyboard files
* Fix The Helix keyboards oled options
* reflect develop
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 20 |
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 |
593 | endif | 593 | endif |
594 | 594 | ||
595 | ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | 595 | VALID_OLED_DRIVER_TYPES := SSD1306 custom |
596 | OPT_DEFS += -DOLED_DRIVER_ENABLE | 596 | OLED_DRIVER ?= SSD1306 |
597 | COMMON_VPATH += $(DRIVER_PATH)/oled | 597 | ifeq ($(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 | ||
600 | endif | 610 | endif |
601 | 611 | ||
602 | ifeq ($(strip $(ST7565_ENABLE)), yes) | 612 | ifeq ($(strip $(ST7565_ENABLE)), yes) |