diff options
author | Jack Sangdahl <[email protected]> | 2024-08-11 00:36:45 -0600 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2024-08-11 00:36:45 -0600 |
commit | f12a94d11b0a3bc9e572a74937d596648e002e9b (patch) | |
tree | 903585443db2b29e6cb1b5a952b6b65278c0e6eb | |
parent | 4151a2ceac0c73adbae5e1241629d7acc2def064 (diff) | |
download | qmk_me-f12a94d11b0a3bc9e572a74937d596648e002e9b.tar.gz qmk_me-f12a94d11b0a3bc9e572a74937d596648e002e9b.zip |
initial sweep keyboard and some other touchups
-rw-r--r-- | keyboards/sweep/config.h | 35 | ||||
-rw-r--r-- | keyboards/sweep/halconf.h | 10 | ||||
-rw-r--r-- | keyboards/sweep/keyboard.json | 139 | ||||
-rw-r--r-- | keyboards/sweep/keymaps/default/keymap.json | 13 | ||||
-rw-r--r-- | keyboards/sweep/keymaps/waffle/keymap.c | 26 | ||||
-rw-r--r-- | keyboards/sweep/lib/jetbrainsmono11.qff.c | 104 | ||||
-rw-r--r-- | keyboards/sweep/lib/jetbrainsmono11.qff.h | 8 | ||||
-rw-r--r-- | keyboards/sweep/mcuconf.h | 11 | ||||
-rw-r--r-- | keyboards/sweep/readme.md | 25 | ||||
-rw-r--r-- | keyboards/sweep/rules.mk | 8 | ||||
-rw-r--r-- | keyboards/sweep/sweep.c | 38 | ||||
-rw-r--r-- | waffle/config.h | 1 | ||||
-rw-r--r-- | waffle/oled.c | 4 | ||||
-rw-r--r-- | waffle/waffle.h | 4 |
14 files changed, 422 insertions, 4 deletions
diff --git a/keyboards/sweep/config.h b/keyboards/sweep/config.h new file mode 100644 index 0000000..f1a5681 --- /dev/null +++ b/keyboards/sweep/config.h @@ -0,0 +1,35 @@ +// Copyright 2024 [email protected] +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP0 +#define SERIAL_USART_RX_PIN GP1 + +#ifdef HAL_USE_SPI +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP6 +#define SPI_MOSI_PIN GP3 +#define SPI_MISO_PIN GP5 +#endif + +#ifdef QUANTUM_PAINTER_ENABLE +#define LS0XX_CS_PIN GP7 +#define LS0XX_DISPLAY_HEIGHT 160 +#define LS0XX_DISPLAY_WIDTH 68 +#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 +#endif + +#ifdef HAL_USE_I2C +#define I2C_DRIVER I2CD0 +#define I2C_SDA_PIN GP3 +#define I2C_SCL_PIN GP6 +#endif diff --git a/keyboards/sweep/halconf.h b/keyboards/sweep/halconf.h new file mode 100644 index 0000000..701d0ce --- /dev/null +++ b/keyboards/sweep/halconf.h @@ -0,0 +1,10 @@ +// Copyright 2024 [email protected] +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#define HAL_USE_I2C FALSE + +#include_next <halconf.h> diff --git a/keyboards/sweep/keyboard.json b/keyboards/sweep/keyboard.json new file mode 100644 index 0000000..3da98bd --- /dev/null +++ b/keyboards/sweep/keyboard.json @@ -0,0 +1,139 @@ +{ + "manufacturer": "jacks", + "keyboard_name": "sweep", + "maintainer": "pngu.org", + "bootloader": "rp2040", + "features": { + "bootmagic": true, + "oled": false, + "pointing_device": true, + "quantum_painter": false, + "rgb_matrix": true + }, + "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] + }, + "split": { + "enabled": true, + "handedness": { + "pin": "GP8" + }, + "serial": { + "driver": "vendor" + }, + "matrix_pins": { + "right": { + "direct": [ + ["GP13", "GP16", "GP17", "GP22", "GP25"], + ["GP12", "GP15", "GP18", "GP20", "GP24"], + ["GP11", "GP14", "GP19", "GP21", "GP23"], + [null, null, null, "GP9", "GP10"] + ] + } + } + }, + "url": "https://git.pngu.org/sweep", + "usb": { + "device_version": "1.0.0", + "pid": "0x7370", + "vid": "0x6A73" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP2" + }, + "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/default/keymap.json b/keyboards/sweep/keymaps/default/keymap.json new file mode 100644 index 0000000..7e49f01 --- /dev/null +++ b/keyboards/sweep/keymaps/default/keymap.json @@ -0,0 +1,13 @@ +{ + "keyboard": "sweep", + "keymap": "default", + "layout": "LAYOUT_split_3x5_2", + "layers": [ + [ + "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", + "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", + "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", + "KC_BSPC", "KC_TAB", "KC_SPC", "KC_ENT" + ] + ] +} diff --git a/keyboards/sweep/keymaps/waffle/keymap.c b/keyboards/sweep/keymaps/waffle/keymap.c new file mode 100644 index 0000000..bc4bfe4 --- /dev/null +++ b/keyboards/sweep/keymaps/waffle/keymap.c @@ -0,0 +1,26 @@ +// Copyright 2024 [email protected] +// SPDX-License-Identifier: GPL-2.0-or-later +#include "waffle.h" + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_waffle( + ___BASE1___, + ___BASE2___, + ___BASE3___, + ESCLWR, KC_SPC, KC_BSPC, PSTRSE + ), + [_LOWER] = LAYOUT_waffle( + ___LOWER1___, + ___LOWER2___, + ___LOWER3___, + KC_NO, KC_NO, NUKE, PNP + ), + [_RAISE] = LAYOUT_waffle( + ___RAISE1___, + ___RAISE2___, + ___RAISE3___, + UPDIR, RWORD, KC_NO, KC_NO + ) +}; +// clang-format on diff --git a/keyboards/sweep/lib/jetbrainsmono11.qff.c b/keyboards/sweep/lib/jetbrainsmono11.qff.c new file mode 100644 index 0000000..9a60c9f --- /dev/null +++ b/keyboards/sweep/lib/jetbrainsmono11.qff.c @@ -0,0 +1,104 @@ +// Copyright 2024 QMK +// copyright SPDX-License-Identifier: GPL-2.0-or-later + +// 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, {, |, }, ~ + +#include <qp.h> + +const uint32_t font_jetbrainsmono11_length = 1365; + +// clang-format off +const uint8_t font_jetbrainsmono11[1365] = { + 0x00, 0xFF, 0x14, 0x00, 0x00, 0x51, 0x46, 0x46, 0x01, 0x55, 0x05, 0x00, 0x00, 0xAA, 0xFA, 0xFF, + 0xFF, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0xFE, 0x1D, 0x01, 0x00, 0x07, 0x00, + 0x00, 0xC7, 0x02, 0x00, 0x87, 0x05, 0x00, 0x47, 0x08, 0x00, 0x07, 0x0B, 0x00, 0xC7, 0x0D, 0x00, + 0x87, 0x10, 0x00, 0x47, 0x13, 0x00, 0x07, 0x16, 0x00, 0xC7, 0x18, 0x00, 0x87, 0x1B, 0x00, 0x47, + 0x1E, 0x00, 0x07, 0x21, 0x00, 0xC7, 0x23, 0x00, 0x87, 0x26, 0x00, 0x47, 0x29, 0x00, 0x07, 0x2C, + 0x00, 0xC7, 0x2E, 0x00, 0x87, 0x31, 0x00, 0x47, 0x34, 0x00, 0x07, 0x37, 0x00, 0xC7, 0x39, 0x00, + 0x87, 0x3C, 0x00, 0x47, 0x3F, 0x00, 0x07, 0x42, 0x00, 0xC7, 0x44, 0x00, 0x87, 0x47, 0x00, 0x47, + 0x4A, 0x00, 0x07, 0x4D, 0x00, 0xC7, 0x4F, 0x00, 0x87, 0x52, 0x00, 0x47, 0x55, 0x00, 0x07, 0x58, + 0x00, 0xC7, 0x5A, 0x00, 0x87, 0x5D, 0x00, 0x47, 0x60, 0x00, 0x07, 0x63, 0x00, 0xC7, 0x65, 0x00, + 0x87, 0x68, 0x00, 0x47, 0x6B, 0x00, 0x07, 0x6E, 0x00, 0xC7, 0x70, 0x00, 0x87, 0x73, 0x00, 0x47, + 0x76, 0x00, 0x07, 0x79, 0x00, 0xC7, 0x7B, 0x00, 0x87, 0x7E, 0x00, 0x47, 0x81, 0x00, 0x07, 0x84, + 0x00, 0xC7, 0x86, 0x00, 0x87, 0x89, 0x00, 0x47, 0x8C, 0x00, 0x07, 0x8F, 0x00, 0xC7, 0x91, 0x00, + 0x87, 0x94, 0x00, 0x47, 0x97, 0x00, 0x07, 0x9A, 0x00, 0xC7, 0x9C, 0x00, 0x87, 0x9F, 0x00, 0x47, + 0xA2, 0x00, 0x07, 0xA5, 0x00, 0xC7, 0xA7, 0x00, 0x87, 0xAA, 0x00, 0x47, 0xAD, 0x00, 0x07, 0xB0, + 0x00, 0xC7, 0xB2, 0x00, 0x87, 0xB5, 0x00, 0x47, 0xB8, 0x00, 0x07, 0xBB, 0x00, 0xC7, 0xBD, 0x00, + 0x87, 0xC0, 0x00, 0x47, 0xC3, 0x00, 0x07, 0xC6, 0x00, 0xC7, 0xC8, 0x00, 0x87, 0xCB, 0x00, 0x47, + 0xCE, 0x00, 0x07, 0xD1, 0x00, 0xC7, 0xD3, 0x00, 0x87, 0xD6, 0x00, 0x47, 0xD9, 0x00, 0x07, 0xDC, + 0x00, 0xC7, 0xDE, 0x00, 0x87, 0xE1, 0x00, 0x47, 0xE4, 0x00, 0x07, 0xE7, 0x00, 0xC7, 0xE9, 0x00, + 0x87, 0xEC, 0x00, 0x47, 0xEF, 0x00, 0x07, 0xF2, 0x00, 0xC7, 0xF4, 0x00, 0x87, 0xF7, 0x00, 0x47, + 0xFA, 0x00, 0x07, 0xFD, 0x00, 0xC7, 0xFF, 0x00, 0x87, 0x02, 0x01, 0x04, 0xFB, 0x15, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x81, 0x40, + 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x85, 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x89, 0xE0, 0xA3, 0x40, 0x7E, 0x12, 0x01, 0x00, 0x00, 0x08, 0x84, 0x47, 0xE1, + 0xE0, 0xE0, 0x50, 0x1A, 0x04, 0x02, 0x00, 0x00, 0x80, 0xA9, 0x50, 0x71, 0xE0, 0x18, 0x8A, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x43, 0x42, 0x30, 0xA4, 0x22, 0x31, 0x17, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x82, 0x40, 0x20, 0x10, 0x08, 0x04, + 0x04, 0x04, 0x00, 0x00, 0x03, 0x02, 0x01, 0x80, 0x40, 0x00, 0x08, 0x84, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x81, 0xF0, 0x31, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xF8, 0x10, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x82, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x10, 0x04, 0x82, 0x40, 0x20, 0x08, 0x04, 0x81, 0x00, 0x00, + 0x00, 0x00, 0x47, 0x26, 0x52, 0x89, 0x44, 0x32, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x43, 0x81, 0x40, + 0x20, 0x10, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x47, 0x06, 0x82, 0x60, 0x18, 0x04, 0x1F, 0x00, + 0x00, 0x00, 0x80, 0x07, 0x82, 0xE0, 0x40, 0x40, 0x12, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, + 0x90, 0x48, 0x3C, 0x10, 0x08, 0x00, 0x00, 0x00, 0x80, 0x47, 0x20, 0xF0, 0xC0, 0x40, 0x32, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x82, 0x41, 0xF0, 0x88, 0x44, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x80, 0x4F, + 0x04, 0x81, 0x60, 0x10, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x47, 0x26, 0xE1, 0xC8, 0x44, 0x22, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x47, 0x24, 0x92, 0x71, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x40, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, + 0x00, 0x04, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x08, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0x03, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xC0, 0xC0, + 0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x81, 0x30, 0x08, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x47, 0x04, 0xC2, 0xA5, 0x52, 0x28, 0x8C, 0x80, 0x03, 0x00, 0x00, 0x82, 0x41, 0xA1, + 0x48, 0x3C, 0x22, 0x11, 0x00, 0x00, 0x00, 0x80, 0x47, 0x26, 0xF1, 0xC8, 0x44, 0x22, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x24, 0x10, 0x08, 0x04, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x80, 0x47, 0x22, + 0x12, 0x89, 0x44, 0x12, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x4F, 0x20, 0xF0, 0x08, 0x04, 0x02, 0x1F, + 0x00, 0x00, 0x00, 0x80, 0x4F, 0x20, 0x10, 0x78, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x26, 0x10, 0xE8, 0x44, 0x32, 0x0E, 0x00, 0x00, 0x00, 0x80, 0x48, 0x24, 0xF2, 0x89, 0x44, 0x22, + 0x11, 0x00, 0x00, 0x00, 0x80, 0x07, 0x81, 0x40, 0x20, 0x10, 0x08, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x02, 0x81, 0x40, 0x20, 0x12, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x48, 0x22, 0x71, 0x68, 0x24, + 0x12, 0x11, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x1F, 0x00, 0x00, 0x00, + 0x80, 0xCC, 0x66, 0x52, 0x89, 0x44, 0x22, 0x11, 0x00, 0x00, 0x00, 0x80, 0xC8, 0x64, 0x52, 0xA9, + 0x74, 0x32, 0x19, 0x00, 0x00, 0x00, 0x00, 0x47, 0x22, 0x12, 0x89, 0x44, 0x12, 0x0E, 0x00, 0x00, + 0x00, 0x80, 0x47, 0x24, 0x12, 0x79, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x47, 0x26, 0x12, + 0x89, 0x44, 0x32, 0x0E, 0x04, 0x02, 0x00, 0x80, 0x47, 0x24, 0x92, 0x79, 0x24, 0x12, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x47, 0x22, 0x60, 0x40, 0x40, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x81, + 0x40, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x80, 0x48, 0x24, 0x12, 0x89, 0x44, 0x12, 0x0E, + 0x00, 0x00, 0x00, 0x80, 0x48, 0x24, 0x91, 0x50, 0x28, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x40, 0x2A, + 0xC5, 0x32, 0x99, 0x6C, 0x36, 0x09, 0x00, 0x00, 0x00, 0x80, 0x48, 0x42, 0x61, 0x30, 0x28, 0x12, + 0x11, 0x00, 0x00, 0x00, 0x80, 0x48, 0x42, 0xE1, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x80, + 0x0F, 0x02, 0x41, 0x10, 0x08, 0x02, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x81, 0x40, 0x20, 0x10, 0x08, + 0x04, 0x02, 0x07, 0x00, 0x00, 0x81, 0x80, 0x40, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x00, 0x00, + 0x06, 0x02, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x82, 0x00, 0x11, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x81, + 0xF1, 0x44, 0x32, 0x1F, 0x00, 0x00, 0x00, 0x80, 0x40, 0xE0, 0x91, 0x89, 0x44, 0x32, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x11, 0x09, 0x04, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x08, 0xC4, + 0x93, 0x89, 0x44, 0x32, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x11, 0xF9, 0x04, 0x02, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x8E, 0x40, 0xF0, 0x11, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x93, 0x89, 0x44, 0x32, 0x1E, 0x84, 0x03, 0x00, 0x80, 0x40, 0xE0, 0x91, 0x89, 0x44, 0x22, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x02, 0xE0, 0x40, 0x20, 0x10, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x04, 0xE0, 0x81, 0x40, 0x20, 0x10, 0x08, 0xC4, 0x01, 0x00, 0x80, 0x40, 0x20, 0x93, 0x38, 0x24, + 0x12, 0x11, 0x00, 0x00, 0x00, 0xC0, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x1C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x60, 0x53, 0xA9, 0x54, 0x2A, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x91, 0x89, + 0x44, 0x22, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x91, 0x89, 0x44, 0x32, 0x0E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xE0, 0x91, 0x89, 0x44, 0x32, 0x8F, 0x40, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x93, + 0x89, 0x44, 0x32, 0x1E, 0x08, 0x04, 0x00, 0x00, 0x00, 0xE0, 0x11, 0x89, 0x04, 0x02, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x11, 0x38, 0x20, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, + 0x23, 0x10, 0x08, 0x04, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x12, 0x89, 0x44, 0x12, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x92, 0x48, 0x28, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x90, 0x42, 0x99, 0x4C, 0x16, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xA3, 0x30, 0x18, 0x14, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x92, 0x50, 0x28, 0x0C, 0x04, 0x82, 0x00, 0x00, 0x00, + 0x00, 0xE0, 0x81, 0x20, 0x08, 0x06, 0x1F, 0x00, 0x00, 0x00, 0x08, 0x02, 0x81, 0x30, 0x20, 0x10, + 0x08, 0x04, 0x04, 0x00, 0x00, 0x04, 0x02, 0x81, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, + 0x03, 0x83, 0x40, 0xC0, 0x11, 0x08, 0x0C, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x69, + 0x00, 0x00, 0x00, 0x00, 0x00, +}; +// clang-format on diff --git a/keyboards/sweep/lib/jetbrainsmono11.qff.h b/keyboards/sweep/lib/jetbrainsmono11.qff.h new file mode 100644 index 0000000..de556e3 --- /dev/null +++ b/keyboards/sweep/lib/jetbrainsmono11.qff.h @@ -0,0 +1,8 @@ +// Copyright 2024 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include <qp.h> + +extern const uint32_t font_jetbrainsmono11_length; +extern const uint8_t font_jetbrainsmono11[1365]; diff --git a/keyboards/sweep/mcuconf.h b/keyboards/sweep/mcuconf.h new file mode 100644 index 0000000..32da2a1 --- /dev/null +++ b/keyboards/sweep/mcuconf.h @@ -0,0 +1,11 @@ +// Copyright 2024 [email protected] +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next <mcuconf.h> + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 FALSE diff --git a/keyboards/sweep/readme.md b/keyboards/sweep/readme.md new file mode 100644 index 0000000..5d6b42f --- /dev/null +++ b/keyboards/sweep/readme.md @@ -0,0 +1,25 @@ +# Sweep RP2040 + +![%KEYBOARD%](imgur.com image replace me!) + +* Keyboard Maintainer: [Jack Sangdahl][https://github.com/waffle87] +* Hardware Supported: PCBs with integrated RP2040 microcontroller +* Hardware Availability: [git/sweep][https://git.pngu.org/sweep] + +Make example for this keyboard (after setting up your build environment): + + make sweep:default + +Flashing example for this keyboard: + + make sweep:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +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 +* **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 new file mode 100644 index 0000000..f7bdd1a --- /dev/null +++ b/keyboards/sweep/rules.mk @@ -0,0 +1,8 @@ +POINTING_DEVICE_DRIVER = cirque_pinnacle_spi + +# depends on 21844 & 23699 +QUANTUM_PAINTER_DRIVERS += ls0xx_spi + +ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes) + SRC += lib/jetbrainsmono11.qff.c +endif diff --git a/keyboards/sweep/sweep.c b/keyboards/sweep/sweep.c new file mode 100644 index 0000000..4e061f8 --- /dev/null +++ b/keyboards/sweep/sweep.c @@ -0,0 +1,38 @@ +// Copyright 2024 [email protected] +// SPDX-License-Identifier: GPL-2.0-or-later +#include <quantum.h> + +#ifdef QUANTUM_PAINTER_ENABLE +#include "lib/jetbrainsmono11.qff.h" +#include <qp.h> +#include <qp_surface.h> +static painter_device_t display; +static painter_font_handle_t font; +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); + qp_init(display, QP_ROTATION_0); + font = qp_load_font_mem(font); + if (font) { + static const char *data = "foo bar baz"; + int16_t width = qp_textwidth(font, data); + qp_drawtext(display, LS0XX_DISPLAY_WIDTH - width - 1, + LS0XX_DISPLAY_HEIGHT - font->line_height - 1, font, data); + } + keyboard_post_init_user(); +} + +void suspend_power_down_kb(void) { + qp_power(display, false); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + qp_power(display, true); + suspend_wakeup_init_user(); +} +#endif diff --git a/waffle/config.h b/waffle/config.h index 9351c96..a9178ac 100644 --- a/waffle/config.h +++ b/waffle/config.h @@ -26,6 +26,7 @@ #define SPLIT_LAYER_STATE_ENABLE #define SPLIT_OLED_ENABLE #define SPLIT_LED_STATE_ENABLE +#define SPLIT_ACTIVITY_ENABLE #define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_KEYLOG_STR #endif diff --git a/waffle/oled.c b/waffle/oled.c index f6734e5..d8a618c 100644 --- a/waffle/oled.c +++ b/waffle/oled.c @@ -146,7 +146,7 @@ void render_mod_status(void) { oled_write(off_off_1, false); oled_write(mods & MOD_MASK_ALT ? alt_on_1 : alt_off_1, false); oled_write(mods & MOD_MASK_GUI ? gui_on_2 : gui_off_2, false); - if (mods & MOD_MASK_GUI & MOD_MASK_ALT) + if ((mods & MOD_MASK_GUI) && (mods & MOD_MASK_ALT)) oled_write(on_on_2, false); else if (mods & MOD_MASK_GUI) oled_write(on_off_2, false); @@ -166,7 +166,7 @@ void render_mod_status(void) { oled_write(off_off_1, false); oled_write(mods & MOD_MASK_SHIFT ? shift_on_1 : shift_off_1, false); oled_write(mods & MOD_MASK_CTRL ? ctrl_on_2 : ctrl_off_2, false); - if (mods & MOD_MASK_CTRL & MOD_MASK_SHIFT) + if ((mods & MOD_MASK_CTRL) && (mods & MOD_MASK_SHIFT)) oled_write(on_on_2, false); else if (mods & MOD_MASK_CTRL) oled_write(on_off_2, false); diff --git a/waffle/waffle.h b/waffle/waffle.h index d95b5a7..3a74276 100644 --- a/waffle/waffle.h +++ b/waffle/waffle.h @@ -67,12 +67,12 @@ void raise_paste(tap_dance_state_t *state, void *user_data); #define ___LOWER1___ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 #define ___LOWER2___ HRML(KC_EXLM, KC_AT, KC_HASH, KC_DLR), KC_PERC, KC_CIRC, HRMR(KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN) #define ___LOWER3___ KC_VOLD, KC_TAB, KC_CAPS, SELWORD, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU -#define ___LOWER4___ _______, _______, _______, _______, _______, _______ +#define ___LOWER4___ _______, _______, _______, _______, NUKE, _______ #define ___RAISE1___ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NOMODE, KC_SCRIPT, KC_BLOCKS, KC_REGIONAL, QK_MAKE #define ___RAISE2___ M_JIGGLE, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_WIDE, KC_AUSSIE, KC_ZALGO, KC_SUPER, QK_BOOT #define ___RAISE3___ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define ___RAISE4___ _______, _______, _______, _______, _______, _______ +#define ___RAISE4___ _______, RWORD, _______, _______, _______, _______ // clang-format on #define LAYOUT_waffle_60_ts(...) LAYOUT_60_ansi_tsangan(__VA_ARGS__) |