From edeb8fd73c333b4762bfd2ddb22bd3e509b7cb09 Mon Sep 17 00:00:00 2001 From: Andreas Pfohl Date: Mon, 9 Jun 2025 10:45:33 +0200 Subject: [PATCH] Added Waveshare RP2040-Keyboard-3 (#896) - Ported Waveshare RP2040-Keyboard-3 from qmk/qmk_firmware - Added vial.json - Enabled settings and lighting options --- .../waveshare/rp2040_keyboard_3/keyboard.json | 84 +++++++++++++++++++ .../keymaps/default/keymap.c | 8 ++ .../rp2040_keyboard_3/keymaps/vial/config.h | 7 ++ .../rp2040_keyboard_3/keymaps/vial/keymap.c | 7 ++ .../rp2040_keyboard_3/keymaps/vial/rules.mk | 5 ++ .../rp2040_keyboard_3/keymaps/vial/vial.json | 16 ++++ .../waveshare/rp2040_keyboard_3/readme.md | 31 +++++++ 7 files changed, 158 insertions(+) create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keyboard.json create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keymaps/default/keymap.c create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/config.h create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/keymap.c create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/rules.mk create mode 100644 keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/vial.json create mode 100644 keyboards/waveshare/rp2040_keyboard_3/readme.md diff --git a/keyboards/waveshare/rp2040_keyboard_3/keyboard.json b/keyboards/waveshare/rp2040_keyboard_3/keyboard.json new file mode 100644 index 0000000000..71f2ffd0d4 --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keyboard.json @@ -0,0 +1,84 @@ +{ + "manufacturer": "Waveshare", + "keyboard_name": "RP2040-Keyboard-3", + "maintainer": "apfohl", + "url": "https://www.waveshare.com/wiki/RP2040-Keyboard-3", + "processor": "RP2040", + "bootloader": "rp2040", + "usb": { + "vid": "0xFEED", + "pid": "0x0000", + "device_version": "1.0.0" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "rgb_matrix": true + }, + "rgb_matrix": { + "driver": "ws2812", + "animations": { + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + {"flags": 4, "matrix": [0, 0], "x": 50, "y": 20}, + {"flags": 4, "matrix": [0, 1], "x": 112, "y": 20}, + {"flags": 4, "matrix": [0, 2], "x": 162, "y": 20} + ], + "sleep": true + }, + "ws2812": { + "driver": "vendor", + "pin": "GP18" + }, + "matrix_pins": { + "direct": [ + ["GP14", "GP13", "GP12"] + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0} + ] + } + } +} diff --git a/keyboards/waveshare/rp2040_keyboard_3/keymaps/default/keymap.c b/keyboards/waveshare/rp2040_keyboard_3/keymaps/default/keymap.c new file mode 100644 index 0000000000..4b95bf189e --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_LCTL, KC_C, KC_V) +}; diff --git a/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/config.h b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/config.h new file mode 100644 index 0000000000..1ab993cf43 --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/config.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xD0, 0xDE, 0x9D, 0xF6, 0x47, 0x87, 0x5E, 0x37} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 2 } diff --git a/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/keymap.c b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/keymap.c new file mode 100644 index 0000000000..a7426084b2 --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/keymap.c @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_LCTL, KC_C, KC_V) +}; diff --git a/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/rules.mk b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/rules.mk new file mode 100644 index 0000000000..dc947df595 --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +LTO_ENABLE = yes +RGB_MATRIX_ENABLE = yes +VIALRGB_ENABLE = yes diff --git a/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/vial.json b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/vial.json new file mode 100644 index 0000000000..0b247371bc --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/keymaps/vial/vial.json @@ -0,0 +1,16 @@ +{ + "lighting": "vialrgb", + "matrix": { + "rows": 1, + "cols": 3 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1", + "0,2" + ] + ] + } +} diff --git a/keyboards/waveshare/rp2040_keyboard_3/readme.md b/keyboards/waveshare/rp2040_keyboard_3/readme.md new file mode 100644 index 0000000000..3256ed9675 --- /dev/null +++ b/keyboards/waveshare/rp2040_keyboard_3/readme.md @@ -0,0 +1,31 @@ +# RP2040-Keyboard-3 + +![waveshare/rp2040_keyboard_3](https://i.imgur.com/HYoHwVk.jpeg) + +Ported from [qmk_firmware](https://github.com/qmk/qmk_firmware/tree/master/keyboards/waveshare/rp2040_keyboard_3). Originally created by [zvecr](https://github.com/zvecr). + +RP2040-Keyboard-3 is a high-performance, cost-effective three-key keyboard development board designed by Waveshare. +It features programmable custom key functions and RGB lighting effects. + +* Keyboard Maintainer: [apfohl](https://github.com/apfohl) +* Hardware Supported: +* Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb waveshare/rp2040_keyboard_3 -km vial + +Flashing example for this keyboard: + + qmk flash -kb waveshare/rp2040_keyboard_3 -km vial + +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 (top left key) and plug in the keyboard +* **Physical reset button**: Press and hold the `BOOT` button, then briefly press the `RESET` button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available +