aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2022-02-18 01:18:16 +0900
committerGitHub <noreply@github.com>2022-02-17 08:18:16 -0800
commit7e00fcd7bc8bca8b0f78f55a8827247f503a58ce (patch)
tree8a3f2f145d4e844c86627dc7d58d7db672af7e35
parentda68083fdf6e3237a1b6f4d1c8fee70ee10386c2 (diff)
downloadqmk_firmware-7e00fcd7bc8bca8b0f78f55a8827247f503a58ce.tar.gz
qmk_firmware-7e00fcd7bc8bca8b0f78f55a8827247f503a58ce.zip
[Keyboard] Remove Helix/rev1 (#16389)
-rw-r--r--keyboards/helix/rev1/.noci0
-rw-r--r--keyboards/helix/rev1/config.h86
-rw-r--r--keyboards/helix/rev1/info.json80
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/config.h51
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/keymap.c471
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/readme.md25
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/rules.mk4
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h9
-rw-r--r--keyboards/helix/rev1/keymaps/default/config.h34
-rw-r--r--keyboards/helix/rev1/keymaps/default/keymap.c342
-rw-r--r--keyboards/helix/rev1/matrix.c308
-rw-r--r--keyboards/helix/rev1/rev1.c10
-rw-r--r--keyboards/helix/rev1/rev1.h129
-rw-r--r--keyboards/helix/rev1/rules.mk11
-rw-r--r--keyboards/helix/rev1/serial_config.h9
-rw-r--r--keyboards/helix/rev1/split_util.c86
-rw-r--r--keyboards/helix/rev1/split_util.h17
17 files changed, 0 insertions, 1672 deletions
diff --git a/keyboards/helix/rev1/.noci b/keyboards/helix/rev1/.noci
deleted file mode 100644
index e69de29bb..000000000
--- a/keyboards/helix/rev1/.noci
+++ /dev/null
diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h
deleted file mode 100644
index 19d1e3be6..000000000
--- a/keyboards/helix/rev1/config.h
+++ /dev/null
@@ -1,86 +0,0 @@
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 0x3265
23#define PRODUCT_ID 0x8000
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Yushakobo
26#define PRODUCT Helix Alpha
27
28#include "serial_config.h"
29
30#define HELIX_ROWS 5
31
32/* key matrix size */
33// Rows are doubled-up
34#if HELIX_ROWS == 3
35 #define MATRIX_ROWS 6
36 #define MATRIX_ROW_PINS { D7, E6, B4 }
37#elif HELIX_ROWS == 4
38 #define MATRIX_ROWS 8
39 #define MATRIX_ROW_PINS { D7, E6, B4, B5 }
40#elif HELIX_ROWS == 5
41 #define MATRIX_ROWS 10
42 #define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 }
43#else
44 #error "expected HELIX_ROWS 3 or 4 or 5"
45#endif
46#define MATRIX_COLS 6
47
48// wiring of each half
49#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
50// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
51
52/* define if matrix has ghost */
53//#define MATRIX_HAS_GHOST
54
55/* number of backlight levels */
56// #define BACKLIGHT_LEVELS 3
57
58/* Set 0 if debouncing isn't needed */
59#define DEBOUNCE 5
60
61/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
62#define LOCKING_SUPPORT_ENABLE
63/* Locking resynchronize hack */
64#define LOCKING_RESYNC_ENABLE
65
66/* ws2812 RGB LED */
67#define RGB_DI_PIN D3
68
69#define RGBLED_NUM 12 // Number of LEDs
70/*
71 * Feature disable options
72 * These options are also useful to firmware size reduction.
73 */
74
75/* disable debug print */
76// #define NO_DEBUG
77
78/* disable print */
79// #define NO_PRINT
80
81/* disable action features */
82//#define NO_ACTION_LAYER
83//#define NO_ACTION_TAPPING
84//#define NO_ACTION_ONESHOT
85//#define NO_ACTION_MACRO
86//#define NO_ACTION_FUNCTION
diff --git a/keyboards/helix/rev1/info.json b/keyboards/helix/rev1/info.json
deleted file mode 100644
index c52da0897..000000000
--- a/keyboards/helix/rev1/info.json
+++ /dev/null
@@ -1,80 +0,0 @@
1{
2 "keyboard_name": "Helix rev. 1",
3 "url": "https://github.com/MakotoKurauchi/helix",
4 "maintainer": "MakotoKurauchi",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 {"x": 0, "y": 0},
9 {"x": 1, "y": 0},
10 {"x": 2, "y": 0},
11 {"x": 3, "y": 0},
12 {"x": 4, "y": 0},
13 {"x": 5, "y": 0},
14
15 {"x": 7, "y": 0},
16 {"x": 8, "y": 0},
17 {"x": 9, "y": 0},
18 {"x": 10, "y": 0},
19 {"x": 11, "y": 0},
20 {"x": 12, "y": 0},
21
22 {"x": 0, "y": 1},
23 {"x": 1, "y": 1},
24 {"x": 2, "y": 1},
25 {"x": 3, "y": 1},
26 {"x": 4, "y": 1},
27 {"x": 5, "y": 1},
28
29 {"x": 7, "y": 1},
30 {"x": 8, "y": 1},
31 {"x": 9, "y": 1},
32 {"x": 10, "y": 1},
33 {"x": 11, "y": 1},
34 {"x": 12, "y": 1},
35
36 {"x": 0, "y": 2},
37 {"x": 1, "y": 2},
38 {"x": 2, "y": 2},
39 {"x": 3, "y": 2},
40 {"x": 4, "y": 2},
41 {"x": 5, "y": 2},
42
43 {"x": 7, "y": 2},
44 {"x": 8, "y": 2},
45 {"x": 9, "y": 2},
46 {"x": 10, "y": 2},
47 {"x": 11, "y": 2},
48 {"x": 12, "y": 2},
49
50 {"x": 0, "y": 3},
51 {"x": 1, "y": 3},
52 {"x": 2, "y": 3},
53 {"x": 3, "y": 3},
54 {"x": 4, "y": 3},
55 {"x": 5, "y": 3},
56
57 {"x": 7, "y": 3},
58 {"x": 8, "y": 3},
59 {"x": 9, "y": 3},
60 {"x": 10, "y": 3},
61 {"x": 11, "y": 3},
62 {"x": 12, "y": 3},
63
64 {"x": 0, "y": 4},
65 {"x": 1, "y": 4},
66 {"x": 2, "y": 4},
67 {"x": 3, "y": 4},
68 {"x": 4, "y": 4},
69 {"x": 5, "y": 4},
70
71 {"x": 7, "y": 4},
72 {"x": 8, "y": 4},
73 {"x": 9, "y": 4},
74 {"x": 10, "y": 4},
75 {"x": 11, "y": 4},
76 {"x": 12, "y": 4}
77 ]
78 }
79 }
80}
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/config.h b/keyboards/helix/rev1/keymaps/OLED_sample/config.h
deleted file mode 100644
index 5e8989d96..000000000
--- a/keyboards/helix/rev1/keymaps/OLED_sample/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
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#ifndef CONFIG_USER_H
22#define CONFIG_USER_H
23
24/* Use I2C or Serial */
25
26#define USE_I2C
27#define USE_SERIAL
28//#define USE_MATRIX_I2C
29
30/* Select hand configuration */
31
32#define MASTER_LEFT
33// #define _MASTER_RIGHT
34// #define EE_HANDS
35
36#define SSD1306OLED
37
38#define USE_SERIAL_PD2
39
40#define TAPPING_FORCE_HOLD
41#define TAPPING_TERM 100
42
43
44#undef RGBLED_NUM
45#define RGBLIGHT_ANIMATIONS
46#define RGBLED_NUM 6
47#define RGBLIGHT_HUE_STEP 10
48#define RGBLIGHT_SAT_STEP 17
49#define RGBLIGHT_VAL_STEP 17
50
51#endif
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
deleted file mode 100644
index 6838b90e5..000000000
--- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
+++ /dev/null
@@ -1,471 +0,0 @@
1#include QMK_KEYBOARD_H
2#include "bootloader.h"
3#include <LUFA/Drivers/Peripheral/TWI.h>
4#ifdef AUDIO_ENABLE
5 #include "audio.h"
6#endif
7#ifdef SSD1306OLED
8 #include "ssd1306.h"
9#endif
10
11extern keymap_config_t keymap_config;
12
13//Following line allows macro to read current RGB settings
14extern rgblight_config_t rgblight_config;
15
16
17// Each layer gets a name for readability, which is then used in the keymap matrix below.
18// The underscores don't mean anything - you can have a layer called STUFF or any other name.
19// Layer names don't all need to be of the same length, obviously, and you can also skip them
20// entirely and just use numbers.
21#define _QWERTY 0
22#define _COLEMAK 1
23#define _DVORAK 2
24#define _LOWER 3
25#define _RAISE 4
26#define _ADJUST 16
27
28enum custom_keycodes {
29 QWERTY = SAFE_RANGE,
30 COLEMAK,
31 DVORAK,
32 LOWER,
33 RAISE,
34 ADJUST,
35 BACKLIT,
36 RGBLED_TOGGLE,
37 RGBLED_STEP_MODE,
38 RGBLED_INCREASE_HUE,
39 RGBLED_DECREASE_HUE,
40 RGBLED_INCREASE_SAT,
41 RGBLED_DECREASE_SAT,
42 RGBLED_INCREASE_VAL,
43 RGBLED_DECREASE_VAL,
44 M_SAMPLE
45};
46
47#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
48const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
49
50 /* Qwerty
51 * ,-----------------------------------------------------------------------------------.
52 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
53 * |------+------+------+------+------+------+------+------+------+------+------+------|
54 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
61 * `-----------------------------------------------------------------------------------'
62 */
63 [_QWERTY] = LAYOUT( \
64 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
65 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
66 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
67 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
68 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
69 ),
70
71 /* Colemak
72 * ,-----------------------------------------------------------------------------------.
73 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
74 * |------+------+------+------+------+------+------+------+------+------+------+------|
75 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
76 * |------+------+------+------+------+-------------+------+------+------+------+------|
77 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
78 * |------+------+------+------+------+------|------+------+------+------+------+------|
79 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
80 * |------+------+------+------+------+------+------+------+------+------+------+------|
81 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
82 * `-----------------------------------------------------------------------------------'
83 */
84 [_COLEMAK] = LAYOUT( \
85 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
86 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
87 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
88 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
89 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
90 ),
91
92 /* Dvorak
93 * ,-----------------------------------------------------------------------------------.
94 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
95 * |------+------+------+------+------+------+------+------+------+------+------+------|
96 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
97 * |------+------+------+------+------+-------------+------+------+------+------+------|
98 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
99 * |------+------+------+------+------+------|------+------+------+------+------+------|
100 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
101 * |------+------+------+------+------+------+------+------+------+------+------+------|
102 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
103 * `-----------------------------------------------------------------------------------'
104 */
105 [_DVORAK] = LAYOUT( \
106 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
107 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
108 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
109 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
110 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
111 ),
112
113 /* Lower
114 * ,-----------------------------------------------------------------------------------.
115 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
116 * |------+------+------+------+------+-------------+------+------+------+------+------|
117 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
118 * |------+------+------+------+------+-------------+------+------+------+------+------|
119 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
120 * |------+------+------+------+------+------|------+------+------+------+------+------|
121 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
122 * |------+------+------+------+------+------+------+------+------+------+------+------|
123 * | | | | | | | | Next | Vol- | Vol+ | Play |
124 * `-----------------------------------------------------------------------------------'
125 */
126 [_LOWER] = LAYOUT( \
127 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
128 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
129 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
130 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
131 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
132 ),
133
134 /* Raise
135 * ,-----------------------------------------------------------------------------------.
136 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
137 * |------+------+------+------+------+-------------+------+------+------+------+------|
138 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
139 * |------+------+------+------+------+-------------+------+------+------+------+------|
140 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
141 * |------+------+------+------+------+------|------+------+------+------+------+------|
142 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
143 * |------+------+------+------+------+------+------+------+------+------+------+------|
144 * | | | | | | | | Next | Vol- | Vol+ | Play |
145 * `-----------------------------------------------------------------------------------'
146 */
147 [_RAISE] = LAYOUT( \
148 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
149 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
150 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
151 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
152 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
153 ),
154
155 /* Adjust (Lower + Raise)
156 * ,-----------------------------------------------------------------------------------.
157 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
158 * |------+------+------+------+------+------+------+------+------+------+------+------|
159 * | | Reset| | | | | | | | | | Del |
160 * |------+------+------+------+------+-------------+------+------+------+------+------|
161 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
162 * |------+------+------+------+------+------|------+------+------+------+------+------|
163 * | | | | | | | | | | | | |
164 * |------+------+------+------+------+------+------+------+------+------+------+------|
165 * | | | | | | | | | | | |
166 * `-----------------------------------------------------------------------------------'
167 */
168 [_ADJUST] = LAYOUT( \
169 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
170 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
171 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
172 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
173 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
174 )
175};
176
177#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4
178
179const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
180
181 /* Qwerty
182 * ,-----------------------------------------------------------------------------------.
183 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
184 * |------+------+------+------+------+-------------+------+------+------+------+------|
185 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
186 * |------+------+------+------+------+------|------+------+------+------+------+------|
187 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
188 * |------+------+------+------+------+------+------+------+------+------+------+------|
189 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
190 * `-----------------------------------------------------------------------------------'
191 */
192
193 [_QWERTY] = LAYOUT( \
194 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
195 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
196 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
197 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
198 ),
199
200 /* Colemak
201 * ,-----------------------------------------------------------------------------------.
202 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
203 * |------+------+------+------+------+-------------+------+------+------+------+------|
204 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
205 * |------+------+------+------+------+------|------+------+------+------+------+------|
206 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
207 * |------+------+------+------+------+------+------+------+------+------+------+------|
208 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
209 * `-----------------------------------------------------------------------------------'
210 */
211 [_COLEMAK] = LAYOUT( \
212 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
213 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
214 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
215 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
216 ),
217
218 /* Dvorak
219 * ,-----------------------------------------------------------------------------------.
220 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
221 * |------+------+------+------+------+-------------+------+------+------+------+------|
222 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
223 * |------+------+------+------+------+------|------+------+------+------+------+------|
224 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
225 * |------+------+------+------+------+------+------+------+------+------+------+------|
226 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
227 * `-----------------------------------------------------------------------------------'
228 */
229 [_DVORAK] = LAYOUT( \
230 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
231 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
232 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
233 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
234 ),
235
236 /* Lower
237 * ,-----------------------------------------------------------------------------------.
238 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
239 * |------+------+------+------+------+-------------+------+------+------+------+------|
240 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
241 * |------+------+------+------+------+------|------+------+------+------+------+------|
242 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
243 * |------+------+------+------+------+------+------+------+------+------+------+------|
244 * | | | | | | | | Next | Vol- | Vol+ | Play |
245 * `-----------------------------------------------------------------------------------'
246 */
247 [_LOWER] = LAYOUT( \
248 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
249 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
250 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
251 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
252 ),
253
254 /* Raise
255 * ,-----------------------------------------------------------------------------------.
256 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
257 * |------+------+------+------+------+-------------+------+------+------+------+------|
258 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
259 * |------+------+------+------+------+------|------+------+------+------+------+------|
260 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
261 * |------+------+------+------+------+------+------+------+------+------+------+------|
262 * | | | | | | | | Next | Vol- | Vol+ | Play |
263 * `-----------------------------------------------------------------------------------'
264 */
265 [_RAISE] = LAYOUT( \
266 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
267 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
268 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
269 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
270 ),
271
272 /* Adjust (Lower + Raise)
273 * ,-----------------------------------------------------------------------------------.
274 * | | Reset| | | | | | | | | | Del |
275 * |------+------+------+------+------+-------------+------+------+------+------+------|
276 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
277 * |------+------+------+------+------+------|------+------+------+------+------+------|
278 * | | | | | | | | | | | | |
279 * |------+------+------+------+------+------+------+------+------+------+------+------|
280 * | | | | | | | | | | | |
281 * `-----------------------------------------------------------------------------------'
282 */
283 [_ADJUST] = LAYOUT( \
284 _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
285 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
286 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
287 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
288 )
289};
290
291#else
292#error "undefined keymaps"
293#endif
294
295
296#ifdef AUDIO_ENABLE
297
298float tone_qwerty[][2] = SONG(QWERTY_SOUND);
299float tone_dvorak[][2] = SONG(DVORAK_SOUND);
300float tone_colemak[][2] = SONG(COLEMAK_SOUND);
301float tone_plover[][2] = SONG(PLOVER_SOUND);
302float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
303float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
304#endif
305
306// define variables for reactive RGB
307bool TOG_STATUS = false;
308int RGB_current_mode;
309
310void persistent_default_layer_set(uint16_t default_layer) {
311 eeconfig_update_default_layer(default_layer);
312 default_layer_set(default_layer);
313}
314
315// Setting ADJUST layer RGB back to default
316void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
317 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
318 rgblight_mode(RGB_current_mode);
319 layer_on(layer3);
320 } else {
321 layer_off(layer3);
322 }
323}
324
325bool process_record_user(uint16_t keycode, keyrecord_t *record) {
326 switch (keycode) {
327 case QWERTY:
328 if (record->event.pressed) {
329 #ifdef AUDIO_ENABLE
330 PLAY_SONG(tone_qwerty);
331 #endif
332 persistent_default_layer_set(1UL<<_QWERTY);
333 }
334 return false;
335 break;
336 case COLEMAK:
337 if (record->event.pressed) {
338 #ifdef AUDIO_ENABLE
339 PLAY_SONG(tone_colemak);
340 #endif
341 persistent_default_layer_set(1UL<<_COLEMAK);
342 }
343 return false;
344 break;
345 case DVORAK:
346 if (record->event.pressed) {
347 #ifdef AUDIO_ENABLE
348 PLAY_SONG(tone_dvorak);
349 #endif
350 persistent_default_layer_set(1UL<<_DVORAK);
351 }
352 return false;
353 break;
354 case LOWER:
355 if (record->event.pressed) {
356 //not sure how to have keyboard check mode and set it to a variable, so my work around
357 //uses another variable that would be set to true after the first time a reactive key is pressed.
358 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
359 } else {
360 TOG_STATUS = !TOG_STATUS;
361 rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
362 }
363 layer_on(_LOWER);
364 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
365 } else {
366 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
367 TOG_STATUS = false;
368 layer_off(_LOWER);
369 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
370 }
371 return false;
372 break;
373 case RAISE:
374 if (record->event.pressed) {
375 //not sure how to have keyboard check mode and set it to a variable, so my work around
376 //uses another variable that would be set to true after the first time a reactive key is pressed.
377 if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
378 } else {
379 TOG_STATUS = !TOG_STATUS;
380 rgblight_mode(RGBLIGHT_MODE_SNAKE);
381 }
382 layer_on(_RAISE);
383 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
384 } else {
385 rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
386 layer_off(_RAISE);
387 TOG_STATUS = false;
388 update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
389 }
390 return false;
391 break;
392 case ADJUST:
393 if (record->event.pressed) {
394 layer_on(_ADJUST);
395 } else {
396 layer_off(_ADJUST);
397 }
398 return false;
399 break;
400 case BACKLIT:
401 if (record->event.pressed) {
402 register_code(KC_RSFT);
403 #ifdef BACKLIGHT_ENABLE
404 backlight_step();
405 #endif
406 } else {
407 unregister_code(KC_RSFT);
408 }
409 return false;
410 break;
411 //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released
412 case RGB_MOD:
413 if (record->event.pressed) {
414 rgblight_mode(RGB_current_mode);
415 rgblight_step();
416 RGB_current_mode = rgblight_config.mode;
417 }
418 return false;
419 break;
420 case M_SAMPLE:
421 if (record->event.pressed) {
422 SEND_STRING("hello world");
423 }
424 return false;
425 }
426 return true;
427}
428
429void matrix_init_user(void) {
430 #ifdef AUDIO_ENABLE
431 startup_user();
432 #endif
433 RGB_current_mode = rgblight_config.mode;
434}
435
436//SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h
437#ifdef SSD1306OLED
438void matrix_master_OLED_init (void) {
439 TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
440 iota_gfx_init(0); // turns on the display
441}
442
443void matrix_scan_user(void) {
444 iota_gfx_task(); // this is what updates the display continuously
445}
446#endif
447
448#ifdef AUDIO_ENABLE
449
450void startup_user()
451{
452 _delay_ms(20); // gets rid of tick
453}
454
455void shutdown_user()
456{
457 _delay_ms(150);
458 stop_all_notes();
459}
460
461void music_on_user(void)
462{
463 music_scale_user();
464}
465
466void music_scale_user(void)
467{
468 PLAY_SONG(music_scale);
469}
470
471#endif
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/readme.md b/keyboards/helix/rev1/keymaps/OLED_sample/readme.md
deleted file mode 100644
index 02888855b..000000000
--- a/keyboards/helix/rev1/keymaps/OLED_sample/readme.md
+++ /dev/null
@@ -1,25 +0,0 @@
1SSD1306 OLED Display via I2C
2======
3
4Features
5--------
6
7Some features supported by the firmware:
8
9
10* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this
11 requires pull-up resistors on the data and clock lines.
12* OLED display will connect from either side
13
14
15Wiring
16------
17
18
19Work in progress...
20
21
22OLED Configuration
23-------------------------------
24
25Work in progress...
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk
deleted file mode 100644
index 69170e35c..000000000
--- a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
1EXTRAKEY_ENABLE = yes
2NKRO_ENABLE = yes
3RGBLIGHT_ENABLE = yes
4SWAP_HANDS_ENABLE = no
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h b/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h
deleted file mode 100644
index f56951e70..000000000
--- a/keyboards/helix/rev1/keymaps/OLED_sample/serial_config.h
+++ /dev/null
@@ -1,9 +0,0 @@
1//// #error rev1/keymaps/OLED_sample serial config
2
3#ifndef SOFT_SERIAL_PIN
4/* Soft Serial defines */
5#define SOFT_SERIAL_PIN D2
6
7#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
8#define SERIAL_MASTER_BUFFER_LENGTH 0
9#endif
diff --git a/keyboards/helix/rev1/keymaps/default/config.h b/keyboards/helix/rev1/keymaps/default/config.h
deleted file mode 100644
index 0f81f5f7b..000000000
--- a/keyboards/helix/rev1/keymaps/default/config.h
+++ /dev/null
@@ -1,34 +0,0 @@
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// place overrides here
24
25/* Use I2C or Serial, not both */
26
27#define USE_SERIAL
28// #define USE_I2C
29
30/* Select hand configuration */
31
32#define MASTER_LEFT
33// #define _MASTER_RIGHT
34// #define EE_HANDS
diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c
deleted file mode 100644
index 9cfa0e361..000000000
--- a/keyboards/helix/rev1/keymaps/default/keymap.c
+++ /dev/null
@@ -1,342 +0,0 @@
1#include QMK_KEYBOARD_H
2
3
4// Each layer gets a name for readability, which is then used in the keymap matrix below.
5// The underscores don't mean anything - you can have a layer called STUFF or any other name.
6// Layer names don't all need to be of the same length, obviously, and you can also skip them
7// entirely and just use numbers.
8#define _QWERTY 0
9#define _COLEMAK 1
10#define _DVORAK 2
11#define _LOWER 3
12#define _RAISE 4
13#define _ADJUST 16
14
15enum custom_keycodes {
16 QWERTY = SAFE_RANGE,
17 COLEMAK,
18 DVORAK,
19 LOWER,
20 RAISE,
21 ADJUST,
22};
23
24#if MATRIX_ROWS == 10 // HELIX_ROWS == 5
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26
27 /* Qwerty
28 * ,-----------------------------------------------------------------------------------.
29 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
30 * |------+------+------+------+------+------+------+------+------+------+------+------|
31 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
32 * |------+------+------+------+------+-------------+------+------+------+------+------|
33 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
34 * |------+------+------+------+------+------|------+------+------+------+------+------|
35 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
36 * |------+------+------+------+------+------+------+------+------+------+------+------|
37 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
38 * `-----------------------------------------------------------------------------------'
39 */
40 [_QWERTY] = LAYOUT(
41 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
42 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
43 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
44 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
45 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
46 ),
47
48 /* Colemak
49 * ,-----------------------------------------------------------------------------------.
50 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
51 * |------+------+------+------+------+------+------+------+------+------+------+------|
52 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
53 * |------+------+------+------+------+-------------+------+------+------+------+------|
54 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
55 * |------+------+------+------+------+------|------+------+------+------+------+------|
56 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
57 * |------+------+------+------+------+------+------+------+------+------+------+------|
58 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
59 * `-----------------------------------------------------------------------------------'
60 */
61 [_COLEMAK] = LAYOUT(
62 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
67 ),
68
69 /* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
72 * |------+------+------+------+------+------+------+------+------+------+------+------|
73 * | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
74 * |------+------+------+------+------+-------------+------+------+------+------+------|
75 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
76 * |------+------+------+------+------+------|------+------+------+------+------+------|
77 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
80 * `-----------------------------------------------------------------------------------'
81 */
82 [_DVORAK] = LAYOUT(
83 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
84 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL,
85 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
86 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
87 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
88 ),
89
90 /* Lower
91 * ,-----------------------------------------------------------------------------------.
92 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
93 * |------+------+------+------+------+-------------+------+------+------+------+------|
94 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
95 * |------+------+------+------+------+-------------+------+------+------+------+------|
96 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
97 * |------+------+------+------+------+------|------+------+------+------+------+------|
98 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
99 * |------+------+------+------+------+------+------+------+------+------+------+------|
100 * | | | | | | | | Next | Vol- | Vol+ | Play |
101 * `-----------------------------------------------------------------------------------'
102 */
103 [_LOWER] = LAYOUT(
104 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
105 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
106 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
107 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
108 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
109 ),
110
111 /* Raise
112 * ,-----------------------------------------------------------------------------------.
113 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
114 * |------+------+------+------+------+-------------+------+------+------+------+------|
115 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
116 * |------+------+------+------+------+-------------+------+------+------+------+------|
117 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
118 * |------+------+------+------+------+------|------+------+------+------+------+------|
119 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
120 * |------+------+------+------+------+------+------+------+------+------+------+------|
121 * | | | | | | | | Next | Vol- | Vol+ | Play |
122 * `-----------------------------------------------------------------------------------'
123 */
124 [_RAISE] = LAYOUT(
125 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
126 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
127 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
128 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
129 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
130 ),
131
132 /* Adjust (Lower + Raise)
133 * ,-----------------------------------------------------------------------------------.
134 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
135 * |------+------+------+------+------+------+------+------+------+------+------+------|
136 * | | Reset| | | | | | | | | | Del |
137 * |------+------+------+------+------+-------------+------+------+------+------+------|
138 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
139 * |------+------+------+------+------+------|------+------+------+------+------+------|
140 * | | | | | | | | | | | | |
141 * |------+------+------+------+------+------+------+------+------+------+------+------|
142 * | | | | | | | | | | | |
143 * `-----------------------------------------------------------------------------------'
144 */
145 [_ADJUST] = LAYOUT(
146 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
147 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
148 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
149 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
150 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
151 )
152};
153
154#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4
155
156const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
157
158 /* Qwerty
159 * ,-----------------------------------------------------------------------------------.
160 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
161 * |------+------+------+------+------+-------------+------+------+------+------+------|
162 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
163 * |------+------+------+------+------+------|------+------+------+------+------+------|
164 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
165 * |------+------+------+------+------+------+------+------+------+------+------+------|
166 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
167 * `-----------------------------------------------------------------------------------'
168 */
169
170 [_QWERTY] = LAYOUT(
171 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
172 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
173 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
174 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
175 ),
176
177 /* Colemak
178 * ,-----------------------------------------------------------------------------------.
179 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
180 * |------+------+------+------+------+-------------+------+------+------+------+------|
181 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
182 * |------+------+------+------+------+------|------+------+------+------+------+------|
183 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
184 * |------+------+------+------+------+------+------+------+------+------+------+------|
185 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
186 * `-----------------------------------------------------------------------------------'
187 */
188 [_COLEMAK] = LAYOUT(
189 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
190 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
191 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
192 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
193 ),
194
195 /* Dvorak
196 * ,-----------------------------------------------------------------------------------.
197 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
198 * |------+------+------+------+------+-------------+------+------+------+------+------|
199 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
200 * |------+------+------+------+------+------|------+------+------+------+------+------|
201 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
202 * |------+------+------+------+------+------+------+------+------+------+------+------|
203 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
204 * `-----------------------------------------------------------------------------------'
205 */
206 [_DVORAK] = LAYOUT(
207 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
208 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
209 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
210 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
211 ),
212
213 /* Lower
214 * ,-----------------------------------------------------------------------------------.
215 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
216 * |------+------+------+------+------+-------------+------+------+------+------+------|
217 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
218 * |------+------+------+------+------+------|------+------+------+------+------+------|
219 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
220 * |------+------+------+------+------+------+------+------+------+------+------+------|
221 * | | | | | | | | Next | Vol- | Vol+ | Play |
222 * `-----------------------------------------------------------------------------------'
223 */
224 [_LOWER] = LAYOUT(
225 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
226 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
227 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
228 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
229 ),
230
231 /* Raise
232 * ,-----------------------------------------------------------------------------------.
233 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
234 * |------+------+------+------+------+-------------+------+------+------+------+------|
235 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
236 * |------+------+------+------+------+------|------+------+------+------+------+------|
237 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
238 * |------+------+------+------+------+------+------+------+------+------+------+------|
239 * | | | | | | | | Next | Vol- | Vol+ | Play |
240 * `-----------------------------------------------------------------------------------'
241 */
242 [_RAISE] = LAYOUT(
243 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
244 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
245 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
246 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
247 ),
248
249 /* Adjust (Lower + Raise)
250 * ,-----------------------------------------------------------------------------------.
251 * | | Reset| | | | | | | | | | Del |
252 * |------+------+------+------+------+-------------+------+------+------+------+------|
253 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
254 * |------+------+------+------+------+------|------+------+------+------+------+------|
255 * | | | | | | | | | | | | |
256 * |------+------+------+------+------+------+------+------+------+------+------+------|
257 * | | | | | | | | | | | |
258 * `-----------------------------------------------------------------------------------'
259 */
260 [_ADJUST] = LAYOUT(
261 _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
262 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
263 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
264 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
265 )
266};
267
268#else
269#error "undefined keymaps"
270#endif
271
272#ifdef AUDIO_ENABLE
273float tone_qwerty[][2] = SONG(QWERTY_SOUND);
274float tone_dvorak[][2] = SONG(DVORAK_SOUND);
275float tone_colemak[][2] = SONG(COLEMAK_SOUND);
276#endif
277
278void persistent_default_layer_set(uint16_t default_layer) {
279 eeconfig_update_default_layer(default_layer);
280 default_layer_set(default_layer);
281}
282
283bool process_record_user(uint16_t keycode, keyrecord_t *record) {
284 switch (keycode) {
285 case QWERTY:
286 if (record->event.pressed) {
287 #ifdef AUDIO_ENABLE
288 PLAY_SONG(tone_qwerty);
289 #endif
290 persistent_default_layer_set(1UL<<_QWERTY);
291 }
292 return false;
293 break;
294 case COLEMAK:
295 if (record->event.pressed) {
296 #ifdef AUDIO_ENABLE
297 PLAY_SONG(tone_colemak);
298 #endif
299 persistent_default_layer_set(1UL<<_COLEMAK);
300 }
301 return false;
302 break;
303 case DVORAK:
304 if (record->event.pressed) {
305 #ifdef AUDIO_ENABLE
306 PLAY_SONG(tone_dvorak);
307 #endif
308 persistent_default_layer_set(1UL<<_DVORAK);
309 }
310 return false;
311 break;
312 case LOWER:
313 if (record->event.pressed) {
314 layer_on(_LOWER);
315 update_tri_layer(_LOWER, _RAISE, _ADJUST);
316 } else {
317 layer_off(_LOWER);
318 update_tri_layer(_LOWER, _RAISE, _ADJUST);
319 }
320 return false;
321 break;
322 case RAISE:
323 if (record->event.pressed) {
324 layer_on(_RAISE);
325 update_tri_layer(_LOWER, _RAISE, _ADJUST);
326 } else {
327 layer_off(_RAISE);
328 update_tri_layer(_LOWER, _RAISE, _ADJUST);
329 }
330 return false;
331 break;
332 case ADJUST:
333 if (record->event.pressed) {
334 layer_on(_ADJUST);
335 } else {
336 layer_off(_ADJUST);
337 }
338 return false;
339 break;
340 }
341 return true;
342}
diff --git a/keyboards/helix/rev1/matrix.c b/keyboards/helix/rev1/matrix.c
deleted file mode 100644
index aa2cc7690..000000000
--- a/keyboards/helix/rev1/matrix.c
+++ /dev/null
@@ -1,308 +0,0 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.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/*
19 * scan matrix
20 */
21#include <stdint.h>
22#include <stdbool.h>
23#include <avr/io.h>
24#include <avr/wdt.h>
25#include <avr/interrupt.h>
26#include <util/delay.h>
27#include "print.h"
28#include "debug.h"
29#include "util.h"
30#include "matrix.h"
31#include "split_util.h"
32#include "config.h"
33#include "quantum.h"
34
35#ifdef USE_MATRIX_I2C
36# include "i2c.h"
37#else // USE_SERIAL
38# include "serial.h"
39#endif
40
41#ifndef DEBOUNCE
42# define DEBOUNCE 5
43#endif
44
45#define ERROR_DISCONNECT_COUNT 5
46
47static uint8_t debouncing = DEBOUNCE;
48static const int ROWS_PER_HAND = MATRIX_ROWS/2;
49static uint8_t error_count = 0;
50
51static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
52static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
53
54/* matrix state(1:on, 0:off) */
55static matrix_row_t matrix[MATRIX_ROWS];
56static matrix_row_t matrix_debouncing[MATRIX_ROWS];
57
58static matrix_row_t read_cols(void);
59static void init_cols(void);
60static void unselect_rows(void);
61static void select_row(uint8_t row);
62
63
64__attribute__ ((weak))
65void matrix_init_kb(void) {
66 matrix_init_user();
67}
68
69__attribute__ ((weak))
70void matrix_scan_kb(void) {
71 matrix_scan_user();
72}
73
74__attribute__ ((weak))
75void matrix_init_user(void) {
76}
77
78__attribute__ ((weak))
79void matrix_scan_user(void) {
80}
81
82inline
83uint8_t matrix_rows(void)
84{
85 return MATRIX_ROWS;
86}
87
88inline
89uint8_t matrix_cols(void)
90{
91 return MATRIX_COLS;
92}
93
94void matrix_init(void)
95{
96 debug_enable = true;
97 debug_matrix = true;
98 debug_mouse = true;
99 // initialize row and col
100 unselect_rows();
101 init_cols();
102
103 setPinOutput(B0);
104 setPinOutput(D5);
105
106 // initialize matrix state: all keys off
107 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
108 matrix[i] = 0;
109 matrix_debouncing[i] = 0;
110 }
111
112 matrix_init_quantum();
113}
114
115uint8_t _matrix_scan(void)
116{
117 // Right hand is stored after the left in the matirx so, we need to offset it
118 int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
119
120 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
121 select_row(i);
122 _delay_us(30); // without this wait read unstable value.
123 matrix_row_t cols = read_cols();
124 if (matrix_debouncing[i+offset] != cols) {
125 matrix_debouncing[i+offset] = cols;
126 debouncing = DEBOUNCE;
127 }
128 unselect_rows();
129 }
130
131 if (debouncing) {
132 if (--debouncing) {
133 _delay_ms(1);
134 } else {
135 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
136 matrix[i+offset] = matrix_debouncing[i+offset];
137 }
138 }
139 }
140
141 return 1;
142}
143
144#ifdef USE_MATRIX_I2C
145
146// Get rows from other half over i2c
147int i2c_transaction(void) {
148 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
149
150 int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
151 if (err) goto i2c_error;
152
153 // start of matrix stored at 0x00
154 err = i2c_master_write(0x00);
155 if (err) goto i2c_error;
156
157 // Start read
158 err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
159 if (err) goto i2c_error;
160
161 if (!err) {
162 int i;
163 for (i = 0; i < ROWS_PER_HAND-1; ++i) {
164 matrix[slaveOffset+i] = i2c_master_read(I2C_ACK);
165 }
166 matrix[slaveOffset+i] = i2c_master_read(I2C_NACK);
167 i2c_master_stop();
168 } else {
169i2c_error: // the cable is disconnceted, or something else went wrong
170 i2c_reset_state();
171 return err;
172 }
173
174 return 0;
175}
176
177#else // USE_SERIAL
178
179int serial_transaction(void) {
180 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
181
182 if (serial_update_buffers()) {
183 return 1;
184 }
185
186 for (int i = 0; i < ROWS_PER_HAND; ++i) {
187 matrix[slaveOffset+i] = serial_slave_buffer[i];
188 }
189 return 0;
190}
191#endif
192
193uint8_t matrix_scan(void)
194{
195 int ret = _matrix_scan();
196
197
198
199#ifdef USE_MATRIX_I2C
200 if( i2c_transaction() ) {
201#else // USE_SERIAL
202 if( serial_transaction() ) {
203#endif
204 // turn on the indicator led when halves are disconnected
205 writePinLow(D5);
206
207 error_count++;
208
209 if (error_count > ERROR_DISCONNECT_COUNT) {
210 // reset other half if disconnected
211 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
212 for (int i = 0; i < ROWS_PER_HAND; ++i) {
213 matrix[slaveOffset+i] = 0;
214 }
215 }
216 } else {
217 // turn off the indicator led on no error
218 writePinHigh(D5);
219 error_count = 0;
220 }
221 matrix_scan_quantum();
222 return ret;
223}
224
225void matrix_slave_scan(void) {
226 _matrix_scan();
227
228 int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
229
230#ifdef USE_MATRIX_I2C
231 for (int i = 0; i < ROWS_PER_HAND; ++i) {
232 /* i2c_slave_buffer[i] = matrix[offset+i]; */
233 i2c_slave_buffer[i] = matrix[offset+i];
234 }
235#else // USE_SERIAL
236 for (int i = 0; i < ROWS_PER_HAND; ++i) {
237 serial_slave_buffer[i] = matrix[offset+i];
238 }
239#endif
240}
241
242bool matrix_is_modified(void)
243{
244 if (debouncing) return false;
245 return true;
246}
247
248inline
249bool matrix_is_on(uint8_t row, uint8_t col)
250{
251 return (matrix[row] & ((matrix_row_t)1<<col));
252}
253
254inline
255matrix_row_t matrix_get_row(uint8_t row)
256{
257 return matrix[row];
258}
259
260void matrix_print(void)
261{
262 print("\nr/c 0123456789ABCDEF\n");
263 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
264 print_hex8(row); print(": ");
265 print_bin_reverse16(matrix_get_row(row));
266 print("\n");
267 }
268}
269
270uint8_t matrix_key_count(void)
271{
272 uint8_t count = 0;
273 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
274 count += bitpop16(matrix[i]);
275 }
276 return count;
277}
278
279static void init_cols(void)
280{
281 for(int x = 0; x < MATRIX_COLS; x++) {
282 _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
283 _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
284 }
285}
286
287static matrix_row_t read_cols(void)
288{
289 matrix_row_t result = 0;
290 for(int x = 0; x < MATRIX_COLS; x++) {
291 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
292 }
293 return result;
294}
295
296static void unselect_rows(void)
297{
298 for(int x = 0; x < ROWS_PER_HAND; x++) {
299 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
300 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
301 }
302}
303
304static void select_row(uint8_t row)
305{
306 _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
307 _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
308}
diff --git a/keyboards/helix/rev1/rev1.c b/keyboards/helix/rev1/rev1.c
deleted file mode 100644
index d053f0de1..000000000
--- a/keyboards/helix/rev1/rev1.c
+++ /dev/null
@@ -1,10 +0,0 @@
1#include "helix.h"
2
3
4#ifdef SSD1306OLED
5#include "ssd1306.h"
6
7bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
8 return process_record_gfx(keycode,record) && process_record_user(keycode, record);
9}
10#endif
diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h
deleted file mode 100644
index 7db27bcca..000000000
--- a/keyboards/helix/rev1/rev1.h
+++ /dev/null
@@ -1,129 +0,0 @@
1#pragma once
2
3#include "helix.h"
4
5#ifdef USE_I2C
6#include <stddef.h>
7#ifdef __AVR__
8 #include <avr/io.h>
9 #include <avr/interrupt.h>
10#endif
11#endif
12
13#if MATRIX_ROWS == 6 // HELIX_ROWS == 3
14 #ifndef FLIP_HALF
15 // Standard Keymap
16 // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
17 #define LAYOUT( \
18 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
19 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
20 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
21 ) { \
22 { L00, L01, L02, L03, L04, L05 }, \
23 { L10, L11, L12, L13, L14, L15 }, \
24 { L20, L21, L22, L23, L24, L25 }, \
25 { R05, R04, R03, R02, R01, R00 }, \
26 { R15, R14, R13, R12, R11, R10 }, \
27 { R25, R24, R23, R22, R21, R20 } \
28 }
29 #else
30 // Keymap with right side flipped
31 // (TRRS jack on both halves are to the right)
32 #define LAYOUT( \
33 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
34 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
35 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
36 ) { \
37 { L00, L01, L02, L03, L04, L05 }, \
38 { L10, L11, L12, L13, L14, L15 }, \
39 { L20, L21, L22, L23, L24, L25 }, \
40 { R00, R01, R02, R03, R04, R05 }, \
41 { R10, R11, R12, R13, R14, R15 }, \
42 { R20, R21, R22, R23, R24, R25 } \
43 }
44 #endif
45#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4
46 #ifndef FLIP_HALF
47 // Standard Keymap
48 // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
49 #define LAYOUT( \
50 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
51 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
52 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
53 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
54 ) { \
55 { L00, L01, L02, L03, L04, L05 }, \
56 { L10, L11, L12, L13, L14, L15 }, \
57 { L20, L21, L22, L23, L24, L25 }, \
58 { L30, L31, L32, L33, L34, L35 }, \
59 { R05, R04, R03, R02, R01, R00 }, \
60 { R15, R14, R13, R12, R11, R10 }, \
61 { R25, R24, R23, R22, R21, R20 }, \
62 { R35, R34, R33, R32, R31, R30 } \
63 }
64 #else
65 // Keymap with right side flipped
66 // (TRRS jack on both halves are to the right)
67 #define LAYOUT( \
68 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
69 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
70 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
71 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
72 ) { \
73 { L00, L01, L02, L03, L04, L05 }, \
74 { L10, L11, L12, L13, L14, L15 }, \
75 { L20, L21, L22, L23, L24, L25 }, \
76 { L30, L31, L32, L33, L34, L35 }, \
77 { R00, R01, R02, R03, R04, R05 }, \
78 { R10, R11, R12, R13, R14, R15 }, \
79 { R20, R21, R22, R23, R24, R25 }, \
80 { R30, R31, R32, R33, R34, R35 } \
81 }
82 #endif
83#elif MATRIX_ROWS == 10 // HELIX_ROWS == 5
84 #ifndef FLIP_HALF
85 // Standard Keymap
86 // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
87#define LAYOUT( \
88 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
89 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
90 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
91 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
92 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
93) { \
94 { L00, L01, L02, L03, L04, L05 }, \
95 { L10, L11, L12, L13, L14, L15 }, \
96 { L20, L21, L22, L23, L24, L25 }, \
97 { L30, L31, L32, L33, L34, L35 }, \
98 { L40, L41, L42, L43, L44, L45 }, \
99 { R05, R04, R03, R02, R01, R00 }, \
100 { R15, R14, R13, R12, R11, R10 }, \
101 { R25, R24, R23, R22, R21, R20 }, \
102 { R35, R34, R33, R32, R31, R30 }, \
103 { R45, R44, R43, R42, R41, R40 } \
104}
105 #else
106 // Keymap with right side flipped
107 // (TRRS jack on both halves are to the right)
108 #define LAYOUT( \
109 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
110 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
111 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
112 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
113 L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
114 ) { \
115 { L00, L01, L02, L03, L04, L05 }, \
116 { L10, L11, L12, L13, L14, L15 }, \
117 { L20, L21, L22, L23, L24, L25 }, \
118 { L30, L31, L32, L33, L34, L35 }, \
119 { L40, L41, L42, L43, L44, L45 }, \
120 { R00, R01, R02, R03, R04, R05 }, \
121 { R10, R11, R12, R13, R14, R15 }, \
122 { R20, R21, R22, R23, R24, R25 }, \
123 { R30, R31, R32, R33, R34, R35 }, \
124 { R40, R41, R42, R43, R44, R45 } \
125 }
126 #endif
127#else
128 #error "expected HELIX_ROWS 3 or 4 or 5"
129#endif
diff --git a/keyboards/helix/rev1/rules.mk b/keyboards/helix/rev1/rules.mk
deleted file mode 100644
index 1418f0178..000000000
--- a/keyboards/helix/rev1/rules.mk
+++ /dev/null
@@ -1,11 +0,0 @@
1SRC += local_drivers/i2c.c
2SRC += local_drivers/serial.c
3SRC += local_drivers/ssd1306.c
4KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
5
6CUSTOM_MATRIX = yes
7
8SRC += rev1/matrix.c
9SRC += rev1/split_util.c
10
11BACKLIGHT_ENABLE = no
diff --git a/keyboards/helix/rev1/serial_config.h b/keyboards/helix/rev1/serial_config.h
deleted file mode 100644
index 32218f9bb..000000000
--- a/keyboards/helix/rev1/serial_config.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/// #error rev1 serial config
2
3#ifndef SOFT_SERIAL_PIN
4/* Soft Serial defines */
5#define SOFT_SERIAL_PIN D0
6
7#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
8#define SERIAL_MASTER_BUFFER_LENGTH 0
9#endif
diff --git a/keyboards/helix/rev1/split_util.c b/keyboards/helix/rev1/split_util.c
deleted file mode 100644
index 5debd6e00..000000000
--- a/keyboards/helix/rev1/split_util.c
+++ /dev/null
@@ -1,86 +0,0 @@
1#include <avr/io.h>
2#include <avr/wdt.h>
3#include <avr/power.h>
4#include <avr/interrupt.h>
5#include <util/delay.h>
6#include <avr/eeprom.h>
7#include "split_util.h"
8#include "matrix.h"
9#include "keyboard.h"
10#include "config.h"
11
12#ifdef USE_MATRIX_I2C
13# include "i2c.h"
14#else
15# include "serial.h"
16#endif
17
18volatile bool isLeftHand = true;
19
20static void setup_handedness(void) {
21 #ifdef EE_HANDS
22 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
23 #else
24 // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
25 #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
26 isLeftHand = !has_usb();
27 #else
28 isLeftHand = has_usb();
29 #endif
30 #endif
31}
32
33static void keyboard_master_setup(void) {
34#ifdef USE_I2C
35#ifdef SSD1306OLED
36 matrix_master_OLED_init ();
37#endif
38#endif
39#ifdef USE_MATRIX_I2C
40 i2c_master_init();
41#else
42 serial_master_init();
43#endif
44}
45
46static void keyboard_slave_setup(void) {
47#ifdef USE_MATRIX_I2C
48 i2c_slave_init(SLAVE_I2C_ADDRESS);
49#else
50 serial_slave_init();
51#endif
52}
53
54bool has_usb(void) {
55 USBCON |= (1 << OTGPADE); //enables VBUS pad
56 _delay_us(5);
57 return (USBSTA & (1<<VBUS)); //checks state of VBUS
58}
59
60void split_keyboard_setup(void) {
61 setup_handedness();
62
63 if (has_usb()) {
64 keyboard_master_setup();
65 } else {
66 keyboard_slave_setup();
67 }
68 sei();
69}
70
71void keyboard_slave_loop(void) {
72 matrix_init();
73
74 while (1) {
75 matrix_slave_scan();
76 }
77}
78
79// this code runs before the usb and keyboard is initialized
80void matrix_setup(void) {
81 split_keyboard_setup();
82
83 if (!has_usb()) {
84 keyboard_slave_loop();
85 }
86}
diff --git a/keyboards/helix/rev1/split_util.h b/keyboards/helix/rev1/split_util.h
deleted file mode 100644
index 807412cd3..000000000
--- a/keyboards/helix/rev1/split_util.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#pragma once
2
3#include <stdbool.h>
4#include "eeconfig.h"
5
6#define SLAVE_I2C_ADDRESS 0x32
7
8extern volatile bool isLeftHand;
9
10// slave version of matix scan, defined in matrix.c
11void matrix_slave_scan(void);
12
13void split_keyboard_setup(void);
14bool has_usb(void);
15void keyboard_slave_loop(void);
16
17void matrix_master_OLED_init (void);