Browse Source

Add pad9 keyboard (#26051)

prkrln 3 months ago
parent
commit
504533b3b4

+ 48 - 0
keyboards/pad9/keyboard.json

@@ -0,0 +1,48 @@
+{
+    "manufacturer": "prkrln",
+    "keyboard_name": "pad9",
+    "maintainer": "prkrln",
+    "diode_direction": "COL2ROW",
+    "bootloader": "rp2040",
+    "processor": "RP2040",
+    "features": {
+        "bootmagic": true,
+        "encoder": true,
+        "extrakey": true,
+        "mousekey": true,
+        "nkro": true
+    },
+    "encoder": {
+        "rotary": [
+            {"pin_a": "GP27", "pin_b": "GP26"}
+        ]
+    },
+    "matrix_pins": {
+        "direct": [
+            ["GP6", "GP1", "GP3"],
+            ["GP29", "GP7", "GP4"],
+            ["GP28", "GP0", "GP2"]
+        ]
+    },
+    "usb": {
+        "device_version": "1.0.0",
+        "pid": "0x5009",
+        "vid": "0x504B"
+    },
+    "community_layouts": ["ortho_3x3"],
+    "layouts": {
+        "LAYOUT_ortho_3x3": {
+            "layout": [
+                {"matrix": [0, 0], "x": 0, "y": 0, "encoder": 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}
+            ]
+        }
+    }
+}

+ 18 - 0
keyboards/pad9/keymaps/default/keymap.c

@@ -0,0 +1,18 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+    [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)  },
+};
+#endif
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = LAYOUT_ortho_3x3(
+        KC_1,    KC_2,    KC_3,
+        KC_4,    KC_5,    KC_6,
+        KC_7,    KC_8,    KC_9
+    )
+};

+ 1 - 0
keyboards/pad9/keymaps/default/rules.mk

@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes

+ 26 - 0
keyboards/pad9/readme.md

@@ -0,0 +1,26 @@
+# pad9
+
+![pad9](https://github.com/prkrln/pad9/blob/main/pad9.jpg)
+A cheap small macropad with the mcu underneath the switches.
+
+* Keyboard Maintainer: [prkrln](https://github.com/prkrln)
+* Hardware Supported: [XAIO RP2040](https://wiki.seeedstudio.com/XIAO-RP2040)
+* Hardware Availability: [Seeed](https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html), [Digikey](https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102010428/14672129)
+
+Make example for this keyboard (after setting up your build environment):
+
+    make pad9:default
+
+Flashing example for this keyboard:
+
+    make pad9: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 encoder or top left key and plug in the keyboard
+* **Physical reset button**: Briefly press the button on the back of the MCU
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available