diff options
| -rw-r--r-- | keyboards/tr60w/config.h | 47 | ||||
| -rw-r--r-- | keyboards/tr60w/keymaps/default/keymap.c | 20 | ||||
| -rw-r--r-- | keyboards/tr60w/keymaps/joule-flow/keymap.c | 21 | ||||
| -rw-r--r-- | keyboards/tr60w/readme.md | 19 | ||||
| -rw-r--r-- | keyboards/tr60w/rules.mk | 32 | ||||
| -rw-r--r-- | keyboards/tr60w/tr60w.c | 11 | ||||
| -rw-r--r-- | keyboards/tr60w/tr60w.h | 18 |
7 files changed, 168 insertions, 0 deletions
diff --git a/keyboards/tr60w/config.h b/keyboards/tr60w/config.h new file mode 100644 index 0000000000..2196e6c533 --- /dev/null +++ b/keyboards/tr60w/config.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "config_common.h" | ||
| 4 | |||
| 5 | /* USB Device descriptor parameter */ | ||
| 6 | #define VENDOR_ID 0xFEED | ||
| 7 | #define PRODUCT_ID 0x4140 | ||
| 8 | #define DEVICE_VER 0x0001 | ||
| 9 | #define MANUFACTURER Triangle_Lab | ||
| 10 | #define PRODUCT TR60W | ||
| 11 | #define DESCRIPTION Keyboard | ||
| 12 | |||
| 13 | /* key matrix size */ | ||
| 14 | #define MATRIX_ROWS 6 | ||
| 15 | #define MATRIX_COLS 14 | ||
| 16 | |||
| 17 | /* key matrix pins */ | ||
| 18 | #define MATRIX_ROW_PINS { D0, D1, B1, B2, E6, B3 } | ||
| 19 | #define MATRIX_COL_PINS { F5, F4, F1, F0, B0, D5, D3, D6, D7, B4, B5, B6, C6, D2 } | ||
| 20 | #define UNUSED_PINS | ||
| 21 | |||
| 22 | /* COL2ROW or ROW2COL */ | ||
| 23 | #define DIODE_DIRECTION COL2ROW | ||
| 24 | |||
| 25 | /* number of backlight levels */ | ||
| 26 | #define BACKLIGHT_PIN B7 | ||
| 27 | #ifdef BACKLIGHT_PIN | ||
| 28 | #define BACKLIGHT_LEVELS 3 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | /* Set 0 if debouncing isn't needed */ | ||
| 32 | #define DEBOUNCE 5 | ||
| 33 | |||
| 34 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 35 | #define LOCKING_SUPPORT_ENABLE | ||
| 36 | |||
| 37 | /* Locking resynchronize hack */ | ||
| 38 | #define LOCKING_RESYNC_ENABLE | ||
| 39 | |||
| 40 | #define RGB_DI_PIN F7 | ||
| 41 | #ifdef RGB_DI_PIN | ||
| 42 | #define RGBLIGHT_ANIMATIONS | ||
| 43 | #define RGBLED_NUM 4 | ||
| 44 | #define RGBLIGHT_HUE_STEP 8 | ||
| 45 | #define RGBLIGHT_SAT_STEP 8 | ||
| 46 | #define RGBLIGHT_VAL_STEP 8 | ||
| 47 | #endif | ||
diff --git a/keyboards/tr60w/keymaps/default/keymap.c b/keyboards/tr60w/keymaps/default/keymap.c new file mode 100644 index 0000000000..86bfbb5662 --- /dev/null +++ b/keyboards/tr60w/keymaps/default/keymap.c | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | LAYOUT_60_tsangan_hhkb( | ||
| 6 | 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_BSLS, KC_GRV, | ||
| 7 | 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, | ||
| 8 | 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, | ||
| 9 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, LT(1,KC_GRV), | ||
| 10 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL | ||
| 11 | ), | ||
| 12 | |||
| 13 | LAYOUT_60_tsangan_hhkb( | ||
| 14 | RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | ||
| 15 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_DEL, | ||
| 16 | _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_LEFT, KC_RGHT, _______, | ||
| 17 | _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, KC_DOWN, _______, _______, | ||
| 18 | _______, _______, _______, _______, _______, _______, _______ | ||
| 19 | ) | ||
| 20 | }; | ||
diff --git a/keyboards/tr60w/keymaps/joule-flow/keymap.c b/keyboards/tr60w/keymaps/joule-flow/keymap.c new file mode 100644 index 0000000000..bfe0db0d5e --- /dev/null +++ b/keyboards/tr60w/keymaps/joule-flow/keymap.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | LAYOUT_60_tsangan_hhkb( | ||
| 6 | 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_BSLS, KC_GRV, | ||
| 7 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | ||
| 8 | 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, | ||
| 9 | KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MINS, KC_LSFT, TG(1), | ||
| 10 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_F12, KC_RCTL | ||
| 11 | ), | ||
| 12 | |||
| 13 | LAYOUT_60_tsangan_hhkb( | ||
| 14 | RESET, 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_NUHS, KC_NUBS, | ||
| 15 | _______, KC_BSPC, KC_UP, KC_ENT, _______, _______, _______, KC_WH_U, KC_BTN1 , KC_MS_U , KC_BTN2, KC_WH_L, _______, KC_DEL, | ||
| 16 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, KC_WH_D, KC_MS_L , KC_MS_D , KC_MS_R, KC_WH_R, _______, | ||
| 17 | _______, RCTL(KC_Y), RCTL(KC_X), RCTL(KC_C), RCTL(KC_V), _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 18 | _______, _______, _______, _______, _______, _______, _______ | ||
| 19 | ) | ||
| 20 | |||
| 21 | }; | ||
diff --git a/keyboards/tr60w/readme.md b/keyboards/tr60w/readme.md new file mode 100644 index 0000000000..9053b4db6f --- /dev/null +++ b/keyboards/tr60w/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # TR60W | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | This is the hotswap PCB supplied by Triangle Labs with their TR60 case, featuring four RGB LEDs around the Escape key, USB-C, and SMD single-color backlighting. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Joule-Flow](https://github.com/Joule-Flow) | ||
| 8 | * Hardware Supported: TR60W PCB, ATmega32U4 | ||
| 9 | * Hardware Availability: Group-buy by [Triangle Labs](https://geekhack.org/index.php?topic=96378.0) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make tr60w:default | ||
| 14 | |||
| 15 | Or use my personal settings: | ||
| 16 | |||
| 17 | make tr60w:joule-flow | ||
| 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/tr60w/rules.mk b/keyboards/tr60w/rules.mk new file mode 100644 index 0000000000..4b68e6c7f8 --- /dev/null +++ b/keyboards/tr60w/rules.mk | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 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 = atmel-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 20 | CONSOLE_ENABLE = no # Console for debug | ||
| 21 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 25 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 26 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 28 | MIDI_ENABLE = no # MIDI support | ||
| 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 30 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 32 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
diff --git a/keyboards/tr60w/tr60w.c b/keyboards/tr60w/tr60w.c new file mode 100644 index 0000000000..83547a8862 --- /dev/null +++ b/keyboards/tr60w/tr60w.c | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #include "tr60w.h" | ||
| 2 | |||
| 3 | bool led_update_kb(led_t led_state) { | ||
| 4 | bool runDefault = led_update_user(led_state); | ||
| 5 | if (runDefault) { | ||
| 6 | writePin(B1, !led_state.num_lock); | ||
| 7 | writePin(B2, !led_state.caps_lock); | ||
| 8 | writePin(B3, !led_state.scroll_lock); | ||
| 9 | } | ||
| 10 | return runDefault; | ||
| 11 | } | ||
diff --git a/keyboards/tr60w/tr60w.h b/keyboards/tr60w/tr60w.h new file mode 100644 index 0000000000..9fa5d5b61f --- /dev/null +++ b/keyboards/tr60w/tr60w.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "quantum.h" | ||
| 4 | |||
| 5 | #define LAYOUT_60_tsangan_hhkb( \ | ||
| 6 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K113, \ | ||
| 7 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K213, \ | ||
| 8 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ | ||
| 9 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ | ||
| 10 | K400, K401, K402, K505, K510, K511, K512 \ | ||
| 11 | ) { \ | ||
| 12 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ | ||
| 13 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ | ||
| 14 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ | ||
| 15 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ | ||
| 16 | { K400, K401, K402, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ | ||
| 17 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, K511, K512, KC_NO } \ | ||
| 18 | } | ||
