summaryrefslogtreecommitdiff
path: root/keyboards/helix
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/helix')
-rw-r--r--keyboards/helix/helix.h16
-rw-r--r--keyboards/helix/i2c.c2
-rw-r--r--keyboards/helix/i2c.h2
-rw-r--r--keyboards/helix/info.json13
-rw-r--r--keyboards/helix/rev1/info.json13
-rw-r--r--keyboards/helix/rev1/keymaps/OLED_sample/keymap.c28
-rw-r--r--keyboards/helix/rev1/keymaps/default/keymap.c28
-rw-r--r--keyboards/helix/rev1/rev1.h20
-rw-r--r--keyboards/helix/rev2/config.h89
-rw-r--r--keyboards/helix/rev2/info.json13
-rw-r--r--keyboards/helix/rev2/keymaps/default/config.h95
-rw-r--r--keyboards/helix/rev2/keymaps/default/keymap.c30
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows/config.h96
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows/keymap.c26
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows/rules.mk12
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/config.h121
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c551
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/readme.md150
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/readme_jp.md166
-rw-r--r--keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk123
-rw-r--r--keyboards/helix/rev2/keymaps/froggy/config.h98
-rw-r--r--keyboards/helix/rev2/keymaps/froggy/keymap.c16
-rw-r--r--keyboards/helix/rev2/keymaps/led_test/config.h73
-rw-r--r--keyboards/helix/rev2/keymaps/led_test/keymap.c30
-rw-r--r--keyboards/helix/rev2/keymaps/led_test/rules.mk113
-rw-r--r--keyboards/helix/rev2/rev2.h16
-rw-r--r--keyboards/helix/serial.c149
-rw-r--r--keyboards/helix/ssd1306.c1
28 files changed, 1554 insertions, 536 deletions
diff --git a/keyboards/helix/helix.h b/keyboards/helix/helix.h
index cddeb88303..46e61c7b88 100644
--- a/keyboards/helix/helix.h
+++ b/keyboards/helix/helix.h
@@ -9,47 +9,45 @@
#endif
#if HELIX_ROWS == 3
- #define KC_KEYMAP( \
+ #define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
) \
- KEYMAP( \
+ LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
)
#elif HELIX_ROWS == 4
// Used to create a keymap using only KC_ prefixed keys
- #define KC_KEYMAP( \
+ #define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \
- KEYMAP( \
+ LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
)
-#elif HELIX_ROWS == 5
- #define KC_KEYMAP( \
+#else
+ #define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
) \
- KEYMAP( \
+ LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
)
-#else
- #error "expected HELIX_ROWS 3 or 4 or 5"
#endif
#include "quantum.h"
diff --git a/keyboards/helix/i2c.c b/keyboards/helix/i2c.c
index 084c890c40..4bee5c6398 100644
--- a/keyboards/helix/i2c.c
+++ b/keyboards/helix/i2c.c
@@ -34,7 +34,7 @@ void i2c_delay(void) {
// _delay_us(100);
}
-// Setup twi to run at 100kHz
+// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK)
void i2c_master_init(void) {
// no prescaler
TWSR = 0;
diff --git a/keyboards/helix/i2c.h b/keyboards/helix/i2c.h
index c15b6bc506..47cf6bd1b2 100644
--- a/keyboards/helix/i2c.h
+++ b/keyboards/helix/i2c.h
@@ -15,7 +15,7 @@
#define SLAVE_BUFFER_SIZE 0x10
-// i2c SCL clock frequency
+// i2c SCL clock frequency 400kHz
#define SCL_CLOCK 400000L
extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
diff --git a/keyboards/helix/info.json b/keyboards/helix/info.json
new file mode 100644
index 0000000000..6cd13d98e4
--- /dev/null
+++ b/keyboards/helix/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "Helix",
+ "url": "https://github.com/MakotoKurauchi/helix",
+ "maintainer": "MakotoKurauchi",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 64,
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/helix/rev1/info.json b/keyboards/helix/rev1/info.json
new file mode 100644
index 0000000000..505401cee8
--- /dev/null
+++ b/keyboards/helix/rev1/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "Helix rev. 1",
+ "url": "https://github.com/MakotoKurauchi/helix",
+ "maintainer": "MakotoKurauchi",
+ "width": 13,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 60,
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
index 4f1ffb7c58..fa51501e62 100644
--- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
+++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
@@ -1,7 +1,5 @@
-#include "helix.h"
+#include QMK_KEYBOARD_H
#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
#include "LUFA/Drivers/Peripheral/TWI.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
@@ -72,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -93,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
@@ -114,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
@@ -135,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
@@ -156,7 +154,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -177,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
@@ -202,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -220,7 +218,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -238,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -256,7 +254,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -274,7 +272,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
@@ -292,7 +290,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
_______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c
index d7cf340534..7288cd752f 100644
--- a/keyboards/helix/rev1/keymaps/default/keymap.c
+++ b/keyboards/helix/rev1/keymaps/default/keymap.c
@@ -1,6 +1,4 @@
-#include "helix.h"
-#include "action_layer.h"
-#include "eeconfig.h"
+#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@@ -44,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -65,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
@@ -86,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
@@ -107,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
@@ -128,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -149,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
@@ -174,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -192,7 +190,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -210,7 +208,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -228,7 +226,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
@@ -246,7 +244,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
@@ -264,7 +262,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
_______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h
index fb56de0220..0245859a2d 100644
--- a/keyboards/helix/rev1/rev1.h
+++ b/keyboards/helix/rev1/rev1.h
@@ -22,7 +22,7 @@
#ifndef FLIP_HALF
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
@@ -38,7 +38,7 @@
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
@@ -56,11 +56,11 @@
#ifndef FLIP_HALF
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
@@ -75,11 +75,11 @@
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
+ L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
@@ -96,12 +96,12 @@
#ifndef FLIP_HALF
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
+ L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
@@ -118,12 +118,12 @@
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
+ L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h
index e8ad1b9bed..5307578832 100644
--- a/keyboards/helix/rev2/config.h
+++ b/keyboards/helix/rev2/config.h
@@ -30,7 +30,43 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DESCRIPTION A split keyboard for the cheap makers
+#define PREVENT_STUCK_MODIFIERS
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 100
+
+/* Use I2C or Serial */
+#define USE_I2C
+#define USE_SERIAL
+#define USE_SERIAL_PD2
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+// Helix keyboard OLED support
+// see ./rules.mk: OLED_ENABLE=yes or no
+#ifdef OLED_ENABLE
+ #define SSD1306OLED
+#endif
+
+/* Select rows configuration */
+// Rows are 4 or 5
+// #define HELIX_ROWS 5 see ./rules.mk
+
+/* key matrix size */
+// Rows are doubled-up
+#if HELIX_ROWS == 4
+ #define MATRIX_ROWS 8
+ #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
+#else
+ #define MATRIX_ROWS 10
+ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
+#endif
+
// wiring of each half
+#define MATRIX_COLS 7
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
// #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
@@ -60,6 +96,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
+// Helix keyboard RGB LED support
+//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
+// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
+#ifdef RGBLED_BACK
+ #if HELIX_ROWS == 4
+ #define RGBLED_NUM 25
+ #else
+ #define RGBLED_NUM 32
+ #endif
+#else
+ #define RGBLED_NUM 6
+#endif
+
+#ifndef IOS_DEVICE_ENABLE
+ #if RGBLED_NUM <= 6
+ #define RGBLIGHT_LIMIT_VAL 255
+ #else
+ #if HELIX_ROWS == 4
+ #define RGBLIGHT_LIMIT_VAL 130
+ #else
+ #define RGBLIGHT_LIMIT_VAL 120
+ #endif
+ #endif
+ #define RGBLIGHT_VAL_STEP 17
+#else
+ #if RGBLED_NUM <= 6
+ #define RGBLIGHT_LIMIT_VAL 90
+ #else
+ #if HELIX_ROWS == 4
+ #define RGBLIGHT_LIMIT_VAL 45
+ #else
+ #define RGBLIGHT_LIMIT_VAL 35
+ #endif
+ #endif
+ #define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
+// 120 RGBoff, OLEDoff
+// 120 OLED
+// 330 RGB 6
+// 300 RGB 32
+// 310 OLED & RGB 32
+ #define USB_MAX_POWER_CONSUMPTION 400
+#else
+ // fix iPhone and iPad power adapter issue
+ // iOS device need lessthan 100
+ #define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/helix/rev2/info.json b/keyboards/helix/rev2/info.json
new file mode 100644
index 0000000000..236aa3688d
--- /dev/null
+++ b/keyboards/helix/rev2/info.json
@@ -0,0 +1,13 @@
+{
+ "keyboard_name": "Helix rev. 2",
+ "url": "https://github.com/MakotoKurauchi/helix",
+ "maintainer": "MakotoKurauchi",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 64,
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h
index 17c4a30b34..0e7967c73b 100644
--- a/keyboards/helix/rev2/keymaps/default/config.h
+++ b/keyboards/helix/rev2/keymaps/default/config.h
@@ -23,99 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../../config.h"
-/* Use I2C or Serial */
-
-#define USE_I2C
-#define USE_SERIAL
-//#define USE_MATRIX_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// Helix keyboard OLED support
-// see ./rules.mk: OLED_ENABLE=yes or no
-#ifdef OLED_ENABLE
- #define SSD1306OLED
-#endif
-
-/* Select rows configuration */
-// Rows are 4 or 5
-// #define HELIX_ROWS 5 see ./rules.mk
-
-/* key matrix size */
-// Rows are doubled-up
-#if HELIX_ROWS == 4
- #define MATRIX_ROWS 8
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
-#elif HELIX_ROWS == 5
- #define MATRIX_ROWS 10
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
-#else
- #error "expected HELIX_ROWS 4 or 5"
-#endif
-
-#define USE_SERIAL_PD2
-
-#define PREVENT_STUCK_MODIFIERS
-#define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 100
-
-// Helix keyboard RGB LED support
-//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
-// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
-#ifdef RGBLED_BACK
- #if HELIX_ROWS == 4
- #define RGBLED_NUM 25
- #elif HELIX_ROWS == 5
- #define RGBLED_NUM 32
- #endif
-#else
- #define RGBLED_NUM 6
-#endif
-
-#ifndef IOS_DEVICE_ENABLE
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 255
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 120
- #else
- #define RGBLIGHT_LIMIT_VAL 130
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 17
-#else
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 90
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 35
- #else
- #define RGBLIGHT_LIMIT_VAL 45
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 4
-#endif
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-
-#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
-// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
-// 120 RGBoff, OLEDoff
-// 120 OLED
-// 330 RGB 6
-// 300 RGB 32
-// 310 OLED & RGB 32
- #define USB_MAX_POWER_CONSUMPTION 400
-#else
- // fix iPhone and iPad power adapter issue
- // iOS device need lessthan 100
- #define USB_MAX_POWER_CONSUMPTION 100
-#endif
+// place overrides here
#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c
index 1a268b32d5..16af027eac 100644
--- a/keyboards/helix/rev2/keymaps/default/keymap.c
+++ b/keyboards/helix/rev2/keymaps/default/keymap.c
@@ -1,12 +1,9 @@
-#include "helix.h"
+#include QMK_KEYBOARD_H
#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
-#include "LUFA/Drivers/Peripheral/TWI.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
@@ -76,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -97,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
@@ -118,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
@@ -139,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
@@ -160,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -181,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
* `-------------------------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
@@ -205,7 +202,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -223,7 +220,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -241,7 +238,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -259,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, \
@@ -277,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \
@@ -295,7 +292,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
* `-------------------------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
@@ -479,7 +476,6 @@ void matrix_init_user(void) {
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
- TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
diff --git a/keyboards/helix/rev2/keymaps/five_rows/config.h b/keyboards/helix/rev2/keymaps/five_rows/config.h
index 10d9fc1c4b..0e7967c73b 100644
--- a/keyboards/helix/rev2/keymaps/five_rows/config.h
+++ b/keyboards/helix/rev2/keymaps/five_rows/config.h
@@ -23,100 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../../config.h"
-/* Use I2C or Serial */
-
-#define USE_I2C
-#define USE_SERIAL
-//#define USE_MATRIX_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// Helix keyboard OLED support
-// see ./rules.mk: OLED_ENABLE=yes or no
-#ifdef OLED_ENABLE
- #define SSD1306OLED
-#endif
-
-/* Select rows configuration */
-#define HELIX_ROWS 5
-
-/* key matrix size */
-// Rows are doubled-up
-#if HELIX_ROWS == 4
- #define MATRIX_ROWS 8
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
-#elif HELIX_ROWS == 5
- #define MATRIX_ROWS 10
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
-#else
- #error "expected HELIX_ROWS 4 or 5"
-#endif
-
-#define USE_SERIAL_PD2
-
-#define PREVENT_STUCK_MODIFIERS
-#define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 100
-
-#undef RGBLED_NUM
-// Helix keyboard RGB LED support
-//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
-// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
-#ifdef RGBLED_BACK
- #if HELIX_ROWS == 4
- #define RGBLED_NUM 25
- #elif HELIX_ROWS == 5
- #define RGBLED_NUM 32
- #endif
-#else
- #define RGBLED_NUM 6
-#endif
-
-#ifndef IOS_DEVICE_ENABLE
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 255
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 120
- #else
- #define RGBLIGHT_LIMIT_VAL 130
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 17
-#else
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 90
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 35
- #else
- #define RGBLIGHT_LIMIT_VAL 45
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 4
-#endif
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-
-
-#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
-// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
-// 120 RGBoff, OLEDoff
-// 120 OLED
-// 330 RGB 6
-// 300 RGB 32
-// 310 OLED & RGB 32
- #define USB_MAX_POWER_CONSUMPTION 400
-#else
- // fix iPhone and iPad power adapter issue
- // iOS device need lessthan 100
- #define USB_MAX_POWER_CONSUMPTION 100
-#endif
+// place overrides here
#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c
index d4fabd5a24..548caf8220 100644
--- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c
+++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c
@@ -1,12 +1,9 @@
-#include "helix.h"
+#include QMK_KEYBOARD_H
#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
-#include "LUFA/Drivers/Peripheral/TWI.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
@@ -78,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, \
@@ -100,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_RCTL, \
@@ -122,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Lower | Lower| Caps | GUI | Alt | Space| BS | Enter| Space| Alt | GUI | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_RCTL, \
@@ -144,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | 0 | , | . | Enter| F5 | F10 | F12 | F12 | F5 | F10 | Enter| 0 | , | . |
* `-------------------------------------------------------------------------------------------------'
*/
- [_KEYPAD] = KEYMAP( \
+ [_KEYPAD] = LAYOUT( \
KC_TAB, KC_PSLS, KC_PAST, KC_DEL, KC_F1, KC_F6, KC_F1, KC_F6, KC_DEL, KC_TAB, KC_PSLS, KC_PAST, \
KC_KP_7, KC_KP_8, KC_KP_9, KC_BSPC, KC_F2, KC_F7, KC_F2, KC_F7, KC_BSPC, KC_KP_7, KC_KP_8, KC_KP_9, \
KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, KC_F3, KC_F8, KC_F3, KC_F8, KC_PMNS, KC_KP_4, KC_KP_5, KC_KP_6, \
@@ -166,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | 00 | | | | | | | | | | | 00 | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_KAUX] = KEYMAP( \
+ [_KAUX] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
@@ -187,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_PADFUNC] = KEYMAP( \
+ [_PADFUNC] = LAYOUT( \
XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, KC_SLCK, KC_PSCR, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_PGUP, KC_PGUP, KC_UP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, XXXXXXX, \
@@ -209,7 +206,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | PrtSc| | | | | | | | | PrtSc| | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
XXXXXXX, XXXXXXX, KC_PAUS, KC_SLCK, KC_INS, XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PAUS, XXXXXXX, KC_F12, \
_______, KC_HOME, XXXXXXX, KC_UP, KC_DEL, KC_PGUP, KC_PGUP, KC_DEL, KC_UP, XXXXXXX, KC_HOME, _______, \
@@ -231,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_MINS), KC_MINS, KC_EQL, LSFT(KC_EQL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
_______, XXXXXXX, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), KC_LBRC, KC_RBRC, LSFT(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, _______, \
@@ -253,7 +250,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
XXXXXXX, XXXXXXX, KEYPAD, DVORAK, COLEMAK, QWERTY, QWERTY, COLEMAK, DVORAK, KEYPAD, XXXXXXX, XXXXXXX, \
XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \
RGB_HUI, RGB_SAI, RGB_VAI,RGB_SMOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF,RGB_SMOD, RGB_VAI, RGB_SAI, RGB_HUI, \
@@ -274,7 +271,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | BS | Enter| | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_AUX] = KEYMAP( \
+ [_AUX] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
@@ -413,7 +410,6 @@ void matrix_init_user(void) {
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
- TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk
index 53a581ec25..53a00d8d4d 100644
--- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk
+++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk
@@ -27,8 +27,9 @@ define HELIX_CUSTOMISE_MSG
endef
# Helix keyboard customize
-# you can edit follows 6 Variables
-# jp: 以下の6つの変数を必要に応じて編集します。
+# you can edit follows 7 Variables
+# jp: 以下の7つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
OLED_ENABLE = no # OLED_ENABLE
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
@@ -73,6 +74,13 @@ endif
# $(eval $(call HELIX_CUSTOMISE_MSG))
# $(info )
+ifneq ($(strip $(HELIX_ROWS)), 4)
+ifneq ($(strip $(HELIX_ROWS)), 5)
+$(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
+endif
+endif
+OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
+
ifeq ($(strip $(LED_BACK_ENABLE)), yes)
RGBLIGHT_ENABLE = yes
OPT_DEFS += -DRGBLED_BACK
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/config.h b/keyboards/helix/rev2/keymaps/five_rows_jis/config.h
new file mode 100644
index 0000000000..17c4a30b34
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/config.h
@@ -0,0 +1,121 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* Use I2C or Serial */
+
+#define USE_I2C
+#define USE_SERIAL
+//#define USE_MATRIX_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
+// Helix keyboard OLED support
+// see ./rules.mk: OLED_ENABLE=yes or no
+#ifdef OLED_ENABLE
+ #define SSD1306OLED
+#endif
+
+/* Select rows configuration */
+// Rows are 4 or 5
+// #define HELIX_ROWS 5 see ./rules.mk
+
+/* key matrix size */
+// Rows are doubled-up
+#if HELIX_ROWS == 4
+ #define MATRIX_ROWS 8
+ #define MATRIX_COLS 7
+ #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
+#elif HELIX_ROWS == 5
+ #define MATRIX_ROWS 10
+ #define MATRIX_COLS 7
+ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
+#else
+ #error "expected HELIX_ROWS 4 or 5"
+#endif
+
+#define USE_SERIAL_PD2
+
+#define PREVENT_STUCK_MODIFIERS
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 100
+
+// Helix keyboard RGB LED support
+//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
+// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
+#ifdef RGBLED_BACK
+ #if HELIX_ROWS == 4
+ #define RGBLED_NUM 25
+ #elif HELIX_ROWS == 5
+ #define RGBLED_NUM 32
+ #endif
+#else
+ #define RGBLED_NUM 6
+#endif
+
+#ifndef IOS_DEVICE_ENABLE
+ #if RGBLED_NUM <= 6
+ #define RGBLIGHT_LIMIT_VAL 255
+ #else
+ #if HELIX_ROWS == 5
+ #define RGBLIGHT_LIMIT_VAL 120
+ #else
+ #define RGBLIGHT_LIMIT_VAL 130
+ #endif
+ #endif
+ #define RGBLIGHT_VAL_STEP 17
+#else
+ #if RGBLED_NUM <= 6
+ #define RGBLIGHT_LIMIT_VAL 90
+ #else
+ #if HELIX_ROWS == 5
+ #define RGBLIGHT_LIMIT_VAL 35
+ #else
+ #define RGBLIGHT_LIMIT_VAL 45
+ #endif
+ #endif
+ #define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
+// 120 RGBoff, OLEDoff
+// 120 OLED
+// 330 RGB 6
+// 300 RGB 32
+// 310 OLED & RGB 32
+ #define USB_MAX_POWER_CONSUMPTION 400
+#else
+ // fix iPhone and iPad power adapter issue
+ // iOS device need lessthan 100
+ #define USB_MAX_POWER_CONSUMPTION 100
+#endif
+
+#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c
new file mode 100644
index 0000000000..480ae2f038
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c
@@ -0,0 +1,551 @@
+#include "helix.h"
+#include "bootloader.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#ifdef PROTOCOL_LUFA
+#include "lufa.h"
+#include "split_util.h"
+#endif
+#include "LUFA/Drivers/Peripheral/TWI.h"
+#ifdef AUDIO_ENABLE
+ #include "audio.h"
+#endif
+#ifdef SSD1306OLED
+ #include "ssd1306.h"
+#endif
+
+// * If you want to recognize that you pressed the Adjust key with the Lower / Raise key you can enable this comment out. However, the binary size may be over. *
+// #define ADJUST_MACRO_ENABLE
+
+// * If you want to use the Kana key you can enable this comment out. However, the binary size may be over. *
+// #define KANA_ENABLE
+
+extern keymap_config_t keymap_config;
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE = 0,
+ _BAS_E,
+ _LOWER,
+ _LOW_E,
+ _RAISE,
+ _RAI_E,
+ _ADJUST,
+};
+
+enum custom_keycodes {
+ BASE = SAFE_RANGE,
+ BAS_E,
+ LOWER,
+ LOW_E,
+ RAISE,
+ RAI_E,
+ ADJUST,
+ EISU,
+ #ifdef KANA_ENABLE
+ KANA,
+ #endif
+ RGBRST
+};
+
+// JIS key aliases
+#define JP_CFTD KC_EQL // ^ and ~ Circumflex (Hat) and Tilde
+#define JP_ATBQ KC_LBRC // @ and ` Atmark and Back-quote
+#define JP_CLAS KC_QUOT // : and * Colon and Asterisk
+#define JP_BSVL KC_JYEN // \ and | Back slash and and Vertical-line)
+#define JP_LBRC KC_RBRC // [ and { Left-bracket
+#define JP_RBRC KC_BSLS // ] and } Right-bracket
+#define JP_BSUS KC_RO // \ and _ Back slash and Under-score
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+#define XXXXXXX KC_NO
+
+#if HELIX_ROWS == 5
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Qwerty JIS Normal
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_BASE] = LAYOUT( \
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
+ EISU, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_ATBQ, \
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_CLAS, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, \
+ KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_BSPC, KC_SPC, KC_SPC, RAISE, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ /* Qwerty JIS Exchange L and R
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | 6& | 7' | 8( | 9) | 0 | -= | | Esc | 1! | 2" | 3# | 4$ | 5% |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | Y | U | I | O | P | @` | | Tab | Q | W | E | R | T |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | H | J | K | L | ;+ | :* | | | A | S | D | F | G |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | N | M | ,< | .> | /? | Up |Enter |KANJI | Shift| Z | X | C | V | B |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Space |Raise | }] | APP | Left | Down |Right |Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_BAS_E] = LAYOUT( \
+ KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \
+ KC_Y, KC_U, KC_I, KC_O, KC_P, JP_ATBQ, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \
+ KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_CLAS, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, \
+ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, EISU, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \
+ KC_SPC, RAI_E, JP_RBRC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, ADJUST, KC_LCTL, KC_LALT, KC_LGUI, JP_LBRC, LOW_E, KC_BSPC \
+ ),
+
+ /* Lower JIS Normal
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | | | | | | | | | -= | ^~ | \| |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | @` | [{ |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | ;+ | :* | ]} |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | ,< | .> | /? | \_ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | Del | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_LOWER] = LAYOUT( \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, JP_CFTD, JP_BSVL, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_ATBQ, JP_LBRC, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, JP_CLAS, JP_RBRC, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, JP_BSUS, \
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_DEL, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
+ ),
+
+ /* Lower JIS Exchange L and R
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | | | -= | ^~ | \| | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | @` | [{ | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | ;+ | :* | ]} | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | ,< | .> | /? | \_ |PageUp| | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | Home |PageDn| End | | | | | | | Del |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_LOW_E] = LAYOUT( \
+ _______, XXXXXXX, XXXXXXX, KC_MINS, JP_CFTD, JP_BSVL, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, JP_ATBQ, JP_LBRC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ _______, XXXXXXX, XXXXXXX, KC_SCLN, JP_CLAS, JP_RBRC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ _______, KC_COMM, KC_DOT, KC_SLSH, JP_BSUS, KC_PGUP, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ _______, _______, XXXXXXX, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, XXXXXXX, _______, KC_DEL \
+ ),
+
+ /* Raise JIS Normal
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | Home |PageUp|
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | End |PageDn|
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |MsBtn1|MsBtn2| | | | | | | | | | MsUp | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | |MsLeft|MsDown|MsRght|
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_RAISE] = LAYOUT( \
+ KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGUP, \
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_PGDN, \
+ _______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, \
+ _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R \
+ ),
+
+ /* Raise JIS Exchange L and R
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | F7 | F8 | F9 | F10 | F11 | F12 | | F1 | F2 | F3 | F4 | F5 | F6 |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | | | | | | | | | | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | MsUp | | | |MsBtn1|MsBtn2| | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | |MsLeft|MsDown|MsRght| | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_RAI_E] = LAYOUT( \
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \
+ _______, _______, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX \
+ ),
+
+ /* Adjust (Lower + Raise) Common map for Normal and Exchange
+ * ,-----------------------------------------. ,-----------------------------------------.
+ * | | Reset|RGBRST|Aud on|Audoff| | | | Reset|RGBRST|Aud on|Audoff| |
+ * |------+------+------+------+------+------| |------+------+------+------+------+------|
+ * | |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
+ * |------+------+------+------+------+------| |------+------+------+------+------|------+
+ * | |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------|------+
+ * | | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | | | |
+ * `-------------------------------------------------------------------------------------------------'
+ */
+ [_ADJUST] = LAYOUT( \
+ XXXXXXX, RESET, RGBRST, AU_ON, AU_OFF, XXXXXXX, XXXXXXX, RESET, RGBRST, AU_ON, AU_OFF, XXXXXXX, \
+ XXXXXXX, BASE, BAS_E, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, BASE, BAS_E, AG_NORM, AG_SWAP, XXXXXXX, \
+ XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, \
+ XXXXXXX, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+};
+
+#elif HELIX_ROWS == 4
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ // Do it yourself :)
+};
+
+#else
+#error "undefined keymaps"
+#endif
+
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
+#endif
+
+// define variables for reactive RGB
+bool TOG_STATUS = false;
+int RGB_current_mode;
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+#ifdef ADJUST_MACRO_ENABLE
+// Setting ADJUST layer RGB back to default
+void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
+ if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode);
+ #endif
+ layer_on(layer3);
+ } else {
+ layer_off(layer3);
+ }
+}
+#endif
+
+void toggle_lower_raise_layer(bool pressed, uint16_t dist_layer, uint16_t lower_layer, uint16_t raise_layer) {
+ if (pressed) {
+ //not sure how to have keyboard check mode and set it to a variable, so my work around
+ //uses another variable that would be set to true after the first time a reactive key is pressed.
+ if (!TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
+ TOG_STATUS = !TOG_STATUS;
+ #ifdef RGBLIGHT_ENABLE
+ if (dist_layer == _LOWER || dist_layer == _LOW_E) {
+ rgblight_mode(16);
+ } else {
+ rgblight_mode(15);
+ }
+ #endif
+ }
+
+ layer_on(dist_layer);
+ #ifdef ADJUST_MACRO_ENABLE
+ update_tri_layer_RGB(lower_layer, raise_layer, _ADJUST);
+ #endif
+ } else {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
+ #endif
+ TOG_STATUS = false;
+ layer_off(dist_layer);
+ #ifdef ADJUST_MACRO_ENABLE
+ update_tri_layer_RGB(lower_layer, raise_layer, _ADJUST);
+ #endif
+ }
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BASE:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_qwerty);
+ #endif
+ persistent_default_layer_set(1UL<<_BASE);
+ }
+ return false;
+ break;
+ case BAS_E:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_qwerty);
+ #endif
+ persistent_default_layer_set(1UL<<_BAS_E);
+ }
+ return false;
+ break;
+ case LOWER:
+ toggle_lower_raise_layer(record->event.pressed, _LOWER, _LOWER, _RAISE);
+ return false;
+ break;
+ case LOW_E:
+ toggle_lower_raise_layer(record->event.pressed, _LOW_E, _LOW_E, _RAI_E);
+ return false;
+ break;
+ case RAISE:
+ toggle_lower_raise_layer(record->event.pressed, _RAISE, _LOWER, _RAISE);
+ return false;
+ break;
+ case RAI_E:
+ toggle_lower_raise_layer(record->event.pressed, _RAI_E, _LOW_E, _RAI_E);
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(14);
+ #endif
+ layer_on(_ADJUST);
+ } else {
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_mode(RGB_current_mode);
+ #endif
+ layer_off(_ADJUST);
+ }
+ return false;
+ break;
+ //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
+ case RGB_MOD:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ rgblight_mode(RGB_current_mode);
+ rgblight_step();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ return false;
+ break;
+ case EISU:
+ if (record->event.pressed) {
+ if (keymap_config.swap_lalt_lgui==false) {
+ register_code(KC_LANG2);
+ } else {
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG2);
+ }
+ return false;
+ break;
+ #ifdef KANA_ENABLE
+ case KANA:
+ if (record->event.pressed) {
+ if(keymap_config.swap_lalt_lgui==false){
+ register_code(KC_LANG1);
+ }else{
+ SEND_STRING(SS_LALT("`"));
+ }
+ } else {
+ unregister_code(KC_LANG1);
+ }
+ return false;
+ break;
+ #endif
+ case RGBRST:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ RGB_current_mode = rgblight_config.mode;
+ }
+ #endif
+ break;
+ }
+
+ return true;
+ // return process_layer_control(keycode, record, false) ? process_layer_control(keycode, record, true) : true;
+}
+
+void matrix_init_user(void) {
+ #ifdef AUDIO_ENABLE
+ startup_user();
+ #endif
+ #ifdef RGBLIGHT_ENABLE
+ RGB_current_mode = rgblight_config.mode;
+ #endif
+ //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
+ #ifdef SSD1306OLED
+ TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
+ iota_gfx_init(!has_usb()); // turns on the display
+ #endif
+}
+
+
+#ifdef AUDIO_ENABLE
+
+void startup_user()
+{
+ _delay_ms(20); // gets rid of tick
+}
+
+void shutdown_user()
+{
+ _delay_ms(150);
+ stop_all_notes();
+}
+
+void music_on_user(void)
+{
+ music_scale_user();
+}
+
+void music_scale_user(void)
+{
+ PLAY_SONG(music_scale);
+}
+
+#endif
+
+
+//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
+#ifdef SSD1306OLED
+
+void matrix_scan_user(void) {
+ iota_gfx_task(); // this is what updates the display continuously
+}
+
+void matrix_update(struct CharacterMatrix *dest,
+ const struct CharacterMatrix *source) {
+ if (memcmp(dest->display, source->display, sizeof(dest->display))) {
+ memcpy(dest->display, source->display, sizeof(dest->display));
+ dest->dirty = true;
+ }
+}
+
+//assign the right code to your layers for OLED display
+#define L_BASE _BASE
+#define L_LOWER (1<<_LOWER)
+#define L_RAISE (1<<_RAISE)
+#define L_ADJUST (1<<_ADJUST)
+#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
+#define L_LOW_E (1<<_LOW_E)
+#define L_RAI_E (1<<_RAI_E)
+#define L_ADJUST_TRIE (L_ADJUST|L_RAI_E|L_LOW_E)
+
+static void render_logo(struct CharacterMatrix *matrix) {
+
+ static char logo[]={
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
+ 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+ 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
+ 0};
+ matrix_write(matrix, logo);
+ //matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
+}
+
+
+
+void render_status(struct CharacterMatrix *matrix) {
+
+ // Render to mode icon
+ static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
+ if(keymap_config.swap_lalt_lgui==false){
+ matrix_write(matrix, logo[0][0]);
+ matrix_write_P(matrix, PSTR("\n"));
+ matrix_write(matrix, logo[0][1]);
+ } else {
+ matrix_write(matrix, logo[1][0]);
+ matrix_write_P(matrix, PSTR("\n"));
+ matrix_write(matrix, logo[1][1]);
+ }
+
+ // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
+ char buf[16];
+ matrix_write_P(matrix, PSTR("\nLayer: "));
+ switch (layer_state) {
+ case L_BASE:
+ if (default_layer_state == (1UL<<_BAS_E)) {
+ matrix_write_P(matrix, PSTR("Base_Ex"));
+ } else {
+ matrix_write_P(matrix, PSTR("Base"));
+ }
+ break;
+ case L_RAISE:
+ matrix_write_P(matrix, PSTR("Raise"));
+ break;
+ case L_RAI_E:
+ matrix_write_P(matrix, PSTR("Raise_Ex"));
+ break;
+ case L_LOWER:
+ matrix_write_P(matrix, PSTR("Lower"));
+ break;
+ case L_LOW_E:
+ matrix_write_P(matrix, PSTR("Lower_Ex"));
+ break;
+ case L_ADJUST:
+ case L_ADJUST_TRI:
+ case L_ADJUST_TRIE:
+ matrix_write_P(matrix, PSTR("Adjust"));
+ break;
+ default:
+ snprintf(buf, sizeof(buf), "Undef-%d", (short)layer_state);
+ matrix_write(matrix, buf);
+ }
+
+ // Host Keyboard LED Status
+ char led[32];
+ snprintf(led, sizeof(led), "\n%s %s %s",
+ (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
+ (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
+ (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
+ matrix_write(matrix, led);
+}
+
+
+void iota_gfx_task_user(void) {
+ struct CharacterMatrix matrix;
+
+#if DEBUG_TO_SCREEN
+ if (debug_enable) {
+ return;
+ }
+#endif
+
+ matrix_clear(&matrix);
+ if (is_master) {
+ render_status(&matrix);
+ } else {
+ render_logo(&matrix);
+ }
+
+ matrix_update(&display, &matrix);
+}
+
+#endif
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/readme.md b/keyboards/helix/rev2/keymaps/five_rows_jis/readme.md
new file mode 100644
index 0000000000..54e226b03d
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/readme.md
@@ -0,0 +1,150 @@
+# Helix 5 rows JIS layout
+
+This keymap was created with the concept that users using Japanese JIS keyboard layout can operate without difficulty. It has the following features.
+
+* We are considering to be able to input long Japanese notes without moving the layer
+* We are arranging the relation of symbols that can not fit in the Lower layer keeping the positional relationship
+* The four-way key is in a convex arrangement
+* Ctrl, Shift, Tab, Kanji, Esc, GUI (Win), App keys are arranged keeping positional relationship
+* Lower / Raise keymap is considering easy placement so that it can be used without memorizing
+
+This keymap also includes a "NORMAL" keymap that uses Helix's split keyboard as usual, and an "EXCHANGE" key that exchanges left and right sides of Helix's split keyboard for key position optimization I am trying to switch maps. These have the following additional features.
+
+## NORMAL Keymap
+
+* It is possible to press the N key with the left index finger and the B key with the right index finger
+
+## EXCHANGE Keymap
+
+* By using the 2 key under Pro micro effectively add `` `[{` `` `` `]]` ``, `` `/?` `` Keys to NORMAL's base keymap And make inputs other than the `` `\ _` `` key possible with the base map
+* To avoid mistakes in pressing the Kanji key and the Enter key, we are moving to the 2 key.
+
+## 配列
+
+### NORMAL Keymap
+
+ Adjust + ModExc key switches to the NORMAL keymap.
+
+Base Layer
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+Lower Layer
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | | | | | | | | | | | -= | ^~ | \| |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | @` | [{ |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | ;+ | :* | ]} |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | ,< | .> | /? | \_ |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | Del | | | | | | | |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+Raise Layer
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | Home |PageUp|
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | End |PageDn|
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | |MsBtn1|MsBtn2| | | | | | | | | | MsUp | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | |MsLeft|MsDown|MsRght|
+ `-------------------------------------------------------------------------------------------------'
+```
+
+### EXCHANGE Keymap
+
+Adjust + ModExc key switches to the EXCHANGE keymap.
+
+Base Layer
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | Esc | 1! | 2" | 3# | 4$ | 5% || 6& | 7' | 8( | 9) | 0 | -= |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | Tab | Q | W | E | R | T || Y | U | I | O | P | @` |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | A | S | D | F | G || H | J | K | L | ;+ | :* |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ |KANJI | Shift| Z | X | C | V | B || N | M | ,< | .> | /? | Up |Enter |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ |Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp ||Space |Raise | }] | APP | Left | Down |Right |
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+Lower Layer
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | | | | | | || | | | -= | ^~ | \| |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | @` | [{ |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | ;+ | :* | ]} |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ | | | | | | | || | ,< | .> | /? | \_ |PageUp| |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ | | | | | | | Del || | | | | Home |PageDn| End |
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+Raise Layer
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | | |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | | |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ | | |MsBtn1|MsBtn2| | | || | | | | | MsUp | |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ | | | | | | | || | | | |MsLeft|MsDown|MsRght|
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+### NORMAL/EXCHANGE common Layer
+
+Adjust Layer
+
+ NORMAL / EXCHANGE This layer is used in common. The same items are arranged in the same row on both sides so that they can be used in common.
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | | Reset|RGBRST|Aud on|Audoff| | | | Reset|RGBRST|Aud on|Audoff| |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
+ |------+------+------+------+------+------| |------+------+------+------+------|------+
+ | |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------|------+
+ | | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | | | | |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+## How to compile these program
+
+ See the readme of the Default keymap.
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/readme_jp.md b/keyboards/helix/rev2/keymaps/five_rows_jis/readme_jp.md
new file mode 100644
index 0000000000..783dc9bdf8
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/readme_jp.md
@@ -0,0 +1,166 @@
+# Helix 5 rows JIS layout
+
+このキーマップは日本語JISキーボード配列を利用しているユーザーが無理なく操作出来るというコンセプトで作成しました。以下の特徴があります。
+
+* 日本語の長音記号をレイヤーを移動せずに入力可能なように考慮しています
+* 入りきらない記号関連をLowerレイヤーに位置関係を維持して配置しています
+* 十字キーを凸配置にしています
+* Ctrl,Shift,Tab,漢字,Esc,GUI(Win),Appの各キーは位置関係を維持して配置しています
+* Lower/Raiseキーマップは暗記しないでも使えるようにわかりやすい配置を考慮しています
+
+ またこのキーマップにはHelixの分割されたキーボードを通常通りに使用する「NORMAL」キーマップと、キー位置の最適化のためにHelixの分割されたキーボードの左右を交換して使う「EXCHANGE」キーマップを切り替えられるようにしています。これらにはさらに以下の特徴があります。
+
+## NORMALキーマップ
+
+* Nキーを左人差し指で、Bキーを右人差し指で押下することが可能
+
+## EXCHANGEキーマップ
+
+* Pro micro下の2キーを有効に使うことにより、NORMALのベースキーマップに```[{```,```}]```,```/?```の各キーを追加し、```\_```キー以外の入力をベースマップで可能にしています
+* 漢字キー,Enterキーの押し間違いを避けるためPro micro下の2キーに移動しています
+
+## 配列
+
+### NORMALキーマップ
+
+ Adjust + ModNrmキーでNORMALキーマップに切り替わります。
+
+Baseレイヤー
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | Esc | 1! | 2" | 3# | 4$ | 5% | | 6& | 7' | 8( | 9) | 0 | -= |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | KANJI| Q | W | E | R | T | | Y | U | I | O | P | @` |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | Tab | A | S | D | F | G | | H | J | K | L | ;+ | :* |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Shift| Z | X | C | V | B | N | B | N | M | ,< | .> | Up |Enter |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | Ctrl | GUI | Alt |Adjust|Lower |Space |Bksp |Space |Space |Raise | APP | Left | Down |Right |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+Lowerレイヤー
+
+ 記号キーと、BackSpace位置にDeleteキーを配置しています。
+ 例えば```|```キーを入力する場合、Lower + Shift + \キーで入力することが出来ます。
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | | | | | | | | | | | -= | ^~ | \| |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | @` | [{ |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | ;+ | :* | ]} |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | ,< | .> | /? | \_ |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | Del | | | | | | | |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+Raiseレイヤー
+
+ rules.mkのMOUSEKEY_ENABLEをyesにした場合マウスキーを利用できます。ただしバイナリ容量を食いますのでmakeした時に確認できるバイナリサイズがオーバーしていないことに十分注意してください。
+ また、F1-F12キーをHHKBライクに使えるように横並びにしました。
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | Home |PageUp|
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | | | | | | | | | | | | End |PageDn|
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | |MsBtn1|MsBtn2| | | | | | | | | | MsUp | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | |MsLeft|MsDown|MsRght|
+ `-------------------------------------------------------------------------------------------------'
+```
+
+### EXCHANGEキーマップ
+
+ Adjust + ModExcキーでEXCHANGEキーマップに切り替わります。
+ HelixのUSBやフォンケーブルの接続は変更せず、分割された左右のキーボードを入れ替えて使います。
+
+Baseレイヤー
+
+ ちょっと無理やりですが```[{```,```}]```キーを突っ込んでいます。
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | Esc | 1! | 2" | 3# | 4$ | 5% || 6& | 7' | 8( | 9) | 0 | -= |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | Tab | Q | W | E | R | T || Y | U | I | O | P | @` |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | A | S | D | F | G || H | J | K | L | ;+ | :* |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ |KANJI | Shift| Z | X | C | V | B || N | M | ,< | .> | /? | Up |Enter |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ |Adjust| Ctrl | GUI | Alt | [{ |Lower | Bksp ||Space |Raise | }] | APP | Left | Down |Right |
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+Lowerレイヤー
+
+ 記号キーと、BackSpace位置にDeleteキーを配置しています。
+ PageDown/Up, Home/EndをCtrl+十字キーの延長線上で使用できるように配置しています。
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | | | | | | || | | | -= | ^~ | \| |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | @` | [{ |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | ;+ | :* | ]} |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ | | | | | | | || | ,< | .> | /? | \_ |PageUp| |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ | | | | | | | Del || | | | | Home |PageDn| End |
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+Raiseレイヤー
+
+ rules.mkのMOUSEKEY_ENABLEをyesにした場合マウスキーを利用できます。ただしバイナリ容量を食いますのでmakeした時に確認できるバイナリサイズがオーバーしていないことに十分注意してください。
+ また、F1-F12キーをHHKBライクに使えるように横並びにしました。
+ マウスキーは十字キーの延長線上で使用できるように配置しています。
+
+```
+ ,-----------------------------------------.,-----------------------------------------.
+ | F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | | |
+ |------+------+------+------+------+------||------+------+------+------+------+------|
+ | | | | | | || | | | | | |
+ ,------+------+------+------+------+------+------||------+------+------+------+------+------+------.
+ | | |MsBtn1|MsBtn2| | | || | | | | | MsUp | |
+ |------+------+------+------+------+------+------||------+------+------+------+------+------+------|
+ | | | | | | | || | | | |MsLeft|MsDown|MsRght|
+ `------------------------------------------------'`------------------------------------------------'
+```
+
+### NORMAL/EXCHANGE共通レイヤー
+
+Adjustレイヤー
+
+ NORMAL/EXCHANGE共通で利用するレイヤーです。共通で使えるように両側同じ並びで同じものを配置しています。
+
+```
+ ,-----------------------------------------. ,-----------------------------------------.
+ | | Reset|RGBRST|Aud on|Audoff| | | | Reset|RGBRST|Aud on|Audoff| |
+ |------+------+------+------+------+------| |------+------+------+------+------+------|
+ | |ModNrm|ModExc| Mac | Win | | | |ModNrm|ModExc| Mac | Win | |
+ |------+------+------+------+------+------| |------+------+------+------+------|------+
+ | |RGB ON| HUE+ | SAT+ | VAL+ | | | |RGB ON| HUE+ | SAT+ | VAL+ | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------|------+
+ | | MODE | HUE- | SAT- | VAL- | | | | | MODE | HUE- | SAT- | VAL- | |
+ |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ | | | | | | | | | | | | | | |
+ `-------------------------------------------------------------------------------------------------'
+```
+
+## コンパイルの仕方
+
+ Defaultキーマップのreadmeを参照してください。
diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk
new file mode 100644
index 0000000000..4174a30457
--- /dev/null
+++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk
@@ -0,0 +1,123 @@
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = no # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+define HELIX_CUSTOMISE_MSG
+ $(info Helix customize)
+ $(info - OLED_ENABLE=$(OLED_ENABLE))
+ $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
+ $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
+ $(info - LED_ANIMATION=$(LED_ANIMATIONS))
+ $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
+endef
+
+# Helix keyboard customize
+# you can edit follows 7 Variables
+# jp: 以下の7つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+OLED_ENABLE = no # OLED_ENABLE
+LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
+LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
+LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+
+#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
+#### Do not enable these with audio at the same time.
+
+### Helix keyboard 'default' keymap: convenient command line option
+## make HELIX=<options> helix:defualt
+## option= oled | back | under | na | ios
+## ex.
+## make HELIX=oled helix:defualt
+## make HELIX=oled,back helix:defualt
+## make HELIX=oled,under helix:defualt
+## make HELIX=oled,back,na helix:defualt
+## make HELIX=oled,back,ios helix:defualt
+##
+ifneq ($(strip $(HELIX)),)
+ ifeq ($(findstring oled,$(HELIX)), oled)
+ OLED_ENABLE = yes
+ endif
+ ifeq ($(findstring back,$(HELIX)), back)
+ LED_BACK_ENABLE = yes
+ else ifeq ($(findstring under,$(HELIX)), under)
+ LED_UNDERGLOW_ENABLE = yes
+ endif
+ ifeq ($(findstring na,$(HELIX)), na)
+ LED_ANIMATIONS = no
+ endif
+ ifeq ($(findstring ios,$(HELIX)), ios)
+ IOS_DEVICE_ENABLE = yes
+ endif
+ $(eval $(call HELIX_CUSTOMISE_MSG))
+ $(info )
+endif
+
+# Uncomment these for checking
+# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。
+# $(eval $(call HELIX_CUSTOMISE_MSG))
+# $(info )
+
+ifneq ($(strip $(HELIX_ROWS)), 4)
+ ifneq ($(strip $(HELIX_ROWS)), 5)
+ $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
+ endif
+endif
+OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
+
+ifeq ($(strip $(LED_BACK_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+ OPT_DEFS += -DRGBLED_BACK
+ ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ $(eval $(call HELIX_CUSTOMISE_MSG))
+ $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
+ endif
+else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+endif
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
+
+# Uncomment these for debugging
+# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
+# $(info -- OPT_DEFS=$(OPT_DEFS))
+# $(info )
diff --git a/keyboards/helix/rev2/keymaps/froggy/config.h b/keyboards/helix/rev2/keymaps/froggy/config.h
index 19718a458d..8161d4a25d 100644
--- a/keyboards/helix/rev2/keymaps/froggy/config.h
+++ b/keyboards/helix/rev2/keymaps/froggy/config.h
@@ -23,101 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../../config.h"
-/* Use I2C or Serial */
-
-#define USE_I2C
-#define USE_SERIAL
-//#define USE_MATRIX_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// Helix keyboard OLED support
-// see ./rules.mk: OLED_ENABLE=yes or no
-#ifdef OLED_ENABLE
- #define SSD1306OLED
-#endif
-
-/* Select rows configuration */
-// Rows are 4 or 5
-// #define HELIX_ROWS 5 see ./rules.mk
-
-/* key matrix size */
-// Rows are doubled-up
-#if HELIX_ROWS == 4
- #define MATRIX_ROWS 8
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
-#elif HELIX_ROWS == 5
- #define MATRIX_ROWS 10
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
-#else
- #error "expected HELIX_ROWS 4 or 5"
-#endif
-
-#define USE_SERIAL_PD2
-
-#define PREVENT_STUCK_MODIFIERS
-#define TAPPING_FORCE_HOLD
+#undef TAPPING_TERM
#define TAPPING_TERM 200
-#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
-#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
-
-// Helix keyboard RGB LED support
-//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no
-// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
-#ifdef RGBLED_BACK
- #if HELIX_ROWS == 4
- #define RGBLED_NUM 25
- #elif HELIX_ROWS == 5
- #define RGBLED_NUM 32
- #endif
-#else
- #define RGBLED_NUM 6
-#endif
-
-#ifndef IOS_DEVICE_ENABLE
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 255
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 120
- #else
- #define RGBLIGHT_LIMIT_VAL 130
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 17
-#else
- #if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 90
- #else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 35
- #else
- #define RGBLIGHT_LIMIT_VAL 45
- #endif
- #endif
- #define RGBLIGHT_VAL_STEP 4
-#endif
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-
-#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
-// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
-// 120 RGBoff, OLEDoff
-// 120 OLED
-// 330 RGB 6
-// 300 RGB 32
-// 310 OLED & RGB 32
- #define USB_MAX_POWER_CONSUMPTION 400
-#else
- // fix iPhone and iPad power adapter issue
- // iOS device need lessthan 100
- #define USB_MAX_POWER_CONSUMPTION 100
-#endif
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
+#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c
index 69c41856b5..5ac927af3e 100644
--- a/keyboards/helix/rev2/keymaps/froggy/keymap.c
+++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c
@@ -1,12 +1,9 @@
-#include "helix.h"
+#include QMK_KEYBOARD_H
#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
-#include "LUFA/Drivers/Peripheral/TWI.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
@@ -87,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Alt | win | Sym | Num | OPT | Ent | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_BASE] = KEYMAP( \
+ [_BASE] = LAYOUT( \
LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \
KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \
KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \
@@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | , | DTOP | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_OPT] = KEYMAP( \
+ [_OPT] = LAYOUT( \
KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \
EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \
KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \
@@ -129,7 +126,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |RGBOFF| | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_FUNC] = KEYMAP( \
+ [_FUNC] = LAYOUT( \
RGBRST,RGB_HUI, _______, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \
RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, _______, _______, _______, _______, _______, _______, _______, \
RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \
@@ -150,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | PS | | ~ | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_SYM] = KEYMAP( \
+ [_SYM] = LAYOUT( \
KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \
_______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \
_______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \
@@ -171,7 +168,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | , | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
- [_NUM] = KEYMAP( \
+ [_NUM] = LAYOUT( \
_______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \
_______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \
KC_PDOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \
@@ -435,7 +432,6 @@ void matrix_init_user(void) {
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
- TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
diff --git a/keyboards/helix/rev2/keymaps/led_test/config.h b/keyboards/helix/rev2/keymaps/led_test/config.h
index fa16b87f0f..0e7967c73b 100644
--- a/keyboards/helix/rev2/keymaps/led_test/config.h
+++ b/keyboards/helix/rev2/keymaps/led_test/config.h
@@ -23,75 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../../config.h"
-/* Use I2C or Serial */
+// place overrides here
-#define USE_I2C
-#define USE_SERIAL
-//#define USE_MATRIX_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// Helix keyboard OLED support
-#define SSD1306OLED
-
-/* Select rows configuration */
-// Rows are 4 or 5
-#define HELIX_ROWS 5
-
-/* key matrix size */
-// Rows are doubled-up
-#if HELIX_ROWS == 4
- #define MATRIX_ROWS 8
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6 }
-#elif HELIX_ROWS == 5
- #define MATRIX_ROWS 10
- #define MATRIX_COLS 7
- #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
-#else
- #error "expected HELIX_ROWS 4 or 5"
-#endif
-
-#define USE_SERIAL_PD2
-
-#define PREVENT_STUCK_MODIFIERS
-#define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 100
-
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no
-// Helix keyboard : RGBLED_NUM 6 or 32
-#define RGBLED_NUM 32
-#if RGBLED_NUM <= 6
- #define RGBLIGHT_LIMIT_VAL 255
-#else
- #if HELIX_ROWS == 5
- #define RGBLIGHT_LIMIT_VAL 120
- #else
- #define RGBLIGHT_LIMIT_VAL 130
- #endif
-#endif
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
-#endif
-
-#ifdef RGBLIGHT_ENABLE
-// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
-// 120 RGBoff, OLEDoff
-// 120 OLED
-// 330 RGB 6
-// 300 RGB 32
-// 310 OLED & RGB 32
- #define USB_MAX_POWER_CONSUMPTION 330
-#else
- // fix iPhone and iPad power adapter issue
- // iOS device need lessthan 100
- #define USB_MAX_POWER_CONSUMPTION 100
-#endif
+#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/led_test/keymap.c b/keyboards/helix/rev2/keymaps/led_test/keymap.c
index d597020d87..85621dd68e 100644
--- a/keyboards/helix/rev2/keymaps/led_test/keymap.c
+++ b/keyboards/helix/rev2/keymaps/led_test/keymap.c
@@ -1,12 +1,9 @@
-#include "helix.h"
+#include QMK_KEYBOARD_H
#include "bootloader.h"
-#include "action_layer.h"
-#include "eeconfig.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
-#include "LUFA/Drivers/Peripheral/TWI.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
@@ -74,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -95,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
@@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
@@ -137,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
@@ -158,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -179,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
* `-------------------------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
_______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
@@ -203,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_QWERTY] = KEYMAP( \
+ [_QWERTY] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -221,7 +218,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_COLEMAK] = KEYMAP( \
+ [_COLEMAK] = LAYOUT( \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
@@ -239,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
* `-------------------------------------------------------------------------------------------------'
*/
- [_DVORAK] = KEYMAP( \
+ [_DVORAK] = LAYOUT( \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
@@ -257,7 +254,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_LOWER] = KEYMAP( \
+ [_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______, \
@@ -275,7 +272,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-------------------------------------------------------------------------------------------------'
*/
- [_RAISE] = KEYMAP( \
+ [_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \
@@ -293,7 +290,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
* `-------------------------------------------------------------------------------------------------'
*/
- [_ADJUST] = KEYMAP( \
+ [_ADJUST] = LAYOUT( \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
@@ -477,7 +474,6 @@ void matrix_init_user(void) {
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
- TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk
index 71323916b4..f5b4605951 100644
--- a/keyboards/helix/rev2/keymaps/led_test/rules.mk
+++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk
@@ -14,10 +14,101 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32
-# Helix keyboard : RGBLIGHT_ENABLE = no or yes
-RGBLIGHT_ENABLE = yes-but-local # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
-ONEHAND_ENABLE = no # Enable one-hand typing
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SWAP_HANDS_ENABLE = no # Enable one-hand typing
+
+define HELIX_CUSTOMISE_MSG
+ $(info Helix customize)
+ $(info - OLED_ENABLE=$(OLED_ENABLE))
+ $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
+ $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
+ $(info - LED_ANIMATION=$(LED_ANIMATIONS))
+ $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
+endef
+
+# Helix keyboard customize
+# you can edit follows 7 Variables
+# jp: 以下の7つの変数を必要に応じて編集します。
+HELIX_ROWS = 5 # Helix Rows is 4 or 5
+OLED_ENABLE = yes # OLED_ENABLE
+LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
+LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.)
+LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
+LED_ANIMATIONS = yes # LED animations
+IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
+
+#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
+#### Do not enable these with audio at the same time.
+
+### Helix keyboard 'default' keymap: convenient command line option
+## make HELIX=<options> helix:defualt
+## option= oled | back | under | na | ios
+## ex.
+## make HELIX=oled helix:defualt
+## make HELIX=oled,back helix:defualt
+## make HELIX=oled,under helix:defualt
+## make HELIX=oled,back,na helix:defualt
+## make HELIX=oled,back,ios helix:defualt
+##
+ifneq ($(strip $(HELIX)),)
+ ifeq ($(findstring oled,$(HELIX)), oled)
+ OLED_ENABLE = yes
+ endif
+ ifeq ($(findstring back,$(HELIX)), back)
+ LED_BACK_ENABLE = yes
+ else ifeq ($(findstring under,$(HELIX)), under)
+ LED_UNDERGLOW_ENABLE = yes
+ endif
+ ifeq ($(findstring na,$(HELIX)), na)
+ LED_ANIMATIONS = no
+ endif
+ ifeq ($(findstring ios,$(HELIX)), ios)
+ IOS_DEVICE_ENABLE = yes
+ endif
+ $(eval $(call HELIX_CUSTOMISE_MSG))
+ $(info )
+endif
+
+# Uncomment these for checking
+# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。
+# $(eval $(call HELIX_CUSTOMISE_MSG))
+# $(info )
+
+ifneq ($(strip $(HELIX_ROWS)), 4)
+ ifneq ($(strip $(HELIX_ROWS)), 5)
+ $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value)
+ endif
+endif
+OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS))
+
+ifeq ($(strip $(LED_BACK_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+ OPT_DEFS += -DRGBLED_BACK
+ ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ $(eval $(call HELIX_CUSTOMISE_MSG))
+ $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
+ endif
+else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
+ RGBLIGHT_ENABLE = yes
+else
+ RGBLIGHT_ENABLE = no
+endif
+
+ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
+ OPT_DEFS += -DIOS_DEVICE_ENABLE
+endif
+
+ifeq ($(strip $(LED_ANIMATIONS)), yes)
+ OPT_DEFS += -DRGBLIGHT_ANIMATIONS
+endif
+
+ifeq ($(strip $(OLED_ENABLE)), yes)
+ OPT_DEFS += -DOLED_ENABLE
+endif
+
+ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+endif
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@@ -26,13 +117,7 @@ ifndef QUANTUM_DIR
include ../../../../Makefile
endif
-#copy from common_features.mk and modify rgblight.c
- OPT_DEFS += -DRGBLIGHT_ENABLE
- SRC += rgblight.c
- CIE1931_CURVE = yes
- LED_BREATHING_TABLE = yes
- ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
- OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
- else
- SRC += ws2812.c
- endif
+# Uncomment these for debugging
+# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
+# $(info -- OPT_DEFS=$(OPT_DEFS))
+# $(info )
diff --git a/keyboards/helix/rev2/rev2.h b/keyboards/helix/rev2/rev2.h
index 7cab57ea05..1da6f668f5 100644
--- a/keyboards/helix/rev2/rev2.h
+++ b/keyboards/helix/rev2/rev2.h
@@ -26,11 +26,11 @@
#ifndef FLIP_HALF
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
-#define KEYMAP( \
+#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
+ L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
@@ -45,11 +45,11 @@
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
-#define KEYMAP( \
+#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
+ L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
@@ -66,12 +66,12 @@
#ifndef FLIP_HALF
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
+ L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
@@ -88,12 +88,12 @@
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
- #define KEYMAP( \
+ #define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
+ L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO }, \
diff --git a/keyboards/helix/serial.c b/keyboards/helix/serial.c
index 51ab67fb3d..182f222196 100644
--- a/keyboards/helix/serial.c
+++ b/keyboards/helix/serial.c
@@ -14,9 +14,45 @@
#ifdef USE_SERIAL
-// Serial pulse period in microseconds. Its probably a bad idea to lower this
-// value.
-#define SERIAL_DELAY 30
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// Serial pulse period in microseconds.
+#define SELECT_SERIAL_SPEED 1
+#if SELECT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 10 // cycles
+#elif SELECT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #define READ_WRITE_START_ADJUST 23 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 10 // cycles
+#elif SELECT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 25 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 10 // cycles
+#elif SELECT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 25 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 10 // cycles
+#elif SELECT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 50 // micro sec
+ #define READ_WRITE_START_ADJUST 25 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 10 // cycles
+#else
+#error Illegal Serial Speed
+#endif
+
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH 1
+#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
@@ -28,9 +64,17 @@ inline static
void serial_delay(void) {
_delay_us(SERIAL_DELAY);
}
-void serial_delay_short(void) {
- _delay_us(SERIAL_DELAY-1);
+
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
}
+
inline static
void serial_output(void) {
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
@@ -38,7 +82,7 @@ void serial_output(void) {
// make the serial pin an input with pull-up resistor
inline static
-void serial_input(void) {
+void serial_input_with_pullup(void) {
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
}
@@ -64,7 +108,7 @@ void serial_master_init(void) {
}
void serial_slave_init(void) {
- serial_input();
+ serial_input_with_pullup();
#ifndef USE_SERIAL_PD2
// Enable INT0
@@ -79,25 +123,21 @@ void serial_slave_init(void) {
#endif
}
-// Used by the master to synchronize timing with the slave.
+// Used by the sender to synchronize timing with the reciver.
static
void sync_recv(void) {
- serial_input();
+ for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
// This shouldn't hang if the slave disconnects because the
// serial line will float to high if the slave does disconnect.
while (!serial_read_pin());
- //serial_delay();
- _delay_us(SERIAL_DELAY-5);
}
-// Used by the slave to send a synchronization signal to the master.
+// Used by the reciver to send a synchronization signal to the sender.
static
void sync_send(void) {
- serial_output();
-
serial_low();
serial_delay();
-
serial_high();
}
@@ -105,66 +145,70 @@ void sync_send(void) {
static
uint8_t serial_read_byte(void) {
uint8_t byte = 0;
- serial_input();
+ _delay_sub_us(READ_WRITE_START_ADJUST);
for ( uint8_t i = 0; i < 8; ++i) {
+ serial_delay_half1(); // read the middle of pulses
byte = (byte << 1) | serial_read_pin();
- serial_delay();
- _delay_us(1);
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
}
-
return byte;
}
// Sends a byte with MSB ordering
static
void serial_write_byte(uint8_t data) {
- uint8_t b = 8;
- serial_output();
- while( b-- ) {
- if(data & (1 << b)) {
+ uint8_t b = 1<<7;
+ while( b ) {
+ if(data & b) {
serial_high();
} else {
serial_low();
}
+ b >>= 1;
serial_delay();
}
+ serial_low(); // sync_send() / senc_recv() need raise edge
}
// interrupt handle to be used by the slave device
ISR(SERIAL_PIN_INTERRUPT) {
- sync_send();
+ serial_output();
+ // slave send phase
uint8_t checksum = 0;
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_slave_buffer[i]);
sync_send();
+ serial_write_byte(serial_slave_buffer[i]);
checksum += serial_slave_buffer[i];
}
- serial_write_byte(checksum);
sync_send();
+ serial_write_byte(checksum);
- // wait for the sync to finish sending
- serial_delay();
-
- // read the middle of pulses
- _delay_us(SERIAL_DELAY/2);
+ // slave switch to input
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+ // slave recive phase
uint8_t checksum_computed = 0;
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+ sync_recv();
serial_master_buffer[i] = serial_read_byte();
- sync_send();
checksum_computed += serial_master_buffer[i];
}
+ sync_recv();
uint8_t checksum_received = serial_read_byte();
- sync_send();
-
- serial_input(); // end transaction
if ( checksum_computed != checksum_received ) {
status |= SLAVE_DATA_CORRUPT;
} else {
status &= ~SLAVE_DATA_CORRUPT;
}
+
+ sync_recv(); //weit master output to high
}
inline
@@ -178,6 +222,7 @@ bool serial_slave_DATA_CORRUPT(void) {
// Returns:
// 0 => no error
// 1 => slave did not respond
+// 2 => checksum error
int serial_update_buffers(void) {
// this code is very time dependent, so we need to disable interrupts
cli();
@@ -185,51 +230,61 @@ int serial_update_buffers(void) {
// signal to the slave that we want to start a transaction
serial_output();
serial_low();
- _delay_us(1);
+ _delay_us(SLAVE_INT_WIDTH);
// wait for the slaves response
- serial_input();
- serial_high();
- _delay_us(SERIAL_DELAY);
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
// check if the slave is present
if (serial_read_pin()) {
// slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
sei();
return 1;
}
+ // master recive phase
// if the slave is present syncronize with it
- sync_recv();
uint8_t checksum_computed = 0;
// receive data from the slave
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_slave_buffer[i] = serial_read_byte();
sync_recv();
+ serial_slave_buffer[i] = serial_read_byte();
checksum_computed += serial_slave_buffer[i];
}
- uint8_t checksum_received = serial_read_byte();
sync_recv();
+ uint8_t checksum_received = serial_read_byte();
if (checksum_computed != checksum_received) {
+ serial_output();
+ serial_high();
sei();
return 2;
}
+ // master switch to output
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); // 3
+ serial_delay_half1(); //4
+
+ // master send phase
uint8_t checksum = 0;
- // send data to the slave
+
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
+ sync_send();
serial_write_byte(serial_master_buffer[i]);
- sync_recv();
checksum += serial_master_buffer[i];
}
+ sync_send();
serial_write_byte(checksum);
- sync_recv();
// always, release the line when not in use
- serial_output();
- serial_high();
+ sync_send();
sei();
return 0;
diff --git a/keyboards/helix/ssd1306.c b/keyboards/helix/ssd1306.c
index b13060ef73..b3e55a67c2 100644
--- a/keyboards/helix/ssd1306.c
+++ b/keyboards/helix/ssd1306.c
@@ -127,6 +127,7 @@ static int8_t capture_sendchar(uint8_t c) {
bool iota_gfx_init(bool rotate) {
bool success = false;
+ i2c_master_init();
send_cmd1(DisplayOff);
send_cmd2(SetDisplayClockDiv, 0x80);
send_cmd2(SetMultiPlex, DisplayHeight - 1);