aboutsummaryrefslogtreecommitdiff
path: root/quantum/painter
diff options
context:
space:
mode:
authorFernando Birra <[email protected]>2024-06-04 23:41:26 +0100
committerGitHub <[email protected]>2024-06-05 08:41:26 +1000
commita82b0628b399c35bcdf70f14cabfa0bb27f86af8 (patch)
tree49c0378a5cd7ca6bb9ad0c601ef8aaa4c5db190c /quantum/painter
parent75d11e04215edc43eeef71756a23d7f46e66c459 (diff)
downloadqmk_firmware-a82b0628b399c35bcdf70f14cabfa0bb27f86af8.tar.gz
qmk_firmware-a82b0628b399c35bcdf70f14cabfa0bb27f86af8.zip
GC9xxx LCD family drivers (GC9107 and GC9A01) (#23091)
Co-authored-by: Nick Brassel <[email protected]> Co-authored-by: jack <[email protected]> Co-authored-by: Joel Challis <[email protected]> Co-authored-by: フィルターペーパー <[email protected]> Co-authored-by: rookiebwoy <[email protected]> Fixup boardsource/equals (#23106) Fix make clean test:os_detection (#23112) Fix make clean test:os_detection (#23112)" Fixup boardsource/equals (#23106)"
Diffstat (limited to 'quantum/painter')
-rw-r--r--quantum/painter/qp.h6
-rw-r--r--quantum/painter/qp_internal.c1
-rw-r--r--quantum/painter/rules.mk16
3 files changed, 21 insertions, 2 deletions
diff --git a/quantum/painter/qp.h b/quantum/painter/qp.h
index 02acbf589a..820c418f43 100644
--- a/quantum/painter/qp.h
+++ b/quantum/painter/qp.h
@@ -539,6 +539,12 @@ int16_t qp_drawtext_recolor(painter_device_t device, uint16_t x, uint16_t y, pai
# define GC9A01_NUM_DEVICES 0
#endif // QUANTUM_PAINTER_GC9A01_ENABLE
+#ifdef QUANTUM_PAINTER_GC9107_ENABLE
+# include "qp_gc9107.h"
+#else // QUANTUM_PAINTER_GC9107_ENABLE
+# define GC9107_NUM_DEVICES 0
+#endif // QUANTUM_PAINTER_GC9107_ENABLE
+
#ifdef QUANTUM_PAINTER_SSD1351_ENABLE
# include "qp_ssd1351.h"
#else // QUANTUM_PAINTER_SSD1351_ENABLE
diff --git a/quantum/painter/qp_internal.c b/quantum/painter/qp_internal.c
index 1f0f981796..7d4a6430af 100644
--- a/quantum/painter/qp_internal.c
+++ b/quantum/painter/qp_internal.c
@@ -16,6 +16,7 @@ enum {
+ (ST7789_NUM_DEVICES) // ST7789
+ (ST7735_NUM_DEVICES) // ST7735
+ (GC9A01_NUM_DEVICES) // GC9A01
+ + (GC9107_NUM_DEVICES) // GC9107
+ (SSD1351_NUM_DEVICES) // SSD1351
+ (SH1106_NUM_DEVICES) // SH1106
};
diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk
index d991a6d742..7b2ab702ee 100644
--- a/quantum/painter/rules.mk
+++ b/quantum/painter/rules.mk
@@ -14,6 +14,7 @@ VALID_QUANTUM_PAINTER_DRIVERS := \
st7735_spi \
st7789_spi \
gc9a01_spi \
+ gc9107_spi \
ssd1351_spi \
sh1106_i2c \
sh1106_spi
@@ -131,10 +132,21 @@ define handle_quantum_painter_driver
OPT_DEFS += -DQUANTUM_PAINTER_GC9A01_ENABLE -DQUANTUM_PAINTER_GC9A01_SPI_ENABLE
COMMON_VPATH += \
$(DRIVER_PATH)/painter/tft_panel \
- $(DRIVER_PATH)/painter/gc9a01
+ $(DRIVER_PATH)/painter/gc9xxx
SRC += \
$(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \
- $(DRIVER_PATH)/painter/gc9a01/qp_gc9a01.c
+ $(DRIVER_PATH)/painter/gc9xxx/qp_gc9a01.c
+
+ else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),gc9107_spi)
+ QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes
+ QUANTUM_PAINTER_NEEDS_COMMS_SPI_DC_RESET := yes
+ OPT_DEFS += -DQUANTUM_PAINTER_GC9107_ENABLE -DQUANTUM_PAINTER_GC9107_SPI_ENABLE
+ COMMON_VPATH += \
+ $(DRIVER_PATH)/painter/tft_panel \
+ $(DRIVER_PATH)/painter/gc9xxx
+ SRC += \
+ $(DRIVER_PATH)/painter/tft_panel/qp_tft_panel.c \
+ $(DRIVER_PATH)/painter/gc9xxx/qp_gc9107.c
else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),ssd1351_spi)
QUANTUM_PAINTER_NEEDS_COMMS_SPI := yes