aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authornonameCCC <[email protected]>2024-09-11 13:43:36 +0800
committerGitHub <[email protected]>2024-09-10 23:43:36 -0600
commitb7729fa019833573b82d0742d9879388bfb6913c (patch)
tree447e2947de604a73756c28d029025e96f81a1599 /keyboards
parente0788d19d4c3ea3b4f2f706baaaf16912f1c2dec (diff)
downloadqmk_firmware-b7729fa019833573b82d0742d9879388bfb6913c.tar.gz
qmk_firmware-b7729fa019833573b82d0742d9879388bfb6913c.zip
[Keyboard] Add Support for PH-AC Rhythm Game Controller (#24368)
* [Keyboard] Add PHDesign PH-AC Rhythm Game Contoller Co-authored by alt-0191 * Detail Improvement * Update keyboard.json * Update readme.md * Update readme.md * Created Encoder Matrix * Posted Images * Suggested Changes * Update keyboard.json * Update readme.md * Update keyboard.json * Update readme.md
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/phdesign/phac/keyboard.json46
-rw-r--r--keyboards/phdesign/phac/keymaps/default/keymap.c22
-rw-r--r--keyboards/phdesign/phac/keymaps/default/rules.mk1
-rw-r--r--keyboards/phdesign/phac/readme.md26
4 files changed, 95 insertions, 0 deletions
diff --git a/keyboards/phdesign/phac/keyboard.json b/keyboards/phdesign/phac/keyboard.json
new file mode 100644
index 0000000000..660cf6c2ad
--- /dev/null
+++ b/keyboards/phdesign/phac/keyboard.json
@@ -0,0 +1,46 @@
+{
+ "manufacturer": "PHDesign",
+ "keyboard_name": "phac",
+ "maintainer": "nonameCCC",
+ "bootloader": "rp2040",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "GP7", "pin_b": "GP8", "resolution": 1},
+ {"pin_a": "GP10", "pin_b": "GP9", "resolution": 1}
+ ]
+ },
+ "features": {
+ "bootmagic": true,
+ "command": false,
+ "console": false,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
+ "matrix_pins": {
+ "direct": [
+ ["GP1", "GP6", "GP5", "GP4", "GP3", "GP2", "GP0"]
+ ]
+ },
+ "processor": "RP2040",
+ "url": "",
+ "usb": {
+ "device_version": "2.2.0",
+ "pid": "0x0001",
+ "vid": "0x5048"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"matrix": [0, 0], "x": 2.5, "y": 0},
+ {"matrix": [0, 1], "x": 0, "y": 1, "w": 1.5},
+ {"matrix": [0, 2], "x": 1.5, "y": 1, "w": 1.5},
+ {"matrix": [0, 3], "x": 3, "y": 1, "w": 1.5},
+ {"matrix": [0, 4], "x": 4.5, "y": 1, "w": 1.5},
+ {"matrix": [0, 5], "x": 0.375, "y": 2, "w": 2.25},
+ {"matrix": [0, 6], "x": 3.375, "y": 2, "w": 2.25}
+ ]
+ }
+ }
+}
diff --git a/keyboards/phdesign/phac/keymaps/default/keymap.c b/keyboards/phdesign/phac/keymaps/default/keymap.c
new file mode 100644
index 0000000000..630cca64a7
--- /dev/null
+++ b/keyboards/phdesign/phac/keymaps/default/keymap.c
@@ -0,0 +1,22 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+enum layer_names {
+ _BL,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BL] = LAYOUT(
+ KC_B,
+ KC_S, KC_D, KC_K, KC_L,
+ KC_V, KC_N
+ )
+};
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [_BL] = { ENCODER_CCW_CW(MS_UP, MS_DOWN), ENCODER_CCW_CW(MS_LEFT, MS_RGHT) },
+};
+#endif \ No newline at end of file
diff --git a/keyboards/phdesign/phac/keymaps/default/rules.mk b/keyboards/phdesign/phac/keymaps/default/rules.mk
new file mode 100644
index 0000000000..a40474b4d5
--- /dev/null
+++ b/keyboards/phdesign/phac/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/phdesign/phac/readme.md b/keyboards/phdesign/phac/readme.md
new file mode 100644
index 0000000000..88801888db
--- /dev/null
+++ b/keyboards/phdesign/phac/readme.md
@@ -0,0 +1,26 @@
+# phac
+
+![phac](https://i.imgur.com/bQdYGMf.png)
+
+A rhythm game controller with 7 keys and 2 encoders on it.
+
+* Keyboard Maintainer: [Xufeng Tao](https://github.com/nonameCCC)
+* Hardware Supported: RP2040 minimal system
+* Hardware Availability: https://m.tb.cn/h.gLFXLaX?tk=7DpL3TuPVxx (currently not available outside of mainland China)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make phdesign/phac:default
+
+Flashing example for this keyboard:
+
+ make phdesign/phac: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 2 ways:
+
+* **Bootmagic reset**: Hold down the key at (0,5) in the matrix (the START button) and plug in the controller
+* **Physical reset button**: Short pin hole SW1 on the back of the PCB (not recommended as the case is not easy to open)