aboutsummaryrefslogtreecommitdiff
path: root/keyboards/uzu42
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/uzu42')
-rw-r--r--keyboards/uzu42/config.h29
-rw-r--r--keyboards/uzu42/keymaps/default/config.h47
-rw-r--r--keyboards/uzu42/keymaps/default/glcdfont_uzu42.c243
-rw-r--r--keyboards/uzu42/keymaps/default/keymap.c292
-rw-r--r--keyboards/uzu42/readme.md15
-rw-r--r--keyboards/uzu42/rev1/config.h77
-rw-r--r--keyboards/uzu42/rev1/rev1.c2
-rw-r--r--keyboards/uzu42/rev1/rev1.h36
-rw-r--r--keyboards/uzu42/rev1/rules.mk20
-rw-r--r--keyboards/uzu42/rev1/serial_config.h4
-rw-r--r--keyboards/uzu42/rev1/serial_config_simpleapi.h5
-rw-r--r--keyboards/uzu42/rules.mk40
-rw-r--r--keyboards/uzu42/uzu42.c5
-rw-r--r--keyboards/uzu42/uzu42.h5
14 files changed, 820 insertions, 0 deletions
diff --git a/keyboards/uzu42/config.h b/keyboards/uzu42/config.h
new file mode 100644
index 000000000..45f497d78
--- /dev/null
+++ b/keyboards/uzu42/config.h
@@ -0,0 +1,29 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3Copyright 2015 Jack Humbert
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "config_common.h"
22
23#ifndef SOFT_SERIAL_PIN
24#define SOFT_SERIAL_PIN D2
25#define SERIAL_USE_MULTI_TRANSACTION
26#endif
27
28#define NO_ACTION_MACRO
29#define NO_ACTION_FUNCTION
diff --git a/keyboards/uzu42/keymaps/default/config.h b/keyboards/uzu42/keymaps/default/config.h
new file mode 100644
index 000000000..bc7897f50
--- /dev/null
+++ b/keyboards/uzu42/keymaps/default/config.h
@@ -0,0 +1,47 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6
7This program is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23//#define USE_MATRIX_I2C
24
25/* Select hand configuration */
26
27#define MASTER_LEFT
28// #define MASTER_RIGHT
29// #define EE_HANDS
30
31#define SSD1306OLED
32
33#define USE_SERIAL_PD2
34
35#define TAPPING_FORCE_HOLD
36#define TAPPING_TERM 200
37
38#undef RGBLED_NUM
39#define RGBLIGHT_ANIMATIONS
40#define RGBLED_NUM 54
41#define RGBLIGHT_LIMIT_VAL 120
42#define RGBLIGHT_HUE_STEP 10
43#define RGBLIGHT_SAT_STEP 17
44#define RGBLIGHT_VAL_STEP 17
45
46// Use the lily version to get the uzu42 logo instead of the qmk logo
47#define OLED_FONT_H "keymaps/default/glcdfont_uzu42.c"
diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c
new file mode 100644
index 000000000..f5524ec73
--- /dev/null
+++ b/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c
@@ -0,0 +1,243 @@
1// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
2// See gfxfont.h for newer custom bitmap font info.
3
4#ifndef FONT5X7_H
5#define FONT5X7_H
6
7#ifdef __AVR__
8 #include <avr/io.h>
9 #include <avr/pgmspace.h>
10#elif defined(ESP8266)
11 #include <pgmspace.h>
12#else
13 #define PROGMEM
14#endif
15
16// Standard ASCII 5x7 font
17const unsigned char font[] PROGMEM = {
180x00, 0x00, 0x00, 0x00, 0x00, 0x00,
190x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
200x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
210x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
220x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
230x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
240x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
250x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
260xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
270x00, 0x18, 0x24, 0x18, 0x00, 0x00,
280xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
290x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
300x26, 0x29, 0x79, 0x29, 0x26, 0x00,
310x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
320x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
330x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
340x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
350x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
360x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
370x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
380x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
390x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
400x60, 0x60, 0x60, 0x60, 0x60, 0x00,
410x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
420x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
430x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
440x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
450x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
460x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
470x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
480x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
490x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
500x00, 0x00, 0x00, 0x00, 0x00, 0x00,
510x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
520x00, 0x07, 0x00, 0x07, 0x00, 0x00,
530x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
540x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
550x23, 0x13, 0x08, 0x64, 0x62, 0x00,
560x36, 0x49, 0x56, 0x20, 0x50, 0x00,
570x00, 0x08, 0x07, 0x03, 0x00, 0x00,
580x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
590x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
600x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
610x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
620x00, 0x80, 0x70, 0x30, 0x00, 0x00,
630x08, 0x08, 0x08, 0x08, 0x08, 0x00,
640x00, 0x00, 0x60, 0x60, 0x00, 0x00,
650x20, 0x10, 0x08, 0x04, 0x02, 0x00,
660x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
670x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
680x72, 0x49, 0x49, 0x49, 0x46, 0x00,
690x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
700x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
710x27, 0x45, 0x45, 0x45, 0x39, 0x00,
720x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
730x41, 0x21, 0x11, 0x09, 0x07, 0x00,
740x36, 0x49, 0x49, 0x49, 0x36, 0x00,
750x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
760x00, 0x00, 0x14, 0x00, 0x00, 0x00,
770x00, 0x40, 0x34, 0x00, 0x00, 0x00,
780x00, 0x08, 0x14, 0x22, 0x41, 0x00,
790x14, 0x14, 0x14, 0x14, 0x14, 0x00,
800x00, 0x41, 0x22, 0x14, 0x08, 0x00,
810x02, 0x01, 0x59, 0x09, 0x06, 0x00,
820x00, 0x41, 0x5D, 0x59, 0x4E, 0x00,
830x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
840x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
850x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
860x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
870x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
880x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
890x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
900x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
910x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
920x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
930x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
940x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
950x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
960x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
970x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
980x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
990x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
1000x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
1010x26, 0x49, 0x49, 0x49, 0x32, 0x00,
1020x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
1030x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
1040x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
1050x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
1060x63, 0x14, 0x08, 0x14, 0x63, 0x00,
1070x03, 0x04, 0x78, 0x04, 0x03, 0x00,
1080x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
1090x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
1100x02, 0x04, 0x08, 0x10, 0x20, 0x00,
1110x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
1120x04, 0x02, 0x01, 0x02, 0x04, 0x00,
1130x40, 0x40, 0x40, 0x40, 0x40, 0x00,
1140x00, 0x03, 0x07, 0x08, 0x00, 0x00,
1150x20, 0x54, 0x54, 0x78, 0x40, 0x00,
1160x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
1170x38, 0x44, 0x44, 0x44, 0x28, 0x00,
1180x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
1190x38, 0x54, 0x54, 0x54, 0x18, 0x00,
1200x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
1210x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
1220x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
1230x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
1240x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
1250x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
1260x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
1270x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
1280x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
1290x38, 0x44, 0x44, 0x44, 0x38, 0x00,
1300x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
1310x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
1320x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
1330x48, 0x54, 0x54, 0x54, 0x24, 0x00,
1340x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
1350x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
1360x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
1370x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
1380x44, 0x28, 0x10, 0x28, 0x44, 0x00,
1390x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
1400x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
1410x00, 0x08, 0x36, 0x41, 0x00, 0x00,
1420x00, 0x00, 0x77, 0x00, 0x00, 0x00,
1430x00, 0x41, 0x36, 0x08, 0x00, 0x00,
1440x02, 0x01, 0x02, 0x04, 0x02, 0x00,
1450x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
1460x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1470x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1480x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1490x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1500x00, 0x00, 0x00, 0xC0, 0xE0, 0x70,
1510x38, 0x18, 0x18, 0x0C, 0x0C, 0x0C,
1520x0E, 0x06, 0x06, 0x06, 0x06, 0x00,
1530x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1540x00, 0x80, 0x80, 0x00, 0x00, 0x00,
1550x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0,
1560x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1570x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00,
1580xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
1590xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
1600x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00,
1610x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1620xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00,
1630x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1640x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1650x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1660x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1670xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
1680xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
1690x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
1700x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
1710x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
1720x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
1730xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
1740xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
1750x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1760x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1770x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1780x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1790x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1800x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1810x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1820x00, 0x00, 0x00, 0x03, 0x07, 0x2E,
1830x6C, 0xD8, 0xD8, 0xF8, 0xB0, 0xB0,
1840xB0, 0xB0, 0xB0, 0xB0, 0xB0, 0xB0,
1850xB0, 0xB0, 0xF8, 0xD8, 0xD8, 0x6C,
1860x2E, 0x07, 0x03, 0x00, 0x00, 0x00,
1870x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
1880x80, 0x00, 0x00, 0x00, 0x00, 0x00,
1890x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
1900x01, 0x01, 0x81, 0xC1, 0xE1, 0x79,
1910x3D, 0x0F, 0x07, 0x03, 0x01, 0x00,
1920x00, 0x00, 0xFF, 0xFF, 0xFF, 0x80,
1930x00, 0x00, 0x00, 0x00, 0x00, 0x80,
1940xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
1950x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1960x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1970x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1980x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
2000x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
2010x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
2020x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
2030x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
2040x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
2050x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
2060x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
2070x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2080x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2090x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2100x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2110x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2120x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2130x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2140x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2150x00, 0x00, 0x02, 0x06, 0x17, 0x3D,
2160x6D, 0x6D, 0x6D, 0x6D, 0x6D, 0x6D,
2170x3D, 0x17, 0x06, 0x02, 0x00, 0x00,
2180x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2190x00, 0x00, 0x00, 0x00, 0x01, 0x03,
2200x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2210x07, 0x03, 0x01, 0x00, 0x00, 0x00,
2220x06, 0x07, 0x07, 0x07, 0x07, 0x07,
2230x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2240x00, 0x00, 0x00, 0x01, 0x03, 0x07,
2250x07, 0x07, 0x07, 0x07, 0x07, 0x07,
2260x03, 0x01, 0x00, 0x00, 0x00, 0x00,
2270x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2280x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2290x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2300x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2310x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2320x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2330x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2340x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2350x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2360x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2370x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2380x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2390x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2400x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2410x00, 0x00, 0x00, 0x00, 0x00, 0x00,
242};
243#endif // FONT5X7_H
diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c
new file mode 100644
index 000000000..bb439971d
--- /dev/null
+++ b/keyboards/uzu42/keymaps/default/keymap.c
@@ -0,0 +1,292 @@
1#include QMK_KEYBOARD_H
2#include "uzu42.h"
3#ifdef PROTOCOL_LUFA
4 #include "lufa.h"
5 #include "split_util.h"
6#endif
7#ifdef SSD1306OLED
8 #include "ssd1306.h"
9#endif
10
11extern keymap_config_t keymap_config;
12
13#ifdef RGBLIGHT_ENABLE
14#include <stdio.h>
15//Following line allows macro to read current RGB settings
16extern rgblight_config_t rgblight_config;
17#endif
18
19// Each layer gets a name for readability, which is then used in the keymap matrix below.
20// The underscores don't mean anything - you can have a layer called STUFF or any other name.
21// Layer names don't all need to be of the same length, obviously, and you can also skip them
22// entirely and just use numbers.
23enum layer_number {
24 _QWERTY = 0,
25 _LOWER,
26 _RAISE,
27 _ADJUST,
28};
29
30enum custom_keycodes {
31 QWERTY = SAFE_RANGE,
32 LOWER,
33 RAISE,
34 ADJUST,
35 RGBRST
36};
37
38#define KC_CTES CTL_T(KC_ESC)
39#define KC_SFSP SFT_T(KC_SPC)
40#define KC_ALBS ALT_T(KC_BSPC)
41
42const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
43 [_QWERTY] = LAYOUT( \
44 //,---------------------------------------. ,---------------------------------------.
45 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,\
46 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
47 KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\
48 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
49 KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,\
50 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
51 KC_LSFT, KC_SPC,KC_LALT,KC_LGUI, LOWER,KC_CTES, KC_SFSP, RAISE,KC_ALBS,KC_RCTL,KC_LGUI,XXXXXXX \
52 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
53 ),
54
55 [_LOWER] = LAYOUT( \
56 //,---------------------------------------. ,---------------------------------------.
57 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,\
58 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
59 KC_TAB,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_LEFT,KC_DOWN, KC_UP,KC_RGHT, KC_ENT,\
60 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
61 KC_LCTL, KC_SPC,KC_LSFT,KC_LALT, KC_DEL, KC_BSPC,KC_HOME, KC_END,XXXXXXX,XXXXXXX,\
62 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
63 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \
64 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
65 ),
66
67 [_RAISE] = LAYOUT( \
68 //,---------------------------------------. ,---------------------------------------.
69 KC_EXLM, KC_AT,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,\
70 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
71 KC_TAB,KC_UNDS,KC_PLUS,KC_PIPE,KC_TILD, KC_COLN,KC_DQUO, KC_GT,KC_LCBR,KC_RCBR,\
72 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
73 KC_LCTL,KC_MINS, KC_EQL,KC_BSLS, KC_GRV, KC_SCLN,KC_QUOT, KC_LT,KC_LBRC,KC_RBRC,\
74 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
75 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \
76 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
77 ),
78
79 [_ADJUST] = LAYOUT( \
80 //,---------------------------------------. ,---------------------------------------.
81 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\
82 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
83 KC_F11, KC_F12, RESET,KC_PSCR, KC_INS, RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,XXXXXXX,\
84 //|-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------|
85 XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGBRST,\
86 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
87 _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______ \
88 //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
89 )
90};
91
92int RGB_current_mode;
93
94// Setting ADJUST layer RGB back to default
95void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
96 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
97 layer_on(layer3);
98 } else {
99 layer_off(layer3);
100 }
101}
102
103void matrix_init_user(void) {
104 #ifdef RGBLIGHT_ENABLE
105 RGB_current_mode = rgblight_config.mode;
106 #endif
107}
108
109//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk
110#ifdef OLED_DRIVER_ENABLE
111
112#define L_BASE 0
113#define L_LOWER (1 << 1)
114#define L_RAISE (1 << 2)
115#define L_ADJUST (1 << 3)
116#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER)
117
118char layer_state_str[24];
119
120const char *read_layer_state(void) {
121 switch (layer_state)
122 {
123 case L_BASE:
124 snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default");
125 break;
126 case L_RAISE:
127 snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
128 break;
129 case L_LOWER:
130 snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
131 break;
132 case L_ADJUST:
133 case L_ADJUST_TRI:
134 snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
135 break;
136 default:
137 snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
138 }
139
140 return layer_state_str;
141}
142
143const char *read_logo(void) {
144 static char logo[] = {
145 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
146 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
147 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
148 0};
149 return logo;
150}
151
152char keylog_str[24] = {};
153char keylogs_str[21] = {};
154int keylogs_str_idx = 0;
155
156const char code_to_name[60] = {
157 ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
158 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
159 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
160 '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
161 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ',
162 ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '};
163
164void set_keylog(uint16_t keycode, keyrecord_t *record) {
165 char name = ' ';
166 if (keycode < 60) {
167 name = code_to_name[keycode];
168 }
169
170 // update keylog
171 snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
172 record->event.key.row, record->event.key.col,
173 keycode, name);
174
175 // update keylogs
176 if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
177 keylogs_str_idx = 0;
178 for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
179 keylogs_str[i] = ' ';
180 }
181 }
182
183 keylogs_str[keylogs_str_idx] = name;
184 keylogs_str_idx++;
185}
186
187const char *read_keylog(void) {
188 return keylog_str;
189}
190
191const char *read_keylogs(void) {
192 return keylogs_str;
193}
194
195oled_rotation_t oled_init_user(oled_rotation_t rotation) {
196 if (!is_keyboard_master())
197 return OLED_ROTATION_180; // flips the display 180 degrees if offhand
198 return rotation;
199}
200
201void oled_task_user(void) {
202 if (is_keyboard_master()) {
203 // If you want to change the display of OLED, you need to change here
204 oled_write_ln(read_layer_state(), false);
205 oled_write_ln(read_keylog(), false);
206 oled_write_ln(read_keylogs(), false);
207 //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false);
208 //oled_write_ln(read_host_led_state(), false);
209 //oled_write_ln(read_timelog(), false);
210 } else {
211 oled_write(read_logo(), false);
212 }
213}
214#endif // OLED_DRIVER_ENABLE
215
216bool process_record_user(uint16_t keycode, keyrecord_t *record) {
217 if (record->event.pressed) {
218#ifdef OLED_DRIVER_ENABLE
219 set_keylog(keycode, record);
220#endif
221 // set_timelog();
222 }
223
224 switch (keycode) {
225 case QWERTY:
226 if (record->event.pressed) {
227 set_single_persistent_default_layer(_QWERTY);
228 }
229 return false;
230 break;
231 case LOWER:
232 if (record->event.pressed) {
233 layer_on(_LOWER);
234 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
235 } else {
236 layer_off(_LOWER);
237 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
238 }
239 return false;
240 break;
241 case RAISE:
242 if (record->event.pressed) {
243 layer_on(_RAISE);
244 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
245 } else {
246 layer_off(_RAISE);
247 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
248 }
249 return false;
250 break;
251 case ADJUST:
252 if (record->event.pressed) {
253 layer_on(_ADJUST);
254 } else {
255 layer_off(_ADJUST);
256 }
257 return false;
258 break;
259 case RGB_MOD:
260 #ifdef RGBLIGHT_ENABLE
261 if (record->event.pressed) {
262 rgblight_mode(RGB_current_mode);
263 rgblight_step();
264 RGB_current_mode = rgblight_config.mode;
265 }
266 #endif
267 return false;
268 break;
269 case RGBRST:
270 #ifdef RGBLIGHT_ENABLE
271 if (record->event.pressed) {
272 eeconfig_update_rgblight_default();
273 rgblight_enable();
274 RGB_current_mode = rgblight_config.mode;
275 }
276 #endif
277 break;
278 }
279 return true;
280}
281
282#ifdef RGBLIGHT_ENABLE
283
284char rbf_info_str[24];
285const char *read_rgb_info(void) {
286
287 snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d",
288 rgblight_config.enable ? "on" : "- ", rgblight_config.mode,
289 rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
290 return rbf_info_str;
291}
292#endif
diff --git a/keyboards/uzu42/readme.md b/keyboards/uzu42/readme.md
new file mode 100644
index 000000000..9e287931b
--- /dev/null
+++ b/keyboards/uzu42/readme.md
@@ -0,0 +1,15 @@
1# uzu42
2
3[![uzu42](https://i.imgur.com/CQTfebZ.jpg)](https://imgur.com/gallery/aKOKBgq)
4
5A split keyboard with 4x5 vertically staggered keys and 1 thumb keys.
6
7Keyboard Maintainer: [nrtkbb](https://github.com/nrtkbb/) [@nrtkbb](https://twitter.com/nrtkbb)
8Hardware Supported: uzu42 PCB, Pro Micro
9Hardware Availability: https://nrtkbb.booth.pm/
10
11Make example for this keyboard (after setting up your build environment):
12
13 make uzu42:default
14
15See 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/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h
new file mode 100644
index 000000000..8f86d22bf
--- /dev/null
+++ b/keyboards/uzu42/rev1/config.h
@@ -0,0 +1,77 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3Copyright 2015 Jack Humbert
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0x3060
24#define DEVICE_VER 0x0001
25#define MANUFACTURER nrtkbb
26#define PRODUCT uzu42
27#define DESCRIPTION A split keyboard with 4x5 vertically staggered keys and 1 thumb keys
28
29/* key matrix size */
30// Rows are doubled-up
31#define MATRIX_ROWS 8
32#define MATRIX_COLS 6
33#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
34
35// wiring of each half
36#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
37// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
38
39/* define if matrix has ghost */
40//#define MATRIX_HAS_GHOST
41
42/* number of backlight levels */
43// #define BACKLIGHT_LEVELS 3
44
45/* Set 0 if debouncing isn't needed */
46#define DEBOUNCE 5
47
48/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
49//#define LOCKING_SUPPORT_ENABLE
50/* Locking resynchronize hack */
51//#define LOCKING_RESYNC_ENABLE
52
53/* ws2812 RGB LED */
54#define RGB_DI_PIN D3
55
56#ifdef RGBLIGHT_ENABLE
57# define RGBLED_NUM 54 // Number of LEDs
58# define RGBLED_SPLIT { 27, 27 }
59#endif
60
61/*
62 * Feature disable options
63 * These options are also useful to firmware size reduction.
64 */
65
66/* disable debug print */
67// #define NO_DEBUG
68
69/* disable print */
70// #define NO_PRINT
71
72/* disable action features */
73//#define NO_ACTION_LAYER
74//#define NO_ACTION_TAPPING
75//#define NO_ACTION_ONESHOT
76//#define NO_ACTION_MACRO
77//#define NO_ACTION_FUNCTION
diff --git a/keyboards/uzu42/rev1/rev1.c b/keyboards/uzu42/rev1/rev1.c
new file mode 100644
index 000000000..0bfac6bd9
--- /dev/null
+++ b/keyboards/uzu42/rev1/rev1.c
@@ -0,0 +1,2 @@
1#include "uzu42.h"
2
diff --git a/keyboards/uzu42/rev1/rev1.h b/keyboards/uzu42/rev1/rev1.h
new file mode 100644
index 000000000..7b9c7d599
--- /dev/null
+++ b/keyboards/uzu42/rev1/rev1.h
@@ -0,0 +1,36 @@
1#pragma once
2
3#include "../uzu42.h"
4
5#include "quantum.h"
6
7#ifdef RGBLIGHT_ENABLE
8//rgb led driver
9#include "ws2812.h"
10#endif
11
12#ifdef USE_I2C
13#include <stddef.h>
14#ifdef __AVR__
15 #include <avr/io.h>
16 #include <avr/interrupt.h>
17#endif
18#endif
19
20#define LAYOUT( \
21 L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
22 L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
23 L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
24 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
25 ) \
26 { \
27 { L00, L01, L02, L03, L04 }, \
28 { L10, L11, L12, L13, L14 }, \
29 { L20, L21, L22, L23, L24 }, \
30 { L30, L31, L32, L33, L34, L35 }, \
31 { R04, R03, R02, R01, R00 }, \
32 { R14, R13, R12, R11, R10 }, \
33 { R24, R23, R22, R21, R20 }, \
34 { R35, R34, R33, R32, R31, R30 } \
35 }
36
diff --git a/keyboards/uzu42/rev1/rules.mk b/keyboards/uzu42/rev1/rules.mk
new file mode 100644
index 000000000..9d0da7e0f
--- /dev/null
+++ b/keyboards/uzu42/rev1/rules.mk
@@ -0,0 +1,20 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = no # Mouse keys(+4700)
7EXTRAKEY_ENABLE = no # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
17SWAP_HANDS_ENABLE = no # Enable one-hand typing
18
19# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
20SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/uzu42/rev1/serial_config.h b/keyboards/uzu42/rev1/serial_config.h
new file mode 100644
index 000000000..4fab8e8dd
--- /dev/null
+++ b/keyboards/uzu42/rev1/serial_config.h
@@ -0,0 +1,4 @@
1#ifndef SOFT_SERIAL_PIN
2#define SOFT_SERIAL_PIN D2
3#define SERIAL_USE_MULTI_TRANSACTION
4#endif
diff --git a/keyboards/uzu42/rev1/serial_config_simpleapi.h b/keyboards/uzu42/rev1/serial_config_simpleapi.h
new file mode 100644
index 000000000..0e1dd9e4a
--- /dev/null
+++ b/keyboards/uzu42/rev1/serial_config_simpleapi.h
@@ -0,0 +1,5 @@
1#pragma once
2
3#undef SERIAL_USE_MULTI_TRANSACTION
4#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
5#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk
new file mode 100644
index 000000000..ff69431d4
--- /dev/null
+++ b/keyboards/uzu42/rules.mk
@@ -0,0 +1,40 @@
1# if firmware size over limit, try this option
2# CFLAGS += -flto
3
4# MCU name
5MCU = atmega32u4
6
7# Bootloader selection
8# Teensy halfkay
9# Pro Micro caterina
10# Atmel DFU atmel-dfu
11# LUFA DFU lufa-dfu
12# QMK DFU qmk-dfu
13# ATmega32A bootloadHID
14# ATmega328P USBasp
15BOOTLOADER = caterina
16
17# Use split_common libraries
18SPLIT_KEYBOARD = yes
19
20DEFAULT_FOLDER = uzu42/rev1
21
22# Build Options
23# change to "no" to disable the options, or define them in the Makefile in
24# the appropriate keymap folder that will get included automatically
25#
26BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
27MOUSEKEY_ENABLE = no # Mouse keys(+4700)
28EXTRAKEY_ENABLE = no # Audio control and System control(+450)
29CONSOLE_ENABLE = no # Console for debug(+400)
30COMMAND_ENABLE = no # Commands for debug and configuration
31NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
32BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
33MIDI_ENABLE = no # MIDI controls
34AUDIO_ENABLE = no # Audio output on port C6
35UNICODE_ENABLE = no # Unicode
36BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
37RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
38# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
39SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
40OLED_DRIVER_ENABLE = no # OLED display
diff --git a/keyboards/uzu42/uzu42.c b/keyboards/uzu42/uzu42.c
new file mode 100644
index 000000000..0eb8c5f3a
--- /dev/null
+++ b/keyboards/uzu42/uzu42.c
@@ -0,0 +1,5 @@
1#include "uzu42.h"
2
3bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
4 return process_record_user(keycode, record);
5}
diff --git a/keyboards/uzu42/uzu42.h b/keyboards/uzu42/uzu42.h
new file mode 100644
index 000000000..dd944e375
--- /dev/null
+++ b/keyboards/uzu42/uzu42.h
@@ -0,0 +1,5 @@
1#pragma once
2
3#ifdef KEYBOARD_uzu42_rev1
4 #include "rev1.h"
5#endif