diff options
Diffstat (limited to 'keyboards/tau4')
-rwxr-xr-x | keyboards/tau4/common/glcdfont.c | 105 | ||||
-rwxr-xr-x | keyboards/tau4/config.h | 34 | ||||
-rw-r--r-- | keyboards/tau4/info.json | 120 | ||||
-rwxr-xr-x | keyboards/tau4/keymaps/default/keymap.c | 114 | ||||
-rw-r--r-- | keyboards/tau4/keymaps/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/tau4/readme.md | 26 | ||||
-rwxr-xr-x | keyboards/tau4/rules.mk | 7 | ||||
-rwxr-xr-x | keyboards/tau4/tau4.c | 61 |
8 files changed, 468 insertions, 0 deletions
diff --git a/keyboards/tau4/common/glcdfont.c b/keyboards/tau4/common/glcdfont.c new file mode 100755 index 0000000000..05577612a1 --- /dev/null +++ b/keyboards/tau4/common/glcdfont.c @@ -0,0 +1,105 @@ +/* +Copyright 2020 Oliver Gaskell <me@gaskell.tech> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "progmem.h" + +static const unsigned char PROGMEM font[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e, 0x00, 0x3e, 0x6b, 0x4f, 0x6b, + 0x3e, 0x00, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c, 0x00, 0x18, 0x3c, 0x7e, 0x3c, 0x18, 0x00, 0x1c, 0x57, + 0x7d, 0x57, 0x1c, 0x00, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, + 0xff, 0xe7, 0xc3, 0xe7, 0xff, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xff, 0xe7, 0xdb, 0xe7, + 0xff, 0x00, 0x30, 0x48, 0x3a, 0x06, 0x0e, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7f, + 0x05, 0x05, 0x07, 0x00, 0x40, 0x7f, 0x05, 0x25, 0x3f, 0x00, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a, 0x00, + 0x7f, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x00, 0x14, 0x22, 0x7f, 0x22, + 0x14, 0x00, 0x5f, 0x5f, 0x00, 0x5f, 0x5f, 0x00, 0x06, 0x09, 0x7f, 0x01, 0x7f, 0x00, 0x00, 0x66, + 0x89, 0x95, 0x6a, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xa2, 0xff, 0xa2, 0x94, 0x00, + 0x08, 0x04, 0x7e, 0x04, 0x08, 0x00, 0x10, 0x20, 0x7e, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2a, 0x1c, + 0x08, 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0c, 0x1e, + 0x0c, 0x1e, 0x0c, 0x00, 0x30, 0x38, 0x3e, 0x38, 0x30, 0x00, 0x06, 0x0e, 0x3e, 0x0e, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, + 0x00, 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x23, 0x13, + 0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1c, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, 0x00, 0x2a, 0x1c, 0x7f, 0x1c, + 0x2a, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00, 0x72, 0x49, 0x49, 0x49, + 0x46, 0x00, 0x21, 0x41, 0x49, 0x4d, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00, 0x27, 0x45, + 0x45, 0x45, 0x39, 0x00, 0x3c, 0x4a, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1e, 0x00, 0x00, 0x00, 0x14, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, + 0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3e, 0x41, 0x5d, 0x59, 0x4e, 0x00, 0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00, 0x7f, 0x49, 0x49, 0x49, + 0x36, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x3e, 0x00, 0x7f, 0x49, + 0x49, 0x49, 0x41, 0x00, 0x7f, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3e, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x41, 0x7f, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3f, + 0x01, 0x00, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7f, 0x02, + 0x1c, 0x02, 0x7f, 0x00, 0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00, + 0x7f, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00, 0x7f, 0x09, 0x19, 0x29, + 0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7f, 0x01, 0x03, 0x00, 0x3f, 0x40, + 0x40, 0x40, 0x3f, 0x00, 0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00, 0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4d, + 0x43, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, + 0x41, 0x41, 0x7f, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7f, 0x28, 0x44, 0x44, + 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x28, 0x7f, 0x00, 0x38, 0x54, + 0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7e, 0x09, 0x02, 0x00, 0x18, 0xa4, 0xa4, 0x9c, 0x78, 0x00, + 0x7f, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7d, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3d, + 0x00, 0x00, 0x7f, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x40, 0x00, 0x00, 0x7c, 0x04, + 0x78, 0x04, 0x78, 0x00, 0x7c, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xfc, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xfc, 0x00, 0x7c, 0x08, 0x04, 0x04, + 0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3f, 0x44, 0x24, 0x00, 0x3c, 0x40, + 0x40, 0x20, 0x7c, 0x00, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x00, 0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4c, 0x90, 0x90, 0x90, 0x7c, 0x00, 0x44, 0x64, 0x54, 0x4c, + 0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41, + 0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3c, 0x26, 0x23, 0x26, 0x3c, 0x00, + 0x00, 0x06, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x0f, 0x0f, + 0x0f, 0x0f, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xf0, 0xf8, 0xfc, 0x3e, 0x1e, 0x06, 0x01, 0x00, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, + 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x7e, 0x5b, 0x4f, 0x5b, 0xfe, 0xc0, + 0x00, 0x00, 0xc0, 0x00, 0xdc, 0xd7, 0xde, 0xde, 0xde, 0xd7, 0xdc, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x30, 0x1c, 0x0e, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x0f, 0x1f, 0x3f, 0x3c, 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, + 0x7f, 0x41, 0x41, 0x41, 0x7f, 0x00, 0x30, 0x7b, 0x7f, 0x78, 0x30, 0x20, 0x20, 0x30, 0x78, 0x7f, + 0x3b, 0x00, 0x03, 0x00, 0x0f, 0x7f, 0x0f, 0x0f, 0x0f, 0x7f, 0x0f, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf0, 0xf0, 0x70, + 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x04, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0x0e, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; diff --git a/keyboards/tau4/config.h b/keyboards/tau4/config.h new file mode 100755 index 0000000000..ccc0217bd5 --- /dev/null +++ b/keyboards/tau4/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 Oliver Gaskell <me@gaskell.tech> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +// Buggy, currently disabled +/* #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 +#define EXTERNAL_EEPROM_I2C_ADDRESS(loc) (EXTERNAL_EEPROM_I2C_BASE_ADDRESS | ((((loc) >> 8) & 0x07) << 1)) +#define EXTERNAL_EEPROM_BYTE_COUNT 2048 +#define EXTERNAL_EEPROM_PAGE_SIZE 16 +#define EXTERNAL_EEPROM_ADDRESS_SIZE 1 +#define EXTERNAL_EEPROM_WRITE_TIME 5 */ + +#define RGBLIGHT_LAYERS_RETAIN_VAL + +#define OLED_DISPLAY_WIDTH 128 +#define OLED_DISPLAY_HEIGHT 32 +#define OLED_FONT_H "keyboards/tau4/common/glcdfont.c" diff --git a/keyboards/tau4/info.json b/keyboards/tau4/info.json new file mode 100644 index 0000000000..dca1387203 --- /dev/null +++ b/keyboards/tau4/info.json @@ -0,0 +1,120 @@ +{ + "keyboard_name": "tau4", + "manufacturer": "taukeyboards", + "url": "https://gaskell.tech/tau/four.html", + "maintainer": "qmk", + "usb": { + "vid": "0xFEED", + "pid": "0x6060", + "device_version": "0.0.1" + }, + "bootloader": "atmel-dfu", + "build": { + "lto": true + }, + "matrix_pins": { + "rows": [ "F4", "F5", "F6", "F7" ], + "cols": [ "D4", "D6", "D7", "B4", "B5", "B6", "C6", "C7", "F1", "F0", "B0", "B1" ] + }, + "processor": "atmega32u4", + "features": { + "bootmagic": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "oled": true, + "rgblight": true + }, + "community_layouts": [ "ortho_4x12" ], + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + { "pin_a": "B3", "pin_b": "B7", "resolution": 1 } + ] + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "brightness_steps": 8, + "hue_steps": 8, + "layers": { + "blink": false, + "enabled": true, + "max": 5, + "override_rgb": false + }, + "led_count": 10, + "max_brightness": 128, + "pin": "B2", + "saturation_steps": 16, + "sleep": true + }, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"label": "Mute", "matrix": [0, 0], "x":0, "y":0}, + {"label": "Q", "matrix": [0, 1], "x":1, "y":0}, + {"label": "W", "matrix": [0, 2], "x":2, "y":0}, + {"label": "E", "matrix": [0, 3], "x":3, "y":0}, + {"label": "R", "matrix": [0, 4], "x":4, "y":0}, + {"label": "T", "matrix": [0, 5], "x":5, "y":0}, + {"label": "Y", "matrix": [0, 6], "x":6, "y":0}, + {"label": "U", "matrix": [0, 7], "x":7, "y":0}, + {"label": "I", "matrix": [0, 8], "x":8, "y":0}, + {"label": "O", "matrix": [0, 9], "x":9, "y":0}, + {"label": "P", "matrix": [0, 10], "x":10, "y":0}, + {"label": "Backspace", "matrix": [0, 11], "x":11, "y":0}, + + {"label": "Esc", "matrix": [1, 0], "x":0, "y":1}, + {"label": "A", "matrix": [1, 1], "x":1, "y":1}, + {"label": "S", "matrix": [1, 2], "x":2, "y":1}, + {"label": "D", "matrix": [1, 3], "x":3, "y":1}, + {"label": "F", "matrix": [1, 4], "x":4, "y":1}, + {"label": "G", "matrix": [1, 5], "x":5, "y":1}, + {"label": "H", "matrix": [1, 6], "x":6, "y":1}, + {"label": "J", "matrix": [1, 7], "x":7, "y":1}, + {"label": "K", "matrix": [1, 8], "x":8, "y":1}, + {"label": "L", "matrix": [1, 9], "x":9, "y":1}, + {"label": ";:", "matrix": [1, 10], "x":10, "y":1}, + {"label": "'\"", "matrix": [1, 11], "x":11, "y":1}, + + {"label": "Shift", "matrix": [2, 0], "x":0, "y":2}, + {"label": "Z", "matrix": [2, 1], "x":1, "y":2}, + {"label": "X", "matrix": [2, 2], "x":2, "y":2}, + {"label": "C", "matrix": [2, 3], "x":3, "y":2}, + {"label": "V", "matrix": [2, 4], "x":4, "y":2}, + {"label": "B", "matrix": [2, 5], "x":5, "y":2}, + {"label": "N", "matrix": [2, 6], "x":6, "y":2}, + {"label": "M", "matrix": [2, 7], "x":7, "y":2}, + {"label": ",<", "matrix": [2, 8], "x":8, "y":2}, + {"label": ".>", "matrix": [2, 9], "x":9, "y":2}, + {"label": "/?", "matrix": [2, 10], "x":10, "y":2}, + {"label": "Enter", "matrix": [2, 11], "x":11, "y":2}, + + {"label": "Backspace", "matrix": [3, 0], "x":0, "y":3}, + {"label": "Ctrl", "matrix": [3, 1], "x":1, "y":3}, + {"label": "GUI", "matrix": [3, 2], "x":2, "y":3}, + {"label": "Alt", "matrix": [3, 3], "x":3, "y":3}, + {"label": "Lower", "matrix": [3, 4], "x":4, "y":3}, + {"label": "Space", "matrix": [3, 5], "x":5, "y":3}, + {"label": "Space", "matrix": [3, 6], "x":6, "y":3}, + {"label": "Raise", "matrix": [3, 7], "x":7, "y":3}, + {"label": "Left", "matrix": [3, 8], "x":8, "y":3}, + {"label": "Down", "matrix": [3, 9], "x":9, "y":3}, + {"label": "Up", "matrix": [3, 10], "x":10, "y":3}, + {"label": "Right", "matrix": [3, 11], "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c new file mode 100755 index 0000000000..775ec3a8f4 --- /dev/null +++ b/keyboards/tau4/keymaps/default/keymap.c @@ -0,0 +1,114 @@ +/* +Copyright 2020 Oliver Gaskell <me@gaskell.tech> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho_4x12( + KC_MUTE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_SLSH, KC_ENT, + KC_BSPC, KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + [_NUMPAD] = LAYOUT_ortho_4x12( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PAST, + KC_TRNS, TG(_NUMPAD), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_PDOT, KC_PMNS, KC_PPLS), + + [_LOWER] = LAYOUT_ortho_4x12( + KC_VOLD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS, + KC_NUM, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, LSFT(KC_NUHS), + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END), + + [_RAISE] = LAYOUT_ortho_4x12( + KC_VOLU, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_NUHS, + KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_NUBS, KC_TRNS, + KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT), + + [_ADJUST] = LAYOUT_ortho_4x12( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, QK_BOOT, + 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, + KC_TRNS, TG(_NUMPAD), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const rgblight_segment_t PROGMEM _RAISE_lighting[] = RGBLIGHT_LAYER_SEGMENTS( + {7, 1, 1, 202, 110} +); +const rgblight_segment_t PROGMEM _LOWER_lighting[] = RGBLIGHT_LAYER_SEGMENTS( + {7, 1, 125, 188, 80} +); +const rgblight_segment_t PROGMEM _ADJUST_lighting[] = RGBLIGHT_LAYER_SEGMENTS( + {7, 1, 32, 25, 127} +); +const rgblight_segment_t PROGMEM _NUMPAD_lighting[] = RGBLIGHT_LAYER_SEGMENTS( + {7, 1, HSV_BLUE} +); +const rgblight_segment_t PROGMEM _DEFAULT_lighting[] = RGBLIGHT_LAYER_SEGMENTS( + {7, 1, HSV_OFF} +); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + _DEFAULT_lighting, + _NUMPAD_lighting, + _LOWER_lighting, + _RAISE_lighting, + _ADJUST_lighting +); + +void keyboard_post_init_user(void) { + rgblight_layers = my_rgb_layers; + + // Uncomment for debug mode + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + + rgblight_set_layer_state(_QWERTY, layer_state_cmp(state, _QWERTY)); + rgblight_set_layer_state(_NUMPAD, layer_state_cmp(state, _NUMPAD)); + rgblight_set_layer_state(_LOWER, layer_state_cmp(state, _LOWER)); + rgblight_set_layer_state(_RAISE, layer_state_cmp(state, _RAISE)); + rgblight_set_layer_state(_ADJUST, layer_state_cmp(state, _ADJUST)); + + return state; +} + +#ifdef ENCODER_MAP_ENABLE + const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_NUMPAD] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_LOWER] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_RAISE] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_ADJUST] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif diff --git a/keyboards/tau4/keymaps/default/rules.mk b/keyboards/tau4/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/tau4/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/tau4/readme.md b/keyboards/tau4/readme.md new file mode 100644 index 0000000000..6c8b5c7bce --- /dev/null +++ b/keyboards/tau4/readme.md @@ -0,0 +1,26 @@ +# τ.4 + + + +A 40% ortholinear keyboard, developed by Oliver Gaskell. More info on [gaskell.tech](https://gaskell.tech/tau/four.html) + +* Keyboard Maintainer: [Oliver Gaskell](https://github.com/ogaskell) +* Hardware Supported: Tau4 PCB rev1.0, Tau4 PCB rev1.1 +* Hardware Availability: Group Buy took place between 05 Feb 2021 to 05 Mar 2021. [More Details](https://gaskell.tech/tau/four.html) + +Make example for this keyboard (after setting up your build environment): + + make tau4:default + +Flashing example for this keyboard: + + make tau4:default:flash + +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). + +## Bootloader + +Enter the bootloader in 2 ways: + +* **Bootmagic reset**: Hold down the top left key and plug in the keyboard. (If you built with an encoder in the top left, the "key" will be that encoder.) This will also clear EEPROM, so it is a good first step if the keyboard is misbehaving. +* **Keycode in layout**: By default, `QK_BOOT` is assigned to the top right key on the `ADJUST` (fifth) layer. diff --git a/keyboards/tau4/rules.mk b/keyboards/tau4/rules.mk new file mode 100755 index 0000000000..f27ee2a28e --- /dev/null +++ b/keyboards/tau4/rules.mk @@ -0,0 +1,7 @@ +# Build Options +# change yes to no to disable +# + +OLED_DRIVER = SSD1306 # OLED display support +# EEPROM_DRIVER ?= i2c # Driver for external EEPROM chip +# This is currently not working due to QMK not officially supporting the chip used on the Tau4, I am working on a fix. diff --git a/keyboards/tau4/tau4.c b/keyboards/tau4/tau4.c new file mode 100755 index 0000000000..aa508aae2c --- /dev/null +++ b/keyboards/tau4/tau4.c @@ -0,0 +1,61 @@ +/* +Copyright 2020 Oliver Gaskell <me@gaskell.tech> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "quantum.h" + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return true; +} +#endif + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + oled_write_P(PSTR("Tau.4 v1.0\n\n"), false); + oled_write_P(PSTR("Layer:\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default "), false); + break; + case 1: + oled_write_P(PSTR("Numpad "), false); + break; + case 2: + oled_write_P(PSTR("Lower "), false); + break; + case 3: + oled_write_P(PSTR("Raise "), false); + break; + case 4: + oled_write_P(PSTR("Adjust "), false); + break; + default: + oled_write_P(PSTR("Undefined"), false); + } + return true; +} +#endif |