Skip to content

Commit

Permalink
[Keyboard] Add Support for PH-AC Rhythm Game Controller (qmk#24368)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
nonameCCC authored Sep 11, 2024
1 parent e0788d1 commit b7729fa
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
46 changes: 46 additions & 0 deletions keyboards/phdesign/phac/keyboard.json
Original file line number Diff line number Diff line change
@@ -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}
]
}
}
}
22 changes: 22 additions & 0 deletions keyboards/phdesign/phac/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions keyboards/phdesign/phac/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
26 changes: 26 additions & 0 deletions keyboards/phdesign/phac/readme.md
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit b7729fa

Please sign in to comment.