aboutsummaryrefslogtreecommitdiff
path: root/keymaps/onekey/f411_ls0x
diff options
context:
space:
mode:
Diffstat (limited to 'keymaps/onekey/f411_ls0x')
-rw-r--r--keymaps/onekey/f411_ls0x/3270_11.qff.c11
-rw-r--r--keymaps/onekey/f411_ls0x/keymap.c15
-rw-r--r--keymaps/onekey/f411_ls0x/keymap.json3
-rw-r--r--keymaps/onekey/f411_ls0x/rules.mk3
4 files changed, 21 insertions, 11 deletions
diff --git a/keymaps/onekey/f411_ls0x/3270_11.qff.c b/keymaps/onekey/f411_ls0x/3270_11.qff.c
index 43e5cbc..c241e51 100644
--- a/keymaps/onekey/f411_ls0x/3270_11.qff.c
+++ b/keymaps/onekey/f411_ls0x/3270_11.qff.c
@@ -1,15 +1,18 @@
-// Copyright 2025 QMK -- generated source code only, font retains original copyright
-// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2025 QMK -- generated source code only, font retains original
+// copyright SPDX-License-Identifier: GPL-2.0-or-later
// This file was auto-generated by `painter-convert-font-image` with arguments:
// format | mono2
-// unicode_glyphs |
+// unicode_glyphs |
// output | qmk_firmware
// input | 3270_11.png
// Font's metadata
// ---------------
-// Glyphs: , !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ;, <, =, >, ?, @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~
+// Glyphs: , !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, 0, 1, 2, 3, 4, 5, 6,
+// 7, 8, 9, :, ;, <, =, >, ?, @, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P,
+// Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, `, a, b, c, d, e, f, g, h, i, j,
+// k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, {, |, }, ~
#include <qp.h>
diff --git a/keymaps/onekey/f411_ls0x/keymap.c b/keymaps/onekey/f411_ls0x/keymap.c
index 75d65f3..584bce6 100644
--- a/keymaps/onekey/f411_ls0x/keymap.c
+++ b/keymaps/onekey/f411_ls0x/keymap.c
@@ -3,12 +3,11 @@
#include QMK_KEYBOARD_H
#include "qp.h"
#include "qp_surface.h"
-#include "3270_11.qff.h"
+#include "ls0xx.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_1x1(KC_A)};
-static painter_font_handle_t font;
static painter_device_t display;
static uint8_t framebuffer[SURFACE_REQUIRED_BUFFER_BYTE_SIZE(
LS0XX_WIDTH, LS0XX_HEIGHT, 1)] = {0};
@@ -17,7 +16,15 @@ void keyboard_post_init_user(void) {
display =
qp_ls0xx_device_t_make_spi_device(LS0XX_WIDTH, LS0XX_HEIGHT, LS0XX_CS_PIN,
LS0XX_SPI_DIVISOR, 0, framebuffer);
- font = qp_load_font_mem(font_3270_11);
qp_init(display, QP_ROTATION_0);
- qp_drawtext(display, 0, 0, font, "foo bar baz");
+}
+
+void housekeeping_task_user(void) {
+ static uint32_t last_draw = 0;
+ if (timer_elapsed32(last_draw) > 33) {
+ last_draw = timer_read32();
+ for (int i = 0; i < LS0XX_HEIGHT - 1; i += 8)
+ qp_rect(display, 0, i, 7, i + 7, 255, 255, 255, true);
+ qp_flush(display);
+ }
}
diff --git a/keymaps/onekey/f411_ls0x/keymap.json b/keymaps/onekey/f411_ls0x/keymap.json
new file mode 100644
index 0000000..9eba3d8
--- /dev/null
+++ b/keymaps/onekey/f411_ls0x/keymap.json
@@ -0,0 +1,3 @@
+{
+ "modules": ["ls0xx"]
+}
diff --git a/keymaps/onekey/f411_ls0x/rules.mk b/keymaps/onekey/f411_ls0x/rules.mk
index e1e5f55..7166553 100644
--- a/keymaps/onekey/f411_ls0x/rules.mk
+++ b/keymaps/onekey/f411_ls0x/rules.mk
@@ -1,6 +1,3 @@
-CONSOLE_ENABLE = yes
BOOTMAGIC_ENABLE = yes
QUANTUM_PAINTER_ENABLE = yes
-QUANTUM_PAINTER_DRIVERS += ls0xx_spi
SRC += 3270_11.qff.c
-EXTRAFLAGS += -Wno-maybe-uninitialized