aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Gaskell <olivergaskell700@gmail.com>2021-04-19 04:36:40 +0100
committerGitHub <noreply@github.com>2021-04-18 20:36:40 -0700
commit05357d7937d1a806243c010e8a308a93e0bf8959 (patch)
tree38b6b2c0c315371d88bdd7e883ce5e4e84607c3d
parenta0089aa34519ec4fcf7cee6a352424e4b7cba7da (diff)
downloadqmk_firmware-05357d7937d1a806243c010e8a308a93e0bf8959.tar.gz
qmk_firmware-05357d7937d1a806243c010e8a308a93e0bf8959.zip
[Keyboard] Add Tau4 keyboard (#11361)
with default and i2cscanner keymaps Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
-rwxr-xr-xkeyboards/tau4/common/glcdfont.c105
-rwxr-xr-xkeyboards/tau4/config.h72
-rwxr-xr-xkeyboards/tau4/keymaps/default/keymap.c145
-rw-r--r--keyboards/tau4/keymaps/default/readme.md5
-rw-r--r--keyboards/tau4/readme.md16
-rwxr-xr-xkeyboards/tau4/rules.mk28
-rwxr-xr-xkeyboards/tau4/tau4.c18
-rwxr-xr-xkeyboards/tau4/tau4.h32
8 files changed, 421 insertions, 0 deletions
diff --git a/keyboards/tau4/common/glcdfont.c b/keyboards/tau4/common/glcdfont.c
new file mode 100755
index 000000000..05577612a
--- /dev/null
+++ b/keyboards/tau4/common/glcdfont.c
@@ -0,0 +1,105 @@
1/*
2Copyright 2020 Oliver Gaskell <me@gaskell.tech>
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#include "progmem.h"
19
20static const unsigned char PROGMEM font[] = {
21 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e, 0x00, 0x3e, 0x6b, 0x4f, 0x6b,
22 0x3e, 0x00, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c, 0x00, 0x18, 0x3c, 0x7e, 0x3c, 0x18, 0x00, 0x1c, 0x57,
23 0x7d, 0x57, 0x1c, 0x00, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00,
24 0xff, 0xe7, 0xc3, 0xe7, 0xff, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xff, 0xe7, 0xdb, 0xe7,
25 0xff, 0x00, 0x30, 0x48, 0x3a, 0x06, 0x0e, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7f,
26 0x05, 0x05, 0x07, 0x00, 0x40, 0x7f, 0x05, 0x25, 0x3f, 0x00, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a, 0x00,
27 0x7f, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x00, 0x14, 0x22, 0x7f, 0x22,
28 0x14, 0x00, 0x5f, 0x5f, 0x00, 0x5f, 0x5f, 0x00, 0x06, 0x09, 0x7f, 0x01, 0x7f, 0x00, 0x00, 0x66,
29 0x89, 0x95, 0x6a, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xa2, 0xff, 0xa2, 0x94, 0x00,
30 0x08, 0x04, 0x7e, 0x04, 0x08, 0x00, 0x10, 0x20, 0x7e, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2a, 0x1c,
31 0x08, 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0c, 0x1e,
32 0x0c, 0x1e, 0x0c, 0x00, 0x30, 0x38, 0x3e, 0x38, 0x30, 0x00, 0x06, 0x0e, 0x3e, 0x0e, 0x06, 0x00,
33 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07,
34 0x00, 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x23, 0x13,
35 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
36 0x00, 0x1c, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, 0x00, 0x2a, 0x1c, 0x7f, 0x1c,
37 0x2a, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08,
38 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
39 0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00, 0x72, 0x49, 0x49, 0x49,
40 0x46, 0x00, 0x21, 0x41, 0x49, 0x4d, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00, 0x27, 0x45,
41 0x45, 0x45, 0x39, 0x00, 0x3c, 0x4a, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
42 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1e, 0x00, 0x00, 0x00, 0x14, 0x00,
43 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14,
44 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
45 0x3e, 0x41, 0x5d, 0x59, 0x4e, 0x00, 0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00, 0x7f, 0x49, 0x49, 0x49,
46 0x36, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x3e, 0x00, 0x7f, 0x49,
47 0x49, 0x49, 0x41, 0x00, 0x7f, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3e, 0x41, 0x41, 0x51, 0x73, 0x00,
48 0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x41, 0x7f, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3f,
49 0x01, 0x00, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7f, 0x02,
50 0x1c, 0x02, 0x7f, 0x00, 0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00,
51 0x7f, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00, 0x7f, 0x09, 0x19, 0x29,
52 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7f, 0x01, 0x03, 0x00, 0x3f, 0x40,
53 0x40, 0x40, 0x3f, 0x00, 0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00, 0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00,
54 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4d,
55 0x43, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41,
56 0x41, 0x41, 0x7f, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
57 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7f, 0x28, 0x44, 0x44,
58 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x28, 0x7f, 0x00, 0x38, 0x54,
59 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7e, 0x09, 0x02, 0x00, 0x18, 0xa4, 0xa4, 0x9c, 0x78, 0x00,
60 0x7f, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7d, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3d,
61 0x00, 0x00, 0x7f, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x40, 0x00, 0x00, 0x7c, 0x04,
62 0x78, 0x04, 0x78, 0x00, 0x7c, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
63 0xfc, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xfc, 0x00, 0x7c, 0x08, 0x04, 0x04,
64 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3f, 0x44, 0x24, 0x00, 0x3c, 0x40,
65 0x40, 0x20, 0x7c, 0x00, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x00, 0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00,
66 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4c, 0x90, 0x90, 0x90, 0x7c, 0x00, 0x44, 0x64, 0x54, 0x4c,
67 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41,
68 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3c, 0x26, 0x23, 0x26, 0x3c, 0x00,
69 0x00, 0x06, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f,
70 0x0f, 0x0f, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
77 0xf0, 0xf8, 0xfc, 0x3e, 0x1e, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00,
78 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x7e, 0x5b, 0x4f, 0x5b, 0xfe, 0xc0,
79 0x00, 0x00, 0xc0, 0x00, 0xdc, 0xd7, 0xde, 0xde, 0xde, 0xd7, 0xdc, 0x00, 0xc0, 0x00, 0x00, 0x00,
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
82 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x30, 0x1c, 0x0e, 0xfe, 0x00, 0x00, 0x00,
83 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
85 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
86 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
87 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
88 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
89 0x0f, 0x1f, 0x3f, 0x3c, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00,
90 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, 0x30, 0x7b, 0x7f, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7f,
91 0x3b, 0x00, 0x03, 0x00, 0x0f, 0x7f, 0x0f, 0x0f, 0x0f, 0x7f, 0x0f, 0x00, 0x03, 0x00, 0x00, 0x00,
92 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
93 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf0, 0xf0, 0x70,
94 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x04, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0x0e, 0x0c, 0x00,
95 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
97 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
98 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
105};
diff --git a/keyboards/tau4/config.h b/keyboards/tau4/config.h
new file mode 100755
index 000000000..d7e6ffe1b
--- /dev/null
+++ b/keyboards/tau4/config.h
@@ -0,0 +1,72 @@
1/*
2Copyright 2020 Oliver Gaskell <me@gaskell.tech>
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 0xFEED
24#define PRODUCT_ID 0x6060
25#define DEVICE_VER 0x0001
26#define MANUFACTURER taukeyboards
27#define PRODUCT tau4
28
29/* key matrix size */
30#define MATRIX_ROWS 4
31#define MATRIX_COLS 12
32
33/* key matrix pins */
34#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
35#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, F1, F0, B0, B1 }
36#define UNUSED_PINS
37
38/* COL2ROW or ROW2COL */
39#define DIODE_DIRECTION COL2ROW
40
41/* Set 0 if debouncing isn't needed */
42#define DEBOUNCE 5
43
44#define RGB_DI_PIN B2
45#ifdef RGB_DI_PIN
46#define RGBLIGHT_ANIMATIONS
47#define RGBLIGHT_LAYERS
48#define RGBLED_NUM 10
49#define RGBLIGHT_HUE_STEP 8
50#define RGBLIGHT_SAT_STEP 16
51#define RGBLIGHT_VAL_STEP 8
52#define RGBLIGHT_LIMIT_VAL 128
53#endif
54
55#define ENCODERS_PAD_A { B3 }
56#define ENCODERS_PAD_B { B7 }
57#define ENCODER_RESOLUTION 1
58
59// Buggy, currently disabled
60/* #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
61#define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 8) & 0x07) << 1))
62#define EXTERNAL_EEPROM_BYTE_COUNT 2048
63#define EXTERNAL_EEPROM_PAGE_SIZE 16
64#define EXTERNAL_EEPROM_ADDRESS_SIZE 1
65#define EXTERNAL_EEPROM_WRITE_TIME 5 */
66
67#define OLED_DISPLAY_ADDRESS 0x3C
68#define OLED_BRIGHTNESS 255
69#define OLED_IC OLED_IC_SSD1306
70#define OLED_DISPLAY_WIDTH 128
71#define OLED_DISPLAY_HEIGHT 32
72#define OLED_FONT_H "keyboards/tau4/common/glcdfont.c"
diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c
new file mode 100755
index 000000000..aff188e4c
--- /dev/null
+++ b/keyboards/tau4/keymaps/default/keymap.c
@@ -0,0 +1,145 @@
1/*
2Copyright 2020 Oliver Gaskell <me@gaskell.tech>
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#include QMK_KEYBOARD_H
19
20enum layers {
21 _QWERTY = 0,
22 _NUMPAD,
23 _LOWER,
24 _RAISE,
25 _ADJUST
26};
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29
30 [_QWERTY] = LAYOUT_ortho_4x12(
31 KC_MUTE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
32 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
33 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
34 KC_BSPC, KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),
35
36 [_NUMPAD] = LAYOUT_ortho_4x12(
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST,
39 KC_TRNS, TG(_NUMPAD), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT,
40 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_PDOT, KC_PMNS, KC_PPLS),
41
42 [_LOWER] = LAYOUT_ortho_4x12(
43 KC_VOLD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS,
44 KC_NLCK, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, LSFT(KC_NUHS),
45 KC_TRNS, LSFT(KC_NUBS), KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LSFT(KC_GRV), LSFT(KC_NUBS), KC_TRNS,
46 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END),
47
48 [_RAISE] = LAYOUT_ortho_4x12(
49 KC_VOLU, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
50 KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_NUHS,
51 KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_NUBS, KC_TRNS,
52 KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT),
53
54 [_ADJUST] = LAYOUT_ortho_4x12(
55 KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RESET,
56 KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, KC_TRNS, KC_TRNS,
57 KC_TRNS, TG(_NUMPAD), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
58 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
59};
60
61const rgblight_segment_t PROGMEM _RAISE_lighting[] = RGBLIGHT_LAYER_SEGMENTS(
62 {7, 1, 1, 202, 110}
63);
64const rgblight_segment_t PROGMEM _LOWER_lighting[] = RGBLIGHT_LAYER_SEGMENTS(
65 {7, 1, 125, 188, 80}
66);
67const rgblight_segment_t PROGMEM _ADJUST_lighting[] = RGBLIGHT_LAYER_SEGMENTS(
68 {7, 1, 32, 25, 127}
69);
70const rgblight_segment_t PROGMEM _NUMPAD_lighting[] = RGBLIGHT_LAYER_SEGMENTS(
71 {7, 1, HSV_BLUE}
72);
73const rgblight_segment_t PROGMEM _DEFAULT_lighting[] = RGBLIGHT_LAYER_SEGMENTS(
74 {7, 1, HSV_OFF}
75);
76const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
77 _DEFAULT_lighting,
78 _NUMPAD_lighting,
79 _LOWER_lighting,
80 _RAISE_lighting,
81 _ADJUST_lighting
82);
83
84void keyboard_post_init_user(void) {
85 rgblight_layers = my_rgb_layers;
86
87 // Uncomment for debug mode
88 /* debug_enable=true;
89 debug_matrix=true; */
90}
91
92layer_state_t layer_state_set_user(layer_state_t state) {
93 state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
94
95 rgblight_set_layer_state(_QWERTY, layer_state_cmp(state, _QWERTY));
96 rgblight_set_layer_state(_NUMPAD, layer_state_cmp(state, _NUMPAD));
97 rgblight_set_layer_state(_LOWER, layer_state_cmp(state, _LOWER));
98 rgblight_set_layer_state(_RAISE, layer_state_cmp(state, _RAISE));
99 rgblight_set_layer_state(_ADJUST, layer_state_cmp(state, _ADJUST));
100
101 return state;
102}
103
104void encoder_update_user(uint8_t index, bool clockwise) {
105 if (index == 0) { /* First encoder */
106 if (clockwise) {
107 tap_code(KC_VOLU);
108 } else {
109 tap_code(KC_VOLD);
110 }
111 }
112}
113
114
115#ifdef OLED_DRIVER_ENABLE
116
117static void render_status(void) {
118 oled_write_P(PSTR("Tau.4 v1.0\n\n"), false);
119 oled_write_P(PSTR("Layer:\n"), false);
120
121 switch (get_highest_layer(layer_state)) {
122 case _QWERTY:
123 oled_write_P(PSTR("Default "), false);
124 break;
125 case _NUMPAD:
126 oled_write_P(PSTR("Numpad "), false);
127 break;
128 case _LOWER:
129 oled_write_P(PSTR("Lower "), false);
130 break;
131 case _RAISE:
132 oled_write_P(PSTR("Raise "), false);
133 break;
134 case _ADJUST:
135 oled_write_P(PSTR("Adjust "), false);
136 break;
137 default:
138 oled_write_P(PSTR("Undefined"), false);
139 }
140}
141
142void oled_task_user(void) {
143 render_status();
144}
145#endif
diff --git a/keyboards/tau4/keymaps/default/readme.md b/keyboards/tau4/keymaps/default/readme.md
new file mode 100644
index 000000000..ee5d1b839
--- /dev/null
+++ b/keyboards/tau4/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1Default keymap:
2
3![Keymap](http://gaskell.tech/tau/images/tau4keymap.png)
4
5This layout supports 2x1u spacebar and 1x2u, and an encoder in the topmost position.
diff --git a/keyboards/tau4/readme.md b/keyboards/tau4/readme.md
new file mode 100644
index 000000000..beea3f07a
--- /dev/null
+++ b/keyboards/tau4/readme.md
@@ -0,0 +1,16 @@
1# τ.4
2
3![Tau.4](http://gaskell.tech/tau/images/tau4.jpg)
4
5A 40% ortholinear keyboard, developed by Oliver Gaskell. More info on [gaskell.tech](https://gaskell.tech/tau/four.html)
6
7* Keyboard Maintainer: [Oliver Gaskell](https://github.com/ogaskell)
8* Hardware Supported: Tau4 PCB rev1.0, Tau4 PCB rev1.1
9* Hardware Availability: Group Buy - Opens 05 Feb 2021 [More Details](https://gaskell.tech/tau/four.html)
10
11
12Make example for this keyboard (after setting up your build environment):
13
14 make tau4:default
15
16See 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/tau4/rules.mk b/keyboards/tau4/rules.mk
new file mode 100755
index 000000000..712646abc
--- /dev/null
+++ b/keyboards/tau4/rules.mk
@@ -0,0 +1,28 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = yes # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23ENCODER_ENABLE = yes # Rotary Encoder support
24OLED_DRIVER_ENABLE = yes # OLED display support
25# EEPROM_DRIVER ?= i2c # Driver for external EEPROM chip
26# This is currently not working due to QMK not officially supporting the chip used on the Tau4, I am working on a fix.
27
28LAYOUTS = ortho_4x12
diff --git a/keyboards/tau4/tau4.c b/keyboards/tau4/tau4.c
new file mode 100755
index 000000000..3002566ce
--- /dev/null
+++ b/keyboards/tau4/tau4.c
@@ -0,0 +1,18 @@
1/*
2Copyright 2020 Oliver Gaskell <me@gaskell.tech>
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#include "tau4.h"
diff --git a/keyboards/tau4/tau4.h b/keyboards/tau4/tau4.h
new file mode 100755
index 000000000..d9ff50211
--- /dev/null
+++ b/keyboards/tau4/tau4.h
@@ -0,0 +1,32 @@
1/*
2Copyright 2020 Oliver Gaskell <me@gaskell.tech>
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 "quantum.h"
21
22#define LAYOUT_ortho_4x12( \
23 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
24 K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
25 K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
26 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
27) { \
28 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
29 { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
30 { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
31 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \
32}