aboutsummaryrefslogtreecommitdiff
path: root/keyboards/tokyo60
diff options
context:
space:
mode:
authorAlvin C <alvininhk@gmail.com>2018-08-26 04:16:05 +0900
committerDrashna Jaelre <drashna@live.com>2018-08-25 12:16:05 -0700
commitb806cc9eea5d3ac46d071bbb06e055ef8e7c4cfb (patch)
tree963d78538b6ed6690b699338e6d9132034ceb522 /keyboards/tokyo60
parent26dacd51fce49d83b2dff0cda45126c327e743fa (diff)
downloadqmk_firmware-b806cc9eea5d3ac46d071bbb06e055ef8e7c4cfb.tar.gz
qmk_firmware-b806cc9eea5d3ac46d071bbb06e055ef8e7c4cfb.zip
Keyboard: add tokyo60 (#2861)
* adding tokyo60 to qmk * updating readme * updating keymap and power consumption for mobile
Diffstat (limited to 'keyboards/tokyo60')
-rw-r--r--keyboards/tokyo60/config.h66
-rw-r--r--keyboards/tokyo60/keymaps/default/config.h1
-rw-r--r--keyboards/tokyo60/keymaps/default/keymap.c56
-rw-r--r--keyboards/tokyo60/readme.md15
-rw-r--r--keyboards/tokyo60/rules.mk75
-rw-r--r--keyboards/tokyo60/tokyo60.c19
-rw-r--r--keyboards/tokyo60/tokyo60.h21
7 files changed, 253 insertions, 0 deletions
diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyo60/config.h
new file mode 100644
index 000000000..6e6ab2215
--- /dev/null
+++ b/keyboards/tokyo60/config.h
@@ -0,0 +1,66 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED
8#define PRODUCT_ID 0x6060
9#define DEVICE_VER 0x0001
10#define MANUFACTURER Tokyo Keyboard
11#define PRODUCT tokyo60
12#define DESCRIPTION q.m.k. keyboard firmware for tokyo60
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 14
17
18/* number of backlight levels */
19#define BACKLIGHT_PIN B7
20#ifdef BACKLIGHT_PIN
21#define BACKLIGHT_LEVELS 6
22//#define BACKLIGHT_ON_STATE 1
23#endif
24
25/* COL2ROW or ROW2COL */
26#define DIODE_DIRECTION ROW2COL
27
28/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
29#define DEBOUNCING_DELAY 5
30
31/* Set power consumption to work with mobile devices */
32#define USB_MAX_POWER_CONSUMPTION 100
33
34/* key combination for command */
35#define IS_COMMAND() ( \
36 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
37)
38
39/* key matrix pins */
40#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
41#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3 }
42#define UNUSED_PINS
43
44/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
45#define LOCKING_SUPPORT_ENABLE
46
47/* Locking resynchronize hack */
48#define LOCKING_RESYNC_ENABLE
49
50/* prevent stuck modifiers */
51#define PREVENT_STUCK_MODIFIERS
52
53#define RGB_DI_PIN F7
54#ifdef RGB_DI_PIN
55#define RGBLIGHT_ANIMATIONS
56#define RGBLED_NUM 10
57#define RGBLIGHT_HUE_STEP 12
58#define RGBLIGHT_SAT_STEP 12
59#define RGBLIGHT_VAL_STEP 12
60#endif
61
62/* For Production */
63#define QMK_ESC_OUTPUT F0 // usually COL
64#define QMK_ESC_INPUT D0 // usually ROW
65
66#endif
diff --git a/keyboards/tokyo60/keymaps/default/config.h b/keyboards/tokyo60/keymaps/default/config.h
new file mode 100644
index 000000000..a5568e400
--- /dev/null
+++ b/keyboards/tokyo60/keymaps/default/config.h
@@ -0,0 +1 @@
#include "../../config.h"
diff --git a/keyboards/tokyo60/keymaps/default/keymap.c b/keyboards/tokyo60/keymaps/default/keymap.c
new file mode 100644
index 000000000..64b49a746
--- /dev/null
+++ b/keyboards/tokyo60/keymaps/default/keymap.c
@@ -0,0 +1,56 @@
1#include "tokyo60.h"
2
3/*
4 * Default HHKB Layout
5 */
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 /* 0: Default layer
8┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
9│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │
10├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
11│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│
12├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
13│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │█████│Enter│█████│
14├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
15│Shift│█████│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │█████│Shift│ Fn │
16├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
17│█████│ Gui │ Alt │█████│█████│Space│█████│█████│█████│█████│█████│ Alt │ Gui │█████│█████│
18└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
19 */
20 TOKYO_KEYMAP(
21 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, \
22 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, \
23 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
24 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_FN0, \
25 KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT ),
26 /* 1: HHKB Fn layer
27┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
28│ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │
29├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
30│Caps │ RGB │RGBfw│RGBrv│BLtog│BLstp│ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│
31├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
32│ │ VoD │ VoU │ Mut │ Ejc │ │NP_* │NP_/ │Home │PgUp │Left │Right│█████│NPEnt│█████│
33├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
34│ │█████│ │ │ │ │ │NP_+ │NP_- │ End │PgDwn│Down │█████│ │ │
35├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
36│█████│ │ │█████│█████│█████│ │█████│█████│█████│█████│ │ │█████│█████│
37└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
38 */
39 TOKYO_KEYMAP(
40 KC_PWR, 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_INS, KC_DEL, \
41 KC_CAPS, RGB_TOG, RGB_MOD, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \
42 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
45};
46
47/*5
48 * Fn action definition
49 */
50const uint16_t PROGMEM fn_actions[] = {
51 [0] = ACTION_LAYER_MOMENTARY(1),
52};
53
54void matrix_scan_user(void) {
55
56};
diff --git a/keyboards/tokyo60/readme.md b/keyboards/tokyo60/readme.md
new file mode 100644
index 000000000..811d0707c
--- /dev/null
+++ b/keyboards/tokyo60/readme.md
@@ -0,0 +1,15 @@
1# tokyo60
2
3![tokyo60](http://tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg)
4
5Minimal hacker style mechanical keyboard designed in Tokyo. Full aluminum hi-pro construction with integrated top-plate. Cherry MX compatible. [More Info at Tokyo Keyboard](http://tokyokeyboard.com).
6
7Keyboard Maintainer: [tokyo keyboard](http://tokyokeyboard.com)
8Hardware Supported: tokyo60 rev1
9Hardware Availability: [tokyo keyboard](http://tokyokeyboard.com), [Massdrop](https://www.massdrop.com/buy/massdrop-x-tokyo-keyboard-tokyo60-keyboard-kit?mode=guest_open)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make tokyo60:default
14
15See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyo60/rules.mk
new file mode 100644
index 000000000..7f8cfc0a8
--- /dev/null
+++ b/keyboards/tokyo60/rules.mk
@@ -0,0 +1,75 @@
1
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u4
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20
21#
22# LUFA specific
23#
24# Target architecture (see library "Board Types" documentation).
25ARCH = AVR8
26
27# Input clock frequency.
28# This will define a symbol, F_USB, in all source code files equal to the
29# input clock frequency (before any prescaling is performed) in Hz. This value may
30# differ from F_CPU if prescaling is used on the latter, and is required as the
31# raw input clock is fed directly to the PLL sections of the AVR for high speed
32# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
33# at the end, this will be done automatically to create a 32-bit value in your
34# source code.
35#
36# If no clock division is performed on the input clock inside the AVR (via the
37# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
38F_USB = $(F_CPU)
39
40# Interrupt driven control endpoint task(+60)
41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
42
43
44# Boot Section Size in *bytes*
45# Teensy halfKay 512
46# Teensy++ halfKay 1024
47# Atmel DFU loader 4096
48# LUFA bootloader 4096
49# USBaspLoader 2048
50OPT_DEFS += -DBOOTLOADER_SIZE=4096
51
52# Bootloader
53# This definition is optional, and if your keyboard supports multiple bootloaders of
54# different sizes, comment this out, and the correct address will be loaded
55# automatically (+60). See bootloader.mk for all options.
56BOOTLOADER = atmel-dfu
57
58# Build Options
59# change yes to no to disable
60#
61BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
62MOUSEKEY_ENABLE = no # Mouse keys(+4700)
63EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
64# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
65SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
66# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
67MIDI_ENABLE = no # MIDI controls
68UNICODE_ENABLE = no # Unicode
69BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
70AUDIO_ENABLE = no # Audio output on port C6
71CONSOLE_ENABLE = no # Console for debug(+400)
72COMMAND_ENABLE = yes # Commands for debug and configuration
73NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
74BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
75RGBLIGHT_ENABLE = yes # Enable RGB light
diff --git a/keyboards/tokyo60/tokyo60.c b/keyboards/tokyo60/tokyo60.c
new file mode 100644
index 000000000..d3b6279df
--- /dev/null
+++ b/keyboards/tokyo60/tokyo60.c
@@ -0,0 +1,19 @@
1#include "tokyo60.h"
2//#include "led.h"
3
4void matrix_init_kb(void) {
5 // Keyboard start-up code goes here
6 // Runs once when the firmware starts up
7 matrix_init_user();
8 led_init_ports();
9};
10
11void matrix_scan_kb(void) {
12 // Looping keyboard code goes here
13 // This runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 /* LEDs on */
19}
diff --git a/keyboards/tokyo60/tokyo60.h b/keyboards/tokyo60/tokyo60.h
new file mode 100644
index 000000000..e3cfa711b
--- /dev/null
+++ b/keyboards/tokyo60/tokyo60.h
@@ -0,0 +1,21 @@
1#ifndef TOKYO60_H
2#define TOKYO60_H
3
4#include "quantum.h"
5
6/* tokyo60 Keymap*/
7#define TOKYO_KEYMAP( \
8 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D,\
9 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2D, \
10 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K3D, \
11 K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4D, \
12 K42, K43, K46, K4B, K4C \
13) { \
14 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
15 { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
16 { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \
17 { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
18 { KC_NO, K42, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D } \
19}
20
21#endif