Skip to content

Commit

Permalink
[Keyboard] Add Coban Pad 9A (qmk#22456)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanDam authored and zgagnon committed Dec 15, 2023
1 parent d40b33c commit 2119701
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 0 deletions.
20 changes: 20 additions & 0 deletions keyboards/coban/pad9a/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* Copyright 2023 RyanDam (https://github.com/RyanDam)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
76 changes: 76 additions & 0 deletions keyboards/coban/pad9a/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"manufacturer": "Coban Stationery",
"keyboard_name": "Coban Pad 9A",
"maintainer": "Coban Stationery",
"bootloader": "rp2040",
"encoder": {
"enabled": true,
"rotary": [
{"pin_a": "GP21", "pin_b": "GP20"},
{"pin_a": "GP1", "pin_b": "GP0"}
]
},
"features": {
"bootmagic": true,
"encoder": true,
"extrakey": true,
"mousekey": true,
"rgb_matrix": true
},
"matrix_pins": {
"direct": [
["GP22", "GP2", "GP19", "GP16", "GP10", "GP18", "GP17", "GP11"]
]
},
"name": "Coban Pad 9A",
"processor": "RP2040",
"rgb_matrix": {
"animations": {
"breathing": true,
"cycle_all": true,
"digital_rain": true,
"pixel_rain": true,
"rainbow_beacon": true,
"raindrops": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"splash": true,
"typing_heatmap": true
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 4], "x": 0, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 112, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 224, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 64, "y": 64, "flags": 4},
{"matrix": [0, 6], "x": 112, "y": 64, "flags": 4},
{"matrix": [0, 7], "x": 224, "y": 64, "flags": 4}
],
"max_brightness": 150
},
"url": "https://cobanstationery.com",
"usb": {
"device_version": "1.2.0",
"pid": "0xCC9A",
"vid": "0xCB3A"
},
"ws2812": {
"driver": "vendor",
"pin": "GP12"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "push_left", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "push_right", "matrix": [0, 1], "x": 2, "y": 0},
{"label": "key_1", "matrix": [0, 2], "x": 0, "y": 1},
{"label": "key_2", "matrix": [0, 3], "x": 1, "y": 1},
{"label": "key_3", "matrix": [0, 4], "x": 2, "y": 1},
{"label": "key_4", "matrix": [0, 5], "x": 0, "y": 2},
{"label": "key_5", "matrix": [0, 6], "x": 1, "y": 2},
{"label": "key_6", "matrix": [0, 7], "x": 2, "y": 3}
]
}
}
}
31 changes: 31 additions & 0 deletions keyboards/coban/pad9a/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2023 RyanDam (https://github.com/RyanDam)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MPLY, KC_ENT,
KC_MPRV, KC_UP, KC_MNXT,
KC_LEFT, KC_DOWN, KC_RIGHT
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) },
};
#endif
1 change: 1 addition & 0 deletions keyboards/coban/pad9a/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
31 changes: 31 additions & 0 deletions keyboards/coban/pad9a/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2023 RyanDam (https://github.com/RyanDam)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MPLY, KC_ENT,
KC_MPRV, KC_UP, KC_MNXT,
KC_LEFT, KC_DOWN, KC_RIGHT
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_WH_U, KC_WH_D) },
};
#endif
3 changes: 3 additions & 0 deletions keyboards/coban/pad9a/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
ENCODER_MAP_ENABLE = yes
24 changes: 24 additions & 0 deletions keyboards/coban/pad9a/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Coban Pad 9A

![Coban Pad 9A](https://i.imgur.com/5svg1RMh.jpeg)

Small macro keyboard with 6 hotswapable button and 2 EC11 rotary encoder

* Keyboard Maintainer: [RyanDam](https://github.com/RyanDam)
* Hardware Supported: Coban Pad 9A

Make example for this keyboard (after setting up your build environment):

make coban/pad9a:default

Flashing example for this keyboard:

make coban/pad9a: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:

* **boot button**: Hold the BOOT button on the back of the PCB while plug in usb cable
Empty file added keyboards/coban/pad9a/rules.mk
Empty file.

0 comments on commit 2119701

Please sign in to comment.