aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-06-16 20:56:14 -0600
committerJack Sangdahl <[email protected]>2025-06-16 20:56:14 -0600
commitdc6df5805b9e23fe7c023818a0a21eaa335e353a (patch)
tree0f4a78bcde279a9e79dd4c76f9015572e44c206f
parentb0c6852154b3060b639e8d7d87d16d17bd4dfcc4 (diff)
downloadqmk_me-dc6df5805b9e23fe7c023818a0a21eaa335e353a.tar.gz
qmk_me-dc6df5805b9e23fe7c023818a0a21eaa335e353a.zip
Update Sweep firmware for v2.0.0 PCBs
-rw-r--r--keyboards/sweep/config.h34
-rw-r--r--keyboards/sweep/halconf.h3
-rw-r--r--keyboards/sweep/keyboard.json273
-rw-r--r--keyboards/sweep/keymaps/jack/keymap.c43
-rw-r--r--keyboards/sweep/mcuconf.h7
-rw-r--r--keyboards/sweep/readme.md8
-rw-r--r--keyboards/sweep/rules.mk6
-rw-r--r--keyboards/sweep/sweep.c21
8 files changed, 211 insertions, 184 deletions
diff --git a/keyboards/sweep/config.h b/keyboards/sweep/config.h
index 51edc09..a172b9d 100644
--- a/keyboards/sweep/config.h
+++ b/keyboards/sweep/config.h
@@ -8,32 +8,22 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
-#ifdef HAL_USE_SPI
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP6
#define SPI_MOSI_PIN GP3
-#define SPI_MISO_PIN GP5
-#endif
+#define SPI_MISO_PIN GP4
-#ifdef QUANTUM_PAINTER_ENABLE
-#define LS0XX_CS_PIN GP7
-#define LS0XX_DISPLAY_HEIGHT 160
-#define LS0XX_DISPLAY_WIDTH 68
+#define LCD_CS_PIN GP5
+#define LCD_DC_PIN GP6
+#define LCD_RST_PIN GP28
+#define LCD_DISPLAY_WIDTH 135
+#define LCD_DISPLAY_HEIGHT 240
#define LCD_SPI_DIVISOR 4
-#endif
-#ifdef POINTING_DEVICE_ENABLE
-#define POINTING_DEVICE_CS_PIN GP4
-#define CIRQUE_PINNACLE_CURVED_OVERLAY
-#define CIRQUE_PINNACLE_TAP_ENABLE
-#define CIRQUE_PINNACLE_SECONDARY_TAP_ENABLE
-#define CIRQUE_PINNACLE_DIAMETER_MM 35
-#define SPLIT_POINTING_ENABLE
-#define POINTING_DEVICE_RIGHT
-#endif
+#define BACKLIGHT_PWM_DRIVER PWMD3
+#define BACKLIGHT_PWM_CHANNEL 2
-#ifdef HAL_USE_I2C
-#define I2C_DRIVER I2CD1
-#define I2C1_SDA_PIN GP3
-#define I2C1_SCL_PIN GP6
-#endif
+#define ADC_RESOLUTION 12
+#define ADC_SATURATION ((1 << 12) - 1)
+#define ADC_CURRENT_PIN GP26
+#define ADC_VOLTAGE_PIN GP27
diff --git a/keyboards/sweep/halconf.h b/keyboards/sweep/halconf.h
index a6c11ab..f47c7d4 100644
--- a/keyboards/sweep/halconf.h
+++ b/keyboards/sweep/halconf.h
@@ -2,7 +2,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
+#define HAL_USE_ADC TRUE
#define HAL_USE_SPI TRUE
-#define HAL_USE_I2C FALSE
+#define HAL_USE_PWM TRUE
#include_next <halconf.h>
diff --git a/keyboards/sweep/keyboard.json b/keyboards/sweep/keyboard.json
index d625fc9..2e7ef33 100644
--- a/keyboards/sweep/keyboard.json
+++ b/keyboards/sweep/keyboard.json
@@ -1,143 +1,146 @@
{
- "manufacturer": "pngu.org",
- "keyboard_name": "sweep",
- "maintainer": "jack",
- "bootloader": "rp2040",
- "features": {
- "bootmagic": true,
- "oled": false,
- "pointing_device": true,
- "quantum_painter": true,
- "rgb_matrix": true
+ "manufacturer": "pngu.org",
+ "keyboard_name": "sweep",
+ "maintainer": "jack",
+ "bootloader": "rp2040",
+ "features": {
+ "backlight": true,
+ "bootmagic": true,
+ "quantum_painter": true,
+ "rgb_matrix": true
+ },
+ "backlight": {
+ "pin": "GP7"
+ },
+ "matrix_pins": {
+ "direct": [
+ ["GP18", "GP13", "GP12", "GP24", "GP22"],
+ ["GP16", "GP14", "GP10", "GP25", "GP21"],
+ ["GP17", "GP15", "GP11", "GP9", "GP23"],
+ [null, null, null, "GP19", "GP20"]
+ ]
+ },
+ "processor": "RP2040",
+ "rgb_matrix": {
+ "driver": "ws2812",
+ "layout": [
+ { "matrix": [3, 3], "x": 71, "y": 60, "flags": 4 },
+ { "matrix": [3, 4], "x": 92, "y": 64, "flags": 4 },
+ { "matrix": [2, 4], "x": 81, "y": 39, "flags": 4 },
+ { "matrix": [2, 3], "x": 61, "y": 36, "flags": 4 },
+ { "matrix": [2, 2], "x": 41, "y": 32, "flags": 4 },
+ { "matrix": [2, 1], "x": 20, "y": 37, "flags": 4 },
+ { "matrix": [2, 0], "x": 0, "y": 47, "flags": 4 },
+ { "matrix": [1, 0], "x": 0, "y": 31, "flags": 4 },
+ { "matrix": [1, 1], "x": 20, "y": 21, "flags": 4 },
+ { "matrix": [1, 2], "x": 41, "y": 16, "flags": 4 },
+ { "matrix": [1, 3], "x": 61, "y": 20, "flags": 4 },
+ { "matrix": [1, 4], "x": 81, "y": 23, "flags": 4 },
+ { "matrix": [0, 4], "x": 81, "y": 7, "flags": 4 },
+ { "matrix": [0, 3], "x": 61, "y": 4, "flags": 4 },
+ { "matrix": [0, 2], "x": 41, "y": 0, "flags": 4 },
+ { "matrix": [0, 1], "x": 20, "y": 5, "flags": 4 },
+ { "matrix": [0, 0], "x": 0, "y": 15, "flags": 4 },
+ { "x": 10, "y": 14, "flags": 2 },
+ { "x": 71, "y": 6, "flags": 2 },
+ { "x": 83, "y": 56, "flags": 2 },
+ { "x": 10, "y": 45, "flags": 2 },
+ { "matrix": [7, 1], "x": 132, "y": 64, "flags": 4 },
+ { "matrix": [7, 0], "x": 153, "y": 60, "flags": 4 },
+ { "matrix": [6, 0], "x": 143, "y": 39, "flags": 4 },
+ { "matrix": [6, 1], "x": 163, "y": 36, "flags": 4 },
+ { "matrix": [6, 2], "x": 183, "y": 32, "flags": 4 },
+ { "matrix": [6, 3], "x": 204, "y": 37, "flags": 4 },
+ { "matrix": [6, 4], "x": 224, "y": 47, "flags": 4 },
+ { "matrix": [5, 4], "x": 224, "y": 31, "flags": 4 },
+ { "matrix": [5, 3], "x": 204, "y": 21, "flags": 4 },
+ { "matrix": [5, 2], "x": 183, "y": 16, "flags": 4 },
+ { "matrix": [5, 1], "x": 163, "y": 20, "flags": 4 },
+ { "matrix": [5, 0], "x": 143, "y": 23, "flags": 4 },
+ { "matrix": [4, 0], "x": 143, "y": 7, "flags": 4 },
+ { "matrix": [4, 1], "x": 163, "y": 4, "flags": 4 },
+ { "matrix": [4, 2], "x": 183, "y": 0, "flags": 4 },
+ { "matrix": [4, 3], "x": 204, "y": 5, "flags": 4 },
+ { "matrix": [4, 4], "x": 224, "y": 15, "flags": 4 },
+ { "x": 214, "y": 14, "flags": 2 },
+ { "x": 153, "y": 6, "flags": 2 },
+ { "x": 144, "y": 56, "flags": 2 },
+ { "x": 214, "y": 45, "flags": 2 }
+ ],
+ "split_count": [21, 21],
+ "sleep": true
+ },
+ "split": {
+ "enabled": true,
+ "handedness": {
+ "pin": "GP8"
},
"matrix_pins": {
+ "right": {
"direct": [
- ["GP18", "GP13", "GP12", "GP24", "GP22"],
- ["GP16", "GP14", "GP10", "GP25", "GP21"],
- ["GP17", "GP15", "GP11", "GP9", "GP23"],
- [null, null, null, "GP19", "GP20"]
+ ["GP25", "GP21", "GP17", "GP16", "GP13"],
+ ["GP24", "GP20", "GP18", "GP15", "GP12"],
+ ["GP22", "GP23", "GP19", "GP14", "GP11"],
+ ["GP10", "GP9", null, null, null]
]
+ }
},
- "processor": "RP2040",
- "rgb_matrix": {
- "driver": "ws2812",
- "layout": [
- {"matrix": [3, 3], "x": 71, "y": 60, "flags": 4},
- {"matrix": [3, 4], "x": 92, "y": 64, "flags": 4},
- {"matrix": [2, 4], "x": 81, "y": 39, "flags": 4},
- {"matrix": [2, 3], "x": 61, "y": 36, "flags": 4},
- {"matrix": [2, 2], "x": 41, "y": 32, "flags": 4},
- {"matrix": [2, 1], "x": 20, "y": 37, "flags": 4},
- {"matrix": [2, 0], "x": 0, "y": 47, "flags": 4},
- {"matrix": [1, 0], "x": 0, "y": 31, "flags": 4},
- {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4},
- {"matrix": [1, 2], "x": 41, "y": 16, "flags": 4},
- {"matrix": [1, 3], "x": 61, "y": 20, "flags": 4},
- {"matrix": [1, 4], "x": 81, "y": 23, "flags": 4},
- {"matrix": [0, 4], "x": 81, "y": 7, "flags": 4},
- {"matrix": [0, 3], "x": 61, "y": 4, "flags": 4},
- {"matrix": [0, 2], "x": 41, "y": 0, "flags": 4},
- {"matrix": [0, 1], "x": 20, "y": 5, "flags": 4},
- {"matrix": [0, 0], "x": 0, "y": 15, "flags": 4},
- {"x": 10, "y": 14, "flags": 2},
- {"x": 71, "y": 6, "flags": 2},
- {"x": 83, "y": 56, "flags": 2},
- {"x": 10, "y": 45, "flags": 2},
- {"matrix": [7, 1], "x": 132, "y": 64, "flags": 4},
- {"matrix": [7, 0], "x": 153, "y": 60, "flags": 4},
- {"matrix": [6, 0], "x": 143, "y": 39, "flags": 4},
- {"matrix": [6, 1], "x": 163, "y": 36, "flags": 4},
- {"matrix": [6, 2], "x": 183, "y": 32, "flags": 4},
- {"matrix": [6, 3], "x": 204, "y": 37, "flags": 4},
- {"matrix": [6, 4], "x": 224, "y": 47, "flags": 4},
- {"matrix": [5, 4], "x": 224, "y": 31, "flags": 4},
- {"matrix": [5, 3], "x": 204, "y": 21, "flags": 4},
- {"matrix": [5, 2], "x": 183, "y": 16, "flags": 4},
- {"matrix": [5, 1], "x": 163, "y": 20, "flags": 4},
- {"matrix": [5, 0], "x": 143, "y": 23, "flags": 4},
- {"matrix": [4, 0], "x": 143, "y": 7, "flags": 4},
- {"matrix": [4, 1], "x": 163, "y": 4, "flags": 4},
- {"matrix": [4, 2], "x": 183, "y": 0, "flags": 4},
- {"matrix": [4, 3], "x": 204, "y": 5, "flags": 4},
- {"matrix": [4, 4], "x": 224, "y": 15, "flags": 4},
- {"x": 214, "y": 14, "flags": 2},
- {"x": 153, "y": 6, "flags": 2},
- {"x": 144, "y": 56, "flags": 2},
- {"x": 214, "y": 45, "flags": 2}
- ],
- "split_count": [21, 21]
- },
- "split": {
- "enabled": true,
- "handedness": {
- "pin": "GP8"
- },
- "matrix_pins": {
- "right": {
- "direct": [
- ["GP25", "GP22", "GP17", "GP16", "GP13"],
- ["GP24", "GP20", "GP18", "GP15", "GP12"],
- ["GP23", "GP21", "GP19", "GP14", "GP11"],
- ["GP10", "GP9", null, null, null]
- ]
- }
- },
- "serial": {
- "driver": "vendor"
- }
- },
- "url": "https://git.pngu.org/sweep",
- "usb": {
- "device_version": "1.0.0",
- "pid": "0x7370",
- "vid": "0x6A73"
- },
- "ws2812": {
- "driver": "vendor",
- "pin": "GP2"
- },
- "community_layouts": ["split_3x5_2"],
- "layout_aliases": {
- "LAYOUT": "LAYOUT_split_3x5_2"
- },
- "layouts": {
- "LAYOUT_split_3x5_2": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0.25},
- {"matrix": [0, 1], "x": 1, "y": 0.125},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0.125},
- {"matrix": [0, 4], "x": 4, "y": 0.25},
- {"matrix": [4, 0], "x": 7, "y": 0.25},
- {"matrix": [4, 1], "x": 8, "y": 0.125},
- {"matrix": [4, 2], "x": 9, "y": 0},
- {"matrix": [4, 3], "x": 10, "y": 0.125},
- {"matrix": [4, 4], "x": 11, "y": 0.25},
- {"matrix": [1, 0], "x": 0, "y": 1.25},
- {"matrix": [1, 1], "x": 1, "y": 1.125},
- {"matrix": [1, 2], "x": 2, "y": 1},
- {"matrix": [1, 3], "x": 3, "y": 1.125},
- {"matrix": [1, 4], "x": 4, "y": 1.25},
- {"matrix": [5, 0], "x": 7, "y": 1.25},
- {"matrix": [5, 1], "x": 8, "y": 1.125},
- {"matrix": [5, 2], "x": 9, "y": 1},
- {"matrix": [5, 3], "x": 10, "y": 1.125},
- {"matrix": [5, 4], "x": 11, "y": 1.25},
- {"matrix": [2, 0], "x": 0, "y": 2.25},
- {"matrix": [2, 1], "x": 1, "y": 2.125},
- {"matrix": [2, 2], "x": 2, "y": 2},
- {"matrix": [2, 3], "x": 3, "y": 2.125},
- {"matrix": [2, 4], "x": 4, "y": 2.25},
- {"matrix": [6, 0], "x": 7, "y": 2.25},
- {"matrix": [6, 1], "x": 8, "y": 2.125},
- {"matrix": [6, 2], "x": 9, "y": 2},
- {"matrix": [6, 3], "x": 10, "y": 2.125},
- {"matrix": [6, 4], "x": 11, "y": 2.25},
- {"matrix": [3, 3], "x": 3.5, "y": 3.25},
- {"matrix": [3, 4], "x": 4.5, "y": 3.5},
- {"matrix": [7, 0], "x": 6.5, "y": 3.5},
- {"matrix": [7, 1], "x": 7.5, "y": 3.25}
- ]
- }
+ "serial": {
+ "driver": "vendor"
+ }
+ },
+ "url": "https://git.pngu.org/sweep",
+ "usb": {
+ "device_version": "1.0.0",
+ "pid": "0x7370",
+ "vid": "0x6A73"
+ },
+ "ws2812": {
+ "driver": "vendor",
+ "pin": "GP2"
+ },
+ "community_layouts": ["split_3x5_2"],
+ "layout_aliases": {
+ "LAYOUT": "LAYOUT_split_3x5_2"
+ },
+ "layouts": {
+ "LAYOUT_split_3x5_2": {
+ "layout": [
+ { "matrix": [0, 0], "x": 0, "y": 0.25 },
+ { "matrix": [0, 1], "x": 1, "y": 0.125 },
+ { "matrix": [0, 2], "x": 2, "y": 0 },
+ { "matrix": [0, 3], "x": 3, "y": 0.125 },
+ { "matrix": [0, 4], "x": 4, "y": 0.25 },
+ { "matrix": [4, 0], "x": 7, "y": 0.25 },
+ { "matrix": [4, 1], "x": 8, "y": 0.125 },
+ { "matrix": [4, 2], "x": 9, "y": 0 },
+ { "matrix": [4, 3], "x": 10, "y": 0.125 },
+ { "matrix": [4, 4], "x": 11, "y": 0.25 },
+ { "matrix": [1, 0], "x": 0, "y": 1.25 },
+ { "matrix": [1, 1], "x": 1, "y": 1.125 },
+ { "matrix": [1, 2], "x": 2, "y": 1 },
+ { "matrix": [1, 3], "x": 3, "y": 1.125 },
+ { "matrix": [1, 4], "x": 4, "y": 1.25 },
+ { "matrix": [5, 0], "x": 7, "y": 1.25 },
+ { "matrix": [5, 1], "x": 8, "y": 1.125 },
+ { "matrix": [5, 2], "x": 9, "y": 1 },
+ { "matrix": [5, 3], "x": 10, "y": 1.125 },
+ { "matrix": [5, 4], "x": 11, "y": 1.25 },
+ { "matrix": [2, 0], "x": 0, "y": 2.25 },
+ { "matrix": [2, 1], "x": 1, "y": 2.125 },
+ { "matrix": [2, 2], "x": 2, "y": 2 },
+ { "matrix": [2, 3], "x": 3, "y": 2.125 },
+ { "matrix": [2, 4], "x": 4, "y": 2.25 },
+ { "matrix": [6, 0], "x": 7, "y": 2.25 },
+ { "matrix": [6, 1], "x": 8, "y": 2.125 },
+ { "matrix": [6, 2], "x": 9, "y": 2 },
+ { "matrix": [6, 3], "x": 10, "y": 2.125 },
+ { "matrix": [6, 4], "x": 11, "y": 2.25 },
+ { "matrix": [3, 3], "x": 3.5, "y": 3.25 },
+ { "matrix": [3, 4], "x": 4.5, "y": 3.5 },
+ { "matrix": [7, 0], "x": 6.5, "y": 3.5 },
+ { "matrix": [7, 1], "x": 7.5, "y": 3.25 }
+ ]
}
+ }
}
diff --git a/keyboards/sweep/keymaps/jack/keymap.c b/keyboards/sweep/keymaps/jack/keymap.c
index dc9a11b..135fa17 100644
--- a/keyboards/sweep/keymaps/jack/keymap.c
+++ b/keyboards/sweep/keymaps/jack/keymap.c
@@ -2,6 +2,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "jack.h"
+#define NUM_ADC_READS 32
+
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_jack(
@@ -24,3 +26,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
// clang-format on
+
+void housekeeping_task_keymap(void) {
+ static uint32_t last_read = 0;
+ static int16_t current_reads[NUM_ADC_READS] = {0};
+ static int16_t voltage_reads[NUM_ADC_READS] = {0};
+ static uint8_t offset = 0;
+ if (timer_elapsed32(last_read) >= 1) {
+ int16_t current = analogReadPin(ADC_CURRENT_PIN);
+ int16_t voltage = analogReadPin(ADC_VOLTAGE_PIN);
+ int16_t current_ma =
+ (int16_t)(((3300 * (int32_t)current) / ADC_SATURATION));
+ int16_t voltage_mv =
+ (int16_t)((2 * (3300 * (int32_t)voltage)) / ADC_SATURATION);
+ if (!last_read)
+ for (uint8_t i = 0; i < NUM_ADC_READS; ++i) {
+ current_reads[i] = current_ma;
+ voltage_reads[i] = voltage_mv;
+ }
+ current_reads[offset] = current_ma;
+ voltage_reads[offset] = voltage_mv;
+ offset = (offset + 1) % NUM_ADC_READS;
+ static uint16_t counter = 0;
+ counter = (counter + 1) % 2500;
+ if (!counter)
+ dprintf("Current: %dmA\tVoltage: %dmV\n", (int)current_ma,
+ (int)voltage_mv);
+ last_read = timer_read32();
+ }
+ static uint32_t last_draw = 0;
+ if (timer_elapsed32(last_draw) >= 250) {
+ int32_t total_current_ma = 0;
+ int32_t total_voltage_mv = 0;
+ for (uint8_t i = 0; i < NUM_ADC_READS; ++i) {
+ total_current_ma += current_reads[i];
+ total_voltage_mv += voltage_reads[i];
+ }
+ int16_t avg_current_ma = (int16_t)(total_current_ma / NUM_ADC_READS);
+ int16_t avg_voltage_mv = (int16_t)(total_voltage_mv / NUM_ADC_READS);
+ last_draw = timer_read32();
+ }
+}
diff --git a/keyboards/sweep/mcuconf.h b/keyboards/sweep/mcuconf.h
index 182be78..c53d80d 100644
--- a/keyboards/sweep/mcuconf.h
+++ b/keyboards/sweep/mcuconf.h
@@ -4,8 +4,11 @@
#include_next <mcuconf.h>
+#undef RP_ADC_USE_ADC1
+#define RP_ADC_USE_ADC1 TRUE
+
#undef RP_SPI_USE_SPI0
#define RP_SPI_USE_SPI0 TRUE
-#undef RP_I2C_USE_I2C1
-#define RP_I2C_USE_I2C1 TRUE
+#undef RP_PWM_USE_PWM3
+#define RP_PWM_USE_PWM3 TRUE
diff --git a/keyboards/sweep/readme.md b/keyboards/sweep/readme.md
index 093fbc1..be6c1a6 100644
--- a/keyboards/sweep/readme.md
+++ b/keyboards/sweep/readme.md
@@ -1,6 +1,8 @@
# Sweep RP2040
-* Keyboard Maintainer: [Jack Sangdahl](https://github.com/waffle87)
+![image](https://git.pngu.org/sweep/about/img/image1.jpg)
+
+* Keyboard Maintainer: [[email protected]](mailto:[email protected])
* Hardware Supported: PCBs with integrated RP2040 microcontroller
* Hardware Availability: [git/sweep](https://git.pngu.org/sweep)
@@ -18,6 +20,6 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
Enter the bootloader in 3 ways:
-* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
-* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix and plug in the keyboard
+* **Physical reset button**: Hold button labeled BOOT and tap RESET button
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
diff --git a/keyboards/sweep/rules.mk b/keyboards/sweep/rules.mk
index 3bac055..5533ed9 100644
--- a/keyboards/sweep/rules.mk
+++ b/keyboards/sweep/rules.mk
@@ -1,4 +1,2 @@
-POINTING_DEVICE_DRIVER = cirque_pinnacle_spi
-
-# depends on 21844
-QUANTUM_PAINTER_DRIVERS += ls0xx_spi
+QUANTUM_PAINTER_DRIVERS += st7789_spi
+ANALOG_DRIVER_REQUIRED = yes
diff --git a/keyboards/sweep/sweep.c b/keyboards/sweep/sweep.c
index bd73d8a..c7023bd 100644
--- a/keyboards/sweep/sweep.c
+++ b/keyboards/sweep/sweep.c
@@ -4,15 +4,13 @@
#ifdef QUANTUM_PAINTER_ENABLE
#include "qp.h"
-#include "qp_surface.h"
+
static painter_device_t display;
-static uint8_t framebuffer[SURFACE_REQUIRED_BUFFER_BYTE_SIZE(
- LS0XX_DISPLAY_WIDTH, LS0XX_DISPLAY_HEIGHT, 1)] = {0};
void keyboard_post_init_kb(void) {
- display = qp_ls0xx_device_t_make_spi_device(
- LS0XX_DISPLAY_WIDTH, LS0XX_DISPLAY_HEIGHT, LS0XX_CS_PIN, LCD_SPI_DIVISOR,
- 0, framebuffer);
+ display = qp_st7789_make_spi_device(LCD_DISPLAY_WIDTH, LCD_DISPLAY_HEIGHT,
+ LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN,
+ LCD_SPI_DIVISOR, 0);
qp_init(display, QP_ROTATION_0);
keyboard_post_init_user();
}
@@ -27,14 +25,3 @@ void suspend_wakeup_init_kb(void) {
suspend_wakeup_init_user();
}
#endif // QUANTUM_PAINTER_ENABLE
-
-#ifdef OLED_ENABLE
-oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return rotation; }
-
-bool oled_task_kb(void) {
- if (!oled_task_user())
- return false;
- oled_write(PSTR("foo bar baz"), false);
- return true;
-}
-#endif // OLED_ENABLE