diff options
Diffstat (limited to 'keyboards/tgr')
-rw-r--r-- | keyboards/tgr/910/config.h | 4 | ||||
-rw-r--r-- | keyboards/tgr/910/keymaps/via/keymap.c | 32 | ||||
-rw-r--r-- | keyboards/tgr/910/keymaps/via/rules.mk | 4 | ||||
-rw-r--r-- | keyboards/tgr/910/readme.md | 4 | ||||
-rw-r--r-- | keyboards/tgr/910/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/tgr/910ce/rules.mk | 6 | ||||
-rw-r--r-- | keyboards/tgr/alice/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/tgr/jane/rules.mk | 2 | ||||
-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 |
18 files changed, 359 insertions, 13 deletions
diff --git a/keyboards/tgr/910/config.h b/keyboards/tgr/910/config.h index ab9d81d834..995a6016a0 100644 --- a/keyboards/tgr/910/config.h +++ b/keyboards/tgr/910/config.h @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x5447 //TG +#define PRODUCT_ID 0x9100 //910 #define DEVICE_VER 0x0001 #define MANUFACTURER Quadcube #define PRODUCT TGR-910 diff --git a/keyboards/tgr/910/keymaps/via/keymap.c b/keyboards/tgr/910/keymaps/via/keymap.c new file mode 100644 index 0000000000..3aff12b530 --- /dev/null +++ b/keyboards/tgr/910/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_ansi_split_bs( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_ansi_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_TRNS, + BL_TOGG, BL_STEP, BL_INC, BL_DEC, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_ansi_split_bs( + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MSTP, KC_MNXT), + + [3] = LAYOUT_ansi_split_bs( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; diff --git a/keyboards/tgr/910/keymaps/via/rules.mk b/keyboards/tgr/910/keymaps/via/rules.mk new file mode 100644 index 0000000000..9e1952e236 --- /dev/null +++ b/keyboards/tgr/910/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +EXTRAKEY_ENABLE = no diff --git a/keyboards/tgr/910/readme.md b/keyboards/tgr/910/readme.md index df348f0224..63e86380b8 100644 --- a/keyboards/tgr/910/readme.md +++ b/keyboards/tgr/910/readme.md @@ -1,4 +1,4 @@ -# tgr-910 +# TGR-910 65% custom keyboard with a very nice design. @@ -6,6 +6,8 @@ * Hardware Supported: TGR-910 (Quadcube PCB) * Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=86047.0) +**Only works with Quadcube PCB, will not work with [TGR 910 CE](../910ce) PCB (a.k.a. TGR Unicorn v1.2)** + Make example for this keyboard (after setting up your build environment): make tgr/910:default diff --git a/keyboards/tgr/910/rules.mk b/keyboards/tgr/910/rules.mk index a9746c0d3d..981f6b514f 100644 --- a/keyboards/tgr/910/rules.mk +++ b/keyboards/tgr/910/rules.mk @@ -20,5 +20,3 @@ COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c - -OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/tgr/910ce/rules.mk b/keyboards/tgr/910ce/rules.mk index 7a21b8a329..743a707331 100644 --- a/keyboards/tgr/910ce/rules.mk +++ b/keyboards/tgr/910ce/rules.mk @@ -17,12 +17,10 @@ BOOTLOADER = bootloadHID BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c -OPT_DEFS = -DDEBUG_LEVEL=0 - LAYOUTS = 65_ansi_blocker 65_iso_blocker
\ No newline at end of file diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index fd340f04eb..20f0222c11 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -20,5 +20,3 @@ COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c - -OPT_DEFS = -DDEBUG_LEVEL=0 diff --git a/keyboards/tgr/jane/rules.mk b/keyboards/tgr/jane/rules.mk index 8eeab33951..75ab2bc5bf 100644 --- a/keyboards/tgr/jane/rules.mk +++ b/keyboards/tgr/jane/rules.mk @@ -21,6 +21,4 @@ BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no WS2812_DRIVER = i2c -OPT_DEFS = -DDEBUG_LEVEL=0 - LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/tgr/tris/config.h b/keyboards/tgr/tris/config.h new file mode 100644 index 0000000000..32149087cf --- /dev/null +++ b/keyboards/tgr/tris/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 halfenergized + +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 + +#include "config_common.h" + +#define VENDOR_ID 0x5447 //TG +#define PRODUCT_ID 0x5452 //TR +#define DEVICE_VER 0x0001 +#define MANUFACTURER TGR +#define PRODUCT Tris +#define DESCRIPTION Numpad by TGR + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A3, A2, A1, A0 } + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tgr/tris/info.json b/keyboards/tgr/tris/info.json new file mode 100644 index 0000000000..401bd6e308 --- /dev/null +++ b/keyboards/tgr/tris/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "TGR Tris", + "url": "", + "maintainer": "halfenergized", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_ortho_6x4": { + "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}] + }, + + "LAYOUT_numpad_6x4": { + "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}] + } + } +} diff --git a/keyboards/tgr/tris/keymaps/default/keymap.c b/keyboards/tgr/tris/keymaps/default/keymap.c new file mode 100644 index 0000000000..5a4e47a694 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 halfenergized + * + * 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_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS + ), + + [2] = LAYOUT_numpad_6x4( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/tgr/tris/keymaps/default/readme.md b/keyboards/tgr/tris/keymaps/default/readme.md new file mode 100644 index 0000000000..660966577f --- /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 0000000000..bfa8dbc59b --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2020 halfenergized + * + * 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_numpad_6x4( + KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS + ), + + [2] = LAYOUT_numpad_6x4( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; diff --git a/keyboards/tgr/tris/keymaps/via/rules.mk b/keyboards/tgr/tris/keymaps/via/rules.mk new file mode 100644 index 0000000000..7d47e6b726 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +EXTRAKEY_ENABLE = no diff --git a/keyboards/tgr/tris/readme.md b/keyboards/tgr/tris/readme.md new file mode 100644 index 0000000000..8c3433700b --- /dev/null +++ b/keyboards/tgr/tris/readme.md @@ -0,0 +1,19 @@ +# TGR Tris/Tris CE + +A short description of the keyboard/project + +* Keyboard Maintainer: [poisonking](https://github.com/halfenergized) +* Hardware Supported: Tris PCB +* Hardware Availability: https://geekhack.org/index.php?topic=86221.0 + +Make example for this keyboard (after setting up your build environment): + + make tris:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make tris:default:flash + +**Reset Key**: Hold down the key located at top right position, while plugging in the keyboard. + +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 0000000000..358ab6dcc8 --- /dev/null +++ b/keyboards/tgr/tris/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/tgr/tris/tris.c b/keyboards/tgr/tris/tris.c new file mode 100644 index 0000000000..f354d7a393 --- /dev/null +++ b/keyboards/tgr/tris/tris.c @@ -0,0 +1,33 @@ +/* Copyright 2020 halfenergized + * + * 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 "tris.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D0, led_state.num_lock); + } + return true; +} diff --git a/keyboards/tgr/tris/tris.h b/keyboards/tgr/tris/tris.h new file mode 100644 index 0000000000..5ba1865d3b --- /dev/null +++ b/keyboards/tgr/tris/tris.h @@ -0,0 +1,63 @@ +/* Copyright 2020 halfenergized + * + * 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 + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define ___ KC_NO + +#define LAYOUT_ortho_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +)\ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ +} + +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k50, k52, k43 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, ___ }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, ___, k52, ___ } \ +} |