Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add Support for PH-AC Rhythm Game Controller #24368

Merged
merged 17 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions keyboards/phdesign/phac/keyboard.json
nonameCCC marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"manufacturer": "PHDesign",
"keyboard_name": "phac",
"maintainer": "nonameCCC",
"bootloader": "rp2040",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"encoder": 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}
]
}
},
"encoder": {
"rotary": [
{
"pin_a": "GP7",
"pin_b": "GP8",
"resolution": 1
},
{
"pin_a": "GP10",
"pin_b": "GP9",
"resolution": 1
}
]
}
}
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 China Mainland, as we could not afford the international express fee)
nonameCCC marked this conversation as resolved.
Show resolved Hide resolved

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)