diff options
| -rw-r--r-- | keyboards/tgr/tris/config.h | 50 | ||||
| -rw-r--r-- | keyboards/tgr/tris/info.json | 16 | ||||
| -rw-r--r-- | keyboards/tgr/tris/keymaps/default/keymap.c | 47 | ||||
| -rw-r--r-- | keyboards/tgr/tris/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/tgr/tris/keymaps/via/keymap.c | 57 | ||||
| -rw-r--r-- | keyboards/tgr/tris/keymaps/via/rules.mk | 4 | ||||
| -rw-r--r-- | keyboards/tgr/tris/readme.md | 19 | ||||
| -rw-r--r-- | keyboards/tgr/tris/rules.mk | 26 | ||||
| -rw-r--r-- | keyboards/tgr/tris/tris.c | 33 | ||||
| -rw-r--r-- | keyboards/tgr/tris/tris.h | 63 |
10 files changed, 316 insertions, 0 deletions
diff --git a/keyboards/tgr/tris/config.h b/keyboards/tgr/tris/config.h new file mode 100644 index 000000000..32149087c --- /dev/null +++ b/keyboards/tgr/tris/config.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 halfenergized | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | #define VENDOR_ID 0x5447 //TG | ||
| 23 | #define PRODUCT_ID 0x5452 //TR | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER TGR | ||
| 26 | #define PRODUCT Tris | ||
| 27 | #define DESCRIPTION Numpad by TGR | ||
| 28 | |||
| 29 | #define MATRIX_ROWS 6 | ||
| 30 | #define MATRIX_COLS 4 | ||
| 31 | |||
| 32 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } | ||
| 33 | #define MATRIX_COL_PINS { A3, A2, A1, A0 } | ||
| 34 | |||
| 35 | #define DIODE_DIRECTION COL2ROW | ||
| 36 | #define DEBOUNCE 5 | ||
| 37 | |||
| 38 | #define BACKLIGHT_PIN D4 | ||
| 39 | #define BACKLIGHT_LEVELS 3 | ||
| 40 | |||
| 41 | #define RGBLED_NUM 6 | ||
| 42 | #define RGBLIGHT_ANIMATIONS | ||
| 43 | |||
| 44 | /* key combination for magic key command */ | ||
| 45 | /* defined by default; to change, uncomment and set to the combination you want */ | ||
| 46 | // #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) | ||
| 47 | |||
| 48 | /* Bootmagic Lite key configuration */ | ||
| 49 | // #define BOOTMAGIC_LITE_ROW 0 | ||
| 50 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/tgr/tris/info.json b/keyboards/tgr/tris/info.json new file mode 100644 index 000000000..401bd6e30 --- /dev/null +++ b/keyboards/tgr/tris/info.json | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TGR Tris", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "halfenergized", | ||
| 5 | "width": 4, | ||
| 6 | "height": 6, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_ortho_6x4": { | ||
| 9 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25}, {"x":3, "y":5.25}] | ||
| 10 | }, | ||
| 11 | |||
| 12 | "LAYOUT_numpad_6x4": { | ||
| 13 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":2.25, "h":2}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "y":5.25}, {"x":3, "y":4.25, "h":2}] | ||
| 14 | } | ||
| 15 | } | ||
| 16 | } | ||
diff --git a/keyboards/tgr/tris/keymaps/default/keymap.c b/keyboards/tgr/tris/keymaps/default/keymap.c new file mode 100644 index 000000000..5a4e47a69 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/default/keymap.c | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* Copyright 2020 halfenergized | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [0] = LAYOUT_numpad_6x4( | ||
| 22 | KC_ESC, KC_TAB, MO(1), KC_BSPC, | ||
| 23 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 24 | KC_P7, KC_P8, KC_P9, | ||
| 25 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 26 | KC_P1, KC_P2, KC_P3, | ||
| 27 | KC_P0, KC_PDOT, KC_PENT | ||
| 28 | ), | ||
| 29 | |||
| 30 | [1] = LAYOUT_numpad_6x4( | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, MO(2), | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_HOME, KC_UP, KC_PGUP, | ||
| 34 | KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, | ||
| 35 | KC_END, KC_DOWN, KC_PGDN, | ||
| 36 | KC_INS, KC_DEL, KC_TRNS | ||
| 37 | ), | ||
| 38 | |||
| 39 | [2] = LAYOUT_numpad_6x4( | ||
| 40 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 42 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 44 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 46 | ) | ||
| 47 | }; | ||
diff --git a/keyboards/tgr/tris/keymaps/default/readme.md b/keyboards/tgr/tris/keymaps/default/readme.md new file mode 100644 index 000000000..660966577 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for tris | |||
diff --git a/keyboards/tgr/tris/keymaps/via/keymap.c b/keyboards/tgr/tris/keymaps/via/keymap.c new file mode 100644 index 000000000..bfa8dbc59 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/keymap.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* Copyright 2020 halfenergized | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [0] = LAYOUT_numpad_6x4( | ||
| 22 | KC_ESC, KC_TAB, MO(1), KC_BSPC, | ||
| 23 | KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 24 | KC_P7, KC_P8, KC_P9, | ||
| 25 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 26 | KC_P1, KC_P2, KC_P3, | ||
| 27 | KC_P0, KC_PDOT, KC_PENT | ||
| 28 | ), | ||
| 29 | |||
| 30 | [1] = LAYOUT_numpad_6x4( | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, MO(2), | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_HOME, KC_UP, KC_PGUP, | ||
| 34 | KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, | ||
| 35 | KC_END, KC_DOWN, KC_PGDN, | ||
| 36 | KC_INS, KC_DEL, KC_TRNS | ||
| 37 | ), | ||
| 38 | |||
| 39 | [2] = LAYOUT_numpad_6x4( | ||
| 40 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 42 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 44 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 46 | ), | ||
| 47 | |||
| 48 | [3] = LAYOUT_numpad_6x4( | ||
| 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 51 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 53 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 54 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 55 | ) | ||
| 56 | |||
| 57 | }; | ||
diff --git a/keyboards/tgr/tris/keymaps/via/rules.mk b/keyboards/tgr/tris/keymaps/via/rules.mk new file mode 100644 index 000000000..7d47e6b72 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/rules.mk | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
| 3 | |||
| 4 | EXTRAKEY_ENABLE = no | ||
diff --git a/keyboards/tgr/tris/readme.md b/keyboards/tgr/tris/readme.md new file mode 100644 index 000000000..8c3433700 --- /dev/null +++ b/keyboards/tgr/tris/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # TGR Tris/Tris CE | ||
| 2 | |||
| 3 | A short description of the keyboard/project | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [poisonking](https://github.com/halfenergized) | ||
| 6 | * Hardware Supported: Tris PCB | ||
| 7 | * Hardware Availability: https://geekhack.org/index.php?topic=86221.0 | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make tris:default | ||
| 12 | |||
| 13 | Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) | ||
| 14 | |||
| 15 | make tris:default:flash | ||
| 16 | |||
| 17 | **Reset Key**: Hold down the key located at top right position, while plugging in the keyboard. | ||
| 18 | |||
| 19 | 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). | ||
diff --git a/keyboards/tgr/tris/rules.mk b/keyboards/tgr/tris/rules.mk new file mode 100644 index 000000000..358ab6dcc --- /dev/null +++ b/keyboards/tgr/tris/rules.mk | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32a | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = bootloadHID | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | BOOTMAGIC_ENABLE = no | ||
| 18 | MOUSEKEY_ENABLE = no | ||
| 19 | EXTRAKEY_ENABLE = yes | ||
| 20 | CONSOLE_ENABLE = no | ||
| 21 | COMMAND_ENABLE = yes | ||
| 22 | BACKLIGHT_ENABLE = yes | ||
| 23 | RGBLIGHT_ENABLE = yes | ||
| 24 | WS2812_DRIVER = i2c | ||
| 25 | |||
| 26 | LAYOUTS = numpad_6x4 ortho_6x4 | ||
diff --git a/keyboards/tgr/tris/tris.c b/keyboards/tgr/tris/tris.c new file mode 100644 index 000000000..f354d7a39 --- /dev/null +++ b/keyboards/tgr/tris/tris.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* Copyright 2020 halfenergized | ||
| 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 "tris.h" | ||
| 18 | |||
| 19 | void keyboard_pre_init_kb(void) { | ||
| 20 | led_init_ports(); | ||
| 21 | keyboard_pre_init_user(); | ||
| 22 | } | ||
| 23 | |||
| 24 | void led_init_ports(void) { | ||
| 25 | setPinOutput(D0); | ||
| 26 | } | ||
| 27 | |||
| 28 | bool led_update_kb(led_t led_state) { | ||
| 29 | if (led_update_user(led_state)) { | ||
| 30 | writePin(D0, led_state.num_lock); | ||
| 31 | } | ||
| 32 | return true; | ||
| 33 | } | ||
diff --git a/keyboards/tgr/tris/tris.h b/keyboards/tgr/tris/tris.h new file mode 100644 index 000000000..5ba1865d3 --- /dev/null +++ b/keyboards/tgr/tris/tris.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* Copyright 2020 halfenergized | ||
| 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 | /* This is a shortcut to help you visually see your layout. | ||
| 22 | * | ||
| 23 | * The first section contains all of the arguments representing the physical | ||
| 24 | * layout of the board and position of the keys. | ||
| 25 | * | ||
| 26 | * The second converts the arguments into a two-dimensional array which | ||
| 27 | * represents the switch matrix. | ||
| 28 | */ | ||
| 29 | #define ___ KC_NO | ||
| 30 | |||
| 31 | #define LAYOUT_ortho_6x4( \ | ||
| 32 | k00, k01, k02, k03, \ | ||
| 33 | k10, k11, k12, k13, \ | ||
| 34 | k20, k21, k22, k23, \ | ||
| 35 | k30, k31, k32, k33, \ | ||
| 36 | k40, k41, k42, k43, \ | ||
| 37 | k50, k51, k52, k53 \ | ||
| 38 | )\ | ||
| 39 | { \ | ||
| 40 | { k00, k01, k02, k03 }, \ | ||
| 41 | { k10, k11, k12, k13 }, \ | ||
| 42 | { k20, k21, k22, k23 }, \ | ||
| 43 | { k30, k31, k32, k33 }, \ | ||
| 44 | { k40, k41, k42, k43 }, \ | ||
| 45 | { k50, k51, k52, k53 } \ | ||
| 46 | } | ||
| 47 | |||
| 48 | #define LAYOUT_numpad_6x4( \ | ||
| 49 | k00, k01, k02, k03, \ | ||
| 50 | k10, k11, k12, k13, \ | ||
| 51 | k20, k21, k22, \ | ||
| 52 | k30, k31, k32, k33, \ | ||
| 53 | k40, k41, k42, \ | ||
| 54 | k50, k52, k43 \ | ||
| 55 | ) \ | ||
| 56 | { \ | ||
| 57 | { k00, k01, k02, k03 }, \ | ||
| 58 | { k10, k11, k12, k13 }, \ | ||
| 59 | { k20, k21, k22, ___ }, \ | ||
| 60 | { k30, k31, k32, k33 }, \ | ||
| 61 | { k40, k41, k42, k43 }, \ | ||
| 62 | { k50, ___, k52, ___ } \ | ||
| 63 | } | ||
