Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Mono2 and SSD drivers #11

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
80a3067
Add Quantum Painter, including support for ILI9341/9488.
tzarc Aug 26, 2020
5aff095
Adding implementation of angled lines (#3)
Gr1mR3aver Jan 3, 2021
f4eb5e0
Fix compilation.
tzarc Jan 3, 2021
c17d22b
adding implementation for drawing circles. (#6)
Gr1mR3aver Jan 21, 2021
0400ace
Linkages for circles/ellipses. Fixup line/circle/ellipse algorithms d…
tzarc Jan 21, 2021
f6c8827
Fix typos.
tzarc Jan 21, 2021
ea7add7
More casting and safety checks.
tzarc Jan 21, 2021
b704c59
Start working on QMK CLI command stuff. Disable LZF compression for AVR.
tzarc Jan 23, 2021
cbf5ff7
Add majority of other image conversion code.
tzarc Jan 24, 2021
532ac46
Cleanup.
tzarc Jan 24, 2021
e20229c
Add initial support for wrapping QMK OLED driver -- no pixdata yet.
tzarc Jan 25, 2021
a3cae20
Viewport and pixdata.
tzarc Jan 25, 2021
872a918
Default compression chunk size.
tzarc Jan 25, 2021
a562aaf
Fixup rotation on OLED wrapper.
tzarc Jan 25, 2021
611ec24
Abstract out chunk decoder to common implementation.
tzarc Jan 26, 2021
dc4d159
Fixup output text based on last chunk size.
tzarc Jan 26, 2021
0ab8a9e
Simplification of decoding callback.
tzarc Jan 26, 2021
f791e27
Add prereqs to CLI CI build, in prep to add to qmk base container.
tzarc Jan 26, 2021
8d33c81
Python formatting.
tzarc Jan 26, 2021
91ea08a
Remove compression code.
tzarc Jan 27, 2021
13caf32
Rollback CI change.
tzarc Jan 27, 2021
0961619
Add RGB565 surface for composition before streaming to LCD.
tzarc Jan 27, 2021
1f32cd2
qmk cformat
tzarc Jan 27, 2021
9376980
Fixup boundary checks for native images.
tzarc Jan 27, 2021
7760884
Font image generator for ASCII charset.
tzarc Jan 27, 2021
3974dcd
Enforce memory allocator when using surface.
tzarc Jan 27, 2021
4ecd78b
Fixup compilation failure.
tzarc Jan 28, 2021
79d087c
Normalise the glyph list generation, misc cleanup.
tzarc Jan 28, 2021
20e04df
Start on font image conversion.
tzarc Jan 28, 2021
41ef28b
Fixup palette generation.
tzarc Jan 29, 2021
856813c
Generate font source.
tzarc Jan 29, 2021
129bd73
OLED font rendering.
tzarc Jan 29, 2021
c4f018c
Allow for disabling ascii/unicode glyphs.
tzarc Jan 29, 2021
1b0565c
QP_Painter: Allow users to configure brightness. (#7)
M1Sports20 Jan 31, 2021
0c62bdb
Add brightness to header file (#9)
M1Sports20 Feb 1, 2021
00b07fa
Safety checks and cleanup/cformat.
tzarc Feb 2, 2021
65188d8
Fix bug when checking if device has been allocated (#10)
M1Sports20 Feb 3, 2021
ccc43f9
Normalise removal of memset calls. Initialisation cleanup.
tzarc Feb 3, 2021
637c426
Add font support for LCDs, measuring font string widths, removed ILI9…
tzarc Feb 15, 2021
93368b5
Return text length for text rendering functions, remove rgb565 surfac…
tzarc Feb 15, 2021
9f1111f
Cleanup. Americanization.
tzarc Feb 15, 2021
1660c25
Allow specifying output directory for image conversion.
tzarc Feb 15, 2021
a8966e1
Add flush command to painter
M1Sports20 Feb 3, 2021
c403b63
Add support for a framebuffer for 1bpp devices.
M1Sports20 Feb 3, 2021
be869ff
Add support for SSD OLED driver
M1Sports20 Feb 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def _check_modules(requirements):
# Not every module is importable by its own name.
if module['name'] == "pep8-naming":
module['import'] = "pep8ext_naming"
if module['name'] == "pillow":
module['import'] = "PIL"

if not find_spec(module['import']):
print('Could not find module %s!' % module['name'])
Expand Down
63 changes: 61 additions & 2 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,64 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/pointing_device.c
endif

QUANTUM_PAINTER_ENABLE ?= no
VALID_QUANTUM_PAINTER_DRIVERS := mono2_surface qmk_oled_wrapper ili9341 ssd
QUANTUM_PAINTER_DRIVERS ?=
ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes)
OPT_DEFS += -DQUANTUM_PAINTER_ENABLE
COMMON_VPATH += \
$(QUANTUM_DIR)/painter \
$(DRIVER_PATH)/painter/fallback
SRC += \
$(QUANTUM_DIR)/utf8.c \
$(QUANTUM_DIR)/painter/qp.c \
$(QUANTUM_DIR)/painter/qp_utils.c \
$(DRIVER_PATH)/painter/fallback/qp_fallback.c

define handle_quantum_painter_driver
CURRENT_PAINTER_DRIVER := $1
ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),mono2_surface)
OPT_DEFS += -DQUANTUM_PAINTER_MONO2_SURFACE_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/painter/mono2_surface
SRC += $(DRIVER_PATH)/painter/mono2_surface/qp_mono2_surface.c
else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),qmk_oled_wrapper)
OPT_DEFS += -DQUANTUM_PAINTER_QMK_OLED_WRAPPER_ENABLE
OLED_DRIVER_ENABLE = yes
COMMON_VPATH += $(DRIVER_PATH)/painter/qmk_oled_wrapper
SRC += $(DRIVER_PATH)/painter/qmk_oled_wrapper/qp_qmk_oled_wrapper.c
else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),ili9341)
OPT_DEFS += -DQUANTUM_PAINTER_ILI9341_ENABLE
COMMON_VPATH += \
$(DRIVER_PATH)/painter/ili9xxx_common \
$(DRIVER_PATH)/painter/ili9341
SRC += \
$(DRIVER_PATH)/painter/ili9xxx_common/qp_ili9xxx.c \
$(DRIVER_PATH)/painter/ili9341/qp_ili9341.c
else ifeq ($$(strip $$(CURRENT_PAINTER_DRIVER)),ssd)
OPT_DEFS += -DQUANTUM_PAINTER_SSD_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/painter/ssd
SRC += $(DRIVER_PATH)/painter/ssd/qp_ssd.c
else
$$(error "$$(CURRENT_PAINTER_DRIVER)" is not a valid quantum painter driver)
endif
endef
$(foreach qp_driver,$(QUANTUM_PAINTER_DRIVERS),$(eval $(call handle_quantum_painter_driver,$(qp_driver))))

