aboutsummaryrefslogtreecommitdiff
path: root/keyboards/splitkb/kyria/rev1
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-25 18:18:39 -0700
committerGitHub <noreply@github.com>2021-07-25 18:18:39 -0700
commit4bb595f94b5c77e7a961ff69d2b4d9c53a9094fc (patch)
treeaef7208a8afee7f2f33c5a91b4613537c7ccb8ea /keyboards/splitkb/kyria/rev1
parentd90897052243808863bcab3b07e16d5b6a0b08f0 (diff)
downloadqmk_firmware-4bb595f94b5c77e7a961ff69d2b4d9c53a9094fc.tar.gz
qmk_firmware-4bb595f94b5c77e7a961ff69d2b4d9c53a9094fc.zip
[Keyboard] Fix up SplitKB keyboards (#13511)
Diffstat (limited to 'keyboards/splitkb/kyria/rev1')
-rw-r--r--keyboards/splitkb/kyria/rev1/config.h74
-rw-r--r--keyboards/splitkb/kyria/rev1/rev1.c123
-rw-r--r--keyboards/splitkb/kyria/rev1/rev1.h67
-rw-r--r--keyboards/splitkb/kyria/rev1/rules.mk3
4 files changed, 267 insertions, 0 deletions
diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h
new file mode 100644
index 000000000..1b7dc9849
--- /dev/null
+++ b/keyboards/splitkb/kyria/rev1/config.h
@@ -0,0 +1,74 @@
1/*
2Copyright 2019 Thomas Baart <thomas@splitkb.com>
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/* USB Device descriptor parameter */
21#define VENDOR_ID 0x8D1D
22#define PRODUCT_ID 0x9D9D
23#define DEVICE_VER 0x0001
24#define MANUFACTURER splitKB
25#define PRODUCT Kyria
26
27/* key matrix size */
28/* Rows are doubled up */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 8
31
32// wiring
33#define MATRIX_ROW_PINS \
34 { B4, E6, D7, D4 }
35#define MATRIX_COL_PINS \
36 { B6, B2, B3, B1, F7, F6, F5, F4 }
37#define UNUSED_PINS
38
39#define ENCODERS_PAD_A \
40 { C6 }
41#define ENCODERS_PAD_B \
42 { B5 }
43#define ENCODERS_PAD_A_RIGHT \
44 { B5 }
45#define ENCODERS_PAD_B_RIGHT \
46 { C6 }
47
48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION COL2ROW
50
51/* define if matrix has ghost (lacks anti-ghosting diodes) */
52//#define MATRIX_HAS_GHOST
53
54/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55#define DEBOUNCE 5
56
57/*
58 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
59 */
60#define SOFT_SERIAL_PIN D2
61
62#define RGB_DI_PIN D3
63#define RGBLED_SPLIT \
64 { 10, 10 }
65#define RGBLED_NUM 20
66
67/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
68#define LOCKING_SUPPORT_ENABLE
69/* Locking resynchronize hack */
70#define LOCKING_RESYNC_ENABLE
71
72#ifdef OLED_DRIVER_ENABLE
73# define OLED_DISPLAY_128X64
74#endif
diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c
new file mode 100644
index 000000000..fef272e38
--- /dev/null
+++ b/keyboards/splitkb/kyria/rev1/rev1.c
@@ -0,0 +1,123 @@
1/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
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 "rev1.h"
17
18#ifdef SWAP_HANDS_ENABLE
19// clang-format off
20__attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
21 {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}},
22 {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}},
23 {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}},
24 {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}},
25 {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}},
26 {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}},
27 {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}},
28 {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}}
29};
30// clang-format on
31#endif
32
33#ifdef OLED_DRIVER_ENABLE
34__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
35
36__attribute__((weak)) void oled_task_user(void) {
37 if (is_keyboard_master()) {
38 // QMK Logo and version information
39 // clang-format off
40 static const char PROGMEM qmk_logo[] = {
41 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
42 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
43 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
44 // clang-format on
45
46 oled_write_P(qmk_logo, false);
47 oled_write_P(PSTR("Kyria rev1.0\n\n"), false);
48
49 // Host Keyboard Layer Status
50 oled_write_P(PSTR("Layer: "), false);
51 switch (get_highest_layer(layer_state | default_layer_state)) {
52 case 0:
53 oled_write_P(PSTR("QWERTY\n"), false);
54 break;
55 case 1:
56 oled_write_P(PSTR("Dvorak\n"), false);
57 break;
58 case 2:
59 oled_write_P(PSTR("Colemak-DH\n"), false);
60 break;
61 case 3:
62 oled_write_P(PSTR("Nav\n"), false);
63 break;
64 case 4:
65 oled_write_P(PSTR("Sym\n"), false);
66 break;
67 case 5:
68 oled_write_P(PSTR("Function\n"), false);
69 break;
70 case 6:
71 oled_write_P(PSTR("Adjust\n"), false);
72 break;
73 default:
74 oled_write_P(PSTR("Undefined\n"), false);
75 }
76
77 // Host Keyboard LED Status
78 led_t led_usb_state = host_keyboard_led_state();
79 oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
80 oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
81 oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
82 } else {
83 // clang-format off
84 static const char PROGMEM kyria_logo[] = {
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
86 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
87 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
88 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0,
89 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0,
90 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
92 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
93 };
94 // clang-format on
95 oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
96 }
97}
98#endif
99
100#ifdef ENCODER_ENABLE
101bool encoder_update_kb(uint8_t index, bool clockwise) {
102 if (!encoder_update_user(index, clockwise)) {
103 return false;
104 }
105
106 if (index == 0) {
107 // Volume control
108 if (clockwise) {
109 tap_code(KC_VOLU);
110 } else {
111 tap_code(KC_VOLD);
112 }
113 } else if (index == 1) {
114 // Page up/Page down
115 if (clockwise) {
116 tap_code(KC_PGDN);
117 } else {
118 tap_code(KC_PGUP);
119 }
120 }
121 return true;
122}
123#endif
diff --git a/keyboards/splitkb/kyria/rev1/rev1.h b/keyboards/splitkb/kyria/rev1/rev1.h
new file mode 100644
index 000000000..bf9864fe3
--- /dev/null
+++ b/keyboards/splitkb/kyria/rev1/rev1.h
@@ -0,0 +1,67 @@
1/* Copyright 2019 Thomas Baart <thomas@splitkb.com>
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#pragma once
17
18#include "kyria.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28#define LAYOUT( \
29 L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \
30 L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \
31 L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \
32 L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \
33) \
34{ \
35 { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \
36 { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \
37 { L31, L30, L29, L28, L27, L26, L25, L24 }, \
38 { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \
39 { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \
40 { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \
41 { R32, R33, R34, R35, R36, R37, R38, R39 }, \
42 { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \
43}
44
45#define LAYOUT_stack( \
46 L00, L01, L02, L03, L04, L05, \
47 L12, L13, L14, L15, L16, L17, \
48 L24, L25, L26, L27, L28, L29, L30, L31, \
49 L40, L41, L42, L43, L44, \
50 \
51 R06, R07, R08, R09, R10, R11, \
52 R18, R19, R20, R21, R22, R23, \
53 R32, R33, R34, R35, R36, R37, R38, R39, \
54 R45, R46, R47, R48, R49 \
55) \
56{ \
57 { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \
58 { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \
59 { L31, L30, L29, L28, L27, L26, L25, L24 }, \
60 { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \
61 { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \
62 { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \
63 { R32, R33, R34, R35, R36, R37, R38, R39 }, \
64 { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \
65}
66
67#define LAYOUT_split_3x6_5 LAYOUT
diff --git a/keyboards/splitkb/kyria/rev1/rules.mk b/keyboards/splitkb/kyria/rev1/rules.mk
new file mode 100644
index 000000000..8b1c9616c
--- /dev/null
+++ b/keyboards/splitkb/kyria/rev1/rules.mk
@@ -0,0 +1,3 @@
1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
2ENCODER_ENABLE = yes # ENables the use of one or more encoders
3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow