Add support for THE60 (#5385)

master
Erovia 2019-03-14 00:26:25 +01:00 committed by MechMerlin
parent 30db1b18e5
commit f9c5b80aed
8 changed files with 306 additions and 0 deletions

View File

@ -0,0 +1,38 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0060
#define DEVICE_VER 0x0001
#define MANUFACTURER LazyDesigners
#define PRODUCT THE60
#define DESCRIPTION A 60% keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/* key matrix pins */
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 6
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

View File

@ -0,0 +1,79 @@
{
"keyboard_name": "THE60",
"url": "http://lazydesigners.cn",
"maintainer": "qmk",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT_split_spc_split_bspc": {
"key_count": 66,
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Home", "x":13, "y":0},
{"label":"Del", "x":14, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"|", "x":11.5, "y":1, "w":1.5},
{"label":"}", "x":13, "y":1},
{"label":"{", "x":14, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":"Enter", "x":10.75, "y":2, "w":2.25},
{"label":":", "x":13, "y":2},
{"label":"\"", "x":14, "y":2},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"Shift", "x":11.25, "y":3, "w":1.75},
{"label":"Up", "x":13, "y":3},
{"label":"/", "x":14, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":2.25},
{"x":6, "y":4, "w":2.75},
{"label":"Alt", "x":8.75, "y":4, "w":1.25},
{"label":"Menu", "x":10, "y":4},
{"label":"Fn", "x":11, "y":4},
{"label":"Left", "x":12, "y":4},
{"label":"Down", "x":13, "y":4},
{"label":"Right", "x":14, "y":4}]
}
}
}

View File

@ -0,0 +1,54 @@
#include QMK_KEYBOARD_H
enum custom_layers {
_QWERTY,
_FN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,--------------------------------------------------------------------------.
* |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del |
* |--------------------------------------------------------------------------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] |
* |--------------------------------------------------------------------------|
* |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' |
* |--------------------------------------------------------------------------|
* | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / |
* |--------------------------------------------------------------------------|
* | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght|
* `--------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_split_spc_split_bspc(
KC_GESC, 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_HOME, 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_BSPC, KC_LBRC, KC_RBRC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
),
/* FN
* ,--------------------------------------------------------------------------.
* |RST | | | | | | | | | | | | |End |Ins |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | | |PgUp|PgDn|
* |--------------------------------------------------------------------------|
* | | |Prev|Play|Next| |VolD|Mute|VolU| | | | |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------|
* |EEPRST| | | | | | | | | | |
* `--------------------------------------------------------------------------'
*/
[_FN] = LAYOUT_split_spc_split_bspc(
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_INS,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN,
XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
)
};

View File

@ -0,0 +1,32 @@
# Default keymap for THE60
## QWERTY (Normal) Layer
```
,--------------------------------------------------------------------------.
|Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del |
|--------------------------------------------------------------------------|
| Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] |
|--------------------------------------------------------------------------|
|CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' |
|--------------------------------------------------------------------------|
| Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / |
|--------------------------------------------------------------------------|
| Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght|
`--------------------------------------------------------------------------'
```
## FN layer
```
,--------------------------------------------------------------------------.
|RST | | | | | | | | | | | | |End |Ins |
|--------------------------------------------------------------------------|
| | | | | | | | | | | | |PgUp|PgDn|
|--------------------------------------------------------------------------|
| | |Prev|Play|Next| |VolD|Mute|VolU| | | | |
|--------------------------------------------------------------------------|
| | | | | | | | | | | | | |
|--------------------------------------------------------------------------|
|EEPRST| | | | | | | | | | |
`--------------------------------------------------------------------------'
```

View File

@ -0,0 +1,18 @@
# THE60
![THE60](https://cdn.discordapp.com/attachments/536190211240099840/549506683064287243/image0.jpg)
A 60% custom PCB and case designed and produced by [LazyDesigners](http://lazydesigners.cn).
The PCB allows one to test a 40% layout in a 60% case.
Keyboard Maintainer: QMK Community
Hardware Supported: THE60 PCB
Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn)
Make example for this keyboard (after setting up your build environment):
make lazydesigners/the60:default:dfu
To enter the bootloader, either short the pins on the PCB, use the RESET button on the FN layer or hold the Esc key while plugging in your 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).

View File

@ -0,0 +1,51 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality

View File

@ -0,0 +1,2 @@
#include "the60.h"

View File

@ -0,0 +1,32 @@
#pragma once
#include "quantum.h"
/*
* ,--------------------------------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | | | |
* |--------------------------------------------------------------------------|
* | | | | | | | | | | | |
* `--------------------------------------------------------------------------'
*/
#define LAYOUT_split_spc_split_bspc( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K402, K403, K404, K407, K409, K410, K411, K412, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, KC_NO, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414 } \
}