define handle_quantum_painter_bus
CURRENT_PAINTER_BUS := $1
ifeq ($$(strip $$(CURRENT_PAINTER_BUS)),i2c)
OPT_DEFS += -DQUANTUM_PAINTER_BUS_I2C
QUANTUM_LIB_SRC += i2c_master.c
else ifeq ($$(strip $$(CURRENT_PAINTER_BUS)),spi)
OPT_DEFS += -DQUANTUM_PAINTER_BUS_SPI
QUANTUM_LIB_SRC += spi_master.c
else
$$(error "$$(CURRENT_PAINTER_BUS)" is not a valid quantum painter communication bus)
endif
endef
$(foreach qp_bus,$(QUANTUM_PAINTER_BUSES),$(eval $(call handle_quantum_painter_bus,$(qp_bus))))
endif

VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
Expand Down Expand Up @@ -580,7 +638,8 @@ ifeq ($(strip $(UNICODE_ENABLE)), yes)
endif

ifeq ($(strip $(UNICODE_COMMON)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \
$(QUANTUM_DIR)/utf8.c
endif

SPACE_CADET_ENABLE ?= yes
Expand Down Expand Up @@ -672,4 +731,4 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
# Board designers can add their own driver to $(SRC)
endif
endif
endif
endif
Loading