From 7d9b3fe30f9868f9ee8c787419565bdeaf412c26 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Mon, 11 Nov 2024 16:07:26 -0600 Subject: [PATCH 01/11] Add Hotdog Pad --- keyboards/onnenon/hotdog_pad/keyboard.json | 60 +++++++++++++++++++ .../hotdog_pad/keymaps/default/keymap.c | 18 ++++++ keyboards/onnenon/hotdog_pad/readme.md | 24 ++++++++ 3 files changed, 102 insertions(+) create mode 100644 keyboards/onnenon/hotdog_pad/keyboard.json create mode 100644 keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c create mode 100644 keyboards/onnenon/hotdog_pad/readme.md diff --git a/keyboards/onnenon/hotdog_pad/keyboard.json b/keyboards/onnenon/hotdog_pad/keyboard.json new file mode 100644 index 000000000000..f905741df2fa --- /dev/null +++ b/keyboards/onnenon/hotdog_pad/keyboard.json @@ -0,0 +1,60 @@ +{ + "manufacturer": "onnenon", + "keyboard_name": "Hotdog Pad", + "maintainer": "onnenon", + "processor": "RP2040", + "bootloader": "rp2040", + "dynamic_keymap": { + "layer_count": 4 + }, + "matrix_pins": { + "direct": [["GP1", "GP2", "GP4", "GP6", "GP0"]] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x0001", + "vid": "0x4F4E" + }, + "features": { + "caps_word": true, + "encoder": true, + "encoder_map": true, + "rgblight": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "combos": true + }, + "encoder": { + "rotary": [{ "pin_a": "GP28", "pin_b": "GP29" }] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 0, "y": 0, "matrix": [0, 0] }, + { "x": 1, "y": 0, "matrix": [0, 1] }, + { "x": 2, "y": 0, "matrix": [0, 2] }, + { "x": 3, "y": 0, "matrix": [0, 3] }, + { "x": 4, "y": 0, "matrix": [0, 4] } + ] + } + }, + "ws2812": { + "pin": "GP12", + "driver": "vendor" + }, + "rgblight": { + "led_count": 1, + "max_brightness": 185, + "animations": { + "breathing": true, + "rainbow_mood": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + } + } +} diff --git a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c new file mode 100644 index 000000000000..e8d749c3bbf6 --- /dev/null +++ b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +// Copyright 2024 Stephen Onnen (@onnenon) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_A, KC_B, KC_C, KC_D, KC_MUTE)}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, +}; +#endif + +// Enable the power pin for the Xiao Seeed rp2040 onboard NeoPixel +void matrix_init_kb(void) { + gpio_set_pin_output(GP11); + gpio_write_pin_high(GP11); +} diff --git a/keyboards/onnenon/hotdog_pad/readme.md b/keyboards/onnenon/hotdog_pad/readme.md new file mode 100644 index 000000000000..c3b0699c21da --- /dev/null +++ b/keyboards/onnenon/hotdog_pad/readme.md @@ -0,0 +1,24 @@ +# Hotdog Pad + +* Keyboard Maintainer: [Stephen Onnen](https://github.com/onnenon) +* Hardware Supported: Seeed Studio XIAO RP2040 +* Hardware Availability: https://github.com/onnenon/hotdog_pad + +Make example for this keyboard (after setting up your build environment): + + make onnenon/hotdog_pad:default + +Flashing example for this keyboard: + + make onnenon/hotdog_pad: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 + From 144fc392588fa11006c6cf58ee0f914e10320257 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 16:50:41 -0600 Subject: [PATCH 02/11] remove encoder_map feature --- keyboards/onnenon/hotdog_pad/keyboard.json | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/onnenon/hotdog_pad/keyboard.json b/keyboards/onnenon/hotdog_pad/keyboard.json index f905741df2fa..b0d5d133ff5b 100644 --- a/keyboards/onnenon/hotdog_pad/keyboard.json +++ b/keyboards/onnenon/hotdog_pad/keyboard.json @@ -18,7 +18,6 @@ "features": { "caps_word": true, "encoder": true, - "encoder_map": true, "rgblight": true, "extrakey": true, "mousekey": true, From 96f282d7503d5332bc52426fe9ee9aa105769d4e Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 16:54:43 -0600 Subject: [PATCH 03/11] Add rules.mk --- keyboards/onnenon/hotdog_pad/rules.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/onnenon/hotdog_pad/rules.mk diff --git a/keyboards/onnenon/hotdog_pad/rules.mk b/keyboards/onnenon/hotdog_pad/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/onnenon/hotdog_pad/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes From 7c1574864a22cc599de880005140408c7573d5c9 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 16:58:34 -0600 Subject: [PATCH 04/11] move rules.mk into keymap --- keyboards/onnenon/hotdog_pad/{ => keymaps/default}/rules.mk | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/onnenon/hotdog_pad/{ => keymaps/default}/rules.mk (100%) diff --git a/keyboards/onnenon/hotdog_pad/rules.mk b/keyboards/onnenon/hotdog_pad/keymaps/default/rules.mk similarity index 100% rename from keyboards/onnenon/hotdog_pad/rules.mk rename to keyboards/onnenon/hotdog_pad/keymaps/default/rules.mk From 52c2ce7d73c8de03d01eaa7cbc3680e80665dd3a Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 19:16:34 -0600 Subject: [PATCH 05/11] Update keyboards/onnenon/hotdog_pad/keyboard.json Co-authored-by: Joel Challis --- keyboards/onnenon/hotdog_pad/keyboard.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/onnenon/hotdog_pad/keyboard.json b/keyboards/onnenon/hotdog_pad/keyboard.json index b0d5d133ff5b..bc86b36fc435 100644 --- a/keyboards/onnenon/hotdog_pad/keyboard.json +++ b/keyboards/onnenon/hotdog_pad/keyboard.json @@ -4,9 +4,6 @@ "maintainer": "onnenon", "processor": "RP2040", "bootloader": "rp2040", - "dynamic_keymap": { - "layer_count": 4 - }, "matrix_pins": { "direct": [["GP1", "GP2", "GP4", "GP6", "GP0"]] }, From 8a88a1124aa9db82c0b0c9ba3637221bd6cbfcf0 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 19:16:48 -0600 Subject: [PATCH 06/11] Update keyboards/onnenon/hotdog_pad/keyboard.json Co-authored-by: Joel Challis --- keyboards/onnenon/hotdog_pad/keyboard.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/keyboards/onnenon/hotdog_pad/keyboard.json b/keyboards/onnenon/hotdog_pad/keyboard.json index bc86b36fc435..a6bc0ac0cf48 100644 --- a/keyboards/onnenon/hotdog_pad/keyboard.json +++ b/keyboards/onnenon/hotdog_pad/keyboard.json @@ -13,13 +13,10 @@ "vid": "0x4F4E" }, "features": { - "caps_word": true, "encoder": true, "rgblight": true, "extrakey": true, - "mousekey": true, - "nkro": true, - "combos": true + "mousekey": true }, "encoder": { "rotary": [{ "pin_a": "GP28", "pin_b": "GP29" }] From 6f7f670306dc802bfa2bcf891969d782418cc8d4 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 19:16:56 -0600 Subject: [PATCH 07/11] Update keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c Co-authored-by: Joel Challis --- keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c index e8d749c3bbf6..c7137de2560c 100644 --- a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c +++ b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c @@ -3,7 +3,9 @@ #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_A, KC_B, KC_C, KC_D, KC_MUTE)}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_A, KC_B, KC_C, KC_D, KC_MUTE) +}; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { From 614eeaae8a828739792613c1270a7d417aa3211b Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 19:17:53 -0600 Subject: [PATCH 08/11] Update keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c Co-authored-by: Joel Challis --- keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c index c7137de2560c..494d71ba27ce 100644 --- a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c +++ b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c @@ -12,9 +12,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [0] = {ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, }; #endif - -// Enable the power pin for the Xiao Seeed rp2040 onboard NeoPixel -void matrix_init_kb(void) { - gpio_set_pin_output(GP11); - gpio_write_pin_high(GP11); -} From 4d005235526d09209e3ccfd75733ac986acf319c Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 19:18:30 -0600 Subject: [PATCH 09/11] add hotdog_pad.c --- keyboards/onnenon/hotdog_pad/hotdog_pad.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/onnenon/hotdog_pad/hotdog_pad.c diff --git a/keyboards/onnenon/hotdog_pad/hotdog_pad.c b/keyboards/onnenon/hotdog_pad/hotdog_pad.c new file mode 100644 index 000000000000..b3d100e18184 --- /dev/null +++ b/keyboards/onnenon/hotdog_pad/hotdog_pad.c @@ -0,0 +1,12 @@ +// Copyright 2024 Stephen Onnen (@onnenon) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +void matrix_init_kb(void) { + // Enable the power pin for the Xiao Seeed rp2040 onboard NeoPixel + gpio_set_pin_output(GP11); + gpio_write_pin_high(GP11); + + matrix_init_user(); +} From b9d3ca4551d3e4e330497317456146ac49edfb73 Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Wed, 27 Nov 2024 21:18:49 -0600 Subject: [PATCH 10/11] fix reversed encoder pins --- keyboards/onnenon/hotdog_pad/keyboard.json | 2 +- keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/onnenon/hotdog_pad/keyboard.json b/keyboards/onnenon/hotdog_pad/keyboard.json index a6bc0ac0cf48..3831e7afedc9 100644 --- a/keyboards/onnenon/hotdog_pad/keyboard.json +++ b/keyboards/onnenon/hotdog_pad/keyboard.json @@ -19,7 +19,7 @@ "mousekey": true }, "encoder": { - "rotary": [{ "pin_a": "GP28", "pin_b": "GP29" }] + "rotary": [{ "pin_a": "GP29", "pin_b": "GP28" }] }, "layouts": { "LAYOUT": { diff --git a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c index 494d71ba27ce..93702490981c 100644 --- a/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c +++ b/keyboards/onnenon/hotdog_pad/keymaps/default/keymap.c @@ -9,6 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [0] = {ENCODER_CCW_CW(KC_VOLU, KC_VOLD)}, + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, }; #endif From bd8fea797c8709c96c1d22e8d50cef992906f09b Mon Sep 17 00:00:00 2001 From: Stephen Onnen Date: Thu, 28 Nov 2024 08:47:01 -0600 Subject: [PATCH 11/11] Update keyboards/onnenon/hotdog_pad/hotdog_pad.c Co-authored-by: Joel Challis --- keyboards/onnenon/hotdog_pad/hotdog_pad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/onnenon/hotdog_pad/hotdog_pad.c b/keyboards/onnenon/hotdog_pad/hotdog_pad.c index b3d100e18184..c48274fb5548 100644 --- a/keyboards/onnenon/hotdog_pad/hotdog_pad.c +++ b/keyboards/onnenon/hotdog_pad/hotdog_pad.c @@ -3,10 +3,10 @@ #include "quantum.h" -void matrix_init_kb(void) { +void keyboard_pre_init_kb(void) { // Enable the power pin for the Xiao Seeed rp2040 onboard NeoPixel gpio_set_pin_output(GP11); gpio_write_pin_high(GP11); - matrix_init_user(); + keyboard_pre_init_user(); }