diff options
Diffstat (limited to 'keyboards')
378 files changed, 2073 insertions, 4672 deletions
diff --git a/keyboards/at101_bh/at101_bh.c b/keyboards/at101_bh/at101_bh.c new file mode 100644 index 000000000..3b519373b --- /dev/null +++ b/keyboards/at101_bh/at101_bh.c | |||
@@ -0,0 +1 @@ | |||
#include "at101_bh.h" | |||
diff --git a/keyboards/at101_blackheart/at101_blackheart.h b/keyboards/at101_bh/at101_bh.h index 24ac1b7c5..54655cf60 100644 --- a/keyboards/at101_blackheart/at101_blackheart.h +++ b/keyboards/at101_bh/at101_bh.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef at101_blackheart_H | 1 | #pragma once |
2 | #define at101_blackheart_H | ||
3 | 2 | ||
4 | #include "quantum.h" | 3 | #include "quantum.h" |
5 | 4 | ||
@@ -24,5 +23,3 @@ | |||
24 | { K1000, K1001, KC_NO, KC_NO, KC_NO, K1005, K1006, K1007, K1008, K1009 }, \ | 23 | { K1000, K1001, KC_NO, KC_NO, KC_NO, K1005, K1006, K1007, K1008, K1009 }, \ |
25 | { K1100, K1101, K1102, KC_NO, KC_NO, K1105, K1106, K1107, K1108, KC_NO } \ | 24 | { K1100, K1101, K1102, KC_NO, KC_NO, K1105, K1106, K1107, K1108, KC_NO } \ |
26 | } | 25 | } |
27 | |||
28 | #endif | ||
diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_bh/config.h index 83814c648..6928118b7 100644 --- a/keyboards/at101_blackheart/config.h +++ b/keyboards/at101_bh/config.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #define PRODUCT_ID 0x6060 | 7 | #define PRODUCT_ID 0x6060 |
8 | #define DEVICE_VER 0x0001 | 8 | #define DEVICE_VER 0x0001 |
9 | #define MANUFACTURER blindassassin111 | 9 | #define MANUFACTURER blindassassin111 |
10 | #define PRODUCT AT101_Blackheart PCB | 10 | #define PRODUCT AT101_BH PCB |
11 | #define DESCRIPTION Replacement AT101 PCB | 11 | #define DESCRIPTION Replacement AT101 PCB |
12 | 12 | ||
13 | /* key matrix size */ | 13 | /* key matrix size */ |
diff --git a/keyboards/at101_blackheart/info.json b/keyboards/at101_bh/info.json index 4bef46712..1d28dc230 100644 --- a/keyboards/at101_blackheart/info.json +++ b/keyboards/at101_bh/info.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "AT101 Blackheart PCB", | 2 | "keyboard_name": "AT101 BH PCB", |
3 | "keyboard_folder": "at101_blackheart", | 3 | "keyboard_folder": "at101_bh", |
4 | "url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html", | 4 | "url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html", |
5 | "maintainer": "qmk, blindassassin111", | 5 | "maintainer": "qmk, blindassassin111", |
6 | "width": 22.5, | 6 | "width": 22.5, |
diff --git a/keyboards/at101_blackheart/keymaps/default/keymap.c b/keyboards/at101_bh/keymaps/default/keymap.c index 086c25e1c..086c25e1c 100644 --- a/keyboards/at101_blackheart/keymaps/default/keymap.c +++ b/keyboards/at101_bh/keymaps/default/keymap.c | |||
diff --git a/keyboards/at101_blackheart/readme.md b/keyboards/at101_bh/readme.md index d435d6955..8a9ce2496 100644 --- a/keyboards/at101_blackheart/readme.md +++ b/keyboards/at101_bh/readme.md | |||
@@ -1,15 +1,15 @@ | |||
1 | # AT101 Blackheart PCB | 1 | # AT101 BH PCB |
2 | 2 | ||
3 |  | 3 |  |
4 | 4 | ||
5 | A replacement PCB for AT101 keyboards. | 5 | A replacement PCB for AT101 keyboards. |
6 | 6 | ||
7 | Keyboard Maintainer: QMK Community and blindassassin111 | 7 | Keyboard Maintainer: QMK Community and blindassassin111 |
8 | Hardware Supported: AT101 blackheart PCB | 8 | Hardware Supported: AT101 BH PCB |
9 | Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html | 9 | Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html |
10 | 10 | ||
11 | Make example for this keyboard (after setting up your build environment): | 11 | Make example for this keyboard (after setting up your build environment): |
12 | 12 | ||
13 | make at101_blackheart:default | 13 | make at101_bh:default |
14 | 14 | ||
15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/at101_blackheart/rules.mk b/keyboards/at101_bh/rules.mk index 1930d9f27..1930d9f27 100644 --- a/keyboards/at101_blackheart/rules.mk +++ b/keyboards/at101_bh/rules.mk | |||
diff --git a/keyboards/at101_blackheart/at101_blackheart.c b/keyboards/at101_blackheart/at101_blackheart.c deleted file mode 100644 index aa07a7864..000000000 --- a/keyboards/at101_blackheart/at101_blackheart.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "at101_blackheart.h" | ||
diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 33b3a9d82..361d702c5 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c | |||
@@ -102,7 +102,7 @@ enum keyboard_macros { | |||
102 | #define SC_CCLS LCTL(KC_F4) | 102 | #define SC_CCLS LCTL(KC_F4) |
103 | 103 | ||
104 | #define TG_NKRO MAGIC_TOGGLE_NKRO | 104 | #define TG_NKRO MAGIC_TOGGLE_NKRO |
105 | #define OS_SHFT KC_FN0 | 105 | #define OS_SHFT OSM(MOD_LSFT) |
106 | 106 | ||
107 | #define ________________ _______, _______ | 107 | #define ________________ _______, _______ |
108 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX | 108 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX |
@@ -258,10 +258,6 @@ void persistent_default_layer_set(uint16_t default_layer) { | |||
258 | default_layer_set(default_layer); | 258 | default_layer_set(default_layer); |
259 | } | 259 | } |
260 | 260 | ||
261 | const uint16_t PROGMEM fn_actions[] = { | ||
262 | [0] = ACTION_MODS_ONESHOT(MOD_LSFT), | ||
263 | }; | ||
264 | |||
265 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 261 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { |
266 | 262 | ||
267 | // MACRODOWN only works in this function | 263 | // MACRODOWN only works in this function |
diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index c7dcb6765..31a01ccd8 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c | |||
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #define KC_RAIS MO(RAISE) | 11 | #define KC_RAIS MO(RAISE) |
12 | #define KC_LOWR MO(LOWER) | 12 | #define KC_LOWR MO(LOWER) |
13 | #define KC_TGBD TG(BDO) | ||
14 | #define KC_TGRS TG(RESETL) | ||
13 | 15 | ||
14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 16 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
15 | [DVORAK] = LAYOUT_kc( | 17 | [DVORAK] = LAYOUT_kc( |
@@ -17,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
17 | NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ | 19 | NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ |
18 | NO, A, O, E, U, I, D, H, T, N, S, NO, \ | 20 | NO, A, O, E, U, I, D, H, T, N, S, NO, \ |
19 | NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ | 21 | NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ |
20 | NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO | 22 | NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO |
21 | ), | 23 | ), |
22 | 24 | ||
23 | [QWERTY] = LAYOUT_kc( | 25 | [QWERTY] = LAYOUT_kc( |
@@ -25,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
25 | NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ | 27 | NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ |
26 | NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ | 28 | NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ |
27 | NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ | 29 | NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ |
28 | NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO | 30 | NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO |
29 | ), | 31 | ), |
30 | 32 | ||
31 | [RAISE] = LAYOUT_kc( | 33 | [RAISE] = LAYOUT_kc( |
@@ -33,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
33 | NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ | 35 | NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ |
34 | NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ | 36 | NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ |
35 | NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ | 37 | NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ |
36 | NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO | 38 | NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TGRS, NO |
37 | ), | 39 | ), |
38 | 40 | ||
39 | [LOWER] = LAYOUT_kc( | 41 | [LOWER] = LAYOUT_kc( |
@@ -49,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
49 | NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ | 51 | NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ |
50 | NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ | 52 | NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ |
51 | NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ | 53 | NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ |
52 | NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO | 54 | NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, TGBD, NO |
53 | ), | 55 | ), |
54 | 56 | ||
55 | [RESETL] = LAYOUT( | 57 | [RESETL] = LAYOUT( |
@@ -57,15 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
57 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ | 59 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ |
58 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ | 60 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ |
59 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ | 61 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ |
60 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO | 62 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(RESETL),KC_NO |
61 | ) | 63 | ) |
62 | }; | 64 | }; |
63 | 65 | ||
64 | const uint16_t PROGMEM fn_actions[] = { | ||
65 | [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer | ||
66 | [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer | ||
67 | }; | ||
68 | |||
69 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 66 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { |
70 | // MACRODOWN only works in this function | 67 | // MACRODOWN only works in this function |
71 | switch (id) { | 68 | switch (id) { |
diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index aad2d643c..f9234a7b2 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c | |||
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ | 48 | KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ |
49 | KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ | 49 | KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ |
50 | KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ | 50 | KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ |
51 | MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), | 51 | MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), |
52 | /* Layer 1: Standard ISO layer */ | 52 | /* Layer 1: Standard ISO layer */ |
53 | [KM_QWERTY] = LAYOUT( \ | 53 | [KM_QWERTY] = LAYOUT( \ |
54 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ | 54 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ |
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ | 56 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ |
57 | KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ | 57 | KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ |
58 | KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ | 58 | KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ |
59 | MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), | 59 | MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), |
60 | /* Layer 2: Media layer */ | 60 | /* Layer 2: Media layer */ |
61 | [KM_MEDIA] = LAYOUT( \ | 61 | [KM_MEDIA] = LAYOUT( \ |
62 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ | 62 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ |
@@ -75,10 +75,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
75 | _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), | 75 | _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), |
76 | }; | 76 | }; |
77 | 77 | ||
78 | const uint16_t PROGMEM fn_actions[] = { | ||
79 | [1] = ACTION_LAYER_TOGGLE(KM_QWERTY) | ||
80 | }; | ||
81 | |||
82 | void matrix_scan_user(void) | 78 | void matrix_scan_user(void) |
83 | { | 79 | { |
84 | uint8_t layer = biton32(layer_state); | 80 | uint8_t layer = biton32(layer_state); |
diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 3dc99319e..849f4f607 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h | |||
@@ -158,12 +158,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
158 | //#define MAGIC_KEY_SLEEP_LED Z | 158 | //#define MAGIC_KEY_SLEEP_LED Z |
159 | 159 | ||
160 | // Audio Click | 160 | // Audio Click |
161 | #define AUDIO_CLICKY | 161 | //#define AUDIO_CLICKY |
162 | 162 | ||
163 | // Music Mode Polyphony | 163 | // Music Mode Polyphony |
164 | // NOTE: Must change polyphony_rate to a number higher than 0 in voices.c | 164 | // NOTE: Must change polyphony_rate to a number higher than 0 in voices.c |
165 | #define AUDIO_VOICES | 165 | //#define AUDIO_VOICES |
166 | #define PITCH_STANDARD_A 880.0f | 166 | //#define PITCH_STANDARD_A 880.0f |
167 | 167 | ||
168 | // Mouse keys | 168 | // Mouse keys |
169 | #define MOUSEKEY_DELAY 0 | 169 | #define MOUSEKEY_DELAY 0 |
diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 41a29b353..83d55e0f7 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk | |||
@@ -28,5 +28,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d | |||
28 | #MIDI_ENABLE = yes # MIDI controls | 28 | #MIDI_ENABLE = yes # MIDI controls |
29 | UNICODE_ENABLE = no # Unicode | 29 | UNICODE_ENABLE = no # Unicode |
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
31 | AUDIO_ENABLE = yes # Audio output on port C6 | 31 | AUDIO_ENABLE = no # Audio output |
32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 0fa1d9d98..0d94eb46c 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c | |||
@@ -38,6 +38,7 @@ void matrix_scan_user(void) { | |||
38 | 38 | ||
39 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 39 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
40 | switch (keycode) { | 40 | switch (keycode) { |
41 | #ifdef AUDIO_ENABLE | ||
41 | case SONG_SU: | 42 | case SONG_SU: |
42 | if (record->event.pressed) { | 43 | if (record->event.pressed) { |
43 | PLAY_SONG(tone_startup); | 44 | PLAY_SONG(tone_startup); |
@@ -58,7 +59,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
58 | } | 59 | } |
59 | 60 | ||
60 | return false; | 61 | return false; |
61 | 62 | #endif | |
62 | default: | 63 | default: |
63 | return true; | 64 | return true; |
64 | } | 65 | } |
diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 998bb5e0e..82ee482be 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk | |||
@@ -10,7 +10,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration | |||
10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
11 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 11 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
12 | MIDI_ENABLE = no # MIDI controls | 12 | MIDI_ENABLE = no # MIDI controls |
13 | AUDIO_ENABLE = yes # Audio output on port C6 | 13 | AUDIO_ENABLE = no # Audio output |
14 | UNICODE_ENABLE = no # Unicode | 14 | UNICODE_ENABLE = no # Unicode |
15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c index c472f78b7..716ff19ab 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c | |||
@@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
175 | // clang-format on | 175 | // clang-format on |
176 | 176 | ||
177 | // Configure ignore mod tap interrupt per key | 177 | // Configure ignore mod tap interrupt per key |
178 | bool get_ignore_mod_tap_interrupt(uint16_t keycode) { | 178 | bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { |
179 | switch (keycode) { | 179 | switch (keycode) { |
180 | // I don't like how mod tap interrupt feels with these keys specifically when I'm typing | 180 | // I don't like how mod tap interrupt feels with these keys specifically when I'm typing |
181 | case LCTL_T(KC_ESC): | 181 | case LCTL_T(KC_ESC): |
diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c index 7e3990819..ce4876536 100644 --- a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c | |||
@@ -283,13 +283,9 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
283 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, | 283 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, |
284 | CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, | 284 | CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, |
285 | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, | 285 | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, |
286 | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, | 286 | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, TILD, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, |
287 | TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS | 287 | TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS |
288 | ), | 288 | ), |
289 | }; | 289 | }; |
290 | 290 | ||
291 | const action_t PROGMEM fn_actions[] = { | ||
292 | [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde | ||
293 | }; | ||
294 | |||
295 | #endif | 291 | #endif |
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 55d51eb08..0769edf3b 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c | |||
@@ -124,7 +124,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
124 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | 124 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | uint16_t get_tapping_term(uint16_t keycode) { | 127 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
128 | switch (keycode) { | 128 | switch (keycode) { |
129 | case ALT_T(KC_A): | 129 | case ALT_T(KC_A): |
130 | return TAPPING_TERM + 100; | 130 | return TAPPING_TERM + 100; |
diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c index 6dc289845..60c92b708 100644 --- a/keyboards/cu75/cu75.c +++ b/keyboards/cu75/cu75.c | |||
@@ -26,7 +26,7 @@ void matrix_init_kb(void) | |||
26 | 26 | ||
27 | #ifdef AUDIO_ENABLE | 27 | #ifdef AUDIO_ENABLE |
28 | audio_init(); | 28 | audio_init(); |
29 | PLAY_NOTE_ARRAY(test_sound, false, STACCATO); | 29 | PLAY_SONG(test_sound); |
30 | // Fix port B5 | 30 | // Fix port B5 |
31 | cbi(DDRB, 5); | 31 | cbi(DDRB, 5); |
32 | sbi(PORTB, 5); | 32 | sbi(PORTB, 5); |
diff --git a/keyboards/ergoinu/config.h b/keyboards/dm9records/ergoinu/config.h index dfc8a5293..dfc8a5293 100644 --- a/keyboards/ergoinu/config.h +++ b/keyboards/dm9records/ergoinu/config.h | |||
diff --git a/keyboards/ergoinu/ergoinu.c b/keyboards/dm9records/ergoinu/ergoinu.c index b43ab17c8..b43ab17c8 100644 --- a/keyboards/ergoinu/ergoinu.c +++ b/keyboards/dm9records/ergoinu/ergoinu.c | |||
diff --git a/keyboards/ergoinu/ergoinu.h b/keyboards/dm9records/ergoinu/ergoinu.h index 43249a844..43249a844 100644 --- a/keyboards/ergoinu/ergoinu.h +++ b/keyboards/dm9records/ergoinu/ergoinu.h | |||
diff --git a/keyboards/ergoinu/info.json b/keyboards/dm9records/ergoinu/info.json index 81f53fd25..3627049a5 100644 --- a/keyboards/ergoinu/info.json +++ b/keyboards/dm9records/ergoinu/info.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "Ergoinu", | 2 | "keyboard_name": "Ergoinu", |
3 | "url": "", | 3 | "url": "", |
4 | "maintainer": "hsgw", | 4 | "maintainer": "hsgw(Takuya Urakawa)", |
5 | "width": 18, | 5 | "width": 18, |
6 | "height": 5.4, | 6 | "height": 5.4, |
7 | "layouts": { | 7 | "layouts": { |
diff --git a/keyboards/ergoinu/keymaps/default/config.h b/keyboards/dm9records/ergoinu/keymaps/default/config.h index bb266f25e..bb266f25e 100644 --- a/keyboards/ergoinu/keymaps/default/config.h +++ b/keyboards/dm9records/ergoinu/keymaps/default/config.h | |||
diff --git a/keyboards/ergoinu/keymaps/default/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default/keymap.c index 7f1be4796..7f1be4796 100644 --- a/keyboards/ergoinu/keymaps/default/keymap.c +++ b/keyboards/dm9records/ergoinu/keymaps/default/keymap.c | |||
diff --git a/keyboards/ergoinu/keymaps/default/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk index b2eff12b0..b2eff12b0 100644 --- a/keyboards/ergoinu/keymaps/default/rules.mk +++ b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk | |||
diff --git a/keyboards/ergoinu/keymaps/default_jis/config.h b/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h index bb266f25e..bb266f25e 100644 --- a/keyboards/ergoinu/keymaps/default_jis/config.h +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h | |||
diff --git a/keyboards/ergoinu/keymaps/default_jis/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c index 3a1a88f47..3a1a88f47 100644 --- a/keyboards/ergoinu/keymaps/default_jis/keymap.c +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c | |||
diff --git a/keyboards/ergoinu/keymaps/default_jis/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk index 92dde90ff..92dde90ff 100644 --- a/keyboards/ergoinu/keymaps/default_jis/rules.mk +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk | |||
diff --git a/keyboards/ergoinu/matrix.c b/keyboards/dm9records/ergoinu/matrix.c index 4a80cf9f2..4a80cf9f2 100644 --- a/keyboards/ergoinu/matrix.c +++ b/keyboards/dm9records/ergoinu/matrix.c | |||
diff --git a/keyboards/ergoinu/readme.md b/keyboards/dm9records/ergoinu/readme.md index 06e0cf352..de0a1c6c9 100644 --- a/keyboards/ergoinu/readme.md +++ b/keyboards/dm9records/ergoinu/readme.md | |||
@@ -11,11 +11,11 @@ Hardware Availability & Repository: [https://github.com/hsgw/ergoinu](https://gi | |||
11 | 11 | ||
12 | Make example for this keyboard (after setting up your build environment): | 12 | Make example for this keyboard (after setting up your build environment): |
13 | 13 | ||
14 | make ergoinu:default | 14 | make dm9records/ergoinu:default |
15 | 15 | ||
16 | (or) | 16 | (or) |
17 | 17 | ||
18 | make ergoinu:default_jis | 18 | make dm9records/ergoinu:default_jis |
19 | 19 | ||
20 | 20 | ||
21 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 21 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. |
diff --git a/keyboards/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk index 6f5debe00..493046ffa 100644 --- a/keyboards/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk | |||
@@ -26,7 +26,7 @@ MIDI_ENABLE = no # MIDI controls | |||
26 | AUDIO_ENABLE = no # Audio output on port C6 | 26 | AUDIO_ENABLE = no # Audio output on port C6 |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
30 | SUBPROJECT_rev1 = no | 30 | SUBPROJECT_rev1 = no |
31 | USE_I2C = no # i2c is not supported | 31 | USE_I2C = no # i2c is not supported |
32 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 32 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
@@ -35,8 +35,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
35 | CUSTOM_MATRIX = yes | 35 | CUSTOM_MATRIX = yes |
36 | SRC += matrix.c serial.c split_util.c | 36 | SRC += matrix.c serial.c split_util.c |
37 | 37 | ||
38 | DEFAULT_FOLDER = ergoinu | ||
39 | |||
40 | # ergoinu configs | 38 | # ergoinu configs |
41 | DISABLE_PROMICRO_LEDs = yes | 39 | DISABLE_PROMICRO_LEDs = yes |
42 | 40 | ||
diff --git a/keyboards/ergoinu/serial.c b/keyboards/dm9records/ergoinu/serial.c index 591941587..591941587 100644 --- a/keyboards/ergoinu/serial.c +++ b/keyboards/dm9records/ergoinu/serial.c | |||
diff --git a/keyboards/ergoinu/serial.h b/keyboards/dm9records/ergoinu/serial.h index 67cf06ac6..67cf06ac6 100644 --- a/keyboards/ergoinu/serial.h +++ b/keyboards/dm9records/ergoinu/serial.h | |||
diff --git a/keyboards/ergoinu/serial_config.h b/keyboards/dm9records/ergoinu/serial_config.h index a16db684c..a16db684c 100644 --- a/keyboards/ergoinu/serial_config.h +++ b/keyboards/dm9records/ergoinu/serial_config.h | |||
diff --git a/keyboards/ergoinu/split_util.c b/keyboards/dm9records/ergoinu/split_util.c index 0cbc2c69c..0cbc2c69c 100644 --- a/keyboards/ergoinu/split_util.c +++ b/keyboards/dm9records/ergoinu/split_util.c | |||
diff --git a/keyboards/ergoinu/split_util.h b/keyboards/dm9records/ergoinu/split_util.h index 11cfd5455..11cfd5455 100644 --- a/keyboards/ergoinu/split_util.h +++ b/keyboards/dm9records/ergoinu/split_util.h | |||
diff --git a/keyboards/plaid/config.h b/keyboards/dm9records/plaid/config.h index 4d7bedee5..4d7bedee5 100644 --- a/keyboards/plaid/config.h +++ b/keyboards/dm9records/plaid/config.h | |||
diff --git a/keyboards/plaid/info.json b/keyboards/dm9records/plaid/info.json index 13bd05c14..318154d7d 100644 --- a/keyboards/plaid/info.json +++ b/keyboards/dm9records/plaid/info.json | |||
@@ -1,8 +1,8 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "Plaid // Through Hole", | 2 | "keyboard_name": "Plaid // Through Hole", |
3 | "keyboard_folder": "planid", | 3 | "keyboard_folder": "dm9records/plaid", |
4 | "url": "https://github.com/hsgw/plaid", | 4 | "url": "https://github.com/hsgw/plaid", |
5 | "maintainer": "hsgw", | 5 | "maintainer": "hsgw(Takuya Urakawa)", |
6 | "width": 12, | 6 | "width": 12, |
7 | "height": 4, | 7 | "height": 4, |
8 | "layouts": { | 8 | "layouts": { |
diff --git a/keyboards/plaid/keymaps/brickbots/config.h b/keyboards/dm9records/plaid/keymaps/brickbots/config.h index 5733b9e4b..5733b9e4b 100644 --- a/keyboards/plaid/keymaps/brickbots/config.h +++ b/keyboards/dm9records/plaid/keymaps/brickbots/config.h | |||
diff --git a/keyboards/plaid/keymaps/brickbots/keymap.c b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c index 20b6eac68..20b6eac68 100644 --- a/keyboards/plaid/keymaps/brickbots/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c | |||
diff --git a/keyboards/plaid/keymaps/brickbots/readme.md b/keyboards/dm9records/plaid/keymaps/brickbots/readme.md index 48a12fa8b..48a12fa8b 100644 --- a/keyboards/plaid/keymaps/brickbots/readme.md +++ b/keyboards/dm9records/plaid/keymaps/brickbots/readme.md | |||
diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/dm9records/plaid/keymaps/default/config.h index 5733b9e4b..5733b9e4b 100644 --- a/keyboards/plaid/keymaps/default/config.h +++ b/keyboards/dm9records/plaid/keymaps/default/config.h | |||
diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index 6a858a4a7..6a858a4a7 100644 --- a/keyboards/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c | |||
diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/dm9records/plaid/keymaps/default/readme.md index 5a08a1fff..5a08a1fff 100644 --- a/keyboards/plaid/keymaps/default/readme.md +++ b/keyboards/dm9records/plaid/keymaps/default/readme.md | |||
diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/config.h b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h index 4bcbc6f67..4bcbc6f67 100644 --- a/keyboards/plaid/keymaps/thehalfdeafchef/config.h +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h | |||
diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c index bdf6c54c3..bdf6c54c3 100644 --- a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c | |||
diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md index bd09965b5..bd09965b5 100644 --- a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md | |||
diff --git a/keyboards/plaid/plaid.c b/keyboards/dm9records/plaid/plaid.c index 28f56d7f9..28f56d7f9 100644 --- a/keyboards/plaid/plaid.c +++ b/keyboards/dm9records/plaid/plaid.c | |||
diff --git a/keyboards/plaid/plaid.h b/keyboards/dm9records/plaid/plaid.h index d791cf7c0..d791cf7c0 100644 --- a/keyboards/plaid/plaid.h +++ b/keyboards/dm9records/plaid/plaid.h | |||
diff --git a/keyboards/plaid/readme.md b/keyboards/dm9records/plaid/readme.md index a491d05d3..79621deec 100644 --- a/keyboards/plaid/readme.md +++ b/keyboards/dm9records/plaid/readme.md | |||
@@ -9,11 +9,11 @@ Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) | |||
9 | Hardware Availability: Group buy in r/mk | 9 | Hardware Availability: Group buy in r/mk |
10 | 10 | ||
11 | Make example for this keyboard (after setting up your build environment): | 11 | Make example for this keyboard (after setting up your build environment): |
12 | make plaid:default | 12 | make dm9records/plaid:default |
13 | 13 | ||
14 | Flashing example for this keyboard: | 14 | Flashing example for this keyboard: |
15 | 15 | ||
16 | make plaid:default:flash | 16 | make dm9records/plaid:default:flash |
17 | 17 | ||
18 | ## Bootloader | 18 | ## Bootloader |
19 | use usbasploader in my repository. | 19 | use usbasploader in my repository. |
diff --git a/keyboards/plaid/rules.mk b/keyboards/dm9records/plaid/rules.mk index 7c4112c9a..7c4112c9a 100644 --- a/keyboards/plaid/rules.mk +++ b/keyboards/dm9records/plaid/rules.mk | |||
diff --git a/keyboards/tartan/config.h b/keyboards/dm9records/tartan/config.h index ee4393e53..ee4393e53 100644 --- a/keyboards/tartan/config.h +++ b/keyboards/dm9records/tartan/config.h | |||
diff --git a/keyboards/tartan/info.json b/keyboards/dm9records/tartan/info.json index 72da8bd9d..ff0ddfdf9 100644 --- a/keyboards/tartan/info.json +++ b/keyboards/dm9records/tartan/info.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "Tartan # Through Hole", | 2 | "keyboard_name": "Tartan # Through Hole", |
3 | "keyboard_folder": "tartan", | 3 | "keyboard_folder": "dm9records/tartan", |
4 | "url": "https://github.com/hsgw/tartan", | 4 | "url": "https://github.com/hsgw/tartan", |
5 | "maintainer": "hsgw(Takuya Urakawa)", | 5 | "maintainer": "hsgw(Takuya Urakawa)", |
6 | "width": 13, | 6 | "width": 13, |
diff --git a/keyboards/tartan/keymaps/default/keymap.c b/keyboards/dm9records/tartan/keymaps/default/keymap.c index 6224b4e61..6224b4e61 100644 --- a/keyboards/tartan/keymaps/default/keymap.c +++ b/keyboards/dm9records/tartan/keymaps/default/keymap.c | |||
diff --git a/keyboards/tartan/keymaps/default/readme.md b/keyboards/dm9records/tartan/keymaps/default/readme.md index c829d5310..c829d5310 100644 --- a/keyboards/tartan/keymaps/default/readme.md +++ b/keyboards/dm9records/tartan/keymaps/default/readme.md | |||
diff --git a/keyboards/tartan/readme.md b/keyboards/dm9records/tartan/readme.md index 83a3aebae..b8439ed22 100644 --- a/keyboards/tartan/readme.md +++ b/keyboards/dm9records/tartan/readme.md | |||
@@ -10,12 +10,12 @@ A 60% keyboard with only through hole components. | |||
10 | 10 | ||
11 | Make example for this keyboard (after setting up your build environment): | 11 | Make example for this keyboard (after setting up your build environment): |
12 | 12 | ||
13 | make tartan:default | 13 | make dm9records/tartan:default |
14 | 14 | ||
15 | Flash firmware: | 15 | Flash firmware: |
16 | 16 | ||
17 | // In bootloader mode | 17 | // In bootloader mode |
18 | make tartan:default:flash | 18 | make dm9records/tartan:default:flash |
19 | 19 | ||
20 | ## Bootloader | 20 | ## Bootloader |
21 | use usbasploader in my repository. | 21 | use usbasploader in my repository. |
diff --git a/keyboards/tartan/rules.mk b/keyboards/dm9records/tartan/rules.mk index 811300191..811300191 100644 --- a/keyboards/tartan/rules.mk +++ b/keyboards/dm9records/tartan/rules.mk | |||
diff --git a/keyboards/tartan/tartan.c b/keyboards/dm9records/tartan/tartan.c index b702633cc..b702633cc 100644 --- a/keyboards/tartan/tartan.c +++ b/keyboards/dm9records/tartan/tartan.c | |||
diff --git a/keyboards/tartan/tartan.h b/keyboards/dm9records/tartan/tartan.h index e99008889..e99008889 100644 --- a/keyboards/tartan/tartan.h +++ b/keyboards/dm9records/tartan/tartan.h | |||
diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 7f7f20ed3..078131da7 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk | |||
@@ -23,7 +23,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration | |||
23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
25 | MIDI_ENABLE = yes # MIDI controls | 25 | MIDI_ENABLE = yes # MIDI controls |
26 | AUDIO_ENABLE = yes # Audio output on port C6 | 26 | AUDIO_ENABLE = no # Audio output |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
diff --git a/keyboards/ergodox_stm32/keymaps/default/keymap.c b/keyboards/ergodox_stm32/keymaps/default/keymap.c index dcf8d15b7..04a12962e 100644 --- a/keyboards/ergodox_stm32/keymaps/default/keymap.c +++ b/keyboards/ergodox_stm32/keymaps/default/keymap.c | |||
@@ -9,10 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
9 | 9 | ||
10 | }; | 10 | }; |
11 | 11 | ||
12 | const uint16_t PROGMEM fn_actions[] = { | ||
13 | [1] = TT(1) | ||
14 | }; | ||
15 | |||
16 | layer_state_t layer_state_set_user(layer_state_t state) { | 12 | layer_state_t layer_state_set_user(layer_state_t state) { |
17 | 13 | ||
18 | uint8_t layer = get_highest_layer(state); | 14 | uint8_t layer = get_highest_layer(state); |
diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c index 691d4aa94..b9a2c140d 100644 --- a/keyboards/ergotravel/keymaps/ckofy/keymap.c +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c | |||
@@ -18,17 +18,6 @@ enum custom_keycodes { | |||
18 | ADJUST, | 18 | ADJUST, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | /* Fn keys */ | ||
22 | |||
23 | enum { | ||
24 | |||
25 | F_SFT = 0, | ||
26 | F_ALT, | ||
27 | F_CTRL, | ||
28 | F_NUMPAD | ||
29 | // F_LOWER, | ||
30 | // F_RAISE, | ||
31 | }; | ||
32 | 21 | ||
33 | #define KC_ KC_TRNS | 22 | #define KC_ KC_TRNS |
34 | #define KC_XXXX KC_NO | 23 | #define KC_XXXX KC_NO |
@@ -57,8 +46,8 @@ enum { | |||
57 | #define KC_UDO LCTL(KC_Z) | 46 | #define KC_UDO LCTL(KC_Z) |
58 | #define KC_CUT LCTL(KC_X) | 47 | #define KC_CUT LCTL(KC_X) |
59 | #define KC_SVE LCTL(KC_S) | 48 | #define KC_SVE LCTL(KC_S) |
60 | #define KC_OSH F(F_SFT) | 49 | #define KC_OSH OSM(MOD_LSFT) |
61 | #define KC_OCTL F(F_CTRL) | 50 | #define KC_OCTL OSM(MOD_LCTL) |
62 | #define KC_NUMP TT(_NUMPAD) | 51 | #define KC_NUMP TT(_NUMPAD) |
63 | #define KC_SHESC MT(MOD_LSFT,KC_ESC) | 52 | #define KC_SHESC MT(MOD_LSFT,KC_ESC) |
64 | #define KC_SHENT MT(MOD_RSFT,KC_ENT) | 53 | #define KC_SHENT MT(MOD_RSFT,KC_ENT) |
@@ -142,14 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
142 | 131 | ||
143 | }; | 132 | }; |
144 | 133 | ||
145 | const uint16_t PROGMEM fn_actions[] = { | ||
146 | [F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) | ||
147 | ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) | ||
148 | ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) | ||
149 | }; | ||
150 | |||
151 | |||
152 | |||
153 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 134 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
154 | switch (keycode) { | 135 | switch (keycode) { |
155 | case COLEMAK: | 136 | case COLEMAK: |
diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index d7d8316c6..770fe723b 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c | |||
@@ -65,9 +65,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
65 | */ | 65 | */ |
66 | [_FL] = LAYOUT( | 66 | [_FL] = LAYOUT( |
67 | KC_GRAVE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_DELETE, \ | 67 | KC_GRAVE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_F12,KC_DELETE, \ |
68 | KC_TRNS,F(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ | 68 | KC_TRNS,TG(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ |
69 | KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ | 69 | KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ |
70 | KC_TRNS,KC_TRNS,F(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ | 70 | KC_TRNS,KC_TRNS,TG(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ |
71 | KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), | 71 | KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), |
72 | 72 | ||
73 | /* | 73 | /* |
@@ -106,8 +106,6 @@ enum function_id { | |||
106 | }; | 106 | }; |
107 | 107 | ||
108 | const uint16_t PROGMEM fn_actions[] = { | 108 | const uint16_t PROGMEM fn_actions[] = { |
109 | [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay | ||
110 | [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay | ||
111 | [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow | 109 | [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow |
112 | [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode | 110 | [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode |
113 | [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), | 111 | [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), |
diff --git a/keyboards/gh60/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c index 98fcd9b98..a70c409fe 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/keymap.c +++ b/keyboards/gh60/satan/keymaps/denolfe/keymap.c | |||
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_END, KC_MPRV, KC_MNXT, KC_MPLY, \ | 62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_END, KC_MPRV, KC_MNXT, KC_MPLY, \ |
63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \ | 63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \ |
64 | KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_HOME, LCTL(KC_LEFT), LCTL(KC_END), LCTL(KC_RIGHT), KC_TRNS, RESET, \ | 64 | KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_HOME, LCTL(KC_LEFT), LCTL(KC_END), LCTL(KC_RIGHT), KC_TRNS, RESET, \ |
65 | KC_TRNS, KC_TRNS, F(9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 65 | KC_TRNS, KC_TRNS, LM(2, MOD_LSFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | [_SL] = LAYOUT_60_ansi( | 68 | [_SL] = LAYOUT_60_ansi( |
@@ -99,7 +99,6 @@ const uint16_t PROGMEM fn_actions[] = { | |||
99 | [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), | 99 | [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), |
100 | [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), | 100 | [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), |
101 | #endif | 101 | #endif |
102 | [9] = ACTION_LAYER_MODS(2, MOD_LSFT) | ||
103 | }; | 102 | }; |
104 | 103 | ||
105 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | 104 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { |
diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c index 602bdd157..94d9289cd 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c | |||
@@ -29,7 +29,6 @@ TRAN | |||
29 | #define TT_SYM MO(_SYM) | 29 | #define TT_SYM MO(_SYM) |
30 | #define TT_MOV LT(_MOV,KC_BSPC) | 30 | #define TT_MOV LT(_MOV,KC_BSPC) |
31 | #define TT_NUM MO(_NUM) | 31 | #define TT_NUM MO(_NUM) |
32 | #define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) | ||
33 | 32 | ||
34 | enum macro_keycodes { | 33 | enum macro_keycodes { |
35 | DHPASTE=1, | 34 | DHPASTE=1, |
diff --git a/keyboards/hhkb/ansi/ansi.c b/keyboards/hhkb/ansi/ansi.c new file mode 100644 index 000000000..cefc4e069 --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.c | |||
@@ -0,0 +1 @@ | |||
#include "ansi.h" \ No newline at end of file | |||
diff --git a/keyboards/hhkb/ansi/ansi.h b/keyboards/hhkb/ansi/ansi.h new file mode 100644 index 000000000..28e8d2fef --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | #define LAYOUT( \ | ||
6 | K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ | ||
7 | K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ | ||
8 | K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ | ||
9 | K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ | ||
10 | K35, K36, K37, K57, K56) \ | ||
11 | \ | ||
12 | { \ | ||
13 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
14 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
15 | { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ | ||
16 | { K30, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
17 | { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ | ||
18 | { K50, K51, K52, K53, K54, K55, K56, K57 }, \ | ||
19 | { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ | ||
20 | { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ | ||
21 | } | ||
22 | |||
23 | #define LAYOUT_60_hhkb LAYOUT | ||
diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/ansi/config.h index fc747a6e9..689fd5568 100644 --- a/keyboards/hhkb/config.h +++ b/keyboards/hhkb/ansi/config.h | |||
@@ -15,25 +15,20 @@ You should have received a copy of the GNU General Public License | |||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef CONFIG_H | 18 | #pragma once |
19 | #define CONFIG_H | ||
20 | 19 | ||
21 | #include "config_common.h" | 20 | #include "config_common.h" |
22 | 21 | ||
23 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xFEED | 23 | #define VENDOR_ID 0x4848 // HH = happy hacking |
25 | #define PRODUCT_ID 0xCAFE | 24 | #define PRODUCT_ID 0x0001 // ANSI HHKB |
26 | #define DEVICE_VER 0x0104 | 25 | #define DEVICE_VER 0x0104 |
27 | #define MANUFACTURER q.m.k | 26 | #define MANUFACTURER q.m.k |
28 | #define PRODUCT HHKB mod | 27 | #define PRODUCT HHKB mod |
29 | #define DESCRIPTION q.m.k keyboard firmware for HHKB | 28 | #define DESCRIPTION q.m.k keyboard firmware for HHKB |
30 | 29 | ||
31 | /* key matrix size */ | 30 | /* key matrix size */ |
32 | #ifdef HHKB_JP | 31 | #define MATRIX_ROWS 8 |
33 | # define MATRIX_ROWS 16 | ||
34 | #else | ||
35 | # define MATRIX_ROWS 8 | ||
36 | #endif | ||
37 | #define MATRIX_COLS 8 | 32 | #define MATRIX_COLS 8 |
38 | 33 | ||
39 | #define TAPPING_TERM 200 | 34 | #define TAPPING_TERM 200 |
@@ -107,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
107 | //#define NO_ACTION_ONESHOT | 102 | //#define NO_ACTION_ONESHOT |
108 | //#define NO_ACTION_MACRO | 103 | //#define NO_ACTION_MACRO |
109 | //#define NO_ACTION_FUNCTION | 104 | //#define NO_ACTION_FUNCTION |
110 | |||
111 | #endif | ||
diff --git a/keyboards/hhkb/ansi/hhkb_avr.h b/keyboards/hhkb/ansi/hhkb_avr.h new file mode 100644 index 000000000..f9446deef --- /dev/null +++ b/keyboards/hhkb/ansi/hhkb_avr.h | |||
@@ -0,0 +1,157 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <stdint.h> | ||
4 | #include <stdbool.h> | ||
5 | #include <avr/io.h> | ||
6 | #include <avr/interrupt.h> | ||
7 | #include <util/delay.h> | ||
8 | |||
9 | |||
10 | // Timer resolution check | ||
11 | #if (1000000/TIMER_RAW_FREQ > 20) | ||
12 | # error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." | ||
13 | #endif | ||
14 | |||
15 | |||
16 | /* | ||
17 | * HHKB Matrix I/O | ||
18 | * | ||
19 | * row: HC4051[A,B,C] selects scan row0-7 | ||
20 | * row-ext: [En0,En1] row extention for JP | ||
21 | * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) | ||
22 | * key: on: 0/off: 1 | ||
23 | * prev: hysteresis control: assert(1) when previous key state is on | ||
24 | */ | ||
25 | |||
26 | |||
27 | #if defined(__AVR_ATmega32U4__) | ||
28 | /* | ||
29 | * For TMK HHKB alt controller(ATMega32U4) | ||
30 | * | ||
31 | * row: PB0-2 | ||
32 | * col: PB3-5,6 | ||
33 | * key: PD7(pull-uped) | ||
34 | * prev: PB7 | ||
35 | * power: PD4(L:off/H:on) | ||
36 | * row-ext: PC6,7 for HHKB JP(active low) | ||
37 | */ | ||
38 | static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } | ||
39 | static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } | ||
40 | static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } | ||
41 | static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } | ||
42 | static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } | ||
43 | #ifdef HHKB_POWER_SAVING | ||
44 | static inline void KEY_POWER_ON(void) { | ||
45 | DDRB = 0xFF; PORTB = 0x40; // change pins output | ||
46 | DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on | ||
47 | /* Without this wait you will miss or get false key events. */ | ||
48 | _delay_ms(5); // wait for powering up | ||
49 | } | ||
50 | static inline void KEY_POWER_OFF(void) { | ||
51 | /* input with pull-up consumes less than without it when pin is open. */ | ||
52 | DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up | ||
53 | DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off | ||
54 | } | ||
55 | static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } | ||
56 | #else | ||
57 | static inline void KEY_POWER_ON(void) {} | ||
58 | static inline void KEY_POWER_OFF(void) {} | ||
59 | static inline bool KEY_POWER_STATE(void) { return true; } | ||
60 | #endif | ||
61 | static inline void KEY_INIT(void) | ||
62 | { | ||
63 | /* row,col,prev: output */ | ||
64 | DDRB = 0xFF; | ||
65 | PORTB = 0x40; // unable | ||
66 | /* key: input with pull-up */ | ||
67 | DDRD &= ~0x80; | ||
68 | PORTD |= 0x80; | ||
69 | |||
70 | KEY_UNABLE(); | ||
71 | KEY_PREV_OFF(); | ||
72 | |||
73 | KEY_POWER_OFF(); | ||
74 | } | ||
75 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | ||
76 | { | ||
77 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); | ||
78 | |||
79 | } | ||
80 | |||
81 | |||
82 | #elif defined(__AVR_AT90USB1286__) | ||
83 | /* | ||
84 | * For Teensy++(AT90USB1286) | ||
85 | * | ||
86 | * HHKB pro HHKB pro2 | ||
87 | * row: PB0-2 (6-8) (5-7) | ||
88 | * col: PB3-5,6 (9-12) (8-11) | ||
89 | * key: PE6(pull-uped) (4) (3) | ||
90 | * prev: PE7 (5) (4) | ||
91 | * | ||
92 | * TODO: convert into 'staitc inline' function | ||
93 | */ | ||
94 | #define KEY_INIT() do { \ | ||
95 | DDRB |= 0x7F; \ | ||
96 | DDRE |= (1<<7); \ | ||
97 | DDRE &= ~(1<<6); \ | ||
98 | PORTE |= (1<<6); \ | ||
99 | } while (0) | ||
100 | #define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ | ||
101 | (((COL) & 0x07)<<3) | \ | ||
102 | ((ROW) & 0x07)) | ||
103 | #define KEY_ENABLE() (PORTB &= ~(1<<6)) | ||
104 | #define KEY_UNABLE() (PORTB |= (1<<6)) | ||
105 | #define KEY_STATE() (PINE & (1<<6)) | ||
106 | #define KEY_PREV_ON() (PORTE |= (1<<7)) | ||
107 | #define KEY_PREV_OFF() (PORTE &= ~(1<<7)) | ||
108 | #define KEY_POWER_ON() | ||
109 | #define KEY_POWER_OFF() | ||
110 | #define KEY_POWER_STATE() true | ||
111 | |||
112 | |||
113 | #else | ||
114 | # error "define code for matrix scan" | ||
115 | #endif | ||
116 | |||
117 | |||
118 | #if 0 | ||
119 | // For ATMega328P with V-USB | ||
120 | // | ||
121 | // #elif defined(__AVR_ATmega328P__) | ||
122 | // Ports for V-USB | ||
123 | // key: PB0(pull-uped) | ||
124 | // prev: PB1 | ||
125 | // row: PB2-4 | ||
126 | // col: PC0-2,3 | ||
127 | // power: PB5(Low:on/Hi-z:off) | ||
128 | #define KEY_INIT() do { \ | ||
129 | DDRB |= 0x3E; \ | ||
130 | DDRB &= ~(1<<0); \ | ||
131 | PORTB |= 1<<0; \ | ||
132 | DDRC |= 0x0F; \ | ||
133 | KEY_UNABLE(); \ | ||
134 | KEY_PREV_OFF(); \ | ||
135 | } while (0) | ||
136 | #define KEY_SELECT(ROW, COL) do { \ | ||
137 | PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ | ||
138 | PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ | ||
139 | } while (0) | ||
140 | #define KEY_ENABLE() (PORTC &= ~(1<<3)) | ||
141 | #define KEY_UNABLE() (PORTC |= (1<<3)) | ||
142 | #define KEY_STATE() (PINB & (1<<0)) | ||
143 | #define KEY_PREV_ON() (PORTB |= (1<<1)) | ||
144 | #define KEY_PREV_OFF() (PORTB &= ~(1<<1)) | ||
145 | // Power supply switching | ||
146 | #define KEY_POWER_ON() do { \ | ||
147 | KEY_INIT(); \ | ||
148 | PORTB &= ~(1<<5); \ | ||
149 | _delay_ms(1); \ | ||
150 | } while (0) | ||
151 | #define KEY_POWER_OFF() do { \ | ||
152 | DDRB &= ~0x3F; \ | ||
153 | PORTB &= ~0x3F; \ | ||
154 | DDRC &= ~0x0F; \ | ||
155 | PORTC &= ~0x0F; \ | ||
156 | } while (0) | ||
157 | #endif | ||
diff --git a/keyboards/hhkb/ansi/info.json b/keyboards/hhkb/ansi/info.json new file mode 100644 index 000000000..a36f1d44c --- /dev/null +++ b/keyboards/hhkb/ansi/info.json | |||
@@ -0,0 +1,73 @@ | |||
1 | { | ||
2 | "keyboard_name": "HHKB", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "width": 15, | ||
6 | "height": 5, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | { "label": "Esc", "x": 0, "y": 0 }, | ||
11 | { "label": "!", "x": 1, "y": 0 }, | ||
12 | { "label": "@", "x": 2, "y": 0 }, | ||
13 | { "label": "#", "x": 3, "y": 0 }, | ||
14 | { "label": "$", "x": 4, "y": 0 }, | ||
15 | { "label": "%", "x": 5, "y": 0 }, | ||
16 | { "label": "^", "x": 6, "y": 0 }, | ||
17 | { "label": "&", "x": 7, "y": 0 }, | ||
18 | { "label": "*", "x": 8, "y": 0 }, | ||
19 | { "label": "(", "x": 9, "y": 0 }, | ||
20 | { "label": ")", "x": 10, "y": 0 }, | ||
21 | { "label": "_", "x": 11, "y": 0 }, | ||
22 | { "label": "+", "x": 12, "y": 0 }, | ||
23 | { "label": "|", "x": 13, "y": 0 }, | ||
24 | { "label": "~", "x": 14, "y": 0 }, | ||
25 | { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, | ||
26 | { "label": "Q", "x": 1.5, "y": 1 }, | ||
27 | { "label": "W", "x": 2.5, "y": 1 }, | ||
28 | { "label": "E", "x": 3.5, "y": 1 }, | ||
29 | { "label": "R", "x": 4.5, "y": 1 }, | ||
30 | { "label": "T", "x": 5.5, "y": 1 }, | ||
31 | { "label": "Y", "x": 6.5, "y": 1 }, | ||
32 | { "label": "U", "x": 7.5, "y": 1 }, | ||
33 | { "label": "I", "x": 8.5, "y": 1 }, | ||
34 | { "label": "O", "x": 9.5, "y": 1 }, | ||
35 | { "label": "P", "x": 10.5, "y": 1 }, | ||
36 | { "label": "{", "x": 11.5, "y": 1 }, | ||
37 | { "label": "}", "x": 12.5, "y": 1 }, | ||
38 | { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, | ||
39 | { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, | ||
40 | { "label": "A", "x": 1.75, "y": 2 }, | ||
41 | { "label": "S", "x": 2.75, "y": 2 }, | ||
42 | { "label": "D", "x": 3.75, "y": 2 }, | ||
43 | { "label": "F", "x": 4.75, "y": 2 }, | ||
44 | { "label": "G", "x": 5.75, "y": 2 }, | ||
45 | { "label": "H", "x": 6.75, "y": 2 }, | ||
46 | { "label": "J", "x": 7.75, "y": 2 }, | ||
47 | { "label": "K", "x": 8.75, "y": 2 }, | ||
48 | { "label": "L", "x": 9.75, "y": 2 }, | ||
49 | { "label": ":", "x": 10.75, "y": 2 }, | ||
50 | { "label": "\"", "x": 11.75, "y": 2 }, | ||
51 | { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, | ||
52 | { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, | ||
53 | { "label": "Z", "x": 2.25, "y": 3 }, | ||
54 | { "label": "X", "x": 3.25, "y": 3 }, | ||
55 | { "label": "C", "x": 4.25, "y": 3 }, | ||
56 | { "label": "V", "x": 5.25, "y": 3 }, | ||
57 | { "label": "B", "x": 6.25, "y": 3 }, | ||
58 | { "label": "N", "x": 7.25, "y": 3 }, | ||
59 | { "label": "M", "x": 8.25, "y": 3 }, | ||
60 | { "label": "<", "x": 9.25, "y": 3 }, | ||
61 | { "label": ">", "x": 10.25, "y": 3 }, | ||
62 | { "label": "?", "x": 11.25, "y": 3 }, | ||
63 | { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, | ||
64 | { "label": "Fn", "x": 14, "y": 3 }, | ||
65 | { "label": "", "x": 1.5, "y": 4 }, | ||
66 | { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, | ||
67 | { "x": 4, "y": 4, "w": 6 }, | ||
68 | { "label": "", "x": 10, "y": 4, "w": 1.5 }, | ||
69 | { "label": "", "x": 11.5, "y": 4 } | ||
70 | ] | ||
71 | } | ||
72 | } | ||
73 | } | ||
diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md index 4dff47a6e..4dff47a6e 100644 --- a/keyboards/hhkb/keymaps/blakedietz/README.md +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h index e0d2bce0f..e0d2bce0f 100644 --- a/keyboards/hhkb/keymaps/blakedietz/config.h +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c index a9146a4a0..a9146a4a0 100644 --- a/keyboards/hhkb/keymaps/blakedietz/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/blakedietz/rules.mk b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk index 7d97e7a52..7d97e7a52 100644 --- a/keyboards/hhkb/keymaps/blakedietz/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h index b9a61e10a..b9a61e10a 100644 --- a/keyboards/hhkb/keymaps/brett/config.h +++ b/keyboards/hhkb/ansi/keymaps/brett/config.h | |||
diff --git a/keyboards/hhkb/keymaps/brett/keymap.c b/keyboards/hhkb/ansi/keymaps/brett/keymap.c index 1201146b0..1201146b0 100644 --- a/keyboards/hhkb/keymaps/brett/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/brett/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/brett/readme.md b/keyboards/hhkb/ansi/keymaps/brett/readme.md index fd07b155f..fd07b155f 100644 --- a/keyboards/hhkb/keymaps/brett/readme.md +++ b/keyboards/hhkb/ansi/keymaps/brett/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/brett/rules.mk b/keyboards/hhkb/ansi/keymaps/brett/rules.mk index 88f57515f..88f57515f 100644 --- a/keyboards/hhkb/keymaps/brett/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/brett/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/README.md b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md index c1c48e609..c1c48e609 100644 --- a/keyboards/hhkb/keymaps/cinaeco/README.md +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h index c7b4c784c..c7b4c784c 100644 --- a/keyboards/hhkb/keymaps/cinaeco/config.h +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c index c27e37d8a..c27e37d8a 100644 --- a/keyboards/hhkb/keymaps/cinaeco/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk index a85669aa2..a85669aa2 100644 --- a/keyboards/hhkb/keymaps/cinaeco/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c index e230a87fb..e230a87fb 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md index 3b8950fee..3b8950fee 100644 --- a/keyboards/hhkb/keymaps/dbroqua/readme.md +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/ansi/keymaps/default/keymap.c index c63ef6a57..c63ef6a57 100644 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/default/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/ansi/keymaps/eric/keymap.c index bf788b2ff..bf788b2ff 100644 --- a/keyboards/hhkb/keymaps/eric/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/eric/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/config.h b/keyboards/hhkb/ansi/keymaps/krusli/config.h index af2fb9d8a..af2fb9d8a 100644 --- a/keyboards/hhkb/keymaps/dhertz/config.h +++ b/keyboards/hhkb/ansi/keymaps/krusli/config.h | |||
diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c index af6102f10..af6102f10 100644 --- a/keyboards/hhkb/keymaps/krusli/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/lxol/keymap.c b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c index 3e3b3d2ed..462a98047 100644 --- a/keyboards/hhkb/keymaps/lxol/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c | |||
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
33 | 33 | ||
34 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | 34 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, |
35 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | 35 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, |
36 | KC_LCTL, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, KC_FN0, | 36 | KC_LCTL, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, KC_ENT), |
37 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), | 37 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), |
38 | KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), | 38 | KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), |
39 | 39 | ||
@@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
80 | 80 | ||
81 | RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), | 81 | RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), |
82 | RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), | 82 | RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), |
83 | RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), KC_FN0, | 83 | RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), |
84 | RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, | 84 | RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, |
85 | KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), | 85 | KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), |
86 | 86 | ||
@@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
104 | 104 | ||
105 | LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), | 105 | LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), |
106 | LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), | 106 | LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), |
107 | LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), KC_FN0, | 107 | LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), |
108 | KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, | 108 | KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, |
109 | KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), | 109 | KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), |
110 | 110 | ||
@@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
128 | 128 | ||
129 | RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), | 129 | RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), |
130 | RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), | 130 | RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), |
131 | RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), KC_FN0, | 131 | RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), |
132 | RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, | 132 | RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, |
133 | KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), | 133 | KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), |
134 | 134 | ||
@@ -152,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
152 | 152 | ||
153 | LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), | 153 | LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), |
154 | LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), | 154 | LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), |
155 | LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), KC_FN0, | 155 | LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), |
156 | KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, | 156 | KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, |
157 | KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), | 157 | KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), |
158 | 158 | ||
@@ -176,14 +176,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
176 | 176 | ||
177 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | 177 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, |
178 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | 178 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, |
179 | KC_LCTL, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, KC_FN0, | 179 | KC_LCTL, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, KC_ENT), |
180 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), | 180 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), |
181 | KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; | 181 | KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; |
182 | 182 | ||
183 | const uint16_t PROGMEM fn_actions[] = { | ||
184 | [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* | ||
185 | }; | ||
186 | |||
187 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 183 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
188 | { | 184 | { |
189 | // MACRODOWN only works in this function | 185 | // MACRODOWN only works in this function |
diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h index 3b8f2e676..3b8f2e676 100644 --- a/keyboards/hhkb/keymaps/mjt/config.h +++ b/keyboards/hhkb/ansi/keymaps/mjt/config.h | |||
diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c index e51eb8bf9..b62676edd 100644 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c | |||
@@ -17,7 +17,6 @@ enum hhkb_keycodes | |||
17 | DYNAMIC_MACRO_RANGE, | 17 | DYNAMIC_MACRO_RANGE, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | #include "dynamic_macro.h" | ||
21 | 20 | ||
22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
23 | 22 | ||
@@ -104,7 +103,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
104 | bool process_record_user(uint16_t keycode, keyrecord_t *record) | 103 | bool process_record_user(uint16_t keycode, keyrecord_t *record) |
105 | { | 104 | { |
106 | uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); | 105 | uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); |
107 | if (!process_record_dynamic_macro(macro_kc, record)) | 106 | if (!process_dynamic_macro(macro_kc, record)) |
108 | { | 107 | { |
109 | return false; | 108 | return false; |
110 | } | 109 | } |
diff --git a/keyboards/hhkb/keymaps/mjt/readme.md b/keyboards/hhkb/ansi/keymaps/mjt/readme.md index ff575ce24..ff575ce24 100644 --- a/keyboards/hhkb/keymaps/mjt/readme.md +++ b/keyboards/hhkb/ansi/keymaps/mjt/readme.md | |||
diff --git a/keyboards/hhkb/ansi/keymaps/mjt/rules.mk b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk new file mode 100644 index 000000000..9e6797ed3 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk | |||
@@ -0,0 +1 @@ | |||
DYNAMIC_MACRO_ENABLE = yes | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/README.md b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md index 15b87c498..15b87c498 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/README.md +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/config.h b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h index b3c799bb8..b3c799bb8 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/config.h +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c index ea6da450c..ea6da450c 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk index 35591533c..35591533c 100644 --- a/keyboards/hhkb/keymaps/schaeferdev/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c index a15f5e5e0..a15f5e5e0 100644 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c | |||
diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h index 681252440..681252440 100644 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h index 08cc1fb46..08cc1fb46 100644 --- a/keyboards/hhkb/keymaps/shela/config.h +++ b/keyboards/hhkb/ansi/keymaps/shela/config.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c index 2d5f4c64a..3971e8f94 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c | |||
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, | 56 | KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, |
57 | KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, | 57 | KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, |
58 | KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), | 58 | KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), |
59 | KC_LGUI, KC_FN3, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI), | 59 | KC_LGUI, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI), |
60 | 60 | ||
61 | /* Layer 2: Dvorak Layer | 61 | /* Layer 2: Dvorak Layer |
62 | * ,-----------------------------------------------------------------------------------------. | 62 | * ,-----------------------------------------------------------------------------------------. |
@@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
133 | */ | 133 | */ |
134 | [HHKB] = | 134 | [HHKB] = |
135 | LAYOUT(KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | 135 | LAYOUT(KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
136 | KC_CAPS, KC_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, | 136 | KC_CAPS, DF(BASE), DF(PSEUDO_US), DF(MOUSE), DF(TENKEY), DF(DVORAK), KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, |
137 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, | 137 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, |
138 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, | 138 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, |
139 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 139 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
@@ -183,11 +183,4 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
183 | */ | 183 | */ |
184 | const uint16_t PROGMEM fn_actions[] = { | 184 | const uint16_t PROGMEM fn_actions[] = { |
185 | [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), | 185 | [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), |
186 | [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), | ||
187 | [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA), | ||
188 | [5] = ACTION_DEFAULT_LAYER_SET(BASE), | ||
189 | [6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US), | ||
190 | [7] = ACTION_DEFAULT_LAYER_SET(MOUSE), | ||
191 | [8] = ACTION_DEFAULT_LAYER_SET(TENKEY), | ||
192 | [9] = ACTION_DEFAULT_LAYER_SET(DVORAK), | ||
193 | }; | 186 | }; |
diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h index edc1e6d86..edc1e6d86 100644 --- a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h | |||
diff --git a/keyboards/hhkb/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md index 5a06a8363..5a06a8363 100644 --- a/keyboards/hhkb/keymaps/shela/readme.md +++ b/keyboards/hhkb/ansi/keymaps/shela/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk index d0586bda6..d0586bda6 100644 --- a/keyboards/hhkb/keymaps/shela/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/shela/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/ansi/keymaps/smt/keymap.c index e1d8bae2e..e1d8bae2e 100644 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/smt/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c index 68e23b45d..68e23b45d 100644 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md index 0da9d96ee..0da9d96ee 100644 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md | |||
diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore index 4b8c99bfb..4b8c99bfb 100644 --- a/keyboards/hhkb/keymaps/tominabox1/.gitignore +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore | |||
diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c index d7aea9773..d7aea9773 100644 --- a/keyboards/hhkb/keymaps/tominabox1/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c | |||
diff --git a/keyboards/hhkb/ansi/keymaps/via/keymap.c b/keyboards/hhkb/ansi/keymaps/via/keymap.c new file mode 100644 index 000000000..bdbd32898 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/keymap.c | |||
@@ -0,0 +1,68 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
5 | |||
6 | /* BASE Level: Default Layer | ||
7 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
8 | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | | ||
9 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
10 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | | ||
11 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
12 | | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | | ||
13 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
14 | | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | | ||
15 | |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| | ||
16 | |||
17 | |------+------+-----------------------+------+------| | ||
18 | | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | | ||
19 | |------+------+-----------------------+------+------| | ||
20 | */ | ||
21 | |||
22 | [0] = LAYOUT( // default layer | ||
23 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, | ||
24 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | ||
25 | 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_ENT, | ||
26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
27 | KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT | ||
28 | ), | ||
29 | |||
30 | /* Layer HHKB: HHKB mode (HHKB Fn) | ||
31 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
32 | | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | | ||
33 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
34 | | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | | ||
35 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
36 | | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | | ||
37 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
38 | | | | | | | | + | - | End | PgD | Dow | | | | | | ||
39 | |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| | ||
40 | |||
41 | |------+------+----------------------+------+------+ | ||
42 | | **** | **** | ******************** | **** | **** | | ||
43 | |------+------+----------------------+------+------+ | ||
44 | |||
45 | */ | ||
46 | |||
47 | [1] = LAYOUT( | ||
48 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | ||
49 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, | ||
50 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, | ||
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, | ||
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
53 | ), | ||
54 | [2] = LAYOUT( | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
60 | ), | ||
61 | [3] = LAYOUT( | ||
62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
64 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
65 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
66 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
67 | ) | ||
68 | }; | ||
diff --git a/keyboards/hhkb/ansi/keymaps/via/rules.mk b/keyboards/hhkb/ansi/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c index eebaede97..eebaede97 100644 --- a/keyboards/hhkb/keymaps/xyverz/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c | |||
diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c new file mode 100644 index 000000000..f22e69f6b --- /dev/null +++ b/keyboards/hhkb/ansi/matrix.c | |||
@@ -0,0 +1,211 @@ | |||
1 | /* | ||
2 | Copyright 2011 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * scan matrix | ||
20 | */ | ||
21 | #include <stdint.h> | ||
22 | #include <stdbool.h> | ||
23 | #include <util/delay.h> | ||
24 | #include "print.h" | ||
25 | #include "debug.h" | ||
26 | #include "util.h" | ||
27 | #include "timer.h" | ||
28 | #include "matrix.h" | ||
29 | #include "hhkb_avr.h" | ||
30 | #include <avr/wdt.h> | ||
31 | #include "suspend.h" | ||
32 | #include "lufa.h" | ||
33 | |||
34 | |||
35 | // matrix power saving | ||
36 | #define MATRIX_POWER_SAVE 10000 | ||
37 | static uint32_t matrix_last_modified = 0; | ||
38 | |||
39 | // matrix state buffer(1:on, 0:off) | ||
40 | static matrix_row_t *matrix; | ||
41 | static matrix_row_t *matrix_prev; | ||
42 | static matrix_row_t _matrix0[MATRIX_ROWS]; | ||
43 | static matrix_row_t _matrix1[MATRIX_ROWS]; | ||
44 | |||
45 | |||
46 | inline | ||
47 | uint8_t matrix_rows(void) | ||
48 | { | ||
49 | return MATRIX_ROWS; | ||
50 | } | ||
51 | |||
52 | inline | ||
53 | uint8_t matrix_cols(void) | ||
54 | { | ||
55 | return MATRIX_COLS; | ||
56 | } | ||
57 | |||
58 | void matrix_init(void) | ||
59 | { | ||
60 | #ifdef DEBUG | ||
61 | debug_enable = true; | ||
62 | debug_keyboard = true; | ||
63 | #endif | ||
64 | |||
65 | KEY_INIT(); | ||
66 | |||
67 | // initialize matrix state: all keys off | ||
68 | for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; | ||
69 | for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; | ||
70 | matrix = _matrix0; | ||
71 | matrix_prev = _matrix1; | ||
72 | } | ||
73 | |||
74 | __attribute__ ((weak)) | ||
75 | void matrix_scan_user(void) { | ||
76 | } | ||
77 | |||
78 | void matrix_scan_kb(void) { | ||
79 | matrix_scan_user(); | ||
80 | } | ||
81 | |||
82 | uint8_t matrix_scan(void) | ||
83 | { | ||
84 | uint8_t *tmp; | ||
85 | |||
86 | tmp = matrix_prev; | ||
87 | matrix_prev = matrix; | ||
88 | matrix = tmp; | ||
89 | |||
90 | // power on | ||
91 | if (!KEY_POWER_STATE()) KEY_POWER_ON(); | ||
92 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
93 | for (uint8_t col = 0; col < MATRIX_COLS; col++) { | ||
94 | KEY_SELECT(row, col); | ||
95 | _delay_us(5); | ||
96 | |||
97 | // Not sure this is needed. This just emulates HHKB controller's behaviour. | ||
98 | if (matrix_prev[row] & (1<<col)) { | ||
99 | KEY_PREV_ON(); | ||
100 | } | ||
101 | _delay_us(10); | ||
102 | |||
103 | // NOTE: KEY_STATE is valid only in 20us after KEY_ENABLE. | ||
104 | // If V-USB interrupts in this section we could lose 40us or so | ||
105 | // and would read invalid value from KEY_STATE. | ||
106 | uint8_t last = TIMER_RAW; | ||
107 | |||
108 | KEY_ENABLE(); | ||
109 | |||
110 | // Wait for KEY_STATE outputs its value. | ||
111 | // 1us was ok on one HHKB, but not worked on another. | ||
112 | // no wait doesn't work on Teensy++ with pro(1us works) | ||
113 | // no wait does work on tmk PCB(8MHz) with pro2 | ||
114 | // 1us wait does work on both of above | ||
115 | // 1us wait doesn't work on tmk(16MHz) | ||
116 | // 5us wait does work on tmk(16MHz) | ||
117 | // 5us wait does work on tmk(16MHz/2) | ||
118 | // 5us wait does work on tmk(8MHz) | ||
119 | // 10us wait does work on Teensy++ with pro | ||
120 | // 10us wait does work on 328p+iwrap with pro | ||
121 | // 10us wait doesn't work on tmk PCB(8MHz) with pro2(very lagged scan) | ||
122 | _delay_us(5); | ||
123 | |||
124 | if (KEY_STATE()) { | ||
125 | matrix[row] &= ~(1<<col); | ||
126 | } else { | ||
127 | matrix[row] |= (1<<col); | ||
128 | } | ||
129 | |||
130 | // Ignore if this code region execution time elapses more than 20us. | ||
131 | // MEMO: 20[us] * (TIMER_RAW_FREQ / 1000000)[count per us] | ||
132 | // MEMO: then change above using this rule: a/(b/c) = a*1/(b/c) = a*(c/b) | ||
133 | if (TIMER_DIFF_RAW(TIMER_RAW, last) > 20/(1000000/TIMER_RAW_FREQ)) { | ||
134 | matrix[row] = matrix_prev[row]; | ||
135 | } | ||
136 | |||
137 | _delay_us(5); | ||
138 | KEY_PREV_OFF(); | ||
139 | KEY_UNABLE(); | ||
140 | |||
141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. | ||
142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. | ||
143 | |||
144 | _delay_us(75); | ||
145 | |||
146 | } | ||
147 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); | ||
148 | } | ||
149 | // power off | ||
150 | if (KEY_POWER_STATE() && | ||
151 | (USB_DeviceState == DEVICE_STATE_Suspended || | ||
152 | USB_DeviceState == DEVICE_STATE_Unattached ) && | ||
153 | timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { | ||
154 | KEY_POWER_OFF(); | ||
155 | suspend_power_down(); | ||
156 | } | ||
157 | |||
158 | matrix_scan_quantum(); | ||
159 | |||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | bool matrix_is_modified(void) | ||
164 | { | ||
165 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
166 | if (matrix[i] != matrix_prev[i]) | ||
167 | return true; | ||
168 | } | ||
169 | return false; | ||
170 | } | ||
171 | |||
172 | inline | ||
173 | bool matrix_has_ghost(void) | ||
174 | { | ||
175 | return false; | ||
176 | } | ||
177 | |||
178 | inline | ||
179 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
180 | { | ||
181 | return (matrix[row] & (1<<col)); | ||
182 | } | ||
183 | |||
184 | inline | ||
185 | matrix_row_t matrix_get_row(uint8_t row) | ||
186 | { | ||
187 | return matrix[row]; | ||
188 | } | ||
189 | |||
190 | void matrix_print(void) | ||
191 | { | ||
192 | print("\nr/c 01234567\n"); | ||
193 | for (uint8_t row = 0; row < matrix_rows(); row++) { | ||
194 | xprintf("%02X: %08b\n", row, bitrev(matrix_get_row(row))); | ||
195 | } | ||
196 | } | ||
197 | |||
198 | uint8_t matrix_key_count(void) { | ||
199 | uint8_t count = 0; | ||
200 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | ||
201 | count += bitpop16(matrix_get_row(r)); | ||
202 | } | ||
203 | return count; | ||
204 | } | ||
205 | |||
206 | void matrix_power_up(void) { | ||
207 | KEY_POWER_ON(); | ||
208 | } | ||
209 | void matrix_power_down(void) { | ||
210 | KEY_POWER_OFF(); | ||
211 | } | ||
diff --git a/keyboards/hhkb/ansi/readme.md b/keyboards/hhkb/ansi/readme.md new file mode 100644 index 000000000..495aa4c3f --- /dev/null +++ b/keyboards/hhkb/ansi/readme.md | |||
@@ -0,0 +1,14 @@ | |||
1 | HHKB Alternate Controller | ||
2 | === | ||
3 | |||
4 | An alternative controler for the HHKB designed by hasu. | ||
5 | |||
6 | Keyboard Maintainer: QMK Community | ||
7 | Hardware Supported: HHKB Alternate Controller | ||
8 | Hardware Availability: https://geekhack.org/index.php?topic=12047.0 | ||
9 | |||
10 | Make example for this keyboard (after setting up your build environment): | ||
11 | |||
12 | make hhkb/ansi:default | ||
13 | |||
14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | ||
diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/ansi/rules.mk index 68fb51a30..a367ef48d 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk | |||
@@ -47,14 +47,14 @@ OPT_DEFS += -DHHKB_RN42_ENABLE | |||
47 | 47 | ||
48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT | 48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT |
49 | # HHKB Alt controller. | 49 | # HHKB Alt controller. |
50 | RN42_DIR = rn42 | 50 | RN42_DIR = ../rn42 |
51 | 51 | ||
52 | SRC += serial_uart.c \ | 52 | SRC += serial_uart.c \ |
53 | rn42/suart.S \ | 53 | ../rn42/suart.S \ |
54 | rn42/rn42.c \ | 54 | ../rn42/rn42.c \ |
55 | rn42/rn42_task.c \ | 55 | ../rn42/rn42_task.c \ |
56 | rn42/battery.c \ | 56 | ../rn42/battery.c \ |
57 | rn42/main.c | 57 | ../rn42/main.c |
58 | 58 | ||
59 | VPATH += $(RN42_DIR) | 59 | VPATH += $(RN42_DIR) |
60 | 60 | ||
diff --git a/keyboards/hhkb/hhkb.c b/keyboards/hhkb/hhkb.c deleted file mode 100644 index a9d35123f..000000000 --- a/keyboards/hhkb/hhkb.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "hhkb.h" \ No newline at end of file | ||
diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h new file mode 100644 index 000000000..01dab6d44 --- /dev/null +++ b/keyboards/hhkb/jp/config.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0x4848 // HH = happy hacking | ||
24 | #define PRODUCT_ID 0x0002 // HHKB JP | ||
25 | #define DEVICE_VER 0x0104 | ||
26 | #define MANUFACTURER q.m.k | ||
27 | #define PRODUCT HHKB mod | ||
28 | #define DESCRIPTION q.m.k keyboard firmware for HHKB | ||
29 | |||
30 | /* key matrix size */ | ||
31 | #define MATRIX_ROWS 16 | ||
32 | #define MATRIX_COLS 8 | ||
33 | |||
34 | #define TAPPING_TERM 200 | ||
35 | |||
36 | /* number of backlight levels */ | ||
37 | #define BACKLIGHT_LEVELS 3 | ||
38 | |||
39 | /* Set 0 if debouncing isn't needed */ | ||
40 | #define DEBOUNCE 5 | ||
41 | |||
42 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
43 | //#define LOCKING_SUPPORT_ENABLE | ||
44 | /* Locking resynchronize hack */ | ||
45 | //#define LOCKING_RESYNC_ENABLE | ||
46 | |||
47 | #ifdef HHKB_RN42_ENABLE | ||
48 | // rn42 support -- acquired from the tmk repo. This is almost certainly not | ||
49 | // integrated with qmk in the correct way. | ||
50 | |||
51 | #define SUART_OUT_PORT PORTD | ||
52 | #define SUART_OUT_BIT 0 | ||
53 | #define SUART_IN_PIN PIND | ||
54 | #define SUART_IN_BIT 1 | ||
55 | |||
56 | #ifdef __AVR_ATmega32U4__ | ||
57 | /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ | ||
58 | #define UCSR1D _SFR_MEM8(0xCB) | ||
59 | #define RTSEN 0 | ||
60 | #define CTSEN 1 | ||
61 | |||
62 | #define SERIAL_UART_BAUD 115200 | ||
63 | #define SERIAL_UART_DATA UDR1 | ||
64 | #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) | ||
65 | #define SERIAL_UART_RXD_VECT USART1_RX_vect | ||
66 | #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1)) | ||
67 | #define SERIAL_UART_INIT() do { \ | ||
68 | UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \ | ||
69 | UBRR1H = ((uint16_t)SERIAL_UART_UBRR>>8); /* baud rate */ \ | ||
70 | UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \ | ||
71 | UCSR1B |= (0<<TXCIE1) | (1<<TXEN1); /* TX interrupt, TX: enable */ \ | ||
72 | UCSR1C |= (0<<UPM11) | (0<<UPM10); /* parity: none(00), even(01), odd(11) */ \ | ||
73 | UCSR1D |= (0<<RTSEN) | (0<<CTSEN); /* RTS, CTS(no flow control by hardware) */ \ | ||
74 | DDRD |= (1<<5); PORTD &= ~(1<<5); /* RTS for flow control by firmware */ \ | ||
75 | sei(); \ | ||
76 | } while(0) | ||
77 | #define SERIAL_UART_RTS_LO() do { PORTD &= ~(1<<5); } while (0) | ||
78 | #define SERIAL_UART_RTS_HI() do { PORTD |= (1<<5); } while (0) | ||
79 | #else | ||
80 | #error "USART configuration is needed." | ||
81 | #endif | ||
82 | |||
83 | /* power control of key switch board */ | ||
84 | #define HHKB_POWER_SAVING | ||
85 | |||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * Feature disable options | ||
90 | * These options are also useful to firmware size reduction. | ||
91 | */ | ||
92 | |||
93 | /* disable debug print */ | ||
94 | //#define NO_DEBUG | ||
95 | |||
96 | /* disable print */ | ||
97 | //#define NO_PRINT | ||
98 | |||
99 | /* disable action features */ | ||
100 | //#define NO_ACTION_LAYER | ||
101 | //#define NO_ACTION_TAPPING | ||
102 | //#define NO_ACTION_ONESHOT | ||
103 | //#define NO_ACTION_MACRO | ||
104 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/hhkb/hhkb_avr.h b/keyboards/hhkb/jp/hhkb_avr.h index 7ea6322c7..a1f825cfb 100644 --- a/keyboards/hhkb/hhkb_avr.h +++ b/keyboards/hhkb/jp/hhkb_avr.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef HHKB_AVR_H | 1 | #pragma once |
2 | #define HHKB_AVR_H | ||
3 | 2 | ||
4 | #include <stdint.h> | 3 | #include <stdint.h> |
5 | #include <stdbool.h> | 4 | #include <stdbool.h> |
@@ -67,11 +66,11 @@ static inline void KEY_INIT(void) | |||
67 | /* key: input with pull-up */ | 66 | /* key: input with pull-up */ |
68 | DDRD &= ~0x80; | 67 | DDRD &= ~0x80; |
69 | PORTD |= 0x80; | 68 | PORTD |= 0x80; |
70 | #ifdef HHKB_JP | 69 | |
71 | /* row extention for HHKB JP */ | 70 | /* row extention for HHKB JP */ |
72 | DDRC |= (1<<6|1<<7); | 71 | DDRC |= (1<<6|1<<7); |
73 | PORTC |= (1<<6|1<<7); | 72 | PORTC |= (1<<6|1<<7); |
74 | #endif | 73 | |
75 | KEY_UNABLE(); | 74 | KEY_UNABLE(); |
76 | KEY_PREV_OFF(); | 75 | KEY_PREV_OFF(); |
77 | 76 | ||
@@ -80,10 +79,10 @@ static inline void KEY_INIT(void) | |||
80 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | 79 | static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) |
81 | { | 80 | { |
82 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); | 81 | PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); |
83 | #ifdef HHKB_JP | 82 | |
84 | if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); | 83 | if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); |
85 | else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); | 84 | else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); |
86 | #endif | 85 | |
87 | } | 86 | } |
88 | 87 | ||
89 | 88 | ||
@@ -163,5 +162,3 @@ static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) | |||
163 | PORTC &= ~0x0F; \ | 162 | PORTC &= ~0x0F; \ |
164 | } while (0) | 163 | } while (0) |
165 | #endif | 164 | #endif |
166 | |||
167 | #endif | ||
diff --git a/keyboards/hhkb/info.json b/keyboards/hhkb/jp/info.json index 3beaff83d..7594987d9 100644 --- a/keyboards/hhkb/info.json +++ b/keyboards/hhkb/jp/info.json | |||
@@ -1,75 +1,10 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "hhkb", | 2 | "keyboard_name": "HHKB JP", |
3 | "url": "", | 3 | "url": "", |
4 | "maintainer": "qmk", | 4 | "maintainer": "qmk", |
5 | "width": 15, | 5 | "width": 15, |
6 | "height": 5, | 6 | "height": 5, |
7 | "layouts": { | 7 | "layouts": { |
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | { "label": "Esc", "x": 0, "y": 0 }, | ||
11 | { "label": "!", "x": 1, "y": 0 }, | ||
12 | { "label": "@", "x": 2, "y": 0 }, | ||
13 | { "label": "#", "x": 3, "y": 0 }, | ||
14 | { "label": "$", "x": 4, "y": 0 }, | ||
15 | { "label": "%", "x": 5, "y": 0 }, | ||
16 | { "label": "^", "x": 6, "y": 0 }, | ||
17 | { "label": "&", "x": 7, "y": 0 }, | ||
18 | { "label": "*", "x": 8, "y": 0 }, | ||
19 | { "label": "(", "x": 9, "y": 0 }, | ||
20 | { "label": ")", "x": 10, "y": 0 }, | ||
21 | { "label": "_", "x": 11, "y": 0 }, | ||
22 | { "label": "+", "x": 12, "y": 0 }, | ||
23 | { "label": "|", "x": 13, "y": 0 }, | ||
24 | { "label": "~", "x": 14, "y": 0 }, | ||
25 | { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, | ||
26 | { "label": "Q", "x": 1.5, "y": 1 }, | ||
27 | { "label": "W", "x": 2.5, "y": 1 }, | ||
28 | { "label": "E", "x": 3.5, "y": 1 }, | ||
29 | { "label": "R", "x": 4.5, "y": 1 }, | ||
30 | { "label": "T", "x": 5.5, "y": 1 }, | ||
31 | { "label": "Y", "x": 6.5, "y": 1 }, | ||
32 | { "label": "U", "x": 7.5, "y": 1 }, | ||
33 | { "label": "I", "x": 8.5, "y": 1 }, | ||
34 | { "label": "O", "x": 9.5, "y": 1 }, | ||
35 | { "label": "P", "x": 10.5, "y": 1 }, | ||
36 | { "label": "{", "x": 11.5, "y": 1 }, | ||
37 | { "label": "}", "x": 12.5, "y": 1 }, | ||
38 | { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, | ||
39 | { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, | ||
40 | { "label": "A", "x": 1.75, "y": 2 }, | ||
41 | { "label": "S", "x": 2.75, "y": 2 }, | ||
42 | { "label": "D", "x": 3.75, "y": 2 }, | ||
43 | { "label": "F", "x": 4.75, "y": 2 }, | ||
44 | { "label": "G", "x": 5.75, "y": 2 }, | ||
45 | { "label": "H", "x": 6.75, "y": 2 }, | ||
46 | { "label": "J", "x": 7.75, "y": 2 }, | ||
47 | { "label": "K", "x": 8.75, "y": 2 }, | ||
48 | { "label": "L", "x": 9.75, "y": 2 }, | ||
49 | { "label": ":", "x": 10.75, "y": 2 }, | ||
50 | { "label": "\"", "x": 11.75, "y": 2 }, | ||
51 | { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, | ||
52 | { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, | ||
53 | { "label": "Z", "x": 2.25, "y": 3 }, | ||
54 | { "label": "X", "x": 3.25, "y": 3 }, | ||
55 | { "label": "C", "x": 4.25, "y": 3 }, | ||
56 | { "label": "V", "x": 5.25, "y": 3 }, | ||
57 | { "label": "B", "x": 6.25, "y": 3 }, | ||
58 | { "label": "N", "x": 7.25, "y": 3 }, | ||
59 | { "label": "M", "x": 8.25, "y": 3 }, | ||
60 | { "label": "<", "x": 9.25, "y": 3 }, | ||
61 | { "label": ">", "x": 10.25, "y": 3 }, | ||
62 | { "label": "?", "x": 11.25, "y": 3 }, | ||
63 | { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, | ||
64 | { "label": "Fn", "x": 14, "y": 3 }, | ||
65 | { "label": "", "x": 1.5, "y": 4 }, | ||
66 | { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, | ||
67 | { "x": 4, "y": 4, "w": 6 }, | ||
68 | { "label": "", "x": 10, "y": 4, "w": 1.5 }, | ||
69 | { "label": "", "x": 11.5, "y": 4 } | ||
70 | ] | ||
71 | }, | ||
72 | |||
73 | "LAYOUT_JP": { | 8 | "LAYOUT_JP": { |
74 | "layout": [ | 9 | "layout": [ |
75 | { "label": "Esc", "x": 0, "y": 0 }, | 10 | { "label": "Esc", "x": 0, "y": 0 }, |
diff --git a/keyboards/hhkb/jp/jp.c b/keyboards/hhkb/jp/jp.c new file mode 100644 index 000000000..f1f1388c7 --- /dev/null +++ b/keyboards/hhkb/jp/jp.c | |||
@@ -0,0 +1 @@ | |||
#include "jp.h" \ No newline at end of file | |||
diff --git a/keyboards/hhkb/hhkb.h b/keyboards/hhkb/jp/jp.h index 668f78eec..a95796f25 100644 --- a/keyboards/hhkb/hhkb.h +++ b/keyboards/hhkb/jp/jp.h | |||
@@ -1,28 +1,7 @@ | |||
1 | #ifndef HHKB_H | 1 | #pragma once |
2 | #define HHKB_H | ||
3 | 2 | ||
4 | #include "quantum.h" | 3 | #include "quantum.h" |
5 | 4 | ||
6 | #define LAYOUT( \ | ||
7 | K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ | ||
8 | K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ | ||
9 | K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ | ||
10 | K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ | ||
11 | K35, K36, K37, K57, K56) \ | ||
12 | \ | ||
13 | { \ | ||
14 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
15 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
16 | { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ | ||
17 | { K30, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
18 | { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ | ||
19 | { K50, K51, K52, K53, K54, K55, K56, K57 }, \ | ||
20 | { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ | ||
21 | { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ | ||
22 | } | ||
23 | |||
24 | #define LAYOUT_60_hhkb LAYOUT | ||
25 | |||
26 | #define LAYOUT_JP( \ | 5 | #define LAYOUT_JP( \ |
27 | K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ | 6 | K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ |
28 | K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ | 7 | K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ |
@@ -47,6 +26,3 @@ | |||
47 | { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ | 26 | { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ |
48 | { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ | 27 | { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ |
49 | } | 28 | } |
50 | |||
51 | |||
52 | #endif | ||
diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c index 04d79f924..04d79f924 100644 --- a/keyboards/hhkb/keymaps/bakingpy/keymap.c +++ b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/bakingpy/rules.mk +++ b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/jp/keymaps/default/keymap.c index 6fd06638c..6fd06638c 100644 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/jp/keymaps/default/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/default/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c index f3ef3d6af..f3ef3d6af 100644 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/jp/rules.mk b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/jp/keymaps/dhertz/config.h index af2fb9d8a..af2fb9d8a 100644 --- a/keyboards/hhkb/keymaps/krusli/config.h +++ b/keyboards/hhkb/jp/keymaps/dhertz/config.h | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.c b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c index 951af069b..951af069b 100644 --- a/keyboards/hhkb/keymaps/dhertz/keymap.c +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.h b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h index dbefc6380..dbefc6380 100644 --- a/keyboards/hhkb/keymaps/dhertz/keymap.h +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h | |||
diff --git a/keyboards/hhkb/keymaps/dhertz/rules.mk b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk index 5656057b4..5656057b4 100644 --- a/keyboards/hhkb/keymaps/dhertz/rules.mk +++ b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c index 15dc29773..15dc29773 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/enoch_jp/rules.mk b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk index d35c58b77..d35c58b77 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md index 222ad898e..222ad898e 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md | |||
diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c index 0d4a24c60..0d4a24c60 100644 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/jp_mac/rules.mk b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/jp_mac/rules.mk +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c index f40df74e8..f40df74e8 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/rdg_jp/rules.mk b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/README.md b/keyboards/hhkb/jp/keymaps/sh_jp/README.md index 4f82f2f4e..4f82f2f4e 100644 --- a/keyboards/hhkb/keymaps/sh_jp/README.md +++ b/keyboards/hhkb/jp/keymaps/sh_jp/README.md | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c index 79515c5a6..79515c5a6 100644 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c | |||
diff --git a/keyboards/hhkb/keymaps/sh_jp/rules.mk b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk index a7f700f01..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/sh_jp/rules.mk +++ b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk | |||
diff --git a/keyboards/hhkb/jp/keymaps/via/config.h b/keyboards/hhkb/jp/keymaps/via/config.h new file mode 100644 index 000000000..96c85573d --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/config.h | |||
@@ -0,0 +1,2 @@ | |||
1 | // 3 layers or else it will not fit in EEPROM | ||
2 | #define DYNAMIC_KEYMAP_LAYER_COUNT 3 | ||
diff --git a/keyboards/hhkb/jp/keymaps/via/keymap.c b/keyboards/hhkb/jp/keymaps/via/keymap.c new file mode 100644 index 000000000..cb1ba76fb --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/keymap.c | |||
@@ -0,0 +1,58 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | /* Layer 0: HHKB JP | ||
4 | * ,-----------------------------------------------------------. | ||
5 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| | ||
6 | * |-----------------------------------------------------------| | ||
7 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | ||
8 | * |------------------------------------------------------` Ent| | ||
9 | * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | | ||
10 | * |-----------------------------------------------------------| | ||
11 | * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| | ||
12 | * |-----------------------------------------------------------| | ||
13 | * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| | ||
14 | * `-----------------------------------------------------------' | ||
15 | */ | ||
16 | |||
17 | /* Layer 1: HHKB mode (HHKB Fn) | ||
18 | * ,-----------------------------------------------------------. | ||
19 | * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| | ||
20 | * |-----------------------------------------------------------| | ||
21 | * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | | ||
22 | * |------------------------------------------------------` | | ||
23 | * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | | ||
24 | * |-----------------------------------------------------------| | ||
25 | * | | | | | | | +| -|End|PgD|Dow| | | | | ||
26 | * |-----------------------------------------------------------| | ||
27 | * | || | | | | | | | | || | | | | ||
28 | * `-----------------------------------------------------------' | ||
29 | */ | ||
30 | |||
31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
32 | [0] = LAYOUT_JP( | ||
33 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, | ||
34 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, | ||
35 | 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_BSLS, KC_ENT, | ||
36 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, | ||
37 | MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), | ||
38 | |||
39 | [1] = LAYOUT_JP( | ||
40 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | ||
41 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, | ||
42 | _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, | ||
43 | _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, | ||
44 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
45 | ), | ||
46 | [2] = LAYOUT_JP( | ||
47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
52 | ) | ||
53 | }; | ||
54 | |||
55 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) | ||
56 | { | ||
57 | return MACRO_NONE; | ||
58 | } | ||
diff --git a/keyboards/hhkb/jp/keymaps/via/rules.mk b/keyboards/hhkb/jp/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/hhkb/matrix.c b/keyboards/hhkb/jp/matrix.c index 666b6f595..437356af6 100644 --- a/keyboards/hhkb/matrix.c +++ b/keyboards/hhkb/jp/matrix.c | |||
@@ -140,13 +140,10 @@ uint8_t matrix_scan(void) | |||
140 | 140 | ||
141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. | 141 | // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. |
142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. | 142 | // This takes 25us or more to make sure KEY_STATE returns to idle state. |
143 | #ifdef HHKB_JP | 143 | |
144 | // Looks like JP needs faster scan due to its twice larger matrix | 144 | // Looks like JP needs faster scan due to its twice larger matrix |
145 | // or it can drop keys in fast key typing | 145 | // or it can drop keys in fast key typing |
146 | _delay_us(30); | 146 | _delay_us(30); |
147 | #else | ||
148 | _delay_us(75); | ||
149 | #endif | ||
150 | } | 147 | } |
151 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); | 148 | if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); |
152 | } | 149 | } |
diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/jp/readme.md index 57eb81439..41c1d2214 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/jp/readme.md | |||
@@ -9,6 +9,6 @@ Hardware Availability: https://geekhack.org/index.php?topic=12047.0 | |||
9 | 9 | ||
10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
11 | 11 | ||
12 | make hhkb:default | 12 | make hhkb/jp:default |
13 | 13 | ||
14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. |
diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk new file mode 100644 index 000000000..774b444c5 --- /dev/null +++ b/keyboards/hhkb/jp/rules.mk | |||
@@ -0,0 +1,69 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | # Teensy halfkay | ||
6 | # Pro Micro caterina | ||
7 | # Atmel DFU atmel-dfu | ||
8 | # LUFA DFU lufa-dfu | ||
9 | # QMK DFU qmk-dfu | ||
10 | # ATmega32A bootloadHID | ||
11 | # ATmega328P USBasp | ||
12 | BOOTLOADER = atmel-dfu | ||
13 | |||
14 | # Build Options | ||
15 | # comment out to disable the options. | ||
16 | # | ||
17 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
20 | CONSOLE_ENABLE = yes # Console for debug | ||
21 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
22 | CUSTOM_MATRIX = yes # Custom matrix file for the HHKB | ||
23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
24 | # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
25 | # NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
26 | # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
27 | # MIDI_ENABLE = yes # MIDI controls | ||
28 | # UNICODE_ENABLE = yes # Unicode | ||
29 | # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID | ||
30 | |||
31 | |||
32 | # HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. | ||
33 | |||
34 | # Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the | ||
35 | # feature. Be sure to clean any existing build before trying to enable rn42 | ||
36 | # support. For example: | ||
37 | # | ||
38 | # make hhkb-keymap-clean | ||
39 | # make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes | ||
40 | |||
41 | # project specific files | ||
42 | SRC = matrix.c | ||
43 | |||
44 | ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) | ||
45 | |||
46 | OPT_DEFS += -DHHKB_RN42_ENABLE | ||
47 | |||
48 | # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT | ||
49 | # HHKB Alt controller. | ||
50 | RN42_DIR = ../rn42 | ||
51 | |||
52 | SRC += serial_uart.c \ | ||
53 | ../rn42/suart.S \ | ||
54 | ../rn42/rn42.c \ | ||
55 | ../rn42/rn42_task.c \ | ||
56 | ../rn42/battery.c \ | ||
57 | ../rn42/main.c | ||
58 | |||
59 | VPATH += $(RN42_DIR) | ||
60 | |||
61 | endif | ||
62 | |||
63 | |||
64 | # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION | ||
65 | # debug-on: all | ||
66 | |||
67 | # debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT | ||
68 | # debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) | ||
69 | # debug-off: all | ||
diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index c99b05e4c..a169d658f 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c | |||
@@ -15,8 +15,6 @@ enum ic60_keycodes { | |||
15 | NUMPAD, | 15 | NUMPAD, |
16 | FNAV, | 16 | FNAV, |
17 | MEDIA, | 17 | MEDIA, |
18 | TILDE, | ||
19 | CTLALTDEL, | ||
20 | BACKLIGHT, | 18 | BACKLIGHT, |
21 | BRIGHT, | 19 | BRIGHT, |
22 | DIM, | 20 | DIM, |
@@ -55,7 +53,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
55 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_NO,\ | 53 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_NO,\ |
56 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \ | 54 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \ |
57 | TT(_FNAV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, \ | 55 | TT(_FNAV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, \ |
58 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,F(TILDE),KC_NO, \ | 56 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,LM(_TILDE, MOD_LSFT),KC_NO, \ |
59 | KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL \ | 57 | KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL \ |
60 | ), | 58 | ), |
61 | 59 | ||
@@ -74,7 +72,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
74 | KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL, \ | 72 | KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL, \ |
75 | _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______, \ | 73 | _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______, \ |
76 | _______,KC_APP,KC_BTN1,KC_CALC,_______,_______,KC_END,_______,_______,_______,_______,_______,KC_NO, \ | 74 | _______,KC_APP,KC_BTN1,KC_CALC,_______,_______,KC_END,_______,_______,_______,_______,_______,KC_NO, \ |
77 | _______,_______,_______, _______, F(CTLALTDEL),KC_NLCK,_______,_______ \ | 75 | _______,_______,_______, _______, C(A(KC_DEL)),KC_NLCK,_______,_______ \ |
78 | ), | 76 | ), |
79 | 77 | ||
80 | /* media */ | 78 | /* media */ |
@@ -162,8 +160,6 @@ uint8_t led_game[5] = { | |||
162 | 160 | ||
163 | //======== qmk functions ========= | 161 | //======== qmk functions ========= |
164 | const uint16_t fn_actions[] = { | 162 | const uint16_t fn_actions[] = { |
165 | [CTLALTDEL] = ACTION_KEY(LALT(LCTL(KC_DEL))), | ||
166 | [TILDE] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT), | ||
167 | [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL), | 163 | [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL), |
168 | [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME), | 164 | [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME), |
169 | [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT), | 165 | [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT), |
diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c index 1c0e78072..985ff19b8 100644 --- a/keyboards/jd45/keymaps/justin/keymap.c +++ b/keyboards/jd45/keymaps/justin/keymap.c | |||
@@ -3,15 +3,22 @@ | |||
3 | #define KC_MO1 MO(1) | 3 | #define KC_MO1 MO(1) |
4 | #define KC_MO2 MO(2) | 4 | #define KC_MO2 MO(2) |
5 | #define KC_MO3 MO(3) | 5 | #define KC_MO3 MO(3) |
6 | #define KC_LM4 LM(4, MOD_LSFT) | ||
7 | |||
8 | #define KC_MTCM MT(MOD_LCTL, KC_MINS) | ||
9 | #define KC_MTSG MT(MOD_LSFT, KC_GRV) | ||
10 | #define KC_MTSW MT(MOD_RSFT, KC_RGUI) | ||
11 | #define KC_MTSC MT(MOD_RSFT, KC_CAPS) | ||
12 | #define KC_MTCT MT(MOD_LCTL, KC_TAB) | ||
6 | 13 | ||
7 | #define KC_BLTG BL_TOGG | 14 | #define KC_BLTG BL_TOGG |
8 | 15 | ||
9 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 16 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
10 | [0] = LAYOUT_kc( | 17 | [0] = LAYOUT_kc( |
11 | ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, | 18 | ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, |
12 | FN8, A, R, S, T, D, H, N, E, I, O, ENT, | 19 | MTCT, A, R, S, T, D, H, N, E, I, O, ENT, |
13 | LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, | 20 | LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, MTSC, |
14 | FN4, LGUI, FN7, MO2, MO1, SPC, FN5, RALT, MO3, FN0), | 21 | MTSG, LGUI, LM4, MO2, MO1, SPC, MTSW, RALT, MO3, MTCM), |
15 | [1] = LAYOUT_kc( | 22 | [1] = LAYOUT_kc( |
16 | TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, | 23 | TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, |
17 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, | 24 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, |
@@ -42,13 +49,6 @@ enum macro_id | |||
42 | }; | 49 | }; |
43 | 50 | ||
44 | const uint16_t PROGMEM fn_actions[] = { | 51 | const uint16_t PROGMEM fn_actions[] = { |
45 | [0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS), | ||
46 | [4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV), | ||
47 | [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI), | ||
48 | [6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS), | ||
49 | [7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4 | ||
50 | [8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), | ||
51 | |||
52 | [10] = ACTION_MACRO(PSWD1), | 52 | [10] = ACTION_MACRO(PSWD1), |
53 | [11] = ACTION_MACRO(PSWD2), | 53 | [11] = ACTION_MACRO(PSWD2), |
54 | [12] = ACTION_MACRO(PSWD3) | 54 | [12] = ACTION_MACRO(PSWD3) |
diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c index 6fda6ac95..dc7c3bb7e 100644 --- a/keyboards/jd45/keymaps/mjt6u/keymap.c +++ b/keyboards/jd45/keymaps/mjt6u/keymap.c | |||
@@ -119,7 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
119 | { | 119 | { |
120 | persistent_default_layer_set(1UL << _QWERTY); | 120 | persistent_default_layer_set(1UL << _QWERTY); |
121 | #ifdef AUDIO_ENABLE | 121 | #ifdef AUDIO_ENABLE |
122 | PLAY_NOTE_ARRAY(tone_fnpc, false, 0); | 122 | PLAY_SONG(tone_fnpc); |
123 | #endif | 123 | #endif |
124 | print("Space-FN"); | 124 | print("Space-FN"); |
125 | } | 125 | } |
@@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
130 | { | 130 | { |
131 | persistent_default_layer_set(1UL << _QWERTYNUMMODS); | 131 | persistent_default_layer_set(1UL << _QWERTYNUMMODS); |
132 | #ifdef AUDIO_ENABLE | 132 | #ifdef AUDIO_ENABLE |
133 | PLAY_NOTE_ARRAY(tone_fnmac, false, 0); | 133 | PLAY_SONG(tone_fnmac); |
134 | #endif | 134 | #endif |
135 | print("Space-Numpad"); | 135 | print("Space-Numpad"); |
136 | } | 136 | } |
diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index 14428812f..00f0bb3ce 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c | |||
@@ -30,16 +30,9 @@ enum custom_keycodes { | |||
30 | ARROW | 30 | ARROW |
31 | }; | 31 | }; |
32 | 32 | ||
33 | // Enable these functions using FUNC(n) macro. | 33 | #define SPC_LWR LT(_LOWER, KC_SPC) |
34 | const uint16_t PROGMEM fn_actions[] = { | 34 | #define BSP_RSE LT(_RAISE, KC_BSPC) |
35 | [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, | 35 | #define ARW MO(_ARROW) |
36 | [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, | ||
37 | [2] = MO(_ARROW), //Hold for momentary Arrow | ||
38 | }; | ||
39 | |||
40 | #define SPC_LWR FUNC(0) | ||
41 | #define BSP_RSE FUNC(1) | ||
42 | #define ARW FUNC(2) | ||
43 | 36 | ||
44 | // Underglow setup | 37 | // Underglow setup |
45 | #define RGBLIGHT_SLEEP | 38 | #define RGBLIGHT_SLEEP |
diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index f0122bef0..ab8cf2a9a 100644 --- a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c | |||
@@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
158 | case QWERTY: | 158 | case QWERTY: |
159 | if (record->event.pressed) { | 159 | if (record->event.pressed) { |
160 | #ifdef AUDIO_ENABLE | 160 | #ifdef AUDIO_ENABLE |
161 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 161 | PLAY_SONG(tone_qwerty); |
162 | #endif | 162 | #endif |
163 | persistent_default_layer_set(1UL<<_QWERTY); | 163 | persistent_default_layer_set(1UL<<_QWERTY); |
164 | } | 164 | } |
@@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
167 | case COLEMAK: | 167 | case COLEMAK: |
168 | if (record->event.pressed) { | 168 | if (record->event.pressed) { |
169 | #ifdef AUDIO_ENABLE | 169 | #ifdef AUDIO_ENABLE |
170 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 170 | PLAY_SONG(tone_colemak); |
171 | #endif | 171 | #endif |
172 | persistent_default_layer_set(1UL<<_COLEMAK); | 172 | persistent_default_layer_set(1UL<<_COLEMAK); |
173 | } | 173 | } |
@@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
176 | case DVORAK: | 176 | case DVORAK: |
177 | if (record->event.pressed) { | 177 | if (record->event.pressed) { |
178 | #ifdef AUDIO_ENABLE | 178 | #ifdef AUDIO_ENABLE |
179 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 179 | PLAY_SONG(tone_dvorak); |
180 | #endif | 180 | #endif |
181 | persistent_default_layer_set(1UL<<_DVORAK); | 181 | persistent_default_layer_set(1UL<<_DVORAK); |
182 | } | 182 | } |
diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 5a797cb0b..c03cf970f 100644 --- a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c | |||
@@ -155,7 +155,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
155 | case QWERTY: | 155 | case QWERTY: |
156 | if (record->event.pressed) { | 156 | if (record->event.pressed) { |
157 | #ifdef AUDIO_ENABLE | 157 | #ifdef AUDIO_ENABLE |
158 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 158 | PLAY_SONG(tone_qwerty); |
159 | #endif | 159 | #endif |
160 | persistent_default_layer_set(1UL<<_QWERTY); | 160 | persistent_default_layer_set(1UL<<_QWERTY); |
161 | } | 161 | } |
diff --git a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c index e1dc91d2b..9922f1a55 100644 --- a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c | |||
@@ -128,7 +128,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
128 | case QWERTY: | 128 | case QWERTY: |
129 | if (record->event.pressed) { | 129 | if (record->event.pressed) { |
130 | #ifdef AUDIO_ENABLE | 130 | #ifdef AUDIO_ENABLE |
131 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 131 | PLAY_SONG(tone_qwerty); |
132 | #endif | 132 | #endif |
133 | persistent_default_layer_set(1UL << _QWERTY); | 133 | persistent_default_layer_set(1UL << _QWERTY); |
134 | } | 134 | } |
@@ -137,7 +137,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
137 | case DVORAK: | 137 | case DVORAK: |
138 | if (record->event.pressed) { | 138 | if (record->event.pressed) { |
139 | #ifdef AUDIO_ENABLE | 139 | #ifdef AUDIO_ENABLE |
140 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 140 | PLAY_SONG(tone_dvorak); |
141 | #endif | 141 | #endif |
142 | persistent_default_layer_set(1UL << _DVORAK); | 142 | persistent_default_layer_set(1UL << _DVORAK); |
143 | } | 143 | } |
diff --git a/keyboards/model01/config.h b/keyboards/keyboardio/model01/config.h index c2160979c..c2160979c 100644 --- a/keyboards/model01/config.h +++ b/keyboards/keyboardio/model01/config.h | |||
diff --git a/keyboards/model01/info.json b/keyboards/keyboardio/model01/info.json index 60c914d5c..66bea171d 100644 --- a/keyboards/model01/info.json +++ b/keyboards/keyboardio/model01/info.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "model01", | 2 | "keyboard_name": "model01", |
3 | "keyboard_folder": "model01", | 3 | "keyboard_folder": "keyboardio/model01", |
4 | "url": "https://keyboard.io", | 4 | "url": "https://keyboard.io", |
5 | "maintainer": "qmk", | 5 | "maintainer": "qmk", |
6 | "width": 18.5, | 6 | "width": 18.5, |
diff --git a/keyboards/model01/keymaps/default/config.h b/keyboards/keyboardio/model01/keymaps/default/config.h index 8ab9d8b02..8ab9d8b02 100644 --- a/keyboards/model01/keymaps/default/config.h +++ b/keyboards/keyboardio/model01/keymaps/default/config.h | |||
diff --git a/keyboards/model01/keymaps/default/keymap.c b/keyboards/keyboardio/model01/keymaps/default/keymap.c index 5ee865972..5ee865972 100644 --- a/keyboards/model01/keymaps/default/keymap.c +++ b/keyboards/keyboardio/model01/keymaps/default/keymap.c | |||
diff --git a/keyboards/model01/keymaps/default/readme.md b/keyboards/keyboardio/model01/keymaps/default/readme.md index 740515a26..740515a26 100644 --- a/keyboards/model01/keymaps/default/readme.md +++ b/keyboards/keyboardio/model01/keymaps/default/readme.md | |||
diff --git a/keyboards/model01/keymaps/dshields/config.h b/keyboards/keyboardio/model01/keymaps/dshields/config.h index fdb23d46b..fdb23d46b 100644 --- a/keyboards/model01/keymaps/dshields/config.h +++ b/keyboards/keyboardio/model01/keymaps/dshields/config.h | |||
diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/keyboardio/model01/keymaps/dshields/keymap.c index 04887124f..04887124f 100644 --- a/keyboards/model01/keymaps/dshields/keymap.c +++ b/keyboards/keyboardio/model01/keymaps/dshields/keymap.c | |||
diff --git a/keyboards/model01/keymaps/dshields/readme.md b/keyboards/keyboardio/model01/keymaps/dshields/readme.md index ead1c1aad..ead1c1aad 100644 --- a/keyboards/model01/keymaps/dshields/readme.md +++ b/keyboards/keyboardio/model01/keymaps/dshields/readme.md | |||
diff --git a/keyboards/model01/keymaps/tw1t611/config.h b/keyboards/keyboardio/model01/keymaps/tw1t611/config.h index 8ab9d8b02..8ab9d8b02 100644 --- a/keyboards/model01/keymaps/tw1t611/config.h +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/config.h | |||
diff --git a/keyboards/model01/keymaps/tw1t611/keymap.c b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c index b4bd53e3f..b4bd53e3f 100644 --- a/keyboards/model01/keymaps/tw1t611/keymap.c +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c | |||
diff --git a/keyboards/model01/keymaps/tw1t611/readme.md b/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md index b9d728831..b9d728831 100644 --- a/keyboards/model01/keymaps/tw1t611/readme.md +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md | |||
diff --git a/keyboards/model01/leds.c b/keyboards/keyboardio/model01/leds.c index b21c1a5c8..b21c1a5c8 100644 --- a/keyboards/model01/leds.c +++ b/keyboards/keyboardio/model01/leds.c | |||
diff --git a/keyboards/model01/leds.h b/keyboards/keyboardio/model01/leds.h index 405bdf328..405bdf328 100644 --- a/keyboards/model01/leds.h +++ b/keyboards/keyboardio/model01/leds.h | |||
diff --git a/keyboards/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c index f1f9024c7..f1f9024c7 100644 --- a/keyboards/model01/matrix.c +++ b/keyboards/keyboardio/model01/matrix.c | |||
diff --git a/keyboards/model01/model01.c b/keyboards/keyboardio/model01/model01.c index 29615ca86..29615ca86 100644 --- a/keyboards/model01/model01.c +++ b/keyboards/keyboardio/model01/model01.c | |||
diff --git a/keyboards/model01/model01.h b/keyboards/keyboardio/model01/model01.h index a83e33cd8..a83e33cd8 100644 --- a/keyboards/model01/model01.h +++ b/keyboards/keyboardio/model01/model01.h | |||
diff --git a/keyboards/model01/readme.md b/keyboards/keyboardio/model01/readme.md index 34bd291e2..5f55a8812 100644 --- a/keyboards/model01/readme.md +++ b/keyboards/keyboardio/model01/readme.md | |||
@@ -2,13 +2,13 @@ | |||
2 | 2 | ||
3 | A split keyboard. | 3 | A split keyboard. |
4 | 4 | ||
5 | Keyboard Maintainer: QMK Community | 5 | * Keyboard Maintainer: QMK Community |
6 | Hardware Supported: Keyboardio Model 01 | 6 | * Hardware Supported: Keyboardio Model 01 |
7 | Hardware Availability: [Keyboardio](https://shop.keyboard.io) | 7 | * Hardware Availability: [Keyboardio](https://shop.keyboard.io) |
8 | 8 | ||
9 | Make example for this keyboard (after setting up your build environment): | 9 | Make example for this keyboard (after setting up your build environment): |
10 | 10 | ||
11 | make model01:default | 11 | make keyboardio/model01:default |
12 | 12 | ||
13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. |
14 | Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 14 | Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@@ -17,7 +17,7 @@ Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/ne | |||
17 | 17 | ||
18 | To program the keyboard, if you have avrdude installed: | 18 | To program the keyboard, if you have avrdude installed: |
19 | 19 | ||
20 | make model01:default:avrdude | 20 | make keyboardio/model01:default:flash |
21 | 21 | ||
22 | When prompted to reset your keyboard, press the prog key at upper left. If the | 22 | When prompted to reset your keyboard, press the prog key at upper left. If the |
23 | keyboard does not reset, you can hold the prog key while plugging it into your | 23 | keyboard does not reset, you can hold the prog key while plugging it into your |
diff --git a/keyboards/model01/rules.mk b/keyboards/keyboardio/model01/rules.mk index 29c028ac8..29c028ac8 100644 --- a/keyboards/model01/rules.mk +++ b/keyboards/keyboardio/model01/rules.mk | |||
diff --git a/keyboards/model01/wire-protocol-constants.h b/keyboards/keyboardio/model01/wire-protocol-constants.h index 90a528582..90a528582 100644 --- a/keyboards/model01/wire-protocol-constants.h +++ b/keyboards/keyboardio/model01/wire-protocol-constants.h | |||
diff --git a/keyboards/keyboardio/readme.md b/keyboards/keyboardio/readme.md new file mode 100644 index 000000000..d9ce48c23 --- /dev/null +++ b/keyboards/keyboardio/readme.md | |||
@@ -0,0 +1,18 @@ | |||
1 | # Keyboardio | ||
2 | |||
3 | Keyboardio are an US-based Keyboard maker, known for their | ||
4 | [Model01](https://shop.keyboard.io/collections/frontpage/products/model-01-keyboard), | ||
5 | and more recently, the Keyboardio | ||
6 | [Atreus](https://www.kickstarter.com/projects/keyboardio/atreus) keyboards. | ||
7 | |||
8 | ## Online Stores | ||
9 | |||
10 | **Website:** https://shop.keyboard.io/ | ||
11 | |||
12 | ## Social Media | ||
13 | |||
14 | **Discord:** https://discord.gg/4az77sf | ||
15 | **Forums:** https://community.keyboard.io/ | ||
16 | **Twitter:** https://twitter.com/keyboardio | ||
17 | **Facebook:** https://facebook.com/keyboardio | ||
18 | **Blog:** https://blog.keyboard.io/ | ||
diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 024df5912..8c01bcb83 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c | |||
@@ -52,16 +52,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
52 | KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , | 52 | KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , |
53 | TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , | 53 | TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , |
54 | KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , | 54 | KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , |
55 | KC_GRAVE, KC_ESC, KC_FN4, LT(_SYMB, KC_RIGHT), | 55 | KC_GRAVE, KC_ESC, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), |
56 | KC_LCTL,KC_LALT, | 56 | KC_LCTL,KC_LALT, |
57 | KC_DEL, | 57 | KC_DEL, |
58 | KC_BSPC, KC_DEL ,TT(_MOUSE) , | 58 | KC_BSPC, KC_DEL ,TT(_MOUSE) , |
59 | KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,KC_FN1 ,TT(_SYMB), KC_NO, RESET, | 59 | KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,TG(_MOUSE) ,TT(_SYMB), KC_NO, RESET, |
60 | KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, | 60 | KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, |
61 | KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, | 61 | KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, |
62 | KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, | 62 | KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, |
63 | KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, | 63 | KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, |
64 | LT(_SYMB, KC_UP), KC_FN7, KC_LBRC ,KC_RBRC, | 64 | LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), KC_LBRC ,KC_RBRC, |
65 | KC_RALT,KC_RGUI, | 65 | KC_RALT,KC_RGUI, |
66 | KC_PGUP, | 66 | KC_PGUP, |
67 | KC_PGDN,KC_ENTER ,KC_SPC | 67 | KC_PGDN,KC_ENTER ,KC_SPC |
@@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
101 | _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC, | 101 | _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC, |
102 | _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD, | 102 | _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD, |
103 | _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, | 103 | _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, |
104 | _______, KC_COLON, KC_FN4, LT(_SYMB, KC_RIGHT), | 104 | _______, KC_COLON, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), |
105 | _______, _______, | 105 | _______, _______, |
106 | _______, | 106 | _______, |
107 | _______, _______, RESET, | 107 | _______, _______, RESET, |
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
110 | KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, | 110 | KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, |
111 | KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, | 111 | KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, |
112 | KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX, | 112 | KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX, |
113 | LT(_SYMB, KC_UP), KC_FN7, KC_BSLS, XXXXXXX, | 113 | LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), KC_BSLS, XXXXXXX, |
114 | _______, _______, | 114 | _______, _______, |
115 | _______, | 115 | _______, |
116 | _______, _______, _______ | 116 | _______, _______, _______ |
@@ -149,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
149 | _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______, | 149 | _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______, |
150 | _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______, | 150 | _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______, |
151 | _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______, | 151 | _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______, |
152 | _______, _______, KC_FN4, LT(_SYMB, KC_RIGHT), | 152 | _______, _______, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), |
153 | _______, _______, | 153 | _______, _______, |
154 | _______, | 154 | _______, |
155 | _______, _______, RESET, | 155 | _______, _______, RESET, |
@@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
158 | _______, _______, KC_PLUS, KC_MINS, _______, _______, | 158 | _______, _______, KC_PLUS, KC_MINS, _______, _______, |
159 | _______, _______, KC_EQL, KC_PIPE, _______, _______, | 159 | _______, _______, KC_EQL, KC_PIPE, _______, _______, |
160 | _______, _______, _______, _______, _______, _______, | 160 | _______, _______, _______, _______, _______, _______, |
161 | LT(_SYMB, KC_UP), KC_FN7, _______, _______, | 161 | LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), _______, _______, |
162 | _______, _______, | 162 | _______, _______, |
163 | _______, | 163 | _______, |
164 | _______, _______, _______ | 164 | _______, _______, _______ |
@@ -192,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
192 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, | 192 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, |
193 | _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , | 193 | _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , |
194 | _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, | 194 | _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, |
195 | KC_FN1, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, | 195 | TG(_MOUSE), LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, |
196 | _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN, | 196 | _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN, |
197 | _______, _______, KC_NO, KC_NO, | 197 | _______, _______, KC_NO, KC_NO, |
198 | _______, _______, | 198 | _______, _______, |
@@ -261,16 +261,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
261 | 261 | ||
262 | }; | 262 | }; |
263 | 263 | ||
264 | |||
265 | |||
266 | const uint16_t PROGMEM fn_actions[] = { | ||
267 | [1] = ACTION_LAYER_TOGGLE(_MOUSE) , | ||
268 | [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), | ||
269 | [7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN), | ||
270 | |||
271 | |||
272 | }; | ||
273 | |||
274 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 264 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
275 | { | 265 | { |
276 | // MACRODOWN only works in this function | 266 | // MACRODOWN only works in this function |
diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index b0394659c..a7fa4f55d 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c | |||
@@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
152 | case QWERTY: | 152 | case QWERTY: |
153 | if (record->event.pressed) { | 153 | if (record->event.pressed) { |
154 | #ifdef AUDIO_ENABLE | 154 | #ifdef AUDIO_ENABLE |
155 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 155 | PLAY_SONG(tone_qwerty); |
156 | #endif | 156 | #endif |
157 | persistent_default_layer_set(1UL<<_QWERTY); | 157 | persistent_default_layer_set(1UL<<_QWERTY); |
158 | } | 158 | } |
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
161 | case COLEMAK: | 161 | case COLEMAK: |
162 | if (record->event.pressed) { | 162 | if (record->event.pressed) { |
163 | #ifdef AUDIO_ENABLE | 163 | #ifdef AUDIO_ENABLE |
164 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 164 | PLAY_SONG(tone_colemak); |
165 | #endif | 165 | #endif |
166 | persistent_default_layer_set(1UL<<_COLEMAK); | 166 | persistent_default_layer_set(1UL<<_COLEMAK); |
167 | } | 167 | } |
@@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
170 | case DVORAK: | 170 | case DVORAK: |
171 | if (record->event.pressed) { | 171 | if (record->event.pressed) { |
172 | #ifdef AUDIO_ENABLE | 172 | #ifdef AUDIO_ENABLE |
173 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 173 | PLAY_SONG(tone_dvorak); |
174 | #endif | 174 | #endif |
175 | persistent_default_layer_set(1UL<<_DVORAK); | 175 | persistent_default_layer_set(1UL<<_DVORAK); |
176 | } | 176 | } |
diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c index d789b7a8b..68e7e0ba0 100644 --- a/keyboards/lets_split/keymaps/piemod/keymap.c +++ b/keyboards/lets_split/keymaps/piemod/keymap.c | |||
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
29 | KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ | 29 | KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ |
30 | KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ | 30 | KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ |
31 | KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ | 31 | KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ |
32 | F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ | 32 | C(KC_LALT), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ |
33 | ), | 33 | ), |
34 | 34 | ||
35 | [_ARROW] = LAYOUT( \ | 35 | [_ARROW] = LAYOUT( \ |
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
41 | 41 | ||
42 | [_SYMBOL] = LAYOUT( \ | 42 | [_SYMBOL] = LAYOUT( \ |
43 | KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ | 43 | KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ |
44 | KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(2), \ | 44 | KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), \ |
45 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ | 45 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ |
46 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ | 46 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ |
47 | ), | 47 | ), |
@@ -81,19 +81,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
81 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ | 81 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ |
82 | ) | 82 | ) |
83 | }; | 83 | }; |
84 | |||
85 | enum function_id { | ||
86 | TEENSY_KEY, | ||
87 | CUSTOM_KEY, | ||
88 | L_CTRL_ALT_ENT, | ||
89 | R_CTRL_ALT_ENT, | ||
90 | }; | ||
91 | |||
92 | int CAPSLOCKED = 0; | ||
93 | |||
94 | const uint16_t PROGMEM fn_actions[] = { | ||
95 | // Special Keys | ||
96 | [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. | ||
97 | // Symbols | ||
98 | [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. | ||
99 | }; | ||
diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index 50bf2beb3..0bdaa1f76 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h | |||
@@ -19,10 +19,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
19 | #pragma once | 19 | #pragma once |
20 | 20 | ||
21 | #include "config_common.h" | 21 | #include "config_common.h" |
22 | #include <serial_config.h> | ||
23 | 22 | ||
24 | #define USE_I2C | 23 | #ifndef SOFT_SERIAL_PIN |
25 | #define USE_SERIAL | 24 | #define SOFT_SERIAL_PIN D2 |
25 | #define SERIAL_USE_MULTI_TRANSACTION | ||
26 | #endif | ||
26 | 27 | ||
27 | #if !defined(NO_ACTION_MACRO) | 28 | #if !defined(NO_ACTION_MACRO) |
28 | #define NO_ACTION_MACRO | 29 | #define NO_ACTION_MACRO |
@@ -30,3 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
30 | #if !defined(NO_ACTION_FUNCTION) | 31 | #if !defined(NO_ACTION_FUNCTION) |
31 | #define NO_ACTION_FUNCTION | 32 | #define NO_ACTION_FUNCTION |
32 | #endif | 33 | #endif |
34 | |||
35 | #define DIODE_DIRECTION COL2ROW | ||
36 | |||
37 | // Use the lily version to get the Lily58 logo instead of the qmk logo | ||
38 | #define OLED_FONT_H "lib/glcdfont_lily.c" | ||
diff --git a/keyboards/lily58/i2c.c b/keyboards/lily58/i2c.c deleted file mode 100755 index 4bee5c639..000000000 --- a/keyboards/lily58/i2c.c +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | #include <util/twi.h> | ||
2 | #include <avr/io.h> | ||
3 | #include <stdlib.h> | ||
4 | #include <avr/interrupt.h> | ||
5 | #include <util/twi.h> | ||
6 | #include <stdbool.h> | ||
7 | #include "i2c.h" | ||
8 | |||
9 | #ifdef USE_I2C | ||
10 | |||
11 | // Limits the amount of we wait for any one i2c transaction. | ||
12 | // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is | ||
13 | // 9 bits, a single transaction will take around 90μs to complete. | ||
14 | // | ||
15 | // (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit | ||
16 | // poll loop takes at least 8 clock cycles to execute | ||
17 | #define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 | ||
18 | |||
19 | #define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) | ||
20 | |||
21 | volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
22 | |||
23 | static volatile uint8_t slave_buffer_pos; | ||
24 | static volatile bool slave_has_register_set = false; | ||
25 | |||
26 | // Wait for an i2c operation to finish | ||
27 | inline static | ||
28 | void i2c_delay(void) { | ||
29 | uint16_t lim = 0; | ||
30 | while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) | ||
31 | lim++; | ||
32 | |||
33 | // easier way, but will wait slightly longer | ||
34 | // _delay_us(100); | ||
35 | } | ||
36 | |||
37 | // Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) | ||
38 | void i2c_master_init(void) { | ||
39 | // no prescaler | ||
40 | TWSR = 0; | ||
41 | // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. | ||
42 | // Check datasheets for more info. | ||
43 | TWBR = ((F_CPU/SCL_CLOCK)-16)/2; | ||
44 | } | ||
45 | |||
46 | // Start a transaction with the given i2c slave address. The direction of the | ||
47 | // transfer is set with I2C_READ and I2C_WRITE. | ||
48 | // returns: 0 => success | ||
49 | // 1 => error | ||
50 | uint8_t i2c_master_start(uint8_t address) { | ||
51 | TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); | ||
52 | |||
53 | i2c_delay(); | ||
54 | |||
55 | // check that we started successfully | ||
56 | if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) | ||
57 | return 1; | ||
58 | |||
59 | TWDR = address; | ||
60 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
61 | |||
62 | i2c_delay(); | ||
63 | |||
64 | if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) | ||
65 | return 1; // slave did not acknowledge | ||
66 | else | ||
67 | return 0; // success | ||
68 | } | ||
69 | |||
70 | |||
71 | // Finish the i2c transaction. | ||
72 | void i2c_master_stop(void) { | ||
73 | TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); | ||
74 | |||
75 | uint16_t lim = 0; | ||
76 | while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) | ||
77 | lim++; | ||
78 | } | ||
79 | |||
80 | // Write one byte to the i2c slave. | ||
81 | // returns 0 => slave ACK | ||
82 | // 1 => slave NACK | ||
83 | uint8_t i2c_master_write(uint8_t data) { | ||
84 | TWDR = data; | ||
85 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
86 | |||
87 | i2c_delay(); | ||
88 | |||
89 | // check if the slave acknowledged us | ||
90 | return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; | ||
91 | } | ||
92 | |||
93 | // Read one byte from the i2c slave. If ack=1 the slave is acknowledged, | ||
94 | // if ack=0 the acknowledge bit is not set. | ||
95 | // returns: byte read from i2c device | ||
96 | uint8_t i2c_master_read(int ack) { | ||
97 | TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); | ||
98 | |||
99 | i2c_delay(); | ||
100 | return TWDR; | ||
101 | } | ||
102 | |||
103 | void i2c_reset_state(void) { | ||
104 | TWCR = 0; | ||
105 | } | ||
106 | |||
107 | void i2c_slave_init(uint8_t address) { | ||
108 | TWAR = address << 0; // slave i2c address | ||
109 | // TWEN - twi enable | ||
110 | // TWEA - enable address acknowledgement | ||
111 | // TWINT - twi interrupt flag | ||
112 | // TWIE - enable the twi interrupt | ||
113 | TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); | ||
114 | } | ||
115 | |||
116 | ISR(TWI_vect); | ||
117 | |||
118 | ISR(TWI_vect) { | ||
119 | uint8_t ack = 1; | ||
120 | switch(TW_STATUS) { | ||
121 | case TW_SR_SLA_ACK: | ||
122 | // this device has been addressed as a slave receiver | ||
123 | slave_has_register_set = false; | ||
124 | break; | ||
125 | |||
126 | case TW_SR_DATA_ACK: | ||
127 | // this device has received data as a slave receiver | ||
128 | // The first byte that we receive in this transaction sets the location | ||
129 | // of the read/write location of the slaves memory that it exposes over | ||
130 | // i2c. After that, bytes will be written at slave_buffer_pos, incrementing | ||
131 | // slave_buffer_pos after each write. | ||
132 | if(!slave_has_register_set) { | ||
133 | slave_buffer_pos = TWDR; | ||
134 | // don't acknowledge the master if this memory loctaion is out of bounds | ||
135 | if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { | ||
136 | ack = 0; | ||
137 | slave_buffer_pos = 0; | ||
138 | } | ||
139 | slave_has_register_set = true; | ||
140 | } else { | ||
141 | i2c_slave_buffer[slave_buffer_pos] = TWDR; | ||
142 | BUFFER_POS_INC(); | ||
143 | } | ||
144 | break; | ||
145 | |||
146 | case TW_ST_SLA_ACK: | ||
147 | case TW_ST_DATA_ACK: | ||
148 | // master has addressed this device as a slave transmitter and is | ||
149 | // requesting data. | ||
150 | TWDR = i2c_slave_buffer[slave_buffer_pos]; | ||
151 | BUFFER_POS_INC(); | ||
152 | break; | ||
153 | |||
154 | case TW_BUS_ERROR: // something went wrong, reset twi state | ||
155 | TWCR = 0; | ||
156 | default: | ||
157 | break; | ||
158 | } | ||
159 | // Reset everything, so we are ready for the next TWI interrupt | ||
160 | TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); | ||
161 | } | ||
162 | #endif | ||
diff --git a/keyboards/lily58/i2c.h b/keyboards/lily58/i2c.h deleted file mode 100755 index 710662c7a..000000000 --- a/keyboards/lily58/i2c.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <stdint.h> | ||
4 | |||
5 | #ifndef F_CPU | ||
6 | #define F_CPU 16000000UL | ||
7 | #endif | ||
8 | |||
9 | #define I2C_READ 1 | ||
10 | #define I2C_WRITE 0 | ||
11 | |||
12 | #define I2C_ACK 1 | ||
13 | #define I2C_NACK 0 | ||
14 | |||
15 | #define SLAVE_BUFFER_SIZE 0x10 | ||
16 | |||
17 | // i2c SCL clock frequency 400kHz | ||
18 | #define SCL_CLOCK 400000L | ||
19 | |||
20 | extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
21 | |||
22 | void i2c_master_init(void); | ||
23 | uint8_t i2c_master_start(uint8_t address); | ||
24 | void i2c_master_stop(void); | ||
25 | uint8_t i2c_master_write(uint8_t data); | ||
26 | uint8_t i2c_master_read(int); | ||
27 | void i2c_reset_state(void); | ||
28 | void i2c_slave_init(uint8_t address); | ||
29 | |||
30 | |||
31 | static inline unsigned char i2c_start_read(unsigned char addr) { | ||
32 | return i2c_master_start((addr << 1) | I2C_READ); | ||
33 | } | ||
34 | |||
35 | static inline unsigned char i2c_start_write(unsigned char addr) { | ||
36 | return i2c_master_start((addr << 1) | I2C_WRITE); | ||
37 | } | ||
38 | |||
39 | // from SSD1306 scrips | ||
40 | extern unsigned char i2c_rep_start(unsigned char addr); | ||
41 | extern void i2c_start_wait(unsigned char addr); | ||
42 | extern unsigned char i2c_readAck(void); | ||
43 | extern unsigned char i2c_readNak(void); | ||
44 | extern unsigned char i2c_read(unsigned char ack); | ||
45 | |||
46 | #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); | ||
diff --git a/keyboards/lily58/keymaps/chuan/config.h b/keyboards/lily58/keymaps/chuan/config.h new file mode 100644 index 000000000..fa93060db --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/config.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | This is the c configuration file for the keymap | ||
3 | |||
4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
5 | Copyright 2015 Jack Humbert | ||
6 | |||
7 | This program is free software: you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation, either version 2 of the License, or | ||
10 | (at your option) any later version. | ||
11 | |||
12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | ||
16 | |||
17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #pragma once | ||
22 | |||
23 | // #define USE_MATRIX_I2C | ||
24 | |||
25 | // #define USE_I2C | ||
26 | |||
27 | /* Select hand configuration */ | ||
28 | |||
29 | #define MASTER_LEFT | ||
30 | // #define MASTER_RIGHT | ||
31 | // #define EE_HANDS | ||
32 | |||
33 | // #define SSD1306OLED | ||
34 | |||
35 | #define USE_SERIAL_PD2 | ||
36 | |||
37 | #define TAPPING_FORCE_HOLD | ||
38 | |||
39 | /* define tapping term */ | ||
40 | #define TAPPING_TERM 200 | ||
41 | |||
42 | |||
43 | #undef RGBLED_NUM | ||
44 | #define RGBLIGHT_ANIMATIONS | ||
45 | #define RGBLED_NUM 27 | ||
46 | #define RGBLIGHT_LIMIT_VAL 120 | ||
47 | #define RGBLIGHT_HUE_STEP 10 | ||
48 | #define RGBLIGHT_SAT_STEP 17 | ||
49 | #define RGBLIGHT_VAL_STEP 17 | ||
50 | |||
51 | #define ENCODERS_PAD_A { F4 } | ||
52 | #define ENCODERS_PAD_B { F5 } | ||
53 | |||
54 | |||
55 | /* Set 0 if debouncing isn't needed */ | ||
56 | #define DEBOUNCE 5 | ||
57 | |||
58 | // Underglow | ||
59 | /* | ||
60 | #undef RGBLED_NUM | ||
61 | #define RGBLED_NUM 14 // Number of LEDs | ||
62 | #define RGBLIGHT_ANIMATIONS | ||
63 | #define RGBLIGHT_SLEEP | ||
64 | */ | ||
diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c new file mode 100644 index 000000000..da49e67a0 --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/keymap.c | |||
@@ -0,0 +1,230 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | #ifdef RGBLIGHT_ENABLE | ||
4 | //Following line allows macro to read current RGB settings | ||
5 | extern rgblight_config_t rgblight_config; | ||
6 | #endif | ||
7 | |||
8 | extern uint8_t is_master; | ||
9 | |||
10 | #define _QWERTY 0 | ||
11 | #define _LOWER 1 | ||
12 | #define _RAISE 2 | ||
13 | #define _ADJUST 3 | ||
14 | |||
15 | enum custom_keycodes { | ||
16 | QWERTY = SAFE_RANGE, | ||
17 | LOWER, | ||
18 | RAISE, | ||
19 | ADJUST, | ||
20 | }; | ||
21 | |||
22 | |||
23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
24 | |||
25 | /* QWERTY | ||
26 | * ,-----------------------------------------. ,-----------------------------------------. | ||
27 | * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | | ||
28 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
29 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | | ||
30 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
31 | * |HYPER | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | | ||
32 | * |------+------+------+------+------+------| - | | + |------+------+------+------+------+------| | ||
33 | * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| | ||
34 | * `-----------------------------------------/ / \ \-----------------------------------------' | ||
35 | * | LCtl | LGUI |LALT | /Space / \Space \ |RAISE | [ | ] | | ||
36 | * | | | |/ LOWER / \ \ | ' | | | | ||
37 | * `----------------------------' '------''--------------------' | ||
38 | */ | ||
39 | |||
40 | [_QWERTY] = LAYOUT( | ||
41 | KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
42 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ | ||
43 | ALL_T(KC_GRV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, \ | ||
44 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINS, MEH_T(KC_EQL), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ | ||
45 | KC_LCTRL, KC_LGUI, KC_LALT,LT(_LOWER, KC_SPC), KC_SPC, LT(2,KC_QUOT), KC_LBRC, KC_RBRC \ | ||
46 | ), | ||
47 | /* LOWER | ||
48 | * ,-----------------------------------------. ,-----------------------------------------. | ||
49 | * | | | | | | | | | | | | | | | ||
50 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | ||
52 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - | | ||
54 | * |------+------+------+------+------+------| cmd spc| | |------+------+------+------+------+------| | ||
55 | * | | | |ctrl c| | |-------| |-------| | - | _ | [ | ] | | | | ||
56 | * `-----------------------------------------/ / \ \-----------------------------------------' | ||
57 | * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | { | } | | ||
58 | * | | | |/ / \ \ | | | | | ||
59 | * `----------------------------' '------''--------------------' | ||
60 | */ | ||
61 | [_LOWER] = LAYOUT( | ||
62 | KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \ | ||
63 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ | ||
64 | _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,\ | ||
65 | _______, _______, _______, C(KC_C), _______, _______, LGUI(KC_SPC), _______, _______, KC_MINS, KC_UNDS , KC_LBRC, KC_RBRC, KC_PIPE, \ | ||
66 | _______, _______, _______, _______, _______, RAISE, KC_LCBR, KC_RCBR\ | ||
67 | ), | ||
68 | /* RAISE | ||
69 | * ,-----------------------------------------. ,-----------------------------------------. | ||
70 | * | | | | | | | | | | | | | | | ||
71 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
72 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | | ||
73 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
74 | * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | | ||
75 | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| | ||
76 | * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | | ||
77 | * `-----------------------------------------/ / \ \-----------------------------------------' | ||
78 | * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | | ||
79 | * | | | |/ / \ \ | | | | | ||
80 | * `----------------------------' '------''--------------------' | ||
81 | */ | ||
82 | |||
83 | [_RAISE] = LAYOUT( | ||
84 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_DEL, _______, \ | ||
85 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_6, LCTL(LSFT(KC_TAB)),KC_UP,LCTL(KC_TAB), KC_0, _______, \ | ||
86 | _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RGHT, XXXXXXX, \ | ||
87 | _______, _______, _______, _______, _______, _______, _______, TG(_ADJUST),KC_PLUS, KC_MUTE ,KC_VOLD ,KC_VOLU, _______, _______, \ | ||
88 | _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
89 | ), | ||
90 | /* ADJUST | ||
91 | * ,-----------------------------------------. ,-----------------------------------------. | ||
92 | * | | | | | | | | | 7 | 8 | 9 |RGB ON| HUE+ | | ||
93 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
94 | * | | | | | | | | | 4 | 5 | 6 | MODE | HUE- | | ||
95 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
96 | * | | | | | | |-------. ,-------| | 1 | 2 | 3 | SAT+ | VAL+ | | ||
97 | * |------+------+------+------+------+------| | |DEFAULT|------+------+------+------+------+------| | ||
98 | * | | | | | | |-------| |-------| | 0 | 0 | . | SAT- | VAL- | | ||
99 | * `-----------------------------------------/ / \ \-----------------------------------------' | ||
100 | * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | | ||
101 | * | | | |/ / \ \ | | | | | ||
102 | * `----------------------------' '------''--------------------' | ||
103 | */ | ||
104 | [_ADJUST] = LAYOUT( | ||
105 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7 , KC_8 , KC_9 , RGB_TOG, RGB_HUI, \ | ||
106 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4 , KC_5 , KC_6 , RGB_MOD, RGB_HUD, \ | ||
107 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1 , KC_2 , KC_3 , RGB_SAI, RGB_VAI, \ | ||
108 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_ADJUST), XXXXXXX, KC_0 , KC_0 , KC_DOT, RGB_SAD, RGB_VAD,\ | ||
109 | _______, _______, _______, _______, _______, _______,KC_BSPC, _______ \ | ||
110 | ) | ||
111 | }; | ||
112 | |||
113 | int RGB_current_mode; | ||
114 | |||
115 | int counter = 0; | ||
116 | int lastIndex = 9; | ||
117 | |||
118 | // Setting ADJUST layer RGB back to default | ||
119 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | ||
120 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | ||
121 | layer_on(layer3); | ||
122 | } else { | ||
123 | layer_off(layer3); | ||
124 | } | ||
125 | } | ||
126 | |||
127 | void matrix_init_user(void) { | ||
128 | #ifdef RGBLIGHT_ENABLE | ||
129 | RGB_current_mode = rgblight_config.mode; | ||
130 | #endif | ||
131 | } | ||
132 | |||
133 | #ifdef OLED_DRIVER_ENABLE | ||
134 | |||
135 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
136 | if (!is_keyboard_master()) | ||
137 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
138 | return rotation; | ||
139 | } | ||
140 | |||
141 | // When add source files to SRC in rules.mk, you can use functions. | ||
142 | const char *read_layer_state(void); | ||
143 | const char *read_logo(void); | ||
144 | void set_keylog(uint16_t keycode, keyrecord_t *record); | ||
145 | const char *read_keylog(void); | ||
146 | const char *read_keylogs(void); | ||
147 | |||
148 | const char *read_mode_icon(bool swap); | ||
149 | const char *read_host_led_state(void); | ||
150 | void set_timelog(void); | ||
151 | const char *read_timelog(void); | ||
152 | |||
153 | char encoder_debug[24]; | ||
154 | |||
155 | void oled_task_user(void) { | ||
156 | // Host Keyboard Layer Status | ||
157 | snprintf(encoder_debug, sizeof(encoder_debug), "%i %i", counter, lastIndex ); | ||
158 | if (is_keyboard_master()) { | ||
159 | // If you want to change the display of OLED, you need to change here | ||
160 | oled_write_ln(read_layer_state(), false); | ||
161 | // oled_write_ln(read_keylog(), false); | ||
162 | // oled_write_ln(read_keylogs(), false); | ||
163 | // oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); | ||
164 | oled_write_ln(read_host_led_state(), false); | ||
165 | oled_write_ln(encoder_debug, false); | ||
166 | // oled_write_ln(read_timelog(), false); | ||
167 | } else { | ||
168 | oled_write(read_logo(), false); | ||
169 | // oled_write_ln(encoder_debug, false); | ||
170 | } | ||
171 | } | ||
172 | #endif //OLED_DRIVER_ENABLE | ||
173 | |||
174 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
175 | if (record->event.pressed) { | ||
176 | #ifdef SSD1306OLED | ||
177 | // set_keylog(keycode, record); | ||
178 | #endif | ||
179 | // set_timelog(); | ||
180 | } | ||
181 | |||
182 | switch (keycode) { | ||
183 | case QWERTY: | ||
184 | if (record->event.pressed) { | ||
185 | set_single_persistent_default_layer(_QWERTY); | ||
186 | } | ||
187 | return false; | ||
188 | break; | ||
189 | case LOWER: | ||
190 | if (record->event.pressed) { | ||
191 | layer_on(_LOWER); | ||
192 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
193 | } else { | ||
194 | layer_off(_LOWER); | ||
195 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
196 | } | ||
197 | return false; | ||
198 | break; | ||
199 | case RAISE: | ||
200 | if (record->event.pressed) { | ||
201 | layer_on(_RAISE); | ||
202 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
203 | } else { | ||
204 | layer_off(_RAISE); | ||
205 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
206 | } | ||
207 | return false; | ||
208 | break; | ||
209 | case ADJUST: | ||
210 | if (record->event.pressed) { | ||
211 | layer_on(_ADJUST); | ||
212 | } else { | ||
213 | layer_off(_ADJUST); | ||
214 | } | ||
215 | return false; | ||
216 | break; | ||
217 | } | ||
218 | return true; | ||
219 | } | ||
220 | |||
221 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
222 | lastIndex = index; | ||
223 | if (clockwise) { | ||
224 | counter++; | ||
225 | tap_code(KC_PGDN); | ||
226 | } else { | ||
227 | counter--; | ||
228 | tap_code(KC_PGUP); | ||
229 | } | ||
230 | } | ||
diff --git a/keyboards/lily58/keymaps/chuan/rules.mk b/keyboards/lily58/keymaps/chuan/rules.mk new file mode 100644 index 000000000..3e05cb7d9 --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/rules.mk | |||
@@ -0,0 +1,11 @@ | |||
1 | EXTRAKEY_ENABLE = yes | ||
2 | NKRO_ENABLE = yes | ||
3 | ENCODER_ENABLE = yes | ||
4 | # If you want to change the display of OLED, you need to change here | ||
5 | SRC += ./lib/rgb_state_reader.c \ | ||
6 | ./lib/layer_state_reader.c \ | ||
7 | ./lib/logo_reader.c \ | ||
8 | ./lib/mode_icon_reader.c \ | ||
9 | ./lib/host_led_state_reader.c \ | ||
10 | ./lib/timelogger.c \ | ||
11 | ./lib/keylogger.c \ | ||
diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 58bbdc5e9..6b9e52c05 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h | |||
@@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
28 | // #define MASTER_RIGHT | 28 | // #define MASTER_RIGHT |
29 | // #define EE_HANDS | 29 | // #define EE_HANDS |
30 | 30 | ||
31 | #define SSD1306OLED | ||
32 | |||
33 | #define USE_SERIAL_PD2 | 31 | #define USE_SERIAL_PD2 |
34 | 32 | ||
35 | #define TAPPING_FORCE_HOLD | 33 | #define TAPPING_FORCE_HOLD |
@@ -49,4 +47,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define RGBLED_NUM 14 // Number of LEDs | 47 | #define RGBLED_NUM 14 // Number of LEDs |
50 | #define RGBLIGHT_ANIMATIONS | 48 | #define RGBLIGHT_ANIMATIONS |
51 | #define RGBLIGHT_SLEEP | 49 | #define RGBLIGHT_SLEEP |
52 | */ \ No newline at end of file | 50 | */ |
diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index f36248e12..f0fbaa8b0 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c | |||
@@ -8,8 +8,6 @@ | |||
8 | #include "ssd1306.h" | 8 | #include "ssd1306.h" |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | |||
12 | |||
13 | #ifdef RGBLIGHT_ENABLE | 11 | #ifdef RGBLIGHT_ENABLE |
14 | //Following line allows macro to read current RGB settings | 12 | //Following line allows macro to read current RGB settings |
15 | extern rgblight_config_t rgblight_config; | 13 | extern rgblight_config_t rgblight_config; |
@@ -135,16 +133,18 @@ void matrix_init_user(void) { | |||
135 | #ifdef RGBLIGHT_ENABLE | 133 | #ifdef RGBLIGHT_ENABLE |
136 | RGB_current_mode = rgblight_config.mode; | 134 | RGB_current_mode = rgblight_config.mode; |
137 | #endif | 135 | #endif |
138 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h | ||
139 | #ifdef SSD1306OLED | ||
140 | iota_gfx_init(!has_usb()); // turns on the display | ||
141 | #endif | ||
142 | } | 136 | } |
143 | 137 | ||
144 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | 138 | //SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk |
145 | #ifdef SSD1306OLED | 139 | #ifdef OLED_DRIVER_ENABLE |
146 | 140 | ||
147 | // When add source files to SRC in rules.mk, you can use functions. | 141 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { |
142 | if (!is_keyboard_master()) | ||
143 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
144 | return rotation; | ||
145 | } | ||
146 | |||
147 | // When you add source files to SRC in rules.mk, you can use functions. | ||
148 | const char *read_layer_state(void); | 148 | const char *read_layer_state(void); |
149 | const char *read_logo(void); | 149 | const char *read_logo(void); |
150 | void set_keylog(uint16_t keycode, keyrecord_t *record); | 150 | void set_keylog(uint16_t keycode, keyrecord_t *record); |
@@ -156,42 +156,24 @@ const char *read_keylogs(void); | |||
156 | // void set_timelog(void); | 156 | // void set_timelog(void); |
157 | // const char *read_timelog(void); | 157 | // const char *read_timelog(void); |
158 | 158 | ||
159 | void matrix_scan_user(void) { | 159 | void oled_task_user(void) { |
160 | iota_gfx_task(); | 160 | if (is_keyboard_master()) { |
161 | } | ||
162 | |||
163 | void matrix_render_user(struct CharacterMatrix *matrix) { | ||
164 | if (is_master) { | ||
165 | // If you want to change the display of OLED, you need to change here | 161 | // If you want to change the display of OLED, you need to change here |
166 | matrix_write_ln(matrix, read_layer_state()); | 162 | oled_write_ln(read_layer_state(), false); |
167 | matrix_write_ln(matrix, read_keylog()); | 163 | oled_write_ln(read_keylog(), false); |
168 | matrix_write_ln(matrix, read_keylogs()); | 164 | oled_write_ln(read_keylogs(), false); |
169 | //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); | 165 | //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); |
170 | //matrix_write_ln(matrix, read_host_led_state()); | 166 | //oled_write_ln(read_host_led_state(), false); |
171 | //matrix_write_ln(matrix, read_timelog()); | 167 | //oled_write_ln(read_timelog(), false); |
172 | } else { | 168 | } else { |
173 | matrix_write(matrix, read_logo()); | 169 | oled_write(read_logo(), false); |
174 | } | ||
175 | } | ||
176 | |||
177 | void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { | ||
178 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
179 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
180 | dest->dirty = true; | ||
181 | } | 170 | } |
182 | } | 171 | } |
183 | 172 | #endif // OLED_DRIVER_ENABLE | |
184 | void iota_gfx_task_user(void) { | ||
185 | struct CharacterMatrix matrix; | ||
186 | matrix_clear(&matrix); | ||
187 | matrix_render_user(&matrix); | ||
188 | matrix_update(&display, &matrix); | ||
189 | } | ||
190 | #endif//SSD1306OLED | ||
191 | 173 | ||
192 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 174 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
193 | if (record->event.pressed) { | 175 | if (record->event.pressed) { |
194 | #ifdef SSD1306OLED | 176 | #ifdef OLED_DRIVER_ENABLE |
195 | set_keylog(keycode, record); | 177 | set_keylog(keycode, record); |
196 | #endif | 178 | #endif |
197 | // set_timelog(); | 179 | // set_timelog(); |
diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index b39305767..a5b6303a1 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk | |||
@@ -15,13 +15,13 @@ UNICODE_ENABLE = no # Unicode | |||
15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
17 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | 17 | SWAP_HANDS_ENABLE = no # Enable one-hand typing |
18 | OLED_DRIVER_ENABLE= yes # OLED display | ||
18 | 19 | ||
19 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
20 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
21 | 22 | ||
22 | # If you want to change the display of OLED, you need to change here | 23 | # If you want to change the display of OLED, you need to change here |
23 | SRC += ./lib/glcdfont.c \ | 24 | SRC += ./lib/rgb_state_reader.c \ |
24 | ./lib/rgb_state_reader.c \ | ||
25 | ./lib/layer_state_reader.c \ | 25 | ./lib/layer_state_reader.c \ |
26 | ./lib/logo_reader.c \ | 26 | ./lib/logo_reader.c \ |
27 | ./lib/keylogger.c \ | 27 | ./lib/keylogger.c \ |
diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 13b6cb168..d258fbcbc 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c | |||
@@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
112 | * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | | 112 | * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | |
113 | * | | | |/ / \ \ | | | | | 113 | * | | | |/ / \ \ | | | | |
114 | * `----------------------------' '------''--------------------' | 114 | * `----------------------------' '------''--------------------' |
115 | */ | 115 | */ |
116 | [_ADJUST] = LAYOUT( \ | 116 | [_ADJUST] = LAYOUT( \ |
117 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | 117 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ |
118 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ | 118 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ |
@@ -137,14 +137,16 @@ void matrix_init_user(void) { | |||
137 | #ifdef RGBLIGHT_ENABLE | 137 | #ifdef RGBLIGHT_ENABLE |
138 | RGB_current_mode = rgblight_config.mode; | 138 | RGB_current_mode = rgblight_config.mode; |
139 | #endif | 139 | #endif |
140 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h | ||
141 | #ifdef SSD1306OLED | ||
142 | iota_gfx_init(!has_usb()); // turns on the display | ||
143 | #endif | ||
144 | } | 140 | } |
145 | 141 | ||
146 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | 142 | //SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk |
147 | #ifdef SSD1306OLED | 143 | #ifdef OLED_DRIVER_ENABLE |
144 | |||
145 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
146 | if (!is_keyboard_master()) | ||
147 | return OLED_ROTATION_180; // flips the display 180 degrees if offhand | ||
148 | return rotation; | ||
149 | } | ||
148 | 150 | ||
149 | // When add source files to SRC in rules.mk, you can use functions. | 151 | // When add source files to SRC in rules.mk, you can use functions. |
150 | const char *read_layer_state(void); | 152 | const char *read_layer_state(void); |
@@ -165,35 +167,22 @@ void matrix_scan_user(void) { | |||
165 | void matrix_render_user(struct CharacterMatrix *matrix) { | 167 | void matrix_render_user(struct CharacterMatrix *matrix) { |
166 | if (is_master) { | 168 | if (is_master) { |
167 | // If you want to change the display of OLED, you need to change here | 169 | // If you want to change the display of OLED, you need to change here |
168 | matrix_write_ln(matrix, read_layer_state()); | 170 | oled_write_ln(read_layer_state(), false); |
169 | matrix_write_ln(matrix, read_keylog()); | 171 | oled_write_ln(read_keylog(), false); |
170 | matrix_write_ln(matrix, read_keylogs()); | 172 | oled_write_ln(read_keylogs(), false); |
171 | //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); | 173 | //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); |
172 | //matrix_write_ln(matrix, read_host_led_state()); | 174 | //oled_write_ln(read_host_led_state(), false); |
173 | //matrix_write_ln(matrix, read_timelog()); | 175 | //oled_write_ln(read_timelog(), false); |
174 | } else { | 176 | } else { |
175 | matrix_write(matrix, read_logo()); | 177 | oled_write(read_logo(), false); |
176 | } | 178 | } |
177 | } | 179 | } |
178 | 180 | ||
179 | void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { | ||
180 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
181 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
182 | dest->dirty = true; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | void iota_gfx_task_user(void) { | ||
187 | struct CharacterMatrix matrix; | ||
188 | matrix_clear(&matrix); | ||
189 | matrix_render_user(&matrix); | ||
190 | matrix_update(&display, &matrix); | ||
191 | } | ||
192 | #endif//SSD1306OLED | 181 | #endif//SSD1306OLED |
193 | 182 | ||
194 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 183 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
195 | if (record->event.pressed) { | 184 | if (record->event.pressed) { |
196 | #ifdef SSD1306OLED | 185 | #ifdef OLED_DRIVER_ENABLE |
197 | set_keylog(keycode, record); | 186 | set_keylog(keycode, record); |
198 | #endif | 187 | #endif |
199 | // set_timelog(); | 188 | // set_timelog(); |
@@ -236,4 +225,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
236 | break; | 225 | break; |
237 | } | 226 | } |
238 | return true; | 227 | return true; |
239 | } \ No newline at end of file | 228 | } |
diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 922fac6b6..0db9ac50f 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk | |||
@@ -13,15 +13,14 @@ MIDI_ENABLE = no # MIDI controls | |||
13 | AUDIO_ENABLE = no # Audio output on port C6 | 13 | AUDIO_ENABLE = no # Audio output on port C6 |
14 | UNICODE_ENABLE = no # Unicode | 14 | UNICODE_ENABLE = no # Unicode |
15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
17 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | 17 | SWAP_HANDS_ENABLE = no # Enable one-hand typing |
18 | 18 | ||
19 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 19 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
20 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 20 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
21 | 21 | ||
22 | # If you want to change the display of OLED, you need to change here | 22 | # If you want to change the display of OLED, you need to change here |
23 | SRC += ./lib/glcdfont.c \ | 23 | SRC += ./lib/rgb_state_reader.c \ |
24 | ./lib/rgb_state_reader.c \ | ||
25 | ./lib/layer_state_reader.c \ | 24 | ./lib/layer_state_reader.c \ |
26 | ./lib/logo_reader.c \ | 25 | ./lib/logo_reader.c \ |
27 | ./lib/keylogger.c \ | 26 | ./lib/keylogger.c \ |
diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont_lily.c index 94f026ba9..0aa69ea82 100644 --- a/keyboards/lily58/lib/glcdfont.c +++ b/keyboards/lily58/lib/glcdfont_lily.c | |||
@@ -1,6 +1,7 @@ | |||
1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. | 1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. |
2 | // See gfxfont.h for newer custom bitmap font info. | 2 | // See gfxfont.h for newer custom bitmap font info. |
3 | 3 | ||
4 | // Modified to show the Lily58 logo instead of the qmk logo | ||
4 | #include "progmem.h" | 5 | #include "progmem.h" |
5 | 6 | ||
6 | // Standard ASCII 5x7 font | 7 | // Standard ASCII 5x7 font |
diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c index 0e22173b1..589dd6152 100644 --- a/keyboards/lily58/lib/host_led_state_reader.c +++ b/keyboards/lily58/lib/host_led_state_reader.c | |||
@@ -1,15 +1,16 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include "led.h" | ||
3 | #include "host.h" | ||
2 | #include "lily58.h" | 4 | #include "lily58.h" |
3 | 5 | ||
4 | char host_led_state_str[24]; | 6 | char host_led_state_str[24]; |
5 | 7 | ||
6 | const char *read_host_led_state(void) | 8 | const char *read_host_led_state(void) |
7 | { | 9 | { |
8 | uint8_t leds = host_keyboard_leds(); | ||
9 | snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", | 10 | snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", |
10 | (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", | 11 | (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "on" : "- ", |
11 | (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", | 12 | (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "on" : "- ", |
12 | (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); | 13 | (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "on" : "- "); |
13 | 14 | ||
14 | return host_led_state_str; | 15 | return host_led_state_str; |
15 | } | 16 | } |
diff --git a/keyboards/lily58/lib/keylogger.c b/keyboards/lily58/lib/keylogger.c index a1bd476d2..2fc3e663e 100644 --- a/keyboards/lily58/lib/keylogger.c +++ b/keyboards/lily58/lib/keylogger.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include "action.h" | ||
2 | #include "lily58.h" | 3 | #include "lily58.h" |
3 | 4 | ||
4 | char keylog_str[24] = {}; | 5 | char keylog_str[24] = {}; |
diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c index 48674b067..0e9dd7039 100644 --- a/keyboards/lily58/lib/layer_state_reader.c +++ b/keyboards/lily58/lib/layer_state_reader.c | |||
@@ -4,10 +4,10 @@ | |||
4 | #include "lily58.h" | 4 | #include "lily58.h" |
5 | 5 | ||
6 | #define L_BASE 0 | 6 | #define L_BASE 0 |
7 | #define L_LOWER 2 | 7 | #define L_LOWER (1 << 1) |
8 | #define L_RAISE 4 | 8 | #define L_RAISE (1 << 2) |
9 | #define L_ADJUST 8 | 9 | #define L_ADJUST (1 << 3) |
10 | #define L_ADJUST_TRI 14 | 10 | #define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) |
11 | 11 | ||
12 | char layer_state_str[24]; | 12 | char layer_state_str[24]; |
13 | 13 | ||
diff --git a/keyboards/lily58/lib/mode_icon_reader.c b/keyboards/lily58/lib/mode_icon_reader.c index 2bce4a71b..27c6d92cd 100644 --- a/keyboards/lily58/lib/mode_icon_reader.c +++ b/keyboards/lily58/lib/mode_icon_reader.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdbool.h> | ||
2 | #include "lily58.h" | 3 | #include "lily58.h" |
3 | 4 | ||
4 | char mode_icon[24]; | 5 | char mode_icon[24]; |
diff --git a/keyboards/lily58/lib/timelogger.c b/keyboards/lily58/lib/timelogger.c index bfbfbe8a2..b00c13cb0 100644 --- a/keyboards/lily58/lib/timelogger.c +++ b/keyboards/lily58/lib/timelogger.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include "timer.h" | ||
2 | #include "lily58.h" | 3 | #include "lily58.h" |
3 | 4 | ||
4 | char timelog_str[24] = {}; | 5 | char timelog_str[24] = {}; |
diff --git a/keyboards/lily58/lily58.c b/keyboards/lily58/lily58.c index eacd90a82..03975057f 100644 --- a/keyboards/lily58/lily58.c +++ b/keyboards/lily58/lily58.c | |||
@@ -1,10 +1,5 @@ | |||
1 | #include "lily58.h" | 1 | #include "lily58.h" |
2 | #include "ssd1306.h" | ||
3 | 2 | ||
4 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | 3 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { |
5 | #ifdef SSD1306OLED | ||
6 | return process_record_gfx(keycode,record) && process_record_user(keycode, record); | ||
7 | #else | ||
8 | return process_record_user(keycode, record); | 4 | return process_record_user(keycode, record); |
9 | #endif | 5 | } |
10 | } \ No newline at end of file | ||
diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 4e8e3a7c9..adcf11b52 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h | |||
@@ -36,8 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } | 36 | #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } |
37 | #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } | 37 | #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } |
38 | 38 | ||
39 | /* define tapping term */ | ||
40 | #define TAPPING_TERM 100 | ||
41 | 39 | ||
42 | /* define if matrix has ghost */ | 40 | /* define if matrix has ghost */ |
43 | //#define MATRIX_HAS_GHOST | 41 | //#define MATRIX_HAS_GHOST |
diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index 6028b5a5b..e69de29bb 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk | |||
@@ -1,3 +0,0 @@ | |||
1 | SRC += rev1/matrix.c | ||
2 | SRC += rev1/split_util.c | ||
3 | SRC += rev1/split_scomm.c | ||
diff --git a/keyboards/lily58/rev1/split_scomm.c b/keyboards/lily58/rev1/split_scomm.c deleted file mode 100755 index a1fe6ba5b..000000000 --- a/keyboards/lily58/rev1/split_scomm.c +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | #ifdef USE_SERIAL | ||
2 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
3 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
4 | |||
5 | #include <stdbool.h> | ||
6 | #include <stdint.h> | ||
7 | #include <stddef.h> | ||
8 | #include <split_scomm.h> | ||
9 | #include "serial.h" | ||
10 | #ifdef CONSOLE_ENABLE | ||
11 | #include <print.h> | ||
12 | #endif | ||
13 | |||
14 | uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; | ||
15 | uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; | ||
16 | uint8_t volatile status_com = 0; | ||
17 | uint8_t volatile status1 = 0; | ||
18 | uint8_t slave_buffer_change_count = 0; | ||
19 | uint8_t s_change_old = 0xff; | ||
20 | uint8_t s_change_new = 0xff; | ||
21 | |||
22 | SSTD_t transactions[] = { | ||
23 | #define GET_SLAVE_STATUS 0 | ||
24 | /* master buffer not changed, only recive slave_buffer_change_count */ | ||
25 | { (uint8_t *)&status_com, | ||
26 | 0, NULL, | ||
27 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
28 | }, | ||
29 | #define PUT_MASTER_GET_SLAVE_STATUS 1 | ||
30 | /* master buffer changed need send, and recive slave_buffer_change_count */ | ||
31 | { (uint8_t *)&status_com, | ||
32 | sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, | ||
33 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
34 | }, | ||
35 | #define GET_SLAVE_BUFFER 2 | ||
36 | /* recive serial_slave_buffer */ | ||
37 | { (uint8_t *)&status1, | ||
38 | 0, NULL, | ||
39 | sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer | ||
40 | } | ||
41 | }; | ||
42 | |||
43 | void serial_master_init(void) | ||
44 | { | ||
45 | soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); | ||
46 | } | ||
47 | |||
48 | void serial_slave_init(void) | ||
49 | { | ||
50 | soft_serial_target_init(transactions, TID_LIMIT(transactions)); | ||
51 | } | ||
52 | |||
53 | // 0 => no error | ||
54 | // 1 => slave did not respond | ||
55 | // 2 => checksum error | ||
56 | int serial_update_buffers(int master_update) | ||
57 | { | ||
58 | int status, smatstatus; | ||
59 | static int need_retry = 0; | ||
60 | |||
61 | if( s_change_old != s_change_new ) { | ||
62 | smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); | ||
63 | if( smatstatus == TRANSACTION_END ) { | ||
64 | s_change_old = s_change_new; | ||
65 | #ifdef CONSOLE_ENABLE | ||
66 | uprintf("slave matrix = %b %b %b %b\n", | ||
67 | serial_slave_buffer[0], serial_slave_buffer[1], | ||
68 | serial_slave_buffer[2], serial_slave_buffer[3]); | ||
69 | #endif | ||
70 | } | ||
71 | } else { | ||
72 | // serial_slave_buffer dosen't change | ||
73 | smatstatus = TRANSACTION_END; // dummy status | ||
74 | } | ||
75 | |||
76 | if( !master_update && !need_retry) { | ||
77 | status = soft_serial_transaction(GET_SLAVE_STATUS); | ||
78 | } else { | ||
79 | status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); | ||
80 | } | ||
81 | if( status == TRANSACTION_END ) { | ||
82 | s_change_new = slave_buffer_change_count; | ||
83 | need_retry = 0; | ||
84 | } else { | ||
85 | need_retry = 1; | ||
86 | } | ||
87 | return smatstatus; | ||
88 | } | ||
89 | |||
90 | #endif // SERIAL_USE_MULTI_TRANSACTION | ||
91 | #endif /* USE_SERIAL */ | ||
diff --git a/keyboards/lily58/rev1/split_scomm.h b/keyboards/lily58/rev1/split_scomm.h deleted file mode 100755 index 873d8939d..000000000 --- a/keyboards/lily58/rev1/split_scomm.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef SPLIT_COMM_H | ||
2 | #define SPLIT_COMM_H | ||
3 | |||
4 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
5 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ | ||
6 | #include "serial.h" | ||
7 | |||
8 | #else | ||
9 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
10 | // Buffers for master - slave communication | ||
11 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
12 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
13 | |||
14 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
15 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
16 | extern uint8_t slave_buffer_change_count; | ||
17 | |||
18 | void serial_master_init(void); | ||
19 | void serial_slave_init(void); | ||
20 | int serial_update_buffers(int master_changed); | ||
21 | |||
22 | #endif | ||
23 | |||
24 | #endif /* SPLIT_COMM_H */ | ||
diff --git a/keyboards/lily58/rev1/split_util.h b/keyboards/lily58/rev1/split_util.h deleted file mode 100755 index 687ca19bd..000000000 --- a/keyboards/lily58/rev1/split_util.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef SPLIT_KEYBOARD_UTIL_H | ||
2 | #define SPLIT_KEYBOARD_UTIL_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include "eeconfig.h" | ||
6 | |||
7 | #define SLAVE_I2C_ADDRESS 0x32 | ||
8 | |||
9 | extern volatile bool isLeftHand; | ||
10 | |||
11 | // slave version of matix scan, defined in matrix.c | ||
12 | void matrix_slave_scan(void); | ||
13 | |||
14 | void split_keyboard_setup(void); | ||
15 | bool has_usb(void); | ||
16 | |||
17 | void matrix_master_OLED_init (void); | ||
18 | |||
19 | #endif | ||
diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index d413510ba..34b512d59 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk | |||
@@ -29,19 +29,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
30 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 30 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
31 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 31 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
32 | 32 | OLED_DRIVER_ENABLE = yes # OLED display | |
33 | CUSTOM_MATRIX = yes | 33 | SPLIT_KEYBOARD = yes |
34 | |||
35 | SRC += i2c.c | ||
36 | SRC += serial.c | ||
37 | SRC += ssd1306.c | ||
38 | |||
39 | # A workaround until #7089 is merged. | ||
40 | # serial.c must not be compiled with the -lto option. | ||
41 | # The current LIB_SRC has a side effect with the -fno-lto option, so use it. | ||
42 | LIB_SRC += serial.c | ||
43 | |||
44 | # if firmware size over limit, try this option | ||
45 | # CFLAGS += -flto | ||
46 | 34 | ||
47 | DEFAULT_FOLDER = lily58/rev1 | 35 | DEFAULT_FOLDER = lily58/rev1 |
diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h deleted file mode 100755 index 7e0c0847a..000000000 --- a/keyboards/lily58/serial.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | #ifndef SOFT_SERIAL_H | ||
2 | #define SOFT_SERIAL_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | |||
6 | // ///////////////////////////////////////////////////////////////// | ||
7 | // Need Soft Serial defines in config.h | ||
8 | // ///////////////////////////////////////////////////////////////// | ||
9 | // ex. | ||
10 | // #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||
11 | // OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 | ||
12 | // // 1: about 137kbps (default) | ||
13 | // // 2: about 75kbps | ||
14 | // // 3: about 39kbps | ||
15 | // // 4: about 26kbps | ||
16 | // // 5: about 20kbps | ||
17 | // | ||
18 | // //// USE Simple API (OLD API, compatible with let's split serial.c) | ||
19 | // ex. | ||
20 | // #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
21 | // #define SERIAL_MASTER_BUFFER_LENGTH 1 | ||
22 | // | ||
23 | // //// USE flexible API (using multi-type transaction function) | ||
24 | // #define SERIAL_USE_MULTI_TRANSACTION | ||
25 | // | ||
26 | // ///////////////////////////////////////////////////////////////// | ||
27 | |||
28 | |||
29 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
30 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ | ||
31 | #if SERIAL_SLAVE_BUFFER_LENGTH > 0 | ||
32 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
33 | #endif | ||
34 | #if SERIAL_MASTER_BUFFER_LENGTH > 0 | ||
35 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
36 | #endif | ||
37 | |||
38 | void serial_master_init(void); | ||
39 | void serial_slave_init(void); | ||
40 | int serial_update_buffers(void); | ||
41 | |||
42 | #endif // USE Simple API | ||
43 | |||
44 | // Soft Serial Transaction Descriptor | ||
45 | typedef struct _SSTD_t { | ||
46 | uint8_t *status; | ||
47 | uint8_t initiator2target_buffer_size; | ||
48 | uint8_t *initiator2target_buffer; | ||
49 | uint8_t target2initiator_buffer_size; | ||
50 | uint8_t *target2initiator_buffer; | ||
51 | } SSTD_t; | ||
52 | #define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) | ||
53 | |||
54 | // initiator is transaction start side | ||
55 | void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); | ||
56 | // target is interrupt accept side | ||
57 | void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); | ||
58 | |||
59 | // initiator resullt | ||
60 | #define TRANSACTION_END 0 | ||
61 | #define TRANSACTION_NO_RESPONSE 0x1 | ||
62 | #define TRANSACTION_DATA_ERROR 0x2 | ||
63 | #define TRANSACTION_TYPE_ERROR 0x4 | ||
64 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
65 | int soft_serial_transaction(void); | ||
66 | #else | ||
67 | int soft_serial_transaction(int sstd_index); | ||
68 | #endif | ||
69 | |||
70 | // target status | ||
71 | // *SSTD_t.status has | ||
72 | // initiator: | ||
73 | // TRANSACTION_END | ||
74 | // or TRANSACTION_NO_RESPONSE | ||
75 | // or TRANSACTION_DATA_ERROR | ||
76 | // target: | ||
77 | // TRANSACTION_DATA_ERROR | ||
78 | // or TRANSACTION_ACCEPTED | ||
79 | #define TRANSACTION_ACCEPTED 0x8 | ||
80 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
81 | int soft_serial_get_and_clean_status(int sstd_index); | ||
82 | #endif | ||
83 | |||
84 | #endif /* SOFT_SERIAL_H */ | ||
diff --git a/keyboards/lily58/serial_config.h b/keyboards/lily58/serial_config.h deleted file mode 100644 index 4fab8e8dd..000000000 --- a/keyboards/lily58/serial_config.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef SOFT_SERIAL_PIN | ||
2 | #define SOFT_SERIAL_PIN D2 | ||
3 | #define SERIAL_USE_MULTI_TRANSACTION | ||
4 | #endif | ||
diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c deleted file mode 100755 index 20c2738db..000000000 --- a/keyboards/lily58/ssd1306.c +++ /dev/null | |||
@@ -1,344 +0,0 @@ | |||
1 | #ifdef SSD1306OLED | ||
2 | |||
3 | #include "ssd1306.h" | ||
4 | #include "i2c.h" | ||
5 | #include <string.h> | ||
6 | #include "print.h" | ||
7 | #ifdef ADAFRUIT_BLE_ENABLE | ||
8 | #include "adafruit_ble.h" | ||
9 | #endif | ||
10 | #ifdef PROTOCOL_LUFA | ||
11 | #include "lufa.h" | ||
12 | #endif | ||
13 | #include "sendchar.h" | ||
14 | #include "timer.h" | ||
15 | |||
16 | extern const unsigned char font[] PROGMEM; | ||
17 | |||
18 | // Set this to 1 to help diagnose early startup problems | ||
19 | // when testing power-on with ble. Turn it off otherwise, | ||
20 | // as the latency of printing most of the debug info messes | ||
21 | // with the matrix scan, causing keys to drop. | ||
22 | #define DEBUG_TO_SCREEN 0 | ||
23 | |||
24 | //static uint16_t last_battery_update; | ||
25 | //static uint32_t vbat; | ||
26 | //#define BatteryUpdateInterval 10000 /* milliseconds */ | ||
27 | |||
28 | // 'last_flush' is declared as uint16_t, | ||
29 | // so this must be less than 65535 | ||
30 | #define ScreenOffInterval 60000 /* milliseconds */ | ||
31 | #if DEBUG_TO_SCREEN | ||
32 | static uint8_t displaying; | ||
33 | #endif | ||
34 | static uint16_t last_flush; | ||
35 | |||
36 | static bool force_dirty = true; | ||
37 | |||
38 | // Write command sequence. | ||
39 | // Returns true on success. | ||
40 | static inline bool _send_cmd1(uint8_t cmd) { | ||
41 | bool res = false; | ||
42 | |||
43 | if (i2c_start_write(SSD1306_ADDRESS)) { | ||
44 | xprintf("failed to start write to %d\n", SSD1306_ADDRESS); | ||
45 | goto done; | ||
46 | } | ||
47 | |||
48 | if (i2c_master_write(0x0 /* command byte follows */)) { | ||
49 | print("failed to write control byte\n"); | ||
50 | |||
51 | goto done; | ||
52 | } | ||
53 | |||
54 | if (i2c_master_write(cmd)) { | ||
55 | xprintf("failed to write command %d\n", cmd); | ||
56 | goto done; | ||
57 | } | ||
58 | res = true; | ||
59 | done: | ||
60 | i2c_master_stop(); | ||
61 | return res; | ||
62 | } | ||
63 | |||
64 | // Write 2-byte command sequence. | ||
65 | // Returns true on success | ||
66 | static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { | ||
67 | if (!_send_cmd1(cmd)) { | ||
68 | return false; | ||
69 | } | ||
70 | return _send_cmd1(opr); | ||
71 | } | ||
72 | |||
73 | // Write 3-byte command sequence. | ||
74 | // Returns true on success | ||
75 | static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { | ||
76 | if (!_send_cmd1(cmd)) { | ||
77 | return false; | ||
78 | } | ||
79 | if (!_send_cmd1(opr1)) { | ||
80 | return false; | ||
81 | } | ||
82 | return _send_cmd1(opr2); | ||
83 | } | ||
84 | |||
85 | #define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} | ||
86 | #define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} | ||
87 | #define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} | ||
88 | |||
89 | static void clear_display(void) { | ||
90 | matrix_clear(&display); | ||
91 | |||
92 | // Clear all of the display bits (there can be random noise | ||
93 | // in the RAM on startup) | ||
94 | send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); | ||
95 | send_cmd3(ColumnAddr, 0, DisplayWidth - 1); | ||
96 | |||
97 | if (i2c_start_write(SSD1306_ADDRESS)) { | ||
98 | goto done; | ||
99 | } | ||
100 | if (i2c_master_write(0x40)) { | ||
101 | // Data mode | ||
102 | goto done; | ||
103 | } | ||
104 | for (uint8_t row = 0; row < MatrixRows; ++row) { | ||
105 | for (uint8_t col = 0; col < DisplayWidth; ++col) { | ||
106 | i2c_master_write(0); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | display.dirty = false; | ||
111 | |||
112 | done: | ||
113 | i2c_master_stop(); | ||
114 | } | ||
115 | |||
116 | #if DEBUG_TO_SCREEN | ||
117 | #undef sendchar | ||
118 | static int8_t capture_sendchar(uint8_t c) { | ||
119 | sendchar(c); | ||
120 | iota_gfx_write_char(c); | ||
121 | |||
122 | if (!displaying) { | ||
123 | iota_gfx_flush(); | ||
124 | } | ||
125 | return 0; | ||
126 | } | ||
127 | #endif | ||
128 | |||
129 | bool iota_gfx_init(bool rotate) { | ||
130 | bool success = false; | ||
131 | |||
132 | i2c_master_init(); | ||
133 | send_cmd1(DisplayOff); | ||
134 | send_cmd2(SetDisplayClockDiv, 0x80); | ||
135 | send_cmd2(SetMultiPlex, DisplayHeight - 1); | ||
136 | |||
137 | send_cmd2(SetDisplayOffset, 0); | ||
138 | |||
139 | |||
140 | send_cmd1(SetStartLine | 0x0); | ||
141 | send_cmd2(SetChargePump, 0x14 /* Enable */); | ||
142 | send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); | ||
143 | |||
144 | if(rotate){ | ||
145 | // the following Flip the display orientation 180 degrees | ||
146 | send_cmd1(SegRemap); | ||
147 | send_cmd1(ComScanInc); | ||
148 | }else{ | ||
149 | // Flips the display orientation 0 degrees | ||
150 | send_cmd1(SegRemap | 0x1); | ||
151 | send_cmd1(ComScanDec); | ||
152 | } | ||
153 | |||
154 | send_cmd2(SetComPins, 0x2); | ||
155 | send_cmd2(SetContrast, 0x8f); | ||
156 | send_cmd2(SetPreCharge, 0xf1); | ||
157 | send_cmd2(SetVComDetect, 0x40); | ||
158 | send_cmd1(DisplayAllOnResume); | ||
159 | send_cmd1(NormalDisplay); | ||
160 | send_cmd1(DeActivateScroll); | ||
161 | send_cmd1(DisplayOn); | ||
162 | |||
163 | send_cmd2(SetContrast, 0); // Dim | ||
164 | |||
165 | clear_display(); | ||
166 | |||
167 | success = true; | ||
168 | |||
169 | iota_gfx_flush(); | ||
170 | |||
171 | #if DEBUG_TO_SCREEN | ||
172 | print_set_sendchar(capture_sendchar); | ||
173 | #endif | ||
174 | |||
175 | done: | ||
176 | return success; | ||
177 | } | ||
178 | |||
179 | bool iota_gfx_off(void) { | ||
180 | bool success = false; | ||
181 | |||
182 | send_cmd1(DisplayOff); | ||
183 | success = true; | ||
184 | |||
185 | done: | ||
186 | return success; | ||
187 | } | ||
188 | |||
189 | bool iota_gfx_on(void) { | ||
190 | bool success = false; | ||
191 | |||
192 | send_cmd1(DisplayOn); | ||
193 | success = true; | ||
194 | |||
195 | done: | ||
196 | return success; | ||
197 | } | ||
198 | |||
199 | void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { | ||
200 | *matrix->cursor = c; | ||
201 | ++matrix->cursor; | ||
202 | |||
203 | if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { | ||
204 | // We went off the end; scroll the display upwards by one line | ||
205 | memmove(&matrix->display[0], &matrix->display[1], | ||
206 | MatrixCols * (MatrixRows - 1)); | ||
207 | matrix->cursor = &matrix->display[MatrixRows - 1][0]; | ||
208 | memset(matrix->cursor, ' ', MatrixCols); | ||
209 | } | ||
210 | } | ||
211 | |||
212 | void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { | ||
213 | matrix->dirty = true; | ||
214 | |||
215 | if (c == '\n') { | ||
216 | // Clear to end of line from the cursor and then move to the | ||
217 | // start of the next line | ||
218 | uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; | ||
219 | |||
220 | while (cursor_col++ < MatrixCols) { | ||
221 | matrix_write_char_inner(matrix, ' '); | ||
222 | } | ||
223 | return; | ||
224 | } | ||
225 | |||
226 | matrix_write_char_inner(matrix, c); | ||
227 | } | ||
228 | |||
229 | void iota_gfx_write_char(uint8_t c) { | ||
230 | matrix_write_char(&display, c); | ||
231 | } | ||
232 | |||
233 | void matrix_write(struct CharacterMatrix *matrix, const char *data) { | ||
234 | const char *end = data + strlen(data); | ||
235 | while (data < end) { | ||
236 | matrix_write_char(matrix, *data); | ||
237 | ++data; | ||
238 | } | ||
239 | } | ||
240 | |||
241 | void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { | ||
242 | char data_ln[strlen(data)+2]; | ||
243 | snprintf(data_ln, sizeof(data_ln), "%s\n", data); | ||
244 | matrix_write(matrix, data_ln); | ||
245 | } | ||
246 | |||
247 | void iota_gfx_write(const char *data) { | ||
248 | matrix_write(&display, data); | ||
249 | } | ||
250 | |||
251 | void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { | ||
252 | while (true) { | ||
253 | uint8_t c = pgm_read_byte(data); | ||
254 | if (c == 0) { | ||
255 | return; | ||
256 | } | ||
257 | matrix_write_char(matrix, c); | ||
258 | ++data; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void iota_gfx_write_P(const char *data) { | ||
263 | matrix_write_P(&display, data); | ||
264 | } | ||
265 | |||
266 | void matrix_clear(struct CharacterMatrix *matrix) { | ||
267 | memset(matrix->display, ' ', sizeof(matrix->display)); | ||
268 | matrix->cursor = &matrix->display[0][0]; | ||
269 | matrix->dirty = true; | ||
270 | } | ||
271 | |||
272 | void iota_gfx_clear_screen(void) { | ||
273 | matrix_clear(&display); | ||
274 | } | ||
275 | |||
276 | void matrix_render(struct CharacterMatrix *matrix) { | ||
277 | last_flush = timer_read(); | ||
278 | iota_gfx_on(); | ||
279 | #if DEBUG_TO_SCREEN | ||
280 | ++displaying; | ||
281 | #endif | ||
282 | |||
283 | // Move to the home position | ||
284 | send_cmd3(PageAddr, 0, MatrixRows - 1); | ||
285 | send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); | ||
286 | |||
287 | if (i2c_start_write(SSD1306_ADDRESS)) { | ||
288 | goto done; | ||
289 | } | ||
290 | if (i2c_master_write(0x40)) { | ||
291 | // Data mode | ||
292 | goto done; | ||
293 | } | ||
294 | |||
295 | for (uint8_t row = 0; row < MatrixRows; ++row) { | ||
296 | for (uint8_t col = 0; col < MatrixCols; ++col) { | ||
297 | const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); | ||
298 | |||
299 | for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { | ||
300 | uint8_t colBits = pgm_read_byte(glyph + glyphCol); | ||
301 | i2c_master_write(colBits); | ||
302 | } | ||
303 | |||
304 | // 1 column of space between chars (it's not included in the glyph) | ||
305 | //i2c_master_write(0); | ||
306 | } | ||
307 | } | ||
308 | |||
309 | matrix->dirty = false; | ||
310 | |||
311 | done: | ||
312 | i2c_master_stop(); | ||
313 | #if DEBUG_TO_SCREEN | ||
314 | --displaying; | ||
315 | #endif | ||
316 | } | ||
317 | |||
318 | void iota_gfx_flush(void) { | ||
319 | matrix_render(&display); | ||
320 | } | ||
321 | |||
322 | __attribute__ ((weak)) | ||
323 | void iota_gfx_task_user(void) { | ||
324 | } | ||
325 | |||
326 | void iota_gfx_task(void) { | ||
327 | iota_gfx_task_user(); | ||
328 | |||
329 | if (display.dirty|| force_dirty) { | ||
330 | iota_gfx_flush(); | ||
331 | force_dirty = false; | ||
332 | } | ||
333 | |||
334 | if (timer_elapsed(last_flush) > ScreenOffInterval) { | ||
335 | iota_gfx_off(); | ||
336 | } | ||
337 | } | ||
338 | |||
339 | bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { | ||
340 | force_dirty = true; | ||
341 | return true; | ||
342 | } | ||
343 | |||
344 | #endif | ||
diff --git a/keyboards/lily58/ssd1306.h b/keyboards/lily58/ssd1306.h deleted file mode 100755 index 0ca093093..000000000 --- a/keyboards/lily58/ssd1306.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <stdbool.h> | ||
4 | #include <stdio.h> | ||
5 | #include "action.h" | ||
6 | |||
7 | enum ssd1306_cmds { | ||
8 | DisplayOff = 0xAE, | ||
9 | DisplayOn = 0xAF, | ||
10 | |||
11 | SetContrast = 0x81, | ||
12 | DisplayAllOnResume = 0xA4, | ||
13 | |||
14 | DisplayAllOn = 0xA5, | ||
15 | NormalDisplay = 0xA6, | ||
16 | InvertDisplay = 0xA7, | ||
17 | SetDisplayOffset = 0xD3, | ||
18 | SetComPins = 0xda, | ||
19 | SetVComDetect = 0xdb, | ||
20 | SetDisplayClockDiv = 0xD5, | ||
21 | SetPreCharge = 0xd9, | ||
22 | SetMultiPlex = 0xa8, | ||
23 | SetLowColumn = 0x00, | ||
24 | SetHighColumn = 0x10, | ||
25 | SetStartLine = 0x40, | ||
26 | |||
27 | SetMemoryMode = 0x20, | ||
28 | ColumnAddr = 0x21, | ||
29 | PageAddr = 0x22, | ||
30 | |||
31 | ComScanInc = 0xc0, | ||
32 | ComScanDec = 0xc8, | ||
33 | SegRemap = 0xa0, | ||
34 | SetChargePump = 0x8d, | ||
35 | ExternalVcc = 0x01, | ||
36 | SwitchCapVcc = 0x02, | ||
37 | |||
38 | ActivateScroll = 0x2f, | ||
39 | DeActivateScroll = 0x2e, | ||
40 | SetVerticalScrollArea = 0xa3, | ||
41 | RightHorizontalScroll = 0x26, | ||
42 | LeftHorizontalScroll = 0x27, | ||
43 | VerticalAndRightHorizontalScroll = 0x29, | ||
44 | VerticalAndLeftHorizontalScroll = 0x2a, | ||
45 | }; | ||
46 | |||
47 | // Controls the SSD1306 128x32 OLED display via i2c | ||
48 | |||
49 | #ifndef SSD1306_ADDRESS | ||
50 | #define SSD1306_ADDRESS 0x3C | ||
51 | #endif | ||
52 | |||
53 | #define DisplayHeight 32 | ||
54 | #define DisplayWidth 128 | ||
55 | |||
56 | #define FontHeight 8 | ||
57 | #define FontWidth 6 | ||
58 | |||
59 | #define MatrixRows (DisplayHeight / FontHeight) | ||
60 | #define MatrixCols (DisplayWidth / FontWidth) | ||
61 | |||
62 | struct CharacterMatrix { | ||
63 | uint8_t display[MatrixRows][MatrixCols]; | ||
64 | uint8_t *cursor; | ||
65 | bool dirty; | ||
66 | }; | ||
67 | |||
68 | struct CharacterMatrix display; | ||
69 | |||
70 | bool iota_gfx_init(bool rotate); | ||
71 | void iota_gfx_task(void); | ||
72 | bool iota_gfx_off(void); | ||
73 | bool iota_gfx_on(void); | ||
74 | void iota_gfx_flush(void); | ||
75 | void iota_gfx_write_char(uint8_t c); | ||
76 | void iota_gfx_write(const char *data); | ||
77 | void iota_gfx_write_P(const char *data); | ||
78 | void iota_gfx_clear_screen(void); | ||
79 | |||
80 | void iota_gfx_task_user(void); | ||
81 | |||
82 | void matrix_clear(struct CharacterMatrix *matrix); | ||
83 | void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); | ||
84 | void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); | ||
85 | void matrix_write(struct CharacterMatrix *matrix, const char *data); | ||
86 | void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); | ||
87 | void matrix_write_P(struct CharacterMatrix *matrix, const char *data); | ||
88 | void matrix_render(struct CharacterMatrix *matrix); | ||
89 | |||
90 | bool process_record_gfx(uint16_t keycode, keyrecord_t *record); | ||
diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index 9bcd771c4..5c80df0f0 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c | |||
@@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
187 | case QWERTY: | 187 | case QWERTY: |
188 | if (record->event.pressed) { | 188 | if (record->event.pressed) { |
189 | #ifdef AUDIO_ENABLE | 189 | #ifdef AUDIO_ENABLE |
190 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 190 | PLAY_SONG(tone_qwerty); |
191 | #endif | 191 | #endif |
192 | // persistent_default_layer_set(1UL<<_QWERTY); | 192 | // persistent_default_layer_set(1UL<<_QWERTY); |
193 | } | 193 | } |
@@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
196 | case COLEMAK: | 196 | case COLEMAK: |
197 | if (record->event.pressed) { | 197 | if (record->event.pressed) { |
198 | #ifdef AUDIO_ENABLE | 198 | #ifdef AUDIO_ENABLE |
199 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 199 | PLAY_SONG(tone_colemak); |
200 | #endif | 200 | #endif |
201 | // persistent_default_layer_set(1UL<<_COLEMAK); | 201 | // persistent_default_layer_set(1UL<<_COLEMAK); |
202 | } | 202 | } |
@@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
205 | case DVORAK: | 205 | case DVORAK: |
206 | if (record->event.pressed) { | 206 | if (record->event.pressed) { |
207 | #ifdef AUDIO_ENABLE | 207 | #ifdef AUDIO_ENABLE |
208 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 208 | PLAY_SONG(tone_dvorak); |
209 | #endif | 209 | #endif |
210 | // persistent_default_layer_set(1UL<<_DVORAK); | 210 | // persistent_default_layer_set(1UL<<_DVORAK); |
211 | } | 211 | } |
diff --git a/keyboards/meira/keymaps/grahampheath/keymap.c b/keyboards/meira/keymaps/grahampheath/keymap.c index cd0213787..ace172a2a 100644 --- a/keyboards/meira/keymaps/grahampheath/keymap.c +++ b/keyboards/meira/keymaps/grahampheath/keymap.c | |||
@@ -243,7 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
243 | case QWERTY: | 243 | case QWERTY: |
244 | if (record->event.pressed) { | 244 | if (record->event.pressed) { |
245 | #ifdef AUDIO_ENABLE | 245 | #ifdef AUDIO_ENABLE |
246 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 246 | PLAY_SONG(tone_qwerty); |
247 | #endif | 247 | #endif |
248 | } | 248 | } |
249 | return false; | 249 | return false; |
@@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
251 | case COLEMAK: | 251 | case COLEMAK: |
252 | if (record->event.pressed) { | 252 | if (record->event.pressed) { |
253 | #ifdef AUDIO_ENABLE | 253 | #ifdef AUDIO_ENABLE |
254 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 254 | PLAY_SONG(tone_colemak); |
255 | #endif | 255 | #endif |
256 | } | 256 | } |
257 | return false; | 257 | return false; |
@@ -259,7 +259,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
259 | case DVORAK: | 259 | case DVORAK: |
260 | if (record->event.pressed) { | 260 | if (record->event.pressed) { |
261 | #ifdef AUDIO_ENABLE | 261 | #ifdef AUDIO_ENABLE |
262 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 262 | PLAY_SONG(tone_dvorak); |
263 | #endif | 263 | #endif |
264 | } | 264 | } |
265 | return false; | 265 | return false; |
diff --git a/keyboards/meira/keymaps/takmiya/keymap.c b/keyboards/meira/keymaps/takmiya/keymap.c index 12dad6d69..bf693d8ad 100644 --- a/keyboards/meira/keymaps/takmiya/keymap.c +++ b/keyboards/meira/keymaps/takmiya/keymap.c | |||
@@ -153,7 +153,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
153 | case QWERTY: | 153 | case QWERTY: |
154 | if (record->event.pressed) { | 154 | if (record->event.pressed) { |
155 | #ifdef AUDIO_ENABLE | 155 | #ifdef AUDIO_ENABLE |
156 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 156 | PLAY_SONG(tone_qwerty); |
157 | #endif | 157 | #endif |
158 | // persistent_default_layer_set(1UL<<_QWERTY); | 158 | // persistent_default_layer_set(1UL<<_QWERTY); |
159 | } | 159 | } |
diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c index 528beb168..ea6e42a96 100644 --- a/keyboards/meishi/keymaps/default/keymap.c +++ b/keyboards/meishi/keymaps/default/keymap.c | |||
@@ -21,10 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
21 | ), | 21 | ), |
22 | }; | 22 | }; |
23 | 23 | ||
24 | const uint16_t PROGMEM fn_actions[] = { | ||
25 | |||
26 | }; | ||
27 | |||
28 | void matrix_init_user(void) { | 24 | void matrix_init_user(void) { |
29 | 25 | ||
30 | } | 26 | } |
diff --git a/keyboards/navi10/rev3/rules.mk b/keyboards/navi10/rev3/rules.mk index b98e7eb2d..d5a072f16 100644 --- a/keyboards/navi10/rev3/rules.mk +++ b/keyboards/navi10/rev3/rules.mk | |||
@@ -28,6 +28,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
28 | MIDI_ENABLE = no # MIDI support | 28 | MIDI_ENABLE = no # MIDI support |
29 | UNICODE_ENABLE = no # Unicode | 29 | UNICODE_ENABLE = no # Unicode |
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
31 | AUDIO_ENABLE = yes # Audio output on port C6 | 31 | AUDIO_ENABLE = no # Audio output |
32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
33 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | 33 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs |
diff --git a/keyboards/nomu30/keymaps/center_sprit/keymap.c b/keyboards/nomu30/keymaps/center_sprit/keymap.c index 8ef037f42..cc540b891 100644 --- a/keyboards/nomu30/keymaps/center_sprit/keymap.c +++ b/keyboards/nomu30/keymaps/center_sprit/keymap.c | |||
@@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
100 | ) | 100 | ) |
101 | }; | 101 | }; |
102 | 102 | ||
103 | uint16_t get_tapping_term(uint16_t keycode) { | 103 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
104 | switch (keycode) { | 104 | switch (keycode) { |
105 | case KC_BSLO: | 105 | case KC_BSLO: |
106 | return TAPPING_LAYER_TERM; | 106 | return TAPPING_LAYER_TERM; |
diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c index 203d0a7a4..fc2d26ad7 100644 --- a/keyboards/nomu30/keymaps/like_jis/keymap.c +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c | |||
@@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
100 | ) | 100 | ) |
101 | }; | 101 | }; |
102 | 102 | ||
103 | uint16_t get_tapping_term(uint16_t keycode) { | 103 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
104 | switch (keycode) { | 104 | switch (keycode) { |
105 | case KC_BSLO: | 105 | case KC_BSLO: |
106 | return TAPPING_LAYER_TERM; | 106 | return TAPPING_LAYER_TERM; |
diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_bh/config.h index 6c9be77b6..6c9be77b6 100644 --- a/keyboards/omnikey_blackheart/config.h +++ b/keyboards/omnikey_bh/config.h | |||
diff --git a/keyboards/omnikey_blackheart/info.json b/keyboards/omnikey_bh/info.json index 138c954b7..50d64e143 100644 --- a/keyboards/omnikey_blackheart/info.json +++ b/keyboards/omnikey_bh/info.json | |||
@@ -1,5 +1,5 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "Omnikey Blackheart PCB", | 2 | "keyboard_name": "Omnikey BH PCB", |
3 | "url": "", | 3 | "url": "", |
4 | "maintainer": "qmk", | 4 | "maintainer": "qmk", |
5 | "width": 25.5, | 5 | "width": 25.5, |
diff --git a/keyboards/omnikey_blackheart/keymaps/default/keymap.c b/keyboards/omnikey_bh/keymaps/default/keymap.c index e4865adde..e4865adde 100644 --- a/keyboards/omnikey_blackheart/keymaps/default/keymap.c +++ b/keyboards/omnikey_bh/keymaps/default/keymap.c | |||
diff --git a/keyboards/omnikey_bh/omnikey_bh.c b/keyboards/omnikey_bh/omnikey_bh.c new file mode 100644 index 000000000..c2f52f30c --- /dev/null +++ b/keyboards/omnikey_bh/omnikey_bh.c | |||
@@ -0,0 +1 @@ | |||
#include "omnikey_bh.h" | |||
diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.h b/keyboards/omnikey_bh/omnikey_bh.h index 5d2d948c4..f36184f39 100644 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.h +++ b/keyboards/omnikey_bh/omnikey_bh.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef omnikey_blackheart | 1 | #pragma once |
2 | #define omnikey_blackheart | ||
3 | 2 | ||
4 | #include "quantum.h" | 3 | #include "quantum.h" |
5 | 4 | ||
@@ -18,5 +17,3 @@ | |||
18 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ | 17 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ |
19 | { K500, K501, K502, K503, K504, KC_NO, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ | 18 | { K500, K501, K502, K503, K504, KC_NO, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ |
20 | } | 19 | } |
21 | |||
22 | #endif \ No newline at end of file | ||
diff --git a/keyboards/omnikey_blackheart/readme.md b/keyboards/omnikey_bh/readme.md index 04bb49818..7de22f29a 100644 --- a/keyboards/omnikey_blackheart/readme.md +++ b/keyboards/omnikey_bh/readme.md | |||
@@ -1,14 +1,14 @@ | |||
1 | Omnikey Blackheart PCB | 1 | Omnikey BH PCB |
2 | === | 2 | === |
3 | 3 | ||
4 | A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. | 4 | A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. |
5 | 5 | ||
6 | Keyboard Maintainer: QMK Community and blindassassin111 | 6 | Keyboard Maintainer: QMK Community and blindassassin111 |
7 | Hardware Supported: Omnikey blackheart PCB | 7 | Hardware Supported: Omnikey BH PCB |
8 | Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html | 8 | Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html |
9 | 9 | ||
10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
11 | 11 | ||
12 | make omnikey_blackheart:default | 12 | make omnikey_bh:default |
13 | 13 | ||
14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. | 14 | See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. |
diff --git a/keyboards/omnikey_blackheart/rules.mk b/keyboards/omnikey_bh/rules.mk index 59f163e2f..59f163e2f 100644 --- a/keyboards/omnikey_blackheart/rules.mk +++ b/keyboards/omnikey_bh/rules.mk | |||
diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.c b/keyboards/omnikey_blackheart/omnikey_blackheart.c deleted file mode 100644 index e54047fa6..000000000 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "omnikey_blackheart.h" | ||
diff --git a/keyboards/pancake/feather/readme.md b/keyboards/pancake/feather/readme.md deleted file mode 100644 index 8b1378917..000000000 --- a/keyboards/pancake/feather/readme.md +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | |||
diff --git a/keyboards/pancake/keymaps/default/readme.md b/keyboards/pancake/keymaps/default/readme.md deleted file mode 100644 index 8b1378917..000000000 --- a/keyboards/pancake/keymaps/default/readme.md +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | |||
diff --git a/keyboards/pancake/promicro/readme.md b/keyboards/pancake/promicro/readme.md deleted file mode 100644 index 8b1378917..000000000 --- a/keyboards/pancake/promicro/readme.md +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | |||
diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index c028e7949..8835bfc87 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c | |||
@@ -26,22 +26,12 @@ extern keymap_config_t keymap_config; | |||
26 | // Func macro definitions. | 26 | // Func macro definitions. |
27 | #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER | 27 | #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER |
28 | #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE | 28 | #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE |
29 | #define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) | 29 | #define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) |
30 | #define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift | 30 | #define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift |
31 | #define ZM_NRM FUNC(4) // Zoom normal | 31 | #define ZM_NRM C(KC_0) // Zoom normal |
32 | #define ZM_IN FUNC(5) // Zoom out | 32 | #define ZM_IN C(KC_MINS) // Zoom out |
33 | #define ZM_OUT FUNC(6) // Zoom in | 33 | #define ZM_OUT C(KC_PLUS) // Zoom in |
34 | #define EM_UNDO FUNC(7) // Emacs Undo | 34 | #define EM_UNDO C(KC_UNDS) // Emacs Undo |
35 | |||
36 | // Enable these functions using FUNC(n) macro. | ||
37 | const uint16_t PROGMEM fn_actions[] = { | ||
38 | [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), | ||
39 | [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
40 | [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), | ||
41 | [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), | ||
42 | [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), | ||
43 | [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), | ||
44 | }; | ||
45 | 35 | ||
46 | // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l | 36 | // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l |
47 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 37 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c index 6a497641e..6e9c69333 100644 --- a/keyboards/planck/keymaps/angerthosenear/keymap.c +++ b/keyboards/planck/keymaps/angerthosenear/keymap.c | |||
@@ -16,21 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, |
19 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | 19 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, |
20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, | 20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, |
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
22 | ), | 22 | ), |
23 | [3] = LAYOUT_planck_grid( /* LOWER */ | 23 | [3] = LAYOUT_planck_grid( /* LOWER */ |
24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL, | 24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL, |
25 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), | 25 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), |
26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | 26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, |
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END | 27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | |||
32 | const uint16_t PROGMEM fn_actions[] = { | ||
33 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
34 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
35 | |||
36 | }; | ||
diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c index 16bca7951..3461ca955 100644 --- a/keyboards/planck/keymaps/austin/keymap.c +++ b/keyboards/planck/keymaps/austin/keymap.c | |||
@@ -12,25 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | 12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, |
13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | 13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, |
14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
15 | KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 15 | DF(0), KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
19 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | 19 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, |
20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, | 20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, |
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
22 | ), | 22 | ), |
23 | [3] = LAYOUT_planck_grid( /* LOWER */ | 23 | [3] = LAYOUT_planck_grid( /* LOWER */ |
24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, | 24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, |
25 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), | 25 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), |
26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | 26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, |
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | |||
32 | const uint16_t PROGMEM fn_actions[] = { | ||
33 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
34 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
35 | |||
36 | }; | ||
diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index ade4ea30f..66533e53a 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c | |||
@@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
86 | */ | 86 | */ |
87 | [BASE_QWERTY_LAYER] = LAYOUT_planck_grid( | 87 | [BASE_QWERTY_LAYER] = LAYOUT_planck_grid( |
88 | TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, | 88 | TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, |
89 | F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, F(6), | 89 | MT(MOD_LCTL, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, MT(MOD_RCTL, KC_ENT), |
90 | KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, | 90 | KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, |
91 | LT_GUIL, ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), LT_GUIR | 91 | LT_GUIL, ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), LT_GUIR |
92 | ), | 92 | ), |
@@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
140 | */ | 140 | */ |
141 | [LOWER_LAYER] = LAYOUT_planck_grid( | 141 | [LOWER_LAYER] = LAYOUT_planck_grid( |
142 | LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3), | 142 | LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3), |
143 | F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6), | 143 | MT(MOD_LCTL, KC_TAB), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MT(MOD_RCTL, KC_ENT), |
144 | KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, | 144 | KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, |
145 | LT_GUIL, ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), LT_GUIR | 145 | LT_GUIL, ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), LT_GUIR |
146 | ), | 146 | ), |
@@ -224,12 +224,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
224 | ) | 224 | ) |
225 | }; | 225 | }; |
226 | 226 | ||
227 | const uint16_t PROGMEM fn_actions[] = { | ||
228 | // Modifiers | ||
229 | [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), | ||
230 | [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), | ||
231 | }; | ||
232 | |||
233 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 227 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
234 | { | 228 | { |
235 | switch(id) { | 229 | switch(id) { |
diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index 23af2277b..46d077ddc 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c | |||
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
45 | [_QWERTY] = LAYOUT_planck_grid( | 45 | [_QWERTY] = LAYOUT_planck_grid( |
46 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | 46 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
47 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 47 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
48 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(0) , | 48 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), |
49 | KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 49 | KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
50 | ), | 50 | ), |
51 | 51 | ||
@@ -179,10 +179,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
179 | 179 | ||
180 | }; | 180 | }; |
181 | 181 | ||
182 | const uint16_t PROGMEM fn_actions[] = { | ||
183 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
184 | }; | ||
185 | |||
186 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 182 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
187 | { | 183 | { |
188 | // MACRODOWN only works in this function | 184 | // MACRODOWN only works in this function |
diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c index 29d050223..4a3adba51 100644 --- a/keyboards/planck/keymaps/charlie/keymap.c +++ b/keyboards/planck/keymaps/charlie/keymap.c | |||
@@ -2,52 +2,21 @@ | |||
2 | 2 | ||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
4 | [0] = LAYOUT_planck_grid( /* Native */ | 4 | [0] = LAYOUT_planck_grid( /* Native */ |
5 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2), | 5 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DF(1), |
6 | KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | 6 | KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, |
7 | KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 7 | KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
8 | KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 8 | KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
9 | ), | 9 | ), |
10 | [1] = LAYOUT_planck_grid( /* QWERTY->PHOTOSHOP */ | 10 | [1] = LAYOUT_planck_grid( /* QWERTY->PHOTOSHOP */ |
11 | KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1), | 11 | KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, DF(0), |
12 | KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, | 12 | KC_O, KC_G, KC_S, KC_U, KC_T, C(KC_R), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, |
13 | KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9), | 13 | KC_TAB, C(S(A(KC_F9))), C(S(KC_I)), S(KC_M), KC_F1, A(KC_BSPC), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, C(S(A(KC_F12))), |
14 | KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14 | 14 | KC_COMM, KC_DOT, KC_R, C(KC_H), MO(2), KC_SPC, C(KC_S), KC_F2, C(S(A(KC_X))), KC_F3, KC_F14 |
15 | ), | 15 | ), |
16 | [2] = LAYOUT_planck_grid( /* 2: FUNC(3 PHOTOSHOP */ | 16 | [2] = LAYOUT_planck_grid( /* PHOTOSHOP */ |
17 | KC_ESC, FUNC(25), FUNC(26), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 17 | KC_ESC, C(KC_Z), C(KC_Y), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, |
18 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FUNC(19), FUNC(20), FUNC(21), | 18 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, C(S(A(KC_F7))), C(S(A(KC_F8))), C(S(KC_X)), |
19 | KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO, | 19 | KC_C, KC_NO, S(KC_MINS), C(S(KC_I)), KC_NO, C(S(KC_BSPC)), KC_NO, KC_NO, KC_NO, KC_NO, C(S(KC_F5)), KC_NO, |
20 | FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO | 20 | C(KC_F2), C(S(KC_F2)), C(KC_0), C(S(KC_H)), MO(2), KC_SPC, C(S(KC_S)), KC_NO, KC_NO, KC_F24, KC_NO |
21 | ) | 21 | ) |
22 | }; | 22 | }; |
23 | |||
24 | const uint16_t PROGMEM fn_actions[] = { | ||
25 | [1] = ACTION_DEFAULT_LAYER_SET(0), // set Qwerty layout | ||
26 | [2] = ACTION_DEFAULT_LAYER_SET(1), // set Photoshop presets | ||
27 | |||
28 | [4] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F9), // photo folder AHK | ||
29 | [5] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_I), // select inverse | ||
30 | [6] = ACTION_MODS_KEY(MOD_LSFT, KC_M), // marquee select | ||
31 | [7] = ACTION_MODS_KEY(MOD_LALT, KC_BSPC), // fill | ||
32 | [8] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_X), // warp | ||
33 | [9] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT | MOD_LSFT, KC_F12), // merge all new layer | ||
34 | [10] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), // zoom out | ||
35 | [11] = ACTION_MODS_KEY(MOD_LCTL, KC_H), // RBG sliders | ||
36 | [12] = ACTION_MODS_KEY(MOD_LCTL, KC_S), // save | ||
37 | [13] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_F5), // layer mask from transparancy | ||
38 | [14] = ACTION_MODS_KEY(MOD_LCTL, KC_F2), // stroke | ||
39 | [15] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_F2), // stroke layer | ||
40 | [16] = ACTION_MODS_KEY(MOD_LCTL, KC_0), // zoom 0 | ||
41 | [17] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_H), // HSV sliders | ||
42 | [18] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_S), // save as | ||
43 | [19] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F7), // gaussian blur | ||
44 | [20] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F8), // motion blur | ||
45 | [21] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_X), // liquify filter | ||
46 | [22] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // prev layer blending | ||
47 | [23] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_BSPC), // KC_NOrmal layer blending | ||
48 | [24] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // next layer blending | ||
49 | [25] = ACTION_MODS_KEY(MOD_LCTL, KC_Z), // step back | ||
50 | [26] = ACTION_MODS_KEY(MOD_LCTL, KC_Y), // step forward | ||
51 | [27] = ACTION_MODS_KEY(MOD_LCTL, KC_R), // rasterize | ||
52 | |||
53 | }; | ||
diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 018cff4e5..805ebd7fd 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c | |||
@@ -23,8 +23,8 @@ enum planck_keycodes { | |||
23 | }; | 23 | }; |
24 | 24 | ||
25 | // Key code names | 25 | // Key code names |
26 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift | 26 | #define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift |
27 | #define LOCK FUNC(1) | 27 | #define LOCK TG(_LOCKED) |
28 | #define KC_PSTE KC_PASTE | 28 | #define KC_PSTE KC_PASTE |
29 | 29 | ||
30 | #ifdef TAP_DANCE_ENABLE | 30 | #ifdef TAP_DANCE_ENABLE |
@@ -41,12 +41,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
41 | }; | 41 | }; |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | // Function definitions | ||
45 | const uint16_t PROGMEM fn_actions[] = { | ||
46 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
47 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) | ||
48 | }; | ||
49 | |||
50 | // Layout definitions | 44 | // Layout definitions |
51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 45 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
52 | 46 | ||
diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c index 57aafed2a..d093efe04 100644 --- a/keyboards/planck/keymaps/david/keymap.c +++ b/keyboards/planck/keymaps/david/keymap.c | |||
@@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | 12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, |
13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | 13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, |
14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
15 | KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 15 | DF(0), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
19 | KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | 19 | KC_TRNS, DF(0), DF(1), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, |
20 | KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS, | 20 | KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS, |
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
22 | ), | 22 | ), |
23 | [3] = LAYOUT_planck_grid( /* LOWER */ | 23 | [3] = LAYOUT_planck_grid( /* LOWER */ |
24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, | 24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, |
25 | KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), | 25 | KC_TRNS, DF(0), DF(1), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), |
26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | 26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, |
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | const uint16_t PROGMEM fn_actions[] = { | ||
32 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
33 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
34 | |||
35 | }; | ||
diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index a244da2e4..1055c754f 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c | |||
@@ -34,8 +34,8 @@ enum planck_keycodes { | |||
34 | #include "dynamic_macro.h" | 34 | #include "dynamic_macro.h" |
35 | 35 | ||
36 | // Key code names | 36 | // Key code names |
37 | #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift | 37 | #define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift |
38 | #define LOCK FUNC(1) | 38 | #define LOCK TG(_LOCKED) |
39 | #define KC_PSTE KC_PASTE | 39 | #define KC_PSTE KC_PASTE |
40 | #define ZOOM_IN LCTL(KC_EQL) | 40 | #define ZOOM_IN LCTL(KC_EQL) |
41 | #define ZOOM_OUT LCTL(KC_MINS) | 41 | #define ZOOM_OUT LCTL(KC_MINS) |
@@ -55,12 +55,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { | |||
55 | }; | 55 | }; |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | // Function definitions | ||
59 | const uint16_t PROGMEM fn_actions[] = { | ||
60 | [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
61 | [1] = ACTION_LAYER_TOGGLE(_LOCKED) | ||
62 | }; | ||
63 | |||
64 | // Layout definitions | 58 | // Layout definitions |
65 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 59 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
66 | 60 | ||
diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c index 17b1bef01..6012c068a 100644 --- a/keyboards/planck/keymaps/dzobert/keymap.c +++ b/keyboards/planck/keymaps/dzobert/keymap.c | |||
@@ -5,14 +5,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
5 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, | 5 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, |
6 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, | 6 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, |
7 | KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 7 | KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
8 | KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 8 | DF(1), KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
9 | // Space is repeated to accommadate for both spacebar wiring positions | 9 | // Space is repeated to accommadate for both spacebar wiring positions |
10 | ), | 10 | ), |
11 | [1] = LAYOUT_planck_grid( /* Colemak */ | 11 | [1] = LAYOUT_planck_grid( /* Colemak */ |
12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB, | 12 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB, |
13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC, | 13 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC, |
14 | KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 14 | KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
15 | KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 15 | DF(0), KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | 18 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, |
@@ -27,9 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS | 27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | const uint16_t PROGMEM fn_actions[] = { | ||
32 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
33 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
34 | |||
35 | }; | ||
diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 4a8a7d0c5..3beadd8e2 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c | |||
@@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
187 | case QWERTY: | 187 | case QWERTY: |
188 | if (record->event.pressed) { | 188 | if (record->event.pressed) { |
189 | #ifdef AUDIO_ENABLE | 189 | #ifdef AUDIO_ENABLE |
190 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 190 | PLAY_SONG(tone_qwerty); |
191 | #endif | 191 | #endif |
192 | persistant_default_layer_set(1UL<<_QWERTY); | 192 | persistant_default_layer_set(1UL<<_QWERTY); |
193 | } | 193 | } |
@@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
196 | case COLEMAK: | 196 | case COLEMAK: |
197 | if (record->event.pressed) { | 197 | if (record->event.pressed) { |
198 | #ifdef AUDIO_ENABLE | 198 | #ifdef AUDIO_ENABLE |
199 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 199 | PLAY_SONG(tone_colemak); |
200 | #endif | 200 | #endif |
201 | persistant_default_layer_set(1UL<<_COLEMAK); | 201 | persistant_default_layer_set(1UL<<_COLEMAK); |
202 | } | 202 | } |
@@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
205 | case DVORAK: | 205 | case DVORAK: |
206 | if (record->event.pressed) { | 206 | if (record->event.pressed) { |
207 | #ifdef AUDIO_ENABLE | 207 | #ifdef AUDIO_ENABLE |
208 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 208 | PLAY_SONG(tone_dvorak); |
209 | #endif | 209 | #endif |
210 | persistant_default_layer_set(1UL<<_DVORAK); | 210 | persistant_default_layer_set(1UL<<_DVORAK); |
211 | } | 211 | } |
@@ -246,7 +246,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
246 | if (record->event.pressed) { | 246 | if (record->event.pressed) { |
247 | #ifdef AUDIO_ENABLE | 247 | #ifdef AUDIO_ENABLE |
248 | stop_all_notes(); | 248 | stop_all_notes(); |
249 | PLAY_NOTE_ARRAY(tone_plover, false, 0); | 249 | PLAY_SONG(tone_plover); |
250 | #endif | 250 | #endif |
251 | layer_off(_RAISE); | 251 | layer_off(_RAISE); |
252 | layer_off(_LOWER); | 252 | layer_off(_LOWER); |
@@ -264,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
264 | case EXT_PLV: | 264 | case EXT_PLV: |
265 | if (record->event.pressed) { | 265 | if (record->event.pressed) { |
266 | #ifdef AUDIO_ENABLE | 266 | #ifdef AUDIO_ENABLE |
267 | PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); | 267 | PLAY_SONG(tone_plover_gb); |
268 | #endif | 268 | #endif |
269 | layer_off(_PLOVER); | 269 | layer_off(_PLOVER); |
270 | } | 270 | } |
@@ -285,12 +285,12 @@ void matrix_init_user(void) { | |||
285 | void startup_user() | 285 | void startup_user() |
286 | { | 286 | { |
287 | _delay_ms(20); // gets rid of tick | 287 | _delay_ms(20); // gets rid of tick |
288 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | 288 | PLAY_SONG(tone_startup); |
289 | } | 289 | } |
290 | 290 | ||
291 | void shutdown_user() | 291 | void shutdown_user() |
292 | { | 292 | { |
293 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 293 | PLAY_SONG(tone_goodbye); |
294 | _delay_ms(150); | 294 | _delay_ms(150); |
295 | stop_all_notes(); | 295 | stop_all_notes(); |
296 | } | 296 | } |
@@ -302,7 +302,7 @@ void music_on_user(void) | |||
302 | 302 | ||
303 | void music_scale_user(void) | 303 | void music_scale_user(void) |
304 | { | 304 | { |
305 | PLAY_NOTE_ARRAY(music_scale, false, 0); | 305 | PLAY_SONG(music_scale); |
306 | } | 306 | } |
307 | 307 | ||
308 | #endif | 308 | #endif |
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index 924a8c35c..305fb6e75 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c | |||
@@ -36,21 +36,11 @@ extern keymap_config_t keymap_config; | |||
36 | // Func macro definitions. | 36 | // Func macro definitions. |
37 | #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER | 37 | #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER |
38 | #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE | 38 | #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE |
39 | #define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) | 39 | #define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) |
40 | #define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift | 40 | #define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift |
41 | #define ZM_NRM FUNC(4) // Zoom normal | 41 | #define ZM_NRM C(KC_0) // Zoom normal |
42 | #define ZM_IN FUNC(5) // Zoom out | 42 | #define ZM_IN C(KC_MINS) // Zoom out |
43 | #define ZM_OUT FUNC(6) // Zoom in | 43 | #define ZM_OUT C(KC_PLUS) // Zoom in |
44 | |||
45 | // Enable these functions using FUNC(n) macro. | ||
46 | const uint16_t PROGMEM fn_actions[] = { | ||
47 | [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), | ||
48 | [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
49 | [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), | ||
50 | [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), | ||
51 | [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), | ||
52 | [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), | ||
53 | }; | ||
54 | 44 | ||
55 | // This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO | 45 | // This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO |
56 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 46 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index e036d8a5a..aeb36b368 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c | |||
@@ -198,10 +198,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
198 | 198 | ||
199 | }; | 199 | }; |
200 | 200 | ||
201 | const uint16_t PROGMEM fn_actions[] = { | ||
202 | ACTION_SWAP_HANDS_TAP_KEY(KC_SPC), | ||
203 | }; | ||
204 | |||
205 | #ifdef AUDIO_ENABLE | 201 | #ifdef AUDIO_ENABLE |
206 | 202 | ||
207 | float tone_startup[][2] = SONG(STARTUP_SOUND); | 203 | float tone_startup[][2] = SONG(STARTUP_SOUND); |
@@ -230,7 +226,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
230 | case QWERTY: | 226 | case QWERTY: |
231 | if (record->event.pressed) { | 227 | if (record->event.pressed) { |
232 | #ifdef AUDIO_ENABLE | 228 | #ifdef AUDIO_ENABLE |
233 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 229 | PLAY_SONG(tone_qwerty); |
234 | #endif | 230 | #endif |
235 | persistant_default_layer_set(1UL<<_QWERTY); | 231 | persistant_default_layer_set(1UL<<_QWERTY); |
236 | } | 232 | } |
@@ -239,7 +235,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
239 | case COLEMAK: | 235 | case COLEMAK: |
240 | if (record->event.pressed) { | 236 | if (record->event.pressed) { |
241 | #ifdef AUDIO_ENABLE | 237 | #ifdef AUDIO_ENABLE |
242 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 238 | PLAY_SONG(tone_colemak); |
243 | #endif | 239 | #endif |
244 | persistant_default_layer_set(1UL<<_COLEMAK); | 240 | persistant_default_layer_set(1UL<<_COLEMAK); |
245 | } | 241 | } |
@@ -248,7 +244,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
248 | case DVORAK: | 244 | case DVORAK: |
249 | if (record->event.pressed) { | 245 | if (record->event.pressed) { |
250 | #ifdef AUDIO_ENABLE | 246 | #ifdef AUDIO_ENABLE |
251 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | 247 | PLAY_SONG(tone_dvorak); |
252 | #endif | 248 | #endif |
253 | persistant_default_layer_set(1UL<<_DVORAK); | 249 | persistant_default_layer_set(1UL<<_DVORAK); |
254 | } | 250 | } |
@@ -289,7 +285,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
289 | if (record->event.pressed) { | 285 | if (record->event.pressed) { |
290 | #ifdef AUDIO_ENABLE | 286 | #ifdef AUDIO_ENABLE |
291 | stop_all_notes(); | 287 | stop_all_notes(); |
292 | PLAY_NOTE_ARRAY(tone_plover, false, 0); | 288 | PLAY_SONG(tone_plover); |
293 | #endif | 289 | #endif |
294 | layer_off(_RAISE); | 290 | layer_off(_RAISE); |
295 | layer_off(_LOWER); | 291 | layer_off(_LOWER); |
@@ -307,7 +303,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
307 | case EXT_PLV: | 303 | case EXT_PLV: |
308 | if (record->event.pressed) { | 304 | if (record->event.pressed) { |
309 | #ifdef AUDIO_ENABLE | 305 | #ifdef AUDIO_ENABLE |
310 | PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); | 306 | PLAY_SONG(tone_plover_gb); |
311 | #endif | 307 | #endif |
312 | layer_off(_PLOVER); | 308 | layer_off(_PLOVER); |
313 | } | 309 | } |
@@ -331,12 +327,12 @@ void startup_user() | |||
331 | rgblight_mode(RGB_MATRIX_CYCLE_ALL); | 327 | rgblight_mode(RGB_MATRIX_CYCLE_ALL); |
332 | #endif //RGB_matrix | 328 | #endif //RGB_matrix |
333 | wait_ms(20); // gets rid of tick | 329 | wait_ms(20); // gets rid of tick |
334 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | 330 | PLAY_SONG(tone_startup); |
335 | } | 331 | } |
336 | 332 | ||
337 | void shutdown_user() | 333 | void shutdown_user() |
338 | { | 334 | { |
339 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 335 | PLAY_SONG(tone_goodbye); |
340 | wait_ms(150); | 336 | wait_ms(150); |
341 | stop_all_notes(); | 337 | stop_all_notes(); |
342 | } | 338 | } |
@@ -348,7 +344,7 @@ void music_on_user(void) | |||
348 | 344 | ||
349 | void music_scale_user(void) | 345 | void music_scale_user(void) |
350 | { | 346 | { |
351 | PLAY_NOTE_ARRAY(music_scale, false, 0); | 347 | PLAY_SONG(music_scale); |
352 | } | 348 | } |
353 | 349 | ||
354 | #endif | 350 | #endif |
diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c index b759a86ce..49b2948e6 100644 --- a/keyboards/planck/keymaps/joe/keymap.c +++ b/keyboards/planck/keymaps/joe/keymap.c | |||
@@ -7,25 +7,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
7 | [0] = LAYOUT_planck_grid( /* Joe colemak */ | 7 | [0] = LAYOUT_planck_grid( /* Joe colemak */ |
8 | FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, | 8 | FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, |
9 | KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , | 9 | KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , |
10 | F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, | 10 | MT(MOD_LSFT, KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, |
11 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT | 11 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT |
12 | ), | 12 | ), |
13 | [1] = LAYOUT_planck_grid( /* Joe soft Colemak */ | 13 | [1] = LAYOUT_planck_grid( /* Joe soft Colemak */ |
14 | FN3_ESC, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS, | 14 | FN3_ESC, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS, |
15 | KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT , | 15 | KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT , |
16 | F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, | 16 | MT(MOD_LSFT, KC_TAB), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, |
17 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT | 17 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT |
18 | ), | 18 | ), |
19 | [2] = LAYOUT_planck_grid( /* Joe NUMPAD */ | 19 | [2] = LAYOUT_planck_grid( /* Joe NUMPAD */ |
20 | FN3_ESC, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 , | 20 | FN3_ESC, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 , |
21 | KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 , | 21 | KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 , |
22 | F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 , | 22 | MT(MOD_LSFT, KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 , |
23 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT | 23 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT |
24 | ), | 24 | ), |
25 | [3] = LAYOUT_planck_grid( /* Joe 1337 haxOr5*/ | 25 | [3] = LAYOUT_planck_grid( /* Joe 1337 haxOr5*/ |
26 | FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, | 26 | FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, |
27 | KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT , | 27 | KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT , |
28 | F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, | 28 | MT(MOD_LSFT, KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, |
29 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT | 29 | KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT |
30 | ), | 30 | ), |
31 | [4] = LAYOUT_planck_grid( /* Joe LOWER fn1 */ | 31 | [4] = LAYOUT_planck_grid( /* Joe LOWER fn1 */ |
@@ -44,21 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
44 | KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , | 44 | KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , |
45 | KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET , | 45 | KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET , |
46 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , | 46 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , |
47 | F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) | 47 | DF(0), DF(1), DF(2), DF(3), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) |
48 | ) | 48 | ) |
49 | }; | 49 | }; |
50 | 50 | ||
51 | const uint16_t PROGMEM fn_actions[] = { | ||
52 | /* toggle layers */ | ||
53 | [6] = ACTION_DEFAULT_LAYER_SET(0), | ||
54 | [7] = ACTION_DEFAULT_LAYER_SET(1), | ||
55 | [8] = ACTION_DEFAULT_LAYER_SET(2), | ||
56 | [9] = ACTION_DEFAULT_LAYER_SET(3), | ||
57 | |||
58 | /* tab on tap, shift on hold */ | ||
59 | [15] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), | ||
60 | }; | ||
61 | |||
62 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 51 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
63 | { | 52 | { |
64 | switch (id) { | 53 | switch (id) { |
diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c index a788aa859..896dfe939 100644 --- a/keyboards/planck/keymaps/kyle/keymap.c +++ b/keyboards/planck/keymaps/kyle/keymap.c | |||
@@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
12 | KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | 12 | KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, |
13 | KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | 13 | KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, |
14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | 14 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, |
15 | KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | 15 | DF(0), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT |
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
19 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | 19 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, |
20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, | 20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, |
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
22 | ), | 22 | ), |
23 | [3] = LAYOUT_planck_grid( /* LOWER */ | 23 | [3] = LAYOUT_planck_grid( /* LOWER */ |
24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, | 24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, |
25 | KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), | 25 | KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), |
26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, | 26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, |
27 | BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 27 | BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | const uint16_t PROGMEM fn_actions[] = { | ||
32 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
33 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
34 | |||
35 | }; | ||
diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 9bd4b7a60..26ca6a550 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c | |||
@@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
57 | * |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P | | 57 | * |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P | |
58 | * `-----------------------------------------------------------------------' | 58 | * `-----------------------------------------------------------------------' |
59 | */ | 59 | */ |
60 | KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4), | 60 | KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, TG(5), |
61 | KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12), | 61 | KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12), |
62 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11), | 62 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11), |
63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY | 63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY |
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
105 | * | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right| | 105 | * | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right| |
106 | * `-----------------------------------------------------------------------' | 106 | * `-----------------------------------------------------------------------' |
107 | */ | 107 | */ |
108 | MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4), | 108 | MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, TG(5), |
109 | KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN, | 109 | KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN, |
110 | KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH, | 110 | KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH, |
111 | KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT | 111 | KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT |
@@ -129,11 +129,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
129 | ), | 129 | ), |
130 | }; | 130 | }; |
131 | 131 | ||
132 | const uint16_t PROGMEM fn_actions[] = { | ||
133 | [4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming | ||
134 | [5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap | ||
135 | }; | ||
136 | |||
137 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 132 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
138 | { | 133 | { |
139 | switch(id) { | 134 | switch(id) { |
diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c index 20982a24e..7525e345b 100644 --- a/keyboards/planck/keymaps/matrixman/keymap.c +++ b/keyboards/planck/keymaps/matrixman/keymap.c | |||
@@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
14 | LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P) | 14 | LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P) |
15 | ,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT | 15 | ,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT |
16 | ,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) | 16 | ,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) |
17 | ,KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT | 17 | ,KC_LCTRL, KC_LGUI, LM(_NAV_ALT, MOD_LALT), KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, LM(_NAV_ALT, MOD_LALT), KC_RCTRL, KC_ENT |
18 | ), | 18 | ), |
19 | // accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was | 19 | // accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was |
20 | [_SYMB_L] = LAYOUT_planck_grid( | 20 | [_SYMB_L] = LAYOUT_planck_grid( |
@@ -53,11 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
53 | ) | 53 | ) |
54 | }; | 54 | }; |
55 | 55 | ||
56 | const uint16_t PROGMEM fn_actions[] = { | ||
57 | [0] = ACTION_LAYER_MODS(_NAV_ALT, MOD_LALT) | ||
58 | |||
59 | }; | ||
60 | |||
61 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 56 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
62 | { | 57 | { |
63 | // MACRODOWN only works in this function | 58 | // MACRODOWN only works in this function |
diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c index 1e5d6a61c..b84404e1e 100644 --- a/keyboards/planck/keymaps/max/keymap.c +++ b/keyboards/planck/keymaps/max/keymap.c | |||
@@ -16,20 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
16 | ), | 16 | ), |
17 | [2] = LAYOUT_planck_grid( /* RAISE */ | 17 | [2] = LAYOUT_planck_grid( /* RAISE */ |
18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | 18 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, |
19 | KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, | 19 | KC_TRNS, DF(0), DF(1), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, |
20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS, | 20 | KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS, |
21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 21 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
22 | ), | 22 | ), |
23 | [3] = LAYOUT_planck_grid( /* LOWER */ | 23 | [3] = LAYOUT_planck_grid( /* LOWER */ |
24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, | 24 | S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, |
25 | KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS, | 25 | KC_TRNS, DF(0), DF(1), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS, |
26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS), | 26 | KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS), |
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY |
28 | ) | 28 | ) |
29 | }; | 29 | }; |
30 | |||
31 | const uint16_t PROGMEM fn_actions[] = { | ||
32 | [3] = ACTION_DEFAULT_LAYER_SET(0), | ||
33 | [4] = ACTION_DEFAULT_LAYER_SET(1), | ||
34 | |||
35 | }; | ||
diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c index 2952a0ca8..f993d299b 100644 --- a/keyboards/planck/keymaps/mollat/keymap.c +++ b/keyboards/planck/keymaps/mollat/keymap.c | |||
@@ -82,10 +82,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
82 | ) | 82 | ) |
83 | }; | 83 | }; |
84 | 84 | ||
85 | const uint16_t PROGMEM fn_actions[] = { | ||
86 | [_LCTL] = ACTION_MODS_TAP_KEY(KC_LCTL, M(12)), // does not work | ||
87 | }; | ||
88 | |||
89 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 85 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
90 | { | 86 | { |
91 | switch(id) { | 87 | switch(id) { |
diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c index 57002cc38..d75b8bf53 100644 --- a/keyboards/planck/keymaps/piemod/keymap.c +++ b/keyboards/planck/keymaps/piemod/keymap.c | |||
@@ -1,13 +1,13 @@ | |||
1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
2 | 2 | ||
3 | #define DVORAK 0 | 3 | #define DVORAK 0 |
4 | #define ARROW 1 //F(1) | 4 | #define ARROW 1 |
5 | #define SYMBOL 2 // F(2) | 5 | #define SYMBOL 2 |
6 | #define NUMBER 3 // F(3) | 6 | #define NUMBER 3 |
7 | #define FUNCTION 4 // F(4) | 7 | #define FUNCTION 4 |
8 | #define EMACS 5 // F(5) | 8 | #define EMACS 5 |
9 | #define CUSTOM_MACROS 6 // F(6) | 9 | #define CUSTOM_MACROS 6 |
10 | #define MOUSE 7 // F(7) | 10 | #define MOUSE 7 |
11 | 11 | ||
12 | #define LT_1A LT(1, KC_A) | 12 | #define LT_1A LT(1, KC_A) |
13 | #define LT_2O LT(2, KC_O) | 13 | #define LT_2O LT(2, KC_O) |
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
22 | KC_ESC, KC_QUOTE, LT_7COM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, | 22 | KC_ESC, KC_QUOTE, LT_7COM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, |
23 | KC_TAB, LT_1A, LT_2O, LT_3E, LT_4U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, | 23 | KC_TAB, LT_1A, LT_2O, LT_3E, LT_4U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, |
24 | KC_LSHIFT, KC_SCOLON, LT_5Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, | 24 | KC_LSHIFT, KC_SCOLON, LT_5Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, |
25 | F(10), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT | 25 | C(KC_LALT), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT |
26 | ), | 26 | ), |
27 | 27 | ||
28 | [ARROW] = LAYOUT_planck_grid( | 28 | [ARROW] = LAYOUT_planck_grid( |
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
34 | 34 | ||
35 | [SYMBOL] = LAYOUT_planck_grid( | 35 | [SYMBOL] = LAYOUT_planck_grid( |
36 | KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, | 36 | KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, |
37 | KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), | 37 | KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), |
38 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, | 38 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, |
39 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL | 39 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL |
40 | ), | 40 | ), |
@@ -75,31 +75,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
75 | ), | 75 | ), |
76 | 76 | ||
77 | }; | 77 | }; |
78 | |||
79 | enum function_id { | ||
80 | TEENSY_KEY, | ||
81 | CUSTOM_KEY, | ||
82 | L_CTRL_ALT_ENT, | ||
83 | R_CTRL_ALT_ENT, | ||
84 | }; | ||
85 | |||
86 | int CAPSLOCKED = 0; | ||
87 | |||
88 | const uint16_t PROGMEM fn_actions[] = { | ||
89 | |||
90 | // DVORAK 0 | ||
91 | // ARROW 1, F(1) | ||
92 | // SYMBOL 2, F(2) | ||
93 | // NUMBER 3, F(3) | ||
94 | // FUNCTION 4, F(4) | ||
95 | // EMACS 5, F(5) | ||
96 | // MACROS 6, F(6) | ||
97 | // MOUSE 7, F(7) | ||
98 | |||
99 | // Special Keys | ||
100 | [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. | ||
101 | |||
102 | // Symbols | ||
103 | [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. | ||
104 | |||
105 | }; | ||
diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 78123c44c..8428c2335 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c | |||
@@ -99,7 +99,7 @@ enum keyboard_macros { | |||
99 | #define SC_CCLS LCTL(KC_F4) | 99 | #define SC_CCLS LCTL(KC_F4) |
100 | 100 | ||
101 | #define TG_NKRO MAGIC_TOGGLE_NKRO | 101 | #define TG_NKRO MAGIC_TOGGLE_NKRO |
102 | #define OS_SHFT KC_FN0 | 102 | #define OS_SHFT OSM(MOD_RSFT) |
103 | 103 | ||
104 | #define ________________ _______, _______ | 104 | #define ________________ _______, _______ |
105 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX | 105 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX |
@@ -234,10 +234,6 @@ void persistent_default_layer_set(uint16_t default_layer) | |||
234 | default_layer_set(default_layer); | 234 | default_layer_set(default_layer); |
235 | } | 235 | } |
236 | 236 | ||
237 | const uint16_t PROGMEM fn_actions[] = { | ||
238 | [0] = ACTION_MODS_ONESHOT(MOD_RSFT), | ||
239 | }; | ||
240 | |||
241 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 237 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
242 | { | 238 | { |
243 | 239 | ||
diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 178422cd8..8974555fb 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c | |||
@@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
144 | case QWERTY: | 144 | case QWERTY: |
145 | if (record->event.pressed) { | 145 | if (record->event.pressed) { |
146 | #ifdef AUDIO_ENABLE | 146 | #ifdef AUDIO_ENABLE |
147 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 147 | PLAY_SONG(tone_qwerty); |
148 | #endif | 148 | #endif |
149 | persistant_default_layer_set(1UL<<_QWERTY); | 149 | persistant_default_layer_set(1UL<<_QWERTY); |
150 | } | 150 | } |
@@ -185,12 +185,12 @@ void matrix_init_user(void) { | |||
185 | void startup_user() | 185 | void startup_user() |
186 | { | 186 | { |
187 | _delay_ms(20); // gets rid of tick | 187 | _delay_ms(20); // gets rid of tick |
188 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | 188 | PLAY_SONG(tone_startup); |
189 | } | 189 | } |
190 | 190 | ||
191 | void shutdown_user() | 191 | void shutdown_user() |
192 | { | 192 | { |
193 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 193 | PLAY_SONG(tone_goodbye); |
194 | _delay_ms(150); | 194 | _delay_ms(150); |
195 | stop_all_notes(); | 195 | stop_all_notes(); |
196 | } | 196 | } |
@@ -202,7 +202,7 @@ void music_on_user(void) | |||
202 | 202 | ||
203 | void music_scale_user(void) | 203 | void music_scale_user(void) |
204 | { | 204 | { |
205 | PLAY_NOTE_ARRAY(music_scale, false, 0); | 205 | PLAY_SONG(music_scale); |
206 | } | 206 | } |
207 | 207 | ||
208 | #endif | 208 | #endif |
diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 550117d00..f3f60b7d1 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c | |||
@@ -107,7 +107,7 @@ enum { | |||
107 | #define SC_CCLS LCTL(KC_F4) | 107 | #define SC_CCLS LCTL(KC_F4) |
108 | 108 | ||
109 | #define TG_NKRO MAGIC_TOGGLE_NKRO | 109 | #define TG_NKRO MAGIC_TOGGLE_NKRO |
110 | #define OS_SHFT KC_FN0 | 110 | #define OS_SHFT OSM(MOD_RSFT) |
111 | 111 | ||
112 | #define ________________ _______, _______ | 112 | #define ________________ _______, _______ |
113 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX | 113 | #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX |
@@ -243,10 +243,6 @@ void persistant_default_layer_set(uint16_t default_layer) | |||
243 | default_layer_set(default_layer); | 243 | default_layer_set(default_layer); |
244 | } | 244 | } |
245 | 245 | ||
246 | const uint16_t PROGMEM fn_actions[] = { | ||
247 | [0] = ACTION_MODS_ONESHOT(MOD_RSFT), | ||
248 | }; | ||
249 | |||
250 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | 246 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) |
251 | { | 247 | { |
252 | 248 | ||
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 3cea2e721..3fbbae027 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h | |||
@@ -53,6 +53,7 @@ | |||
53 | 53 | ||
54 | #define MUSIC_MAP | 54 | #define MUSIC_MAP |
55 | #undef AUDIO_VOICES | 55 | #undef AUDIO_VOICES |
56 | // Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related | ||
56 | #undef C6_AUDIO | 57 | #undef C6_AUDIO |
57 | 58 | ||
58 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 59 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 49f6088c3..d101f36d6 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk | |||
@@ -14,7 +14,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration | |||
14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
16 | MIDI_ENABLE = no # MIDI controls | 16 | MIDI_ENABLE = no # MIDI controls |
17 | AUDIO_ENABLE = yes # Audio output on port C6 | 17 | AUDIO_ENABLE = yes # Audio output |
18 | UNICODE_ENABLE = no # Unicode | 18 | UNICODE_ENABLE = no # Unicode |
19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
20 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 20 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index bf9e89e1f..d1d274f29 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c | |||
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
161 | case QWERTY: | 161 | case QWERTY: |
162 | if (record->event.pressed) { | 162 | if (record->event.pressed) { |
163 | #ifdef AUDIO_ENABLE | 163 | #ifdef AUDIO_ENABLE |
164 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 164 | PLAY_SONG(tone_qwerty); |
165 | #endif | 165 | #endif |
166 | persistant_default_layer_set(1UL<<_QWERTY); | 166 | persistant_default_layer_set(1UL<<_QWERTY); |
167 | } | 167 | } |
@@ -213,12 +213,12 @@ void matrix_init_user(void) { | |||
213 | void startup_user() | 213 | void startup_user() |
214 | { | 214 | { |
215 | _delay_ms(20); // gets rid of tick | 215 | _delay_ms(20); // gets rid of tick |
216 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | 216 | PLAY_SONG(tone_startup); |
217 | } | 217 | } |
218 | 218 | ||
219 | void shutdown_user() | 219 | void shutdown_user() |
220 | { | 220 | { |
221 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 221 | PLAY_SONG(tone_goodbye); |
222 | _delay_ms(150); | 222 | _delay_ms(150); |
223 | stop_all_notes(); | 223 | stop_all_notes(); |
224 | } | 224 | } |
@@ -230,7 +230,7 @@ void music_on_user(void) | |||
230 | 230 | ||
231 | void music_scale_user(void) | 231 | void music_scale_user(void) |
232 | { | 232 | { |
233 | PLAY_NOTE_ARRAY(music_scale, false, 0); | 233 | PLAY_SONG(music_scale); |
234 | } | 234 | } |
235 | 235 | ||
236 | #endif | 236 | #endif |
diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 9be496ce7..45edfa0b0 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk | |||
@@ -23,7 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration | |||
23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
25 | MIDI_ENABLE = no # MIDI controls | 25 | MIDI_ENABLE = no # MIDI controls |
26 | AUDIO_ENABLE = yes # Audio output on port C6 | 26 | AUDIO_ENABLE = yes # Audio output |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index b98f9b52c..f24c6a49b 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk | |||
@@ -23,7 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration | |||
23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
25 | MIDI_ENABLE = no # MIDI controls | 25 | MIDI_ENABLE = no # MIDI controls |
26 | AUDIO_ENABLE = yes # Audio output on port C6 | 26 | AUDIO_ENABLE = yes # Audio output |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index b5b2ced5a..b7429f757 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | #define MUSIC_MAP | 41 | #define MUSIC_MAP |
42 | #undef AUDIO_VOICES | 42 | #undef AUDIO_VOICES |
43 | // Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related | ||
43 | #undef C6_AUDIO | 44 | #undef C6_AUDIO |
44 | 45 | ||
45 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 46 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 4c5d2f2ff..a5fc16a2e 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk | |||
@@ -14,7 +14,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration | |||
14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
16 | MIDI_ENABLE = no # MIDI controls | 16 | MIDI_ENABLE = no # MIDI controls |
17 | AUDIO_ENABLE = yes # Audio output on port C6 | 17 | AUDIO_ENABLE = yes # Audio output |
18 | UNICODE_ENABLE = no # Unicode | 18 | UNICODE_ENABLE = no # Unicode |
19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 19 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
20 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | 20 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. |
diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 23c4168f2..4516f62e8 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c | |||
@@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
78 | case QWERTY: | 78 | case QWERTY: |
79 | if (record->event.pressed) { | 79 | if (record->event.pressed) { |
80 | #ifdef AUDIO_ENABLE | 80 | #ifdef AUDIO_ENABLE |
81 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 81 | PLAY_SONG(tone_qwerty); |
82 | #endif | 82 | #endif |
83 | persistant_default_layer_set(1UL<<_QWERTY); | 83 | persistant_default_layer_set(1UL<<_QWERTY); |
84 | } | 84 | } |
@@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
87 | //case COLEMAK: | 87 | //case COLEMAK: |
88 | //if (record->event.pressed) { | 88 | //if (record->event.pressed) { |
89 | //#ifdef AUDIO_ENABLE | 89 | //#ifdef AUDIO_ENABLE |
90 | //PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 90 | //PLAY_SONG(tone_colemak); |
91 | //#endif | 91 | //#endif |
92 | //persistant_default_layer_set(1UL<<_COLEMAK); | 92 | //persistant_default_layer_set(1UL<<_COLEMAK); |
93 | //} | 93 | //} |
diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c index 13edd0db8..bca4684dc 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c | |||
@@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
77 | case QWERTY: | 77 | case QWERTY: |
78 | if (record->event.pressed) { | 78 | if (record->event.pressed) { |
79 | #ifdef AUDIO_ENABLE | 79 | #ifdef AUDIO_ENABLE |
80 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 80 | PLAY_SONG(tone_qwerty); |
81 | #endif | 81 | #endif |
82 | persistant_default_layer_set(1UL<<_QWERTY); | 82 | persistant_default_layer_set(1UL<<_QWERTY); |
83 | } | 83 | } |
@@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
86 | //case COLEMAK: | 86 | //case COLEMAK: |
87 | //if (record->event.pressed) { | 87 | //if (record->event.pressed) { |
88 | //#ifdef AUDIO_ENABLE | 88 | //#ifdef AUDIO_ENABLE |
89 | //PLAY_NOTE_ARRAY(tone_colemak, false, 0); | 89 | //PLAY_SONG(tone_colemak); |
90 | //#endif | 90 | //#endif |
91 | //persistant_default_layer_set(1UL<<_COLEMAK); | 91 | //persistant_default_layer_set(1UL<<_COLEMAK); |
92 | //} | 92 | //} |
diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index ff2b9a258..32ff3a078 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk | |||
@@ -26,7 +26,7 @@ NKRO_ENABLE = no # USB Nkey Rollover | |||
26 | MIDI_ENABLE = no # MIDI support | 26 | MIDI_ENABLE = no # MIDI support |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | AUDIO_ENABLE = yes # Audio output on port C6 | 29 | AUDIO_ENABLE = yes # Audio output |
30 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 30 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera | 32 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera |
diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index 221054879..990edc9df 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk | |||
@@ -28,6 +28,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
28 | MIDI_ENABLE = no # MIDI support | 28 | MIDI_ENABLE = no # MIDI support |
29 | UNICODE_ENABLE = no # Unicode | 29 | UNICODE_ENABLE = no # Unicode |
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
31 | AUDIO_ENABLE = yes # Audio output on port C6 | 31 | AUDIO_ENABLE = no # Audio output |
32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
33 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | 33 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs |
diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index cfeda0a24..2bfe82977 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c | |||
@@ -29,14 +29,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
29 | //Function | 29 | //Function |
30 | //Mute microphone | 30 | //Mute microphone |
31 | #define KC_SPACEFN LT(2, KC_SPACE) | 31 | #define KC_SPACEFN LT(2, KC_SPACE) |
32 | #define KC_OSLS KC_FN3 | 32 | #define KC_OSLS OSM(MOD_LSFT) |
33 | #define KC_GMLK KC_FN1 | 33 | #define KC_GMLK TG(1) |
34 | #define KC_FUNC MO(2) | 34 | #define KC_FUNC MO(2) |
35 | #define MICMUTE RCTL(KC_LCTL) | 35 | #define MICMUTE RCTL(KC_LCTL) |
36 | 36 | ||
37 | enum function_codes { | 37 | enum function_codes { |
38 | F_OSLS = 3, | ||
39 | F_GMLK = 1, | ||
40 | }; | 38 | }; |
41 | 39 | ||
42 | enum layer_names { | 40 | enum layer_names { |
@@ -146,14 +144,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
146 | ), | 144 | ), |
147 | }; | 145 | }; |
148 | 146 | ||
149 | /* | ||
150 | * Fn action definition | ||
151 | */ | ||
152 | const uint16_t PROGMEM fn_actions[] = { | ||
153 | [F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift | ||
154 | [F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift | ||
155 | }; | ||
156 | |||
157 | void matrix_init_user(void) { | 147 | void matrix_init_user(void) { |
158 | 148 | ||
159 | } | 149 | } |
diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index c72c37d9d..cba307ba4 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c | |||
@@ -7,6 +7,13 @@ | |||
7 | #define KC_LT5 LT(5, KC_SLSH) | 7 | #define KC_LT5 LT(5, KC_SLSH) |
8 | #define KC_LT6 LT(6, KC_SCLN) | 8 | #define KC_LT6 LT(6, KC_SCLN) |
9 | 9 | ||
10 | #define KC_MTRS MT(MOD_RSFT, KC_GRV) | ||
11 | |||
12 | #define KC_DF0 DF(0) | ||
13 | #define KC_DF1 DF(1) | ||
14 | #define KC_DF2 DF(2) | ||
15 | #define KC_DF3 DF(3) | ||
16 | |||
10 | /* | 17 | /* |
11 | * Hasu | 18 | * Hasu |
12 | */ | 19 | */ |
@@ -28,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
28 | ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \ | 35 | ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \ |
29 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ | 36 | TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ |
30 | CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \ | 37 | CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \ |
31 | LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, FN9, NO, \ | 38 | LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, MTRS, NO, \ |
32 | LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), | 39 | LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), |
33 | /* Keymap 1: colemak | 40 | /* Keymap 1: colemak |
34 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠| 41 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠|
@@ -165,20 +172,9 @@ Lw: set Workman layout | |||
165 | 172 | ||
166 | */ | 173 | */ |
167 | LAYOUT_kc( | 174 | LAYOUT_kc( |
168 | FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 175 | DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
169 | TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 176 | TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
170 | TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 177 | TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
171 | TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 178 | TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
172 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), | 179 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), |
173 | }; | 180 | }; |
174 | |||
175 | /* | ||
176 | * Fn action definition | ||
177 | */ | ||
178 | const uint16_t PROGMEM fn_actions[] = { | ||
179 | [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout | ||
180 | [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout | ||
181 | [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout | ||
182 | [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout | ||
183 | [9] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV), | ||
184 | }; | ||
diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 014554019..24182ad20 100644 --- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c | |||
@@ -18,6 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
18 | 18 | ||
19 | #define KC_MO1 MO(1) | 19 | #define KC_MO1 MO(1) |
20 | #define KC_SPFN LT(1, KC_SPC) | 20 | #define KC_SPFN LT(1, KC_SPC) |
21 | #define KC_SDEL S(KC_DEL) | ||
22 | #define KC_CINS C(KC_INS) | ||
23 | #define KC_SINS S(KC_INS) | ||
21 | 24 | ||
22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
23 | /* Layout 0: Default Layer | 26 | /* Layout 0: Default Layer |
@@ -57,20 +60,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
57 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ | 60 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ |
58 | TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \ | 61 | TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \ |
59 | TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \ | 62 | TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \ |
60 | TRNS, TRNS, PSCR, FN2, FN3, FN4, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ | 63 | TRNS, TRNS, PSCR, SDEL, CINS, SINS, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ |
61 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), | 64 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), |
62 | }; | 65 | }; |
63 | 66 | ||
64 | /* | ||
65 | * Fn action definition | ||
66 | */ | ||
67 | const uint16_t PROGMEM fn_actions[] = { | ||
68 | [2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */ | ||
69 | [3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */ | ||
70 | [4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */ | ||
71 | }; | ||
72 | |||
73 | |||
74 | void matrix_init_user(void) { | 67 | void matrix_init_user(void) { |
75 | 68 | ||
76 | } | 69 | } |
diff --git a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c index 3b38ed501..6286f2437 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c | |||
@@ -3,6 +3,16 @@ | |||
3 | #define KC_MO6 MO(6) | 3 | #define KC_MO6 MO(6) |
4 | #define KC_MO7 MO(7) | 4 | #define KC_MO7 MO(7) |
5 | 5 | ||
6 | #define KC_DF0 DF(0) | ||
7 | #define KC_DF1 DF(1) | ||
8 | #define KC_DF2 DF(2) | ||
9 | #define KC_DF3 DF(3) | ||
10 | |||
11 | #define KC_TG4 TG(4) | ||
12 | #define KC_TG5 TG(5) | ||
13 | |||
14 | #define KC_CSES C(S(KC_ESC)) | ||
15 | |||
6 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 16 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
7 | /* 0: qwerty | 17 | /* 0: qwerty |
8 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠| 18 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠|
@@ -139,10 +149,10 @@ FnS: toggle Arrow overlay | |||
139 | */ | 149 | */ |
140 | LAYOUT_kc( | 150 | LAYOUT_kc( |
141 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 151 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
142 | TRNS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ | 152 | TRNS, TG5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ |
143 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN3, END, TRNS, TRNS, \ | 153 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
144 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ | 154 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ |
145 | TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), | 155 | TRNS, TRNS, TRNS, TG4, TRNS, TRNS, TRNS, TRNS), |
146 | /* 7: Layout selector | 156 | /* 7: Layout selector |
147 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠| 157 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠|
148 | │ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ | 158 | │ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ |
@@ -163,19 +173,9 @@ Lw: set Workman layout | |||
163 | 173 | ||
164 | */ | 174 | */ |
165 | LAYOUT_kc( | 175 | LAYOUT_kc( |
166 | FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 176 | DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
167 | TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 177 | TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
168 | TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 178 | TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
169 | TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 179 | TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
170 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), | 180 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), |
171 | }; | 181 | }; |
172 | const uint16_t PROGMEM fn_actions[] = { | ||
173 | /* Poker Layout */ | ||
174 | [1] = ACTION_LAYER_TOGGLE(4), // toggle arrow overlay | ||
175 | [2] = ACTION_LAYER_TOGGLE(5), // toggle Esc overlay | ||
176 | [3] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // Task(RControl,RShift+Esc) | ||
177 | [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout | ||
178 | [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout | ||
179 | [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout | ||
180 | [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout | ||
181 | }; | ||
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c index d66cc93c3..a4ab412ee 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c | |||
@@ -1,5 +1,9 @@ | |||
1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
2 | 2 | ||
3 | #define KC_TG5 TG(5) | ||
4 | #define KC_TG6 TG(6) | ||
5 | #define KC_CSES C(S(KC_ESC)) | ||
6 | |||
3 | // Poker fix with toggle and bit operation | 7 | // Poker fix with toggle and bit operation |
4 | // Fn + Esc = ` | 8 | // Fn + Esc = ` |
5 | // Fn + {left, down, up, right} = {home, pgdown, pgup, end} | 9 | // Fn + {left, down, up, right} = {home, pgdown, pgup, end} |
@@ -38,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | */ | 42 | */ |
39 | [4] = LAYOUT_kc( | 43 | [4] = LAYOUT_kc( |
40 | TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 44 | TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
41 | CAPS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ | 45 | CAPS, TG6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ |
42 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN4, END, TRNS, TRNS, \ | 46 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
43 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ | 47 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ |
44 | TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), | 48 | TRNS, TRNS, TRNS, TG5, TRNS, TRNS, TRNS, TRNS), |
45 | /* 5: Poker with Arrow | 49 | /* 5: Poker with Arrow |
46 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠| 50 | ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠|
47 | │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ | 51 | │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ |
@@ -103,8 +107,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
103 | const uint16_t PROGMEM fn_actions[] = { | 107 | const uint16_t PROGMEM fn_actions[] = { |
104 | /* Poker Layout */ | 108 | /* Poker Layout */ |
105 | [0] = ACTION_LAYER_BIT_XOR(1, 0b0101, ON_BOTH), // Poker Fn(with fix for Esc) | 109 | [0] = ACTION_LAYER_BIT_XOR(1, 0b0101, ON_BOTH), // Poker Fn(with fix for Esc) |
106 | [1] = ACTION_LAYER_TOGGLE(5), // Poker Arrow toggle | ||
107 | [2] = ACTION_LAYER_TOGGLE(6), // Poker Esc toggle | ||
108 | [3] = ACTION_LAYER_BIT_XOR(1, 0b1101, ON_BOTH), // Poker Fn(with fix for Arrow) | 110 | [3] = ACTION_LAYER_BIT_XOR(1, 0b1101, ON_BOTH), // Poker Fn(with fix for Arrow) |
109 | [4] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN3 Task(RControl,RShift+Esc) | ||
110 | }; | 111 | }; |
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c index 3f6392467..64678cd56 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c | |||
@@ -1,5 +1,7 @@ | |||
1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
2 | 2 | ||
3 | #define KC_CSES C(S(KC_ESC)) | ||
4 | |||
3 | // Poker fix with set(state transition) | 5 | // Poker fix with set(state transition) |
4 | // Fn + Esc = ` | 6 | // Fn + Esc = ` |
5 | // Fn + {left, down, up, right} = {home, pgdown, pgup, end} | 7 | // Fn + {left, down, up, right} = {home, pgdown, pgup, end} |
@@ -96,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
96 | LAYOUT_kc( | 98 | LAYOUT_kc( |
97 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 99 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
98 | TRNS, FN6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ | 100 | TRNS, FN6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ |
99 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ | 101 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
100 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ | 102 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ |
101 | TRNS, TRNS, TRNS, FN5, FN4, TRNS, TRNS, TRNS), | 103 | TRNS, TRNS, TRNS, FN5, FN4, TRNS, TRNS, TRNS), |
102 | /* 5: Poker Fn'd arrow | 104 | /* 5: Poker Fn'd arrow |
@@ -115,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
115 | LAYOUT_kc( | 117 | LAYOUT_kc( |
116 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 118 | ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
117 | TRNS, FN7, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ | 119 | TRNS, FN7, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ |
118 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ | 120 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
119 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ | 121 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ |
120 | TRNS, TRNS, TRNS, FN4, FN5, HOME, PGDN, END), | 122 | TRNS, TRNS, TRNS, FN4, FN5, HOME, PGDN, END), |
121 | /* 6: Poker Fn'd Esc | 123 | /* 6: Poker Fn'd Esc |
@@ -134,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
134 | LAYOUT_kc( | 136 | LAYOUT_kc( |
135 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 137 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
136 | TRNS, FN4, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ | 138 | TRNS, FN4, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ |
137 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ | 139 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
138 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ | 140 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ |
139 | TRNS, TRNS, TRNS, FN7, FN6, TRNS, TRNS, TRNS), | 141 | TRNS, TRNS, TRNS, FN7, FN6, TRNS, TRNS, TRNS), |
140 | /* 7: Poker Fn'd Arrow + Esc | 142 | /* 7: Poker Fn'd Arrow + Esc |
@@ -153,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
153 | LAYOUT_kc( | 155 | LAYOUT_kc( |
154 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ | 156 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ |
155 | TRNS, FN5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ | 157 | TRNS, FN5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ |
156 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ | 158 | TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ |
157 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ | 159 | TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ |
158 | TRNS, TRNS, TRNS, FN6, FN7, HOME, PGDN, END), | 160 | TRNS, TRNS, TRNS, FN6, FN7, HOME, PGDN, END), |
159 | }; | 161 | }; |
@@ -173,6 +175,4 @@ const uint16_t PROGMEM fn_actions[] = { | |||
173 | [5] = ACTION_LAYER_SET(1, ON_RELEASE), // FN5 move to arrow when release | 175 | [5] = ACTION_LAYER_SET(1, ON_RELEASE), // FN5 move to arrow when release |
174 | [6] = ACTION_LAYER_SET(2, ON_RELEASE), // FN6 move to Esc when release | 176 | [6] = ACTION_LAYER_SET(2, ON_RELEASE), // FN6 move to Esc when release |
175 | [7] = ACTION_LAYER_SET(3, ON_RELEASE), // FN7 move to arrow + Esc when release | 177 | [7] = ACTION_LAYER_SET(3, ON_RELEASE), // FN7 move to arrow + Esc when release |
176 | |||
177 | [8] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN8 Task(RControl,RShift+Esc) | ||
178 | }; | 178 | }; |
diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c index ee7ec6cd6..6ef273d1e 100644 --- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c | |||
@@ -44,13 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
44 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ | 44 | GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ |
45 | TRNS, TRNS, TRNS, ESC, TRNS, TRNS, TRNS, HOME, UP, END, PSCR, SLCK, PAUS, INS, \ | 45 | TRNS, TRNS, TRNS, ESC, TRNS, TRNS, TRNS, HOME, UP, END, PSCR, SLCK, PAUS, INS, \ |
46 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, \ | 46 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, \ |
47 | TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, FN1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ | 47 | TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, TILD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ |
48 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), | 48 | TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), |
49 | }; | 49 | }; |
50 | |||
51 | /* | ||
52 | * Fn action definition | ||
53 | */ | ||
54 | const uint16_t PROGMEM fn_actions[] = { | ||
55 | [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde | ||
56 | }; | ||
diff --git a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c index d5b4937aa..8e1496bc9 100644 --- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c | |||
@@ -112,9 +112,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
112 | 112 | ||
113 | [_FL] = LAYOUT_65_ansi( | 113 | [_FL] = LAYOUT_65_ansi( |
114 | KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ | 114 | KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ |
115 | _______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ | 115 | _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ |
116 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ | 116 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ |
117 | _______, F(5), _______, F(1), F(2), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ | 117 | _______, TG(_UL), _______, TG(_CM), TG(_DV), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ |
118 | _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY), | 118 | _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY), |
119 | 119 | ||
120 | /* 5: Locking layer for controlling the underglow | 120 | /* 5: Locking layer for controlling the underglow |
@@ -138,11 +138,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
138 | _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ | 138 | _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ |
139 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), | 139 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), |
140 | }; | 140 | }; |
141 | |||
142 | const uint16_t PROGMEM fn_actions[] = { | ||
143 | [1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay | ||
144 | [2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay | ||
145 | [3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay | ||
146 | [5] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay | ||
147 | |||
148 | }; | ||
diff --git a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c index 093070cb4..8589a797f 100644 --- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c | |||
@@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
66 | 66 | ||
67 | [_FL] = LAYOUT_65_ansi( | 67 | [_FL] = LAYOUT_65_ansi( |
68 | KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ | 68 | KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ |
69 | KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ | 69 | KC_TRNS, TG(_AL), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ |
70 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | 70 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ |
71 | KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ | 71 | KC_TRNS, TG(_UL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ |
72 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), | 72 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), |
73 | 73 | ||
74 | /* 3: Locking layer for controlling the underglow | 74 | /* 3: Locking layer for controlling the underglow |
@@ -92,9 +92,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
92 | KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | 92 | KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ |
93 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 93 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
94 | }; | 94 | }; |
95 | |||
96 | const uint16_t PROGMEM fn_actions[] = { | ||
97 | [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay | ||
98 | [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay | ||
99 | }; | ||
100 | |||
diff --git a/keyboards/2_milk/2_milk.c b/keyboards/spaceman/2_milk/2_milk.c index 96071c2ad..96071c2ad 100644 --- a/keyboards/2_milk/2_milk.c +++ b/keyboards/spaceman/2_milk/2_milk.c | |||
diff --git a/keyboards/2_milk/2_milk.h b/keyboards/spaceman/2_milk/2_milk.h index 7d90d2064..7d90d2064 100644 --- a/keyboards/2_milk/2_milk.h +++ b/keyboards/spaceman/2_milk/2_milk.h | |||
diff --git a/keyboards/2_milk/config.h b/keyboards/spaceman/2_milk/config.h index e9a104117..49211535d 100644 --- a/keyboards/2_milk/config.h +++ b/keyboards/spaceman/2_milk/config.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define VENDOR_ID 0xFEED | 20 | #define VENDOR_ID 0xFEED |
21 | #define PRODUCT_ID 0xB195 | 21 | #define PRODUCT_ID 0xB195 |
22 | #define DEVICE_VER 0x0001 | 22 | #define DEVICE_VER 0x0001 |
23 | #define MANUFACTURER rionlion100 | 23 | #define MANUFACTURER Spaceman |
24 | #define PRODUCT 2% Milk | 24 | #define PRODUCT 2% Milk |
25 | #define DESCRIPTION A milk themed 2% Keyboard | 25 | #define DESCRIPTION A milk themed 2% Keyboard |
26 | 26 | ||
diff --git a/keyboards/2_milk/info.json b/keyboards/spaceman/2_milk/info.json index 6dc4eeaf8..6c2bd78b2 100644 --- a/keyboards/2_milk/info.json +++ b/keyboards/spaceman/2_milk/info.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "keyboard_name": "2% Milk", | 2 | "keyboard_name": "2% Milk", |
3 | "keyboard_folder": "2_milk", | 3 | "keyboard_folder": "2_milk", |
4 | "url": "", | 4 | "url": "", |
5 | "maintainer": "rionlion100 (Spaceman)", | 5 | "maintainer": "Spaceman", |
6 | "width": 1, | 6 | "width": 1, |
7 | "height": 2, | 7 | "height": 2, |
8 | "layouts": { | 8 | "layouts": { |
diff --git a/keyboards/2_milk/keymaps/binary/keymap.c b/keyboards/spaceman/2_milk/keymaps/binary/keymap.c index c8df8e9ff..c8df8e9ff 100644 --- a/keyboards/2_milk/keymaps/binary/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/binary/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/binary/readme.md b/keyboards/spaceman/2_milk/keymaps/binary/readme.md index 5ebcbd3e5..5ebcbd3e5 100644 --- a/keyboards/2_milk/keymaps/binary/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/binary/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/copypasta/keymap.c b/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c index c82a6ff21..c82a6ff21 100644 --- a/keyboards/2_milk/keymaps/copypasta/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/copypasta/readme.md b/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md index 6c2f4e8fb..6c2f4e8fb 100644 --- a/keyboards/2_milk/keymaps/copypasta/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/default/keymap.c b/keyboards/spaceman/2_milk/keymaps/default/keymap.c index 1f327eee9..1f327eee9 100644 --- a/keyboards/2_milk/keymaps/default/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/default/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/default/readme.md b/keyboards/spaceman/2_milk/keymaps/default/readme.md index 4482bce34..4482bce34 100644 --- a/keyboards/2_milk/keymaps/default/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/default/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/spaceman/2_milk/keymaps/emoji/config.h index 90e4d6310..90e4d6310 100644 --- a/keyboards/2_milk/keymaps/emoji/config.h +++ b/keyboards/spaceman/2_milk/keymaps/emoji/config.h | |||
diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c index 024a6a054..024a6a054 100644 --- a/keyboards/2_milk/keymaps/emoji/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md index 1d5a08730..1d5a08730 100644 --- a/keyboards/2_milk/keymaps/emoji/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk index 7a64eb902..7a64eb902 100644 --- a/keyboards/2_milk/keymaps/emoji/rules.mk +++ b/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk | |||
diff --git a/keyboards/2_milk/keymaps/excessbread/keymap.c b/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c index a01b47f27..a01b47f27 100644 --- a/keyboards/2_milk/keymaps/excessbread/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/excessbread/readme.md b/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md index a6535e62c..a6535e62c 100644 --- a/keyboards/2_milk/keymaps/excessbread/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/mikethetiger/keymap.c b/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c index 20e2292f0..20e2292f0 100644 --- a/keyboards/2_milk/keymaps/mikethetiger/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/mikethetiger/readme.md b/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md index 677732b05..677732b05 100644 --- a/keyboards/2_milk/keymaps/mikethetiger/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md | |||
diff --git a/keyboards/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk index b5f038ef2..b5f038ef2 100644 --- a/keyboards/2_milk/keymaps/mikethetiger/rules.mk +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk | |||
diff --git a/keyboards/2_milk/keymaps/mouse/keymap.c b/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c index a8ba44fb4..a8ba44fb4 100644 --- a/keyboards/2_milk/keymaps/mouse/keymap.c +++ b/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c | |||
diff --git a/keyboards/2_milk/keymaps/mouse/readme.md b/keyboards/spaceman/2_milk/keymaps/mouse/readme.md index 8ecb99edd..8ecb99edd 100644 --- a/keyboards/2_milk/keymaps/mouse/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/mouse/readme.md | |||
diff --git a/keyboards/2_milk/readme.md b/keyboards/spaceman/2_milk/readme.md index f3a85458c..6745aa65c 100644 --- a/keyboards/2_milk/readme.md +++ b/keyboards/spaceman/2_milk/readme.md | |||
@@ -4,12 +4,12 @@ | |||
4 | 4 | ||
5 | A 2% Meme board themed around a milk carton | 5 | A 2% Meme board themed around a milk carton |
6 | 6 | ||
7 | Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) | 7 | Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) |
8 | Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk) | 8 | Hardware Availability: [Open Source](https://github.com/Spaceman/Spaceboards/tree/master/Keyboards/2%25%20Milk) |
9 | 9 | ||
10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
11 | 11 | ||
12 | make 2_milk:default | 12 | make spaceman/2_milk:default |
13 | 13 | ||
14 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 14 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
15 | 15 | ||
diff --git a/keyboards/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk index 4e6c5f703..4e6c5f703 100644 --- a/keyboards/2_milk/rules.mk +++ b/keyboards/spaceman/2_milk/rules.mk | |||
diff --git a/keyboards/pancake/config.h b/keyboards/spaceman/pancake/config.h index 5a01a572e..5a01a572e 100644 --- a/keyboards/pancake/config.h +++ b/keyboards/spaceman/pancake/config.h | |||
diff --git a/keyboards/pancake/feather/config.h b/keyboards/spaceman/pancake/feather/config.h index eac91a5ad..eac91a5ad 100644 --- a/keyboards/pancake/feather/config.h +++ b/keyboards/spaceman/pancake/feather/config.h | |||
diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/spaceman/pancake/feather/rules.mk index c54fbf06e..c54fbf06e 100644 --- a/keyboards/pancake/feather/rules.mk +++ b/keyboards/spaceman/pancake/feather/rules.mk | |||
diff --git a/keyboards/pancake/info.json b/keyboards/spaceman/pancake/info.json index 6d2b2a9bb..9a21f09e1 100644 --- a/keyboards/pancake/info.json +++ b/keyboards/spaceman/pancake/info.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "keyboard_name": "Pancake", | 2 | "keyboard_name": "Pancake", |
3 | "keyboard_folder": "Pancake", | 3 | "keyboard_folder": "Pancake", |
4 | "url": "", | 4 | "url": "", |
5 | "maintainer": "rionlion100 (Spaceman)", | 5 | "maintainer": "Spaceman", |
6 | "width": 12, | 6 | "width": 12, |
7 | "height": 4, | 7 | "height": 4, |
8 | "layouts": { | 8 | "layouts": { |
diff --git a/keyboards/pancake/keymaps/default/keymap.c b/keyboards/spaceman/pancake/keymaps/default/keymap.c index cebc6fccb..cebc6fccb 100644 --- a/keyboards/pancake/keymaps/default/keymap.c +++ b/keyboards/spaceman/pancake/keymaps/default/keymap.c | |||
diff --git a/keyboards/spaceman/pancake/keymaps/default/readme.md b/keyboards/spaceman/pancake/keymaps/default/readme.md new file mode 100644 index 000000000..7eb8cc6d8 --- /dev/null +++ b/keyboards/spaceman/pancake/keymaps/default/readme.md | |||
@@ -0,0 +1,3 @@ | |||
1 | # Default keymap for Pancake | ||
2 | |||
3 | designed by: Spaceman | ||
diff --git a/keyboards/pancake/pancake.c b/keyboards/spaceman/pancake/pancake.c index d77dbfbe0..d77dbfbe0 100644 --- a/keyboards/pancake/pancake.c +++ b/keyboards/spaceman/pancake/pancake.c | |||
diff --git a/keyboards/pancake/pancake.h b/keyboards/spaceman/pancake/pancake.h index 312d789b4..312d789b4 100644 --- a/keyboards/pancake/pancake.h +++ b/keyboards/spaceman/pancake/pancake.h | |||
diff --git a/keyboards/pancake/promicro/config.h b/keyboards/spaceman/pancake/promicro/config.h index ee02bff2b..ee02bff2b 100644 --- a/keyboards/pancake/promicro/config.h +++ b/keyboards/spaceman/pancake/promicro/config.h | |||
diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/spaceman/pancake/promicro/rules.mk index 6ed9e88e9..6ed9e88e9 100644 --- a/keyboards/pancake/promicro/rules.mk +++ b/keyboards/spaceman/pancake/promicro/rules.mk | |||
diff --git a/keyboards/pancake/readme.md b/keyboards/spaceman/pancake/readme.md index 3e3125f4d..34cf6382b 100644 --- a/keyboards/pancake/readme.md +++ b/keyboards/spaceman/pancake/readme.md | |||
@@ -2,11 +2,11 @@ | |||
2 | 2 | ||
3 | Ortho 40% Ortho Keyboard with an option for the adafruit feather | 3 | Ortho 40% Ortho Keyboard with an option for the adafruit feather |
4 | 4 | ||
5 | Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) | 5 | Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) |
6 | Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) | 6 | Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) |
7 | 7 | ||
8 | Make example for this keyboard (after setting up your build environment): | 8 | Make example for this keyboard (after setting up your build environment): |
9 | 9 | ||
10 | make pancake:default | 10 | make spaceman/pancake:default |
11 | 11 | ||
12 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 12 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index abff350ea..0d77351f3 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk | |||
@@ -23,7 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration | |||
23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 24 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
25 | MIDI_ENABLE = yes # MIDI controls | 25 | MIDI_ENABLE = yes # MIDI controls |
26 | AUDIO_ENABLE = yes # Audio output on port C6 | 26 | AUDIO_ENABLE = no # Audio output |
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
diff --git a/keyboards/the_royal/liminal/keymaps/default/keymap.c b/keyboards/the_royal/liminal/keymaps/default/keymap.c index d9d949745..dd9866101 100644 --- a/keyboards/the_royal/liminal/keymaps/default/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default/keymap.c | |||
@@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
127 | ) | 127 | ) |
128 | }; | 128 | }; |
129 | 129 | ||
130 | uint16_t get_tapping_term(uint16_t keycode) { | 130 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
131 | switch (keycode) { | 131 | switch (keycode) { |
132 | case LT(_LOWER, KC_SPACE): | 132 | case LT(_LOWER, KC_SPACE): |
133 | return 160; | 133 | return 160; |
@@ -136,7 +136,7 @@ uint16_t get_tapping_term(uint16_t keycode) { | |||
136 | default: | 136 | default: |
137 | #ifndef TAPPING_TERM | 137 | #ifndef TAPPING_TERM |
138 | return 200; | 138 | return 200; |
139 | #else | 139 | #else |
140 | return TAPPING_TERM; | 140 | return TAPPING_TERM; |
141 | #endif | 141 | #endif |
142 | } | 142 | } |
diff --git a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c index 3d8debee3..62ff2b6a5 100644 --- a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c | |||
@@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
128 | 128 | ||
129 | }; | 129 | }; |
130 | 130 | ||
131 | uint16_t get_tapping_term(uint16_t keycode) { | 131 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
132 | switch (keycode) { | 132 | switch (keycode) { |
133 | case LT(_LOWER, KC_SPACE): | 133 | case LT(_LOWER, KC_SPACE): |
134 | return 160; | 134 | return 160; |
diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c index 3d282e182..509b49780 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c | |||
@@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
114 | }; | 114 | }; |
115 | 115 | ||
116 | #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term | 116 | #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term |
117 | uint16_t get_tapping_term(uint16_t keycode) { | 117 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
118 | switch (keycode) { | 118 | switch (keycode) { |
119 | case KC_BSLO: | 119 | case KC_BSLO: |
120 | return TAPPING_LAYER_TERM; | 120 | return TAPPING_LAYER_TERM; |
diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 6e22e9e23..a9d3a802d 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c | |||
@@ -99,7 +99,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
99 | if (record->event.pressed) { | 99 | if (record->event.pressed) { |
100 | #ifdef AUDIO_ENABLE | 100 | #ifdef AUDIO_ENABLE |
101 | stop_all_notes(); | 101 | stop_all_notes(); |
102 | PLAY_NOTE_ARRAY(tone_plover, false, 0); | 102 | PLAY_SONG(tone_plover); |
103 | #endif | 103 | #endif |
104 | layer_off(_NUMSYM); | 104 | layer_off(_NUMSYM); |
105 | layer_off(_FKEYS); | 105 | layer_off(_FKEYS); |
@@ -110,7 +110,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
110 | case 7: // LAYERRESET | 110 | case 7: // LAYERRESET |
111 | if (record->event.pressed) { | 111 | if (record->event.pressed) { |
112 | #ifdef AUDIO_ENABLE | 112 | #ifdef AUDIO_ENABLE |
113 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | 113 | PLAY_SONG(tone_qwerty); |
114 | #endif | 114 | #endif |
115 | layer_off(_NUMSYM); | 115 | layer_off(_NUMSYM); |
116 | layer_off(_FKEYS); | 116 | layer_off(_FKEYS); |
@@ -132,7 +132,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
132 | if(record->event.pressed) { | 132 | if(record->event.pressed) { |
133 | #ifdef AUDIO_ENABLE | 133 | #ifdef AUDIO_ENABLE |
134 | stop_all_notes(); | 134 | stop_all_notes(); |
135 | PLAY_NOTE_ARRAY(tone_adjust, false, 0); | 135 | PLAY_SONG(tone_adjust); |
136 | #endif | 136 | #endif |
137 | layer_off(_NUMSYM); | 137 | layer_off(_NUMSYM); |
138 | layer_off(_FKEYS); | 138 | layer_off(_FKEYS); |
@@ -166,12 +166,12 @@ void matrix_init_user(void) { | |||
166 | void startup_user() | 166 | void startup_user() |
167 | { | 167 | { |
168 | _delay_ms(20); // gets rid of tick | 168 | _delay_ms(20); // gets rid of tick |
169 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | 169 | PLAY_SONG(tone_startup); |
170 | } | 170 | } |
171 | 171 | ||
172 | void shutdown_user() | 172 | void shutdown_user() |
173 | { | 173 | { |
174 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 174 | PLAY_SONG(tone_goodbye); |
175 | _delay_ms(150); | 175 | _delay_ms(150); |
176 | stop_all_notes(); | 176 | stop_all_notes(); |
177 | } | 177 | } |
@@ -183,6 +183,6 @@ void music_on_user(void) | |||
183 | 183 | ||
184 | void music_scale_user(void) | 184 | void music_scale_user(void) |
185 | { | 185 | { |
186 | PLAY_NOTE_ARRAY(music_scale, false, 0); | 186 | PLAY_SONG(music_scale); |
187 | } | 187 | } |
188 | #endif | 188 | #endif |
diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index 18454d564..db5f6c37c 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c | |||
@@ -145,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
145 | case NUMPAD_LOCK: | 145 | case NUMPAD_LOCK: |
146 | if (record->event.pressed) { | 146 | if (record->event.pressed) { |
147 | #ifdef AUDIO_ENABLE | 147 | #ifdef AUDIO_ENABLE |
148 | PLAY_NOTE_ARRAY(tone_numpad, false, 0); | 148 | PLAY_SONG(tone_numpad); |
149 | #endif | 149 | #endif |
150 | persistant_default_layer_set(1UL<<_NUMPAD); | 150 | persistant_default_layer_set(1UL<<_NUMPAD); |
151 | } | 151 | } |
@@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
154 | case NAVIGATION_LOCK: | 154 | case NAVIGATION_LOCK: |
155 | if (record->event.pressed) { | 155 | if (record->event.pressed) { |
156 | #ifdef AUDIO_ENABLE | 156 | #ifdef AUDIO_ENABLE |
157 | PLAY_NOTE_ARRAY(tone_navigation, false, 0); | 157 | PLAY_SONG(tone_navigation); |
158 | #endif | 158 | #endif |
159 | persistant_default_layer_set(1UL<<_NAVIGATION); | 159 | persistant_default_layer_set(1UL<<_NAVIGATION); |
160 | } | 160 | } |
@@ -163,7 +163,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
163 | case EXCEL_LOCK: | 163 | case EXCEL_LOCK: |
164 | if (record->event.pressed) { | 164 | if (record->event.pressed) { |
165 | #ifdef AUDIO_ENABLE | 165 | #ifdef AUDIO_ENABLE |
166 | PLAY_NOTE_ARRAY(tone_excel, false, 0); | 166 | PLAY_SONG(tone_excel); |
167 | #endif | 167 | #endif |
168 | persistant_default_layer_set(1UL<<_EXCEL); | 168 | persistant_default_layer_set(1UL<<_EXCEL); |
169 | } | 169 | } |
diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index 5ba40bb35..9c35699c9 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h | |||
@@ -67,6 +67,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
67 | /* Locking resynchronize hack */ | 67 | /* Locking resynchronize hack */ |
68 | #define LOCKING_RESYNC_ENABLE | 68 | #define LOCKING_RESYNC_ENABLE |
69 | 69 | ||
70 | #define QMK_ESC_OUTPUT A0 // usually COL | ||
71 | #define QMK_ESC_INPUT F4 // usually ROW | ||
72 | #define QMK_LED D2 // NumLock on TKC1800 | ||
73 | //#define QMK_SPEAKER C6 | ||
74 | |||
70 | /* | 75 | /* |
71 | * Force NKRO | 76 | * Force NKRO |
72 | * | 77 | * |
diff --git a/keyboards/tkc1800/i2c.c b/keyboards/tkc1800/i2c.c deleted file mode 100644 index cd2b835d5..000000000 --- a/keyboards/tkc1800/i2c.c +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | #include <util/twi.h> | ||
2 | #include <avr/io.h> | ||
3 | #include <stdlib.h> | ||
4 | #include <avr/interrupt.h> | ||
5 | #include <util/twi.h> | ||
6 | #include <stdbool.h> | ||
7 | #include "i2c.h" | ||
8 | |||
9 | #ifdef USE_I2C | ||
10 | |||
11 | // Limits the amount of we wait for any one i2c transaction. | ||
12 | // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is | ||
13 | // 9 bits, a single transaction will take around 90μs to complete. | ||
14 | // | ||
15 | // (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit | ||
16 | // poll loop takes at least 8 clock cycles to execute | ||
17 | #define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 | ||
18 | |||
19 | #define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) | ||
20 | |||
21 | volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
22 | |||
23 | static volatile uint8_t slave_buffer_pos; | ||
24 | static volatile bool slave_has_register_set = false; | ||
25 | |||
26 | // Wait for an i2c operation to finish | ||
27 | inline static | ||
28 | void i2c_delay(void) { | ||
29 | uint16_t lim = 0; | ||
30 | while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) | ||
31 | lim++; | ||
32 | |||
33 | // easier way, but will wait slightly longer | ||
34 | // _delay_us(100); | ||
35 | } | ||
36 | |||
37 | // Setup twi to run at 100kHz | ||
38 | void i2c_master_init(void) { | ||
39 | // no prescaler | ||
40 | TWSR = 0; | ||
41 | // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. | ||
42 | // Check datasheets for more info. | ||
43 | TWBR = ((F_CPU/SCL_CLOCK)-16)/2; | ||
44 | } | ||
45 | |||
46 | // Start a transaction with the given i2c slave address. The direction of the | ||
47 | // transfer is set with I2C_READ and I2C_WRITE. | ||
48 | // returns: 0 => success | ||
49 | // 1 => error | ||
50 | uint8_t i2c_master_start(uint8_t address) { | ||
51 | TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); | ||
52 | |||
53 | i2c_delay(); | ||
54 | |||
55 | // check that we started successfully | ||
56 | if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) | ||
57 | return 1; | ||
58 | |||
59 | // send device address | ||
60 | TWDR = address; | ||
61 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
62 | |||
63 | i2c_delay(); | ||
64 | |||
65 | if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) | ||
66 | return 1; // slave did not acknowledge | ||
67 | else | ||
68 | return 0; // success | ||
69 | } | ||
70 | |||
71 | |||
72 | // Finish the i2c transaction. | ||
73 | void i2c_master_stop(void) { | ||
74 | TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); | ||
75 | |||
76 | uint16_t lim = 0; | ||
77 | while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) | ||
78 | lim++; | ||
79 | } | ||
80 | |||
81 | // Write one byte to the i2c slave. | ||
82 | // returns 0 => slave ACK | ||
83 | // 1 => slave NACK | ||
84 | uint8_t i2c_master_write(uint8_t data) { | ||
85 | TWDR = data; | ||
86 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
87 | |||
88 | i2c_delay(); | ||
89 | |||
90 | // check if the slave acknowledged us | ||
91 | return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; | ||
92 | } | ||
93 | |||
94 | // Read one byte from the i2c slave. If ack=1 the slave is acknowledged, | ||
95 | // if ack=0 the acknowledge bit is not set. | ||
96 | // returns: byte read from i2c device | ||
97 | uint8_t i2c_master_read(int ack) { | ||
98 | TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); | ||
99 | |||
100 | i2c_delay(); | ||
101 | return TWDR; | ||
102 | } | ||
103 | |||
104 | void i2c_reset_state(void) { | ||
105 | TWCR = 0; | ||
106 | } | ||
107 | |||
108 | void i2c_slave_init(uint8_t address) { | ||
109 | TWAR = address << 0; // slave i2c address | ||
110 | // TWEN - twi enable | ||
111 | // TWEA - enable address acknowledgement | ||
112 | // TWINT - twi interrupt flag | ||
113 | // TWIE - enable the twi interrupt | ||
114 | TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); | ||
115 | } | ||
116 | |||
117 | ISR(TWI_vect); | ||
118 | |||
119 | ISR(TWI_vect) { | ||
120 | uint8_t ack = 1; | ||
121 | switch(TW_STATUS) { | ||
122 | case TW_SR_SLA_ACK: | ||
123 | // this device has been addressed as a slave receiver | ||
124 | slave_has_register_set = false; | ||
125 | break; | ||
126 | |||
127 | case TW_SR_DATA_ACK: | ||
128 | // this device has received data as a slave receiver | ||
129 | // The first byte that we receive in this transaction sets the location | ||
130 | // of the read/write location of the slaves memory that it exposes over | ||
131 | // i2c. After that, bytes will be written at slave_buffer_pos, incrementing | ||
132 | // slave_buffer_pos after each write. | ||
133 | if(!slave_has_register_set) { | ||
134 | slave_buffer_pos = TWDR; | ||
135 | // don't acknowledge the master if this memory loctaion is out of bounds | ||
136 | if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { | ||
137 | ack = 0; | ||
138 | slave_buffer_pos = 0; | ||
139 | } | ||
140 | slave_has_register_set = true; | ||
141 | } else { | ||
142 | i2c_slave_buffer[slave_buffer_pos] = TWDR; | ||
143 | BUFFER_POS_INC(); | ||
144 | } | ||
145 | break; | ||
146 | |||
147 | case TW_ST_SLA_ACK: | ||
148 | case TW_ST_DATA_ACK: | ||
149 | // master has addressed this device as a slave transmitter and is | ||
150 | // requesting data. | ||
151 | TWDR = i2c_slave_buffer[slave_buffer_pos]; | ||
152 | BUFFER_POS_INC(); | ||
153 | break; | ||
154 | |||
155 | case TW_BUS_ERROR: // something went wrong, reset twi state | ||
156 | TWCR = 0; | ||
157 | default: | ||
158 | break; | ||
159 | } | ||
160 | // Reset everything, so we are ready for the next TWI interrupt | ||
161 | TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); | ||
162 | } | ||
163 | |||
164 | |||
165 | |||
166 | #endif | ||
diff --git a/keyboards/tkc1800/i2c.h b/keyboards/tkc1800/i2c.h deleted file mode 100644 index 2bd7f4096..000000000 --- a/keyboards/tkc1800/i2c.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef I2C_H | ||
2 | #define I2C_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | |||
6 | #ifndef F_CPU | ||
7 | #define F_CPU 16000000UL | ||
8 | #endif | ||
9 | |||
10 | #define I2C_READ 1 | ||
11 | #define I2C_WRITE 0 | ||
12 | |||
13 | #define I2C_ACK 1 | ||
14 | #define I2C_NACK 0 | ||
15 | |||
16 | #define SLAVE_BUFFER_SIZE 0x10 | ||
17 | |||
18 | // i2c SCL clock frequency | ||
19 | #define SCL_CLOCK 800000L | ||
20 | |||
21 | extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
22 | |||
23 | void i2c_master_init(void); | ||
24 | uint8_t i2c_master_start(uint8_t address); | ||
25 | void i2c_master_stop(void); | ||
26 | uint8_t i2c_master_write(uint8_t data); | ||
27 | uint8_t i2c_master_read(int); | ||
28 | void i2c_reset_state(void); | ||
29 | void i2c_slave_init(uint8_t address); | ||
30 | |||
31 | |||
32 | static inline unsigned char i2c_start_read(unsigned char addr) { | ||
33 | return i2c_master_start((addr << 1) | I2C_READ); | ||
34 | } | ||
35 | |||
36 | static inline unsigned char i2c_start_write(unsigned char addr) { | ||
37 | return i2c_master_start((addr << 1) | I2C_WRITE); | ||
38 | } | ||
39 | |||
40 | // from SSD1306 scrips | ||
41 | extern unsigned char i2c_rep_start(unsigned char addr); | ||
42 | extern void i2c_start_wait(unsigned char addr); | ||
43 | extern unsigned char i2c_readAck(void); | ||
44 | extern unsigned char i2c_readNak(void); | ||
45 | extern unsigned char i2c_read(unsigned char ack); | ||
46 | |||
47 | #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); | ||
48 | |||
49 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h deleted file mode 100644 index ee142927f..000000000 --- a/keyboards/tkc1800/keymaps/default/config.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #define USE_I2C | ||
20 | #define SSD1306OLED | ||
21 | //#define OLED_ROTATE180 | ||
22 | #define SSD1306_ADDRESS 0x3C | ||
23 | |||
24 | // place overrides here | ||
diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index 5455934a3..4f4c7f8e9 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c | |||
@@ -13,11 +13,8 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
16 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
17 | #include "LUFA/Drivers/Peripheral/TWI.h" | ||
18 | #include "i2c.h" | ||
19 | #include "ssd1306.h" | ||
20 | |||
21 | 18 | ||
22 | //Layers | 19 | //Layers |
23 | 20 | ||
@@ -26,13 +23,6 @@ enum { | |||
26 | FUNCTION, | 23 | FUNCTION, |
27 | }; | 24 | }; |
28 | 25 | ||
29 | bool screenWorks = 0; | ||
30 | |||
31 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | ||
32 | static char layer_lookup[][14] = {"Base","Function"}; | ||
33 | |||
34 | |||
35 | |||
36 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
37 | /* Keymap BASE: (Base Layer) Default Layer | 27 | /* Keymap BASE: (Base Layer) Default Layer |
38 | * ,-------------------------------------------------------. ,-------------------. | 28 | * ,-------------------------------------------------------. ,-------------------. |
@@ -88,72 +78,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
88 | ), | 78 | ), |
89 | }; | 79 | }; |
90 | 80 | ||
91 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
92 | return true; | ||
93 | } | ||
94 | |||
95 | void led_set_user(uint8_t usb_led) { | ||
96 | 81 | ||
97 | } | 82 | #ifdef OLED_DRIVER_ENABLE |
98 | 83 | void oled_task_user(void) { | |
99 | void matrix_init_user(void) { | 84 | oled_write_P(PSTR("TKC1800\n"),false); |
100 | #ifdef USE_I2C | 85 | // Host Keyboard Layer Status |
101 | i2c_master_init(); | 86 | oled_write_P(PSTR("Layer: "), false); |
102 | #ifdef SSD1306OLED | 87 | |
103 | // calls code for the SSD1306 OLED | 88 | switch (get_highest_layer(layer_state)) { |
104 | _delay_ms(400); | 89 | case BASE: |
105 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 90 | oled_write_P(PSTR("Base\n"), false); |
106 | if ( iota_gfx_init() ) { // turns on the display | 91 | break; |
107 | screenWorks = 1; | 92 | case FUNCTION: |
108 | } | 93 | oled_write_P(PSTR("Function\n"), false); |
109 | #endif | 94 | break; |
110 | #endif | 95 | default: |
111 | #ifdef AUDIO_ENABLE | 96 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
112 | startup_user(); | 97 | oled_write_ln_P(PSTR("Undefined"), false); |
113 | #endif | ||
114 | } | ||
115 | |||
116 | void matrix_scan_user(void) { | ||
117 | #ifdef SSD1306OLED | ||
118 | if ( screenWorks ) { | ||
119 | iota_gfx_task(); // this is what updates the display continuously | ||
120 | }; | ||
121 | #endif | ||
122 | } | ||
123 | |||
124 | void matrix_update(struct CharacterMatrix *dest, | ||
125 | const struct CharacterMatrix *source) { | ||
126 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
127 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
128 | dest->dirty = true; | ||
129 | } | ||
130 | } | ||
131 | |||
132 | void iota_gfx_task_user(void) { | ||
133 | #if DEBUG_TO_SCREEN | ||
134 | if (debug_enable) { | ||
135 | return; | ||
136 | } | 98 | } |
137 | #endif | ||
138 | |||
139 | struct CharacterMatrix matrix; | ||
140 | |||
141 | matrix_clear(&matrix); | ||
142 | matrix_write_P(&matrix, PSTR("TKC1800")); | ||
143 | |||
144 | uint8_t layer = biton32(layer_state); | ||
145 | |||
146 | char buf[40]; | ||
147 | snprintf(buf,sizeof(buf), "Undef-%d", layer); | ||
148 | matrix_write_P(&matrix, PSTR("\nLayer: ")); | ||
149 | matrix_write(&matrix, layer_lookup[layer]); | ||
150 | 99 | ||
151 | // Host Keyboard LED Status | 100 | // Host Keyboard LED Status |
152 | char led[40]; | 101 | led_t led_state = host_keyboard_led_state(); |
153 | snprintf(led, sizeof(led), "\n\n%s %s %s", | 102 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
154 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 103 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
155 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 104 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
156 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
157 | matrix_write(&matrix, led); | ||
158 | matrix_update(&display, &matrix); | ||
159 | } | 105 | } |
106 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/keymaps/smt/config.h b/keyboards/tkc1800/keymaps/smt/config.h deleted file mode 100644 index ee142927f..000000000 --- a/keyboards/tkc1800/keymaps/smt/config.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #define USE_I2C | ||
20 | #define SSD1306OLED | ||
21 | //#define OLED_ROTATE180 | ||
22 | #define SSD1306_ADDRESS 0x3C | ||
23 | |||
24 | // place overrides here | ||
diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc1800/keymaps/smt/keymap.c index 9f506b443..9b6ad80d3 100644 --- a/keyboards/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc1800/keymaps/smt/keymap.c | |||
@@ -13,10 +13,8 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
16 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
17 | #include "LUFA/Drivers/Peripheral/TWI.h" | ||
18 | #include "i2c.h" | ||
19 | #include "ssd1306.h" | ||
20 | 18 | ||
21 | // Custom macros | 19 | // Custom macros |
22 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl | 20 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl |
@@ -32,11 +30,6 @@ enum { | |||
32 | FUNCTION, | 30 | FUNCTION, |
33 | }; | 31 | }; |
34 | 32 | ||
35 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | ||
36 | static char layer_lookup[][14] = {"Qwerty","Dvorak","Function"}; | ||
37 | |||
38 | |||
39 | |||
40 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 33 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
41 | /* Keymap QWERTY: (Qwerty Layer) Default Layer | 34 | /* Keymap QWERTY: (Qwerty Layer) Default Layer |
42 | * ,-------------------------------------------------------. ,-------------------. | 35 | * ,-------------------------------------------------------. ,-------------------. |
@@ -151,64 +144,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
151 | return true; | 144 | return true; |
152 | } | 145 | } |
153 | 146 | ||
154 | void led_set_user(uint8_t usb_led) { | 147 | #ifdef OLED_DRIVER_ENABLE |
155 | 148 | void oled_task_user(void) { | |
156 | } | 149 | oled_write_P(PSTR("TKC1800\n"),false); |
157 | 150 | // Host Keyboard Layer Status | |
158 | void matrix_init_user(void) { | 151 | oled_write_P(PSTR("Layer: "), false); |
159 | #ifdef USE_I2C | 152 | |
160 | i2c_master_init(); | 153 | switch (get_highest_layer(layer_state)) { |
161 | #ifdef SSD1306OLED | 154 | case QWERTY: |
162 | // calls code for the SSD1306 OLED | 155 | oled_write_P(PSTR("Base\n"), false); |
163 | _delay_ms(400); | 156 | break; |
164 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 157 | case COLEMAK: |
165 | iota_gfx_init(); // turns on the display | 158 | oled_write_P(PSTR("Colemak\n"), false); |
166 | #endif | 159 | break; |
167 | #endif | 160 | case DVORAK: |
168 | #ifdef AUDIO_ENABLE | 161 | oled_write_P(PSTR("Dvorak\n"), false); |
169 | startup_user(); | 162 | break; |
170 | #endif | 163 | case FUNCTION: |
171 | } | 164 | oled_write_P(PSTR("Function\n"), false); |
172 | 165 | break; | |
173 | void matrix_scan_user(void) { | 166 | default: |
174 | #ifdef SSD1306OLED | 167 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
175 | iota_gfx_task(); // this is what updates the display continuously | 168 | oled_write_ln_P(PSTR("Undefined"), false); |
176 | #endif | ||
177 | } | ||
178 | |||
179 | void matrix_update(struct CharacterMatrix *dest, | ||
180 | const struct CharacterMatrix *source) { | ||
181 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
182 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
183 | dest->dirty = true; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | void iota_gfx_task_user(void) { | ||
188 | #if DEBUG_TO_SCREEN | ||
189 | if (debug_enable) { | ||
190 | return; | ||
191 | } | 169 | } |
192 | #endif | ||
193 | |||
194 | struct CharacterMatrix matrix; | ||
195 | |||
196 | matrix_clear(&matrix); | ||
197 | matrix_write_P(&matrix, PSTR("TKC1800")); | ||
198 | |||
199 | uint8_t layer = biton32(layer_state); | ||
200 | |||
201 | char buf[40]; | ||
202 | snprintf(buf,sizeof(buf), "Undef-%d", layer); | ||
203 | matrix_write_P(&matrix, PSTR("\nLayer: ")); | ||
204 | matrix_write(&matrix, layer_lookup[layer]); | ||
205 | 170 | ||
206 | // Host Keyboard LED Status | 171 | // Host Keyboard LED Status |
207 | char led[40]; | 172 | led_t led_state = host_keyboard_led_state(); |
208 | snprintf(led, sizeof(led), "\n\n%s %s %s", | 173 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
209 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 174 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
210 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 175 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
211 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
212 | matrix_write(&matrix, led); | ||
213 | matrix_update(&display, &matrix); | ||
214 | } | 176 | } |
177 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/keymaps/via/keymap.c b/keyboards/tkc1800/keymaps/via/keymap.c index 5455934a3..76fdf0540 100644 --- a/keyboards/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc1800/keymaps/via/keymap.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
17 | #include "LUFA/Drivers/Peripheral/TWI.h" | ||
18 | #include "i2c.h" | ||
19 | #include "ssd1306.h" | ||
20 | |||
21 | 17 | ||
22 | //Layers | 18 | //Layers |
23 | 19 | ||
@@ -26,13 +22,6 @@ enum { | |||
26 | FUNCTION, | 22 | FUNCTION, |
27 | }; | 23 | }; |
28 | 24 | ||
29 | bool screenWorks = 0; | ||
30 | |||
31 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | ||
32 | static char layer_lookup[][14] = {"Base","Function"}; | ||
33 | |||
34 | |||
35 | |||
36 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 25 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
37 | /* Keymap BASE: (Base Layer) Default Layer | 26 | /* Keymap BASE: (Base Layer) Default Layer |
38 | * ,-------------------------------------------------------. ,-------------------. | 27 | * ,-------------------------------------------------------. ,-------------------. |
@@ -88,72 +77,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
88 | ), | 77 | ), |
89 | }; | 78 | }; |
90 | 79 | ||
91 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 80 | #ifdef OLED_DRIVER_ENABLE |
92 | return true; | 81 | void oled_task_user(void) { |
93 | } | 82 | oled_write_P(PSTR("TKC1800\n"),false); |
94 | 83 | // Host Keyboard Layer Status | |
95 | void led_set_user(uint8_t usb_led) { | 84 | oled_write_P(PSTR("Layer: "), false); |
96 | 85 | ||
97 | } | 86 | switch (get_highest_layer(layer_state)) { |
98 | 87 | case BASE: | |
99 | void matrix_init_user(void) { | 88 | oled_write_P(PSTR("Base\n"), false); |
100 | #ifdef USE_I2C | 89 | break; |
101 | i2c_master_init(); | 90 | case FUNCTION: |
102 | #ifdef SSD1306OLED | 91 | oled_write_P(PSTR("Function\n"), false); |
103 | // calls code for the SSD1306 OLED | 92 | break; |
104 | _delay_ms(400); | 93 | default: |
105 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 94 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
106 | if ( iota_gfx_init() ) { // turns on the display | 95 | oled_write_ln_P(PSTR("Undefined"), false); |
107 | screenWorks = 1; | ||
108 | } | ||
109 | #endif | ||
110 | #endif | ||
111 | #ifdef AUDIO_ENABLE | ||
112 | startup_user(); | ||
113 | #endif | ||
114 | } | ||
115 | |||
116 | void matrix_scan_user(void) { | ||
117 | #ifdef SSD1306OLED | ||
118 | if ( screenWorks ) { | ||
119 | iota_gfx_task(); // this is what updates the display continuously | ||
120 | }; | ||
121 | #endif | ||
122 | } | ||
123 | |||
124 | void matrix_update(struct CharacterMatrix *dest, | ||
125 | const struct CharacterMatrix *source) { | ||
126 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
127 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
128 | dest->dirty = true; | ||
129 | } | ||
130 | } | ||
131 | |||
132 | void iota_gfx_task_user(void) { | ||
133 | #if DEBUG_TO_SCREEN | ||
134 | if (debug_enable) { | ||
135 | return; | ||
136 | } | 96 | } |
137 | #endif | ||
138 | |||
139 | struct CharacterMatrix matrix; | ||
140 | |||
141 | matrix_clear(&matrix); | ||
142 | matrix_write_P(&matrix, PSTR("TKC1800")); | ||
143 | |||
144 | uint8_t layer = biton32(layer_state); | ||
145 | |||
146 | char buf[40]; | ||
147 | snprintf(buf,sizeof(buf), "Undef-%d", layer); | ||
148 | matrix_write_P(&matrix, PSTR("\nLayer: ")); | ||
149 | matrix_write(&matrix, layer_lookup[layer]); | ||
150 | 97 | ||
151 | // Host Keyboard LED Status | 98 | // Host Keyboard LED Status |
152 | char led[40]; | 99 | led_t led_state = host_keyboard_led_state(); |
153 | snprintf(led, sizeof(led), "\n\n%s %s %s", | 100 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
154 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 101 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
155 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 102 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
156 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
157 | matrix_write(&matrix, led); | ||
158 | matrix_update(&display, &matrix); | ||
159 | } | 103 | } |
104 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/keymaps/wkl/config.h b/keyboards/tkc1800/keymaps/wkl/config.h deleted file mode 100644 index ee142927f..000000000 --- a/keyboards/tkc1800/keymaps/wkl/config.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #define USE_I2C | ||
20 | #define SSD1306OLED | ||
21 | //#define OLED_ROTATE180 | ||
22 | #define SSD1306_ADDRESS 0x3C | ||
23 | |||
24 | // place overrides here | ||
diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index 6f331c61c..3c65b61d1 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c | |||
@@ -13,11 +13,8 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
16 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
17 | #include "LUFA/Drivers/Peripheral/TWI.h" | ||
18 | #include "i2c.h" | ||
19 | #include "ssd1306.h" | ||
20 | |||
21 | 18 | ||
22 | //Layers | 19 | //Layers |
23 | 20 | ||
@@ -26,13 +23,6 @@ enum { | |||
26 | FUNCTION, | 23 | FUNCTION, |
27 | }; | 24 | }; |
28 | 25 | ||
29 | bool screenWorks = 0; | ||
30 | |||
31 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | ||
32 | static char layer_lookup[][14] = {"Base","Function"}; | ||
33 | |||
34 | |||
35 | |||
36 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
37 | /* Keymap BASE: (Base Layer) Default Layer | 27 | /* Keymap BASE: (Base Layer) Default Layer |
38 | * ,-------------------------------------------------------. ,-------------------. | 28 | * ,-------------------------------------------------------. ,-------------------. |
@@ -71,72 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
71 | ), | 61 | ), |
72 | }; | 62 | }; |
73 | 63 | ||
74 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 64 | #ifdef OLED_DRIVER_ENABLE |
75 | return true; | 65 | void oled_task_user(void) { |
76 | } | 66 | oled_write_P(PSTR("TKC1800\n"),false); |
77 | 67 | // Host Keyboard Layer Status | |
78 | void led_set_user(uint8_t usb_led) { | 68 | oled_write_P(PSTR("Layer: "), false); |
79 | 69 | ||
80 | } | 70 | switch (get_highest_layer(layer_state)) { |
81 | 71 | case BASE: | |
82 | void matrix_init_user(void) { | 72 | oled_write_P(PSTR("Base\n"), false); |
83 | #ifdef USE_I2C | 73 | break; |
84 | i2c_master_init(); | 74 | case FUNCTION: |
85 | #ifdef SSD1306OLED | 75 | oled_write_P(PSTR("Function\n"), false); |
86 | // calls code for the SSD1306 OLED | 76 | break; |
87 | _delay_ms(400); | 77 | default: |
88 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
89 | if ( iota_gfx_init() ) { // turns on the display | 79 | oled_write_ln_P(PSTR("Undefined"), false); |
90 | screenWorks = 1; | ||
91 | } | ||
92 | #endif | ||
93 | #endif | ||
94 | #ifdef AUDIO_ENABLE | ||
95 | startup_user(); | ||
96 | #endif | ||
97 | } | ||
98 | |||
99 | void matrix_scan_user(void) { | ||
100 | #ifdef SSD1306OLED | ||
101 | if ( screenWorks ) { | ||
102 | iota_gfx_task(); // this is what updates the display continuously | ||
103 | }; | ||
104 | #endif | ||
105 | } | ||
106 | |||
107 | void matrix_update(struct CharacterMatrix *dest, | ||
108 | const struct CharacterMatrix *source) { | ||
109 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
110 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
111 | dest->dirty = true; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | void iota_gfx_task_user(void) { | ||
116 | #if DEBUG_TO_SCREEN | ||
117 | if (debug_enable) { | ||
118 | return; | ||
119 | } | 80 | } |
120 | #endif | ||
121 | |||
122 | struct CharacterMatrix matrix; | ||
123 | |||
124 | matrix_clear(&matrix); | ||
125 | matrix_write_P(&matrix, PSTR("TKC1800")); | ||
126 | |||
127 | uint8_t layer = biton32(layer_state); | ||
128 | |||
129 | char buf[40]; | ||
130 | snprintf(buf,sizeof(buf), "Undef-%d", layer); | ||
131 | matrix_write_P(&matrix, PSTR("\nLayer: ")); | ||
132 | matrix_write(&matrix, layer_lookup[layer]); | ||
133 | 81 | ||
134 | // Host Keyboard LED Status | 82 | // Host Keyboard LED Status |
135 | char led[40]; | 83 | led_t led_state = host_keyboard_led_state(); |
136 | snprintf(led, sizeof(led), "\n\n%s %s %s", | 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
137 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
138 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
139 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
140 | matrix_write(&matrix, led); | ||
141 | matrix_update(&display, &matrix); | ||
142 | } | 87 | } |
88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/keymaps/yanfali/config.h b/keyboards/tkc1800/keymaps/yanfali/config.h deleted file mode 100644 index f1390cb03..000000000 --- a/keyboards/tkc1800/keymaps/yanfali/config.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | //#define USE_I2C | ||
20 | //#define SSD1306OLED | ||
21 | //#define OLED_ROTATE180 | ||
22 | #define SSD1306_ADDRESS 0x3C | ||
23 | |||
24 | // place overrides here | ||
diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c index 8dad3446d..bbffc2d20 100644 --- a/keyboards/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c | |||
@@ -13,11 +13,8 @@ | |||
13 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | |||
16 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
17 | #include "LUFA/Drivers/Peripheral/TWI.h" | ||
18 | #include "i2c.h" | ||
19 | #include "ssd1306.h" | ||
20 | |||
21 | 18 | ||
22 | //Layers | 19 | //Layers |
23 | 20 | ||
@@ -26,11 +23,6 @@ enum { | |||
26 | FUNCTION, | 23 | FUNCTION, |
27 | }; | 24 | }; |
28 | 25 | ||
29 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | ||
30 | static char layer_lookup[][14] = {"Base","Function"}; | ||
31 | |||
32 | |||
33 | |||
34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
35 | /* Keymap BASE: (Base Layer) Default Layer | 27 | /* Keymap BASE: (Base Layer) Default Layer |
36 | * ,-------------------------------------------------------. ,-------------------. | 28 | * ,-------------------------------------------------------. ,-------------------. |
@@ -69,68 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
69 | ), | 61 | ), |
70 | }; | 62 | }; |
71 | 63 | ||
72 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 64 | #ifdef OLED_DRIVER_ENABLE |
73 | return true; | 65 | void oled_task_user(void) { |
74 | } | 66 | oled_write_P(PSTR("TKC1800\n"),false); |
75 | 67 | // Host Keyboard Layer Status | |
76 | void led_set_user(uint8_t usb_led) { | 68 | oled_write_P(PSTR("Layer: "), false); |
77 | 69 | ||
78 | } | 70 | switch (get_highest_layer(layer_state)) { |
79 | 71 | case BASE: | |
80 | void matrix_init_user(void) { | 72 | oled_write_P(PSTR("Base\n"), false); |
81 | #ifdef USE_I2C | 73 | break; |
82 | i2c_master_init(); | 74 | case FUNCTION: |
83 | #ifdef SSD1306OLED | 75 | oled_write_P(PSTR("Function\n"), false); |
84 | // calls code for the SSD1306 OLED | 76 | break; |
85 | _delay_ms(400); | 77 | default: |
86 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string |
87 | iota_gfx_init(); // turns on the display | 79 | oled_write_ln_P(PSTR("Undefined"), false); |
88 | #endif | ||
89 | #endif | ||
90 | #ifdef AUDIO_ENABLE | ||
91 | startup_user(); | ||
92 | #endif | ||
93 | } | ||
94 | |||
95 | void matrix_scan_user(void) { | ||
96 | #ifdef SSD1306OLED | ||
97 | iota_gfx_task(); // this is what updates the display continuously | ||
98 | #endif | ||
99 | } | ||
100 | |||
101 | void matrix_update(struct CharacterMatrix *dest, | ||
102 | const struct CharacterMatrix *source) { | ||
103 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
104 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
105 | dest->dirty = true; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | void iota_gfx_task_user(void) { | ||
110 | #if DEBUG_TO_SCREEN | ||
111 | if (debug_enable) { | ||
112 | return; | ||
113 | } | 80 | } |
114 | #endif | ||
115 | |||
116 | struct CharacterMatrix matrix; | ||
117 | |||
118 | matrix_clear(&matrix); | ||
119 | matrix_write_P(&matrix, PSTR("TKC1800")); | ||
120 | |||
121 | uint8_t layer = biton32(layer_state); | ||
122 | |||
123 | char buf[40]; | ||
124 | snprintf(buf,sizeof(buf), "Undef-%d", layer); | ||
125 | matrix_write_P(&matrix, PSTR("\nLayer: ")); | ||
126 | matrix_write(&matrix, layer_lookup[layer]); | ||
127 | 81 | ||
128 | // Host Keyboard LED Status | 82 | // Host Keyboard LED Status |
129 | char led[40]; | 83 | led_t led_state = host_keyboard_led_state(); |
130 | snprintf(led, sizeof(led), "\n\n%s %s %s", | 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); |
131 | (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", | 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); |
132 | (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", | 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); |
133 | (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); | ||
134 | matrix_write(&matrix, led); | ||
135 | matrix_update(&display, &matrix); | ||
136 | } | 87 | } |
88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 7cc3bbe20..fa90e9980 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk | |||
@@ -9,12 +9,13 @@ MCU = at90usb1286 | |||
9 | # QMK DFU qmk-dfu | 9 | # QMK DFU qmk-dfu |
10 | # ATmega32A bootloadHID | 10 | # ATmega32A bootloadHID |
11 | # ATmega328P USBasp | 11 | # ATmega328P USBasp |
12 | BOOTLOADER = atmel-dfu | 12 | BOOTLOADER = qmk-dfu |
13 | 13 | ||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | 17 | |
18 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = yes # Mouse keys | 19 | MOUSEKEY_ENABLE = yes # Mouse keys |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | 20 | EXTRAKEY_ENABLE = yes # Audio control and System control |
20 | CONSOLE_ENABLE = no # Console for debug | 21 | CONSOLE_ENABLE = no # Console for debug |
@@ -29,6 +30,4 @@ MIDI_ENABLE = no # MIDI controls | |||
29 | UNICODE_ENABLE = no # Unicode | 30 | UNICODE_ENABLE = no # Unicode |
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 31 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
31 | AUDIO_ENABLE = no # Audio output on port C6 | 32 | AUDIO_ENABLE = no # Audio output on port C6 |
32 | 33 | OLED_DRIVER_ENABLE = yes \ No newline at end of file | |
33 | SRC = i2c.c \ | ||
34 | ssd1306.c | ||
diff --git a/keyboards/tkc1800/tkc1800.c b/keyboards/tkc1800/tkc1800.c index bc6676846..4232c97d5 100644 --- a/keyboards/tkc1800/tkc1800.c +++ b/keyboards/tkc1800/tkc1800.c | |||
@@ -16,6 +16,13 @@ | |||
16 | #include "tkc1800.h" | 16 | #include "tkc1800.h" |
17 | #include "led.h" | 17 | #include "led.h" |
18 | 18 | ||
19 | void keyboard_pre_init_kb(void) { | ||
20 | setPinInputHigh(D0); | ||
21 | setPinInputHigh(D1); | ||
22 | |||
23 | keyboard_pre_init_user(); | ||
24 | } | ||
25 | |||
19 | void matrix_init_kb(void) { | 26 | void matrix_init_kb(void) { |
20 | // put your keyboard start-up code here | 27 | // put your keyboard start-up code here |
21 | // runs once when the firmware starts up | 28 | // runs once when the firmware starts up |
diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c index 7ca797fcc..791fed059 100644 --- a/keyboards/treadstone32/keymaps/default/keymap.c +++ b/keyboards/treadstone32/keymaps/default/keymap.c | |||
@@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
110 | ) | 110 | ) |
111 | }; | 111 | }; |
112 | 112 | ||
113 | uint16_t get_tapping_term(uint16_t keycode) { | 113 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
114 | switch (keycode) { | 114 | switch (keycode) { |
115 | case KC_BSLO: | 115 | case KC_BSLO: |
116 | return TAPPING_LAYER_TERM; | 116 | return TAPPING_LAYER_TERM; |
diff --git a/keyboards/treadstone32/keymaps/like_jis/keymap.c b/keyboards/treadstone32/keymaps/like_jis/keymap.c index a738226d9..92518b11a 100644 --- a/keyboards/treadstone32/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone32/keymaps/like_jis/keymap.c | |||
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
111 | ) | 111 | ) |
112 | }; | 112 | }; |
113 | 113 | ||
114 | uint16_t get_tapping_term(uint16_t keycode) { | 114 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { |
115 | switch (keycode) { | 115 | switch (keycode) { |
116 | case KC_BSLO: | 116 | case KC_BSLO: |
117 | return TAPPING_LAYER_TERM; | 117 | return TAPPING_LAYER_TERM; |
diff --git a/keyboards/vision_division/keymaps/default/rules.mk b/keyboards/vision_division/keymaps/default/rules.mk deleted file mode 100644 index ef72559a0..000000000 --- a/keyboards/vision_division/keymaps/default/rules.mk +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | AUDIO_ENABLE = yes | ||
diff --git a/keyboards/vision_division/rules.mk b/keyboards/vision_division/rules.mk index 5d9d515f7..789ff97c7 100644 --- a/keyboards/vision_division/rules.mk +++ b/keyboards/vision_division/rules.mk | |||
@@ -27,4 +27,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by d | |||
27 | MIDI_ENABLE = no # MIDI controls | 27 | MIDI_ENABLE = no # MIDI controls |
28 | UNICODE_ENABLE = no # Unicode | 28 | UNICODE_ENABLE = no # Unicode |
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output |
diff --git a/keyboards/xd60/keymaps/Jos/keymap.c b/keyboards/xd60/keymaps/Jos/keymap.c index f272d6fd1..250becf74 100644 --- a/keyboards/xd60/keymaps/Jos/keymap.c +++ b/keyboards/xd60/keymaps/Jos/keymap.c | |||
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
46 | RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \ | 46 | RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, KC_PSCR, \ |
47 | KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | 47 | KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ |
48 | KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS, \ | 48 | KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_NO, KC_TRNS, \ |
49 | KC_TRNS, F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, \ | 49 | KC_TRNS, TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, \ |
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), | 50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END), |
51 | 51 | ||
52 | // 2: GUI/Function 2 Layer | 52 | // 2: GUI/Function 2 Layer |
@@ -74,11 +74,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
74 | / KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), */ | 74 | / KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), */ |
75 | }; | 75 | }; |
76 | 76 | ||
77 | // Custom Actions | ||
78 | const uint16_t PROGMEM fn_actions[] = { | ||
79 | [2] = ACTION_LAYER_TOGGLE(3), // to Fn3/Num toggle layer | ||
80 | }; | ||
81 | |||
82 | // Macros | 77 | // Macros |
83 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 78 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { |
84 | 79 | ||
diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xd60/keymaps/cheese/keymap.c index 3c418c5dc..2ffd3bb5c 100644 --- a/keyboards/xd60/keymaps/cheese/keymap.c +++ b/keyboards/xd60/keymaps/cheese/keymap.c | |||
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
31 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ | 31 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, \ |
32 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ | 32 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ |
33 | MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ | 33 | MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ |
34 | F(0), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), F(1), F(1), \ | 34 | LM(_LS, MOD_LSFT), KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LM(_RS, MOD_RSFT), LM(_RS, MOD_RSFT), LM(_RS, MOD_RSFT), \ |
35 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), | 35 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), |
36 | 36 | ||
37 | // Function Layer | 37 | // Function Layer |
@@ -59,9 +59,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
60 | 60 | ||
61 | }; | 61 | }; |
62 | |||
63 | // Custom Actions | ||
64 | const uint16_t PROGMEM fn_actions[] = { | ||
65 | [0] = ACTION_LAYER_MODS(_LS, MOD_LSFT), | ||
66 | [1] = ACTION_LAYER_MODS(_RS, MOD_RSFT), | ||
67 | }; | ||
diff --git a/keyboards/z150_blackheart/config.h b/keyboards/z150_bh/config.h index fc33021ff..fc33021ff 100644 --- a/keyboards/z150_blackheart/config.h +++ b/keyboards/z150_bh/config.h | |||
diff --git a/keyboards/z150_blackheart/info.json b/keyboards/z150_bh/info.json index 016641254..6e5c121f6 100644 --- a/keyboards/z150_blackheart/info.json +++ b/keyboards/z150_bh/info.json | |||
@@ -1,5 +1,5 @@ | |||
1 | { | 1 | { |
2 | "keyboard_name": "Z-150 Blackheart", | 2 | "keyboard_name": "Z-150 BH", |
3 | "url": "", | 3 | "url": "", |
4 | "maintainer": "qmk, blindassassin111", | 4 | "maintainer": "qmk, blindassassin111", |
5 | "width": 21.25, | 5 | "width": 21.25, |
diff --git a/keyboards/z150_blackheart/keymaps/default/keymap.c b/keyboards/z150_bh/keymaps/default/keymap.c index ff4f6f7f9..ff4f6f7f9 100644 --- a/keyboards/z150_blackheart/keymaps/default/keymap.c +++ b/keyboards/z150_bh/keymaps/default/keymap.c | |||
diff --git a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c b/keyboards/z150_bh/keymaps/default_tkl/keymap.c index f1a24b8dd..f1a24b8dd 100644 --- a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c +++ b/keyboards/z150_bh/keymaps/default_tkl/keymap.c | |||
diff --git a/keyboards/z150_blackheart/readme.md b/keyboards/z150_bh/readme.md index 331f85694..a1d484580 100644 --- a/keyboards/z150_blackheart/readme.md +++ b/keyboards/z150_bh/readme.md | |||
@@ -1,14 +1,14 @@ | |||
1 | Z-150 Blackheart PCB | 1 | Z-150 BH PCB |
2 | === | 2 | === |
3 | 3 | ||
4 | A replacement PCB for Zenith Z-150 keyboards. | 4 | A replacement PCB for Zenith Z-150 keyboards. |
5 | 5 | ||
6 | Keyboard Maintainer: QMK Community and blindassassin111 | 6 | Keyboard Maintainer: QMK Community and blindassassin111 |
7 | Hardware Supported: Z-150 blackheart PCB | 7 | Hardware Supported: Z-150 BH PCB |
8 | Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) | 8 | Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) |
9 | 9 | ||
10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
11 | 11 | ||
12 | make z150_blackheart:default | 12 | make z150_bh:default |
13 | 13 | ||
14 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | 14 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
diff --git a/keyboards/z150_blackheart/rules.mk b/keyboards/z150_bh/rules.mk index 739bea393..739bea393 100644 --- a/keyboards/z150_blackheart/rules.mk +++ b/keyboards/z150_bh/rules.mk | |||
diff --git a/keyboards/z150_blackheart/z150_blackheart.c b/keyboards/z150_bh/z150_bh.c index b754c64a1..6db784b56 100644 --- a/keyboards/z150_blackheart/z150_blackheart.c +++ b/keyboards/z150_bh/z150_bh.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "z150_blackheart.h" | 1 | #include "z150_bh.h" |
2 | 2 | ||
3 | void matrix_init_kb(void) { | 3 | void matrix_init_kb(void) { |
4 | setPinOutput(B0); | 4 | setPinOutput(B0); |
diff --git a/keyboards/z150_blackheart/z150_blackheart.h b/keyboards/z150_bh/z150_bh.h index f97ac1c03..f97ac1c03 100644 --- a/keyboards/z150_blackheart/z150_blackheart.h +++ b/keyboards/z150_bh/z150_bh.h | |||
diff --git a/keyboards/zinc/config.h b/keyboards/zinc/config.h index 712db0ac6..cfb6bf4ff 100644 --- a/keyboards/zinc/config.h +++ b/keyboards/zinc/config.h | |||
@@ -17,30 +17,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #pragma once | 19 | #pragma once |
20 | //#ifndef CONFIG_H | ||
21 | //#define CONFIG_H | ||
22 | 20 | ||
23 | #include "config_common.h" | 21 | #include "config_common.h" |
24 | |||
25 | // GCC include 'config.h" sequence in qmk_firmware/keyboards/zinc/ | ||
26 | // -include keyboards/zinc/config.h | ||
27 | // -include keyboards/zinc/rev?/config.h | ||
28 | // -include keyboards/zinc/rev?/keymaps/MAPNAME/config.h | ||
29 | // XXXX.c | ||
30 | |||
31 | #include <serial_config.h> | ||
32 | |||
33 | // GCC include search path in qmk_firmare/keyboards/zinc/ | ||
34 | // #include "..." search starts here: | ||
35 | // #include <...> search starts here: | ||
36 | // keyboards/zinc/rev?/keymaps/MAPNAME | ||
37 | // keyboards/zinc | ||
38 | // keyboards/zinc/rev? | ||
39 | // . | ||
40 | // ./tmk_core | ||
41 | // ...... | ||
42 | |||
43 | #define NO_ACTION_MACRO | ||
44 | #define NO_ACTION_FUNCTION | ||
45 | |||
46 | //#endif /* CONFIG_H */ | ||
diff --git a/keyboards/zinc/i2c.c b/keyboards/zinc/i2c.c deleted file mode 100644 index 4bee5c639..000000000 --- a/keyboards/zinc/i2c.c +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | #include <util/twi.h> | ||
2 | #include <avr/io.h> | ||
3 | #include <stdlib.h> | ||
4 | #include <avr/interrupt.h> | ||
5 | #include <util/twi.h> | ||
6 | #include <stdbool.h> | ||
7 | #include "i2c.h" | ||
8 | |||
9 | #ifdef USE_I2C | ||
10 | |||
11 | // Limits the amount of we wait for any one i2c transaction. | ||
12 | // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is | ||
13 | // 9 bits, a single transaction will take around 90μs to complete. | ||
14 | // | ||
15 | // (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit | ||
16 | // poll loop takes at least 8 clock cycles to execute | ||
17 | #define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 | ||
18 | |||
19 | #define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) | ||
20 | |||
21 | volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
22 | |||
23 | static volatile uint8_t slave_buffer_pos; | ||
24 | static volatile bool slave_has_register_set = false; | ||
25 | |||
26 | // Wait for an i2c operation to finish | ||
27 | inline static | ||
28 | void i2c_delay(void) { | ||
29 | uint16_t lim = 0; | ||
30 | while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) | ||
31 | lim++; | ||
32 | |||
33 | // easier way, but will wait slightly longer | ||
34 | // _delay_us(100); | ||
35 | } | ||
36 | |||
37 | // Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) | ||
38 | void i2c_master_init(void) { | ||
39 | // no prescaler | ||
40 | TWSR = 0; | ||
41 | // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. | ||
42 | // Check datasheets for more info. | ||
43 | TWBR = ((F_CPU/SCL_CLOCK)-16)/2; | ||
44 | } | ||
45 | |||
46 | // Start a transaction with the given i2c slave address. The direction of the | ||
47 | // transfer is set with I2C_READ and I2C_WRITE. | ||
48 | // returns: 0 => success | ||
49 | // 1 => error | ||
50 | uint8_t i2c_master_start(uint8_t address) { | ||
51 | TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); | ||
52 | |||
53 | i2c_delay(); | ||
54 | |||
55 | // check that we started successfully | ||
56 | if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) | ||
57 | return 1; | ||
58 | |||
59 | TWDR = address; | ||
60 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
61 | |||
62 | i2c_delay(); | ||
63 | |||
64 | if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) | ||
65 | return 1; // slave did not acknowledge | ||
66 | else | ||
67 | return 0; // success | ||
68 | } | ||
69 | |||
70 | |||
71 | // Finish the i2c transaction. | ||
72 | void i2c_master_stop(void) { | ||
73 | TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); | ||
74 | |||
75 | uint16_t lim = 0; | ||
76 | while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) | ||
77 | lim++; | ||
78 | } | ||
79 | |||
80 | // Write one byte to the i2c slave. | ||
81 | // returns 0 => slave ACK | ||
82 | // 1 => slave NACK | ||
83 | uint8_t i2c_master_write(uint8_t data) { | ||
84 | TWDR = data; | ||
85 | TWCR = (1<<TWINT) | (1<<TWEN); | ||
86 | |||
87 | i2c_delay(); | ||
88 | |||
89 | // check if the slave acknowledged us | ||
90 | return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; | ||
91 | } | ||
92 | |||
93 | // Read one byte from the i2c slave. If ack=1 the slave is acknowledged, | ||
94 | // if ack=0 the acknowledge bit is not set. | ||
95 | // returns: byte read from i2c device | ||
96 | uint8_t i2c_master_read(int ack) { | ||
97 | TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); | ||
98 | |||
99 | i2c_delay(); | ||
100 | return TWDR; | ||
101 | } | ||
102 | |||
103 | void i2c_reset_state(void) { | ||
104 | TWCR = 0; | ||
105 | } | ||
106 | |||
107 | void i2c_slave_init(uint8_t address) { | ||
108 | TWAR = address << 0; // slave i2c address | ||
109 | // TWEN - twi enable | ||
110 | // TWEA - enable address acknowledgement | ||
111 | // TWINT - twi interrupt flag | ||
112 | // TWIE - enable the twi interrupt | ||
113 | TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); | ||
114 | } | ||
115 | |||
116 | ISR(TWI_vect); | ||
117 | |||
118 | ISR(TWI_vect) { | ||
119 | uint8_t ack = 1; | ||
120 | switch(TW_STATUS) { | ||
121 | case TW_SR_SLA_ACK: | ||
122 | // this device has been addressed as a slave receiver | ||
123 | slave_has_register_set = false; | ||
124 | break; | ||
125 | |||
126 | case TW_SR_DATA_ACK: | ||
127 | // this device has received data as a slave receiver | ||
128 | // The first byte that we receive in this transaction sets the location | ||
129 | // of the read/write location of the slaves memory that it exposes over | ||
130 | // i2c. After that, bytes will be written at slave_buffer_pos, incrementing | ||
131 | // slave_buffer_pos after each write. | ||
132 | if(!slave_has_register_set) { | ||
133 | slave_buffer_pos = TWDR; | ||
134 | // don't acknowledge the master if this memory loctaion is out of bounds | ||
135 | if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { | ||
136 | ack = 0; | ||
137 | slave_buffer_pos = 0; | ||
138 | } | ||
139 | slave_has_register_set = true; | ||
140 | } else { | ||
141 | i2c_slave_buffer[slave_buffer_pos] = TWDR; | ||
142 | BUFFER_POS_INC(); | ||
143 | } | ||
144 | break; | ||
145 | |||
146 | case TW_ST_SLA_ACK: | ||
147 | case TW_ST_DATA_ACK: | ||
148 | // master has addressed this device as a slave transmitter and is | ||
149 | // requesting data. | ||
150 | TWDR = i2c_slave_buffer[slave_buffer_pos]; | ||
151 | BUFFER_POS_INC(); | ||
152 | break; | ||
153 | |||
154 | case TW_BUS_ERROR: // something went wrong, reset twi state | ||
155 | TWCR = 0; | ||
156 | default: | ||
157 | break; | ||
158 | } | ||
159 | // Reset everything, so we are ready for the next TWI interrupt | ||
160 | TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); | ||
161 | } | ||
162 | #endif | ||
diff --git a/keyboards/zinc/i2c.h b/keyboards/zinc/i2c.h deleted file mode 100644 index 47cf6bd1b..000000000 --- a/keyboards/zinc/i2c.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef I2C_H | ||
2 | #define I2C_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | |||
6 | #ifndef F_CPU | ||
7 | #define F_CPU 16000000UL | ||
8 | #endif | ||
9 | |||
10 | #define I2C_READ 1 | ||
11 | #define I2C_WRITE 0 | ||
12 | |||
13 | #define I2C_ACK 1 | ||
14 | #define I2C_NACK 0 | ||
15 | |||
16 | #define SLAVE_BUFFER_SIZE 0x10 | ||
17 | |||
18 | // i2c SCL clock frequency 400kHz | ||
19 | #define SCL_CLOCK 400000L | ||
20 | |||
21 | extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; | ||
22 | |||
23 | void i2c_master_init(void); | ||
24 | uint8_t i2c_master_start(uint8_t address); | ||
25 | void i2c_master_stop(void); | ||
26 | uint8_t i2c_master_write(uint8_t data); | ||
27 | uint8_t i2c_master_read(int); | ||
28 | void i2c_reset_state(void); | ||
29 | void i2c_slave_init(uint8_t address); | ||
30 | |||
31 | |||
32 | static inline unsigned char i2c_start_read(unsigned char addr) { | ||
33 | return i2c_master_start((addr << 1) | I2C_READ); | ||
34 | } | ||
35 | |||
36 | static inline unsigned char i2c_start_write(unsigned char addr) { | ||
37 | return i2c_master_start((addr << 1) | I2C_WRITE); | ||
38 | } | ||
39 | |||
40 | // from SSD1306 scrips | ||
41 | extern unsigned char i2c_rep_start(unsigned char addr); | ||
42 | extern void i2c_start_wait(unsigned char addr); | ||
43 | extern unsigned char i2c_readAck(void); | ||
44 | extern unsigned char i2c_readNak(void); | ||
45 | extern unsigned char i2c_read(unsigned char ack); | ||
46 | |||
47 | #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); | ||
48 | |||
49 | #endif | ||
diff --git a/keyboards/zinc/keymaps/default/config.h b/keyboards/zinc/keymaps/default/config.h index 4dcb0724f..2185dc9eb 100644 --- a/keyboards/zinc/keymaps/default/config.h +++ b/keyboards/zinc/keymaps/default/config.h | |||
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #pragma once | 22 | #pragma once |
23 | // if you need more program area, try uncomment follow line | ||
24 | #include "serial_config_simpleapi.h" | ||
25 | 23 | ||
26 | // place overrides here | 24 | // place overrides here |
27 | // Selection of RGBLIGHT MODE to use. | 25 | // Selection of RGBLIGHT MODE to use. |
diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c index 0f08d21ee..cd1bf0328 100644 --- a/keyboards/zinc/keymaps/default/keymap.c +++ b/keyboards/zinc/keymaps/default/keymap.c | |||
@@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ | |||
139 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 139 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
140 | * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | 140 | * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | |
141 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 141 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
142 | * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | | 142 | * |MODE R| MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| | |
143 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | 143 | * |------+------+------+------+------+------| |------+------+------+------+------+------| |
144 | * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | | 144 | * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | |
145 | * `-----------------------------------------' `-----------------------------------------' | 145 | * `-----------------------------------------' `-----------------------------------------' |
@@ -147,13 +147,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ | |||
147 | [_ADJUST] = LAYOUT_ortho_4x12( \ | 147 | [_ADJUST] = LAYOUT_ortho_4x12( \ |
148 | _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ | 148 | _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ |
149 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ | 149 | _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ |
150 | _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ | 150 | RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______,\ |
151 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ | 151 | _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END\ |
152 | ) | 152 | ) |
153 | }; | 153 | }; |
154 | 154 | ||
155 | // define variables for reactive RGB | 155 | // define variables for reactive RGB |
156 | bool TOG_STATUS = false; | 156 | bool TOG_STATUS = false; |
157 | 157 | ||
158 | // Setting ADJUST layer RGB back to default | 158 | // Setting ADJUST layer RGB back to default |
159 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | 159 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { |
@@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
211 | } | 211 | } |
212 | return false; | 212 | return false; |
213 | break; | 213 | break; |
214 | 214 | ||
215 | case RAISE: | 215 | case RAISE: |
216 | if (record->event.pressed) { | 216 | if (record->event.pressed) { |
217 | //not sure how to have keyboard check mode and set it to a variable, so my work around | 217 | //not sure how to have keyboard check mode and set it to a variable, so my work around |
@@ -244,16 +244,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
244 | } | 244 | } |
245 | return false; | 245 | return false; |
246 | break; | 246 | break; |
247 | |||
247 | //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 | 248 | //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 |
249 | case RGB_RMOD: | ||
250 | #if defined(RGBLIGHT_ENABLE) | ||
251 | if (record->event.pressed) { | ||
252 | rgblight_mode_noeeprom(RGB_current_config.mode); | ||
253 | rgblight_step_reverse(); | ||
254 | RGB_current_config.mode = rgblight_config.mode; | ||
255 | } | ||
256 | return false; | ||
257 | #endif | ||
258 | break; | ||
259 | |||
248 | case RGB_MOD: | 260 | case RGB_MOD: |
249 | #ifdef RGBLIGHT_ENABLE | 261 | #if defined(RGBLIGHT_ENABLE) |
250 | if (record->event.pressed) { | 262 | if (record->event.pressed) { |
251 | rgblight_mode_noeeprom(RGB_current_config.mode); | 263 | rgblight_mode_noeeprom(RGB_current_config.mode); |
252 | rgblight_step(); | 264 | rgblight_step(); |
253 | RGB_current_config.mode = rgblight_config.mode; | 265 | RGB_current_config.mode = rgblight_config.mode; |
254 | } | 266 | } |
255 | #endif | ||
256 | return false; | 267 | return false; |
268 | #endif | ||
257 | break; | 269 | break; |
258 | 270 | ||
259 | case EISU: | 271 | case EISU: |
diff --git a/keyboards/zinc/keymaps/default/readme_en.md b/keyboards/zinc/keymaps/default/readme_en.md new file mode 100644 index 000000000..6447e96ed --- /dev/null +++ b/keyboards/zinc/keymaps/default/readme_en.md | |||
@@ -0,0 +1,131 @@ | |||
1 | # The Default Zinc Layout | ||
2 | ## layout | ||
3 | |||
4 | ### Qwerty | ||
5 | |||
6 | ``` | ||
7 | ,-----------------------------------------. ,-----------------------------------------. | ||
8 | | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
9 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
10 | | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
11 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
12 | | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | | ||
13 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
14 | | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| | ||
15 | `------------------------------------------ ------------------------------------------' | ||
16 | ``` | ||
17 | |||
18 | ### Colemak | ||
19 | |||
20 | ``` | ||
21 | ,-----------------------------------------. ,-----------------------------------------. | ||
22 | | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | ||
23 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
24 | | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | | ||
25 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
26 | | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | | ||
27 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
28 | | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
29 | `------------------------------------------ ------------------------------------------' | ||
30 | ``` | ||
31 | |||
32 | ### Dvorak | ||
33 | |||
34 | ``` | ||
35 | ,-----------------------------------------. ,-----------------------------------------. | ||
36 | | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | | ||
37 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
38 | | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | | ||
39 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
40 | | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | | ||
41 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
42 | | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| | ||
43 | `-----------------------------------------' `-----------------------------------------' | ||
44 | ``` | ||
45 | |||
46 | ### Lower | ||
47 | ``` | ||
48 | ,-----------------------------------------. ,-----------------------------------------. | ||
49 | | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
50 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | | | | | | | | | - | _ | + | { | } | | | | ||
52 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | | | | | | | | | | | | Home | End | | | ||
54 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
55 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
56 | `-----------------------------------------' `-----------------------------------------' | ||
57 | ``` | ||
58 | |||
59 | ### RAISE | ||
60 | ``` | ||
61 | ,-----------------------------------------. ,-----------------------------------------. | ||
62 | | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
63 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
64 | | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
65 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
66 | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
67 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
68 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
69 | `-----------------------------------------' `-----------------------------------------' | ||
70 | ``` | ||
71 | |||
72 | ### Adjust (Lower + Raise) | ||
73 | ``` | ||
74 | ,-----------------------------------------. ,-----------------------------------------. | ||
75 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
76 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
77 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
78 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
79 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
80 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
81 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
82 | `-----------------------------------------' `-----------------------------------------' | ||
83 | ``` | ||
84 | |||
85 | ## Compile | ||
86 | |||
87 | go to qmk top directory. | ||
88 | |||
89 | ``` | ||
90 | $ cd qmk_firmware | ||
91 | ``` | ||
92 | make with `zinc:<keymap_name>` | ||
93 | |||
94 | ``` | ||
95 | $ make zinc:default | ||
96 | ``` | ||
97 | |||
98 | To make and flash with `:flash` | ||
99 | |||
100 | ``` | ||
101 | $ make zinc:default:flash | ||
102 | ``` | ||
103 | |||
104 | |||
105 | ## Customize | ||
106 | |||
107 | You can customize from the command line. | ||
108 | |||
109 | ``` | ||
110 | # Zinc keyboard 'default' keymap: convenient command line option | ||
111 | make ZINC=<options> zinc:defualt | ||
112 | # option= back | under | both | cont | na | ios | ||
113 | # ex. | ||
114 | # make ZINC=under zinc:defualt | ||
115 | # make ZINC=under,ios zinc:defualt | ||
116 | # make ZINC=back zinc:default | ||
117 | # make ZINC=back,na zinc:default | ||
118 | # make ZINC=back,ios zinc:default | ||
119 | ``` | ||
120 | |||
121 | Or edit `qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` directly. | ||
122 | |||
123 | ``` | ||
124 | # Zinc keyboard customize | ||
125 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | ||
126 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | ||
127 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
128 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
129 | LED_ANIMATIONS = yes # LED animations | ||
130 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | ||
131 | ``` | ||
diff --git a/keyboards/zinc/keymaps/default/readme_jp.md b/keyboards/zinc/keymaps/default/readme_jp.md index dfedb37c1..8132f5036 100644 --- a/keyboards/zinc/keymaps/default/readme_jp.md +++ b/keyboards/zinc/keymaps/default/readme_jp.md | |||
@@ -43,6 +43,44 @@ | |||
43 | `-----------------------------------------' `-----------------------------------------' | 43 | `-----------------------------------------' `-----------------------------------------' |
44 | ``` | 44 | ``` |
45 | 45 | ||
46 | ### Lower | ||
47 | ``` | ||
48 | ,-----------------------------------------. ,-----------------------------------------. | ||
49 | | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
50 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
51 | | | | | | | | | - | _ | + | { | } | | | | ||
52 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
53 | | | | | | | | | | | | Home | End | | | ||
54 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
55 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
56 | `-----------------------------------------' `-----------------------------------------' | ||
57 | ``` | ||
58 | |||
59 | ### RAISE | ||
60 | ``` | ||
61 | ,-----------------------------------------. ,-----------------------------------------. | ||
62 | | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
63 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
64 | | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | | ||
65 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
66 | | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | ||
67 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
68 | | | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
69 | `-----------------------------------------' `-----------------------------------------' | ||
70 | ``` | ||
71 | |||
72 | ### Adjust (Lower + Raise) | ||
73 | ``` | ||
74 | ,-----------------------------------------. ,-----------------------------------------. | ||
75 | | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | | ||
76 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
77 | | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | | ||
78 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
79 | |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | | ||
80 | |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
81 | | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | | ||
82 | `-----------------------------------------' `-----------------------------------------' | ||
83 | ``` | ||
46 | 84 | ||
47 | ## コンパイルã®ä»•æ–¹ | 85 | ## コンパイルã®ä»•æ–¹ |
48 | 86 | ||
@@ -76,7 +114,7 @@ $ make zinc:default:clean | |||
76 | ``` | 114 | ``` |
77 | # Zinc keyboard 'default' keymap: convenient command line option | 115 | # Zinc keyboard 'default' keymap: convenient command line option |
78 | make ZINC=<options> zinc:defualt | 116 | make ZINC=<options> zinc:defualt |
79 | # option= back | under | na | ios | 117 | # option= back | under | both | cont | na | ios |
80 | # ex. | 118 | # ex. |
81 | # make ZINC=under zinc:defualt | 119 | # make ZINC=under zinc:defualt |
82 | # make ZINC=under,ios zinc:defualt | 120 | # make ZINC=under,ios zinc:defualt |
@@ -85,16 +123,16 @@ make ZINC=<options> zinc:defualt | |||
85 | # make ZINC=back,ios zinc:default | 123 | # make ZINC=back,ios zinc:default |
86 | ``` | 124 | ``` |
87 | 125 | ||
88 | ã‚ã‚‹ã„ã¯`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` ã®ä»¥ä¸‹ã®éƒ¨åˆ†ã‚’直接編集ã—ã¦æ©Ÿèƒ½ã‚’有効化ã—ã¦ãã ã•ã„。 | 126 | ã‚ã‚‹ã„ã¯`qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` ã®ä»¥ä¸‹ã®éƒ¨åˆ†ã‚’直接編集ã—ã¦æ©Ÿèƒ½ã‚’有効化ã—ã¦ãã ã•ã„。 |
89 | 127 | ||
90 | ``` | 128 | ``` |
91 | # Zinc keyboard customize | 129 | # Zinc keyboard customize |
92 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | 130 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) |
93 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | 131 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) |
132 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
133 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
94 | LED_ANIMATIONS = yes # LED animations | 134 | LED_ANIMATIONS = yes # LED animations |
95 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 135 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
96 | |||
97 | |||
98 | ``` | 136 | ``` |
99 | 137 | ||
100 | ## RGB backlight を有効ã«ã™ã‚‹ | 138 | ## RGB backlight を有効ã«ã™ã‚‹ |
@@ -120,4 +158,4 @@ RBG Underglow ã‚„ RGBãƒãƒƒã‚¯ãƒ©ã‚¤ãƒˆã®è¼åº¦ã‚’抑ãˆã¦ã€iPad, iPhone ã«ã | |||
120 | 158 | ||
121 | ``` | 159 | ``` |
122 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 160 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
123 | ``` \ No newline at end of file | 161 | ``` |
diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index c980f7d00..32e0f2161 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk | |||
@@ -20,6 +20,9 @@ define ZINC_CUSTOMISE_MSG | |||
20 | $(info Zinc customize) | 20 | $(info Zinc customize) |
21 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | 21 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) |
22 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | 22 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) |
23 | $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) | ||
24 | $(info - LED_RGB_CONT=$(LED_RGB_CONT)) | ||
25 | $(info - RGB_MATRIX=$(RGB_MATRIX)) | ||
23 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | 26 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) |
24 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | 27 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) |
25 | endef | 28 | endef |
@@ -27,6 +30,10 @@ endef | |||
27 | # Zinc keyboard customize | 30 | # Zinc keyboard customize |
28 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | 31 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) |
29 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | 32 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) |
33 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
34 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
35 | RGB_MATRIX = no # RGB LED Matrix | ||
36 | RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand | ||
30 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
31 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
32 | Link_Time_Optimization = no # if firmware size over limit, try this option | 39 | Link_Time_Optimization = no # if firmware size over limit, try this option |
@@ -36,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
36 | 43 | ||
37 | ### Zinc keyboard 'default' keymap: convenient command line option | 44 | ### Zinc keyboard 'default' keymap: convenient command line option |
38 | ## make ZINC=<options> zinc:defualt | 45 | ## make ZINC=<options> zinc:defualt |
39 | ## option= back | under | na | ios | 46 | ## option= back | under | both | cont | matrix | na | ios |
40 | ## ex. | 47 | ## ex. |
41 | ## make ZINC=under zinc:defualt | 48 | ## make ZINC=under zinc:defualt |
42 | ## make ZINC=under,ios zinc:defualt | 49 | ## make ZINC=under,ios zinc:defualt |
@@ -47,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
47 | ifneq ($(strip $(ZINC)),) | 54 | ifneq ($(strip $(ZINC)),) |
48 | ifeq ($(findstring back,$(ZINC)), back) | 55 | ifeq ($(findstring back,$(ZINC)), back) |
49 | LED_BACK_ENABLE = yes | 56 | LED_BACK_ENABLE = yes |
50 | else ifeq ($(findstring under,$(ZINC)), under) | 57 | endif |
58 | ifeq ($(findstring under,$(ZINC)), under) | ||
51 | LED_UNDERGLOW_ENABLE = yes | 59 | LED_UNDERGLOW_ENABLE = yes |
52 | endif | 60 | endif |
61 | ifeq ($(findstring both,$(ZINC)), both) | ||
62 | LED_BOTH_ENABLE = yes | ||
63 | endif | ||
64 | ifeq ($(findstring cont,$(ZINC)), cont) | ||
65 | LED_RGB_CONT = yes | ||
66 | endif | ||
67 | ifeq ($(findstring matrix,$(ZINC)), matrix) | ||
68 | RGB_MATRIX = yes | ||
69 | endif | ||
70 | ifeq ($(findstring right,$(ZINC)), right) | ||
71 | RGB_MATRIX_SPLIT_RIGHT = yes | ||
72 | endif | ||
53 | ifeq ($(findstring na,$(ZINC)), na) | 73 | ifeq ($(findstring na,$(ZINC)), na) |
54 | LED_ANIMATIONS = no | 74 | LED_ANIMATIONS = no |
55 | endif | 75 | endif |
@@ -62,10 +82,11 @@ endif | |||
62 | 82 | ||
63 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | 83 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) |
64 | RGBLIGHT_ENABLE = yes | 84 | RGBLIGHT_ENABLE = yes |
65 | OPT_DEFS += -DRGBLED_BACK | ||
66 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 85 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
67 | $(eval $(call ZINC_CUSTOMISE_MSG)) | 86 | OPT_DEFS += -DRGBLED_BOTH |
68 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | 87 | $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) |
88 | else | ||
89 | OPT_DEFS += -DRGBLED_BACK | ||
69 | endif | 90 | endif |
70 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 91 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
71 | RGBLIGHT_ENABLE = yes | 92 | RGBLIGHT_ENABLE = yes |
@@ -73,18 +94,36 @@ else | |||
73 | RGBLIGHT_ENABLE = no | 94 | RGBLIGHT_ENABLE = no |
74 | endif | 95 | endif |
75 | 96 | ||
97 | ifeq ($(strip $(LED_BOTH_ENABLE)), yes) | ||
98 | RGBLIGHT_ENABLE = yes | ||
99 | OPT_DEFS += -DRGBLED_BOTH | ||
100 | endif | ||
101 | |||
102 | ifeq ($(strip $(LED_RGB_CONT)), yes) | ||
103 | OPT_DEFS += -DRGBLED_CONT | ||
104 | endif | ||
105 | |||
106 | ifeq ($(strip $(RGB_MATRIX)), yes) | ||
107 | RGBLIGHT_ENABLE = no | ||
108 | RGB_MATRIX_ENABLE = WS2812 | ||
109 | endif | ||
110 | |||
76 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | 111 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) |
77 | OPT_DEFS += -DIOS_DEVICE_ENABLE | 112 | OPT_DEFS += -DIOS_DEVICE_ENABLE |
78 | endif | 113 | endif |
79 | 114 | ||
80 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | 115 | ifeq ($(strip $(LED_ANIMATIONS)), yes) |
81 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | 116 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS |
82 | OPT_DEFS += -DLED_ANIMATIONS | 117 | OPT_DEFS += -DLED_ANIMATIONS |
118 | |||
119 | endif | ||
83 | 120 | ||
121 | ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) | ||
122 | OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT | ||
84 | endif | 123 | endif |
85 | 124 | ||
86 | ifeq ($(strip $(Link_Time_Optimization)),yes) | 125 | ifeq ($(strip $(Link_Time_Optimization)),yes) |
87 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | 126 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization |
88 | endif | 127 | endif |
89 | 128 | ||
90 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 129 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h index 4dcb0724f..2185dc9eb 100644 --- a/keyboards/zinc/keymaps/ginjake/config.h +++ b/keyboards/zinc/keymaps/ginjake/config.h | |||
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #pragma once | 22 | #pragma once |
23 | // if you need more program area, try uncomment follow line | ||
24 | #include "serial_config_simpleapi.h" | ||
25 | 23 | ||
26 | // place overrides here | 24 | // place overrides here |
27 | // Selection of RGBLIGHT MODE to use. | 25 | // Selection of RGBLIGHT MODE to use. |
diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk index 2dcefc001..2cb59fe8b 100644 --- a/keyboards/zinc/keymaps/ginjake/rules.mk +++ b/keyboards/zinc/keymaps/ginjake/rules.mk | |||
@@ -1,12 +1,11 @@ | |||
1 | |||
2 | # Build Options | 1 | # Build Options |
3 | # change to "no" to disable the options, or define them in the Makefile in | 2 | # change to "no" to disable the options, or define them in the Makefile in |
4 | # the appropriate keymap folder that will get included automatically | 3 | # the appropriate keymap folder that will get included automatically |
5 | # | 4 | # |
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration |
7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 6 | MOUSEKEY_ENABLE = no # Mouse keys |
8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control |
9 | CONSOLE_ENABLE = no # Console for debug(+400) | 8 | CONSOLE_ENABLE = no # Console for debug |
10 | COMMAND_ENABLE = no # Commands for debug and configuration | 9 | COMMAND_ENABLE = no # Commands for debug and configuration |
11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 10 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
@@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG | |||
21 | $(info Zinc customize) | 20 | $(info Zinc customize) |
22 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | 21 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) |
23 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | 22 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) |
23 | $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) | ||
24 | $(info - LED_RGB_CONT=$(LED_RGB_CONT)) | ||
24 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | 25 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) |
25 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | 26 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) |
26 | endef | 27 | endef |
@@ -28,6 +29,8 @@ endef | |||
28 | # Zinc keyboard customize | 29 | # Zinc keyboard customize |
29 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | 30 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) |
30 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | 31 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) |
32 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
33 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
31 | LED_ANIMATIONS = yes # LED animations | 34 | LED_ANIMATIONS = yes # LED animations |
32 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 35 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
33 | Link_Time_Optimization = no # if firmware size over limit, try this option | 36 | Link_Time_Optimization = no # if firmware size over limit, try this option |
@@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
37 | 40 | ||
38 | ### Zinc keyboard 'default' keymap: convenient command line option | 41 | ### Zinc keyboard 'default' keymap: convenient command line option |
39 | ## make ZINC=<options> zinc:defualt | 42 | ## make ZINC=<options> zinc:defualt |
40 | ## option= back | under | na | ios | 43 | ## option= back | under | both | cont | na | ios |
41 | ## ex. | 44 | ## ex. |
42 | ## make ZINC=under zinc:defualt | 45 | ## make ZINC=under zinc:defualt |
43 | ## make ZINC=under,ios zinc:defualt | 46 | ## make ZINC=under,ios zinc:defualt |
@@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
48 | ifneq ($(strip $(ZINC)),) | 51 | ifneq ($(strip $(ZINC)),) |
49 | ifeq ($(findstring back,$(ZINC)), back) | 52 | ifeq ($(findstring back,$(ZINC)), back) |
50 | LED_BACK_ENABLE = yes | 53 | LED_BACK_ENABLE = yes |
51 | else ifeq ($(findstring under,$(ZINC)), under) | 54 | endif |
55 | ifeq ($(findstring under,$(ZINC)), under) | ||
52 | LED_UNDERGLOW_ENABLE = yes | 56 | LED_UNDERGLOW_ENABLE = yes |
53 | endif | 57 | endif |
58 | ifeq ($(findstring both,$(ZINC)), both) | ||
59 | LED_BOTH_ENABLE = yes | ||
60 | endif | ||
61 | ifeq ($(findstring cont,$(ZINC)), cont) | ||
62 | LED_RGB_CONT = yes | ||
63 | endif | ||
54 | ifeq ($(findstring na,$(ZINC)), na) | 64 | ifeq ($(findstring na,$(ZINC)), na) |
55 | LED_ANIMATIONS = no | 65 | LED_ANIMATIONS = no |
56 | endif | 66 | endif |
@@ -63,10 +73,11 @@ endif | |||
63 | 73 | ||
64 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | 74 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) |
65 | RGBLIGHT_ENABLE = yes | 75 | RGBLIGHT_ENABLE = yes |
66 | OPT_DEFS += -DRGBLED_BACK | ||
67 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 76 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
68 | $(eval $(call ZINC_CUSTOMISE_MSG)) | 77 | OPT_DEFS += -DRGBLED_BOTH |
69 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | 78 | $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) |
79 | else | ||
80 | OPT_DEFS += -DRGBLED_BACK | ||
70 | endif | 81 | endif |
71 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 82 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
72 | RGBLIGHT_ENABLE = yes | 83 | RGBLIGHT_ENABLE = yes |
@@ -74,18 +85,27 @@ else | |||
74 | RGBLIGHT_ENABLE = no | 85 | RGBLIGHT_ENABLE = no |
75 | endif | 86 | endif |
76 | 87 | ||
88 | ifeq ($(strip $(LED_BOTH_ENABLE)), yes) | ||
89 | RGBLIGHT_ENABLE = yes | ||
90 | OPT_DEFS += -DRGBLED_BOTH | ||
91 | endif | ||
92 | |||
93 | ifeq ($(strip $(LED_RGB_CONT)), yes) | ||
94 | OPT_DEFS += -DRGBLED_CONT | ||
95 | endif | ||
96 | |||
77 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | 97 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) |
78 | OPT_DEFS += -DIOS_DEVICE_ENABLE | 98 | OPT_DEFS += -DIOS_DEVICE_ENABLE |
79 | endif | 99 | endif |
80 | 100 | ||
81 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | 101 | ifeq ($(strip $(LED_ANIMATIONS)), yes) |
82 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | 102 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS |
83 | OPT_DEFS += -DLED_ANIMATIONS | 103 | OPT_DEFS += -DLED_ANIMATIONS |
84 | 104 | ||
85 | endif | 105 | endif |
86 | 106 | ||
87 | ifeq ($(strip $(Link_Time_Optimization)),yes) | 107 | ifeq ($(strip $(Link_Time_Optimization)),yes) |
88 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | 108 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization |
89 | endif | 109 | endif |
90 | 110 | ||
91 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 111 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
diff --git a/keyboards/zinc/keymaps/monks/config.h b/keyboards/zinc/keymaps/monks/config.h index 4dcb0724f..2185dc9eb 100644 --- a/keyboards/zinc/keymaps/monks/config.h +++ b/keyboards/zinc/keymaps/monks/config.h | |||
@@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #pragma once | 22 | #pragma once |
23 | // if you need more program area, try uncomment follow line | ||
24 | #include "serial_config_simpleapi.h" | ||
25 | 23 | ||
26 | // place overrides here | 24 | // place overrides here |
27 | // Selection of RGBLIGHT MODE to use. | 25 | // Selection of RGBLIGHT MODE to use. |
diff --git a/keyboards/zinc/keymaps/monks/keymap.c b/keyboards/zinc/keymaps/monks/keymap.c index 5fd7c6aa8..a30e8ac5f 100644 --- a/keyboards/zinc/keymaps/monks/keymap.c +++ b/keyboards/zinc/keymaps/monks/keymap.c | |||
@@ -119,6 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ | |||
119 | // define variables for reactive RGB | 119 | // define variables for reactive RGB |
120 | bool TOG_STATUS = false; | 120 | bool TOG_STATUS = false; |
121 | 121 | ||
122 | |||
122 | // Setting ADJUST layer RGB back to default | 123 | // Setting ADJUST layer RGB back to default |
123 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | 124 | void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { |
124 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | 125 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { |
@@ -163,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
163 | } | 164 | } |
164 | return false; | 165 | return false; |
165 | break; | 166 | break; |
166 | 167 | ||
167 | case RAISE: | 168 | case RAISE: |
168 | if (record->event.pressed) { | 169 | if (record->event.pressed) { |
169 | //not sure how to have keyboard check mode and set it to a variable, so my work around | 170 | //not sure how to have keyboard check mode and set it to a variable, so my work around |
diff --git a/keyboards/zinc/keymaps/monks/readme_jp.md b/keyboards/zinc/keymaps/monks/readme_jp.md index f1495af4c..e518eb769 100644 --- a/keyboards/zinc/keymaps/monks/readme_jp.md +++ b/keyboards/zinc/keymaps/monks/readme_jp.md | |||
@@ -100,4 +100,4 @@ RBG Underglow ã‚„ RGBãƒãƒƒã‚¯ãƒ©ã‚¤ãƒˆã®è¼åº¦ã‚’抑ãˆã¦ã€iPad, iPhone ã«ã | |||
100 | 100 | ||
101 | ``` | 101 | ``` |
102 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 102 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
103 | ``` \ No newline at end of file | 103 | ``` |
diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index eeabc004c..c1b98dead 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk | |||
@@ -1,12 +1,11 @@ | |||
1 | |||
2 | # Build Options | 1 | # Build Options |
3 | # change to "no" to disable the options, or define them in the Makefile in | 2 | # change to "no" to disable the options, or define them in the Makefile in |
4 | # the appropriate keymap folder that will get included automatically | 3 | # the appropriate keymap folder that will get included automatically |
5 | # | 4 | # |
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration |
7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 6 | MOUSEKEY_ENABLE = no # Mouse keys |
8 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control |
9 | CONSOLE_ENABLE = no # Console for debug(+400) | 8 | CONSOLE_ENABLE = no # Console for debug |
10 | COMMAND_ENABLE = no # Commands for debug and configuration | 9 | COMMAND_ENABLE = no # Commands for debug and configuration |
11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 10 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
@@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG | |||
21 | $(info Zinc customize) | 20 | $(info Zinc customize) |
22 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | 21 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) |
23 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | 22 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) |
23 | $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) | ||
24 | $(info - LED_RGB_CONT=$(LED_RGB_CONT)) | ||
24 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | 25 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) |
25 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | 26 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) |
26 | endef | 27 | endef |
@@ -28,6 +29,8 @@ endef | |||
28 | # Zinc keyboard customize | 29 | # Zinc keyboard customize |
29 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | 30 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) |
30 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | 31 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) |
32 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
33 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
31 | LED_ANIMATIONS = yes # LED animations | 34 | LED_ANIMATIONS = yes # LED animations |
32 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 35 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
33 | Link_Time_Optimization = no # if firmware size over limit, try this option | 36 | Link_Time_Optimization = no # if firmware size over limit, try this option |
@@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
37 | 40 | ||
38 | ### Zinc keyboard 'default' keymap: convenient command line option | 41 | ### Zinc keyboard 'default' keymap: convenient command line option |
39 | ## make ZINC=<options> zinc:defualt | 42 | ## make ZINC=<options> zinc:defualt |
40 | ## option= back | under | na | ios | 43 | ## option= back | under | both | cont | na | ios |
41 | ## ex. | 44 | ## ex. |
42 | ## make ZINC=under zinc:defualt | 45 | ## make ZINC=under zinc:defualt |
43 | ## make ZINC=under,ios zinc:defualt | 46 | ## make ZINC=under,ios zinc:defualt |
@@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
48 | ifneq ($(strip $(ZINC)),) | 51 | ifneq ($(strip $(ZINC)),) |
49 | ifeq ($(findstring back,$(ZINC)), back) | 52 | ifeq ($(findstring back,$(ZINC)), back) |
50 | LED_BACK_ENABLE = yes | 53 | LED_BACK_ENABLE = yes |
51 | else ifeq ($(findstring under,$(ZINC)), under) | 54 | endif |
55 | ifeq ($(findstring under,$(ZINC)), under) | ||
52 | LED_UNDERGLOW_ENABLE = yes | 56 | LED_UNDERGLOW_ENABLE = yes |
53 | endif | 57 | endif |
58 | ifeq ($(findstring both,$(ZINC)), both) | ||
59 | LED_BOTH_ENABLE = yes | ||
60 | endif | ||
61 | ifeq ($(findstring cont,$(ZINC)), cont) | ||
62 | LED_RGB_CONT = yes | ||
63 | endif | ||
54 | ifeq ($(findstring na,$(ZINC)), na) | 64 | ifeq ($(findstring na,$(ZINC)), na) |
55 | LED_ANIMATIONS = no | 65 | LED_ANIMATIONS = no |
56 | endif | 66 | endif |
@@ -63,10 +73,11 @@ endif | |||
63 | 73 | ||
64 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | 74 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) |
65 | RGBLIGHT_ENABLE = yes | 75 | RGBLIGHT_ENABLE = yes |
66 | OPT_DEFS += -DRGBLED_BACK | ||
67 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 76 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
68 | $(eval $(call ZINC_CUSTOMISE_MSG)) | 77 | OPT_DEFS += -DRGBLED_BOTH |
69 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | 78 | $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) |
79 | else | ||
80 | OPT_DEFS += -DRGBLED_BACK | ||
70 | endif | 81 | endif |
71 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 82 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
72 | RGBLIGHT_ENABLE = yes | 83 | RGBLIGHT_ENABLE = yes |
@@ -74,17 +85,27 @@ else | |||
74 | RGBLIGHT_ENABLE = no | 85 | RGBLIGHT_ENABLE = no |
75 | endif | 86 | endif |
76 | 87 | ||
88 | ifeq ($(strip $(LED_BOTH_ENABLE)), yes) | ||
89 | RGBLIGHT_ENABLE = yes | ||
90 | OPT_DEFS += -DRGBLED_BOTH | ||
91 | endif | ||
92 | |||
93 | ifeq ($(strip $(LED_RGB_CONT)), yes) | ||
94 | OPT_DEFS += -DRGBLED_CONT | ||
95 | endif | ||
96 | |||
77 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | 97 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) |
78 | OPT_DEFS += -DIOS_DEVICE_ENABLE | 98 | OPT_DEFS += -DIOS_DEVICE_ENABLE |
79 | endif | 99 | endif |
80 | 100 | ||
81 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | 101 | ifeq ($(strip $(LED_ANIMATIONS)), yes) |
82 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | 102 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS |
83 | OPT_DEFS += -DLED_ANIMATIONS | 103 | OPT_DEFS += -DLED_ANIMATIONS |
104 | |||
84 | endif | 105 | endif |
85 | 106 | ||
86 | ifeq ($(strip $(Link_Time_Optimization)),yes) | 107 | ifeq ($(strip $(Link_Time_Optimization)),yes) |
87 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | 108 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization |
88 | endif | 109 | endif |
89 | 110 | ||
90 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 111 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
@@ -94,4 +115,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
94 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | 115 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) |
95 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | 116 | # $(info -- OPT_DEFS=$(OPT_DEFS)) |
96 | # $(info ) | 117 | # $(info ) |
97 | |||
diff --git a/keyboards/zinc/keymaps/toshi0383/config.h b/keyboards/zinc/keymaps/toshi0383/config.h index 33108a29e..0d53d4424 100644 --- a/keyboards/zinc/keymaps/toshi0383/config.h +++ b/keyboards/zinc/keymaps/toshi0383/config.h | |||
@@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #pragma once | 23 | #pragma once |
24 | // if you need more program area, try uncomment follow line | ||
25 | #include "serial_config_simpleapi.h" | ||
26 | 24 | ||
27 | // place overrides here | 25 | // place overrides here |
28 | // Selection of RGBLIGHT MODE to use. | 26 | // Selection of RGBLIGHT MODE to use. |
diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk index dca9aa7ff..26ac02f3a 100644 --- a/keyboards/zinc/keymaps/toshi0383/rules.mk +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk | |||
@@ -1,11 +1,12 @@ | |||
1 | # Build Options | 1 | # Build Options |
2 | # change yes to no to disable | 2 | # change to "no" to disable the options, or define them in the Makefile in |
3 | # the appropriate keymap folder that will get included automatically | ||
3 | # | 4 | # |
4 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration |
5 | MOUSEKEY_ENABLE = no # Mouse keys | 6 | MOUSEKEY_ENABLE = no # Mouse keys |
6 | EXTRAKEY_ENABLE = yes # Audio control and System control | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control |
7 | CONSOLE_ENABLE = no # Console for debug | 8 | CONSOLE_ENABLE = no # Console for debug |
8 | COMMAND_ENABLE = no # Commands for debug and configuration | 9 | COMMAND_ENABLE = no # Commands for debug and configuration |
9 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 10 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
10 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
11 | MIDI_ENABLE = no # MIDI controls | 12 | MIDI_ENABLE = no # MIDI controls |
@@ -19,6 +20,9 @@ define ZINC_CUSTOMISE_MSG | |||
19 | $(info Zinc customize) | 20 | $(info Zinc customize) |
20 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) | 21 | $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) |
21 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) | 22 | $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) |
23 | $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) | ||
24 | $(info - LED_RGB_CONT=$(LED_RGB_CONT)) | ||
25 | $(info - RGB_MATRIX=$(RGB_MATRIX)) | ||
22 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) | 26 | $(info - LED_ANIMATION=$(LED_ANIMATIONS)) |
23 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) | 27 | $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) |
24 | endef | 28 | endef |
@@ -26,6 +30,10 @@ endef | |||
26 | # Zinc keyboard customize | 30 | # Zinc keyboard customize |
27 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) | 31 | LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) |
28 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) | 32 | LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) |
33 | LED_BOTH_ENABLE = no # LED backlight and underglow | ||
34 | LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc | ||
35 | RGB_MATRIX = no # RGB LED Matrix | ||
36 | RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand | ||
29 | LED_ANIMATIONS = yes # LED animations | 37 | LED_ANIMATIONS = yes # LED animations |
30 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) | 38 | IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) |
31 | Link_Time_Optimization = no # if firmware size over limit, try this option | 39 | Link_Time_Optimization = no # if firmware size over limit, try this option |
@@ -35,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
35 | 43 | ||
36 | ### Zinc keyboard 'default' keymap: convenient command line option | 44 | ### Zinc keyboard 'default' keymap: convenient command line option |
37 | ## make ZINC=<options> zinc:defualt | 45 | ## make ZINC=<options> zinc:defualt |
38 | ## option= back | under | na | ios | 46 | ## option= back | under | both | cont | matrix | na | ios |
39 | ## ex. | 47 | ## ex. |
40 | ## make ZINC=under zinc:defualt | 48 | ## make ZINC=under zinc:defualt |
41 | ## make ZINC=under,ios zinc:defualt | 49 | ## make ZINC=under,ios zinc:defualt |
@@ -46,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option | |||
46 | ifneq ($(strip $(ZINC)),) | 54 | ifneq ($(strip $(ZINC)),) |
47 | ifeq ($(findstring back,$(ZINC)), back) | 55 | ifeq ($(findstring back,$(ZINC)), back) |
48 | LED_BACK_ENABLE = yes | 56 | LED_BACK_ENABLE = yes |
49 | else ifeq ($(findstring under,$(ZINC)), under) | 57 | endif |
58 | ifeq ($(findstring under,$(ZINC)), under) | ||
50 | LED_UNDERGLOW_ENABLE = yes | 59 | LED_UNDERGLOW_ENABLE = yes |
51 | endif | 60 | endif |
61 | ifeq ($(findstring both,$(ZINC)), both) | ||
62 | LED_BOTH_ENABLE = yes | ||
63 | endif | ||
64 | ifeq ($(findstring cont,$(ZINC)), cont) | ||
65 | LED_RGB_CONT = yes | ||
66 | endif | ||
67 | ifeq ($(findstring matrix,$(ZINC)), matrix) | ||
68 | RGB_MATRIX = yes | ||
69 | endif | ||
70 | ifeq ($(findstring right,$(ZINC)), right) | ||
71 | RGB_MATRIX_SPLIT_RIGHT = yes | ||
72 | endif | ||
52 | ifeq ($(findstring na,$(ZINC)), na) | 73 | ifeq ($(findstring na,$(ZINC)), na) |
53 | LED_ANIMATIONS = no | 74 | LED_ANIMATIONS = no |
54 | endif | 75 | endif |
@@ -61,10 +82,11 @@ endif | |||
61 | 82 | ||
62 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) | 83 | ifeq ($(strip $(LED_BACK_ENABLE)), yes) |
63 | RGBLIGHT_ENABLE = yes | 84 | RGBLIGHT_ENABLE = yes |
64 | OPT_DEFS += -DRGBLED_BACK | ||
65 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 85 | ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
66 | $(eval $(call ZINC_CUSTOMISE_MSG)) | 86 | OPT_DEFS += -DRGBLED_BOTH |
67 | $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') | 87 | $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) |
88 | else | ||
89 | OPT_DEFS += -DRGBLED_BACK | ||
68 | endif | 90 | endif |
69 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) | 91 | else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) |
70 | RGBLIGHT_ENABLE = yes | 92 | RGBLIGHT_ENABLE = yes |
@@ -72,24 +94,43 @@ else | |||
72 | RGBLIGHT_ENABLE = no | 94 | RGBLIGHT_ENABLE = no |
73 | endif | 95 | endif |
74 | 96 | ||
97 | ifeq ($(strip $(LED_BOTH_ENABLE)), yes) | ||
98 | RGBLIGHT_ENABLE = yes | ||
99 | OPT_DEFS += -DRGBLED_BOTH | ||
100 | endif | ||
101 | |||
102 | ifeq ($(strip $(LED_RGB_CONT)), yes) | ||
103 | OPT_DEFS += -DRGBLED_CONT | ||
104 | endif | ||
105 | |||
106 | ifeq ($(strip $(RGB_MATRIX)), yes) | ||
107 | RGBLIGHT_ENABLE = no | ||
108 | RGB_MATRIX_ENABLE = WS2812 | ||
109 | endif | ||
110 | |||
75 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) | 111 | ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) |
76 | OPT_DEFS += -DIOS_DEVICE_ENABLE | 112 | OPT_DEFS += -DIOS_DEVICE_ENABLE |
77 | endif | 113 | endif |
78 | 114 | ||
79 | ifeq ($(strip $(LED_ANIMATIONS)), yes) | 115 | ifeq ($(strip $(LED_ANIMATIONS)), yes) |
80 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS | 116 | # OPT_DEFS += -DRGBLIGHT_ANIMATIONS |
81 | OPT_DEFS += -DLED_ANIMATIONS | 117 | OPT_DEFS += -DLED_ANIMATIONS |
118 | |||
119 | endif | ||
120 | |||
121 | ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) | ||
122 | OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT | ||
82 | endif | 123 | endif |
83 | 124 | ||
84 | ifeq ($(strip $(Link_Time_Optimization)),yes) | 125 | ifeq ($(strip $(Link_Time_Optimization)),yes) |
85 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization | 126 | EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization |
86 | endif | 127 | endif |
87 | 128 | ||
88 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 129 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
89 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 130 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
90 | 131 | ||
132 | |||
91 | # Uncomment these for debugging | 133 | # Uncomment these for debugging |
92 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) | 134 | # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) |
93 | # $(info -- OPT_DEFS=$(OPT_DEFS)) | 135 | # $(info -- OPT_DEFS=$(OPT_DEFS)) |
94 | # $(info ) | 136 | # $(info ) |
95 | |||
diff --git a/keyboards/zinc/readme.md b/keyboards/zinc/readme.md index 3b4ce105c..0e8d6cd65 100644 --- a/keyboards/zinc/readme.md +++ b/keyboards/zinc/readme.md | |||
@@ -5,9 +5,9 @@ Zinc | |||
5 | 5 | ||
6 | 40% row-staggered split keyboard. | 6 | 40% row-staggered split keyboard. |
7 | 7 | ||
8 | Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) | 8 | * Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) |
9 | Hardware Supported: Zinc PCB | 9 | * Hardware Supported: Zinc PCB |
10 | Hardware Availability: (https://twitter.com/monksoffunkJP) | 10 | * Hardware Availability: (https://twitter.com/monksoffunkJP) |
11 | 11 | ||
12 | Make example for this keyboard (after setting up your build environment): | 12 | Make example for this keyboard (after setting up your build environment): |
13 | 13 | ||
diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index 6713b3098..1eb63df5b 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h | |||
@@ -18,9 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
18 | 18 | ||
19 | #pragma once | 19 | #pragma once |
20 | 20 | ||
21 | //#ifndef REV1_CONFIG_H | ||
22 | //#define REV1_CONFIG_H | ||
23 | |||
24 | /* USB Device descriptor parameter */ | 21 | /* USB Device descriptor parameter */ |
25 | #define VENDOR_ID 0xFEED | 22 | #define VENDOR_ID 0xFEED |
26 | #define PRODUCT_ID 0x9991 | 23 | #define PRODUCT_ID 0x9991 |
@@ -33,9 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
33 | #define TAPPING_TERM 100 | 30 | #define TAPPING_TERM 100 |
34 | 31 | ||
35 | /* Use I2C or Serial */ | 32 | /* Use I2C or Serial */ |
36 | //#define USE_I2C | ||
37 | #define USE_SERIAL | 33 | #define USE_SERIAL |
38 | //#define USE_MATRIX_I2C | 34 | #define SOFT_SERIAL_PIN D2 |
39 | 35 | ||
40 | /* Select hand configuration */ | 36 | /* Select hand configuration */ |
41 | #define MASTER_LEFT | 37 | #define MASTER_LEFT |
@@ -44,18 +40,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
44 | 40 | ||
45 | /* key matrix size */ | 41 | /* key matrix size */ |
46 | // Rows are doubled-up | 42 | // Rows are doubled-up |
47 | #define MATRIX_ROWS 8 | 43 | #define MATRIX_ROWS 8 |
48 | #define MATRIX_ROW_PINS { F6, F7, B1, B3 } | 44 | #define MATRIX_ROW_PINS { F6, F7, B1, B3 } |
49 | 45 | ||
50 | // wiring of each half | 46 | // wiring of each half |
51 | #define MATRIX_COLS 6 | 47 | #define MATRIX_COLS 6 |
52 | #define MATRIX_COL_PINS { F4, D4, C6, D7, E6, B4 } | 48 | #define MATRIX_COL_PINS { F4, D4, C6, D7, E6, B4 } |
53 | 49 | ||
54 | /* define if matrix has ghost */ | 50 | #define DIODE_DIRECTION COL2ROW |
55 | //#define MATRIX_HAS_GHOST | ||
56 | |||
57 | /* number of backlight levels */ | ||
58 | // #define BACKLIGHT_LEVELS 3 | ||
59 | 51 | ||
60 | /* Set 0 if debouncing isn't needed */ | 52 | /* Set 0 if debouncing isn't needed */ |
61 | #define DEBOUNCE 5 | 53 | #define DEBOUNCE 5 |
@@ -67,25 +59,44 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
67 | 59 | ||
68 | /* ws2812 RGB LED */ | 60 | /* ws2812 RGB LED */ |
69 | #define RGB_DI_PIN D3 | 61 | #define RGB_DI_PIN D3 |
70 | #define RGBLIGHT_TIMER | ||
71 | //#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h | ||
72 | #define ws2812_PORTREG PORTD | ||
73 | #define ws2812_DDRREG DDRD | ||
74 | 62 | ||
75 | // RGB LED support | 63 | // RGB LED support |
76 | //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no | 64 | //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no |
77 | // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes | 65 | // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes |
78 | #ifdef RGBLED_BACK | 66 | #ifdef RGBLIGHT_ENABLE |
79 | #define RGBLED_NUM 24 | 67 | #define RGBLIGHT_SPLIT |
80 | #else | 68 | #ifdef RGBLED_BACK |
81 | #define RGBLED_NUM 6 | 69 | #ifdef RGBLED_CONT |
70 | #define RGBLED_NUM 48 | ||
71 | #define RGBLED_SPLIT { 24, 24 } | ||
72 | #else | ||
73 | #define RGBLED_NUM 24 | ||
74 | #endif | ||
75 | #else | ||
76 | #ifdef RGBLED_BOTH | ||
77 | #ifdef RGBLED_CONT | ||
78 | #define RGBLED_NUM 60 | ||
79 | #define RGBLED_SPLIT { 30, 30 } | ||
80 | // #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29} | ||
81 | #else | ||
82 | #define RGBLED_NUM 30 | ||
83 | #endif | ||
84 | #else | ||
85 | #ifdef RGBLED_CONT | ||
86 | #define RGBLED_NUM 12 | ||
87 | #define RGBLED_SPLIT { 6, 6 } | ||
88 | #else | ||
89 | #define RGBLED_NUM 6 | ||
90 | #endif | ||
91 | #endif | ||
92 | #endif | ||
82 | #endif | 93 | #endif |
83 | 94 | ||
84 | #ifndef IOS_DEVICE_ENABLE | 95 | #ifndef IOS_DEVICE_ENABLE |
85 | #if RGBLED_NUM <= 6 | 96 | #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) |
86 | #define RGBLIGHT_LIMIT_VAL 255 | 97 | #define RGBLIGHT_LIMIT_VAL 255 |
87 | #else | 98 | #else |
88 | #if RGBLED_NUM <= 16 | 99 | #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) |
89 | #define RGBLIGHT_LIMIT_VAL 130 | 100 | #define RGBLIGHT_LIMIT_VAL 130 |
90 | #else | 101 | #else |
91 | #define RGBLIGHT_LIMIT_VAL 120 | 102 | #define RGBLIGHT_LIMIT_VAL 120 |
@@ -93,10 +104,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
93 | #endif | 104 | #endif |
94 | #define RGBLIGHT_VAL_STEP 17 | 105 | #define RGBLIGHT_VAL_STEP 17 |
95 | #else | 106 | #else |
96 | #if RGBLED_NUM <= 6 | 107 | #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) |
97 | #define RGBLIGHT_LIMIT_VAL 90 | 108 | #define RGBLIGHT_LIMIT_VAL 90 |
98 | #else | 109 | #else |
99 | #if RGBLED_NUM <= 16 | 110 | #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) |
100 | #define RGBLIGHT_LIMIT_VAL 45 | 111 | #define RGBLIGHT_LIMIT_VAL 45 |
101 | #else | 112 | #else |
102 | #define RGBLIGHT_LIMIT_VAL 35 | 113 | #define RGBLIGHT_LIMIT_VAL 35 |
@@ -136,5 +147,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
136 | //#define NO_ACTION_ONESHOT | 147 | //#define NO_ACTION_ONESHOT |
137 | //#define NO_ACTION_MACRO | 148 | //#define NO_ACTION_MACRO |
138 | //#define NO_ACTION_FUNCTION | 149 | //#define NO_ACTION_FUNCTION |
139 | |||
140 | //#endif | ||
diff --git a/keyboards/zinc/rev1/matrix.c b/keyboards/zinc/rev1/matrix.c deleted file mode 100644 index df674ce14..000000000 --- a/keyboards/zinc/rev1/matrix.c +++ /dev/null | |||
@@ -1,357 +0,0 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * scan matrix | ||
20 | */ | ||
21 | #include <stdint.h> | ||
22 | #include <stdbool.h> | ||
23 | #include <string.h> | ||
24 | #include <avr/io.h> | ||
25 | #include <avr/wdt.h> | ||
26 | #include <avr/interrupt.h> | ||
27 | #include <util/delay.h> | ||
28 | #include "print.h" | ||
29 | #include "debug.h" | ||
30 | #include "util.h" | ||
31 | #include "matrix.h" | ||
32 | #include "split_util.h" | ||
33 | #include "quantum.h" | ||
34 | |||
35 | #ifdef USE_MATRIX_I2C | ||
36 | # include "i2c.h" | ||
37 | #else // USE_SERIAL | ||
38 | # include "split_scomm.h" | ||
39 | #endif | ||
40 | |||
41 | #ifndef DEBOUNCE | ||
42 | # define DEBOUNCE 5 | ||
43 | #endif | ||
44 | |||
45 | #define ERROR_DISCONNECT_COUNT 5 | ||
46 | |||
47 | static uint8_t debouncing = DEBOUNCE; | ||
48 | static const int ROWS_PER_HAND = MATRIX_ROWS/2; | ||
49 | static uint8_t error_count = 0; | ||
50 | uint8_t is_master = 0 ; | ||
51 | |||
52 | static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | ||
53 | static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | ||
54 | |||
55 | /* matrix state(1:on, 0:off) */ | ||
56 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
57 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | ||
58 | |||
59 | static matrix_row_t read_cols(void); | ||
60 | static void init_cols(void); | ||
61 | static void unselect_rows(void); | ||
62 | static void select_row(uint8_t row); | ||
63 | static uint8_t matrix_master_scan(void); | ||
64 | |||
65 | |||
66 | __attribute__ ((weak)) | ||
67 | void matrix_init_kb(void) { | ||
68 | matrix_init_user(); | ||
69 | } | ||
70 | |||
71 | __attribute__ ((weak)) | ||
72 | void matrix_scan_kb(void) { | ||
73 | matrix_scan_user(); | ||
74 | } | ||
75 | |||
76 | __attribute__ ((weak)) | ||
77 | void matrix_init_user(void) { | ||
78 | } | ||
79 | |||
80 | __attribute__ ((weak)) | ||
81 | void matrix_scan_user(void) { | ||
82 | } | ||
83 | |||
84 | inline | ||
85 | uint8_t matrix_rows(void) | ||
86 | { | ||
87 | return MATRIX_ROWS; | ||
88 | } | ||
89 | |||
90 | inline | ||
91 | uint8_t matrix_cols(void) | ||
92 | { | ||
93 | return MATRIX_COLS; | ||
94 | } | ||
95 | |||
96 | void matrix_init(void) | ||
97 | { | ||
98 | debug_enable = true; | ||
99 | debug_matrix = true; | ||
100 | debug_mouse = true; | ||
101 | // initialize row and col | ||
102 | unselect_rows(); | ||
103 | init_cols(); | ||
104 | |||
105 | setPinOutput(B0); | ||
106 | setPinOutput(D5); | ||
107 | writePinHigh(D5); | ||
108 | writePinHigh(B0); | ||
109 | |||
110 | // initialize matrix state: all keys off | ||
111 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
112 | matrix[i] = 0; | ||
113 | matrix_debouncing[i] = 0; | ||
114 | } | ||
115 | |||
116 | is_master = has_usb(); | ||
117 | |||
118 | matrix_init_quantum(); | ||
119 | } | ||
120 | |||
121 | uint8_t _matrix_scan(void) | ||
122 | { | ||
123 | // Right hand is stored after the left in the matirx so, we need to offset it | ||
124 | int offset = isLeftHand ? 0 : (ROWS_PER_HAND); | ||
125 | |||
126 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { | ||
127 | select_row(i); | ||
128 | _delay_us(30); // without this wait read unstable value. | ||
129 | matrix_row_t cols = read_cols(); | ||
130 | if (matrix_debouncing[i+offset] != cols) { | ||
131 | matrix_debouncing[i+offset] = cols; | ||
132 | debouncing = DEBOUNCE; | ||
133 | } | ||
134 | unselect_rows(); | ||
135 | } | ||
136 | |||
137 | if (debouncing) { | ||
138 | if (--debouncing) { | ||
139 | _delay_ms(1); | ||
140 | } else { | ||
141 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { | ||
142 | matrix[i+offset] = matrix_debouncing[i+offset]; | ||
143 | } | ||
144 | } | ||
145 | } | ||
146 | |||
147 | return 1; | ||
148 | } | ||
149 | |||
150 | #ifdef USE_MATRIX_I2C | ||
151 | |||
152 | // Get rows from other half over i2c | ||
153 | int i2c_transaction(void) { | ||
154 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
155 | |||
156 | int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); | ||
157 | if (err) goto i2c_error; | ||
158 | |||
159 | // start of matrix stored at 0x00 | ||
160 | err = i2c_master_write(0x00); | ||
161 | if (err) goto i2c_error; | ||
162 | |||
163 | // Start read | ||
164 | err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); | ||
165 | if (err) goto i2c_error; | ||
166 | |||
167 | if (!err) { | ||
168 | int i; | ||
169 | for (i = 0; i < ROWS_PER_HAND-1; ++i) { | ||
170 | matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); | ||
171 | } | ||
172 | matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); | ||
173 | i2c_master_stop(); | ||
174 | } else { | ||
175 | i2c_error: // the cable is disconnceted, or something else went wrong | ||
176 | i2c_reset_state(); | ||
177 | return err; | ||
178 | } | ||
179 | |||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | #else // USE_SERIAL | ||
184 | |||
185 | int serial_transaction(int master_changed) { | ||
186 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
187 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
188 | int ret=serial_update_buffers(master_changed); | ||
189 | #else | ||
190 | int ret=serial_update_buffers(); | ||
191 | #endif | ||
192 | if (ret ) { | ||
193 | if(ret==2) writePinLow(B0); | ||
194 | return 1; | ||
195 | } | ||
196 | writePinHigh(B0); | ||
197 | memcpy(&matrix[slaveOffset], | ||
198 | (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); | ||
199 | return 0; | ||
200 | } | ||
201 | #endif | ||
202 | |||
203 | uint8_t matrix_scan(void) | ||
204 | { | ||
205 | if (is_master) { | ||
206 | matrix_master_scan(); | ||
207 | }else{ | ||
208 | matrix_slave_scan(); | ||
209 | int offset = (isLeftHand) ? ROWS_PER_HAND : 0; | ||
210 | memcpy(&matrix[offset], | ||
211 | (void *)serial_master_buffer, sizeof(serial_master_buffer)); | ||
212 | matrix_scan_quantum(); | ||
213 | } | ||
214 | return 1; | ||
215 | } | ||
216 | |||
217 | |||
218 | uint8_t matrix_master_scan(void) { | ||
219 | |||
220 | int ret = _matrix_scan(); | ||
221 | int mchanged = 1; | ||
222 | int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; | ||
223 | |||
224 | #ifdef USE_MATRIX_I2C | ||
225 | // for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
226 | /* i2c_slave_buffer[i] = matrix[offset+i]; */ | ||
227 | // i2c_slave_buffer[i] = matrix[offset+i]; | ||
228 | // } | ||
229 | #else // USE_SERIAL | ||
230 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
231 | mchanged = memcmp((void *)serial_master_buffer, | ||
232 | &matrix[offset], sizeof(serial_master_buffer)); | ||
233 | #endif | ||
234 | memcpy((void *)serial_master_buffer, | ||
235 | &matrix[offset], sizeof(serial_master_buffer)); | ||
236 | #endif | ||
237 | |||
238 | #ifdef USE_MATRIX_I2C | ||
239 | if( i2c_transaction() ) { | ||
240 | #else // USE_SERIAL | ||
241 | if( serial_transaction(mchanged) ) { | ||
242 | #endif | ||
243 | // turn on the indicator led when halves are disconnected | ||
244 | writePinLow(D5); | ||
245 | |||
246 | error_count++; | ||
247 | |||
248 | if (error_count > ERROR_DISCONNECT_COUNT) { | ||
249 | // reset other half if disconnected | ||
250 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
251 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
252 | matrix[slaveOffset+i] = 0; | ||
253 | } | ||
254 | } | ||
255 | } else { | ||
256 | // turn off the indicator led on no error | ||
257 | writePinHigh(D5); | ||
258 | error_count = 0; | ||
259 | } | ||
260 | matrix_scan_quantum(); | ||
261 | return ret; | ||
262 | } | ||
263 | |||
264 | void matrix_slave_scan(void) { | ||
265 | _matrix_scan(); | ||
266 | |||
267 | int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; | ||
268 | |||
269 | #ifdef USE_MATRIX_I2C | ||
270 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
271 | /* i2c_slave_buffer[i] = matrix[offset+i]; */ | ||
272 | i2c_slave_buffer[i] = matrix[offset+i]; | ||
273 | } | ||
274 | #else // USE_SERIAL | ||
275 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
276 | int change = 0; | ||
277 | #endif | ||
278 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
279 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
280 | if( serial_slave_buffer[i] != matrix[offset+i] ) | ||
281 | change = 1; | ||
282 | #endif | ||
283 | serial_slave_buffer[i] = matrix[offset+i]; | ||
284 | } | ||
285 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
286 | slave_buffer_change_count += change; | ||
287 | #endif | ||
288 | #endif | ||
289 | } | ||
290 | |||
291 | bool matrix_is_modified(void) | ||
292 | { | ||
293 | if (debouncing) return false; | ||
294 | return true; | ||
295 | } | ||
296 | |||
297 | inline | ||
298 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
299 | { | ||
300 | return (matrix[row] & ((matrix_row_t)1<<col)); | ||
301 | } | ||
302 | |||
303 | inline | ||
304 | matrix_row_t matrix_get_row(uint8_t row) | ||
305 | { | ||
306 | return matrix[row]; | ||
307 | } | ||
308 | |||
309 | void matrix_print(void) | ||
310 | { | ||
311 | print("\nr/c 0123456789ABCDEF\n"); | ||
312 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
313 | phex(row); print(": "); | ||
314 | pbin_reverse16(matrix_get_row(row)); | ||
315 | print("\n"); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | uint8_t matrix_key_count(void) | ||
320 | { | ||
321 | uint8_t count = 0; | ||
322 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
323 | count += bitpop16(matrix[i]); | ||
324 | } | ||
325 | return count; | ||
326 | } | ||
327 | |||
328 | static void init_cols(void) | ||
329 | { | ||
330 | for(int x = 0; x < MATRIX_COLS; x++) { | ||
331 | _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); | ||
332 | _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); | ||
333 | } | ||
334 | } | ||
335 | |||
336 | static matrix_row_t read_cols(void) | ||
337 | { | ||
338 | matrix_row_t result = 0; | ||
339 | for(int x = 0; x < MATRIX_COLS; x++) { | ||
340 | result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); | ||
341 | } | ||
342 | return result; | ||
343 | } | ||
344 | |||
345 | static void unselect_rows(void) | ||
346 | { | ||
347 | for(int x = 0; x < ROWS_PER_HAND; x++) { | ||
348 | _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); | ||
349 | _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); | ||
350 | } | ||
351 | } | ||
352 | |||
353 | static void select_row(uint8_t row) | ||
354 | { | ||
355 | _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); | ||
356 | _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); | ||
357 | } | ||
diff --git a/keyboards/zinc/rev1/rev1.c b/keyboards/zinc/rev1/rev1.c index 2ce08a07c..a9c2cfdba 100644 --- a/keyboards/zinc/rev1/rev1.c +++ b/keyboards/zinc/rev1/rev1.c | |||
@@ -3,4 +3,3 @@ | |||
3 | void matrix_init_kb(void) { | 3 | void matrix_init_kb(void) { |
4 | matrix_init_user(); | 4 | matrix_init_user(); |
5 | }; | 5 | }; |
6 | |||
diff --git a/keyboards/zinc/rev1/rev1.h b/keyboards/zinc/rev1/rev1.h index aa1c408b0..1bf2c565a 100644 --- a/keyboards/zinc/rev1/rev1.h +++ b/keyboards/zinc/rev1/rev1.h | |||
@@ -1,22 +1,7 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include "../zinc.h" | ||
4 | |||
5 | #include "quantum.h" | 3 | #include "quantum.h" |
6 | 4 | ||
7 | #ifdef RGBLIGHT_ENABLE | ||
8 | //rgb led driver | ||
9 | #include "ws2812.h" | ||
10 | #endif | ||
11 | |||
12 | #ifdef USE_I2C | ||
13 | #include <stddef.h> | ||
14 | #ifdef __AVR__ | ||
15 | #include <avr/io.h> | ||
16 | #include <avr/interrupt.h> | ||
17 | #endif | ||
18 | #endif | ||
19 | |||
20 | // Standard Keymap | 5 | // Standard Keymap |
21 | // (TRRS jack on both halves are to the left side) | 6 | // (TRRS jack on both halves are to the left side) |
22 | #define LAYOUT( \ | 7 | #define LAYOUT( \ |
diff --git a/keyboards/zinc/rev1/rules.mk b/keyboards/zinc/rev1/rules.mk index e78b9258d..d38a61809 100644 --- a/keyboards/zinc/rev1/rules.mk +++ b/keyboards/zinc/rev1/rules.mk | |||
@@ -1,4 +1 @@ | |||
1 | SRC += rev1/matrix.c | SPLIT_KEYBOARD = yes | |
2 | SRC += rev1/split_util.c | ||
3 | SRC += rev1/split_scomm.c | ||
4 | SRC += ws2812.c | ||
diff --git a/keyboards/zinc/rev1/serial_config.h b/keyboards/zinc/rev1/serial_config.h deleted file mode 100644 index 9fb5dfc67..000000000 --- a/keyboards/zinc/rev1/serial_config.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef SOFT_SERIAL_CONFIG_H | ||
2 | #define SOFT_SERIAL_CONFIG_H | ||
3 | |||
4 | #ifndef SOFT_SERIAL_PIN | ||
5 | /* Soft Serial defines */ | ||
6 | #define SOFT_SERIAL_PIN D2 | ||
7 | // OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 | ||
8 | // // 1: about 137kbps (default) | ||
9 | // // 2: about 75kbps | ||
10 | // // 3: about 39kbps | ||
11 | // // 4: about 26kbps | ||
12 | // // 5: about 20kbps | ||
13 | #endif | ||
14 | |||
15 | //// USE flexible API (using multi-type transaction function) | ||
16 | #define SERIAL_USE_MULTI_TRANSACTION | ||
17 | |||
18 | #endif /* SOFT_SERIAL_CONFIG_H */ | ||
diff --git a/keyboards/zinc/rev1/serial_config_simpleapi.h b/keyboards/zinc/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e..000000000 --- a/keyboards/zinc/rev1/serial_config_simpleapi.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef SERIAL_CONFIG_SIMPLEAPI_H | ||
2 | #define SERIAL_CONFIG_SIMPLEAPI_H | ||
3 | |||
4 | #undef SERIAL_USE_MULTI_TRANSACTION | ||
5 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
6 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
7 | |||
8 | #endif // SERIAL_CONFIG_SIMPLEAPI_H | ||
diff --git a/keyboards/zinc/rev1/split_scomm.c b/keyboards/zinc/rev1/split_scomm.c deleted file mode 100644 index 50d233ce9..000000000 --- a/keyboards/zinc/rev1/split_scomm.c +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | #ifdef USE_SERIAL | ||
2 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
3 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
4 | |||
5 | #include <stdbool.h> | ||
6 | #include <stdint.h> | ||
7 | #include <stddef.h> | ||
8 | #include <split_scomm.h> | ||
9 | #include "serial.h" | ||
10 | #ifdef SERIAL_DEBUG_MODE | ||
11 | #include <avr/io.h> | ||
12 | #endif | ||
13 | #ifdef CONSOLE_ENABLE | ||
14 | #include <print.h> | ||
15 | #endif | ||
16 | |||
17 | uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; | ||
18 | uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; | ||
19 | uint8_t volatile status_com = 0; | ||
20 | uint8_t volatile status1 = 0; | ||
21 | uint8_t slave_buffer_change_count = 0; | ||
22 | uint8_t s_change_old = 0xff; | ||
23 | uint8_t s_change_new = 0xff; | ||
24 | |||
25 | SSTD_t transactions[] = { | ||
26 | #define GET_SLAVE_STATUS 0 | ||
27 | /* master buffer not changed, only recive slave_buffer_change_count */ | ||
28 | { (uint8_t *)&status_com, | ||
29 | 0, NULL, | ||
30 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
31 | }, | ||
32 | #define PUT_MASTER_GET_SLAVE_STATUS 1 | ||
33 | /* master buffer changed need send, and recive slave_buffer_change_count */ | ||
34 | { (uint8_t *)&status_com, | ||
35 | sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, | ||
36 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
37 | }, | ||
38 | #define GET_SLAVE_BUFFER 2 | ||
39 | /* recive serial_slave_buffer */ | ||
40 | { (uint8_t *)&status1, | ||
41 | 0, NULL, | ||
42 | sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer | ||
43 | } | ||
44 | }; | ||
45 | |||
46 | void serial_master_init(void) | ||
47 | { | ||
48 | soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); | ||
49 | } | ||
50 | |||
51 | void serial_slave_init(void) | ||
52 | { | ||
53 | soft_serial_target_init(transactions, TID_LIMIT(transactions)); | ||
54 | } | ||
55 | |||
56 | // 0 => no error | ||
57 | // 1 => slave did not respond | ||
58 | // 2 => checksum error | ||
59 | int serial_update_buffers(int master_update) | ||
60 | { | ||
61 | int status, smatstatus; | ||
62 | static int need_retry = 0; | ||
63 | |||
64 | if( s_change_old != s_change_new ) { | ||
65 | smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); | ||
66 | if( smatstatus == TRANSACTION_END ) { | ||
67 | s_change_old = s_change_new; | ||
68 | #ifdef CONSOLE_ENABLE | ||
69 | uprintf("slave matrix = %b %b %b %b %b\n", | ||
70 | serial_slave_buffer[0], serial_slave_buffer[1], | ||
71 | serial_slave_buffer[2], serial_slave_buffer[3], | ||
72 | serial_slave_buffer[4] ); | ||
73 | #endif | ||
74 | } | ||
75 | } else { | ||
76 | // serial_slave_buffer dosen't change | ||
77 | smatstatus = TRANSACTION_END; // dummy status | ||
78 | } | ||
79 | |||
80 | if( !master_update && !need_retry) { | ||
81 | status = soft_serial_transaction(GET_SLAVE_STATUS); | ||
82 | } else { | ||
83 | status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); | ||
84 | } | ||
85 | if( status == TRANSACTION_END ) { | ||
86 | s_change_new = slave_buffer_change_count; | ||
87 | need_retry = 0; | ||
88 | } else { | ||
89 | need_retry = 1; | ||
90 | } | ||
91 | return smatstatus; | ||
92 | } | ||
93 | |||
94 | #endif // SERIAL_USE_MULTI_TRANSACTION | ||
95 | #endif /* USE_SERIAL */ | ||
diff --git a/keyboards/zinc/rev1/split_scomm.h b/keyboards/zinc/rev1/split_scomm.h deleted file mode 100644 index 873d8939d..000000000 --- a/keyboards/zinc/rev1/split_scomm.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef SPLIT_COMM_H | ||
2 | #define SPLIT_COMM_H | ||
3 | |||
4 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
5 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ | ||
6 | #include "serial.h" | ||
7 | |||
8 | #else | ||
9 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
10 | // Buffers for master - slave communication | ||
11 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
12 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
13 | |||
14 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
15 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
16 | extern uint8_t slave_buffer_change_count; | ||
17 | |||
18 | void serial_master_init(void); | ||
19 | void serial_slave_init(void); | ||
20 | int serial_update_buffers(int master_changed); | ||
21 | |||
22 | #endif | ||
23 | |||
24 | #endif /* SPLIT_COMM_H */ | ||
diff --git a/keyboards/zinc/rev1/split_util.c b/keyboards/zinc/rev1/split_util.c deleted file mode 100644 index e1ff8b437..000000000 --- a/keyboards/zinc/rev1/split_util.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | #include <avr/io.h> | ||
2 | #include <avr/wdt.h> | ||
3 | #include <avr/power.h> | ||
4 | #include <avr/interrupt.h> | ||
5 | #include <util/delay.h> | ||
6 | #include <avr/eeprom.h> | ||
7 | #include "split_util.h" | ||
8 | #include "matrix.h" | ||
9 | #include "keyboard.h" | ||
10 | |||
11 | #ifdef USE_MATRIX_I2C | ||
12 | # include "i2c.h" | ||
13 | #else | ||
14 | # include "split_scomm.h" | ||
15 | #endif | ||
16 | |||
17 | volatile bool isLeftHand = true; | ||
18 | |||
19 | static void setup_handedness(void) { | ||
20 | #ifdef EE_HANDS | ||
21 | isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); | ||
22 | #else | ||
23 | // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c | ||
24 | #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) | ||
25 | isLeftHand = !has_usb(); | ||
26 | #else | ||
27 | isLeftHand = has_usb(); | ||
28 | #endif | ||
29 | #endif | ||
30 | } | ||
31 | |||
32 | static void keyboard_master_setup(void) { | ||
33 | |||
34 | #ifdef USE_MATRIX_I2C | ||
35 | i2c_master_init(); | ||
36 | #else | ||
37 | serial_master_init(); | ||
38 | #endif | ||
39 | } | ||
40 | |||
41 | static void keyboard_slave_setup(void) { | ||
42 | |||
43 | #ifdef USE_MATRIX_I2C | ||
44 | i2c_slave_init(SLAVE_I2C_ADDRESS); | ||
45 | #else | ||
46 | serial_slave_init(); | ||
47 | #endif | ||
48 | } | ||
49 | |||
50 | bool has_usb(void) { | ||
51 | USBCON |= (1 << OTGPADE); //enables VBUS pad | ||
52 | _delay_us(5); | ||
53 | return (USBSTA & (1<<VBUS)); //checks state of VBUS | ||
54 | } | ||
55 | |||
56 | void split_keyboard_setup(void) { | ||
57 | setup_handedness(); | ||
58 | |||
59 | if (has_usb()) { | ||
60 | keyboard_master_setup(); | ||
61 | } else { | ||
62 | keyboard_slave_setup(); | ||
63 | } | ||
64 | sei(); | ||
65 | } | ||
66 | |||
67 | // this code runs before the usb and keyboard is initialized | ||
68 | void matrix_setup(void) { | ||
69 | split_keyboard_setup(); | ||
70 | } | ||
diff --git a/keyboards/zinc/rev1/split_util.h b/keyboards/zinc/rev1/split_util.h deleted file mode 100644 index 687ca19bd..000000000 --- a/keyboards/zinc/rev1/split_util.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef SPLIT_KEYBOARD_UTIL_H | ||
2 | #define SPLIT_KEYBOARD_UTIL_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include "eeconfig.h" | ||
6 | |||
7 | #define SLAVE_I2C_ADDRESS 0x32 | ||
8 | |||
9 | extern volatile bool isLeftHand; | ||
10 | |||
11 | // slave version of matix scan, defined in matrix.c | ||
12 | void matrix_slave_scan(void); | ||
13 | |||
14 | void split_keyboard_setup(void); | ||
15 | bool has_usb(void); | ||
16 | |||
17 | void matrix_master_OLED_init (void); | ||
18 | |||
19 | #endif | ||
diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index 8eeb154ac..e94ffb7c6 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h | |||
@@ -30,9 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
30 | #define TAPPING_TERM 100 | 30 | #define TAPPING_TERM 100 |
31 | 31 | ||
32 | /* Use I2C or Serial */ | 32 | /* Use I2C or Serial */ |
33 | //#define USE_I2C | ||
34 | #define USE_SERIAL | 33 | #define USE_SERIAL |
35 | //#define USE_MATRIX_I2C | 34 | #define SOFT_SERIAL_PIN D2 |
36 | 35 | ||
37 | /* Select hand configuration */ | 36 | /* Select hand configuration */ |
38 | #define MASTER_LEFT | 37 | #define MASTER_LEFT |
@@ -41,18 +40,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
41 | 40 | ||
42 | /* key matrix size */ | 41 | /* key matrix size */ |
43 | // Rows are doubled-up | 42 | // Rows are doubled-up |
44 | #define MATRIX_ROWS 8 | 43 | #define MATRIX_ROWS 8 |
45 | #define MATRIX_ROW_PINS { D4, C6, D7, E6 } | 44 | #define MATRIX_ROW_PINS { D4, C6, D7, E6 } |
46 | 45 | ||
47 | // wiring of each half | 46 | // wiring of each half |
48 | #define MATRIX_COLS 6 | 47 | #define MATRIX_COLS 6 |
49 | #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3} | 48 | #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3} |
50 | 49 | ||
51 | /* define if matrix has ghost */ | 50 | #define DIODE_DIRECTION COL2ROW |
52 | //#define MATRIX_HAS_GHOST | ||
53 | |||
54 | /* number of backlight levels */ | ||
55 | // #define BACKLIGHT_LEVELS 3 | ||
56 | 51 | ||
57 | /* Set 0 if debouncing isn't needed */ | 52 | /* Set 0 if debouncing isn't needed */ |
58 | #define DEBOUNCE 5 | 53 | #define DEBOUNCE 5 |
@@ -64,25 +59,44 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
64 | 59 | ||
65 | /* ws2812 RGB LED */ | 60 | /* ws2812 RGB LED */ |
66 | #define RGB_DI_PIN D3 | 61 | #define RGB_DI_PIN D3 |
67 | #define RGBLIGHT_TIMER | ||
68 | //#define RGBLED_NUM 24 // Number of LEDs. see ./keymaps/default/config.h | ||
69 | #define ws2812_PORTREG PORTD | ||
70 | #define ws2812_DDRREG DDRD | ||
71 | 62 | ||
72 | // RGB LED support | 63 | // RGB LED support |
73 | //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no | 64 | //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no |
74 | // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes | 65 | // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes |
75 | #ifdef RGBLED_BACK | 66 | #ifdef RGBLIGHT_ENABLE |
76 | #define RGBLED_NUM 24 | 67 | #define RGBLIGHT_SPLIT |
77 | #else | 68 | #ifdef RGBLED_BACK |
78 | #define RGBLED_NUM 6 | 69 | #ifdef RGBLED_CONT |
70 | #define RGBLED_NUM 48 | ||
71 | #define RGBLED_SPLIT { 24, 24 } | ||
72 | #else | ||
73 | #define RGBLED_NUM 24 | ||
74 | #endif | ||
75 | #else | ||
76 | #ifdef RGBLED_BOTH | ||
77 | #ifdef RGBLED_CONT | ||
78 | #define RGBLED_NUM 60 | ||
79 | #define RGBLED_SPLIT { 30, 30 } | ||
80 | // #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29} | ||
81 | #else | ||
82 | #define RGBLED_NUM 30 | ||
83 | #endif | ||
84 | #else | ||
85 | #ifdef RGBLED_CONT | ||
86 | #define RGBLED_NUM 12 | ||
87 | #define RGBLED_SPLIT { 6, 6 } | ||
88 | #else | ||
89 | #define RGBLED_NUM 6 | ||
90 | #endif | ||
91 | #endif | ||
92 | #endif | ||
79 | #endif | 93 | #endif |
80 | 94 | ||
81 | #ifndef IOS_DEVICE_ENABLE | 95 | #ifndef IOS_DEVICE_ENABLE |
82 | #if RGBLED_NUM <= 6 | 96 | #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) |
83 | #define RGBLIGHT_LIMIT_VAL 255 | 97 | #define RGBLIGHT_LIMIT_VAL 255 |
84 | #else | 98 | #else |
85 | #if RGBLED_NUM <= 16 | 99 | #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) |
86 | #define RGBLIGHT_LIMIT_VAL 130 | 100 | #define RGBLIGHT_LIMIT_VAL 130 |
87 | #else | 101 | #else |
88 | #define RGBLIGHT_LIMIT_VAL 120 | 102 | #define RGBLIGHT_LIMIT_VAL 120 |
@@ -90,10 +104,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
90 | #endif | 104 | #endif |
91 | #define RGBLIGHT_VAL_STEP 17 | 105 | #define RGBLIGHT_VAL_STEP 17 |
92 | #else | 106 | #else |
93 | #if RGBLED_NUM <= 6 | 107 | #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) |
94 | #define RGBLIGHT_LIMIT_VAL 90 | 108 | #define RGBLIGHT_LIMIT_VAL 90 |
95 | #else | 109 | #else |
96 | #if RGBLED_NUM <= 16 | 110 | #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) |
97 | #define RGBLIGHT_LIMIT_VAL 45 | 111 | #define RGBLIGHT_LIMIT_VAL 45 |
98 | #else | 112 | #else |
99 | #define RGBLIGHT_LIMIT_VAL 35 | 113 | #define RGBLIGHT_LIMIT_VAL 35 |
diff --git a/keyboards/zinc/reva/matrix.c b/keyboards/zinc/reva/matrix.c deleted file mode 100644 index 5b58500db..000000000 --- a/keyboards/zinc/reva/matrix.c +++ /dev/null | |||
@@ -1,357 +0,0 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | /* | ||
19 | * scan matrix | ||
20 | */ | ||
21 | #include <stdint.h> | ||
22 | #include <stdbool.h> | ||
23 | #include <string.h> | ||
24 | #include <avr/io.h> | ||
25 | #include <avr/wdt.h> | ||
26 | #include <avr/interrupt.h> | ||
27 | #include <util/delay.h> | ||
28 | #include "print.h" | ||
29 | #include "debug.h" | ||
30 | #include "util.h" | ||
31 | #include "matrix.h" | ||
32 | #include "split_util.h" | ||
33 | #include "quantum.h" | ||
34 | |||
35 | #ifdef USE_MATRIX_I2C | ||
36 | # include "i2c.h" | ||
37 | #else // USE_SERIAL | ||
38 | # include "split_scomm.h" | ||
39 | #endif | ||
40 | |||
41 | #ifndef DEBOUNCE | ||
42 | # define DEBOUNCE 5 | ||
43 | #endif | ||
44 | |||
45 | #define ERROR_DISCONNECT_COUNT 5 | ||
46 | |||
47 | static uint8_t debouncing = DEBOUNCE; | ||
48 | static const int ROWS_PER_HAND = MATRIX_ROWS/2; | ||
49 | static uint8_t error_count = 0; | ||
50 | uint8_t is_master = 0 ; | ||
51 | |||
52 | static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | ||
53 | static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | ||
54 | |||
55 | /* matrix state(1:on, 0:off) */ | ||
56 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
57 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | ||
58 | |||
59 | static matrix_row_t read_cols(void); | ||
60 | static void init_cols(void); | ||
61 | static void unselect_rows(void); | ||
62 | static void select_row(uint8_t row); | ||
63 | static uint8_t matrix_master_scan(void); | ||
64 | |||
65 | |||
66 | __attribute__ ((weak)) | ||
67 | void matrix_init_kb(void) { | ||
68 | matrix_init_user(); | ||
69 | } | ||
70 | |||
71 | __attribute__ ((weak)) | ||
72 | void matrix_scan_kb(void) { | ||
73 | matrix_scan_user(); | ||
74 | } | ||
75 | |||
76 | __attribute__ ((weak)) | ||
77 | void matrix_init_user(void) { | ||
78 | } | ||
79 | |||
80 | __attribute__ ((weak)) | ||
81 | void matrix_scan_user(void) { | ||
82 | } | ||
83 | |||
84 | inline | ||
85 | uint8_t matrix_rows(void) | ||
86 | { | ||
87 | return MATRIX_ROWS; | ||
88 | } | ||
89 | |||
90 | inline | ||
91 | uint8_t matrix_cols(void) | ||
92 | { | ||
93 | return MATRIX_COLS; | ||
94 | } | ||
95 | |||
96 | void matrix_init(void) | ||
97 | { | ||
98 | debug_enable = true; | ||
99 | debug_matrix = true; | ||
100 | debug_mouse = true; | ||
101 | // initialize row and col | ||
102 | unselect_rows(); | ||
103 | init_cols(); | ||
104 | |||
105 | setPinOutput(B0); | ||
106 | setPinOutput(D5); | ||
107 | writePinHigh(B0); | ||
108 | writePinHigh(D5); | ||
109 | |||
110 | // initialize matrix state: all keys off | ||
111 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
112 | matrix[i] = 0; | ||
113 | matrix_debouncing[i] = 0; | ||
114 | } | ||
115 | |||
116 | is_master = has_usb(); | ||
117 | |||
118 | matrix_init_quantum(); | ||
119 | } | ||
120 | |||
121 | uint8_t _matrix_scan(void) | ||
122 | { | ||
123 | // Right hand is stored after the left in the matirx so, we need to offset it | ||
124 | int offset = isLeftHand ? 0 : (ROWS_PER_HAND); | ||
125 | |||
126 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { | ||
127 | select_row(i); | ||
128 | _delay_us(30); // without this wait read unstable value. | ||
129 | matrix_row_t cols = read_cols(); | ||
130 | if (matrix_debouncing[i+offset] != cols) { | ||
131 | matrix_debouncing[i+offset] = cols; | ||
132 | debouncing = DEBOUNCE; | ||
133 | } | ||
134 | unselect_rows(); | ||
135 | } | ||
136 | |||
137 | if (debouncing) { | ||
138 | if (--debouncing) { | ||
139 | _delay_ms(1); | ||
140 | } else { | ||
141 | for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { | ||
142 | matrix[i+offset] = matrix_debouncing[i+offset]; | ||
143 | } | ||
144 | } | ||
145 | } | ||
146 | |||
147 | return 1; | ||
148 | } | ||
149 | |||
150 | #ifdef USE_MATRIX_I2C | ||
151 | |||
152 | // Get rows from other half over i2c | ||
153 | int i2c_transaction(void) { | ||
154 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
155 | |||
156 | int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); | ||
157 | if (err) goto i2c_error; | ||
158 | |||
159 | // start of matrix stored at 0x00 | ||
160 | err = i2c_master_write(0x00); | ||
161 | if (err) goto i2c_error; | ||
162 | |||
163 | // Start read | ||
164 | err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); | ||
165 | if (err) goto i2c_error; | ||
166 | |||
167 | if (!err) { | ||
168 | int i; | ||
169 | for (i = 0; i < ROWS_PER_HAND-1; ++i) { | ||
170 | matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); | ||
171 | } | ||
172 | matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); | ||
173 | i2c_master_stop(); | ||
174 | } else { | ||
175 | i2c_error: // the cable is disconnceted, or something else went wrong | ||
176 | i2c_reset_state(); | ||
177 | return err; | ||
178 | } | ||
179 | |||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | #else // USE_SERIAL | ||
184 | |||
185 | int serial_transaction(int master_changed) { | ||
186 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
187 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
188 | int ret=serial_update_buffers(master_changed); | ||
189 | #else | ||
190 | int ret=serial_update_buffers(); | ||
191 | #endif | ||
192 | if (ret ) { | ||
193 | if(ret==2) writePinLow(B0); | ||
194 | return 1; | ||
195 | } | ||
196 | writePinHigh(B0); | ||
197 | memcpy(&matrix[slaveOffset], | ||
198 | (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); | ||
199 | return 0; | ||
200 | } | ||
201 | #endif | ||
202 | |||
203 | uint8_t matrix_scan(void) | ||
204 | { | ||
205 | if (is_master) { | ||
206 | matrix_master_scan(); | ||
207 | }else{ | ||
208 | matrix_slave_scan(); | ||
209 | int offset = (isLeftHand) ? ROWS_PER_HAND : 0; | ||
210 | memcpy(&matrix[offset], | ||
211 | (void *)serial_master_buffer, sizeof(serial_master_buffer)); | ||
212 | matrix_scan_quantum(); | ||
213 | } | ||
214 | return 1; | ||
215 | } | ||
216 | |||
217 | |||
218 | uint8_t matrix_master_scan(void) { | ||
219 | |||
220 | int ret = _matrix_scan(); | ||
221 | int mchanged = 1; | ||
222 | int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; | ||
223 | |||
224 | #ifdef USE_MATRIX_I2C | ||
225 | // for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
226 | /* i2c_slave_buffer[i] = matrix[offset+i]; */ | ||
227 | // i2c_slave_buffer[i] = matrix[offset+i]; | ||
228 | // } | ||
229 | #else // USE_SERIAL | ||
230 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
231 | mchanged = memcmp((void *)serial_master_buffer, | ||
232 | &matrix[offset], sizeof(serial_master_buffer)); | ||
233 | #endif | ||
234 | memcpy((void *)serial_master_buffer, | ||
235 | &matrix[offset], sizeof(serial_master_buffer)); | ||
236 | #endif | ||
237 | |||
238 | #ifdef USE_MATRIX_I2C | ||
239 | if( i2c_transaction() ) { | ||
240 | #else // USE_SERIAL | ||
241 | if( serial_transaction(mchanged) ) { | ||
242 | #endif | ||
243 | // turn on the indicator led when halves are disconnected | ||
244 | writePinLow(D5); | ||
245 | |||
246 | error_count++; | ||
247 | |||
248 | if (error_count > ERROR_DISCONNECT_COUNT) { | ||
249 | // reset other half if disconnected | ||
250 | int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; | ||
251 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
252 | matrix[slaveOffset+i] = 0; | ||
253 | } | ||
254 | } | ||
255 | } else { | ||
256 | // turn off the indicator led on no error | ||
257 | writePinHigh(D5); | ||
258 | error_count = 0; | ||
259 | } | ||
260 | matrix_scan_quantum(); | ||
261 | return ret; | ||
262 | } | ||
263 | |||
264 | void matrix_slave_scan(void) { | ||
265 | _matrix_scan(); | ||
266 | |||
267 | int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; | ||
268 | |||
269 | #ifdef USE_MATRIX_I2C | ||
270 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
271 | /* i2c_slave_buffer[i] = matrix[offset+i]; */ | ||
272 | i2c_slave_buffer[i] = matrix[offset+i]; | ||
273 | } | ||
274 | #else // USE_SERIAL | ||
275 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
276 | int change = 0; | ||
277 | #endif | ||
278 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | ||
279 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
280 | if( serial_slave_buffer[i] != matrix[offset+i] ) | ||
281 | change = 1; | ||
282 | #endif | ||
283 | serial_slave_buffer[i] = matrix[offset+i]; | ||
284 | } | ||
285 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
286 | slave_buffer_change_count += change; | ||
287 | #endif | ||
288 | #endif | ||
289 | } | ||
290 | |||
291 | bool matrix_is_modified(void) | ||
292 | { | ||
293 | if (debouncing) return false; | ||
294 | return true; | ||
295 | } | ||
296 | |||
297 | inline | ||
298 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
299 | { | ||
300 | return (matrix[row] & ((matrix_row_t)1<<col)); | ||
301 | } | ||
302 | |||
303 | inline | ||
304 | matrix_row_t matrix_get_row(uint8_t row) | ||
305 | { | ||
306 | return matrix[row]; | ||
307 | } | ||
308 | |||
309 | void matrix_print(void) | ||
310 | { | ||
311 | print("\nr/c 0123456789ABCDEF\n"); | ||
312 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
313 | phex(row); print(": "); | ||
314 | pbin_reverse16(matrix_get_row(row)); | ||
315 | print("\n"); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | uint8_t matrix_key_count(void) | ||
320 | { | ||
321 | uint8_t count = 0; | ||
322 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
323 | count += bitpop16(matrix[i]); | ||
324 | } | ||
325 | return count; | ||
326 | } | ||
327 | |||
328 | static void init_cols(void) | ||
329 | { | ||
330 | for(int x = 0; x < MATRIX_COLS; x++) { | ||
331 | _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); | ||
332 | _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); | ||
333 | } | ||
334 | } | ||
335 | |||
336 | static matrix_row_t read_cols(void) | ||
337 | { | ||
338 | matrix_row_t result = 0; | ||
339 | for(int x = 0; x < MATRIX_COLS; x++) { | ||
340 | result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); | ||
341 | } | ||
342 | return result; | ||
343 | } | ||
344 | |||
345 | static void unselect_rows(void) | ||
346 | { | ||
347 | for(int x = 0; x < ROWS_PER_HAND; x++) { | ||
348 | _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); | ||
349 | _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); | ||
350 | } | ||
351 | } | ||
352 | |||
353 | static void select_row(uint8_t row) | ||
354 | { | ||
355 | _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); | ||
356 | _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); | ||
357 | } | ||
diff --git a/keyboards/zinc/reva/reva.c b/keyboards/zinc/reva/reva.c index 2ce08a07c..a9c2cfdba 100644 --- a/keyboards/zinc/reva/reva.c +++ b/keyboards/zinc/reva/reva.c | |||
@@ -3,4 +3,3 @@ | |||
3 | void matrix_init_kb(void) { | 3 | void matrix_init_kb(void) { |
4 | matrix_init_user(); | 4 | matrix_init_user(); |
5 | }; | 5 | }; |
6 | |||
diff --git a/keyboards/zinc/reva/reva.h b/keyboards/zinc/reva/reva.h index aa1c408b0..1bf2c565a 100644 --- a/keyboards/zinc/reva/reva.h +++ b/keyboards/zinc/reva/reva.h | |||
@@ -1,22 +1,7 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include "../zinc.h" | ||
4 | |||
5 | #include "quantum.h" | 3 | #include "quantum.h" |
6 | 4 | ||
7 | #ifdef RGBLIGHT_ENABLE | ||
8 | //rgb led driver | ||
9 | #include "ws2812.h" | ||
10 | #endif | ||
11 | |||
12 | #ifdef USE_I2C | ||
13 | #include <stddef.h> | ||
14 | #ifdef __AVR__ | ||
15 | #include <avr/io.h> | ||
16 | #include <avr/interrupt.h> | ||
17 | #endif | ||
18 | #endif | ||
19 | |||
20 | // Standard Keymap | 5 | // Standard Keymap |
21 | // (TRRS jack on both halves are to the left side) | 6 | // (TRRS jack on both halves are to the left side) |
22 | #define LAYOUT( \ | 7 | #define LAYOUT( \ |
diff --git a/keyboards/zinc/reva/rules.mk b/keyboards/zinc/reva/rules.mk index 3ea61267a..83895bdcb 100644 --- a/keyboards/zinc/reva/rules.mk +++ b/keyboards/zinc/reva/rules.mk | |||
@@ -1,4 +1 @@ | |||
1 | SRC += reva/matrix.c | SPLIT_KEYBOARD = yes \ No newline at end of file | |
2 | SRC += reva/split_util.c | ||
3 | SRC += reva/split_scomm.c | ||
4 | SRC += ws2812.c | ||
diff --git a/keyboards/zinc/reva/serial_config.h b/keyboards/zinc/reva/serial_config.h deleted file mode 100644 index 9fb5dfc67..000000000 --- a/keyboards/zinc/reva/serial_config.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef SOFT_SERIAL_CONFIG_H | ||
2 | #define SOFT_SERIAL_CONFIG_H | ||
3 | |||
4 | #ifndef SOFT_SERIAL_PIN | ||
5 | /* Soft Serial defines */ | ||
6 | #define SOFT_SERIAL_PIN D2 | ||
7 | // OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 | ||
8 | // // 1: about 137kbps (default) | ||
9 | // // 2: about 75kbps | ||
10 | // // 3: about 39kbps | ||
11 | // // 4: about 26kbps | ||
12 | // // 5: about 20kbps | ||
13 | #endif | ||
14 | |||
15 | //// USE flexible API (using multi-type transaction function) | ||
16 | #define SERIAL_USE_MULTI_TRANSACTION | ||
17 | |||
18 | #endif /* SOFT_SERIAL_CONFIG_H */ | ||
diff --git a/keyboards/zinc/reva/serial_config_simpleapi.h b/keyboards/zinc/reva/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e..000000000 --- a/keyboards/zinc/reva/serial_config_simpleapi.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef SERIAL_CONFIG_SIMPLEAPI_H | ||
2 | #define SERIAL_CONFIG_SIMPLEAPI_H | ||
3 | |||
4 | #undef SERIAL_USE_MULTI_TRANSACTION | ||
5 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
6 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
7 | |||
8 | #endif // SERIAL_CONFIG_SIMPLEAPI_H | ||
diff --git a/keyboards/zinc/reva/split_scomm.c b/keyboards/zinc/reva/split_scomm.c deleted file mode 100644 index 50d233ce9..000000000 --- a/keyboards/zinc/reva/split_scomm.c +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | #ifdef USE_SERIAL | ||
2 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
3 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
4 | |||
5 | #include <stdbool.h> | ||
6 | #include <stdint.h> | ||
7 | #include <stddef.h> | ||
8 | #include <split_scomm.h> | ||
9 | #include "serial.h" | ||
10 | #ifdef SERIAL_DEBUG_MODE | ||
11 | #include <avr/io.h> | ||
12 | #endif | ||
13 | #ifdef CONSOLE_ENABLE | ||
14 | #include <print.h> | ||
15 | #endif | ||
16 | |||
17 | uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; | ||
18 | uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; | ||
19 | uint8_t volatile status_com = 0; | ||
20 | uint8_t volatile status1 = 0; | ||
21 | uint8_t slave_buffer_change_count = 0; | ||
22 | uint8_t s_change_old = 0xff; | ||
23 | uint8_t s_change_new = 0xff; | ||
24 | |||
25 | SSTD_t transactions[] = { | ||
26 | #define GET_SLAVE_STATUS 0 | ||
27 | /* master buffer not changed, only recive slave_buffer_change_count */ | ||
28 | { (uint8_t *)&status_com, | ||
29 | 0, NULL, | ||
30 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
31 | }, | ||
32 | #define PUT_MASTER_GET_SLAVE_STATUS 1 | ||
33 | /* master buffer changed need send, and recive slave_buffer_change_count */ | ||
34 | { (uint8_t *)&status_com, | ||
35 | sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, | ||
36 | sizeof(slave_buffer_change_count), &slave_buffer_change_count, | ||
37 | }, | ||
38 | #define GET_SLAVE_BUFFER 2 | ||
39 | /* recive serial_slave_buffer */ | ||
40 | { (uint8_t *)&status1, | ||
41 | 0, NULL, | ||
42 | sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer | ||
43 | } | ||
44 | }; | ||
45 | |||
46 | void serial_master_init(void) | ||
47 | { | ||
48 | soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); | ||
49 | } | ||
50 | |||
51 | void serial_slave_init(void) | ||
52 | { | ||
53 | soft_serial_target_init(transactions, TID_LIMIT(transactions)); | ||
54 | } | ||
55 | |||
56 | // 0 => no error | ||
57 | // 1 => slave did not respond | ||
58 | // 2 => checksum error | ||
59 | int serial_update_buffers(int master_update) | ||
60 | { | ||
61 | int status, smatstatus; | ||
62 | static int need_retry = 0; | ||
63 | |||
64 | if( s_change_old != s_change_new ) { | ||
65 | smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); | ||
66 | if( smatstatus == TRANSACTION_END ) { | ||
67 | s_change_old = s_change_new; | ||
68 | #ifdef CONSOLE_ENABLE | ||
69 | uprintf("slave matrix = %b %b %b %b %b\n", | ||
70 | serial_slave_buffer[0], serial_slave_buffer[1], | ||
71 | serial_slave_buffer[2], serial_slave_buffer[3], | ||
72 | serial_slave_buffer[4] ); | ||
73 | #endif | ||
74 | } | ||
75 | } else { | ||
76 | // serial_slave_buffer dosen't change | ||
77 | smatstatus = TRANSACTION_END; // dummy status | ||
78 | } | ||
79 | |||
80 | if( !master_update && !need_retry) { | ||
81 | status = soft_serial_transaction(GET_SLAVE_STATUS); | ||
82 | } else { | ||
83 | status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); | ||
84 | } | ||
85 | if( status == TRANSACTION_END ) { | ||
86 | s_change_new = slave_buffer_change_count; | ||
87 | need_retry = 0; | ||
88 | } else { | ||
89 | need_retry = 1; | ||
90 | } | ||
91 | return smatstatus; | ||
92 | } | ||
93 | |||
94 | #endif // SERIAL_USE_MULTI_TRANSACTION | ||
95 | #endif /* USE_SERIAL */ | ||
diff --git a/keyboards/zinc/reva/split_scomm.h b/keyboards/zinc/reva/split_scomm.h deleted file mode 100644 index 873d8939d..000000000 --- a/keyboards/zinc/reva/split_scomm.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef SPLIT_COMM_H | ||
2 | #define SPLIT_COMM_H | ||
3 | |||
4 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
5 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ | ||
6 | #include "serial.h" | ||
7 | |||
8 | #else | ||
9 | /* --- USE flexible API (using multi-type transaction function) --- */ | ||
10 | // Buffers for master - slave communication | ||
11 | #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
12 | #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 | ||
13 | |||
14 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
15 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
16 | extern uint8_t slave_buffer_change_count; | ||
17 | |||
18 | void serial_master_init(void); | ||
19 | void serial_slave_init(void); | ||
20 | int serial_update_buffers(int master_changed); | ||
21 | |||
22 | #endif | ||
23 | |||
24 | #endif /* SPLIT_COMM_H */ | ||
diff --git a/keyboards/zinc/reva/split_util.c b/keyboards/zinc/reva/split_util.c deleted file mode 100644 index e1ff8b437..000000000 --- a/keyboards/zinc/reva/split_util.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | #include <avr/io.h> | ||
2 | #include <avr/wdt.h> | ||
3 | #include <avr/power.h> | ||
4 | #include <avr/interrupt.h> | ||
5 | #include <util/delay.h> | ||
6 | #include <avr/eeprom.h> | ||
7 | #include "split_util.h" | ||
8 | #include "matrix.h" | ||
9 | #include "keyboard.h" | ||
10 | |||
11 | #ifdef USE_MATRIX_I2C | ||
12 | # include "i2c.h" | ||
13 | #else | ||
14 | # include "split_scomm.h" | ||
15 | #endif | ||
16 | |||
17 | volatile bool isLeftHand = true; | ||
18 | |||
19 | static void setup_handedness(void) { | ||
20 | #ifdef EE_HANDS | ||
21 | isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); | ||
22 | #else | ||
23 | // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c | ||
24 | #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) | ||
25 | isLeftHand = !has_usb(); | ||
26 | #else | ||
27 | isLeftHand = has_usb(); | ||
28 | #endif | ||
29 | #endif | ||
30 | } | ||
31 | |||
32 | static void keyboard_master_setup(void) { | ||
33 | |||
34 | #ifdef USE_MATRIX_I2C | ||
35 | i2c_master_init(); | ||
36 | #else | ||
37 | serial_master_init(); | ||
38 | #endif | ||
39 | } | ||
40 | |||
41 | static void keyboard_slave_setup(void) { | ||
42 | |||
43 | #ifdef USE_MATRIX_I2C | ||
44 | i2c_slave_init(SLAVE_I2C_ADDRESS); | ||
45 | #else | ||
46 | serial_slave_init(); | ||
47 | #endif | ||
48 | } | ||
49 | |||
50 | bool has_usb(void) { | ||
51 | USBCON |= (1 << OTGPADE); //enables VBUS pad | ||
52 | _delay_us(5); | ||
53 | return (USBSTA & (1<<VBUS)); //checks state of VBUS | ||
54 | } | ||
55 | |||
56 | void split_keyboard_setup(void) { | ||
57 | setup_handedness(); | ||
58 | |||
59 | if (has_usb()) { | ||
60 | keyboard_master_setup(); | ||
61 | } else { | ||
62 | keyboard_slave_setup(); | ||
63 | } | ||
64 | sei(); | ||
65 | } | ||
66 | |||
67 | // this code runs before the usb and keyboard is initialized | ||
68 | void matrix_setup(void) { | ||
69 | split_keyboard_setup(); | ||
70 | } | ||
diff --git a/keyboards/zinc/reva/split_util.h b/keyboards/zinc/reva/split_util.h deleted file mode 100644 index 687ca19bd..000000000 --- a/keyboards/zinc/reva/split_util.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef SPLIT_KEYBOARD_UTIL_H | ||
2 | #define SPLIT_KEYBOARD_UTIL_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include "eeconfig.h" | ||
6 | |||
7 | #define SLAVE_I2C_ADDRESS 0x32 | ||
8 | |||
9 | extern volatile bool isLeftHand; | ||
10 | |||
11 | // slave version of matix scan, defined in matrix.c | ||
12 | void matrix_slave_scan(void); | ||
13 | |||
14 | void split_keyboard_setup(void); | ||
15 | bool has_usb(void); | ||
16 | |||
17 | void matrix_master_OLED_init (void); | ||
18 | |||
19 | #endif | ||
diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 63a8cc8fc..36e717d60 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk | |||
@@ -27,12 +27,8 @@ AUDIO_ENABLE = no # Audio output on port C6 | |||
27 | UNICODE_ENABLE = no # Unicode | 27 | UNICODE_ENABLE = no # Unicode |
28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
30 | SUBPROJECT_rev1 = no | ||
31 | USE_I2C = yes | ||
32 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
33 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 30 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
34 | 31 | ||
35 | CUSTOM_MATRIX = yes | ||
36 | 32 | ||
37 | DEFAULT_FOLDER = zinc/rev1 | 33 | DEFAULT_FOLDER = zinc/rev1 |
38 | 34 | ||
diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c deleted file mode 100644 index f6293c3dc..000000000 --- a/keyboards/zinc/serial.c +++ /dev/null | |||
@@ -1,589 +0,0 @@ | |||
1 | /* | ||
2 | * WARNING: be careful changing this code, it is very timing dependent | ||
3 | * | ||
4 | * 2018-10-28 checked | ||
5 | * avr-gcc 4.9.2 | ||
6 | * avr-gcc 5.4.0 | ||
7 | * avr-gcc 7.3.0 | ||
8 | */ | ||
9 | |||
10 | #ifndef F_CPU | ||
11 | #define F_CPU 16000000 | ||
12 | #endif | ||
13 | |||
14 | #include <avr/io.h> | ||
15 | #include <avr/interrupt.h> | ||
16 | #include <util/delay.h> | ||
17 | #include <stddef.h> | ||
18 | #include <stdbool.h> | ||
19 | #include "serial.h" | ||
20 | |||
21 | #ifdef SOFT_SERIAL_PIN | ||
22 | |||
23 | #ifdef __AVR_ATmega32U4__ | ||
24 | // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. | ||
25 | #ifdef USE_I2C | ||
26 | #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 | ||
27 | #error Using ATmega32U4 I2C, so can not use PD0, PD1 | ||
28 | #endif | ||
29 | #endif | ||
30 | |||
31 | #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 | ||
32 | #define SERIAL_PIN_DDR DDRD | ||
33 | #define SERIAL_PIN_PORT PORTD | ||
34 | #define SERIAL_PIN_INPUT PIND | ||
35 | #if SOFT_SERIAL_PIN == D0 | ||
36 | #define SERIAL_PIN_MASK _BV(PD0) | ||
37 | #define EIMSK_BIT _BV(INT0) | ||
38 | #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) | ||
39 | #define SERIAL_PIN_INTERRUPT INT0_vect | ||
40 | #elif SOFT_SERIAL_PIN == D1 | ||
41 | #define SERIAL_PIN_MASK _BV(PD1) | ||
42 | #define EIMSK_BIT _BV(INT1) | ||
43 | #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) | ||
44 | #define SERIAL_PIN_INTERRUPT INT1_vect | ||
45 | #elif SOFT_SERIAL_PIN == D2 | ||
46 | #define SERIAL_PIN_MASK _BV(PD2) | ||
47 | #define EIMSK_BIT _BV(INT2) | ||
48 | #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) | ||
49 | #define SERIAL_PIN_INTERRUPT INT2_vect | ||
50 | #elif SOFT_SERIAL_PIN == D3 | ||
51 | #define SERIAL_PIN_MASK _BV(PD3) | ||
52 | #define EIMSK_BIT _BV(INT3) | ||
53 | #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) | ||
54 | #define SERIAL_PIN_INTERRUPT INT3_vect | ||
55 | #endif | ||
56 | #elif SOFT_SERIAL_PIN == E6 | ||
57 | #define SERIAL_PIN_DDR DDRE | ||
58 | #define SERIAL_PIN_PORT PORTE | ||
59 | #define SERIAL_PIN_INPUT PINE | ||
60 | #define SERIAL_PIN_MASK _BV(PE6) | ||
61 | #define EIMSK_BIT _BV(INT6) | ||
62 | #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) | ||
63 | #define SERIAL_PIN_INTERRUPT INT6_vect | ||
64 | #else | ||
65 | #error invalid SOFT_SERIAL_PIN value | ||
66 | #endif | ||
67 | |||
68 | #else | ||
69 | #error serial.c now support ATmega32U4 only | ||
70 | #endif | ||
71 | |||
72 | //////////////// for backward compatibility //////////////////////////////// | ||
73 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
74 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ | ||
75 | #if SERIAL_SLAVE_BUFFER_LENGTH > 0 | ||
76 | uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; | ||
77 | #endif | ||
78 | #if SERIAL_MASTER_BUFFER_LENGTH > 0 | ||
79 | uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; | ||
80 | #endif | ||
81 | uint8_t volatile status0 = 0; | ||
82 | |||
83 | SSTD_t transactions[] = { | ||
84 | { (uint8_t *)&status0, | ||
85 | #if SERIAL_MASTER_BUFFER_LENGTH > 0 | ||
86 | sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, | ||
87 | #else | ||
88 | 0, (uint8_t *)NULL, | ||
89 | #endif | ||
90 | #if SERIAL_SLAVE_BUFFER_LENGTH > 0 | ||
91 | sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer | ||
92 | #else | ||
93 | 0, (uint8_t *)NULL, | ||
94 | #endif | ||
95 | } | ||
96 | }; | ||
97 | |||
98 | void serial_master_init(void) | ||
99 | { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } | ||
100 | |||
101 | void serial_slave_init(void) | ||
102 | { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } | ||
103 | |||
104 | // 0 => no error | ||
105 | // 1 => slave did not respond | ||
106 | // 2 => checksum error | ||
107 | int serial_update_buffers() | ||
108 | { | ||
109 | int result; | ||
110 | result = soft_serial_transaction(); | ||
111 | return result; | ||
112 | } | ||
113 | |||
114 | #endif // end of Simple API (OLD API, compatible with let's split serial.c) | ||
115 | //////////////////////////////////////////////////////////////////////////// | ||
116 | |||
117 | #define ALWAYS_INLINE __attribute__((always_inline)) | ||
118 | #define NO_INLINE __attribute__((noinline)) | ||
119 | #define _delay_sub_us(x) __builtin_avr_delay_cycles(x) | ||
120 | |||
121 | // parity check | ||
122 | #define ODD_PARITY 1 | ||
123 | #define EVEN_PARITY 0 | ||
124 | #define PARITY EVEN_PARITY | ||
125 | |||
126 | #ifdef SERIAL_DELAY | ||
127 | // custom setup in config.h | ||
128 | // #define TID_SEND_ADJUST 2 | ||
129 | // #define SERIAL_DELAY 6 // micro sec | ||
130 | // #define READ_WRITE_START_ADJUST 30 // cycles | ||
131 | // #define READ_WRITE_WIDTH_ADJUST 8 // cycles | ||
132 | #else | ||
133 | // ============ Standard setups ============ | ||
134 | |||
135 | #ifndef SELECT_SOFT_SERIAL_SPEED | ||
136 | #define SELECT_SOFT_SERIAL_SPEED 1 | ||
137 | // 0: about 189kbps | ||
138 | // 1: about 137kbps (default) | ||
139 | // 2: about 75kbps | ||
140 | // 3: about 39kbps | ||
141 | // 4: about 26kbps | ||
142 | // 5: about 20kbps | ||
143 | #endif | ||
144 | |||
145 | #if __GNUC__ < 6 | ||
146 | #define TID_SEND_ADJUST 14 | ||
147 | #else | ||
148 | #define TID_SEND_ADJUST 2 | ||
149 | #endif | ||
150 | |||
151 | #if SELECT_SOFT_SERIAL_SPEED == 0 | ||
152 | // Very High speed | ||
153 | #define SERIAL_DELAY 4 // micro sec | ||
154 | #if __GNUC__ < 6 | ||
155 | #define READ_WRITE_START_ADJUST 33 // cycles | ||
156 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
157 | #else | ||
158 | #define READ_WRITE_START_ADJUST 34 // cycles | ||
159 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
160 | #endif | ||
161 | #elif SELECT_SOFT_SERIAL_SPEED == 1 | ||
162 | // High speed | ||
163 | #define SERIAL_DELAY 6 // micro sec | ||
164 | #if __GNUC__ < 6 | ||
165 | #define READ_WRITE_START_ADJUST 30 // cycles | ||
166 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
167 | #else | ||
168 | #define READ_WRITE_START_ADJUST 33 // cycles | ||
169 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
170 | #endif | ||
171 | #elif SELECT_SOFT_SERIAL_SPEED == 2 | ||
172 | // Middle speed | ||
173 | #define SERIAL_DELAY 12 // micro sec | ||
174 | #define READ_WRITE_START_ADJUST 30 // cycles | ||
175 | #if __GNUC__ < 6 | ||
176 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
177 | #else | ||
178 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
179 | #endif | ||
180 | #elif SELECT_SOFT_SERIAL_SPEED == 3 | ||
181 | // Low speed | ||
182 | #define SERIAL_DELAY 24 // micro sec | ||
183 | #define READ_WRITE_START_ADJUST 30 // cycles | ||
184 | #if __GNUC__ < 6 | ||
185 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
186 | #else | ||
187 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
188 | #endif | ||
189 | #elif SELECT_SOFT_SERIAL_SPEED == 4 | ||
190 | // Very Low speed | ||
191 | #define SERIAL_DELAY 36 // micro sec | ||
192 | #define READ_WRITE_START_ADJUST 30 // cycles | ||
193 | #if __GNUC__ < 6 | ||
194 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
195 | #else | ||
196 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
197 | #endif | ||
198 | #elif SELECT_SOFT_SERIAL_SPEED == 5 | ||
199 | // Ultra Low speed | ||
200 | #define SERIAL_DELAY 48 // micro sec | ||
201 | #define READ_WRITE_START_ADJUST 30 // cycles | ||
202 | #if __GNUC__ < 6 | ||
203 | #define READ_WRITE_WIDTH_ADJUST 3 // cycles | ||
204 | #else | ||
205 | #define READ_WRITE_WIDTH_ADJUST 7 // cycles | ||
206 | #endif | ||
207 | #else | ||
208 | #error invalid SELECT_SOFT_SERIAL_SPEED value | ||
209 | #endif /* SELECT_SOFT_SERIAL_SPEED */ | ||
210 | #endif /* SERIAL_DELAY */ | ||
211 | |||
212 | #define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) | ||
213 | #define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) | ||
214 | |||
215 | #define SLAVE_INT_WIDTH_US 1 | ||
216 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
217 | #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY | ||
218 | #else | ||
219 | #define SLAVE_INT_ACK_WIDTH_UNIT 2 | ||
220 | #define SLAVE_INT_ACK_WIDTH 4 | ||
221 | #endif | ||
222 | |||
223 | static SSTD_t *Transaction_table = NULL; | ||
224 | static uint8_t Transaction_table_size = 0; | ||
225 | |||
226 | inline static void serial_delay(void) ALWAYS_INLINE; | ||
227 | inline static | ||
228 | void serial_delay(void) { | ||
229 | _delay_us(SERIAL_DELAY); | ||
230 | } | ||
231 | |||
232 | inline static void serial_delay_half1(void) ALWAYS_INLINE; | ||
233 | inline static | ||
234 | void serial_delay_half1(void) { | ||
235 | _delay_us(SERIAL_DELAY_HALF1); | ||
236 | } | ||
237 | |||
238 | inline static void serial_delay_half2(void) ALWAYS_INLINE; | ||
239 | inline static | ||
240 | void serial_delay_half2(void) { | ||
241 | _delay_us(SERIAL_DELAY_HALF2); | ||
242 | } | ||
243 | |||
244 | inline static void serial_output(void) ALWAYS_INLINE; | ||
245 | inline static | ||
246 | void serial_output(void) { | ||
247 | SERIAL_PIN_DDR |= SERIAL_PIN_MASK; | ||
248 | } | ||
249 | |||
250 | // make the serial pin an input with pull-up resistor | ||
251 | inline static void serial_input_with_pullup(void) ALWAYS_INLINE; | ||
252 | inline static | ||
253 | void serial_input_with_pullup(void) { | ||
254 | SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; | ||
255 | SERIAL_PIN_PORT |= SERIAL_PIN_MASK; | ||
256 | } | ||
257 | |||
258 | inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; | ||
259 | inline static | ||
260 | uint8_t serial_read_pin(void) { | ||
261 | return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); | ||
262 | } | ||
263 | |||
264 | inline static void serial_low(void) ALWAYS_INLINE; | ||
265 | inline static | ||
266 | void serial_low(void) { | ||
267 | SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; | ||
268 | } | ||
269 | |||
270 | inline static void serial_high(void) ALWAYS_INLINE; | ||
271 | inline static | ||
272 | void serial_high(void) { | ||
273 | SERIAL_PIN_PORT |= SERIAL_PIN_MASK; | ||
274 | } | ||
275 | |||
276 | void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) | ||
277 | { | ||
278 | Transaction_table = sstd_table; | ||
279 | Transaction_table_size = (uint8_t)sstd_table_size; | ||
280 | serial_output(); | ||
281 | serial_high(); | ||
282 | } | ||
283 | |||
284 | void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) | ||
285 | { | ||
286 | Transaction_table = sstd_table; | ||
287 | Transaction_table_size = (uint8_t)sstd_table_size; | ||
288 | serial_input_with_pullup(); | ||
289 | |||
290 | // Enable INT0-INT3,INT6 | ||
291 | EIMSK |= EIMSK_BIT; | ||
292 | #if SERIAL_PIN_MASK == _BV(PE6) | ||
293 | // Trigger on falling edge of INT6 | ||
294 | EICRB &= EICRx_BIT; | ||
295 | #else | ||
296 | // Trigger on falling edge of INT0-INT3 | ||
297 | EICRA &= EICRx_BIT; | ||
298 | #endif | ||
299 | } | ||
300 | |||
301 | // Used by the sender to synchronize timing with the reciver. | ||
302 | static void sync_recv(void) NO_INLINE; | ||
303 | static | ||
304 | void sync_recv(void) { | ||
305 | for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { | ||
306 | } | ||
307 | // This shouldn't hang if the target disconnects because the | ||
308 | // serial line will float to high if the target does disconnect. | ||
309 | while (!serial_read_pin()); | ||
310 | } | ||
311 | |||
312 | // Used by the reciver to send a synchronization signal to the sender. | ||
313 | static void sync_send(void) NO_INLINE; | ||
314 | static | ||
315 | void sync_send(void) { | ||
316 | serial_low(); | ||
317 | serial_delay(); | ||
318 | serial_high(); | ||
319 | } | ||
320 | |||
321 | // Reads a byte from the serial line | ||
322 | static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; | ||
323 | static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { | ||
324 | uint8_t byte, i, p, pb; | ||
325 | |||
326 | _delay_sub_us(READ_WRITE_START_ADJUST); | ||
327 | for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { | ||
328 | serial_delay_half1(); // read the middle of pulses | ||
329 | if( serial_read_pin() ) { | ||
330 | byte = (byte << 1) | 1; p ^= 1; | ||
331 | } else { | ||
332 | byte = (byte << 1) | 0; p ^= 0; | ||
333 | } | ||
334 | _delay_sub_us(READ_WRITE_WIDTH_ADJUST); | ||
335 | serial_delay_half2(); | ||
336 | } | ||
337 | /* recive parity bit */ | ||
338 | serial_delay_half1(); // read the middle of pulses | ||
339 | pb = serial_read_pin(); | ||
340 | _delay_sub_us(READ_WRITE_WIDTH_ADJUST); | ||
341 | serial_delay_half2(); | ||
342 | |||
343 | *pterrcount += (p != pb)? 1 : 0; | ||
344 | |||
345 | return byte; | ||
346 | } | ||
347 | |||
348 | // Sends a byte with MSB ordering | ||
349 | void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; | ||
350 | void serial_write_chunk(uint8_t data, uint8_t bit) { | ||
351 | uint8_t b, p; | ||
352 | for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { | ||
353 | if(data & b) { | ||
354 | serial_high(); p ^= 1; | ||
355 | } else { | ||
356 | serial_low(); p ^= 0; | ||
357 | } | ||
358 | serial_delay(); | ||
359 | } | ||
360 | /* send parity bit */ | ||
361 | if(p & 1) { serial_high(); } | ||
362 | else { serial_low(); } | ||
363 | serial_delay(); | ||
364 | |||
365 | serial_low(); // sync_send() / senc_recv() need raise edge | ||
366 | } | ||
367 | |||
368 | static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; | ||
369 | static | ||
370 | void serial_send_packet(uint8_t *buffer, uint8_t size) { | ||
371 | for (uint8_t i = 0; i < size; ++i) { | ||
372 | uint8_t data; | ||
373 | data = buffer[i]; | ||
374 | sync_send(); | ||
375 | serial_write_chunk(data,8); | ||
376 | } | ||
377 | } | ||
378 | |||
379 | static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; | ||
380 | static | ||
381 | uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { | ||
382 | uint8_t pecount = 0; | ||
383 | for (uint8_t i = 0; i < size; ++i) { | ||
384 | uint8_t data; | ||
385 | sync_recv(); | ||
386 | data = serial_read_chunk(&pecount, 8); | ||
387 | buffer[i] = data; | ||
388 | } | ||
389 | return pecount == 0; | ||
390 | } | ||
391 | |||
392 | inline static | ||
393 | void change_sender2reciver(void) { | ||
394 | sync_send(); //0 | ||
395 | serial_delay_half1(); //1 | ||
396 | serial_low(); //2 | ||
397 | serial_input_with_pullup(); //2 | ||
398 | serial_delay_half1(); //3 | ||
399 | } | ||
400 | |||
401 | inline static | ||
402 | void change_reciver2sender(void) { | ||
403 | sync_recv(); //0 | ||
404 | serial_delay(); //1 | ||
405 | serial_low(); //3 | ||
406 | serial_output(); //3 | ||
407 | serial_delay_half1(); //4 | ||
408 | } | ||
409 | |||
410 | static inline uint8_t nibble_bits_count(uint8_t bits) | ||
411 | { | ||
412 | bits = (bits & 0x5) + (bits >> 1 & 0x5); | ||
413 | bits = (bits & 0x3) + (bits >> 2 & 0x3); | ||
414 | return bits; | ||
415 | } | ||
416 | |||
417 | // interrupt handle to be used by the target device | ||
418 | ISR(SERIAL_PIN_INTERRUPT) { | ||
419 | |||
420 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
421 | serial_low(); | ||
422 | serial_output(); | ||
423 | SSTD_t *trans = Transaction_table; | ||
424 | #else | ||
425 | // recive transaction table index | ||
426 | uint8_t tid, bits; | ||
427 | uint8_t pecount = 0; | ||
428 | sync_recv(); | ||
429 | bits = serial_read_chunk(&pecount,7); | ||
430 | tid = bits>>3; | ||
431 | bits = (bits&7) != nibble_bits_count(tid); | ||
432 | if( bits || pecount> 0 || tid > Transaction_table_size ) { | ||
433 | return; | ||
434 | } | ||
435 | serial_delay_half1(); | ||
436 | |||
437 | serial_high(); // response step1 low->high | ||
438 | serial_output(); | ||
439 | _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); | ||
440 | SSTD_t *trans = &Transaction_table[tid]; | ||
441 | serial_low(); // response step2 ack high->low | ||
442 | #endif | ||
443 | |||
444 | // target send phase | ||
445 | if( trans->target2initiator_buffer_size > 0 ) | ||
446 | serial_send_packet((uint8_t *)trans->target2initiator_buffer, | ||
447 | trans->target2initiator_buffer_size); | ||
448 | // target switch to input | ||
449 | change_sender2reciver(); | ||
450 | |||
451 | // target recive phase | ||
452 | if( trans->initiator2target_buffer_size > 0 ) { | ||
453 | if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, | ||
454 | trans->initiator2target_buffer_size) ) { | ||
455 | *trans->status = TRANSACTION_ACCEPTED; | ||
456 | } else { | ||
457 | *trans->status = TRANSACTION_DATA_ERROR; | ||
458 | } | ||
459 | } else { | ||
460 | *trans->status = TRANSACTION_ACCEPTED; | ||
461 | } | ||
462 | |||
463 | sync_recv(); //weit initiator output to high | ||
464 | } | ||
465 | |||
466 | ///////// | ||
467 | // start transaction by initiator | ||
468 | // | ||
469 | // int soft_serial_transaction(int sstd_index) | ||
470 | // | ||
471 | // Returns: | ||
472 | // TRANSACTION_END | ||
473 | // TRANSACTION_NO_RESPONSE | ||
474 | // TRANSACTION_DATA_ERROR | ||
475 | // this code is very time dependent, so we need to disable interrupts | ||
476 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
477 | int soft_serial_transaction(void) { | ||
478 | SSTD_t *trans = Transaction_table; | ||
479 | #else | ||
480 | int soft_serial_transaction(int sstd_index) { | ||
481 | if( sstd_index > Transaction_table_size ) | ||
482 | return TRANSACTION_TYPE_ERROR; | ||
483 | SSTD_t *trans = &Transaction_table[sstd_index]; | ||
484 | #endif | ||
485 | cli(); | ||
486 | |||
487 | // signal to the target that we want to start a transaction | ||
488 | serial_output(); | ||
489 | serial_low(); | ||
490 | _delay_us(SLAVE_INT_WIDTH_US); | ||
491 | |||
492 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
493 | // wait for the target response | ||
494 | serial_input_with_pullup(); | ||
495 | _delay_us(SLAVE_INT_RESPONSE_TIME); | ||
496 | |||
497 | // check if the target is present | ||
498 | if (serial_read_pin()) { | ||
499 | // target failed to pull the line low, assume not present | ||
500 | serial_output(); | ||
501 | serial_high(); | ||
502 | *trans->status = TRANSACTION_NO_RESPONSE; | ||
503 | sei(); | ||
504 | return TRANSACTION_NO_RESPONSE; | ||
505 | } | ||
506 | |||
507 | #else | ||
508 | // send transaction table index | ||
509 | int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); | ||
510 | sync_send(); | ||
511 | _delay_sub_us(TID_SEND_ADJUST); | ||
512 | serial_write_chunk(tid, 7); | ||
513 | serial_delay_half1(); | ||
514 | |||
515 | // wait for the target response (step1 low->high) | ||
516 | serial_input_with_pullup(); | ||
517 | while( !serial_read_pin() ) { | ||
518 | _delay_sub_us(2); | ||
519 | } | ||
520 | |||
521 | // check if the target is present (step2 high->low) | ||
522 | for( int i = 0; serial_read_pin(); i++ ) { | ||
523 | if (i > SLAVE_INT_ACK_WIDTH + 1) { | ||
524 | // slave failed to pull the line low, assume not present | ||
525 | serial_output(); | ||
526 | serial_high(); | ||
527 | *trans->status = TRANSACTION_NO_RESPONSE; | ||
528 | sei(); | ||
529 | return TRANSACTION_NO_RESPONSE; | ||
530 | } | ||
531 | _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); | ||
532 | } | ||
533 | #endif | ||
534 | |||
535 | // initiator recive phase | ||
536 | // if the target is present syncronize with it | ||
537 | if( trans->target2initiator_buffer_size > 0 ) { | ||
538 | if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, | ||
539 | trans->target2initiator_buffer_size) ) { | ||
540 | serial_output(); | ||
541 | serial_high(); | ||
542 | *trans->status = TRANSACTION_DATA_ERROR; | ||
543 | sei(); | ||
544 | return TRANSACTION_DATA_ERROR; | ||
545 | } | ||
546 | } | ||
547 | |||
548 | // initiator switch to output | ||
549 | change_reciver2sender(); | ||
550 | |||
551 | // initiator send phase | ||
552 | if( trans->initiator2target_buffer_size > 0 ) { | ||
553 | serial_send_packet((uint8_t *)trans->initiator2target_buffer, | ||
554 | trans->initiator2target_buffer_size); | ||
555 | } | ||
556 | |||
557 | // always, release the line when not in use | ||
558 | sync_send(); | ||
559 | |||
560 | *trans->status = TRANSACTION_END; | ||
561 | sei(); | ||
562 | return TRANSACTION_END; | ||
563 | } | ||
564 | |||
565 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
566 | int soft_serial_get_and_clean_status(int sstd_index) { | ||
567 | SSTD_t *trans = &Transaction_table[sstd_index]; | ||
568 | cli(); | ||
569 | int retval = *trans->status; | ||
570 | *trans->status = 0;; | ||
571 | sei(); | ||
572 | return retval; | ||
573 | } | ||
574 | #endif | ||
575 | |||
576 | #endif | ||
577 | |||
578 | // Helix serial.c history | ||
579 | // 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) | ||
580 | // 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) | ||
581 | // (adjusted with avr-gcc 4.9.2) | ||
582 | // 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) | ||
583 | // (adjusted with avr-gcc 4.9.2) | ||
584 | // 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) | ||
585 | // (adjusted with avr-gcc 4.9.2) | ||
586 | // 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) | ||
587 | // (adjusted with avr-gcc 7.3.0) | ||
588 | // 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) | ||
589 | // (adjusted with avr-gcc 5.4.0, 7.3.0) | ||
diff --git a/keyboards/zinc/serial.h b/keyboards/zinc/serial.h deleted file mode 100644 index 7e0c0847a..000000000 --- a/keyboards/zinc/serial.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | #ifndef SOFT_SERIAL_H | ||
2 | #define SOFT_SERIAL_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | |||
6 | // ///////////////////////////////////////////////////////////////// | ||
7 | // Need Soft Serial defines in config.h | ||
8 | // ///////////////////////////////////////////////////////////////// | ||
9 | // ex. | ||
10 | // #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||
11 | // OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 | ||
12 | // // 1: about 137kbps (default) | ||
13 | // // 2: about 75kbps | ||
14 | // // 3: about 39kbps | ||
15 | // // 4: about 26kbps | ||
16 | // // 5: about 20kbps | ||
17 | // | ||
18 | // //// USE Simple API (OLD API, compatible with let's split serial.c) | ||
19 | // ex. | ||
20 | // #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
21 | // #define SERIAL_MASTER_BUFFER_LENGTH 1 | ||
22 | // | ||
23 | // //// USE flexible API (using multi-type transaction function) | ||
24 | // #define SERIAL_USE_MULTI_TRANSACTION | ||
25 | // | ||
26 | // ///////////////////////////////////////////////////////////////// | ||
27 | |||
28 | |||
29 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
30 | /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ | ||
31 | #if SERIAL_SLAVE_BUFFER_LENGTH > 0 | ||
32 | extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||
33 | #endif | ||
34 | #if SERIAL_MASTER_BUFFER_LENGTH > 0 | ||
35 | extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; | ||
36 | #endif | ||
37 | |||
38 | void serial_master_init(void); | ||
39 | void serial_slave_init(void); | ||
40 | int serial_update_buffers(void); | ||
41 | |||
42 | #endif // USE Simple API | ||
43 | |||
44 | // Soft Serial Transaction Descriptor | ||
45 | typedef struct _SSTD_t { | ||
46 | uint8_t *status; | ||
47 | uint8_t initiator2target_buffer_size; | ||
48 | uint8_t *initiator2target_buffer; | ||
49 | uint8_t target2initiator_buffer_size; | ||
50 | uint8_t *target2initiator_buffer; | ||
51 | } SSTD_t; | ||
52 | #define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) | ||
53 | |||
54 | // initiator is transaction start side | ||
55 | void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); | ||
56 | // target is interrupt accept side | ||
57 | void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); | ||
58 | |||
59 | // initiator resullt | ||
60 | #define TRANSACTION_END 0 | ||
61 | #define TRANSACTION_NO_RESPONSE 0x1 | ||
62 | #define TRANSACTION_DATA_ERROR 0x2 | ||
63 | #define TRANSACTION_TYPE_ERROR 0x4 | ||
64 | #ifndef SERIAL_USE_MULTI_TRANSACTION | ||
65 | int soft_serial_transaction(void); | ||
66 | #else | ||
67 | int soft_serial_transaction(int sstd_index); | ||
68 | #endif | ||
69 | |||
70 | // target status | ||
71 | // *SSTD_t.status has | ||
72 | // initiator: | ||
73 | // TRANSACTION_END | ||
74 | // or TRANSACTION_NO_RESPONSE | ||
75 | // or TRANSACTION_DATA_ERROR | ||
76 | // target: | ||
77 | // TRANSACTION_DATA_ERROR | ||
78 | // or TRANSACTION_ACCEPTED | ||
79 | #define TRANSACTION_ACCEPTED 0x8 | ||
80 | #ifdef SERIAL_USE_MULTI_TRANSACTION | ||
81 | int soft_serial_get_and_clean_status(int sstd_index); | ||
82 | #endif | ||
83 | |||
84 | #endif /* SOFT_SERIAL_H */ | ||
diff --git a/keyboards/zinc/zinc.h b/keyboards/zinc/zinc.h index 87d889da0..dedc9253b 100644 --- a/keyboards/zinc/zinc.h +++ b/keyboards/zinc/zinc.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef ZINC_H | 1 | #pragma once |
2 | #define ZINC_H | ||
3 | 2 | ||
4 | #ifdef KEYBOARD_zinc_reva | 3 | #ifdef KEYBOARD_zinc_reva |
5 | #include "reva.h" | 4 | #include "reva.h" |
@@ -8,7 +7,4 @@ | |||
8 | #include "rev1.h" | 7 | #include "rev1.h" |
9 | #endif | 8 | #endif |
10 | 9 | ||
11 | |||
12 | #include "quantum.h" | 10 | #include "quantum.h" |
13 | |||
14 | #endif | ||