diff options
| author | duoshock <33636898+duoshock@users.noreply.github.com> | 2021-03-24 02:00:07 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-24 13:00:07 +1100 |
| commit | 7b07ce3fef7481a2a026f54b4d6c4c5762a2c110 (patch) | |
| tree | 2e29b4e185a352027ed97f811583fcac119ab0c8 /keyboards/merge | |
| parent | d395c81606b713efc1ec28d6b2085f1c8c0b8d75 (diff) | |
| download | qmk_firmware-7b07ce3fef7481a2a026f54b4d6c4c5762a2c110.tar.gz qmk_firmware-7b07ce3fef7481a2a026f54b4d6c4c5762a2c110.zip | |
Add UC-1 keypad (#11926)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: online <33636898+online@users.noreply.github.com>
Diffstat (limited to 'keyboards/merge')
| -rw-r--r-- | keyboards/merge/uc1/config.h | 47 | ||||
| -rw-r--r-- | keyboards/merge/uc1/info.json | 17 | ||||
| -rw-r--r-- | keyboards/merge/uc1/keymaps/default/keymap.c | 40 | ||||
| -rw-r--r-- | keyboards/merge/uc1/keymaps/default/readme.md | 5 | ||||
| -rw-r--r-- | keyboards/merge/uc1/keymaps/via/keymap.c | 53 | ||||
| -rw-r--r-- | keyboards/merge/uc1/keymaps/via/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/merge/uc1/readme.md | 14 | ||||
| -rw-r--r-- | keyboards/merge/uc1/rules.mk | 23 | ||||
| -rw-r--r-- | keyboards/merge/uc1/uc1.c | 17 | ||||
| -rw-r--r-- | keyboards/merge/uc1/uc1.h | 27 |
10 files changed, 245 insertions, 0 deletions
diff --git a/keyboards/merge/uc1/config.h b/keyboards/merge/uc1/config.h new file mode 100644 index 000000000..f33d7a654 --- /dev/null +++ b/keyboards/merge/uc1/config.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* Copyright 2021 duoshock | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "config_common.h" | ||
| 18 | |||
| 19 | #define VENDOR_ID 0x4D65 | ||
| 20 | #define PRODUCT_ID 0x5543 | ||
| 21 | #define DEVICE_VER 0x0001 | ||
| 22 | #define MANUFACTURER Merge | ||
| 23 | #define PRODUCT UC-1 | ||
| 24 | |||
| 25 | /* key matrix size */ | ||
| 26 | #define MATRIX_ROWS 2 | ||
| 27 | #define MATRIX_COLS 2 | ||
| 28 | |||
| 29 | #define MATRIX_ROW_PINS { B1, B2 } | ||
| 30 | #define MATRIX_COL_PINS { B3, B4 } | ||
| 31 | #define UNUSED_PINS | ||
| 32 | |||
| 33 | #define RGB_DI_PIN B5 | ||
| 34 | #define RGBLED_NUM 12 | ||
| 35 | #define RGBLIGHT_ANIMATIONS | ||
| 36 | #define RGBLIGHT_HUE_STEP 10 | ||
| 37 | #define RGBLIGHT_SAT_STEP 10 | ||
| 38 | #define RGBLIGHT_VAL_STEP 10 | ||
| 39 | #define RGBLIGHT_LIMIT_VAL 255 | ||
| 40 | #define RGBLIGHT_SLEEP | ||
| 41 | |||
| 42 | /* COL2ROW or ROW2COL */ | ||
| 43 | #define DIODE_DIRECTION COL2ROW | ||
| 44 | |||
| 45 | #define ENCODERS_PAD_A { F5 } | ||
| 46 | #define ENCODERS_PAD_B { F6 } | ||
| 47 | #define ENCODER_RESOLUTION 4 | ||
diff --git a/keyboards/merge/uc1/info.json b/keyboards/merge/uc1/info.json new file mode 100644 index 000000000..b1fbc5935 --- /dev/null +++ b/keyboards/merge/uc1/info.json | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "UC-1", | ||
| 3 | "url": "https://mergedesign.store/products/uc-1", | ||
| 4 | "maintainer": "duoshock", | ||
| 5 | "width": 4.25, | ||
| 6 | "height": 1, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"0", "x":0, "y":0}, | ||
| 11 | {"label":"1", "x":1.25, "y":0}, | ||
| 12 | {"label":"2", "x":2.25, "y":0}, | ||
| 13 | {"label":"3", "x":3.25, "y":0} | ||
| 14 | ] | ||
| 15 | } | ||
| 16 | } | ||
| 17 | } | ||
diff --git a/keyboards/merge/uc1/keymaps/default/keymap.c b/keyboards/merge/uc1/keymaps/default/keymap.c new file mode 100644 index 000000000..5a19a9de7 --- /dev/null +++ b/keyboards/merge/uc1/keymaps/default/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2021 duoshock | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | /* LAYER 0 | ||
| 22 | * ,---------------------------------. | ||
| 23 | * | Encoder | 1 | 2 | 3 | | ||
| 24 | * `---------------------------------' | ||
| 25 | */ | ||
| 26 | [0] = LAYOUT( | ||
| 27 | KC_MUTE, KC_1, KC_2, KC_3 | ||
| 28 | ), | ||
| 29 | }; | ||
| 30 | |||
| 31 | |||
| 32 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 33 | if (index == 0) { | ||
| 34 | if (clockwise) { | ||
| 35 | tap_code(KC_VOLU); | ||
| 36 | } else { | ||
| 37 | tap_code(KC_VOLD); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } \ No newline at end of file | ||
diff --git a/keyboards/merge/uc1/keymaps/default/readme.md b/keyboards/merge/uc1/keymaps/default/readme.md new file mode 100644 index 000000000..38145e2aa --- /dev/null +++ b/keyboards/merge/uc1/keymaps/default/readme.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # Default UC-1 Layout | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | This is the default layout that comes flashed on every UC-1. | ||
diff --git a/keyboards/merge/uc1/keymaps/via/keymap.c b/keyboards/merge/uc1/keymaps/via/keymap.c new file mode 100644 index 000000000..6bc732e61 --- /dev/null +++ b/keyboards/merge/uc1/keymaps/via/keymap.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* Copyright 2021 duoshock | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | /* LAYER 0 | ||
| 22 | * ,---------------------------------. | ||
| 23 | * | Encoder | 1 | 2 | 3 | | ||
| 24 | * `---------------------------------' | ||
| 25 | */ | ||
| 26 | [0] = LAYOUT( | ||
| 27 | KC_MUTE, KC_1, KC_2, KC_3 | ||
| 28 | ), | ||
| 29 | |||
| 30 | [1] = LAYOUT( | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 32 | ), | ||
| 33 | |||
| 34 | [2] = LAYOUT( | ||
| 35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 36 | ), | ||
| 37 | |||
| 38 | [3] = LAYOUT( | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 40 | ) | ||
| 41 | |||
| 42 | }; | ||
| 43 | |||
| 44 | |||
| 45 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 46 | if (index == 0) { | ||
| 47 | if (clockwise) { | ||
| 48 | tap_code(KC_VOLU); | ||
| 49 | } else { | ||
| 50 | tap_code(KC_VOLD); | ||
| 51 | } | ||
| 52 | } | ||
| 53 | } \ No newline at end of file | ||
diff --git a/keyboards/merge/uc1/keymaps/via/rules.mk b/keyboards/merge/uc1/keymaps/via/rules.mk new file mode 100644 index 000000000..43061db1d --- /dev/null +++ b/keyboards/merge/uc1/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/merge/uc1/readme.md b/keyboards/merge/uc1/readme.md new file mode 100644 index 000000000..730b97516 --- /dev/null +++ b/keyboards/merge/uc1/readme.md | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | # UC-1 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 3 keys macro pad with 1 encoders made and sold by Merge. [Product page](https://mergedesign.store/products/uc-1) | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [duoshock](https://github.com/duoshock) | ||
| 8 | * Hardware Availability: [Merge Store](https://mergedesign.store/products/uc-1) | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make merge/uc1:default | ||
| 13 | |||
| 14 | 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). \ No newline at end of file | ||
diff --git a/keyboards/merge/uc1/rules.mk b/keyboards/merge/uc1/rules.mk new file mode 100644 index 000000000..d1ce4736b --- /dev/null +++ b/keyboards/merge/uc1/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/merge/uc1/uc1.c b/keyboards/merge/uc1/uc1.c new file mode 100644 index 000000000..d23e7426d --- /dev/null +++ b/keyboards/merge/uc1/uc1.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 duoshock | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "uc1.h" | ||
diff --git a/keyboards/merge/uc1/uc1.h b/keyboards/merge/uc1/uc1.h new file mode 100644 index 000000000..84e655d1b --- /dev/null +++ b/keyboards/merge/uc1/uc1.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 duoshock | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | k11, k00, k01, k10 \ | ||
| 23 | ) \ | ||
| 24 | { \ | ||
| 25 | { k00, k01 }, \ | ||
| 26 | { k10, k11 } \ | ||
| 27 | } | ||
