added waveshare 22224 display module vik support

This commit is contained in:
Sadek Baroudi 2023-10-29 18:54:05 -07:00
parent f89e539eca
commit 0bb20d982b
7 changed files with 75 additions and 1 deletions

View File

@ -27,6 +27,10 @@
#include "keyboards/fingerpunch/src/display/gc9a01.h"
#endif
#ifdef VIK_WAVESHARE_22224
#include "keyboards/fingerpunch/src/display/waveshare_22224.h"
#endif
extern painter_device_t fp_qp_disp_device;
void fp_post_init_qp(void) {

View File

@ -0,0 +1,28 @@
/* Copyright 2023 Sadek Baroudi
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keyboards/fingerpunch/src/display/fp_display.h"
#include "keyboards/fingerpunch/src/display/waveshare_22224.h"
#ifdef QUANTUM_PAINTER_ENABLE
#include "qp.h"
painter_device_t fp_qp_disp_device;
void fp_qp_init_display(void) {
fp_qp_disp_device = qp_st7789_make_spi_device(FP_QP_DISPLAY_WIDTH, FP_QP_DISPLAY_HEIGHT, DISPLAY_CS_PIN, DISPLAY_DC_PIN, DISPLAY_RST_PIN, 8, 3);
}
#endif

View File

@ -0,0 +1,18 @@
/* Copyright 2023 Sadek Baroudi
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define FP_QP_DISPLAY_WIDTH 200
#define FP_QP_DISPLAY_HEIGHT 320

View File

@ -129,3 +129,15 @@
// To dynamically control the backlight with BL_TOGG keycode
#define DISPLAY_RST_PIN VIK_GPIO_2
#endif
#ifdef VIK_WAVESHARE_22224
// /* LCD config */
#define DISPLAY_CS_PIN VIK_SPI_CS
#define DISPLAY_DC_PIN VIK_GPIO_1
// To dynamically control the backlight with BL_TOGG keycode
#define BACKLIGHT_PIN VIK_GPIO_2
// Must be defined by the keyboard itself, needs a free unused pin for reset
#define DISPLAY_RST_PIN VIK_ST7735_UNUSED_PIN
#endif

View File

@ -9,6 +9,7 @@
# VIK_PMW3360
# VIK_WEACT_ST7735
# VIK_VIK_GC9A01
# VIK_WAVESHARE_22224
ifeq ($(strip $(VIK_HAPTIC)), yes)
HAPTIC_ENABLE = yes
@ -56,6 +57,15 @@ ifeq ($(strip $(VIK_GC9A01)), yes)
OPT_DEFS += -DVIK_GC9A01
endif
ifeq ($(strip $(VIK_WAVESHARE_22224)), yes)
QUANTUM_PAINTER_ENABLE = yes
QUANTUM_PAINTER_DRIVERS += st7789_spi
QUANTUM_PAINTER_LVGL_INTEGRATION = yes
SRC += keyboards/fingerpunch/src/display/waveshare_22224.c
# WPM_ENABLE = yes
OPT_DEFS += -DVIK_WAVESHARE_22224
endif
ifeq ($(strip $(PMW3360_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pmw3360

View File

@ -7,8 +7,9 @@
"VIK_PMW3360",
"VIK_WEACT_ST7735",
"VIK_GC9A01",
"VIK_WAVESHARE_22224",
"VIK_HAPTIC"
],
"user_input": "Which VIK module are you testing? NONE, VIK_PER56_CIRQUE_LEDS, VIK_PER56_PMW3360_LEDS, VIK_PMW3360, VIK_WEACT_ST7735, VIK_GC9A01, VIK_HAPTIC"
"user_input": "Which VIK module are you testing? NONE, VIK_PER56_CIRQUE_LEDS, VIK_PER56_PMW3360_LEDS, VIK_PMW3360, VIK_WEACT_ST7735, VIK_GC9A01, VIK_WAVESHARE_22224, VIK_HAPTIC"
}
]

View File

@ -28,6 +28,7 @@ Options are:
VIK_PMW3360=yes
VIK_WEACT_ST7735=yes
VIK_GC9A01=yes
VIK_WAVESHARE_22224=yes
VIK_HAPTIC=yes
```