aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/lattice60/config.h105
-rw-r--r--keyboards/lattice60/info.json19
-rw-r--r--keyboards/lattice60/keymaps/default/config.h20
-rw-r--r--keyboards/lattice60/keymaps/default/keymap.c40
-rw-r--r--keyboards/lattice60/keymaps/default/readme.md5
-rw-r--r--keyboards/lattice60/keymaps/default_hhkb/config.h20
-rw-r--r--keyboards/lattice60/keymaps/default_hhkb/keymap.c40
-rw-r--r--keyboards/lattice60/keymaps/default_hhkb/readme.md5
-rw-r--r--keyboards/lattice60/keymaps/emdarcher/config.h20
-rw-r--r--keyboards/lattice60/keymaps/emdarcher/keymap.c48
-rw-r--r--keyboards/lattice60/keymaps/emdarcher/readme.md5
-rw-r--r--keyboards/lattice60/lattice60.c37
-rw-r--r--keyboards/lattice60/lattice60.h64
-rw-r--r--keyboards/lattice60/readme.md21
-rw-r--r--keyboards/lattice60/rules.mk40
15 files changed, 489 insertions, 0 deletions
diff --git a/keyboards/lattice60/config.h b/keyboards/lattice60/config.h
new file mode 100644
index 000000000..e864eeebb
--- /dev/null
+++ b/keyboards/lattice60/config.h
@@ -0,0 +1,105 @@
1/*
2Copyright 2019 Ethan Durrant (emdarcher)
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0x16C0
24#define PRODUCT_ID 0x27DB
25#define DEVICE_VER 0x0001
26#define MANUFACTURER emdarcher
27#define PRODUCT LATTICE60
28#define DESCRIPTION A HHKB layout keyboard using only through-hole components.
29
30/* key matrix size */
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 8
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43 */
44#define MATRIX_ROW_PINS { B2, B3, B4, B5, C0, C1, C2, C3 }
45#define MATRIX_COL_PINS { D7, D6, B0, D5, D1, D4, D0, B1 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION ROW2COL
50
51/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
52#define DEBOUNCE 5
53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55#define LOCKING_SUPPORT_ENABLE
56/* Locking resynchronize hack */
57#define LOCKING_RESYNC_ENABLE
58
59/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
60 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
61 */
62// #define GRAVE_ESC_CTRL_OVERRIDE
63
64/*
65 * Force NKRO
66 *
67 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
68 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
69 * makefile for this to work.)
70 *
71 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
72 * until the next keyboard reset.
73 *
74 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
75 * fully operational during normal computer usage.
76 *
77 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
78 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
79 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
80 * power-up.
81 *
82 */
83//#define FORCE_NKRO
84
85/*
86 * Feature disable options
87 * These options are also useful to firmware size reduction.
88 */
89
90/* disable debug print */
91//#define NO_DEBUG
92
93/* disable print */
94//#define NO_PRINT
95
96/* disable action features */
97//#define NO_ACTION_LAYER
98//#define NO_ACTION_TAPPING
99//#define NO_ACTION_ONESHOT
100
101/* disable these deprecated features by default */
102#ifndef LINK_TIME_OPTIMIZATION_ENABLE
103 #define NO_ACTION_MACRO
104 #define NO_ACTION_FUNCTION
105#endif
diff --git a/keyboards/lattice60/info.json b/keyboards/lattice60/info.json
new file mode 100644
index 000000000..fd738945d
--- /dev/null
+++ b/keyboards/lattice60/info.json
@@ -0,0 +1,19 @@
1{
2 "keyboard_name": "lattice60",
3 "url": "",
4 "maintainer": "emdarcher",
5 "width": 15,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_all": {
9 "layout": [
10 {"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":"|", "x":13, "y":0}, {"label":"~", "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}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"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":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4}, {"x":5, "y":4, "w":2.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}
11 ]
12 },
13 "LAYOUT_60_hhkb": {
14 "layout": [
15 {"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":"|", "x":13, "y":0}, {"label":"~", "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}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"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":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}
16 ]
17 }
18 }
19}
diff --git a/keyboards/lattice60/keymaps/default/config.h b/keyboards/lattice60/keymaps/default/config.h
new file mode 100644
index 000000000..88d933476
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default/config.h
@@ -0,0 +1,20 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
20#define GRAVE_ESC_ALT_OVERRIDE
diff --git a/keyboards/lattice60/keymaps/default/keymap.c b/keyboards/lattice60/keymaps/default/keymap.c
new file mode 100644
index 000000000..a5102070e
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _FN
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 /* Base */
26 [_BASE] = LAYOUT_all(
27 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_BSLS, KC_GRV,
28 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,
29 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,
30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
31 KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT
32 ),
33 [_FN] = LAYOUT_all(
34 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_INS, KC_DEL,
35 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
36 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
37 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,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39 )
40};
diff --git a/keyboards/lattice60/keymaps/default/readme.md b/keyboards/lattice60/keymaps/default/readme.md
new file mode 100644
index 000000000..bde2ba9b4
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1# The default keymap for lattice60
2
3![layout](https://i.imgur.com/aW6PpmX.png)
4
5This keymap uses a default HHKB layout, with support for a split spacebar and the addition of GESC on the ESC key.
diff --git a/keyboards/lattice60/keymaps/default_hhkb/config.h b/keyboards/lattice60/keymaps/default_hhkb/config.h
new file mode 100644
index 000000000..88d933476
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default_hhkb/config.h
@@ -0,0 +1,20 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
20#define GRAVE_ESC_ALT_OVERRIDE
diff --git a/keyboards/lattice60/keymaps/default_hhkb/keymap.c b/keyboards/lattice60/keymaps/default_hhkb/keymap.c
new file mode 100644
index 000000000..ccdc10ab3
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default_hhkb/keymap.c
@@ -0,0 +1,40 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _FN
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 /* Base */
26 [_BASE] = LAYOUT_60_hhkb(
27 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_BSLS, KC_GRV,
28 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,
29 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,
30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
31 KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT
32 ),
33 [_FN] = LAYOUT_60_hhkb(
34 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_INS, KC_DEL,
35 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
36 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
37 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,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39 )
40};
diff --git a/keyboards/lattice60/keymaps/default_hhkb/readme.md b/keyboards/lattice60/keymaps/default_hhkb/readme.md
new file mode 100644
index 000000000..734ba74b9
--- /dev/null
+++ b/keyboards/lattice60/keymaps/default_hhkb/readme.md
@@ -0,0 +1,5 @@
1# The default HHKB keymap for lattice60
2
3![layout](https://i.imgur.com/aW6PpmX.png)
4
5This keymap uses a default HHKB layout, with the addition of GESC on the ESC key.
diff --git a/keyboards/lattice60/keymaps/emdarcher/config.h b/keyboards/lattice60/keymaps/emdarcher/config.h
new file mode 100644
index 000000000..88d933476
--- /dev/null
+++ b/keyboards/lattice60/keymaps/emdarcher/config.h
@@ -0,0 +1,20 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
20#define GRAVE_ESC_ALT_OVERRIDE
diff --git a/keyboards/lattice60/keymaps/emdarcher/keymap.c b/keyboards/lattice60/keymaps/emdarcher/keymap.c
new file mode 100644
index 000000000..099e8e920
--- /dev/null
+++ b/keyboards/lattice60/keymaps/emdarcher/keymap.c
@@ -0,0 +1,48 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _FN0,
22 _FN1
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 /* Base */
27 [_BASE] = LAYOUT_60_hhkb(
28 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_BSLS, KC_GRV,
29 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,
30 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,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN0),
32 KC_LALT, KC_LGUI, /* */ KC_SPC, MO(_FN1), KC_RALT
33 ),
34 [_FN0] = LAYOUT_60_hhkb(
35 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_INS, KC_DEL,
36 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
37 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
39 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
40 ),
41 [_FN1] = LAYOUT_60_hhkb(
42 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_INS, KC_DEL,
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC,
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MFFD, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS,
46 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
47 )
48};
diff --git a/keyboards/lattice60/keymaps/emdarcher/readme.md b/keyboards/lattice60/keymaps/emdarcher/readme.md
new file mode 100644
index 000000000..812351af4
--- /dev/null
+++ b/keyboards/lattice60/keymaps/emdarcher/readme.md
@@ -0,0 +1,5 @@
1# emdarcher's keymap for lattice60
2
3![layout](https://i.imgur.com/9g3fDqL.png)
4
5Modified function layer from the default HHKB functions, and added an extra layer for media controls.
diff --git a/keyboards/lattice60/lattice60.c b/keyboards/lattice60/lattice60.c
new file mode 100644
index 000000000..6cc0ea42f
--- /dev/null
+++ b/keyboards/lattice60/lattice60.c
@@ -0,0 +1,37 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "lattice60.h"
18
19#define LED1_PIN C4
20#define LED2_PIN C5
21
22void keyboard_pre_init_kb(void){
23 //init the LED pins as outputs
24 setPinOutput(LED1_PIN);
25 setPinOutput(LED2_PIN);
26 //call any user initialization code
27 keyboard_pre_init_user();
28}
29
30bool led_update_kb(led_t led_state) {
31 bool res = led_update_user(led_state);
32 if(res){
33 //write the CAPS LOCK state on LED1
34 writePin(LED1_PIN, led_state.caps_lock);
35 }
36 return res;
37}
diff --git a/keyboards/lattice60/lattice60.h b/keyboards/lattice60/lattice60.h
new file mode 100644
index 000000000..d9f5f37de
--- /dev/null
+++ b/keyboards/lattice60/lattice60.h
@@ -0,0 +1,64 @@
1/* Copyright 2019 Ethan Durrant (emdarcher)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT_all( \
30 k00, k04, k10, k14, k20, k24, k30, k34, k40, k44, k50, k54, k60, k64, k65, \
31 k01, k05, k11, k15, k21, k25, k31, k35, k41, k45, k51, k55, k61, k66, \
32 k02, k06, k12, k16, k22, k26, k32, k36, k42, k46, k52, k56, k62, \
33 k03, k07, k13, k17, k23, k27, k37, k43, k47, k53, k57, k63, k67, \
34 k70, k71, k72, k33, k74, k75, k76, k77 \
35) \
36{ \
37 { k00, k10, k20, k30, k40, k50, k60, k70 }, \
38 { k01, k11, k21, k31, k41, k51, k61, k71 }, \
39 { k02, k12, k22, k32, k42, k52, k62, k72 }, \
40 { k03, k13, k23, k33, k43, k53, k63, KC_NO }, \
41 { k04, k14, k24, k34, k44, k54, k64, k74 }, \
42 { k05, k15, k25, k35, k45, k55, k65, k75 }, \
43 { k06, k16, k26, k36, k46, k56, k66, k76 }, \
44 { k07, k17, k27, k37, k47, k57, k67, k77 } \
45}
46
47
48#define LAYOUT_60_hhkb( \
49 k00, k04, k10, k14, k20, k24, k30, k34, k40, k44, k50, k54, k60, k64, k65, \
50 k01, k05, k11, k15, k21, k25, k31, k35, k41, k45, k51, k55, k61, k66, \
51 k02, k06, k12, k16, k22, k26, k32, k36, k42, k46, k52, k56, k62, \
52 k03, k07, k13, k17, k23, k27, k37, k43, k47, k53, k57, k63, k67, \
53 k70, k71, k33, k76, k77 \
54) \
55{ \
56 { k00, k10, k20, k30, k40, k50, k60, k70 }, \
57 { k01, k11, k21, k31, k41, k51, k61, k71 }, \
58 { k02, k12, k22, k32, k42, k52, k62, KC_NO }, \
59 { k03, k13, k23, k33, k43, k53, k63, KC_NO }, \
60 { k04, k14, k24, k34, k44, k54, k64, KC_NO }, \
61 { k05, k15, k25, k35, k45, k55, k65, KC_NO }, \
62 { k06, k16, k26, k36, k46, k56, k66, k76 }, \
63 { k07, k17, k27, k37, k47, k57, k67, k77 } \
64}
diff --git a/keyboards/lattice60/readme.md b/keyboards/lattice60/readme.md
new file mode 100644
index 000000000..f5a3dc594
--- /dev/null
+++ b/keyboards/lattice60/readme.md
@@ -0,0 +1,21 @@
1# lattice60
2
3![lattice60](https://i.imgur.com/1TdrWii.jpg)
4
5A HHKB layout keyboard using only through-hole components.
6
7* Keyboard Maintainer: [emdarcher](https://github.com/emdarcher)
8* Hardware Supported: LATTICE60 PCB
9* Hardware Availability: [KeyHive](https://keyhive.xyz/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make lattice60:default
14
15To activate the USBasploader bootloader, hold the BOOT button down during power on or reset. LED2 should light up to indicate that the bootloader is active.
16
17Flash the firmware using the `make` command with the `flash` parameter, example below:
18
19 make lattice60:default:flash
20
21See 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/lattice60/rules.mk b/keyboards/lattice60/rules.mk
new file mode 100644
index 000000000..2a1a52966
--- /dev/null
+++ b/keyboards/lattice60/rules.mk
@@ -0,0 +1,40 @@
1# MCU name
2MCU = atmega328p
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 = USBasp
13
14# Processor frequency
15F_CPU = 12000000
16
17# disable the debugging code
18OPT_DEFS = -DDEBUG_LEVEL=0
19
20# Build Options
21# change yes to no to disable
22#
23BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
24MOUSEKEY_ENABLE = yes # Mouse keys
25EXTRAKEY_ENABLE = yes # Audio control and System control
26CONSOLE_ENABLE = no # Console for debug
27COMMAND_ENABLE = no # Commands for debug and configuration
28# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
29SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
30# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
31NKRO_ENABLE = no # USB Nkey Rollover
32BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
33RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
34MIDI_ENABLE = no # MIDI support
35BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
36AUDIO_ENABLE = no # Audio output on port C6
37FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
38HD44780_ENABLE = no # Enable support for HD44780 based LCDs
39
40LAYOUTS = 60_hhkb