From eb0ce41e78cb858d895dbbdda5026aab98cf7d02 Mon Sep 17 00:00:00 2001 From: Dam Vu Duy Date: Tue, 5 Dec 2023 15:29:12 +0700 Subject: [Keyboard] Add Coban Pad 9A (#22456) --- keyboards/coban/pad9a/config.h | 20 +++++++ keyboards/coban/pad9a/info.json | 76 ++++++++++++++++++++++++++ keyboards/coban/pad9a/keymaps/default/keymap.c | 31 +++++++++++ keyboards/coban/pad9a/keymaps/default/rules.mk | 1 + keyboards/coban/pad9a/keymaps/via/keymap.c | 31 +++++++++++ keyboards/coban/pad9a/keymaps/via/rules.mk | 3 + keyboards/coban/pad9a/readme.md | 24 ++++++++ keyboards/coban/pad9a/rules.mk | 0 8 files changed, 186 insertions(+) create mode 100644 keyboards/coban/pad9a/config.h create mode 100644 keyboards/coban/pad9a/info.json create mode 100644 keyboards/coban/pad9a/keymaps/default/keymap.c create mode 100644 keyboards/coban/pad9a/keymaps/default/rules.mk create mode 100644 keyboards/coban/pad9a/keymaps/via/keymap.c create mode 100644 keyboards/coban/pad9a/keymaps/via/rules.mk create mode 100644 keyboards/coban/pad9a/readme.md create mode 100644 keyboards/coban/pad9a/rules.mk (limited to 'keyboards/coban/pad9a') diff --git a/keyboards/coban/pad9a/config.h b/keyboards/coban/pad9a/config.h new file mode 100644 index 0000000000..7b465d2eef --- /dev/null +++ b/keyboards/coban/pad9a/config.h @@ -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 . + */ + +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U diff --git a/keyboards/coban/pad9a/info.json b/keyboards/coban/pad9a/info.json new file mode 100644 index 0000000000..1b5efb3456 --- /dev/null +++ b/keyboards/coban/pad9a/info.json @@ -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} + ] + } + } +} diff --git a/keyboards/coban/pad9a/keymaps/default/keymap.c b/keyboards/coban/pad9a/keymaps/default/keymap.c new file mode 100644 index 0000000000..9ef5fc54d7 --- /dev/null +++ b/keyboards/coban/pad9a/keymaps/default/keymap.c @@ -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 . + */ + +#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 diff --git a/keyboards/coban/pad9a/keymaps/default/rules.mk b/keyboards/coban/pad9a/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/coban/pad9a/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/coban/pad9a/keymaps/via/keymap.c b/keyboards/coban/pad9a/keymaps/via/keymap.c new file mode 100644 index 0000000000..9ef5fc54d7 --- /dev/null +++ b/keyboards/coban/pad9a/keymaps/via/keymap.c @@ -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 . + */ + +#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 diff --git a/keyboards/coban/pad9a/keymaps/via/rules.mk b/keyboards/coban/pad9a/keymaps/via/rules.mk new file mode 100644 index 0000000000..1189f4ad19 --- /dev/null +++ b/keyboards/coban/pad9a/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/coban/pad9a/readme.md b/keyboards/coban/pad9a/readme.md new file mode 100644 index 0000000000..3abb63e126 --- /dev/null +++ b/keyboards/coban/pad9a/readme.md @@ -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 diff --git a/keyboards/coban/pad9a/rules.mk b/keyboards/coban/pad9a/rules.mk new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3