summaryrefslogtreecommitdiff
path: root/keyboards/tr60w
diff options
context:
space:
mode:
authorJoule-Flow <github.julian@flores-it.de>2019-12-02 20:47:55 +0100
committerDrashna Jaelre <drashna@live.com>2019-12-02 11:47:55 -0800
commit680924777be7739b249bf0dc3b60a3185134bc94 (patch)
tree2eb2c2cbc707fa01c88d5442e754f9c04ee021bd /keyboards/tr60w
parent75c8a79d0e087d99299b1b273d343aacb8bed0b8 (diff)
[Keyboard] Added tr60w keyboard (#7450)
* Added tr60w configurations. I based these files on the fox-lab/qmk_firmware repository. After checking both licenses, which are identical, I added those files into this feature branch. For transparency reasons I'll add the url to the fox-lab repository. https://github.com/fox-lab/qmk_firmware * Using #pragma once in config.h. * Removed '#define CCONFIG_H' from config.h. * Changed PRODUCT_ID to '0x4140'. * Renamed setting to 'DEBOUNCE'. * Removed key combination, due to already default implementation. * Removed 'PREVENT_STUCK_MODIFIERS', defaulted by QMK. * Removed not uneccessary '#endif' statement. * Renamed include to 'QMK_KEYBOARD_H'. * Changed keymap structure according to pull request suggestion. * Removed 'void matrix_init_user(void)'. * Removed 'void matrix_scan_user(void)'. * Removed 'bool process_record_user(...)'. * Removed non-standard configuration in favor for 'led_update_kb'. * Using default setup based on 'MCU' setting. * Replaced Build Option configuration with suggested information. * Fixed include statements as requested. * Changed 'KEYMAP' to suggestion. * Removed obsolete '#endif' statement. * Added readme.md file. * Updated readme.md with further information. * Reverted include statement, to check if this caused ci error. * Revert "Reverted include statement." This reverts commit ebd992dc01133169be38ae7201bb00b4d01cc737. * Fixed wrong mapped key * Fixed include as per suggestion. * Replaced 'KC_TRNS' with '_______'for readability. * Added personal keymap.c file. * Updated the readme.md file according to template/avr/readme.md. * Fixed Link to Image. * Updated readme.md as per request. * Updated rules.mk, as per suggestion. Set 'BOOTMAGIC_ENABLE = lite'.
Diffstat (limited to 'keyboards/tr60w')
-rw-r--r--keyboards/tr60w/config.h47
-rw-r--r--keyboards/tr60w/keymaps/default/keymap.c20
-rw-r--r--keyboards/tr60w/keymaps/joule-flow/keymap.c21
-rw-r--r--keyboards/tr60w/readme.md19
-rw-r--r--keyboards/tr60w/rules.mk32
-rw-r--r--keyboards/tr60w/tr60w.c11
-rw-r--r--keyboards/tr60w/tr60w.h18
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
3const 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
3const 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![TR60W](https://i.imgur.com/Ez2T2Te.jpg)
4
5This 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
11Make example for this keyboard (after setting up your build environment):
12
13 make tr60w:default
14
15Or use my personal settings:
16
17 make tr60w:joule-flow
18
19See 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
2MCU = 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
12BOOTLOADER = atmel-dfu
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_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
25NKRO_ENABLE = yes # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
30AUDIO_ENABLE = no # Audio output on port C6
31FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
32HD44780_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
3bool 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}