diff options
| author | user <user@node5.net> | 2024-01-02 06:31:20 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-01-02 06:31:20 +0100 |
| commit | bce31d35a8f66f17ef888dad29129f2094fd33ca (patch) | |
| tree | 065ab759088f3e892f0d9c02f1d5793725d89b90 /keyboards/handwired/node5_1 | |
| parent | 6e93b59f6134753e6167caf425de666999710c6d (diff) | |
node5_1 initial commit
Diffstat (limited to 'keyboards/handwired/node5_1')
| -rw-r--r-- | keyboards/handwired/node5_1/config.h | 30 | ||||
| -rw-r--r-- | keyboards/handwired/node5_1/info.json | 120 | ||||
| -rw-r--r-- | keyboards/handwired/node5_1/keymaps/default/keymap.c | 136 | ||||
| -rw-r--r-- | keyboards/handwired/node5_1/readme.md | 27 | ||||
| -rw-r--r-- | keyboards/handwired/node5_1/rules.mk | 13 |
5 files changed, 326 insertions, 0 deletions
diff --git a/keyboards/handwired/node5_1/config.h b/keyboards/handwired/node5_1/config.h new file mode 100644 index 0000000000..cbe0d3afd7 --- /dev/null +++ b/keyboards/handwired/node5_1/config.h @@ -0,0 +1,30 @@ +// Copyright 2023 user (@user) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +#define RP_I2C_USE_I2C0 FALSE +#define RP_I2C_USE_I2C1 TRUE +#define I2C1_SDA_PIN GP18 +#define I2C1_SCL_PIN GP19 + +#define PIMORONI_TRACKBALL_SCALE 2 +#define MOUSE_EXTENDED_REPORT TRUE +#define POINTING_DEVICE_GESTURES_CURSOR_GLIDE_ENABLE TRUE + diff --git a/keyboards/handwired/node5_1/info.json b/keyboards/handwired/node5_1/info.json new file mode 100644 index 0000000000..671a5ae4b5 --- /dev/null +++ b/keyboards/handwired/node5_1/info.json @@ -0,0 +1,120 @@ +{ + "manufacturer": "user", + "keyboard_name": "handwired/node5_1", + "maintainer": "user", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14"], + "rows": ["GP14", "GP15", "GP26", "GP27", "GP28", "GP29"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xAAAA" + }, + "layouts": { + "LAYOUT_ortho_split": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [0, 9], "x": 9, "y": 0}, + {"matrix": [0, 10], "x": 10, "y": 0}, + {"matrix": [0, 11], "x": 11, "y": 0}, + {"matrix": [0, 12], "x": 12, "y": 0}, + {"matrix": [0, 13], "x": 13, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1}, + {"matrix": [1, 5], "x": 5, "y": 1}, + {"matrix": [1, 6], "x": 6, "y": 1}, + {"matrix": [1, 7], "x": 7, "y": 1}, + {"matrix": [1, 8], "x": 8, "y": 1}, + {"matrix": [1, 9], "x": 9, "y": 1}, + {"matrix": [1, 10], "x": 10, "y": 1}, + {"matrix": [1, 11], "x": 11, "y": 1}, + {"matrix": [1, 12], "x": 12, "y": 1}, + {"matrix": [1, 13], "x": 13, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2}, + {"matrix": [2, 5], "x": 5, "y": 2}, + {"matrix": [2, 6], "x": 6, "y": 2}, + {"matrix": [2, 7], "x": 7, "y": 2}, + {"matrix": [2, 8], "x": 8, "y": 2}, + {"matrix": [2, 9], "x": 9, "y": 2}, + {"matrix": [2, 10], "x": 10, "y": 2}, + {"matrix": [2, 11], "x": 11, "y": 2}, + {"matrix": [2, 12], "x": 12, "y": 2}, + {"matrix": [2, 13], "x": 13, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3}, + {"matrix": [3, 5], "x": 5, "y": 3}, + {"matrix": [3, 6], "x": 6, "y": 3}, + {"matrix": [3, 7], "x": 7, "y": 3}, + {"matrix": [3, 8], "x": 8, "y": 3}, + {"matrix": [3, 9], "x": 9, "y": 3}, + {"matrix": [3, 10], "x": 10, "y": 3}, + {"matrix": [3, 11], "x": 11, "y": 3}, + {"matrix": [3, 12], "x": 12, "y": 3, "w": 2}, + + {"matrix": [4, 0], "x": 0, "y": 4}, + {"matrix": [4, 1], "x": 1, "y": 4}, + {"matrix": [4, 2], "x": 2, "y": 4}, + {"matrix": [4, 3], "x": 3, "y": 4}, + {"matrix": [4, 4], "x": 4, "y": 4}, + {"matrix": [4, 5], "x": 5, "y": 4}, + {"matrix": [4, 6], "x": 6, "y": 4}, + {"matrix": [4, 7], "x": 7, "y": 4}, + {"matrix": [4, 8], "x": 8, "y": 4}, + {"matrix": [4, 9], "x": 9, "y": 4}, + {"matrix": [4, 10], "x": 10, "y": 4}, + {"matrix": [4, 11], "x": 11, "y": 4}, + {"matrix": [4, 12], "x": 12, "y": 4}, + {"matrix": [4, 13], "x": 13, "y": 4}, + + {"matrix": [5, 0], "x": 0, "y": 5}, + {"matrix": [5, 1], "x": 1, "y": 5}, + {"matrix": [5, 2], "x": 2, "y": 5}, + {"matrix": [5, 3], "x": 3, "y": 5}, + {"matrix": [5, 4], "x": 4, "y": 5}, + {"matrix": [5, 5], "x": 5, "y": 5}, + {"matrix": [5, 6], "x": 6, "y": 5}, + {"matrix": [5, 7], "x": 7, "y": 5}, + {"matrix": [5, 8], "x": 8, "y": 5}, + {"matrix": [5, 9], "x": 9, "y": 5}, + {"matrix": [5, 10], "x": 10, "y": 5}, + {"matrix": [5, 11], "x": 11, "y": 5}, + {"matrix": [5, 12], "x": 12, "y": 5}, + {"matrix": [5, 13], "x": 13, "y": 5} + ] + } + } +} diff --git a/keyboards/handwired/node5_1/keymaps/default/keymap.c b/keyboards/handwired/node5_1/keymaps/default/keymap.c new file mode 100644 index 0000000000..95a01965d8 --- /dev/null +++ b/keyboards/handwired/node5_1/keymaps/default/keymap.c @@ -0,0 +1,136 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// Enable debug console printing +// https://docusaurus.qmk.fm/faq_debug +#include "print.h" + +/* +* ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ +* │ESC│F1 │F2 │F3 │F4 │F5 │ │F6 │F7 │F8 │F9 │F10│F11│F12│DEL│ +* ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┼───┤ +* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BCK│ +* ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┼───┤ +* │TAB│ Q │ W │ F │ P │ G │ │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │ +* ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┴───┤ +* │COM│ A │ R │ S │ T │ D │ │ H │ N │ E │ I │ O │ ' │RETURN │ +* ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┬───┤ +* │SHI│ Z │ X │ C │ V │ B │ │ K │ M │ , │ . │ / │PGU│ ↑ │PGD│ +* ├───┼───┼───┼───┼───┴───┤ ┌───┼───┼───┼───┼───┼───┼───┼───┼───┤ +* │CTL│SUP│ALT│FN │ SPACE │ │M1 │M3 │M2 │ALT│FN │FN │ ← │ ↓ │ → │ +* └───┴───┴───┴───┴───────┘ └───┴───┴───┴───┴───┴───┴───┴───┴───┘ +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_split( + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PGUP, KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, KC_SPACE, KC_BTN1, KC_BTN3, KC_BTN2, KC_APP, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + ) +}; + +/* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ESC│F1 │F2 │F3 │F4 │F5 │ │F6 │F7 │F8 │F9 │F10│F11│F12│DEL│ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BCK│ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┼───┤ + * │TAB│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┴───┤ + * │COM│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │RETURN │ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┬───┤ + * │SHI│ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │PGU│ ↑ │PGD│ + * ├───┼───┼───┼───┼───┴───┤ ┌───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │CTL│SUP│ALT│FN │ SPACE │ │M1 │M3 │M2 │ALT│FN │FN │ ← │ ↓ │ → │ + * └───┴───┴───┴───┴───────┘ └───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + +/* +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_split( + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PGUP, KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, KC_SPACE, KC_BTN1, KC_BTN3, KC_BTN2, KC_APP, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + + ) +}; +*/ + +void keyboard_post_init_user(void) { + // Call the post init code. + pimoroni_trackball_set_rgbw(255, 127, 0, 0); + pointing_device_set_cpi(30000); + + debug_enable=true; +} + +bool set_scrolling = false; + +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { + if (set_scrolling) { + mouse_report.h = mouse_report.x; + mouse_report.v = mouse_report.y; + mouse_report.x = 0; + mouse_report.y = 0; + } + return mouse_report; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (keycode == KC_BTN3) { + if (record->event.pressed) + { + set_scrolling = true; + pointing_device_set_cpi(8000); + pimoroni_trackball_set_rgbw(0, 0, 255, 0); + } + else + { + set_scrolling = false; + pointing_device_set_cpi(30000); + pimoroni_trackball_set_rgbw(255, 127, 0, 0); + } + } + return true; +} + +/* +uint8_t pointing_device_handle_buttons(uint8_t buttons, bool pressed, pointing_device_buttons_t button) +{ + if (pressed) { + buttons |= 1 << (button); + if (buttons) + { + dprintf("buttons: %d\npressed: %d\nbutton: %d\n", buttons, pressed, button); + } + } else { + buttons &= ~(1 << (button)); + } + + return buttons; +} +*/ + diff --git a/keyboards/handwired/node5_1/readme.md b/keyboards/handwired/node5_1/readme.md new file mode 100644 index 0000000000..e654ac658a --- /dev/null +++ b/keyboards/handwired/node5_1/readme.md @@ -0,0 +1,27 @@ +# handwired/node5_1 + + + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [user](https://github.com/user) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make handwired/node5_1:default + +Flashing example for this keyboard: + + make handwired/node5_1: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 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/handwired/node5_1/rules.mk b/keyboards/handwired/node5_1/rules.mk new file mode 100644 index 0000000000..6bdeb466a8 --- /dev/null +++ b/keyboards/handwired/node5_1/rules.mk @@ -0,0 +1,13 @@ +# Allow the keyboard to be edited with +# https://caniusevia.com +VIA_ENABLE = yes + +# Enable pimoroni trackball +# https://shop.pimoroni.com/products/trackball-breakout +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pimoroni_trackball + +# Enable RP2040-Zero WS2812 On board led +# https://www.waveshare.com/img/devkit/RP2040-Zero/RP2040-Zero-details-7.jpg +RGBLIGHT_ENABLE = yes +CONSOLE_ENABLE = yes |
