diff options
author | Nick Brassel <nick@tzarc.org> | 2023-03-11 23:59:47 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2023-03-11 23:59:47 +1100 |
commit | 07157cd707951dff8be9baccacc68ebfb9e4a76a (patch) | |
tree | 8e71ceb45b06e7b006585702432d000da4a033e4 | |
parent | d3a9cf5d2594b5418c805b935181d0b5fe8f0177 (diff) | |
parent | e8a5630c7c7aeb371fd1a82e0b1bea672f0e0aeb (diff) |
Merge remote-tracking branch 'upstream/master' into develop
-rw-r--r-- | keyboards/binepad/bn009r2/config.h | 12 | ||||
-rw-r--r-- | keyboards/binepad/bn009r2/info.json | 42 | ||||
-rw-r--r-- | keyboards/binepad/bn009r2/keymaps/default/keymap.json | 15 | ||||
-rw-r--r-- | keyboards/binepad/bn009r2/keymaps/via/keymap.json | 35 | ||||
-rw-r--r-- | keyboards/binepad/bn009r2/readme.md | 27 | ||||
-rw-r--r-- | keyboards/binepad/bn009r2/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/lily58/r2g/config.h | 1 | ||||
-rw-r--r-- | keyboards/spleeb/config.h | 36 | ||||
-rw-r--r-- | keyboards/spleeb/info.json | 124 | ||||
-rw-r--r-- | keyboards/spleeb/keymaps/chrishoage/config.h | 15 | ||||
-rw-r--r-- | keyboards/spleeb/keymaps/chrishoage/keymap.c | 127 | ||||
-rw-r--r-- | keyboards/spleeb/keymaps/chrishoage/rules.mk | 11 | ||||
-rw-r--r-- | keyboards/spleeb/keymaps/default/keymap.c | 33 | ||||
-rw-r--r-- | keyboards/spleeb/lib/glcdfont.c | 233 | ||||
-rw-r--r-- | keyboards/spleeb/mcuconf.h | 9 | ||||
-rw-r--r-- | keyboards/spleeb/readme.md | 109 | ||||
-rw-r--r-- | keyboards/spleeb/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/spleeb/spleeb.c | 544 | ||||
-rw-r--r-- | keyboards/spleeb/spleeb.h | 149 |
19 files changed, 1523 insertions, 1 deletions
diff --git a/keyboards/binepad/bn009r2/config.h b/keyboards/binepad/bn009r2/config.h new file mode 100644 index 0000000000..45b63ec105 --- /dev/null +++ b/keyboards/binepad/bn009r2/config.h @@ -0,0 +1,12 @@ +// Copyright 2023 Binepad (@binepad) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +/* + * Wear Leveling EEPROM Emulation + */ + +#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. diff --git a/keyboards/binepad/bn009r2/info.json b/keyboards/binepad/bn009r2/info.json new file mode 100644 index 0000000000..5d126c866c --- /dev/null +++ b/keyboards/binepad/bn009r2/info.json @@ -0,0 +1,42 @@ +{ + "manufacturer": "Binepad", + "keyboard_name": "BN009 R2", + "maintainer": "binepad", + "bootloader": "stm32duino", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false + }, + "matrix_pins": { + "cols": ["A1", "A2", "A6"], + "rows": ["B6", "B7", "B2"] + }, + "processor": "STM32F103", + "url": "http://binepad.com", + "usb": { + "vid": "0x4249", + "pid": "0x4295", + "device_version": "2.0.0" + }, + "community_layouts": ["ortho_3x3"], + "layouts": { + "LAYOUT_ortho_3x3": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 } + ] + } + } +} diff --git a/keyboards/binepad/bn009r2/keymaps/default/keymap.json b/keyboards/binepad/bn009r2/keymaps/default/keymap.json new file mode 100644 index 0000000000..2d5410de04 --- /dev/null +++ b/keyboards/binepad/bn009r2/keymaps/default/keymap.json @@ -0,0 +1,15 @@ +{ + "keyboard": "binepad/bn009r2", + "version": 1, + "author": "binepad", + "notes": "This file is a keymap.json file for binepad/bn009r2", + "keymap": "default", + "layout": "LAYOUT_ortho_3x3", + "layers": [ + [ + "KC_7", "KC_8", "KC_9", + "KC_4", "KC_5", "KC_6", + "KC_1", "KC_2", "KC_3" + ] + ] +} diff --git a/keyboards/binepad/bn009r2/keymaps/via/keymap.json b/keyboards/binepad/bn009r2/keymaps/via/keymap.json new file mode 100644 index 0000000000..797c54d43a --- /dev/null +++ b/keyboards/binepad/bn009r2/keymaps/via/keymap.json @@ -0,0 +1,35 @@ +{ + "config": { + "features": { + "via": true + } + }, + "keyboard": "binepad/bn009r2", + "version": 1, + "author": "binepad", + "notes": "This file is a keymap.json file for binepad/bn009r2", + "keymap": "via", + "layout": "LAYOUT_ortho_3x3", + "layers": [ + [ + "KC_7", "KC_8", "KC_9", + "KC_4", "KC_5", "KC_6", + "KC_1", "KC_2", "KC_3" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ], + [ + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO", + "KC_NO", "KC_NO", "KC_NO" + ] + ] +} diff --git a/keyboards/binepad/bn009r2/readme.md b/keyboards/binepad/bn009r2/readme.md new file mode 100644 index 0000000000..5444a08843 --- /dev/null +++ b/keyboards/binepad/bn009r2/readme.md @@ -0,0 +1,27 @@ +# BINEPAD BN009 R2 + +![BINEPAD BN009](https://imgur.com/fu0iXD0h.jpg) + +*A 9% macropad* + +* Keyboard Maintainer: [binepad](https://github.com/binepad) +* Hardware Supported: BN009 *(ft. STM32F103)* +* Hardware Availability: [binepad.com](https://www.binepad.com/bn009) + +Make example for this keyboard (after setting up your build environment): + + make binepad/bn009r2:default + +Flashing example for this keyboard: + + make binepad/bn009r2:default:flash + +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) and plug in the keyboard +* **Physical reset button**: Briefly press the button under the small hole on the back of the macropad +* **Keycode in layout**: Press the key mapped to `QK_BOOT` or `RESET` if it is available diff --git a/keyboards/binepad/bn009r2/rules.mk b/keyboards/binepad/bn009r2/rules.mk new file mode 100644 index 0000000000..837f4bffb5 --- /dev/null +++ b/keyboards/binepad/bn009r2/rules.mk @@ -0,0 +1 @@ +# This file is intentionally left blank diff --git a/keyboards/lily58/r2g/config.h b/keyboards/lily58/r2g/config.h index 1d857ce696..9770e28a53 100644 --- a/keyboards/lily58/r2g/config.h +++ b/keyboards/lily58/r2g/config.h @@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_MULTISPLASH #endif # define SPLIT_TRANSPORT_MIRROR diff --git a/keyboards/spleeb/config.h b/keyboards/spleeb/config.h new file mode 100644 index 0000000000..72a09e89c9 --- /dev/null +++ b/keyboards/spleeb/config.h @@ -0,0 +1,36 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Auto mouse layer makes use of the Cirque touchdown indicator which requires +// the touch sensor to be on the master side +#define MASTER_RIGHT + +// Sync later, led, and mod state for use on OLED on slave side +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_MODS_ENABLE +// Transport dpi and enc mode for display on oled +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_KB_CONFIG_SYNC + +#ifdef POINTING_DEVICE_ENABLE +# define POINTING_DEVICE_AUTO_MOUSE_ENABLE +// Absolute mode allows for z/touchdown triggering of auto mouse layer with out +// moving finger +# define CIRQUE_PINNACLE_POSITION_MODE CIRQUE_PINNACLE_ABSOLUTE_MODE +# define POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE +#endif // POINTING_DEVICE_ENABLE + +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP16 +#define I2C1_SCL_PIN GP17 + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_FONT_H "./lib/glcdfont.c" +#endif // OLED_ENABLE + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/spleeb/info.json b/keyboards/spleeb/info.json new file mode 100644 index 0000000000..0af488135d --- /dev/null +++ b/keyboards/spleeb/info.json @@ -0,0 +1,124 @@ +{ + "manufacturer": "Chris Hoage", + "keyboard_name": "spleeb", + "maintainer": "chrishoage", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "encoder": { + "enabled": true, + "rotary": [ + { + "pin_a": "GP4", + "pin_b": "GP21", + "resolution": 2 + } + ] + }, + "features": { + "nkro": true + }, + "matrix_pins": { + "cols": ["GP23", "GP20", "GP22", "GP26", "GP27", "GP28", "GP29"], + "rows": ["GP5", "GP6", "GP7", "GP8", "GP9"] + }, + "processor": "RP2040", + "board": "QMK_PM2040", + "secure": { + "idle_timeout": 60000, + "unlock_sequence": [ + [5, 0], + [5, 1] + ], + "unlock_timeout": 5000 + }, + "split": { + "enabled": true, + "soft_serial_pin": "GP1", + "encoder": { + "right": { + "rotary": [ + { + "pin_a": "GP21", + "pin_b": "GP4" + } + ] + } + } + }, + "url": "https://github.com/chrishoage/spleeb", + "usb": { + "device_version": "0.0.1", + "pid": "0x4242", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.6 }, + { "matrix": [0, 1], "x": 1, "y": 0.6 }, + { "matrix": [0, 2], "x": 2, "y": 0.2 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.2 }, + { "matrix": [0, 5], "x": 5, "y": 0.4 }, + { "matrix": [0, 6], "x": 6, "y": 0.9 }, + { "matrix": [5, 6], "x": 9.75, "y": 0.9 }, + { "matrix": [5, 5], "x": 10.75, "y": 0.4 }, + { "matrix": [5, 4], "x": 11.75, "y": 0.2 }, + { "matrix": [5, 3], "x": 12.75, "y": 0 }, + { "matrix": [5, 2], "x": 13.75, "y": 0.2 }, + { "matrix": [5, 1], "x": 14.75, "y": 0.6 }, + { "matrix": [5, 0], "x": 15.75, "y": 0.6 }, + { "matrix": [1, 0], "x": 0, "y": 1.6 }, + { "matrix": [1, 1], "x": 1, "y": 1.6 }, + { "matrix": [1, 2], "x": 2, "y": 1.2 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.2 }, + { "matrix": [1, 5], "x": 5, "y": 1.4 }, + { "matrix": [1, 6], "x": 6, "y": 1.9 }, + { "matrix": [6, 6], "x": 9.75, "y": 1.9 }, + { "matrix": [6, 5], "x": 10.75, "y": 1.4 }, + { "matrix": [6, 4], "x": 11.75, "y": 1.2 }, + { "matrix": [6, 3], "x": 12.75, "y": 1 }, + { "matrix": [6, 2], "x": 13.75, "y": 1.2 }, + { "matrix": [6, 1], "x": 14.75, "y": 1.6 }, + { "matrix": [6, 0], "x": 15.75, "y": 1.6 }, + { "matrix": [2, 0], "x": 0, "y": 2.6 }, + { "matrix": [2, 1], "x": 1, "y": 2.6 }, + { "matrix": [2, 2], "x": 2, "y": 2.2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.2 }, + { "matrix": [2, 5], "x": 5, "y": 2.4 }, + { "matrix": [2, 6], "x": 6, "y": 2.9 }, + { "matrix": [7, 6], "x": 9.75, "y": 2.9 }, + { "matrix": [7, 5], "x": 10.75, "y": 2.4 }, + { "matrix": [7, 4], "x": 11.75, "y": 2.2 }, + { "matrix": [7, 3], "x": 12.75, "y": 2 }, + { "matrix": [7, 2], "x": 13.75, "y": 2.2 }, + { "matrix": [7, 1], "x": 14.75, "y": 2.6 }, + { "matrix": [7, 0], "x": 15.75, "y": 2.6 }, + { "matrix": [3, 1], "x": 1, "y": 3.6 }, + { "matrix": [3, 2], "x": 2, "y": 3.2 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3.2 }, + { "matrix": [3, 5], "x": 5, "y": 3.4 }, + { "matrix": [3, 6], "x": 7.2, "y": 3.15 }, + { "matrix": [8, 6], "x": 8.6, "y": 3.15 }, + { "matrix": [8, 5], "x": 10.75, "y": 3.4 }, + { "matrix": [8, 4], "x": 11.75, "y": 3.2 }, + { "matrix": [8, 3], "x": 12.75, "y": 3 }, + { "matrix": [8, 2], "x": 13.75, "y": 3.2 }, + { "matrix": [8, 1], "x": 14.75, "y": 3.6 }, + { "matrix": [4, 2], "x": 3, "y": 4.45 }, + { "matrix": [4, 3], "x": 4, "y": 4.45 }, + { "matrix": [4, 4], "x": -0.15, "y": 4.65 }, + { "h": 1.25, "matrix": [4, 5], "x": 0.85, "y": 4.4 }, + { "h": 1.25, "matrix": [4, 6], "x": 1.85, "y": 4.4 }, + { "h": 1.25, "matrix": [9, 6], "x": -3.1, "y": 4.6 }, + { "h": 1.25, "matrix": [9, 5], "x": -2.1, "y": 4.6 }, + { "matrix": [9, 4], "x": -1.1, "y": 4.85 }, + { "matrix": [9, 3], "x": 11.75, "y": 4.45 }, + { "matrix": [9, 2], "x": 12.75, "y": 4.45 } + ] + } + } +} diff --git a/keyboards/spleeb/keymaps/chrishoage/config.h b/keyboards/spleeb/keymaps/chrishoage/config.h new file mode 100644 index 0000000000..0ac75d3041 --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/config.h @@ -0,0 +1,15 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define AUTO_MOUSE_TIME 250 + +#define CIRQUE_PINNACLE_DIAMETER_MM 35 +#define POINTING_DEVICE_ROTATION_180 + +#define SPLEEB_DRAGSCROLL_REVERSE_X +#define SPLEEB_ENCODER_MODE_MAP_ENABLE + +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/spleeb/keymaps/chrishoage/keymap.c b/keyboards/spleeb/keymaps/chrishoage/keymap.c new file mode 100644 index 0000000000..2650c1aebf --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/keymap.c @@ -0,0 +1,127 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Double tap TD(0) to enter bootloader +static void enter_qk_boot(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +enum SpleebLayer { _BASE = 0, _FN, _MOUSE }; + +qk_tap_dance_action_t tap_dance_actions[] = {[0] = ACTION_TAP_DANCE_FN(enter_qk_boot)}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, ENC_STR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, MO(1), MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [_FN] = LAYOUT( + KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_ESC, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, QK_RBT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ENC_STL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TD(0), + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_MOUSE] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + DRGSCRL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, SNIPING, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (get_mods() & MOD_MASK_GUI) { + // When GUI is held trigger [ ] to move workspaces + tap_code(clockwise ? KC_RBRC : KC_LBRC); + return false; + } + + if (get_mods() & MOD_MASK_CTRL) { + // When CTRL is hled trigger page up/down to move tabs (Firefox, VSCode) + tap_code(clockwise ? KC_PGDN : KC_PGUP); + return false; + } + + if (get_mods() & MOD_MASK_ALT) { + // When ALT is held trigger up/down to move line up/down + tap_code(clockwise ? KC_DOWN : KC_UP); + return false; + } + + // Defer to encoder_update_kb to trigger spleeb_encoder_mode_trigger + return true; +} + +enum spleeb_enc_mode { + DEF_DPI, + SNP_DPI, + VOL, + SEL, +}; + +void spleeb_encoder_mode_trigger(uint8_t mode, bool clockwise) { + dprintf("spleeb_encoder_mode_trigger m: %u, c: %u\n", mode, clockwise); + switch (mode) { + case DEF_DPI: + spleeb_cycle_pointer_default_dpi(clockwise); + break; + case SNP_DPI: + spleeb_cycle_pointer_sniping_dpi(clockwise); + break; + case VOL: + tap_code(clockwise ? KC_VOLU : KC_VOLD); + break; + case SEL: { + bool is_shift = get_mods() & MOD_MASK_SHIFT; + uint16_t dir = clockwise ? KC_RIGHT : KC_LEFT; + if (is_shift) { + tap_code(dir); + } else { + tap_code16(LSFT(LCTL(dir))); + } + break; + } + + default: + break; + } +} + +const char *spleeb_encoder_mode_string(uint8_t mode) { + switch (mode) { + case DEF_DPI: + return "df dpi"; + case SNP_DPI: + return "sn dpi"; + case VOL: + return "volume"; + case SEL: + return "select"; + } + + return get_u8_str(mode, ' '); +} + +void pointing_device_init_user(void) { + set_auto_mouse_layer(_MOUSE); +} + +const spleeb_enc_mode_t spleeb_encoder_mode_map[NUM_ENCODERS][SPLEEB_ENCODER_MODE_COUNT] = { + [0] = {SPLEEB_ENC_MODE(VOL), SPLEEB_ENC_MODE(SEL)}, + [1] = {SPLEEB_ENC_MODE(DEF_DPI), SPLEEB_ENC_MODE(SNP_DPI), SPLEEB_ENC_MODE(SEL)}, +}; diff --git a/keyboards/spleeb/keymaps/chrishoage/rules.mk b/keyboards/spleeb/keymaps/chrishoage/rules.mk new file mode 100644 index 0000000000..117c55fd8b --- /dev/null +++ b/keyboards/spleeb/keymaps/chrishoage/rules.mk @@ -0,0 +1,11 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +ENCODER_ENABLE = yes + +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/spleeb/keymaps/default/keymap.c b/keyboards/spleeb/keymaps/default/keymap.c new file mode 100644 index 0000000000..dca49efd34 --- /dev/null +++ b/keyboards/spleeb/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, MO(1), MO(1), KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT( + KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_ESC, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, + KC_LCAP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; +// clang-format on diff --git a/keyboards/spleeb/lib/glcdfont.c b/keyboards/spleeb/lib/glcdfont.c new file mode 100644 index 0000000000..5a7fcdaee2 --- /dev/null +++ b/keyboards/spleeb/lib/glcdfont.c @@ -0,0 +1,233 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "progmem.h" + +// clang-format off +static const unsigned char PROGMEM font[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x20, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x04, 0xFA, 0xA1, + 0xFA, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0xFC, 0x87, 0x95, + 0xB5, 0x87, 0xFC, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x81, + 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9B, 0xAD, 0xAD, + 0xAD, 0xB3, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xBD, 0xB5, + 0xB5, 0xC9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xE1, 0xEF, 0xEF, + 0x81, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x91, 0xB5, 0xB5, + 0xB5, 0x85, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x81, 0xB5, 0xB5, + 0xB5, 0x85, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x74, 0x42, + 0x74, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, + 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x04, 0x08, 0x10, + 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, + 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, + 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +// clang-format on diff --git a/keyboards/spleeb/mcuconf.h b/keyboards/spleeb/mcuconf.h new file mode 100644 index 0000000000..30b20fdcbd --- /dev/null +++ b/keyboards/spleeb/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2022 Chris Hoage (@chrishoage) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next <mcuconf.h> + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE diff --git a/keyboards/spleeb/readme.md b/keyboards/spleeb/readme.md new file mode 100644 index 0000000000..0b42352e29 --- /dev/null +++ b/keyboards/spleeb/readme.md @@ -0,0 +1,109 @@ +# spleeb + +![spleeb]( |