diff options
Diffstat (limited to 'keyboards')
2302 files changed, 13669 insertions, 10555 deletions
diff --git a/keyboards/0_sixty/config.h b/keyboards/0_sixty/config.h index 9d9394c14f..04241b3454 100644 --- a/keyboards/0_sixty/config.h +++ b/keyboards/0_sixty/config.h @@ -33,7 +33,6 @@ #define MATRIX_COLS 12 #define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/0xc7/61key/config.h b/keyboards/0xc7/61key/config.h index 11b01ad8b6..6eeb183379 100644 --- a/keyboards/0xc7/61key/config.h +++ b/keyboards/0xc7/61key/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/0xcb/static/config.h b/keyboards/0xcb/static/config.h index 9c3a0c6649..784baadc2c 100644 --- a/keyboards/0xcb/static/config.h +++ b/keyboards/0xcb/static/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D6, D7, B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, D4, C0, C1, C2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/10bleoledhub/config.h b/keyboards/10bleoledhub/config.h index 867589a27c..86d5b59348 100644 --- a/keyboards/10bleoledhub/config.h +++ b/keyboards/10bleoledhub/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/ #define MATRIX_COLS 3 #define MATRIX_ROW_PINS { F0, F5, F4, F6 } #define MATRIX_COL_PINS { D6, D7, B5 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/1k/keymaps/tap_dance/config.h b/keyboards/1k/keymaps/tap_dance/config.h index 5df7869537..bd0163e447 100644 --- a/keyboards/1k/keymaps/tap_dance/config.h +++ b/keyboards/1k/keymaps/tap_dance/config.h @@ -4,3 +4,4 @@ #pragma once #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 2396e9083b..62d28fd6c9 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index 256af396e5..db8da3f6f5 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index 00cff570b1..02959ddafa 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index fd11e13fe1..1a9344cbac 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D1, D0, F4, F5 } #define MATRIX_COL_PINS \ { D4, C6, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/super16v2/config.h b/keyboards/1upkeyboards/super16v2/config.h index 9832c28bef..cea3c4edb6 100644 --- a/keyboards/1upkeyboards/super16v2/config.h +++ b/keyboards/1upkeyboards/super16v2/config.h @@ -42,7 +42,6 @@ #define ENCODERS_PAD_A { B1, B3 } #define ENCODERS_PAD_B { B2, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/config.h b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/config.h index c835440076..161b46c814 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/config.h +++ b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/config.h @@ -3,6 +3,7 @@ /* tap dance stuff*/ #undef TAPPING_TERM #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD #define TAPPING_TOGGLE 2 @@ -12,4 +13,4 @@ #define EXAMPLESTRING4 "tapdance_4" #undef RGBLED_NUM -#define RGBLED_NUM 16
\ No newline at end of file +#define RGBLED_NUM 16 diff --git a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c index 6b7b36cbb2..eeca552657 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c @@ -196,7 +196,7 @@ void matrix_scan_user(void) { } } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _TAPLAND: rgblight_setrgb(0, 16, 0); //green break; diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 4020f4fdc0..97ce1ae28a 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D1, D0, D4, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h index d344b0750d..9bbe1bec80 100644 --- a/keyboards/1upkeyboards/sweet16/v2/promicro/config.h +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, D1, E6, B5 } #define MATRIX_COL_PINS { F7, F6, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h index 286af1857f..92572523d2 100644 --- a/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h +++ b/keyboards/1upkeyboards/sweet16/v2/proton_c/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B7, B2, B0 } #define MATRIX_COL_PINS { B8, A0, A10, A9 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/25keys/aleth42/rev0/config.h b/keyboards/25keys/aleth42/rev0/config.h index 8424b2edc3..21071f8ca8 100644 --- a/keyboards/25keys/aleth42/rev0/config.h +++ b/keyboards/25keys/aleth42/rev0/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, C2, C4, C5, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/25keys/aleth42/rev1/config.h b/keyboards/25keys/aleth42/rev1/config.h index 38c74c6bf1..0cf444bee4 100644 --- a/keyboards/25keys/aleth42/rev1/config.h +++ b/keyboards/25keys/aleth42/rev1/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B0, B2, B1 } #define MATRIX_COL_PINS { D5, D3, D2, D1, D0, D6, D4, F7, F0, F1, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/25keys/cassette42/config.h b/keyboards/25keys/cassette42/config.h index 71621695f4..44c17ea85a 100644 --- a/keyboards/25keys/cassette42/config.h +++ b/keyboards/25keys/cassette42/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 6 #define DIRECT_PINS {{ B4, F6, F5, F4, B5, F7 }} -#define UNUSED_PINS #define ENCODERS_PAD_A { B6, B3 } #define ENCODERS_PAD_B { B2, B1 } diff --git a/keyboards/2key2crawl/config.h b/keyboards/2key2crawl/config.h index f6fc6f8c1e..4a0d7eb013 100644 --- a/keyboards/2key2crawl/config.h +++ b/keyboards/2key2crawl/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C4, C5 } #define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7, B2 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D0 } diff --git a/keyboards/30wer/config.h b/keyboards/30wer/config.h index 65a54cba4a..3dcd4d0302 100644 --- a/keyboards/30wer/config.h +++ b/keyboards/30wer/config.h @@ -9,7 +9,6 @@ /* pcb default pin-out */ #define MATRIX_ROW_PINS { E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1, D0, D4, C6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/3keyecosystem/2key2/config.h b/keyboards/3keyecosystem/2key2/config.h index 80e864ce9d..5ccd3f1cd5 100644 --- a/keyboards/3keyecosystem/2key2/config.h +++ b/keyboards/3keyecosystem/2key2/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F6 } #define MATRIX_COL_PINS { F4, D7 } -#define UNUSED_PINS // LED on kbmount base board is on B7 #define LED_CAPS_LOCK_PIN B7 // onboard LED for testing diff --git a/keyboards/3w6/rev1/config.h b/keyboards/3w6/rev1/config.h index 0c14dc72d3..2ec430b4e2 100644 --- a/keyboards/3w6/rev1/config.h +++ b/keyboards/3w6/rev1/config.h @@ -44,11 +44,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS_L { B0, B1, B2, B4} #define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 } -#define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } #define MATRIX_ROW_PINS_R { P10, P11, P12, P05 } #define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 } -#define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 } /* COL2ROW, ROW2COL */ diff --git a/keyboards/3w6/rev2/config.h b/keyboards/3w6/rev2/config.h index 4101aa76cd..df68436ff1 100644 --- a/keyboards/3w6/rev2/config.h +++ b/keyboards/3w6/rev2/config.h @@ -44,11 +44,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS_L { B0, B1, B2, B4} #define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 } -#define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } #define MATRIX_ROW_PINS_R { P10, P11, P12, P05 } #define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 } -#define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 } /* COL2ROW, ROW2COL */ diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index c753f7c29f..9027cdac5f 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -44,7 +44,6 @@ */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/4pack/config.h b/keyboards/40percentclub/4pack/config.h index 943b918d56..67a21d3c97 100644 --- a/keyboards/40percentclub/4pack/config.h +++ b/keyboards/40percentclub/4pack/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { E6, D7, C6, D4 } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index 44628ac741..4744d61dbf 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -20,7 +20,6 @@ */ #define MATRIX_ROW_PINS { B2, D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index 460f5ba93d..60a5122830 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -20,7 +20,6 @@ */ #define MATRIX_ROW_PINS { B2, D1, D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 302decc162..c886eb48da 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -45,7 +45,6 @@ */ #define MATRIX_ROW_PINS { D7, E6 } #define MATRIX_COL_PINS { F6, F7, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index afc50acb7e..d507a2c445 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -45,7 +45,6 @@ */ #define MATRIX_ROW_PINS { D7, E6, B4 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h index e7062990cb..db81033f9b 100644 --- a/keyboards/40percentclub/gherkin/config.h +++ b/keyboards/40percentclub/gherkin/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c index 950b6e86b9..32c074c88f 100644 --- a/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/itsaferbie/keymap.c @@ -105,7 +105,7 @@ void matrix_scan_user(void) { #ifdef RGBLIGHT_ENABLE static uint8_t old_layer = 255; - uint8_t new_layer = biton32(layer_state); + uint8_t new_layer = get_highest_layer(layer_state); // Color of the Icons. if (old_layer != new_layer) { diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h index c708babf16..d837be8ba1 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/config.h @@ -39,8 +39,6 @@ // how long before oneshot times out #define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - #define QMK_KEYS_PER_SCAN 4 - // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. #define COMBO_TERM 200 diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index 2ed218199f..f47788ce87 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c index 2eef3dc48b..bd467482fe 100644 --- a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c @@ -128,10 +128,10 @@ void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) layer_off(_RAISE); break; case 3: - if (biton32(default_layer_state) == _DVORAK) { + if (get_highest_layer(default_layer_state) == _DVORAK) { set_single_persistent_default_layer(_QWERTY); } - else if (biton32(default_layer_state) == _QWERTY) { + else if (get_highest_layer(default_layer_state) == _QWERTY) { set_single_persistent_default_layer(_DVORAK); } break; diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h index d4cd997736..971f626cc8 100644 --- a/keyboards/40percentclub/i75/promicro/config.h +++ b/keyboards/40percentclub/i75/promicro/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B4, E6, D7, C6, D4, D0, D1, D2, D3 } #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/i75/teensy2/config.h b/keyboards/40percentclub/i75/teensy2/config.h index bcf9b1b888..77ef177f0d 100644 --- a/keyboards/40percentclub/i75/teensy2/config.h +++ b/keyboards/40percentclub/i75/teensy2/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, B7, B3, B2, B1, B0 } #define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 3924841b04..9ea825e7d7 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 404cd6f7d3..6853462585 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk index 5ac2ce5ccb..3d056cb71b 100644 --- a/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk @@ -1,6 +1,5 @@ BACKLIGHT_DRIVER = custom NKRO_ENABLE = yes -TERMINAL_ENABLE = yes DYNAMIC_MACRO_ENABLE = yes # Use RAM (fake EEPROM, transient) instead of real EEPROM diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h index bc5de30f2f..caaafa67c6 100644 --- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h @@ -33,7 +33,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #undef MATRIX_ROW_PINS #undef MATRIX_COL_PINS -#undef UNUSED_PINS #define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } -#define UNUSED_PINS {B5} diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h index 7d789cff04..e71f91a030 100644 --- a/keyboards/40percentclub/nano/config.h +++ b/keyboards/40percentclub/nano/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F4, F5, F6, F7 }, \ { D1, D0, D4, C6 }, \ } -#define UNUSED_PINS /* ws2812 RGB LED */ #define RGB_DI_PIN D3 diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index 53c227d832..48f7f949fb 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -28,7 +28,6 @@ { F7, B1, B3 }, \ { B2, B6, B5 } \ } -#define UNUSED_PINS /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index bf0507716f..01d4f9b537 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D3, D2, D1, D0 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/polyandry/promicro/config.h b/keyboards/40percentclub/polyandry/promicro/config.h index e6f8643c44..f1bd8adc76 100644 --- a/keyboards/40percentclub/polyandry/promicro/config.h +++ b/keyboards/40percentclub/polyandry/promicro/config.h @@ -28,7 +28,6 @@ */ #define MATRIX_ROW_PINS { D7 } #define MATRIX_COL_PINS { D1, D0, D4, C6, E6, B4, F4, F5, F6, F7, B3, B2 } -#define UNUSED_PINS /* doesn't really matter lol */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/polyandry/teensy2/config.h b/keyboards/40percentclub/polyandry/teensy2/config.h index d730ce6f94..6d6ba19489 100644 --- a/keyboards/40percentclub/polyandry/teensy2/config.h +++ b/keyboards/40percentclub/polyandry/teensy2/config.h @@ -30,7 +30,6 @@ #define MATRIX_ROW_PINS { D3 } #define MATRIX_COL_PINS { B7, D0, D1, D2, C6, C7, F6, F7, B6, B5, D7, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/sixpack/config.h b/keyboards/40percentclub/sixpack/config.h index 4ddad2efb7..9a03bc7974 100644 --- a/keyboards/40percentclub/sixpack/config.h +++ b/keyboards/40percentclub/sixpack/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D4, C6, D7 }, \ { E6, B4, B5 } \ } -#define UNUSED_PINS { D1, D0, C4, C5, B1, B2, B3 } // TX, RX, SDA, SCL, PB1, PB2, PB3 on expansion connector /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h index b6534622ea..a29f22834e 100644 --- a/keyboards/40percentclub/tomato/config.h +++ b/keyboards/40percentclub/tomato/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index 3724e4b2d5..04742e93e0 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/45_ats/config.h b/keyboards/45_ats/config.h index 8177f89038..762abd0fce 100644 --- a/keyboards/45_ats/config.h +++ b/keyboards/45_ats/config.h @@ -30,7 +30,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D5, D7, D6 } #define MATRIX_COL_PINS { E6, B0, B1, B2, B3, B7, F6, F5, F4, C7, F7, C6, B6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/4by3/config.h b/keyboards/4by3/config.h index 27ad7441cc..be28796d1f 100644 --- a/keyboards/4by3/config.h +++ b/keyboards/4by3/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/9key/config.h b/keyboards/9key/config.h index 622ccc7ae9..dc1eef180e 100644 --- a/keyboards/9key/config.h +++ b/keyboards/9key/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 9Key PCB default pin-out */ #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { F4, F5, F6 } -#define UNUSED_PINS /* ws2812 RGB LED */ #define RGB_DI_PIN F7 diff --git a/keyboards/a_dux/config.h b/keyboards/a_dux/config.h index 4e9258667c..ffda0a301c 100644 --- a/keyboards/a_dux/config.h +++ b/keyboards/a_dux/config.h @@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index a539eeabc2..814f0b59f7 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, D7, B3, E6, B2, B4, B6, B5} -#define UNUSED_PINS {B0} #define DIP_SWITCH_PINS { D0 } diff --git a/keyboards/abatskeyboardclub/nayeon/config.h b/keyboards/abatskeyboardclub/nayeon/config.h index 4af821539d..cb591b8e24 100644 --- a/keyboards/abatskeyboardclub/nayeon/config.h +++ b/keyboards/abatskeyboardclub/nayeon/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B3, B7, D6, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D4, D5, B0, B1, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 060229abb2..1febf490e7 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, C7 } #define MATRIX_COL_PINS { F0, B6, B5 } -#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/acekeyboard/titan60/config.h b/keyboards/acekeyboard/titan60/config.h index f348a12cf4..0daf1a90cd 100644 --- a/keyboards/acekeyboard/titan60/config.h +++ b/keyboards/acekeyboard/titan60/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D #define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } #define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/acheron/elongate/beta/config.h b/keyboards/acheron/elongate/beta/config.h index 874183362c..d03d886a55 100644 --- a/keyboards/acheron/elongate/beta/config.h +++ b/keyboards/acheron/elongate/beta/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, B7, D5, B5, D6 } #define MATRIX_COL_PINS { F5, F6, F4, F1, F0, B2, B1, C6, B0, B3, E6, D4, B4} -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/acheron/shark/alpha/config.h b/keyboards/acheron/shark/alpha/config.h index 493d267b51..e98bae4510 100644 --- a/keyboards/acheron/shark/alpha/config.h +++ b/keyboards/acheron/shark/alpha/config.h @@ -52,7 +52,6 @@ EncA (B6) because it is not used in the default PCB All Extra pins (A8, B15, B14, B13, B3, B5, B8, B9) , for the same reason; B0, which is unconnected on the PCB */ -//#define UNUSED_PINS { B0, B6, B13, B14, B15, B8, B9, B5, B3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ada/infinity81/config.h b/keyboards/ada/infinity81/config.h index 173f2685d7..e4cfa2c34e 100644 --- a/keyboards/ada/infinity81/config.h +++ b/keyboards/ada/infinity81/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, F6, B7 } #define MATRIX_COL_PINS { D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F5, F1, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/adafruit/macropad/config.h b/keyboards/adafruit/macropad/config.h new file mode 100644 index 0000000000..1e055e273b --- /dev/null +++ b/keyboards/adafruit/macropad/config.h @@ -0,0 +1,137 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 3 + +#define VENDOR_ID 0x239A +#define PRODUCT_ID 0x0108 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Adafruit +#define PRODUCT Macropad RP2040 + +/* Keyboard Matrix Assignments */ +// clang-format off +#define DIRECT_PINS { \ + { NO_PIN, NO_PIN, GP0 }, \ + { GP1, GP2, GP3 }, \ + { GP4, GP5, GP6 }, \ + { GP7, GP8, GP9 }, \ + { GP10, GP11, GP12 } \ +} +// clang-format on + +/* OLED SPI Defines */ +#define OLED_DISPLAY_128X64 +#define OLED_IC OLED_IC_SH1106 + +/* OLED SPI Pins */ +#define OLED_DC_PIN GP24 +#define OLED_CS_PIN GP22 +#define OLED_RST_PIN GP23 + +/* Shift OLED columns by 2 pixels */ +#define OLED_COLUMN_OFFSET 2 + +/* Divisor for OLED */ +#define OLED_SPI_DIVISOR 4 + +/* ChibiOS SPI definitions */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN GP26 +#define SPI_MOSI_PIN GP27 +#define SPI_MISO_PIN GP28 + +/* Encoders */ +#define ENCODERS_PAD_A { GP18 } +#define ENCODERS_PAD_B { GP17 } + +#define DEBOUNCE 5 + +/* Bootmagic lite */ +/* (Press the key bellow the encoder button while plugging the keyboard to enter the bootloader and clear flash) */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 2 + +/* Double tap the side button to enter bootloader */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +/* Audio (Unsupported for now)*/ +// #define AUDIO_PIN GP16 +// #define SPEAKER_SHUTDOWN GP14 + +#ifdef RGB_MATRIX_ENABLE + + /* RGB Defines */ +# define RGB_DI_PIN GP19 +# define DRIVER_LED_TOTAL 12 +# define RGBLED_NUM 12 + + /* Enable Framebuffer and keypress effects */ +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_KEYPRESSES + +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/adafruit/macropad/halconf.h b/keyboards/adafruit/macropad/halconf.h new file mode 100644 index 0000000000..6cd66fd520 --- /dev/null +++ b/keyboards/adafruit/macropad/halconf.h @@ -0,0 +1,28 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <halconf.h> + +#undef HAL_USE_SPI +#define HAL_USE_SPI TRUE + +#undef SPI_USE_WAIT +#define SPI_USE_WAIT TRUE + +#undef SPI_SELECT_MODE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD diff --git a/keyboards/adafruit/macropad/info.json b/keyboards/adafruit/macropad/info.json new file mode 100644 index 0000000000..ffa31780a9 --- /dev/null +++ b/keyboards/adafruit/macropad/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Adafruit Macropad RP2040", + "url": "https://learn.adafruit.com/adafruit-macropad-rp2040", + "maintainer": "Jpe230", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Mute", "x":2, "y":0}, + {"label":"Enter", "x":0, "y":1}, + {"label":"KC_0", "x":1, "y":1}, + {"label":"BackSpace", "x":2, "y":1}, + {"label":"KC_7", "x":0, "y":2}, + {"label":"KC_8", "x":1, "y":2}, + {"label":"KC_9", "x":2, "y":2}, + {"label":"KC_4", "x":0, "y":3}, + {"label":"KC_5", "x":1, "y":3}, + {"label":"KC_6", "x":2, "y":3}, + {"label":"KC_1", "x":0, "y":4}, + {"label":"KC_2", "x":1, "y":4}, + {"label":"KC_3", "x":2, "y":4} + ] + } + } +} diff --git a/keyboards/adafruit/macropad/keymaps/default/keymap.c b/keyboards/adafruit/macropad/keymaps/default/keymap.c new file mode 100644 index 0000000000..34989ea0b6 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/default/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, + KC_ENT, KC_0, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3 + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +}; +#endif + + +#ifdef OLED_ENABLE +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x7e, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0x7e, 0x7f, 0x3f, 0x1f, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(qmk_logo, sizeof(qmk_logo)); +} + +bool oled_task_user(void) { + render_qmk_logo(); + return true; +} + +#endif + diff --git a/keyboards/adafruit/macropad/keymaps/default/rules.mk b/keyboards/adafruit/macropad/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/adafruit/macropad/keymaps/via/keymap.c b/keyboards/adafruit/macropad/keymaps/via/keymap.c new file mode 100644 index 0000000000..6ef3d3e29d --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/via/keymap.c @@ -0,0 +1,138 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, + KC_ENT, KC_0, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3 + ), + [1] = LAYOUT( + _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [2] = LAYOUT( + _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT( + _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(_______, _______) }, + [2] = { ENCODER_CCW_CW(_______, _______) }, + [3] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif + + +#ifdef OLED_ENABLE +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x7e, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0x7e, 0x7f, 0x3f, 0x1f, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(qmk_logo, sizeof(qmk_logo)); +} + +bool oled_task_user(void) { + render_qmk_logo(); + return true; +} + +#endif + diff --git a/keyboards/adafruit/macropad/keymaps/via/rules.mk b/keyboards/adafruit/macropad/keymaps/via/rules.mk new file mode 100644 index 0000000000..715838ecc5 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/adafruit/macropad/lib/oled_driver_spi.h b/keyboards/adafruit/macropad/lib/oled_driver_spi.h new file mode 100644 index 0000000000..c8a2cd7d9a --- /dev/null +++ b/keyboards/adafruit/macropad/lib/oled_driver_spi.h @@ -0,0 +1,29 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifndef OLED_DC_PIN +# error "The OLED driver in SPI needs a D/C pin defined" +#endif +#ifndef OLED_CS_PIN +# error "The OLED driver in SPI needs a CS pin defined" +#endif +#ifndef OLED_SPI_MODE +# define OLED_SPI_MODE 3 +#endif +#ifndef OLED_SPI_DIVISOR +# define OLED_SPI_DIVISOR 2 +#endif diff --git a/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c b/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c new file mode 100644 index 0000000000..dc1289fdb1 --- /dev/null +++ b/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c @@ -0,0 +1,827 @@ +/* +Copyright 2019 Ryan Caltabiano <https://github.com/XScorpion2> +Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include "oled_driver.h" +#include "oled_driver_spi.h" + +#include "spi_master.h" + +#include <quantum.h> +#include OLED_FONT_H +#include "timer.h" +#include "print.h" + +#include <string.h> + +#include "progmem.h" + +#include "keyboard.h" + +// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf +// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf + +// Fundamental Commands +#define CONTRAST 0x81 +#define DISPLAY_ALL_ON 0xA5 +#define DISPLAY_ALL_ON_RESUME 0xA4 +#define NORMAL_DISPLAY 0xA6 +#define INVERT_DISPLAY 0xA7 +#define DISPLAY_ON 0xAF +#define DISPLAY_OFF 0xAE +#define NOP 0xE3 + +// Scrolling Commands +#define ACTIVATE_SCROLL 0x2F +#define DEACTIVATE_SCROLL 0x2E +#define SCROLL_RIGHT 0x26 +#define SCROLL_LEFT 0x27 +#define SCROLL_RIGHT_UP 0x29 +#define SCROLL_LEFT_UP 0x2A + +// Addressing Setting Commands +#define MEMORY_MODE 0x20 +#define COLUMN_ADDR 0x21 +#define PAGE_ADDR 0x22 +#define PAM_SETCOLUMN_LSB 0x00 +#define PAM_SETCOLUMN_MSB 0x10 +#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 + +// Hardware Configuration Commands +#define DISPLAY_START_LINE 0x40 +#define SEGMENT_REMAP 0xA0 +#define SEGMENT_REMAP_INV 0xA1 +#define MULTIPLEX_RATIO 0xA8 +#define COM_SCAN_INC 0xC0 +#define COM_SCAN_DEC 0xC8 +#define DISPLAY_OFFSET 0xD3 +#define COM_PINS 0xDA +#define COM_PINS_SEQ 0x02 +#define COM_PINS_ALT 0x12 +#define COM_PINS_SEQ_LR 0x22 +#define COM_PINS_ALT_LR 0x32 + +// Timing & Driving Commands +#define DISPLAY_CLOCK 0xD5 +#define PRE_CHARGE_PERIOD 0xD9 +#define VCOM_DETECT 0xDB + +// Advance Graphic Commands +#define FADE_BLINK 0x23 +#define ENABLE_FADE 0x20 +#define ENABLE_BLINK 0x30 + +// Charge Pump Commands +#define CHARGE_PUMP 0x8D + +// Misc defines +#ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) +#endif +#ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#endif + +#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) + +#define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0]) + +// spi defines +#define OLED_STATUS_SUCCESS SPI_STATUS_SUCCESS + +void oled_spi_init(void) { + spi_init(); + + setPinOutput(OLED_CS_PIN); + writePinHigh(OLED_CS_PIN); + + setPinOutput(OLED_DC_PIN); + writePinLow(OLED_DC_PIN); +} + +void oled_spi_start(void) { + spi_start(OLED_CS_PIN, false, OLED_SPI_MODE, OLED_SPI_DIVISOR); +} + +void oled_spi_stop(void) { + spi_stop(); +} + +// Transmit/Write Funcs. +bool oled_cmd(const uint8_t *data, uint16_t size) { + oled_spi_start(); + // Command Mode + writePinLow(OLED_DC_PIN); + // Send the commands + if(spi_transmit(data, size) != OLED_STATUS_SUCCESS){ + oled_spi_stop(); + return false; + } + oled_spi_stop(); + return true; +} + +bool oled_cmd_p(const uint8_t *data, uint16_t size) { + return oled_cmd(data, size); +} + +bool oled_write_reg(const uint8_t *data, uint16_t size) +{ + oled_spi_start(); + // Command Mode + writePinHigh(OLED_DC_PIN); + // Send the commands + if(spi_transmit(data, size) != OLED_STATUS_SUCCESS){ + oled_spi_stop(); + return false; + } + oled_spi_stop(); + return true; +} + +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) + +// Display buffer's is the same as the OLED memory layout +// this is so we don't end up with rounding errors with +// parts of the display unusable or don't get cleared correctly +// and also allows for drawing & inverting +uint8_t oled_buffer[OLED_MATRIX_SIZE]; +uint8_t * oled_cursor; +OLED_BLOCK_TYPE oled_dirty = 0; +bool oled_initialized = false; +bool oled_active = false; +bool oled_scrolling = false; +bool oled_inverted = false; +uint8_t oled_brightness = OLED_BRIGHTNESS; +oled_rotation_t oled_rotation = 0; +uint8_t oled_rotation_width = 0; +uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values +uint8_t oled_scroll_start = 0; +uint8_t oled_scroll_end = 7; +#if OLED_TIMEOUT > 0 +uint32_t oled_timeout; +#endif +#if OLED_SCROLL_TIMEOUT > 0 +uint32_t oled_scroll_timeout; +#endif +#if OLED_UPDATE_INTERVAL > 0 +uint16_t oled_update_timeout; +#endif + +// Flips the rendering bits for a character at the current cursor position +static void InvertCharacter(uint8_t *cursor) { + const uint8_t *end = cursor + OLED_FONT_WIDTH; + while (cursor < end) { + *cursor = ~(*cursor); + cursor++; + } +} + +bool oled_init(oled_rotation_t rotation) { + oled_rotation = oled_init_user(oled_init_kb(rotation)); + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + oled_rotation_width = OLED_DISPLAY_WIDTH; + } else { + oled_rotation_width = OLED_DISPLAY_HEIGHT; + } + + oled_spi_init(); + +#ifdef OLED_RST_PIN + /* Reset device */ + setPinOutput(OLED_RST_PIN); + writePinLow(OLED_RST_PIN); + wait_ms(20); + writePinHigh(OLED_RST_PIN); + wait_ms(20); +#endif + + static const uint8_t PROGMEM display_setup1[] = { + DISPLAY_OFF, + DISPLAY_CLOCK, + 0x80, + MULTIPLEX_RATIO, + OLED_DISPLAY_HEIGHT - 1, + DISPLAY_OFFSET, + 0x00, + DISPLAY_START_LINE | 0x00, + CHARGE_PUMP, + 0x14, +#if (OLED_IC != OLED_IC_SH1106) + // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) + MEMORY_MODE, + 0x00, // Horizontal addressing mode +#endif + }; + + if (!oled_cmd_p(display_setup1, ARRAY_SIZE(display_setup1))) { + print("oled_init cmd set 1 failed\n"); + return false; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { + static const uint8_t PROGMEM display_normal[] = {SEGMENT_REMAP_INV, COM_SCAN_DEC}; + if (!oled_cmd_p(display_normal, ARRAY_SIZE(display_normal))) { + print("oled_init cmd normal rotation failed\n"); + return false; + } + } else { + static const uint8_t PROGMEM display_flipped[] = {SEGMENT_REMAP, COM_SCAN_INC}; + if (!oled_cmd_p(display_flipped, ARRAY_SIZE(display_flipped))) { + print("display_flipped failed\n"); + return false; + } + } + + static const uint8_t PROGMEM display_setup2[] = {COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; + if (!oled_cmd_p(display_setup2, ARRAY_SIZE(display_setup2))) { + print("display_setup2 failed\n"); + return false; + } + +#if OLED_TIMEOUT > 0 + oled_timeout = timer_read32() + OLED_TIMEOUT; +#endif +#if OLED_SCROLL_TIMEOUT > 0 + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; +#endif + + oled_clear(); + oled_initialized = true; + oled_active = true; + oled_scrolling = false; + return true; +} + +__attribute__((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return rotation; +} +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return rotation; +} + +void oled_clear(void) { + memset(oled_buffer, 0, sizeof(oled_buffer)); + oled_cursor = &oled_buffer[0]; + oled_dirty = OLED_ALL_BLOCKS_MASK; +} + +static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { + // Calculate commands to set memory addressing bounds. + uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; +#if (OLED_IC == OLED_IC_SH1106) + // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. + // Column value must be split into high and low nybble and sent as two commands. + cmd_array[0] = PAM_PAGE_ADDR | start_page; + cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); + cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); + cmd_array[3] = NOP; + cmd_array[4] = NOP; + cmd_array[5] = NOP; +#else + // Commands for use in Horizontal Addressing mode. + cmd_array[1] = start_column; + cmd_array[4] = start_page; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; +#endif +} + +static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) { + cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; + cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1]; + ; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; +} + +uint8_t crot(uint8_t a, int8_t n) { + const uint8_t mask = 0x7; + n &= mask; + return a << n | a >> (-n & mask); +} + +static void rotate_90(const uint8_t *src, uint8_t *dest) { + for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { + uint8_t selector = (1 << i); + for (uint8_t j = 0; j < 8; ++j) { + dest[i] |= crot(src[j] & selector, shift - (int8_t)j); + } + } +} + +void oled_render(void) { + if (!oled_initialized) { + return; + } + + // Do we have work to do? + oled_dirty &= OLED_ALL_BLOCKS_MASK; + if (!oled_dirty || oled_scrolling) { + return; + } + + // Find first dirty block + uint8_t update_start = 0; + while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { + ++update_start; + } + + // Set column & page position + static uint8_t display_start[] = {COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1}; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + calc_bounds(update_start, display_start); + } else { + calc_bounds_90(update_start, display_start); + } + + // Send column & page position + if (!oled_cmd(display_start, ARRAY_SIZE(display_start))) { + print("oled_render offset command failed\n"); + return; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + // Send render data chunk as is + if (!oled_write_reg(&oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE)) { + print("oled_render data failed\n"); + return; + } + } else { + // Rotate the render chunks + const static uint8_t source_map[] = OLED_SOURCE_MAP; + const static uint8_t target_map[] = OLED_TARGET_MAP; + + static uint8_t temp_buffer[OLED_BLOCK_SIZE]; + memset(temp_buffer, 0, sizeof(temp_buffer)); + for (uint8_t i = 0; i < sizeof(source_map); ++i) { + rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); + } + + // Send render data chunk after rotating + if (!oled_write_reg(temp_buffer, OLED_BLOCK_SIZE)) { + print("oled_render90 data failed\n"); + return; + } + } + + // Turn on display if it is off + oled_on(); + + // Clear dirty flag + oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); +} + +void oled_set_cursor(uint8_t col, uint8_t line) { + uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; + + // Out of bounds? + if (index >= OLED_MATRIX_SIZE) { + index = 0; + } + + oled_cursor = &oled_buffer[index]; +} + +void oled_advance_page(bool clearPageRemainder) { + uint16_t index = oled_cursor - &oled_buffer[0]; + uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); + + if (clearPageRemainder) { + // Remaining Char count + remaining = remaining / OLED_FONT_WIDTH; + + // Write empty character until next line + while (remaining--) + oled_write_char(' ', false); + } else { + // Next page index out of bounds? + if (index + remaining >= OLED_MATRIX_SIZE) { + index = 0; + remaining = 0; + } + + oled_cursor = &oled_buffer[index + remaining]; + } +} + +void oled_advance_char(void) { + uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; + uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); + + // Do we have enough space on the current line for the next character + if (remainingSpace < OLED_FONT_WIDTH) { + nextIndex += remainingSpace; + } + + // Did we go out of bounds + if (nextIndex >= OLED_MATRIX_SIZE) { + nextIndex = 0; + } + + // Update cursor position + oled_cursor = &oled_buffer[nextIndex]; +} + +// Main handler that writes character data to the display buffer +void oled_write_char(const char data, bool invert) { + // Advance to the next line if newline + if (data == '\n') { + // Old source wrote ' ' until end of line... + oled_advance_page(true); + return; + } + + if (data == '\r') { + oled_advance_page(false); + return; + } + + // copy the current render buffer to check for dirty after + static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; + memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); + + _Static_assert(sizeof(font) >= ((OLED_FONT_END + 1 - OLED_FONT_START) * OLED_FONT_WIDTH), "OLED_FONT_END references outside array"); + + // set the reder buffer data + uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index + if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { + memset(oled_cursor, 0x00, OLED_FONT_WIDTH); + } else { + const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; + memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); + } + + // Invert if needed + if (invert) { + InvertCharacter(oled_cursor); + } + + // Dirty check + if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { + uint16_t index = oled_cursor - &oled_buffer[0]; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); + // Edgecase check if the written data spans the 2 chunks + oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); + } + + // Finally move to the next char + oled_advance_char(); +} + +void oled_write(const char *data, bool invert) { + const char *end = data + strlen(data); + while (data < end) { + oled_write_char(*data, invert); + data++; + } +} + +void oled_write_ln(const char *data, bool invert) { + oled_write(data, invert); + oled_advance_page(true); +} + +void oled_pan(bool left) { + uint16_t i = 0; + for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) { + if (left) { + for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i + 1]; + } + } else { + for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i - 1]; + } + } + } + oled_dirty = OLED_ALL_BLOCKS_MASK; +} + +oled_buffer_reader_t oled_read_raw(uint16_t start_index) { + if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; + oled_buffer_reader_t ret_reader; + ret_reader.current_element = &oled_buffer[start_index]; + ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; + return ret_reader; +} + +void oled_write_raw_byte(const char data, uint16_t index) { + if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; + if (oled_buffer[index] == data) return; + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); +} + +void oled_write_raw(const char *data, uint16_t size) { + uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; + if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; + for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { + uint8_t c = *data++; + if (oled_buffer[i] == c) continue; + oled_buffer[i] = c; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); + } +} + +void oled_write_pixel(uint8_t x, uint8_t y, bool on) { + if (x >= oled_rotation_width) { + return; + } + uint16_t index = x + (y / 8) * oled_rotation_width; + if (index >= OLED_MATRIX_SIZE) { + return; + } + uint8_t data = oled_buffer[index]; + if (on) { + data |= (1 << (y % 8)); + } else { + data &= ~(1 << (y % 8)); + } + if (oled_buffer[index] != data) { + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); + } +} + +#if defined(__AVR__) +void oled_write_P(const char *data, bool invert) { + uint8_t c = pgm_read_byte(data); + while (c != 0) { + oled_write_char(c, invert); + c = pgm_read_byte(++data); + } +} + +void oled_write_ln_P(const char *data, bool invert) { + oled_write_P(data, invert); + oled_advance_page(true); +} + +void oled_write_raw_P(const char *data, uint16_t size) { + uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; + if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; + for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { + uint8_t c = pgm_read_byte(data++); + if (oled_buffer[i] == c) continue; + oled_buffer[i] = c; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); + } +} +#endif // defined(__AVR__) + +bool oled_on(void) { + if (!oled_initialized) { + return oled_active; + } + +#if OLED_TIMEOUT > 0 + oled_timeout = timer_read32() + OLED_TIMEOUT; +#endif + + static const uint8_t PROGMEM display_on[] = +#ifdef OLED_FADE_OUT + {FADE_BLINK, 0x00}; +#else + {DISPLAY_ON}; +#endif + + if (!oled_active) { + if (!oled_cmd_p(display_on, ARRAY_SIZE(display_on))) { + print("oled_on cmd failed\n"); + return oled_active; + } + oled_active = true; + } + return oled_active; +} + +bool oled_off(void) { + if (!oled_initialized) { + return !oled_active; + } + + static const uint8_t PROGMEM display_off[] = +#ifdef OLED_FADE_OUT + {FADE_BLINK, ENABLE_FADE | OLED_FADE_OUT_INTERVAL}; +#else + {DISPLAY_OFF}; +#endif + + if (oled_active) { + if (!oled_cmd_p(display_off, ARRAY_SIZE(display_off))) { + print("oled_off cmd failed\n"); + return oled_active; + } + oled_active = false; + } + return !oled_active; +} + +bool is_oled_on(void) { + return oled_active; +} + +uint8_t oled_set_brightness(uint8_t level) { + if (!oled_initialized) { + return oled_brightness; + } + + uint8_t set_contrast[] = { CONTRAST, level}; + if (oled_brightness != level) { + if (!oled_cmd(set_contrast, ARRAY_SIZE(set_contrast))) { + print("set_brightness cmd failed\n"); + return oled_brightness; + } + oled_brightness = level; + } + return oled_brightness; +} + +uint8_t oled_get_brightness(void) { + return oled_brightness; +} + +// Set the specific 8 lines rows of the screen to scroll. +// 0 is the default for start, and 7 for end, which is the entire +// height of the screen. For 128x32 screens, rows 4-7 are not used. +void oled_scroll_set_area(uint8_t start_line, uint8_t end_line) { + oled_scroll_start = start_line; + oled_scroll_end = end_line; +} + +void oled_scroll_set_speed(uint8_t speed) { + // Sets the speed for scrolling... does not take effect + // until scrolling is either started or restarted + // the ssd1306 supports 8 speeds + // FrameRate2 speed = 7 + // FrameRate3 speed = 4 + // FrameRate4 speed = 5 + // FrameRate5 speed = 0 + // FrameRate25 speed = 6 + // FrameRate64 speed = 1 + // FrameRate128 speed = 2 + // FrameRate256 speed = 3 + // for ease of use these are remaped here to be in order + static const uint8_t scroll_remap[8] = {7, 4, 5, 0, 6, 1, 2, 3}; + oled_scroll_speed = scroll_remap[speed]; +} + +bool oled_scroll_right(void) { + if (!oled_initialized) { + return oled_scrolling; + } + + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + uint8_t display_scroll_right[] = {SCROLL_RIGHT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (!oled_cmd(display_scroll_right, ARRAY_SIZE(display_scroll_right))) { + print("oled_scroll_right cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +bool oled_scroll_left(void) { + if (!oled_initialized) { + return oled_scrolling; + } + + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + uint8_t display_scroll_left[] = {SCROLL_LEFT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (!oled_cmd(display_scroll_left, ARRAY_SIZE(display_scroll_left))) { + print("oled_scroll_left cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +bool oled_scroll_off(void) { + if (!oled_initialized) { + return !oled_scrolling; + } + + if (oled_scrolling) { + static const uint8_t PROGMEM display_scroll_off[] = {DEACTIVATE_SCROLL}; + if (!oled_cmd_p(display_scroll_off, ARRAY_SIZE(display_scroll_off))) { + print("oled_scroll_off cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = false; + oled_dirty = OLED_ALL_BLOCKS_MASK; + } + return !oled_scrolling; +} + +bool is_oled_scrolling(void) { + return oled_scrolling; +} + +bool oled_invert(bool invert) { + if (!oled_initialized) { + return oled_inverted; + } + + if (invert && !oled_inverted) { + static const uint8_t PROGMEM display_inverted[] = {INVERT_DISPLAY}; + if (!oled_cmd_p(display_inverted, ARRAY_SIZE(display_inverted))) { + print("oled_invert cmd failed\n"); + return oled_inverted; + } + oled_inverted = true; + } else if (!invert && oled_inverted) { + static const uint8_t PROGMEM display_normal[] = {NORMAL_DISPLAY}; + if (!oled_cmd_p(display_normal, ARRAY_SIZE(display_normal))) { + print("oled_invert cmd failed\n"); + return oled_inverted; + } + oled_inverted = false; + } + + return oled_inverted; +} + +uint8_t oled_max_chars(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; + } + return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; +} + +uint8_t oled_max_lines(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; + } + return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; +} + +void oled_task(void) { + if (!oled_initialized) { + return; + } + +#if OLED_UPDATE_INTERVAL > 0 + if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { + oled_update_timeout = timer_read(); + oled_set_cursor(0, 0); + oled_task_kb(); + } +#else + oled_set_cursor(0, 0); + oled_task_kb(); +#endif + +#if OLED_SCROLL_TIMEOUT > 0 + if (oled_dirty && oled_scrolling) { + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; + oled_scroll_off(); + } +#endif + + // Smart render system, no need to check for dirty + oled_render(); + + // Display timeout check +#if OLED_TIMEOUT > 0 + if (oled_active && timer_expired32(timer_read32(), oled_timeout)) { + oled_off(); + } +#endif + +#if OLED_SCROLL_TIMEOUT > 0 + if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) { +# ifdef OLED_SCROLL_TIMEOUT_RIGHT + oled_scroll_right(); +# else + oled_scroll_left(); +# endif + } +#endif +} + +__attribute__((weak)) bool oled_task_kb(void) { + return oled_task_user(); +} +__attribute__((weak)) bool oled_task_user(void) { + return true; +} diff --git a/keyboards/adafruit/macropad/macropad.c b/keyboards/adafruit/macropad/macropad.c new file mode 100644 index 0000000000..a82a2dabb1 --- /dev/null +++ b/keyboards/adafruit/macropad/macropad.c @@ -0,0 +1,56 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "macropad.h" + +#ifdef RGB_MATRIX_ENABLE + +#define NA NO_LED + +/* RGB Positioning */ +led_config_t g_led_config = { { + { NA, NA, NA }, + { 0, 1, 2 }, + { 3, 4, 5 }, + { 6, 7, 8 }, + { 9, 10, 11 } +}, { + { 0, 0 }, { 112, 0 }, { 224, 0}, + { 0, 21 }, { 112, 21 }, { 224, 21}, + { 0, 42 }, { 112, 42 }, { 224, 42}, + { 0, 64 }, { 112, 64 }, { 224, 64} +}, { + 4, 4, 4, + 4, 4, 4, + 4, 4, 4, + 4, 4, 4 +} }; + +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } + return true; +} +#endif diff --git a/keyboards/adafruit/macropad/macropad.h b/keyboards/adafruit/macropad/macropad.h new file mode 100644 index 0000000000..6e2e3524b7 --- /dev/null +++ b/keyboards/adafruit/macropad/macropad.h @@ -0,0 +1,38 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off + #define LAYOUT( \ + K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32, \ + K40, K41, K42 \ + ) \ + { \ + { ___, ___, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 }, \ + { K40, K41, K42 } \ + } +// clang-format on diff --git a/keyboards/adafruit/macropad/mcuconf.h b/keyboards/adafruit/macropad/mcuconf.h new file mode 100644 index 0000000000..198a2eea69 --- /dev/null +++ b/keyboards/adafruit/macropad/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2022 Jose Pablo Ramirez <jp.ramangulo@gmail.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef RP_SPI_USE_SPI1 +#define RP_SPI_USE_SPI1 TRUE diff --git a/keyboards/adafruit/macropad/readme.md b/keyboards/adafruit/macropad/readme.md new file mode 100644 index 0000000000..09c8657902 --- /dev/null +++ b/keyboards/adafruit/macropad/readme.md @@ -0,0 +1,38 @@ +# Adafruit MacroPad RP2040 + +![AdafruitMacropad](https://i.imgur.com/dSBSwcJh.jpeg) + +A RP2040-powered Macropad with a 3x4 layout. + +- Keyboard Maintainer: [Jpe230](https://github.com/jpe230/) +- Hardware Supported: Adafruit MacroPad RP2040 +- Hardware Availability: [Barebones kit](https://www.adafruit.com/product/5100) [Starter Kit](https://www.adafruit.com/product/5128) + +Make example for this board (after setting up your build environment): + +```sh +qmk compile -kb adafruit/macropad -km default +``` + +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). + +## Features + +- Raspberry Pi RP2040 Chip + 8MB Flash memory - Dual-core Cortex M0+ at ~130MHz with 264KB of RAM. +- 3x4 Mechanical key switch sockets - accepts any Cherry MX-compatible switches. Individually tied to GPIO pins (not matrix wired) +- One NeoPixel RGB LED per switch, on north side. +- Rotary encoder, 20 detents per rotation, with push-switch on GPIO pin. Push switch is also used for entering bootloader mode when held down on power-up or reset. +- 128x64 SH1106 Monochrome OLED display - On high-speed hardware SPI port for quick updates. +- 8mm Speaker/Buzzer - With Class D amplifier and RC filter, can be used to make simple beeps and sounds effects. (Unsupported for now) +- STEMMA QT Connector - Allows adding any I2C sensors/displays/devices with plug-and-play cables. +- Reset button - On the side, for quick restarting, press it twice to enter bootloader. +- Four M3 mounting bosses - Make custom enclosures easily. + +## Bootloader + +Enter the bootloader in 4 ways: + +* **Bootmagic reset**: Hold down the key just bellow the rotary encoder push-button on power-up. +* **Physical reset button**: Press twice the button on the side while the board is connected. +* **BOOT button** Hold down the rotary encoder push-button on power-up or reset. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. diff --git a/keyboards/adafruit/macropad/rules.mk b/keyboards/adafruit/macropad/rules.mk new file mode 100644 index 0000000000..3636424a71 --- /dev/null +++ b/keyboards/adafruit/macropad/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = RP2040 +# Bootloader selection +BOOTLOADER = rp2040 +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +# AUDIO_DRIVER = pwm_software +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +WS2812_DRIVER = vendor +OLED_ENABLE = yes +OLED_DRIVER = custom +# Project specific files +SRC += lib/ssd1306_sh1106.c +QUANTUM_LIB_SRC += spi_master.c diff --git a/keyboards/adelheid/config.h b/keyboards/adelheid/config.h index cb6393393c..f3eecce72b 100644 --- a/keyboards/adelheid/config.h +++ b/keyboards/adelheid/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, F4, D1, D2, D3, D5, F7 } #define MATRIX_COL_PINS { F0, F1, E6, C7, F6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/adpenrose/kintsugi/config.h b/keyboards/adpenrose/kintsugi/config.h index cbde0090fa..d4e3dcc729 100644 --- a/keyboards/adpenrose/kintsugi/config.h +++ b/keyboards/adpenrose/kintsugi/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, E6, D7, C6, D4, D2, F4, F5, B5, B4 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6, F0 } -#define UNUSED_PINS { D3, C7 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 631a007bf3..e87b856968 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F5, F6, E6, F7, D1, D0, D6, D4, B4, D7, B6, B5 } #define MATRIX_COL_PINS { C7, C6, B7, D2, D3, B3, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aeboards/constellation/rev1/config.h b/keyboards/aeboards/constellation/rev1/config.h index 22dd96f663..42535abd67 100755 --- a/keyboards/aeboards/constellation/rev1/config.h +++ b/keyboards/aeboards/constellation/rev1/config.h @@ -33,7 +33,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, F0, F1, F4 } #define MATRIX_COL_PINS { E6, D5, B2, B3, D3, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aeboards/constellation/rev2/config.h b/keyboards/aeboards/constellation/rev2/config.h index de42885b47..f2f34aeeb8 100755 --- a/keyboards/aeboards/constellation/rev2/config.h +++ b/keyboards/aeboards/constellation/rev2/config.h @@ -32,7 +32,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B15, A14, A2, B13, B14 } #define MATRIX_COL_PINS { B12, A1, H0, C15, C14, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aeboards/ext65/rev1/config.h b/keyboards/aeboards/ext65/rev1/config.h index cd9c240069..7ee340aa2d 100644 --- a/keyboards/aeboards/ext65/rev1/config.h +++ b/keyboards/aeboards/ext65/rev1/config.h @@ -32,7 +32,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, C7, B5, B6, D7, B4, D4, D6, B7, E6 } #define MATRIX_COL_PINS { B2, B3, B1, B0, F7, F0, F1, F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/equinox/config.h b/keyboards/ai03/equinox/config.h index 4a6b841b60..5717260e29 100644 --- a/keyboards/ai03/equinox/config.h +++ b/keyboards/ai03/equinox/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, C5, D4, D5 } #define MATRIX_COL_PINS { D1, D2, C6, C7, B6, B5, B4, B3, B2, B1, B0, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/jp60/config.h b/keyboards/ai03/jp60/config.h index c951655ad9..dd1b4bcb0e 100644 --- a/keyboards/ai03/jp60/config.h +++ b/keyboards/ai03/jp60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, E6 } #define MATRIX_COL_PINS { D2, D1, D3, D5, D4, D6, C6, F0, F1, F4, F5, F6, F7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index ed584c4461..3cdec4d046 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 } #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h index 775df8913f..3cd0895788 100644 --- a/keyboards/ai03/orbit/config.h +++ b/keyboards/ai03/orbit/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 } #define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 } #define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/orbit_x/config.h b/keyboards/ai03/orbit_x/config.h index f5bc5f0b34..6966de9df5 100644 --- a/keyboards/ai03/orbit_x/config.h +++ b/keyboards/ai03/orbit_x/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { E6, F6, B1, B0, C7, C6 } #define MATRIX_ROW_PINS_RIGHT { B5, D7, B4, D4 } #define MATRIX_COL_PINS_RIGHT { D6, B6, B1, B0, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/polaris/config.h b/keyboards/ai03/polaris/config.h index 8d8951cd71..8cf852cfab 100644 --- a/keyboards/ai03/polaris/config.h +++ b/keyboards/ai03/polaris/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } #define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/quasar/config.h b/keyboards/ai03/quasar/config.h index 99e0413566..462ffe1a8e 100644 --- a/keyboards/ai03/quasar/config.h +++ b/keyboards/ai03/quasar/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4, D6, D7 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/soyuz/config.h b/keyboards/ai03/soyuz/config.h index 872fb58c13..9ffec17840 100644 --- a/keyboards/ai03/soyuz/config.h +++ b/keyboards/ai03/soyuz/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, B6, E6, B4 } #define MATRIX_COL_PINS { F4, B3, D7, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ai03/voyager60_alps/config.h b/keyboards/ai03/voyager60_alps/config.h index 5ae9a4c9f5..c96be0030d 100644 --- a/keyboards/ai03/voyager60_alps/config.h +++ b/keyboards/ai03/voyager60_alps/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } #define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aidansmithdotdev/fine40/config.h b/keyboards/aidansmithdotdev/fine40/config.h new file mode 100644 index 0000000000..43ac1e5dda --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/config.h @@ -0,0 +1,12 @@ +// Copyright 2022 Aidan Smith (@Aidan-OS) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define ENCODER_RESOLUTION 2 +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { B7 } + +#define OLED_DISPLAY_128X64 //Comment this out to change the screen size diff --git a/keyboards/aidansmithdotdev/fine40/fine40.c b/keyboards/aidansmithdotdev/fine40/fine40.c new file mode 100644 index 0000000000..cc4024136e --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/fine40.c @@ -0,0 +1,85 @@ +// Copyright 2022 Aidan Smith (@Aidan-OS) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "fine40.h" + +enum keyboard_layers { + _MAIN, + _RIGHT, + _LEFT, + _TAB, +}; + +#ifdef OLED_ENABLE +//static void render_logo(void) { +// static const char PROGMEM raw_logo[] = { +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,224,224,240,240,248,248,248,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,248,248,248,240,240,224,224,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,224,224,192, 0, 0, 0, 0, 96,240,240, 96, 0, 0, 0, 0, 0, 0,240,240,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0,128,192,224,240,248,252,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 15, 7, 7, 7, 15,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,252,248,240,224,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,240,254,255,127,115,127,127,255,252,224, 0,255,255,255,254, 48,254,254,255,199,135,255,255,255, 0,224,247,255,191,191,255,255,254, 0,254,255,255,255, 7,255,255,254,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0,192,248,254,255,255,255,255,255,255,255,255,255,127, 31, 15, 7, 3, 1,192,224,240,251,255,255,255,255,255, 0, 0, 0, 0, 0,255,255,255,255,255,255,241,225,192, 1, 3, 7, 15, 31,127,255,255,255,255,255,255,255,255,255,254,248,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3,128,128,128,128, 0, 1, 3, 3, 1, 1, 3, 3, 1, 0, 0, 1, 1, 3, 3, 3, 3,129,192,128, 1, 3, 3, 3, 3, 1, 1, 0,129,195,195,193, 0, 1, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255, 7, 0, 0, 0,240,252,255,255,255,255,255,255,255,255,255,255,255,254,252,254,255,255,255,255,255,255,255,255,255,255,255,252,240, 0, 0, 0, 7,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 63, 63,127,123,243,247,231,193, 0,252,252,252, 28, 60,252,252,252, 28,252,252,248,224, 0,255,255,255, 0,255,255,255,255, 28, 28, 0,255,255,255,255, 28,252,252,248,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,240, 0, 0, 0, 7, 31,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127, 31, 7, 0, 0, 0,240,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 15, 15, 14, 15, 7, 7, 3, 0, 15, 15, 15, 0, 0, 15, 15, 15, 0, 7, 15, 15, 7, 0, 15, 15, 15, 0, 1, 7, 7, 15, 14, 14, 6, 7, 7, 7, 7, 0, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 1, 15, 63,255,255,255,255,255,255,255,255,255,255,254,248,240,224,192,128,129, 3, 7, 15, 15, 31, 31, 31, 63, 63, 63, 63, 63, 31, 31, 31, 15, 15, 7, 3,129,128,192,224,240,248,254,255,255,255,255,255,255,255,255,255,255, 63, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,224,224,224,252,254,254, 0, 0,128,192,224,224,224,224,192,128, 96,224,224,224, 0, 0,224,224,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 15, 31, 63,127,255,255,255,255,255,255,255,255,255,255,254,254,254,254,254,252,252,252,252,252,252,252,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,120,120, 48, 31, 63, 63,120,112,127,127, 63, 0, 6, 31, 63, 63,127,119,119, 63, 55, 0, 3, 15, 63,127,127, 63, 15, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 7, 7, 15, 15, 15, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 15, 15, 15, 7, 7, 3, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// }; +// oled_write_raw_P(raw_logo, sizeof(raw_logo)); +//} + +static void render_mochi(void) +{ + static const char PROGMEM mochi_logo[] = { + 0, 0, 0, 0, 0,224,240,240,240,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,240,240,240,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252,252,252,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,248,248,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,224,240,240,240,224, 0, 0, 0, 0, 0, 0,128,192,224,240,240,240,240,240,240,224,224,192, 0, 0, 0, 0, 0, + 0, 0, 0, 0,224,255,255,255, 15, 63,255,254,248,224, 0, 0, 0, 0,224,248,254,255, 31, 31,255,255,255,128, 0, 0, 0,128,224,240,248,252, 60, 28, 28, 30, 28, 60,124,248,248,240,192, 0, 0, 0,128,224,240,248,252, 60, 60, 28, 30, 28, 28, 60, 28, 0, 0, 0,255,255,255,255, 28, 28, 28, 28, 60,124,252,248,240,192, 0, 0, 0, 0,252,252,252,252, 0, 0, 0, 0, 0,192,224,248,252, 63, 31, 7, 3,255,255,255,255, 0, 0, 0, 0,224,254,255,255, 15, 1, 0, 0, 0, 0, 1, 15,255,255,255,248, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255, 0, 0, 0, 3, 15, 63,255,252,252,255, 63, 15, 3, 0, 0, 0,255,255,255,255, 0, 0, 0, 63,255,255,255,224,128, 0, 0, 0, 0,128,192,255,255,255,127, 4, 0, 0, 63,255,255,255,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, 0, 0,255,255,255,255, 0, 0, 0, 60, 63, 63, 63, 61, 60, 60, 60, 60, 60,255,255,255,255, 60, 60, 0, 0, 7,127,255,255,248,128, 0, 0, 0, 0,128,240,255,255,127, 31, 0, 0, 0, + 0, 0, 0, 0, 15, 15, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 15, 15, 15, 0, 0, 0, 0, 0, 1, 3, 7, 7, 15, 15, 15, 15, 15, 7, 7, 3, 1, 0, 0, 0, 0, 0, 0, 3, 3, 7, 7, 15, 15, 15, 15, 15, 15, 7, 0, 0, 0, 15, 15, 15, 7, 0, 0, 0, 0, 0, 0, 7, 15, 15, 15, 0, 0, 0, 0, 15, 15, 15, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 7, 0, 0, 0, 0, 0, 0, 1, 3, 7, 7, 15, 15, 15, 15, 7, 7, 3, 1, 0, 0, 0, 0, 0, + }; + + oled_write_raw_P(mochi_logo, sizeof(mochi_logo)); +} + + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees +} +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + render_mochi(); + oled_set_cursor(0, 4); + oled_write_P(PSTR("Layer: "), false); + + switch(get_highest_layer(layer_state)) + { + case _MAIN: + oled_write_ln_P(PSTR("Main"), false); + break; + case _LEFT: + oled_write_ln_P(PSTR("Left"), false); + break; + case _RIGHT: + oled_write_ln_P(PSTR("Right"), false); + break; + case _TAB: + oled_write_ln_P(PSTR("Tab"), false); + break; + } + + //render_logo(); + return(true); +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return false; +} +#endif
\ No newline at end of file diff --git a/keyboards/aidansmithdotdev/fine40/fine40.h b/keyboards/aidansmithdotdev/fine40/fine40.h new file mode 100644 index 0000000000..dd675cf3ad --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/fine40.h @@ -0,0 +1,3 @@ +// Copyright 2022 Aidan Smith (@Aidan-OS) +// SPDX-License-Identifier: GPL-2.0-or-later +#include "quantum.h"
\ No newline at end of file diff --git a/keyboards/aidansmithdotdev/fine40/info.json b/keyboards/aidansmithdotdev/fine40/info.json new file mode 100644 index 0000000000..c2e1afd84c --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/info.json @@ -0,0 +1,231 @@ +{ + "manufacturer": "Aidan Smith", + "keyboard_name": "aidansmithdotdev/fine40", + "maintainer": "Aidan-OS", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "encoder": true, + "oled": true, + "nkro": true + }, + "matrix_pins": { + "cols": [ "B3", "E6", "B1", "D7", "F7", "C6" ], + "rows": [ "F5", "F6", "B2", "B5", "F4", "D4", "B4", "B6" ] + }, + "processor": "atmega32u4", + "url": "https://aidansmith.dev", + "usb": { + "device_version": "1.0.0", + "pid": "0x4564", + "vid": "0xA059" + }, + "layouts": { + "LAYOUT_2u_single_space": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [4, 5], "x": 6, "y": 0 }, + { "matrix": [4, 4], "x": 7, "y": 0 }, + { "matrix": [4, 3], "x": 8, "y": 0 }, + { "matrix": [4, 2], "x": 9, "y": 0 }, + { "matrix": [4, 1], "x": 10, "y": 0 }, + { "matrix": [4, 0], "x": 11, "y": 0, "w": 1.5 }, + { "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25 }, + { "matrix": [1, 1], "x": 1.25, "y": 1 }, + { "matrix": [1, 2], "x": 2.25, "y": 1 }, + { "matrix": [1, 3], "x": 3.25, "y": 1 }, + { "matrix": [1, 4], "x": 4.25, "y": 1 }, + { "matrix": [1, 5], "x": 5.25, "y": 1 }, + { "matrix": [5, 5], "x": 6.25, "y": 1 }, + { "matrix": [5, 4], "x": 7.25, "y": 1 }, + { "matrix": [5, 3], "x": 8.25, "y": 1 }, + { "matrix": [5, 2], "x": 9.25, "y": 1 }, + { "matrix": [5, 1], "x": 10.25, "y": 1 }, + { "matrix": [5, 0], "x": 11.25, "y": 1, "w": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 2 }, + { "matrix": [2, 2], "x": 2.5, "y": 2 }, + { "matrix": [2, 3], "x": 3.5, "y": 2 }, + { "matrix": [2, 4], "x": 4.5, "y": 2 }, + { "matrix": [2, 5], "x": 5.5, "y": 2 }, + { "matrix": [6, 5], "x": 6.5, "y": 2 }, + { "matrix": [6, 4], "x": 7.5, "y": 2 }, + { "matrix": [6, 3], "x": 8.5, "y": 2 }, + { "matrix": [6, 2], "x": 9.5, "y": 2 }, + { "matrix": [6, 1], "x": 10.5, "y": 2 }, + { "matrix": [6, 0], "x": 11.5, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3, "w": 1.25 }, + { "matrix": [3, 5], "x": 5.25, "y": 3, "w": 2 }, + { "matrix": [7, 5], "x": 7.25, "y": 3, "w": 1.25 }, + { "matrix": [7, 4], "x": 8.5, "y": 3 }, + { "matrix": [7, 3], "x": 9.5, "y": 3 }, + { "matrix": [7, 2], "x": 10.5, "y": 3 }, + { "matrix": [7, 1], "x": 11.5, "y": 3 }, + { "matrix": [7, 0], "x": 13, "y": 3 } + ] + }, + "LAYOUT_2u_split_space": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [4, 5], "x": 6, "y": 0 }, + { "matrix": [4, 4], "x": 7, "y": 0 }, + { "matrix": [4, 3], "x": 8, "y": 0 }, + { "matrix": [4, 2], "x": 9, "y": 0 }, + { "matrix": [4, 1], "x": 10, "y": 0 }, + { "matrix": [4, 0], "x": 11, "y": 0, "w": 1.5 }, + { "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25 }, + { "matrix": [1, 1], "x": 1.25, "y": 1 }, + { "matrix": [1, 2], "x": 2.25, "y": 1 }, + { "matrix": [1, 3], "x": 3.25, "y": 1 }, + { "matrix": [1, 4], "x": 4.25, "y": 1 }, + { "matrix": [1, 5], "x": 5.25, "y": 1 }, + { "matrix": [5, 5], "x": 6.25, "y": 1 }, + { "matrix": [5, 4], "x": 7.25, "y": 1 }, + { "matrix": [5, 3], "x": 8.25, "y": 1 }, + { "matrix": [5, 2], "x": 9.25, "y": 1 }, + { "matrix": [5, 1], "x": 10.25, "y": 1 }, + { "matrix": [5, 0], "x": 11.25, "y": 1, "w": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 2 }, + { "matrix": [2, 2], "x": 2.5, "y": 2 }, + { "matrix": [2, 3], "x": 3.5, "y": 2 }, + { "matrix": [2, 4], "x": 4.5, "y": 2 }, + { "matrix": [2, 5], "x": 5.5, "y": 2 }, + { "matrix": [6, 5], "x": 6.5, "y": 2 }, + { "matrix": [6, 4], "x": 7.5, "y": 2 }, + { "matrix": [6, 3], "x": 8.5, "y": 2 }, + { "matrix": [6, 2], "x": 9.5, "y": 2 }, + { "matrix": [6, 1], "x": 10.5, "y": 2 }, + { "matrix": [6, 0], "x": 11.5, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3, "w": 1.25 }, + { "matrix": [3, 4], "x": 4.25, "y": 3, "w": 2 }, + { "matrix": [7, 5], "x": 6.25, "y": 3, "w": 2 }, + { "matrix": [7, 4], "x": 8.25, "y": 3, "w": 1.25 }, + { "matrix": [7, 3], "x": 9.5, "y": 3 }, + { "matrix": [7, 2], "x": 10.5, "y": 3 }, + { "matrix": [7, 1], "x": 11.5, "y": 3 }, + { "matrix": [7, 0], "x": 13, "y": 3 } + ] + }, + "LAYOUT_225u_split_space": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [4, 5], "x": 6, "y": 0 }, + { "matrix": [4, 4], "x": 7, "y": 0 }, + { "matrix": [4, 3], "x": 8, "y": 0 }, + { "matrix": [4, 2], "x": 9, "y": 0 }, + { "matrix": [4, 1], "x": 10, "y": 0 }, + { "matrix": [4, 0], "x": 11, "y": 0, "w": 1.5 }, + { "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25 }, + { "matrix": [1, 1], "x": 1.25, "y": 1 }, + { "matrix": [1, 2], "x": 2.25, "y": 1 }, + { "matrix": [1, 3], "x": 3.25, "y": 1 }, + { "matrix": [1, 4], "x": 4.25, "y": 1 }, + { "matrix": [1, 5], "x": 5.25, "y": 1 }, + { "matrix": [5, 5], "x": 6.25, "y": 1 }, + { "matrix": [5, 4], "x": 7.25, "y": 1 }, + { "matrix": [5, 3], "x": 8.25, "y": 1 }, + { "matrix": [5, 2], "x": 9.25, "y": 1 }, + { "matrix": [5, 1], "x": 10.25, "y": 1 }, + { "matrix": [5, 0], "x": 11.25, "y": 1, "w": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 2 }, + { "matrix": [2, 2], "x": 2.5, "y": 2 }, + { "matrix": [2, 3], "x": 3.5, "y": 2 }, + { "matrix": [2, 4], "x": 4.5, "y": 2 }, + { "matrix": [2, 5], "x": 5.5, "y": 2 }, + { "matrix": [6, 5], "x": 6.5, "y": 2 }, + { "matrix": [6, 4], "x": 7.5, "y": 2 }, + { "matrix": [6, 3], "x": 8.5, "y": 2 }, + { "matrix": [6, 2], "x": 9.5, "y": 2 }, + { "matrix": [6, 1], "x": 10.5, "y": 2 }, + { "matrix": [6, 0], "x": 11.5, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3, "w": 2.25 }, + { "matrix": [7, 5], "x": 6.25, "y": 3, "w": 2.25 }, + { "matrix": [7, 4], "x": 8.5, "y": 3 }, + { "matrix": [7, 3], "x": 9.5, "y": 3 }, + { "matrix": [7, 2], "x": 10.5, "y": 3 }, + { "matrix": [7, 1], "x": 11.5, "y": 3 }, + { "matrix": [7, 0], "x": 13, "y": 3 } + ] + }, + "LAYOUT_7u_space": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [4, 5], "x": 6, "y": 0 }, + { "matrix": [4, 4], "x": 7, "y": 0 }, + { "matrix": [4, 3], "x": 8, "y": 0 }, + { "matrix": [4, 2], "x": 9, "y": 0 }, + { "matrix": [4, 1], "x": 10, "y": 0 }, + { "matrix": [4, 0], "x": 11, "y": 0, "w": 1.5 }, + { "matrix": [1, 0], "x": 0, "y": 1, "w": 1.25 }, + { "matrix": [1, 1], "x": 1.25, "y": 1 }, + { "matrix": [1, 2], "x": 2.25, "y": 1 }, + { "matrix": [1, 3], "x": 3.25, "y": 1 }, + { "matrix": [1, 4], "x": 4.25, "y": 1 }, + { "matrix": [1, 5], "x": 5.25, "y": 1 }, + { "matrix": [5, 5], "x": 6.25, "y": 1 }, + { "matrix": [5, 4], "x": 7.25, "y": 1 }, + { "matrix": [5, 3], "x": 8.25, "y": 1 }, + { "matrix": [5, 2], "x": 9.25, "y": 1 }, + { "matrix": [5, 1], "x": 10.25, "y": 1 }, + { "matrix": [5, 0], "x": 11.25, "y": 1, "w": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2, "w": 1.5 }, + { "matrix": [2, 1], "x": 1.5, "y": 2 }, + { "matrix": [2, 2], "x": 2.5, "y": 2 }, + { "matrix": [2, 3], "x": 3.5, "y": 2 }, + { "matrix": [2, 4], "x": 4.5, "y": 2 }, + { "matrix": [2, 5], "x": 5.5, "y": 2 }, + { "matrix": [6, 5], "x": 6.5, "y": 2 }, + { "matrix": [6, 4], "x": 7.5, "y": 2 }, + { "matrix": [6, 3], "x": 8.5, "y": 2 }, + { "matrix": [6, 2], "x": 9.5, "y": 2 }, + { "matrix": [6, 1], "x": 10.5, "y": 2 }, + { "matrix": [6, 0], "x": 11.5, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3, "w": 1.25 }, + { "matrix": [3, 1], "x": 1.25, "y": 3, "w": 1.25 }, + { "matrix": [3, 5], "x": 2.5, "y": 3, "w": 7 }, + { "matrix": [7, 3], "x": 9.5, "y": 3 }, + { "matrix": [7, 2], "x": 10.5, "y": 3 }, + { "matrix": [7, 1], "x": 11.5, "y": 3 }, + { "matrix": [7, 0], "x": 13, "y": 3 } + ] + } + } +} diff --git a/keyboards/aidansmithdotdev/fine40/keymaps/default/keymap.c b/keyboards/aidansmithdotdev/fine40/keymaps/default/keymap.c new file mode 100644 index 0000000000..37085b7c90 --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2022 Aidan Smith (@Aidan-OS) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _MAIN, + _RIGHT, + _LEFT, + _TAB, +}; + +#define LT3_TAB LT(_TAB, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MAIN] = LAYOUT_2u_single_space( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC , + LT3_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_LCTL , KC_RALT , KC_LGUI , KC_BSLS , MO(_LEFT) , KC_SPC , MO(_RIGHT) , KC_LEFT , KC_DOWN , KC_UP , KC_RIGHT , KC_MPLY +), + +[_LEFT] = LAYOUT_2u_single_space( /* LEFT */ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DELETE , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_UNDERSCORE , KC_PLUS , KC_LEFT_CURLY_BRACE , KC_RIGHT_CURLY_BRACE , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ +), + +[_RIGHT] = LAYOUT_2u_single_space( /* RIGHT */ + KC_TILDE , KC_EXCLAIM , KC_AT , KC_HASH , KC_DOLLAR , KC_PERCENT , KC_CIRCUMFLEX , KC_AMPERSAND , KC_ASTERISK , KC_LEFT_PAREN , KC_RIGHT_PAREN , KC_DELETE , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MINS , KC_EQL , KC_LBRC , KC_RBRC , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_LT , KC_GT , _______ , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , KC_MPLY , _______ +), + +[_TAB] = LAYOUT_2u_single_space( /* Tab */ + KC_ESC , RESET , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , + _______ , KC_F11 , KC_F12 , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , _______ , + _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MS_L , KC_MS_D , KC_MS_U , KC_MS_R , _______ +), +}; diff --git a/keyboards/aidansmithdotdev/fine40/keymaps/via/keymap.c b/keyboards/aidansmithdotdev/fine40/keymaps/via/keymap.c new file mode 100644 index 0000000000..37085b7c90 --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +// Copyright 2022 Aidan Smith (@Aidan-OS) +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _MAIN, + _RIGHT, + _LEFT, + _TAB, +}; + +#define LT3_TAB LT(_TAB, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MAIN] = LAYOUT_2u_single_space( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC , + LT3_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , + KC_LCTL , KC_RALT , KC_LGUI , KC_BSLS , MO(_LEFT) , KC_SPC , MO(_RIGHT) , KC_LEFT , KC_DOWN , KC_UP , KC_RIGHT , KC_MPLY +), + +[_LEFT] = LAYOUT_2u_single_space( /* LEFT */ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DELETE , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_UNDERSCORE , KC_PLUS , KC_LEFT_CURLY_BRACE , KC_RIGHT_CURLY_BRACE , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_PGDN , KC_PGUP , KC_END , _______ +), + +[_RIGHT] = LAYOUT_2u_single_space( /* RIGHT */ + KC_TILDE , KC_EXCLAIM , KC_AT , KC_HASH , KC_DOLLAR , KC_PERCENT , KC_CIRCUMFLEX , KC_AMPERSAND , KC_ASTERISK , KC_LEFT_PAREN , KC_RIGHT_PAREN , KC_DELETE , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MINS , KC_EQL , KC_LBRC , KC_RBRC , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_LT , KC_GT , _______ , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , KC_MPLY , _______ +), + +[_TAB] = LAYOUT_2u_single_space( /* Tab */ + KC_ESC , RESET , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , + _______ , KC_F11 , KC_F12 , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , _______ , + _______ , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_MS_L , KC_MS_D , KC_MS_U , KC_MS_R , _______ +), +}; diff --git a/keyboards/aidansmithdotdev/fine40/keymaps/via/rules.mk b/keyboards/aidansmithdotdev/fine40/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/aidansmithdotdev/fine40/readme.md b/keyboards/aidansmithdotdev/fine40/readme.md new file mode 100644 index 0000000000..ad3eba7c5c --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/readme.md @@ -0,0 +1,27 @@ +# Fine!40 PCB (For Mochi40) + +![aidansmithdotdev/fine40](https://i.imgur.com/2JMorvxh.png) + +The PCB for the Mochi40, a spiritual successor to the unreleased Whimsy recreated from scratch and made completely open source! With an OLED, Rotary Encoder, and headers for both the Elite-C and Nice!Nano, this board gives you all you could want in a 40%. + +* Keyboard Maintainer: [Aidan Smith](https://github.com/Aidan-OS) +* Hardware Supported: Fine!40 +* Hardware Availability: https://github.com/Aidan-OS/Mochi40 + +Make example for this keyboard (after setting up your build environment): + + make aidansmithdotdev/fine40:default + +Flashing example for this keyboard: + + make aidansmithdotdev/fine40:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/aidansmithdotdev/fine40/rules.mk b/keyboards/aidansmithdotdev/fine40/rules.mk new file mode 100644 index 0000000000..2e3ef9fb84 --- /dev/null +++ b/keyboards/aidansmithdotdev/fine40/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER = SSD1306 diff --git a/keyboards/akb/raine/config.h b/keyboards/akb/raine/config.h index c341ceb7dc..d04304c9c3 100644 --- a/keyboards/akb/raine/config.h +++ b/keyboards/akb/raine/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { E6, C6, F7, B2, B0 } #define MATRIX_COL_PINS \ { F6, F5, F4, B1, F1, F0, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index 8e5d855d0d..f9d9c1363b 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index cbe4733397..5e7275dd11 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index 50e256778a..9c0c0a527a 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -27,7 +27,6 @@ { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS \ { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index 379b879abc..e98029fb82 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, B4, B5 } #define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 9656678fe9..5ca083c349 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/amag23/config.h b/keyboards/amag23/config.h index cbbac33136..a847c0ef7e 100644 --- a/keyboards/amag23/config.h +++ b/keyboards/amag23/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { A0, A1, A2, A3 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/amjkeyboard/amj40/config.h b/keyboards/amjkeyboard/amj40/config.h index 168d16eaee..b5b9c2e4df 100755 --- a/keyboards/amjkeyboard/amj40/config.h +++ b/keyboards/amjkeyboard/amj40/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, F5, F6, F7} #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B2 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/amjkeyboard/amj60/config.h b/keyboards/amjkeyboard/amj60/config.h index a3764d00d2..68994d2b2e 100644 --- a/keyboards/amjkeyboard/amj60/config.h +++ b/keyboards/amjkeyboard/amj60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/amjkeyboard/amj66/config.h b/keyboards/amjkeyboard/amj66/config.h index 240cb312c9..9cbab73e70 100644 --- a/keyboards/amjkeyboard/amj66/config.h +++ b/keyboards/amjkeyboard/amj66/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { F0, B3, B2, B1, B0, B7, D0, D1, D2, D3, D5, D6, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/amjkeyboard/amj84/config.h b/keyboards/amjkeyboard/amj84/config.h index 99f59983ea..1166c3f986 100644 --- a/keyboards/amjkeyboard/amj84/config.h +++ b/keyboards/amjkeyboard/amj84/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { D0, F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/amjkeyboard/amj96/config.h b/keyboards/amjkeyboard/amj96/config.h index 4b94236ec9..12a01dc3e6 100644 --- a/keyboards/amjkeyboard/amj96/config.h +++ b/keyboards/amjkeyboard/amj96/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/amjkeyboard/amjpad/config.h b/keyboards/amjkeyboard/amjpad/config.h index 0a885b7a36..647df951df 100644 --- a/keyboards/amjkeyboard/amjpad/config.h +++ b/keyboards/amjkeyboard/amjpad/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7, F6, F5, F4, D5, D0 } #define MATRIX_COL_PINS { F1, F0, E6, C7 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h index ef51822f5a..b15656fe83 100644 --- a/keyboards/anavi/macropad8/config.h +++ b/keyboards/anavi/macropad8/config.h @@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_LEVELS 3 #define RGBLIGHT_SLEEP -#define UNUSED_PINS /* ws2812B RGB LED */ #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/annepro2/c15/config.h b/keyboards/annepro2/c15/config.h index ff92aeea8e..2ebb962efb 100644 --- a/keyboards/annepro2/c15/config.h +++ b/keyboards/annepro2/c15/config.h @@ -49,3 +49,21 @@ // Obins stock firmware has something similar to this already enabled, but disabled by default in QMK #define PERMISSIVE_HOLD + +// SPI configuration +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A0 +#define SPI_MOSI_PIN A1 +#define SPI_MISO_PIN A2 + +// Flash configuration +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6 +#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 16 +#define EXTERNAL_FLASH_PAGE_SIZE 256 +#define EXTERNAL_FLASH_SECTOR_SIZE 4096 +#define EXTERNAL_FLASH_BLOCK_SIZE 4096 +#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size + +// Wear-leveling driver configuration +#define WEAR_LEVELING_LOGICAL_SIZE 1024 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) diff --git a/keyboards/annepro2/c15/rules.mk b/keyboards/annepro2/c15/rules.mk index 2c518b6339..302aeecbe6 100644 --- a/keyboards/annepro2/c15/rules.mk +++ b/keyboards/annepro2/c15/rules.mk @@ -26,6 +26,10 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output +# Wear-levelling driver +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = spi_flash + # Custom RGB matrix handling RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = custom diff --git a/keyboards/annepro2/c18/config.h b/keyboards/annepro2/c18/config.h index 82a406a157..5e4978048b 100644 --- a/keyboards/annepro2/c18/config.h +++ b/keyboards/annepro2/c18/config.h @@ -47,3 +47,21 @@ // Obins stock firmware has something similar to this already enabled, but disabled by default in QMK #define PERMISSIVE_HOLD + +// SPI configuration +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A0 +#define SPI_MOSI_PIN A1 +#define SPI_MISO_PIN A2 + +// Flash configuration +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN A3 +#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 16 +#define EXTERNAL_FLASH_PAGE_SIZE 256 +#define EXTERNAL_FLASH_SECTOR_SIZE 4096 +#define EXTERNAL_FLASH_BLOCK_SIZE 4096 +#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size + +// Wear-leveling driver configuration +#define WEAR_LEVELING_LOGICAL_SIZE 1024 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) diff --git a/keyboards/annepro2/c18/rules.mk b/keyboards/annepro2/c18/rules.mk index 60c2e08648..b1c7208f8b 100644 --- a/keyboards/annepro2/c18/rules.mk +++ b/keyboards/annepro2/c18/rules.mk @@ -26,6 +26,10 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output +# Wear-levelling driver +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = spi_flash + # Custom RGB matrix handling RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = custom diff --git a/keyboards/annepro2/halconf.h b/keyboards/annepro2/halconf.h index 686b91a7fb..dcb04eab1b 100644 --- a/keyboards/annepro2/halconf.h +++ b/keyboards/annepro2/halconf.h @@ -25,4 +25,8 @@ #define SERIAL_USB_BUFFERS_SIZE 256 +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + #include_next <halconf.h> diff --git a/keyboards/annepro2/mcuconf.h b/keyboards/annepro2/mcuconf.h index 8265fe6eb9..9e39bd9681 100644 --- a/keyboards/annepro2/mcuconf.h +++ b/keyboards/annepro2/mcuconf.h @@ -60,3 +60,11 @@ #define HT32_USB_USE_USB0 TRUE #define HT32_USB_USB0_IRQ_PRIORITY 5 + +/* + * SPI driver setting + */ + +#define HT32_SPI_USE_SPI1 TRUE +#define HT32_SPI1_IRQ_PRIORITY 9 + diff --git a/keyboards/ano/config.h b/keyboards/ano/config.h index 5489e656b7..4fe23fb1c8 100644 --- a/keyboards/ano/config.h +++ b/keyboards/ano/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { A4, B14, B15, B9, B10, B11 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, A5, A6, A7, A8, A15, A2, A1, A0, B8, B13 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { A14 } diff --git a/keyboards/anomalykb/a65i/config.h b/keyboards/anomalykb/a65i/config.h index e090e46456..a5a9dc5081 100644 --- a/keyboards/anomalykb/a65i/config.h +++ b/keyboards/anomalykb/a65i/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B2, B1, B0, B5 } #define MATRIX_COL_PINS { D7, D6, D4, B4, B6, E6, F1, B7, C6, C7, D5, D3, D2, F0, D1, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aos/tkl/config.h b/keyboards/aos/tkl/config.h index ddea414eb1..5ddec8cda0 100644 --- a/keyboards/aos/tkl/config.h +++ b/keyboards/aos/tkl/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D2, B7, F1, C7, D5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F5, F6, F7, B6, B5, D7, B4, D6, F0, D1, C6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aplyard/aplx6/rev1/config.h b/keyboards/aplyard/aplx6/rev1/config.h index 98a7381cc7..94e9717efa 100644 --- a/keyboards/aplyard/aplx6/rev1/config.h +++ b/keyboards/aplyard/aplx6/rev1/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { E6, B3 } #define MATRIX_COL_PINS { F7, B6, F4 } -#define UNUSED_PINS /* ws2812 RGB LED */ diff --git a/keyboards/aplyard/aplx6/rev2/config.h b/keyboards/aplyard/aplx6/rev2/config.h index 2b30e67e09..a190083da5 100644 --- a/keyboards/aplyard/aplx6/rev2/config.h +++ b/keyboards/aplyard/aplx6/rev2/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 9Key PCB default pin-out */ #define MATRIX_ROW_PINS { B4, B5 } #define MATRIX_COL_PINS { C6, D7, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index 4049109827..6568cdf69d 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/arisu/config.h b/keyboards/arisu/config.h index c323bbbfed..f499c29de3 100644 --- a/keyboards/arisu/config.h +++ b/keyboards/arisu/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/arrayperipherals/1x4p1/config.h b/keyboards/arrayperipherals/1x4p1/config.h index aec5a143ee..5fd99ef30f 100644 --- a/keyboards/arrayperipherals/1x4p1/config.h +++ b/keyboards/arrayperipherals/1x4p1/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { C7, B7, D6, F5, F7} \ } -#define UNUSED_PINS /* rotary encoder*/ #define ENCODERS_PAD_A {F0} diff --git a/keyboards/ash1800/config.h b/keyboards/ash1800/config.h index 3748d87f4d..cd74024125 100644 --- a/keyboards/ash1800/config.h +++ b/keyboards/ash1800/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D0, D1, D2, D3, D5, D4, D6 } #define MATRIX_COL_PINS { F1, F4, F5, F6, B0, B2, B1, B3, B7, C7 } -#define UNUSED_PINS #define NUM_LOCK_LED_PIN E6 #define CAPS_LOCK_LED_PIN F0 diff --git a/keyboards/ash_xiix/config.h b/keyboards/ash_xiix/config.h index 10819eb8e4..2006f2de30 100644 --- a/keyboards/ash_xiix/config.h +++ b/keyboards/ash_xiix/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D0, D1, D2, D3, D5, D4, D6 } #define MATRIX_COL_PINS { F1, F4, F5, F6, B0, B2, B1, B3, B7, C7 } -#define UNUSED_PINS #define NUM_LOCK_LED_PIN E6 #define CAPS_LOCK_LED_PIN F0 diff --git a/keyboards/ashpil/modelm_usbc/config.h b/keyboards/ashpil/modelm_usbc/config.h index ccc6f2bbf8..a932d62946 100644 --- a/keyboards/ashpil/modelm_usbc/config.h +++ b/keyboards/ashpil/modelm_usbc/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, C5, C4, C3, C2, C1, C0 } #define MATRIX_COL_PINS { E6, E7, F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/atlantis/ak81_ve/config.h b/keyboards/atlantis/ak81_ve/config.h index ac9a407ccb..e097c47cb0 100644 --- a/keyboards/atlantis/ak81_ve/config.h +++ b/keyboards/atlantis/ak81_ve/config.h @@ -25,7 +25,6 @@ /* Key matrix pins */ #define MATRIX_ROW_PINS { F1, F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { F0, C7, C6, B6, B5, B4, D7, D6, B2, B7, D3, D2, D1, D0, B3 } -#define UNUSED_PINS /* Encoder pins */ #define ENCODERS_PAD_A { E6 } diff --git a/keyboards/atlas_65/config.h b/keyboards/atlas_65/config.h index 337ba015c2..412b474193 100644 --- a/keyboards/atlas_65/config.h +++ b/keyboards/atlas_65/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atomic/config.h b/keyboards/atomic/config.h index a0f38d845f..ed839dab04 100644 --- a/keyboards/atomic/config.h +++ b/keyboards/atomic/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D5, B5, B6, C6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/atreus/astar/config.h b/keyboards/atreus/astar/config.h index a925c6fb1c..34df07559a 100644 --- a/keyboards/atreus/astar/config.h +++ b/keyboards/atreus/astar/config.h @@ -34,7 +34,6 @@ #else #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } #endif -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h index 75155044de..4b5bf9d887 100644 --- a/keyboards/atreus/astar_mirrored/config.h +++ b/keyboards/atreus/astar_mirrored/config.h @@ -32,7 +32,6 @@ #define MATRIX_ROW_PINS { D0, D1, D3, D2 } #define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/f103/config.h b/keyboards/atreus/f103/config.h index e16c9ee930..d42a057ab8 100644 --- a/keyboards/atreus/f103/config.h +++ b/keyboards/atreus/f103/config.h @@ -32,7 +32,6 @@ /* key matrix pins */ #define MATRIX_COL_PINS { B10, B1, B0, A7, A6, B5, B4, B3, A15, A10, A9 } #define MATRIX_ROW_PINS { A5, A4, A3, A2 } -#define UNUSED_PINS {B12, B13, B14, B15, A8, B6, B7, B8, B9, A1, A0, C15, C14, C13} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/feather/config.h b/keyboards/atreus/feather/config.h index 72c9cd716b..ab0640681d 100644 --- a/keyboards/atreus/feather/config.h +++ b/keyboards/atreus/feather/config.h @@ -32,7 +32,6 @@ // #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } #define MATRIX_ROW_PINS { B7, D6, C7, F5 } #define MATRIX_COL_PINS { D7, B5, D1, D0, C6, B6, F0, D2, D3, F4, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/keymaps/kejadlen/config.h b/keyboards/atreus/keymaps/kejadlen/config.h index 03a48dcb4b..437bfa326e 100644 --- a/keyboards/atreus/keymaps/kejadlen/config.h +++ b/keyboards/atreus/keymaps/kejadlen/config.h @@ -4,7 +4,6 @@ #undef MATRIX_COL_PINS #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 } -/* #define UNUSED_PINS */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/keymaps/nojjan/config.h b/keyboards/atreus/keymaps/nojjan/config.h index 90b7c4a6c6..bc5c25d416 100644 --- a/keyboards/atreus/keymaps/nojjan/config.h +++ b/keyboards/atreus/keymaps/nojjan/config.h @@ -2,9 +2,7 @@ #undef MATRIX_ROW_PINS #undef MATRIX_COL_PINS -#undef UNUSED_PINS // Pin configuration for falbatech atreus #define MATRIX_ROW_PINS { D0, D1, D3, D2 } #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } -#define UNUSED_PINS diff --git a/keyboards/atreus/promicro/config.h b/keyboards/atreus/promicro/config.h index a4ed1c642d..605a7ccdae 100644 --- a/keyboards/atreus/promicro/config.h +++ b/keyboards/atreus/promicro/config.h @@ -36,7 +36,6 @@ #else #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B6, E6, D7, C6, D4, D0 } #endif -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/teensy2/config.h b/keyboards/atreus/teensy2/config.h index 4130ef9bb7..25ae56ffb6 100644 --- a/keyboards/atreus/teensy2/config.h +++ b/keyboards/atreus/teensy2/config.h @@ -30,7 +30,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at1/config.h b/keyboards/atset/at1/config.h index b5f433b879..635faf9b4e 100644 --- a/keyboards/atset/at1/config.h +++ b/keyboards/atset/at1/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D2 } #define MATRIX_COL_PINS { B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at12/config.h b/keyboards/atset/at12/config.h index 26e26fc32e..d27b4b646a 100644 --- a/keyboards/atset/at12/config.h +++ b/keyboards/atset/at12/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D3, D2, D1, D0 } #define MATRIX_COL_PINS { B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at16/config.h b/keyboards/atset/at16/config.h index da194644ba..400244a66e 100644 --- a/keyboards/atset/at16/config.h +++ b/keyboards/atset/at16/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D3, D2, D1, D0 } #define MATRIX_COL_PINS { B6, B5, B4, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at3/config.h b/keyboards/atset/at3/config.h index 094ad56a1e..5195939cf9 100644 --- a/keyboards/atset/at3/config.h +++ b/keyboards/atset/at3/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D2 } #define MATRIX_COL_PINS { B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at6/config.h b/keyboards/atset/at6/config.h index fd40ac609b..b443529631 100644 --- a/keyboards/atset/at6/config.h +++ b/keyboards/atset/at6/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D2, D1 } #define MATRIX_COL_PINS { B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atset/at9/config.h b/keyboards/atset/at9/config.h index 187442c265..bf9819c4b9 100644 --- a/keyboards/atset/at9/config.h +++ b/keyboards/atset/at9/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D2, D1, D0 } #define MATRIX_COL_PINS { B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atxkb/1894/config.h b/keyboards/atxkb/1894/config.h index 72d11a180f..1cf30b258b 100644 --- a/keyboards/atxkb/1894/config.h +++ b/keyboards/atxkb/1894/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } #define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aves60/config.h b/keyboards/aves60/config.h index 7783cc9120..8e59e88d83 100644 --- a/keyboards/aves60/config.h +++ b/keyboards/aves60/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F6, F7, F5, F1, F4 } #define MATRIX_COL_PINS { B2, B3, D0, D1, D2, D3, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS { B0, B7, E6, F0 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aves65/config.h b/keyboards/aves65/config.h index 1536787ac0..59b54ebc73 100644 --- a/keyboards/aves65/config.h +++ b/keyboards/aves65/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {D4,D6,D7,B4,E6} #define MATRIX_COL_PINS {D0,D1,D2,D3,D5,B5,F0,F1,F4,F5,F6,F7,C7,C6,B6} -#define UNUSED_PINS {B7,B1,B2,B3} /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/b_sides/rev41lp/config.h b/keyboards/b_sides/rev41lp/config.h index b2c9c01959..3628cc4db5 100644 --- a/keyboards/b_sides/rev41lp/config.h +++ b/keyboards/b_sides/rev41lp/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, B2, F5, B3, F6, B1, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 2db6f08c52..c4cb1cc373 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, E6, D6 } #define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, B0, D0, D1, D2, D3, D5, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bandominedoni/config.h b/keyboards/bandominedoni/config.h index 0e37d96d41..a7dfcb3961 100644 --- a/keyboards/bandominedoni/config.h +++ b/keyboards/bandominedoni/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { B5, B4, D7, F6, C6, D4 } #define MATRIX_COL_PINS { D1, E6, F7, B1, B3, B2, D0 } -#define UNUSED_PINS #define MASTER_RIGHT #ifndef MASTER_RIGHT diff --git a/keyboards/bandominedoni/keymaps/led/keymap.c b/keyboards/bandominedoni/keymaps/led/keymap.c index 305756b5b1..4a88d33872 100644 --- a/keyboards/bandominedoni/keymaps/led/keymap.c +++ b/keyboards/bandominedoni/keymaps/led/keymap.c @@ -180,7 +180,7 @@ void keyboard_post_init_user(void) { #ifdef RGB_MATRIX_ENABLE void rgb_matrix_indicators_user(void) { if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _CLOSE: // rgb_matrix_set_color(pgm_read_byte(&convert_led_location2number[11]), RGB_RED); // RGB_TOG <- too heavy. diff --git a/keyboards/bandominedoni/keymaps/via/keymap.c b/keyboards/bandominedoni/keymaps/via/keymap.c index ad6833d692..342ed1d40c 100644 --- a/keyboards/bandominedoni/keymaps/via/keymap.c +++ b/keyboards/bandominedoni/keymaps/via/keymap.c @@ -118,7 +118,7 @@ void keyboard_post_init_user(void) { #ifdef RGB_MATRIX_ENABLE void rgb_matrix_indicators_user(void) { if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _CLOSE: // rgb_matrix_set_color(pgm_read_byte(&convert_led_location2number[11]), RGB_RED); // RGB_TOG <- too heavy. diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index 9933ec2fb3..6e0c57c838 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // COLS: Left to right, ROWS: Top to bottom #define MATRIX_ROW_PINS { F0, D6, D4, D5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/barleycorn_smd/config.h b/keyboards/barleycorn_smd/config.h index ba9e2b9185..75db1ba447 100644 --- a/keyboards/barleycorn_smd/config.h +++ b/keyboards/barleycorn_smd/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { F5, F4, F1, F0, F6 } #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, D5, D5, D5, D5, D5, D5, D5, D5, D5, D5 } -#define UNUSED_PINS #define PORT_EXPANDER_ADDRESS 0x20 #define RGB_DI_PIN E6 diff --git a/keyboards/barracuda/config.h b/keyboards/barracuda/config.h index ea974876c7..d6cc58bd8b 100644 --- a/keyboards/barracuda/config.h +++ b/keyboards/barracuda/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { C4, C5, C6, D1, D2, D3 } #define MATRIX_COL_PINS { D4, D5, D6, B0, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c index 26ca151089..1292f2d2ed 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c @@ -46,8 +46,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index 05de0e42d0..7e82c7b7d2 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -39,8 +39,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/basketweave/config.h b/keyboards/basketweave/config.h index ee8604b8ba..88828d7ddd 100644 --- a/keyboards/basketweave/config.h +++ b/keyboards/basketweave/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { A6, C6, C7, A7, A5 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, B0, B1, B2, D5, D6, C5, C4, C3, C2, C1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bastardkb/charybdis/3x5/3x5.c b/keyboards/bastardkb/charybdis/3x5/3x5.c index d896cf6923..7b10d322cd 100644 --- a/keyboards/bastardkb/charybdis/3x5/3x5.c +++ b/keyboards/bastardkb/charybdis/3x5/3x5.c @@ -33,6 +33,10 @@ * ╰────────────────────╯ ╰────────────────────╯ * 15 16 17 33 34 XX * ╰────────────╯ ╰────────────╯ + * + * Note: the LED config simulates 36 LEDs instead of the actual 35 to prevent + * confusion when testing LEDs during assembly when handedness is not set + * correctly. Those fake LEDs are bound to the physical top-left corner. */ led_config_t g_led_config = { { /* Key Matrix to LED index. */ @@ -61,7 +65,7 @@ led_config_t g_led_config = { { /* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 }, /* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 }, /* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 }, - /* index=33 */ { 152, 64 }, { 134, 64 }, + /* index=33 */ { 134, 64 }, { 152, 64 }, { 0, 0 }, }, { /* LED index to flag. */ // Left split. @@ -77,7 +81,7 @@ led_config_t g_led_config = { { /* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, /* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, /* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, - /* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster + /* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster } }; #endif // clang-format on diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/config.h b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h new file mode 100644 index 0000000000..ddd5e83318 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM and pmw3360 sensor. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B14 +#define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/xelus/dharma/keymaps/default/config.h b/keyboards/bastardkb/charybdis/3x5/blackpill/halconf.h index 5d972dd48c..a89dff0cd3 100644 --- a/keyboards/xelus/dharma/keymaps/default/config.h +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/halconf.h @@ -1,4 +1,6 @@ -/* Copyright 2021 Harrison Chan (Xelus) +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,6 +15,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #pragma once -#define QMK_KEYS_PER_SCAN 4 +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +//#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +//#define HAL_USE_GPT TRUE + +#include_next "halconf.h" diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/info.json b/keyboards/bastardkb/charybdis/3x5/blackpill/info.json new file mode 100644 index 0000000000..1e347df9b2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Nano (3x5) Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/mcuconf.h b/keyboards/bastardkb/charybdis/3x5/blackpill/mcuconf.h new file mode 100644 index 0000000000..1615d1bf46 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/mcuconf.h @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_I2C_I2C1_RX_DMA_STREAM +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#undef STM32_I2C_I2C1_TX_DMA_STREAM +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SPI_SPI1_RX_DMA_STREAM +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#undef STM32_SPI_SPI1_TX_DMA_STREAM +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +// #undef STM32_SERIAL_USE_USART2 +// #define STM32_SERIAL_USE_USART2 TRUE + +// #undef STM32_UART_USART2_RX_DMA_STREAM +// #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +// #undef STM32_UART_USART2_TX_DMA_STREAM +// #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/readme.md b/keyboards/bastardkb/charybdis/3x5/blackpill/readme.md new file mode 100644 index 0000000000..7ef08798b8 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/readme.md @@ -0,0 +1,3 @@ +# Charybdis Nano (3x5) BlackPill + +An ergonomic keyboard with integrated trackball, with BlackPill (STM32F411) mod. diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk b/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk new file mode 100644 index 0000000000..0f732c2cbd --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/rules.mk @@ -0,0 +1,41 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +# Charybdis nano is a split 3x5 keyboard with a maximum of 3 thumb keys (2 on +# the trackball side). +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 # Support community layout, in particular Manna-Harbour's Miryoku layout + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/charybdis/3x5/config.h b/keyboards/bastardkb/charybdis/3x5/config.h index 89b896bc35..57634258be 100644 --- a/keyboards/bastardkb/charybdis/3x5/config.h +++ b/keyboards/bastardkb/charybdis/3x5/config.h @@ -18,58 +18,24 @@ #pragma once -#define VENDOR_ID 0xA8F8 -#define PRODUCT_ID 0x1832 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Bastard Keyboards -#define PRODUCT Charybdis Nano +#include "config_common.h" /* Key matrix configuration. */ - -// Rows are doubled-up. -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 8 // Rows are doubled-up. #define MATRIX_COLS 5 -// Wiring configuration for each half. -#define MATRIX_ROW_PINS \ - { B7, C6, D4, B5 } -#define MATRIX_COL_PINS \ - { C7, F0, D7, E6, B4 } - -#define MATRIX_ROW_PINS_RIGHT \ - { F0, C6, D4, B5 } -#define MATRIX_COL_PINS_RIGHT \ - { C7, B7, D7, E6, B4 } - #define DIODE_DIRECTION ROW2COL -/* Handedness. */ -#define MASTER_RIGHT - -/* Bootmagic Lite configuration. */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 -#define BOOTMAGIC_LITE_ROW_RIGHT 4 -#define BOOTMAGIC_LITE_COLUMN_RIGHT 0 - -/* serial.c configuration (for split keyboard) */ -#define SOFT_SERIAL_PIN D2 - /* Set 0 if debouncing isn't needed. */ #define DEBOUNCE 5 -/* PMW3360 settings. */ -#define PMW3360_CS_PIN B0 - -// Trackball angle adjustment. +/* Trackball angle adjustment. */ #define ROTATIONAL_TRANSFORM_ANGLE -25 /* RGB settings. */ - -#define RGB_DI_PIN D3 -#define RGBLED_NUM 35 +#define RGBLED_NUM 36 #define RGBLED_SPLIT \ - { 18, 17 } + { 18, 18 } /* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x5/info.json b/keyboards/bastardkb/charybdis/3x5/info.json index 03fb05664f..ece533944e 100644 --- a/keyboards/bastardkb/charybdis/3x5/info.json +++ b/keyboards/bastardkb/charybdis/3x5/info.json @@ -1,7 +1,8 @@ { - "keyboard_name": "Charybdis Nano", - "url": "https://www.bastardkb.com", - "maintainer": "Quentin Lebastard", + "url": "https://bastardkb.com/charybdis-nano", + "usb": { + "pid": "0x1832", + }, "layouts": { "LAYOUT_charybdis_3x5": { "layout": [ diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/README.md b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/README.md new file mode 100644 index 0000000000..5d9f7fcd5f --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/README.md @@ -0,0 +1,3 @@ +# Charybdis (3x5) @bstiq keymap + +Inspired from Miryoku, using home-rows. diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h new file mode 100644 index 0000000000..699a700063 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/config.h @@ -0,0 +1,166 @@ +/** + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifdef VIA_ENABLE +/* Via configuration. */ +# define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#endif // VIA_ENABLE + +#ifndef __arm__ +/* Disable unused features. */ +# define NO_ACTION_ONESHOT +#endif // __arm__ + +/** + * Configure the global tapping term (default: 200ms). + * If you have a lot of accidental mod activations, crank up the tapping term. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term + */ +#ifndef TAPPING_TERM +# define TAPPING_TERM 160 +#endif // TAPPING_TERM + +/** + * Enable rapid switch from tap to hold. Disable auto-repeat when pressing key + * twice, except for one-shot keys. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-force-hold + */ +#define TAPPING_FORCE_HOLD + +/* + * Tap-or-Hold decision modes. + * + * Note that the following flags behave differently when combined (ie. when 2 or + * more are enabled). + * + * See bit.ly/tap-or-hold for a visual explanation of the following tap-or-hold + * decision modes. + */ + +/** + * Faster tap-hold trigger. + * + * Without `PERMISSIVE_HOLD`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 e🠕 Mod(a)🠕 âžž ae + * With `PERMISSIVE_HOLD`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 e🠕 Mod(a)🠕 âžž Mod+e + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold + */ +#define PERMISSIVE_HOLD + +/** + * Prevent normal rollover on alphas from accidentally triggering mods. + * + * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. + * + * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 âžž Mod+e + * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 âžž ae + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#ignore-mod-tap-interrupt + */ +#define IGNORE_MOD_TAP_INTERRUPT + +/** Charybdis-specific features. */ + +#ifdef POINTING_DEVICE_ENABLE +// Automatically enable the pointer layer when moving the trackball. See also: +// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS` +// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD` +// #define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE + +// Flip horizontal direction for drag-scroll. +# define CHARYBDIS_DRAGSCROLL_REVERSE_X +// #define CHARYBDIS_DRAGSCROLL_REVERSE_Y +#endif // POINTING_DEVICE_ENABLE + +/** RGB Matrix. */ + +#ifdef RGB_MATRIX_ENABLE +# ifdef __arm__ +// Enable all animations on ARM boards since they have plenty of memory +// available for it. +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# else +// Disable control of RGB matrix by keycodes (must use firmware implementation +// to control the feature). +# define RGB_MATRIX_DISABLE_KEYCODES +# endif + +// Limit maximum brightness to keep power consumption reasonable, and avoid +// disconnects. +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 64 + +// Rainbow swirl as startup mode. +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +// Slow swirl at startup. +# define RGB_MATRIX_STARTUP_SPD 32 + +// Startup values. +# define RGB_MATRIX_STARTUP_HUE 0 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/keymap.c new file mode 100644 index 0000000000..ca67dd690c --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/keymap.c @@ -0,0 +1,224 @@ +/** + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum charybdis_keymap_bstiq_layers { + LAYER_BASE = 0, + LAYER_MBO, + LAYER_MEDIA, + LAYER_NAV, + LAYER_MOUSE, + LAYER_SYM, + LAYER_NUM, + LAYER_FUN, +}; + +// Automatically enable sniping when the mouse layer is on. +#define CHARYBDIS_AUTO_SNIPING_ON_LAYER LAYER_MOUSE + +#define BSP_NAV LT(LAYER_NAV, KC_BSPC) +#define ENT_MBO LT(LAYER_MBO, KC_ENT) +#define TAB_MED LT(LAYER_MEDIA, KC_TAB) +#define ESC_SYM LT(LAYER_SYM, KC_ESC) +#define SPC_NUM LT(LAYER_NUM, KC_SPC) +#define MOUSE(KC) LT(LAYER_MOUSE, KC) + +#define USR_RDO KC_AGAIN +#define USR_PST S(KC_INS) +#define USR_CPY C(KC_INS) +#define USR_CUT S(KC_DEL) +#define USR_UND KC_UNDO + +#define MS_L KC_MS_LEFT +#define MS_R KC_MS_RIGHT +#define MS_D KC_MS_DOWN +#define MS_U KC_MS_UP + +#define WH_L KC_MS_WH_LEFT +#define WH_R KC_MS_WH_RIGHT +#define WH_D KC_MS_WH_DOWN +#define WH_U KC_MS_WH_UP + +// clang-format off +/** Convenience macro. */ +#define _KC_LAYOUT_wrapper( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + ...) \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, \ + __VA_ARGS__ +#define KC_LAYOUT_wrapper(...) _KC_LAYOUT_wrapper(__VA_ARGS__) + +/** Base layer with BÉPO layout. */ +#define LAYOUT_LAYER_BASE_BEPO KC_LAYOUT_wrapper( \ + B, Z, P, O, QUOT, DOT, V, D, L, J, \ + A, U, I, E, COMM, C, T, S, R, N, \ + W, Y, X, SLSH, K, M, Q, G, H, F, \ + BSP_NAV, ENT_MBO, TAB_MED, ESC_SYM, SPC_NUM) + +/** Convenience key shorthands. */ +#define U_NA KC_NO // Present but not available for use. +#define U_NU KC_NO // Available but not used. + +/** Convenience row shorthands. */ +#define __________________RESET_L__________________ QK_BOOT, U_NA, U_NA, U_NA, U_NA +#define __________________RESET_R__________________ U_NA, U_NA, U_NA, U_NA, QK_BOOT +#define ______________HOME_ROW_GASC_L______________ KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, U_NA +#define ______________HOME_ROW_ALGR_L______________ U_NA, KC_ALGR, U_NA, U_NA, U_NA +#define ______________HOME_ROW_GASC_R______________ U_NA, KC_LCTL, KC_LSFT, KC_LALT, KC_LGUI +#define ______________HOME_ROW_ALGR_R______________ U_NA, U_NA, U_NA, KC_ALGR, U_NA + +/** Layers. */ + +// Buttons. +#define LAYOUT_LAYER_MBO \ + __________________RESET_L__________________, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + ______________HOME_ROW_GASC_L______________, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \ + KC_BTN3, KC_ALGR, KC_BTN2, KC_BTN1, U_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, \ + U_NA, U_NA, U_NA, KC_ENT, KC_DEL + +// Media. +#define LAYOUT_LAYER_MEDIA \ + __________________RESET_L__________________, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + ______________HOME_ROW_GASC_L______________, U_NU, MS_L, MS_D, MS_U, MS_R, \ + ______________HOME_ROW_ALGR_L______________, U_NU, WH_L, WH_D, WH_U, WH_R, \ + U_NA, U_NA, U_NA, KC_BTN1, KC_BTN3 + +// Navigation. +#define LAYOUT_LAYER_NAV \ + __________________RESET_L__________________, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, \ + ______________HOME_ROW_GASC_L______________, U_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, \ + ______________HOME_ROW_ALGR_L______________, U_NU, U_NU, U_NU, U_NU, U_NU, \ + U_NA, U_NA, U_NA, KC_MSTP, KC_MPLY + +// Mouse. +#define LAYOUT_LAYER_MOUSE \ + S_D_MOD, USR_PST, USR_CPY, USR_CUT, USR_UND, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + DPI_MOD, DRGSCRL, KC_LSFT, KC_LCTL, _______, U_NU, MS_L, MS_D, MS_U, MS_R, \ + USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, U_NU, WH_L, WH_D, WH_U, WH_R, \ + KC_BTN2, KC_BTN1, KC_BTN3, KC_BTN1, KC_BTN3 + +// Symbols. +#define LAYOUT_LAYER_SYM \ + KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, __________________RESET_R__________________, \ + KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, ______________HOME_ROW_GASC_R______________, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, ______________HOME_ROW_ALGR_R______________, \ + KC_LPRN, KC_RPRN, KC_UNDS, U_NA, U_NA + +// Numerals. +#define LAYOUT_LAYER_NUM \ + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, __________________RESET_R__________________, \ + KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, ______________HOME_ROW_GASC_R______________, \ + KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, ______________HOME_ROW_ALGR_R______________, \ + KC_DOT, KC_0, KC_MINS, U_NA, U_NA + +// Function keys. +#define LAYOUT_LAYER_FUN \ + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, __________________RESET_R__________________, \ + KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, ______________HOME_ROW_GASC_R______________, \ + KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, ______________HOME_ROW_ALGR_R______________,\ + KC_APP, KC_SPC, KC_TAB, U_NA, U_NA + +/** + * Add Home Row mod to a layout. + * + * Expects a 10-key per row layout. Adds support for GASC (Gui, Alt, Shift, Ctl) + * home row. The layout passed in parameter must contain at least 20 keycodes. + * + * This is meant to be used with `LAYOUT_LAYER_BASE_BEPO` defined above, eg.: + * + * HOME_ROW_MOD_GASC(LAYOUT_LAYER_BASE_BEPO) + */ +#define _HOME_ROW_MOD_GASC( \ + L00, L01, L02, L03, L04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, R15, R16, R17, R18, R19, \ + ...) \ + L00, L01, L02, L03, L04, \ + R05, R06, R07, R08, R09, \ + LGUI_T(L10), LALT_T(L11), LSFT_T(L12), LCTL_T(L13), L14, \ + R15, RCTL_T(R16), RSFT_T(R17), LALT_T(R18), RGUI_T(R19), \ + __VA_ARGS__ +#define HOME_ROW_MOD_GASC(...) _HOME_ROW_MOD_GASC(__VA_ARGS__) + +/** + * Add mouse layer keys to a layout. + * + * Expects a 10-key per row layout. The layout passed in parameter must contain + * at least 30 keycodes. + * + * This is meant to be used with `LAYOUT_LAYER_BASE_BEPO` defined above, eg.: + * + * MOUSE_MOD(LAYOUT_LAYER_BASE_BEPO) + */ +#define _MOUSE_MOD( \ + L00, L01, L02, L03, L04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, R25, R26, R27, R28, R29, \ + ...) \ + L00, L01, L02, L03, L04, \ + R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, \ + R15, R16, R17, R18, R19, \ + MOUSE(L20), L21, L22, L23, L24, \ + R25, R26, R27, R28, MOUSE(R29), \ + __VA_ARGS__ +#define MOUSE_MOD(...) _MOUSE_MOD(__VA_ARGS__) + +#define LAYOUT_wrapper(...) LAYOUT_charybdis_3x5(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_wrapper( + MOUSE_MOD(HOME_ROW_MOD_GASC(LAYOUT_LAYER_BASE_BEPO)) + ), + [LAYER_MBO] = LAYOUT_wrapper(LAYOUT_LAYER_MBO), + [LAYER_MEDIA] = LAYOUT_wrapper(LAYOUT_LAYER_MEDIA), + [LAYER_NAV] = LAYOUT_wrapper(LAYOUT_LAYER_NAV), + [LAYER_MOUSE] = LAYOUT_wrapper(LAYOUT_LAYER_MOUSE), + [LAYER_SYM] = LAYOUT_wrapper(LAYOUT_LAYER_SYM), + [LAYER_NUM] = LAYOUT_wrapper(LAYOUT_LAYER_NUM), + [LAYER_FUN] = LAYOUT_wrapper(LAYOUT_LAYER_FUN), +}; +// clang-format on + +#if defined(POINTING_DEVICE_ENABLE) && defined(CHARYBDIS_AUTO_SNIPING_ON_LAYER) +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + charybdis_set_pointer_sniping_enabled(layer_state_cmp(state, CHARYBDIS_AUTO_SNIPING_ON_LAYER)); + return state; +} +#endif // POINTING_DEVICE_ENABLE && CHARYBDIS_AUTO_SNIPING_ON_LAYER + +#ifdef RGB_MATRIX_ENABLE +// Forward-declare this helper function since it is defined in rgb_matrix.c. +void rgb_matrix_update_pwm_buffers(void); +#endif + +void shutdown_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_color_all(RGB_RED); + rgb_matrix_update_pwm_buffers(); +#endif // RGB_MATRIX_ENABLE +} diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/rules.mk b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/rules.mk new file mode 100644 index 0000000000..5d91064607 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/rules.mk @@ -0,0 +1,10 @@ +ifeq ($(MCU),atmega32u4) + # Space saving settings. + TAP_DANCE_ENABLE = no + COMBO_ENABLE = no + QMK_SETTINGS = no +else ifeq ($(MCU),STM32F411) + EEPROM_DRIVER = vendor +endif + +VIA_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/default/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/default/keymap.c index cb578aa8d6..148f026740 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/default/keymap.c +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/default/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_4, KC_5, KC_6, KC_PMNS, // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ - XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS, + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS, // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ XXXXXXX, XXXXXXX, _______, XXXXXXX, _______ // ╰───────────────────────────╯ ╰──────────────────╯ @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ - KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, + KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ _______, _______, XXXXXXX, _______, XXXXXXX // ╰───────────────────────────╯ ╰──────────────────╯ diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h index 0f08aee9ef..39204a3667 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h @@ -98,10 +98,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define EXTERNAL_EEPROM_ADDRESS_SIZE 2 /* pmw3360 config */ -#undef PMW3360_CS_PIN -#define PMW3360_CS_PIN B0 -#define PMW3360_SPI_MODE 3 -#define PMW3360_SPI_DIVISOR 64 +#undef PMW33XX_CS_PIN +#define PMW33XX_CS_PIN B0 #define CHARYBDIS_MINIMUM_DEFAULT_DPI 1200 #define CHARYBDIS_DEFAULT_DPI_CONFIG_STEP 400 diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h index f515d85334..d20131e9cf 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/via/config.h @@ -19,7 +19,7 @@ #ifdef VIA_ENABLE /* VIA configuration. */ # define DYNAMIC_KEYMAP_LAYER_COUNT 7 -#endif // VIA_ENABLE +#endif // VIA_ENABLE /* Disable unused features. */ #define NO_ACTION_ONESHOT @@ -33,7 +33,7 @@ * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term */ # define TAPPING_TERM 200 -#endif // TAPPING_TERM +#endif // TAPPING_TERM /** * \brief Enable rapid switch from tap to hold. @@ -84,16 +84,11 @@ /* Charybdis-specific features. */ #ifdef POINTING_DEVICE_ENABLE -// Enable pointer acceleration, which increases the speed by ~2x for large -// displacement, while maintaining 1x speed for slow movements. See also: -// - `CHARYBDIS_POINTER_ACCELERATION_FACTOR` -# define CHARYBDIS_POINTER_ACCELERATION_ENABLE - // Automatically enable the pointer layer when moving the trackball. See also: // - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS` // - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD` // #define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE -#endif // POINTING_DEVICE_ENABLE +#endif // POINTING_DEVICE_ENABLE /* RGB Matrix. */ @@ -115,4 +110,4 @@ # define RGB_MATRIX_STARTUP_SAT 255 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/via/keymap.c b/keyboards/bastardkb/charybdis/3x5/keymaps/via/keymap.c index dc02ed34c6..b54c58cf0c 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/via/keymap.c +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/via/keymap.c @@ -18,7 +18,7 @@ #ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE # include "timer.h" -#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE enum charybdis_keymap_layers { LAYER_BASE = 0, @@ -38,12 +38,12 @@ static uint16_t auto_pointer_layer_timer = 0; # ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS # define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS 1000 -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS # ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD # define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD 8 -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD -#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD +#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE #define ESC_MED LT(LAYER_MEDIA, KC_ESC) #define SPC_NAV LT(LAYER_NAVIGATION, KC_SPC) @@ -52,6 +52,13 @@ static uint16_t auto_pointer_layer_timer = 0; #define BSP_NUM LT(LAYER_NUMERAL, KC_BSPC) #define _L_PTR(KC) LT(LAYER_POINTER, KC) +#ifndef POINTING_DEVICE_ENABLE +# define DRGSCRL KC_NO +# define DPI_MOD KC_NO +# define S_D_MOD KC_NO +# define SNIPING KC_NO +#endif // !POINTING_DEVICE_ENABLE + // clang-format off /** \brief QWERTY layout (3 rows, 10 columns). */ #define LAYOUT_LAYER_BASE \ @@ -98,14 +105,14 @@ static uint16_t auto_pointer_layer_timer = 0; #define LAYOUT_LAYER_MEDIA \ XXXXXXX,RGB_RMOD, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX,RGB_RMOD, RGB_TOG, RGB_MOD, XXXXXXX, \ KC_MPRV, KC_VOLD, KC_MUTE, KC_VOLU, KC_MNXT, KC_MPRV, KC_VOLD, KC_MUTE, KC_VOLU, KC_MNXT, \ - XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, \ _______, KC_MPLY, KC_MSTP, KC_MSTP, KC_MPLY /** \brief Mouse emulation and pointer functions. */ #define LAYOUT_LAYER_POINTER \ XXXXXXX, XXXXXXX, XXXXXXX, DPI_MOD, S_D_MOD, S_D_MOD, DPI_MOD, XXXXXXX, XXXXXXX, XXXXXXX, \ ______________HOME_ROW_GACS_L______________, ______________HOME_ROW_GACS_R______________, \ - _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, \ + _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, \ KC_BTN2, KC_BTN1, KC_BTN3, KC_BTN3, KC_BTN1 /** @@ -217,36 +224,35 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { # ifdef RGB_MATRIX_ENABLE rgb_matrix_mode_noeeprom(RGB_MATRIX_NONE); rgb_matrix_sethsv_noeeprom(HSV_GREEN); -# endif // RGB_MATRIX_ENABLE +# endif // RGB_MATRIX_ENABLE } auto_pointer_layer_timer = timer_read(); } return mouse_report; } -void matrix_scan_kb(void) { +void matrix_scan_user(void) { if (auto_pointer_layer_timer != 0 && TIMER_DIFF_16(timer_read(), auto_pointer_layer_timer) >= CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS) { auto_pointer_layer_timer = 0; layer_off(LAYER_POINTER); # ifdef RGB_MATRIX_ENABLE rgb_matrix_mode_noeeprom(RGB_MATRIX_STARTUP_MODE); -# endif // RGB_MATRIX_ENABLE +# endif // RGB_MATRIX_ENABLE } - matrix_scan_user(); } -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE # ifdef CHARYBDIS_AUTO_SNIPING_ON_LAYER -layer_state_t layer_state_set_kb(layer_state_t state) { - state = layer_state_set_user(state); +layer_state_t layer_state_set_user(layer_state_t state) { charybdis_set_pointer_sniping_enabled(layer_state_cmp(state, CHARYBDIS_AUTO_SNIPING_ON_LAYER)); return state; } -# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER -#endif // POINTING_DEVICE_ENABLE +# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER +#endif // POINTING_DEVICE_ENABLE #ifdef RGB_MATRIX_ENABLE -// Forward-declare this helper function since it is defined in rgb_matrix.c. +// Forward-declare this helper function since it is defined in +// rgb_matrix.c. void rgb_matrix_update_pwm_buffers(void); #endif @@ -255,9 +261,9 @@ void shutdown_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color_all(RGB_RED); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE } diff --git a/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h b/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h new file mode 100644 index 0000000000..3e3d95174c --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h @@ -0,0 +1,42 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { C7, F0, D7, E6, B4 } + +#define MATRIX_ROW_PINS_RIGHT \ + { F0, C6, D4, B5 } +#define MATRIX_COL_PINS_RIGHT \ + { C7, B7, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/3x5/v1/elitec/info.json b/keyboards/bastardkb/charybdis/3x5/v1/elitec/info.json new file mode 100644 index 0000000000..9071212f33 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Nano (3x5) Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x5/rules.mk b/keyboards/bastardkb/charybdis/3x5/v1/elitec/rules.mk index c5f3f0fb8c..22bd22652a 100644 --- a/keyboards/bastardkb/charybdis/3x5/rules.mk +++ b/keyboards/bastardkb/charybdis/3x5/v1/elitec/rules.mk @@ -23,10 +23,6 @@ RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by def RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality RGB_MATRIX_DRIVER = WS2812 -# Enable link-time optimization by default. The Charybdis packs a lot of -# features (RGB, Via, trackball) in a small atmega32u4 package. -LTO_ENABLE = yes - # Charybdis nano is a split 3x5 keyboard with a maximum of 3 thumb keys (2 on # the trackball side). SPLIT_KEYBOARD = yes @@ -34,5 +30,8 @@ LAYOUTS = split_3x5_3 # Support community layout, in particular Manna-Harbour's POINTING_DEVICE_ENABLE = yes # Enable trackball POINTING_DEVICE_DRIVER = pmw3360 -# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h b/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h new file mode 100644 index 0000000000..5c11fa3145 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h @@ -0,0 +1,36 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/3x5/v2/elitec/info.json b/keyboards/bastardkb/charybdis/3x5/v2/elitec/info.json new file mode 100644 index 0000000000..7c90e5d5a3 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Nano (3x5) Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x5/v2/elitec/rules.mk b/keyboards/bastardkb/charybdis/3x5/v2/elitec/rules.mk new file mode 100644 index 0000000000..22bd22652a --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/elitec/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +# Charybdis nano is a split 3x5 keyboard with a maximum of 3 thumb keys (2 on +# the trackball side). +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 # Support community layout, in particular Manna-Harbour's Miryoku layout + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h b/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h new file mode 100644 index 0000000000..2929d3dd1e --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* SPI & PMW3360 settings. */ +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP18 +#define SPI_MOSI_PIN GP19 +#define SPI_MISO_PIN GP20 +#define PMW33XX_CS_PIN GP14 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky/info.json b/keyboards/bastardkb/charybdis/3x5/v2/splinky/info.json new file mode 100644 index 0000000000..1aa1e8811d --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Nano (3x5) Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky/mcuconf.h b/keyboards/bastardkb/charybdis/3x5/v2/splinky/mcuconf.h new file mode 100644 index 0000000000..0fdd67c3a2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky/mcuconf.h @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky/rules.mk b/keyboards/bastardkb/charybdis/3x5/v2/splinky/rules.mk new file mode 100644 index 0000000000..21a9506077 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/charybdis/3x6/3x6.c b/keyboards/bastardkb/charybdis/3x6/3x6.c new file mode 100644 index 0000000000..beb04efc0b --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/3x6.c @@ -0,0 +1,91 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "3x6.h" + +// clang-format off +#ifdef RGB_MATRIX_ENABLE +/** + * \brief LEDs index. + * + # 0,0 14 28 42 56 70 84 98 126 140 154 168 182 196 210 224,0 + # 0,0 15 30 45 60 75 90 105 119 134 149 164 179 194 209 224,0 + * â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + * 0 5 6 11 12 15 36 33 32 27 26 21 + * ├────────────────────────┤ ├────────────────────────┤ + * 1 4 7 10 13 16 37 34 31 28 25 22 + * ├────────────────────────┤ ├────────────────────────┤ + * 2 3 8 9 14 17 38 35 30 29 24 23 + * ╰────────────────────────╯ ╰────────────────────────╯ + * 18 19 20 39 40 XX + * ╰────────────╯ ╰────────────╯ + * + * Note: the LED config simulates 42 LEDs instead of the actual 41 to prevent + * confusion when testing LEDs during assembly when handedness is not set + * correctly. Those fake LEDs are bound to the physical top-left corner. + */ +led_config_t g_led_config = { { + /* Key Matrix to LED index. */ + // Left split. + { 0, 5, 6, 11, 12, 15 }, // Top row + { 1, 4, 7, 10, 13, 16 }, // Middle row + { 2, 3, 8, 9, 14, 17 }, // Bottom row + { NO_LED, 20, NO_LED, 18, 19, NO_LED }, // Thumb cluster + // Right split. + { 21, 26, 27, 32, 33, 36 }, // Top row + { 22, 25, 28, 31, 34, 37 }, // Middle row + { 23, 24, 29, 30, 35, 38 }, // Bottom row + { NO_LED, 41, NO_LED, 39, 40, NO_LED }, // Thumb cluster +}, { + /* LED index to physical position. */ + // Left split. + /* index=0 */ { 0, 0 }, { 0, 21 }, { 0, 42 }, // col 1 (left most) + /* index=3 */ { 15, 42 }, { 15, 21 }, { 15, 0 }, // col 2 + /* index=6 */ { 30, 0 }, { 30, 21 }, { 30, 42 }, + /* index=9 */ { 45, 42 }, { 45, 21 }, { 45, 0 }, + /* index=12 */ { 60, 0 }, { 60, 21 }, { 60, 42 }, + /* index=15 */ { 75, 0 }, { 75, 21 }, { 75, 42 }, + /* index=18 */ { 75, 64 }, { 90, 64 }, { 105, 64 }, // Thumb cluster + // Right split. + /* index=21 */ { 224, 0 }, { 224, 21 }, { 224, 42 }, // col 12 (right most) + /* index=24 */ { 209, 42 }, { 209, 21 }, { 209, 0 }, // col 10 + /* index=27 */ { 194, 0 }, { 194, 21 }, { 194, 42 }, + /* index=30 */ { 179, 42 }, { 179, 21 }, { 179, 0 }, + /* index=33 */ { 164, 0 }, { 164, 21 }, { 164, 42 }, + /* index=36 */ { 149, 0 }, { 149, 21 }, { 149, 42 }, + /* index=39 */ { 119, 64 }, { 134, 64 }, { 0, 0 }, // Thumb cluster +}, { + /* LED index to flag. */ + // Left split. + /* index=0 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 1 + /* index=3 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 2 + /* index=6 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=9 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=12 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=15 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=18 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster + // Right split. + /* index=21 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 10 + /* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 9 + /* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=36 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + /* index=39 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster +} }; +#endif +// clang-format on diff --git a/keyboards/bastardkb/charybdis/3x6/3x6.h b/keyboards/bastardkb/charybdis/3x6/3x6.h new file mode 100644 index 0000000000..bf5de31036 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/3x6.h @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "charybdis.h" + +// clang-format off +#define LAYOUT_charybdis_3x6( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k33, k34, k31, k71, k73 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { KC_NO, k31, KC_NO, k33, k34, KC_NO }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { KC_NO, k71, KC_NO, k73, KC_NO, KC_NO }, \ +} + +/** + * \brief Compatibility layout with the split_3x5_6 community layout. + * + * This effectively renders the Charbdis Nano compatible with existing layout + * implementations relying on the `split_3x6_3` layout. + */ +#define LAYOUT_split_3x6_3( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k33, k34, k31, k71, k73, ___ \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { KC_NO, k31, KC_NO, k33, k34, KC_NO }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { KC_NO, k71, KC_NO, k73, KC_NO, KC_NO }, \ +} +// clang-format on diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/config.h b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h new file mode 100644 index 0000000000..1b90a3076b --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B0, B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM and pmw3360 sensor. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B14 +#define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/halconf.h b/keyboards/bastardkb/charybdis/3x6/blackpill/halconf.h new file mode 100644 index 0000000000..42d7499907 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/halconf.h @@ -0,0 +1,26 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next "halconf.h" diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/info.json b/keyboards/bastardkb/charybdis/3x6/blackpill/info.json new file mode 100644 index 0000000000..73a1359e00 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Mini (3x6) Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/mcuconf.h b/keyboards/bastardkb/charybdis/3x6/blackpill/mcuconf.h new file mode 100644 index 0000000000..26645d8c1a --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/mcuconf.h @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SPI_SPI1_RX_DMA_STREAM +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#undef STM32_SPI_SPI1_TX_DMA_STREAM +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/readme.md b/keyboards/bastardkb/charybdis/3x6/blackpill/readme.md new file mode 100644 index 0000000000..6a9907c2ae --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/readme.md @@ -0,0 +1,3 @@ +# Charybdis Mini (3x6) BlackPill + +An ergonomic keyboard with integrated trackball, with BlackPill (STM32F411) mod. diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk b/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk new file mode 100644 index 0000000000..a29e3e433d --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/rules.mk @@ -0,0 +1,39 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/charybdis/3x6/config.h b/keyboards/bastardkb/charybdis/3x6/config.h new file mode 100644 index 0000000000..6b31a773fc --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/config.h @@ -0,0 +1,49 @@ +/* + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* Key matrix configuration. */ +#define MATRIX_ROWS 8 // Rows are doubled-up. +#define MATRIX_COLS 6 + +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed. */ +#define DEBOUNCE 5 + +/* Trackball angle adjustment. */ +#define ROTATIONAL_TRANSFORM_ANGLE -25 + +/* RGB settings. */ +#define RGBLED_NUM 42 +#define RGBLED_SPLIT \ + { 21, 21 } + +/* RGB matrix support. */ +#ifdef RGB_MATRIX_ENABLE +# define SPLIT_TRANSPORT_MIRROR +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT RGBLED_SPLIT +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/bastardkb/charybdis/3x6/info.json b/keyboards/bastardkb/charybdis/3x6/info.json new file mode 100644 index 0000000000..0b4428cdbe --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/info.json @@ -0,0 +1,99 @@ +{ + "url": "https://bastardkb.com", + "usb": { + "pid": "0x1834", + }, + "layouts": { + "LAYOUT_charybdis_3x6": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L33", "x":5, "y":3}, + {"label":"L34", "x":6, "y":3}, + {"label":"L31", "x":7, "y":3}, + {"label":"R31", "x":9, "y":3}, + {"label":"R33", "x":10, "y":3} + ] + }, + "LAYOUT_split_3x6_3": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L33", "x":5, "y":3}, + {"label":"L34", "x":6, "y":3}, + {"label":"L31", "x":7, "y":3}, + {"label":"R33", "x":9, "y":3}, + {"label":"R34", "x":10, "y":3}, + {"label":"R31", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/default/config.h b/keyboards/bastardkb/charybdis/3x6/keymaps/default/config.h new file mode 100644 index 0000000000..4b1bae3ca0 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/default/config.h @@ -0,0 +1,54 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifndef TAPPING_TERM +/** + * \brief Configure the global tapping term (default: 200ms). + * + * If you have a lot of accidental mod activations, crank up the tapping term. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term + */ +# define TAPPING_TERM 200 +#endif // TAPPING_TERM + +/* RGB Matrix. */ + +#ifdef RGB_MATRIX_ENABLE +// Disable control of RGB matrix by keycodes (must use firmware implementation +// to control the feature). +# define RGB_MATRIX_DISABLE_KEYCODES + +// Limit maximum brightness to keep power consumption reasonable, and avoid +// disconnects. +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 64 + +// Rainbow swirl as startup mode. +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +// Slow swirl at startup. +# define RGB_MATRIX_STARTUP_SPD 32 + +// Startup values. +# define RGB_MATRIX_STARTUP_HUE 0 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/default/keymap.c b/keyboards/bastardkb/charybdis/3x6/keymaps/default/keymap.c new file mode 100644 index 0000000000..fee8d87ad6 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum charybdis_keymap_layers { + LAYER_BASE = 0, + LAYER_LOWER, + LAYER_RAISE, +}; + +#define LOWER MO(LAYER_LOWER) +#define RAISE MO(LAYER_RAISE) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_LGUI, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RGUI, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + KC_BSPC, KC_SPC, LOWER, RAISE, KC_ENT + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_LOWER] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + XXXXXXX, RGB_TOG, KC_MNXT, KC_MPLY, KC_MPRV, XXXXXXX, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_4, KC_5, KC_6, KC_PMNS, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS, XXXXXXX, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + XXXXXXX, XXXXXXX, _______, XXXXXXX, _______ + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_RAISE] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + _______, _______, XXXXXXX, _______, XXXXXXX + // ╰───────────────────────────╯ ╰──────────────────╯ + ), +}; +// clang-format on diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/default/readme.md b/keyboards/bastardkb/charybdis/3x6/keymaps/default/readme.md new file mode 100644 index 0000000000..8b407f68a2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# Charybdis Mini (3x6) default keymap + +> :bulb: Have a look at the [`via` keymap](../via) for a more feature-rich layout. + +The Charydbis Mini (3x6) default keymap is inspired from the original [Dactyl Manuform](../../../../../handwired/dactyl_manuform) default keymap. + +This layout supports RGB matrix. However, due to space constraints on the MCU, only a limited number of effect can be enabled at once. Look at the `config.h` file and enable your favorite effect. diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/via/config.h b/keyboards/bastardkb/charybdis/3x6/keymaps/via/config.h new file mode 100644 index 0000000000..abbf492089 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/via/config.h @@ -0,0 +1,71 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifdef VIA_ENABLE +/* VIA configuration. */ +# define DYNAMIC_KEYMAP_LAYER_COUNT 4 +#endif // VIA_ENABLE + +/* Disable unused features. */ +#define NO_ACTION_ONESHOT + +#ifndef TAPPING_TERM +/** + * \brief Configure the global tapping term (default: 200ms). + * + * If you have a lot of accidental mod activations, crank up the tapping term. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term + */ +# define TAPPING_TERM 200 +#endif // TAPPING_TERM + +/* Charybdis-specific features. */ + +#ifdef POINTING_DEVICE_ENABLE +// Automatically enable the pointer layer when moving the trackball. See also: +// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS` +// - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD` +// #define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +#endif // POINTING_DEVICE_ENABLE + +/* RGB Matrix. */ + +#ifdef RGB_MATRIX_ENABLE +// Disable control of RGB matrix by keycodes (must use firmware implementation +// to control the feature). +# define RGB_MATRIX_DISABLE_KEYCODES + +// Limit maximum brightness to keep power consumption reasonable, and avoid +// disconnects. +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 64 + +// Rainbow swirl as startup mode. +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +// Slow swirl at startup. +# define RGB_MATRIX_STARTUP_SPD 32 + +// Startup values. +# define RGB_MATRIX_STARTUP_HUE 0 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/via/keymap.c b/keyboards/bastardkb/charybdis/3x6/keymaps/via/keymap.c new file mode 100644 index 0000000000..edfce673fb --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/via/keymap.c @@ -0,0 +1,148 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum charybdis_keymap_layers { + LAYER_BASE = 0, + LAYER_LOWER, + LAYER_RAISE, + LAYER_POINTER, +}; + +/** \brief Automatically enable sniping-mode on the pointer layer. */ +#define CHARYBDIS_AUTO_SNIPING_ON_LAYER LAYER_POINTER + +#ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +static uint16_t auto_pointer_layer_timer = 0; + +# ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS +# define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS 1000 +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS + +# ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD +# define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD 8 +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD +#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE + +#define LOWER MO(LAYER_LOWER) +#define RAISE MO(LAYER_RAISE) +#define PT_Z LT(LAYER_POINTER, KC_Z) +#define PT_SLSH LT(LAYER_POINTER, KC_SLSH) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_LGUI, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RGUI, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RCTL, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + KC_BSPC, KC_SPC, LOWER, RAISE, KC_ENT + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_LOWER] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + XXXXXXX, RGB_TOG, KC_MNXT, KC_MPLY, KC_MPRV, XXXXXXX, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_4, KC_5, KC_6, KC_PMNS, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS, XXXXXXX, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + XXXXXXX, XXXXXXX, _______, XXXXXXX, _______ + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_RAISE] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE, KC_VOLD, XXXXXXX, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + _______, _______, XXXXXXX, _______, XXXXXXX + // ╰───────────────────────────╯ ╰──────────────────╯ + ), + + [LAYER_POINTER] = LAYOUT_charybdis_3x6( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DPI_MOD, S_D_MOD, S_D_MOD, DPI_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, XXXXXXX, + // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ + XXXXXXX, _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, XXXXXXX, + // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ + KC_BTN2, KC_BTN1, KC_BTN3, KC_BTN3, KC_BTN1 + // ╰───────────────────────────╯ ╰──────────────────╯ + ), +}; +// clang-format on + +#ifdef POINTING_DEVICE_ENABLE +# ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { + if (abs(mouse_report.x) > CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD || abs(mouse_report.y) > CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD) { + if (auto_pointer_layer_timer == 0) { + layer_on(LAYER_POINTER); +# ifdef RGB_MATRIX_ENABLE + rgb_matrix_mode_noeeprom(RGB_MATRIX_NONE); + rgb_matrix_sethsv_noeeprom(HSV_GREEN); +# endif // RGB_MATRIX_ENABLE + } + auto_pointer_layer_timer = timer_read(); + } + return mouse_report; +} + +void matrix_scan_user(void) { + if (auto_pointer_layer_timer != 0 && TIMER_DIFF_16(timer_read(), auto_pointer_layer_timer) >= CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS) { + auto_pointer_layer_timer = 0; + layer_off(LAYER_POINTER); +# ifdef RGB_MATRIX_ENABLE + rgb_matrix_mode_noeeprom(RGB_MATRIX_STARTUP_MODE); +# endif // RGB_MATRIX_ENABLE + } +} +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE + +# ifdef CHARYBDIS_AUTO_SNIPING_ON_LAYER +layer_state_t layer_state_set_user(layer_state_t state) { + charybdis_set_pointer_sniping_enabled(layer_state_cmp(state, CHARYBDIS_AUTO_SNIPING_ON_LAYER)); + return state; +} +# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER +#endif // POINTING_DEVICE_ENABLE + +#ifdef RGB_MATRIX_ENABLE +// Forward-declare this helper function since it is defined in rgb_matrix.c. +void rgb_matrix_update_pwm_buffers(void); +#endif + +void shutdown_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_color_all(RGB_RED); + rgb_matrix_update_pwm_buffers(); +#endif // RGB_MATRIX_ENABLE +} diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/via/readme.md b/keyboards/bastardkb/charybdis/3x6/keymaps/via/readme.md new file mode 100644 index 0000000000..fba00cd996 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/via/readme.md @@ -0,0 +1,57 @@ +# Charybdis Mini (3x6) `via` keymap + +The Charydbis Mini (3x6) `via` keymap is inspired from the original [Dactyl Manuform](../../../../../handwired/dactyl_manuform) default keymap, with some features and changes specific to the Charybdis. + +This layout supports RGB matrix. However, due to space constraints on the MCU, only a limited number of effect can be enabled at once. Look at the `config.h` file and enable your favorite effect. + +## Customizing the keymap + +### Dynamic DPI scaling + +Use the following keycodes to change the default DPI: + +- `POINTER_DEFAULT_DPI_FORWARD`: increases the DPI; decreases when shifted; +- `POINTER_DEFAULT_DPI_REVERSE`: decreases the DPI; increases when shifted. + +There's a maximum of 16 possible values for the sniping mode DPI. See the [Charybdis documentation](../../README.md) for more information. + +Use the following keycodes to change the sniping mode DPI: + +- `POINTER_SNIPING_DPI_FORWARD`: increases the DPI; decreases when shifted; +- `POINTER_SNIPING_DPI_REVERSE`: decreases the DPI; increases when shifted. + +There's a maximum of 4 possible values for the sniping mode DPI. See the [Charybdis documentation](../../README.md) for more information. + +### Drag-scroll + +Use the `DRAGSCROLL_MODE` keycode to enable drag-scroll on hold. Use the `DRAGSCROLL_TOGGLE` keycode to enable/disable drag-scroll on key press. + +### Sniping + +Use the `SNIPING_MODE` keycode to enable sniping mode on hold. Use the `SNIPING_TOGGLE` keycode to enable/disable sniping mode on key press. + +Change the value of `CHARYBDIS_AUTO_SNIPING_ON_LAYER` to automatically enable sniping mode on layer change. By default, sniping mode is enabled on the pointer layer: + +```c +#define CHARYBDIS_AUTO_SNIPING_ON_LAYER LAYER_POINTER +``` + +### Auto pointer layer + +The pointer layer can be automatically enabled when moving the trackball. To enable or disable this behavior, add or remove the following define: + +```c +#define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +``` + +By default, the layer is turned off 1 second after the last registered trackball movement: + +```c +#define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS 1000 +``` + +The trigger sensibility can also be tuned. The lower the value, the more sensible the trigger: + +```c +#define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD 8 +``` diff --git a/keyboards/bastardkb/charybdis/3x6/keymaps/via/rules.mk b/keyboards/bastardkb/charybdis/3x6/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x6/readme.md b/keyboards/bastardkb/charybdis/3x6/readme.md new file mode 100644 index 0000000000..c6385ed8f1 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/readme.md @@ -0,0 +1,15 @@ +# Charybdis Nano (3x6) + +An ergonomic keyboard with integrated trackball. + +The Charybdis is available in 4x6, 3x6 and 3x5 form factor at [bastardkb.com](https://bastardkb.com). + +## Keymaps + +### [`default`](keymaps/default) + +A simple QWERTY layout with 4 layers. + +### [`via`](keymaps/via) + +A [Miryoku-inspired](https://github.com/manna-harbour/miryoku), feature-rich, keymap with VIA support. diff --git a/keyboards/boardsource/holiday/spooky/spooky.h b/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h index 42127b8f44..05746cf17e 100644 --- a/keyboards/boardsource/holiday/spooky/spooky.h +++ b/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h @@ -1,4 +1,5 @@ -/* Copyright 2020 boardsource +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,20 +17,25 @@ #pragma once -#include "quantum.h" +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { D5, C7, F0, D7, E6, B4 } -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT_ortho_2x3( \ - k00, k01, k02, \ - k10, k11, k12 \ -) { \ - { k00, k01, k02 }, \ - { k10, k11, k12 } \ -} +#define MATRIX_ROW_PINS_RIGHT \ + { F0, C6, D4, B5 } +#define MATRIX_COL_PINS_RIGHT \ + { F1, C7, B7, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/3x6/v1/elitec/info.json b/keyboards/bastardkb/charybdis/3x6/v1/elitec/info.json new file mode 100644 index 0000000000..bf7f1a35f2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Mini (3x6) Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x6/v1/elitec/rules.mk b/keyboards/bastardkb/charybdis/3x6/v1/elitec/rules.mk new file mode 100644 index 0000000000..54406bcc1d --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v1/elitec/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h b/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h new file mode 100644 index 0000000000..edd167446b --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h @@ -0,0 +1,36 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F6, F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/3x6/v2/elitec/info.json b/keyboards/bastardkb/charybdis/3x6/v2/elitec/info.json new file mode 100644 index 0000000000..239a10f8a3 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Mini (3x6) Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x6/v2/elitec/rules.mk b/keyboards/bastardkb/charybdis/3x6/v2/elitec/rules.mk new file mode 100644 index 0000000000..54406bcc1d --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/elitec/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h b/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h new file mode 100644 index 0000000000..9c4ced817a --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP27, GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* SPI & PMW3360 settings. */ +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP18 +#define SPI_MOSI_PIN GP19 +#define SPI_MISO_PIN GP20 +#define PMW33XX_CS_PIN GP14 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky/info.json b/keyboards/bastardkb/charybdis/3x6/v2/splinky/info.json new file mode 100644 index 0000000000..7f3997158f --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis Mini (3x6) Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky/mcuconf.h b/keyboards/bastardkb/charybdis/3x6/v2/splinky/mcuconf.h new file mode 100644 index 0000000000..0fdd67c3a2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky/mcuconf.h @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky/rules.mk b/keyboards/bastardkb/charybdis/3x6/v2/splinky/rules.mk new file mode 100644 index 0000000000..6ab474a76f --- /dev/null +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/charybdis/4x6/4x6.c b/keyboards/bastardkb/charybdis/4x6/4x6.c index 6cd8fffee7..85e8b5fdd1 100644 --- a/keyboards/bastardkb/charybdis/4x6/4x6.c +++ b/keyboards/bastardkb/charybdis/4x6/4x6.c @@ -36,6 +36,10 @@ * 26 27 28 53 54 XX * 25 24 55 XX * ╰────────────╯ ╰────────────╯ + * + * Note: the LED config simulates 58 LEDs instead of the actual 56 to prevent + * confusion when testing LEDs during assembly when handedness is not set + * correctly. Those fake LEDs are bound to the physical bottom-left corner. */ led_config_t g_led_config = { { /* Key Matrix to LED index. */ @@ -70,6 +74,7 @@ led_config_t g_led_config = { { /* index=45 */ { 160, 0 }, { 160, 12 }, { 160, 24 }, { 160, 36 }, /* index=49 */ { 144, 0 }, { 144, 12 }, { 144, 24 }, { 144, 36 }, /* index=53 */ { 112, 52 }, { 128, 64 }, { 112, 64 }, + /* index=56 */ { 0, 0 }, { 0, 0 }, }, { /* LED index to flag. */ // Left split. @@ -89,6 +94,7 @@ led_config_t g_led_config = { { /* index=45 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, /* index=49 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, /* index=53 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster + /* index=55 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster fakes } }; #endif // clang-format on diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/config.h b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h new file mode 100644 index 0000000000..2514a52fb0 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h @@ -0,0 +1,62 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B15, A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B0, B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM and pmw3360 sensor. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B14 +#define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/halconf.h b/keyboards/bastardkb/charybdis/4x6/blackpill/halconf.h new file mode 100644 index 0000000000..a89dff0cd3 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/halconf.h @@ -0,0 +1,29 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +//#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +//#define HAL_USE_GPT TRUE + +#include_next "halconf.h" diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/info.json b/keyboards/bastardkb/charybdis/4x6/blackpill/info.json new file mode 100644 index 0000000000..788783c679 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis (4x6) Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/mcuconf.h b/keyboards/bastardkb/charybdis/4x6/blackpill/mcuconf.h new file mode 100644 index 0000000000..1615d1bf46 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/mcuconf.h @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_I2C_I2C1_RX_DMA_STREAM +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#undef STM32_I2C_I2C1_TX_DMA_STREAM +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SPI_SPI1_RX_DMA_STREAM +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#undef STM32_SPI_SPI1_TX_DMA_STREAM +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +// #undef STM32_SERIAL_USE_USART2 +// #define STM32_SERIAL_USE_USART2 TRUE + +// #undef STM32_UART_USART2_RX_DMA_STREAM +// #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +// #undef STM32_UART_USART2_TX_DMA_STREAM +// #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/readme.md b/keyboards/bastardkb/charybdis/4x6/blackpill/readme.md new file mode 100644 index 0000000000..bbae15bb85 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/readme.md @@ -0,0 +1,3 @@ +# Charybdis (4x6) BlackPill + +An ergonomic keyboard with integrated trackball, with BlackPill (STM32F411) mod. diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk b/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk new file mode 100644 index 0000000000..6123ec58b7 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported. +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default. +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default. +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +# Charybdis is a split 4x6 keyboard with a maximum of 5 thumb keys (3 on the +# trackball side). +SPLIT_KEYBOARD = yes + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/charybdis/4x6/config.h b/keyboards/bastardkb/charybdis/4x6/config.h index 423f12fdbe..f0c1f48cdf 100644 --- a/keyboards/bastardkb/charybdis/4x6/config.h +++ b/keyboards/bastardkb/charybdis/4x6/config.h @@ -18,55 +18,24 @@ #pragma once -#define VENDOR_ID 0xA8F8 -#define PRODUCT_ID 0x1833 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Bastard Keyboards -#define PRODUCT Charybdis +#include "config_common.h" /* Key matrix configuration. */ - -// Rows are doubled-up. -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 10 // Rows are doubled-up. #define MATRIX_COLS 6 -// Wiring configuration for each half. -#define MATRIX_ROW_PINS \ - { F1, B7, C6, D4, B5 } -#define MATRIX_COL_PINS \ - { D5, C7, F0, D7, E6, B4 } - -#define MATRIX_ROW_PINS_RIGHT \ - { D5, F0, C6, D4, B5 } -#define MATRIX_COL_PINS_RIGHT \ - { F1, C7, B7, D7, E6, B4 } - #define DIODE_DIRECTION ROW2COL -#define ROTATIONAL_TRANSFORM_ANGLE -25 - -/* Handedness. */ -#define MASTER_RIGHT - -/* Bootmagic Lite configuration. */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 -#define BOOTMAGIC_LITE_ROW_RIGHT 5 -#define BOOTMAGIC_LITE_COLUMN_RIGHT 0 - -/* serial.c configuration (for split keyboard) */ -#define SOFT_SERIAL_PIN D2 - -/* Set 0 if debouncing isn't needed */ +/* Set 0 if debouncing isn't needed. */ #define DEBOUNCE 5 -/* PMW3360 settings. */ -#define PMW3360_CS_PIN B0 +/* Trackball angle adjustment. */ +#define ROTATIONAL_TRANSFORM_ANGLE -25 -#define RGB_DI_PIN D3 -#define RGBLED_NUM 56 +/* RGB settings. */ +#define RGBLED_NUM 58 #define RGBLED_SPLIT \ - { 29, 27 } + { 29, 29 } /* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/4x6/info.json b/keyboards/bastardkb/charybdis/4x6/info.json index 956dfe88f5..4bd0983709 100644 --- a/keyboards/bastardkb/charybdis/4x6/info.json +++ b/keyboards/bastardkb/charybdis/4x6/info.json @@ -1,7 +1,8 @@ { - "keyboard_name": "Charybdis", - "url": "https://www.bastardkb.com", - "maintainer": "Quentin Lebastard", + "url": "https://bastardkb.com/charybdis", + "usb": { + "pid": "0x1833", + }, "layouts": { "LAYOUT_charybdis_4x6": { "layout": [ diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/default/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/default/keymap.c index 1d3142faac..e0cee41221 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/default/keymap.c +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/default/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ RGB_TOG, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PEQL, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PDOT, + RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, QK_BOOT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, KC_PDOT, // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_P0 @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ KC_MPLY, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, KC_MUTE, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - KC_MPRV, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, + KC_MPRV, KC_HOME, KC_PGUP, KC_PGDN, KC_END, XXXXXXX, QK_BOOT, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, XXXXXXX diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h index 2b6e11ec61..6711212cb1 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h @@ -30,7 +30,6 @@ #define MATRIX_ROW_PINS_RIGHT \ { B15, A2, B8, A8, B9 } -#define UNUSED_PINS { B6, C14, C15 } #define DIODE_DIRECTION ROW2COL #define SPLIT_HAND_PIN A3 @@ -87,11 +86,9 @@ #define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 #define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64 -#undef PMW3360_CS_PIN -#define PMW3360_CS_PIN A15 // b14 -#define PMW3360_CS_MODE 3 -#define PMW3360_CS_DIVISOR 64 -#define PMW3360_LIFTOFF_DISTANCE 0b1111 +#undef PMW33XX_CS_PIN +#define PMW33XX_CS_PIN A15 // b14 +#define PMW33XX_LIFTOFF_DISTANCE 0b1111 #undef ROTATIONAL_TRANSFORM_ANGLE #define ROTATIONAL_TRANSFORM_ANGLE -65 diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h index 75eb2240f3..c31e39261e 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/via/config.h @@ -19,7 +19,7 @@ #ifdef VIA_ENABLE /* VIA configuration. */ # define DYNAMIC_KEYMAP_LAYER_COUNT 4 -#endif // VIA_ENABLE +#endif // VIA_ENABLE /* Disable unused features. */ #define NO_ACTION_ONESHOT @@ -33,21 +33,16 @@ * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term */ # define TAPPING_TERM 200 -#endif // TAPPING_TERM +#endif // TAPPING_TERM /* Charybdis-specific features. */ #ifdef POINTING_DEVICE_ENABLE -// Enable pointer acceleration, which increases the speed by ~2x for large -// displacement, while maintaining 1x speed for slow movements. -// - `CHARYBDIS_POINTER_ACCELERATION_FACTOR` -# define CHARYBDIS_POINTER_ACCELERATION_ENABLE - // Automatically enable the pointer layer when moving the trackball. See also: // - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS` // - `CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD` // #define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE -#endif // POINTING_DEVICE_ENABLE +#endif // POINTING_DEVICE_ENABLE /* RGB Matrix. */ @@ -69,4 +64,4 @@ # define RGB_MATRIX_STARTUP_SAT 255 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c index cf24fea3c0..8c55855af1 100644 --- a/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c +++ b/keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c @@ -18,7 +18,7 @@ #ifdef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE # include "timer.h" -#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE enum charybdis_keymap_layers { LAYER_BASE = 0, @@ -35,18 +35,25 @@ static uint16_t auto_pointer_layer_timer = 0; # ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS # define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS 1000 -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS # ifndef CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD # define CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD 8 -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD -#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_THRESHOLD +#endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE #define LOWER MO(LAYER_LOWER) #define RAISE MO(LAYER_RAISE) #define PT_Z LT(LAYER_POINTER, KC_Z) #define PT_SLSH LT(LAYER_POINTER, KC_SLSH) +#ifndef POINTING_DEVICE_ENABLE +# define DRGSCRL KC_NO +# define DPI_MOD KC_NO +# define S_D_MOD KC_NO +# define SNIPING KC_NO +#endif // !POINTING_DEVICE_ENABLE + // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_BASE] = LAYOUT_charybdis_4x6( @@ -102,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ XXXXXXX, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_RALT, KC_RGUI, XXXXXXX, // ├──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────┤ - XXXXXXX, _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, XXXXXXX, + XXXXXXX, _______, DRGSCRL, SNIPING, EEP_RST, QK_BOOT, QK_BOOT, EEP_RST, SNIPING, DRGSCRL, _______, XXXXXXX, // ╰──────────────────────────────────────────────────────┤ ├──────────────────────────────────────────────────────╯ KC_BTN2, KC_BTN1, KC_BTN3, KC_BTN3, KC_BTN1, XXXXXXX, KC_BTN2, KC_BTN2 @@ -120,33 +127,31 @@ report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { # ifdef RGB_MATRIX_ENABLE rgb_matrix_mode_noeeprom(RGB_MATRIX_NONE); rgb_matrix_sethsv_noeeprom(HSV_GREEN); -# endif // RGB_MATRIX_ENABLE +# endif // RGB_MATRIX_ENABLE } auto_pointer_layer_timer = timer_read(); } return mouse_report; } -void matrix_scan_kb(void) { +void matrix_scan_user(void) { if (auto_pointer_layer_timer != 0 && TIMER_DIFF_16(timer_read(), auto_pointer_layer_timer) >= CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_TIMEOUT_MS) { auto_pointer_layer_timer = 0; layer_off(LAYER_POINTER); # ifdef RGB_MATRIX_ENABLE rgb_matrix_mode_noeeprom(RGB_MATRIX_STARTUP_MODE); -# endif // RGB_MATRIX_ENABLE +# endif // RGB_MATRIX_ENABLE } - matrix_scan_user(); } -# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE +# endif // CHARYBDIS_AUTO_POINTER_LAYER_TRIGGER_ENABLE # ifdef CHARYBDIS_AUTO_SNIPING_ON_LAYER -layer_state_t layer_state_set_kb(layer_state_t state) { - state = layer_state_set_user(state); +layer_state_t layer_state_set_user(layer_state_t state) { charybdis_set_pointer_sniping_enabled(layer_state_cmp(state, CHARYBDIS_AUTO_SNIPING_ON_LAYER)); return state; } -# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER -#endif // POINTING_DEVICE_ENABLE +# endif // CHARYBDIS_AUTO_SNIPING_ON_LAYER +#endif // POINTING_DEVICE_ENABLE #ifdef RGB_MATRIX_ENABLE // Forward-declare this helper function since it is defined in rgb_matrix.c. @@ -158,9 +163,9 @@ void shutdown_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color_all(RGB_RED); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE } diff --git a/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h b/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h new file mode 100644 index 0000000000..15044ef645 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h @@ -0,0 +1,42 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F1, B7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { D5, C7, F0, D7, E6, B4 } + +#define MATRIX_ROW_PINS_RIGHT \ + { D5, F0, C6, D4, B5 } +#define MATRIX_COL_PINS_RIGHT \ + { F1, C7, B7, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/4x6/v1/elitec/info.json b/keyboards/bastardkb/charybdis/4x6/v1/elitec/info.json new file mode 100644 index 0000000000..4ea658a7d9 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis (4x6) Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/4x6/rules.mk b/keyboards/bastardkb/charybdis/4x6/v1/elitec/rules.mk index e137f5d4cc..fa5fe80405 100644 --- a/keyboards/bastardkb/charybdis/4x6/rules.mk +++ b/keyboards/bastardkb/charybdis/4x6/v1/elitec/rules.mk @@ -23,15 +23,14 @@ RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by def RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality RGB_MATRIX_DRIVER = WS2812 -# Enable link-time optimization by default. The Charybdis packs a lot of -# features (RGB, Via, trackball) in a small atmega32u4 package. -LTO_ENABLE = yes - # Charybdis is a split 4x6 keyboard with a maximum of 5 thumb keys (3 on the # trackball side). SPLIT_KEYBOARD = yes POINTING_DEVICE_ENABLE = yes # Enable trackball POINTING_DEVICE_DRIVER = pmw3360 -# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h b/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h new file mode 100644 index 0000000000..891e511ccb --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h @@ -0,0 +1,36 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F4, F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F6, F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 + +/* PMW3360 settings. */ +#define PMW33XX_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/4x6/v2/elitec/info.json b/keyboards/bastardkb/charybdis/4x6/v2/elitec/info.json new file mode 100644 index 0000000000..151c0e1ca3 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis (4x6) Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/4x6/v2/elitec/rules.mk b/keyboards/bastardkb/charybdis/4x6/v2/elitec/rules.mk new file mode 100644 index 0000000000..fa5fe80405 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/elitec/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported. +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default. +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default. +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +# Charybdis is a split 4x6 keyboard with a maximum of 5 thumb keys (3 on the +# trackball side). +SPLIT_KEYBOARD = yes + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint + +# Enable link-time optimization by default. The Charybdis packs a lot of +# features (RGB, Via, trackball) in a small atmega32u4 package. +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h b/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h new file mode 100644 index 0000000000..e17ec49726 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP29, GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP27, GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* SPI & PMW3360 settings. */ +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP18 +#define SPI_MOSI_PIN GP19 +#define SPI_MISO_PIN GP20 +#define PMW33XX_CS_PIN GP14 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky/info.json b/keyboards/bastardkb/charybdis/4x6/v2/splinky/info.json new file mode 100644 index 0000000000..0004eb81c9 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Charybdis (4x6) Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky/mcuconf.h b/keyboards/bastardkb/charybdis/4x6/v2/splinky/mcuconf.h new file mode 100644 index 0000000000..0fdd67c3a2 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky/mcuconf.h @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky/rules.mk b/keyboards/bastardkb/charybdis/4x6/v2/splinky/rules.mk new file mode 100644 index 0000000000..13c1b39961 --- /dev/null +++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes + +POINTING_DEVICE_ENABLE = yes # Enable trackball +POINTING_DEVICE_DRIVER = pmw3360 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/charybdis/charybdis.c b/keyboards/bastardkb/charybdis/charybdis.c index f94682ba41..60bca936e7 100644 --- a/keyboards/bastardkb/charybdis/charybdis.c +++ b/keyboards/bastardkb/charybdis/charybdis.c @@ -18,46 +18,44 @@ */ #include "charybdis.h" +#include "transactions.h" +#include <string.h> #ifdef CONSOLE_ENABLE # include "print.h" -#endif // CONSOLE_ENABLE +#endif // CONSOLE_ENABLE #ifdef POINTING_DEVICE_ENABLE # ifndef CHARYBDIS_MINIMUM_DEFAULT_DPI # define CHARYBDIS_MINIMUM_DEFAULT_DPI 400 -# endif // CHARYBDIS_MINIMUM_DEFAULT_DPI +# endif // CHARYBDIS_MINIMUM_DEFAULT_DPI # ifndef CHARYBDIS_DEFAULT_DPI_CONFIG_STEP # define CHARYBDIS_DEFAULT_DPI_CONFIG_STEP 200 -# endif // CHARYBDIS_DEFAULT_DPI_CONFIG_STEP +# endif // CHARYBDIS_DEFAULT_DPI_CONFIG_STEP # ifndef CHARYBDIS_MINIMUM_SNIPING_DPI # define CHARYBDIS_MINIMUM_SNIPING_DPI 200 -# endif // CHARYBDIS_MINIMUM_SNIPER_MODE_DPI +# endif // CHARYBDIS_MINIMUM_SNIPER_MODE_DPI # ifndef CHARYBDIS_SNIPING_DPI_CONFIG_STEP # define CHARYBDIS_SNIPING_DPI_CONFIG_STEP 100 -# endif // CHARYBDIS_SNIPING_DPI_CONFIG_STEP +# endif // CHARYBDIS_SNIPING_DPI_CONFIG_STEP // Fixed DPI for drag-scroll. # ifndef CHARYBDIS_DRAGSCROLL_DPI # define CHARYBDIS_DRAGSCROLL_DPI 100 -# endif // CHARYBDIS_DRAGSCROLL_DPI +# endif // CHARYBDIS_DRAGSCROLL_DPI # ifndef CHARYBDIS_DRAGSCROLL_BUFFER_SIZE # define CHARYBDIS_DRAGSCROLL_BUFFER_SIZE 6 -# endif // !CHARYBDIS_DRAGSCROLL_BUFFER_SIZE - -# ifndef CHARYBDIS_POINTER_ACCELERATION_FACTOR -# define CHARYBDIS_POINTER_ACCELERATION_FACTOR 24 -# endif // !CHARYBDIS_POINTER_ACCELERATION_FACTOR +# endif // !CHARYBDIS_DRAGSCROLL_BUFFER_SIZE typedef union { uint8_t raw; struct { - uint8_t pointer_default_dpi : 4; // 16 steps available. - uint8_t pointer_sniping_dpi : 2; // 4 steps available. + uint8_t pointer_default_dpi : 4; // 16 steps available. + uint8_t pointer_sniping_dpi : 2; // 4 steps available. bool is_dragscroll_enabled : 1; bool is_sniping_enabled : 1; } __attribute__((packed)); @@ -87,13 +85,19 @@ static void read_charybdis_config_from_eeprom(charybdis_config_t* config) { * resets these 2 values to `false` since it does not make sense to persist * these across reboots of the board. */ -static void write_charybdis_config_to_eeprom(charybdis_config_t* config) { eeconfig_update_kb(config->raw); } +static void write_charybdis_config_to_eeprom(charybdis_config_t* config) { + eeconfig_update_kb(config->raw); +} /** \brief Return the current value of the pointer's default DPI. */ -static uint16_t get_pointer_default_dpi(charybdis_config_t* config) { return (uint16_t)config->pointer_default_dpi * CHARYBDIS_DEFAULT_DPI_CONFIG_STEP + CHARYBDIS_MINIMUM_DEFAULT_DPI; } +static uint16_t get_pointer_default_dpi(charybdis_config_t* config) { + return (uint16_t)config->pointer_default_dpi * CHARYBDIS_DEFAULT_DPI_CONFIG_STEP + CHARYBDIS_MINIMUM_DEFAULT_DPI; +} /** \brief Return the current value of the pointer's sniper-mode DPI. */ -static uint16_t get_pointer_sniping_dpi(charybdis_config_t* config) { return (uint16_t)config->pointer_sniping_dpi * CHARYBDIS_SNIPING_DPI_CONFIG_STEP + CHARYBDIS_MINIMUM_SNIPING_DPI; } +static uint16_t get_pointer_sniping_dpi(charybdis_config_t* config) { + return (uint16_t)config->pointer_sniping_dpi * CHARYBDIS_SNIPING_DPI_CONFIG_STEP + CHARYBDIS_MINIMUM_SNIPING_DPI; +} /** \brief Set the appropriate DPI for the input config. */ static void maybe_update_pointing_device_cpi(charybdis_config_t* config) { @@ -128,66 +132,54 @@ static void step_pointer_sniping_dpi(charybdis_config_t* config, bool forward) { maybe_update_pointing_device_cpi(config); } -uint16_t charybdis_get_pointer_default_dpi(void) { return get_pointer_default_dpi(&g_charybdis_config); } +uint16_t charybdis_get_pointer_default_dpi(void) { + return get_pointer_default_dpi(&g_charybdis_config); +} -uint16_t charybdis_get_pointer_sniping_dpi(void) { return get_pointer_sniping_dpi(&g_charybdis_config); } +uint16_t charybdis_get_pointer_sniping_dpi(void) { + return get_pointer_sniping_dpi(&g_charybdis_config); +} -void charybdis_cycle_pointer_default_dpi_noeeprom(bool forward) { step_pointer_default_dpi(&g_charybdis_config, forward); } +void charybdis_cycle_pointer_default_dpi_noeeprom(bool forward) { + step_pointer_default_dpi(&g_charybdis_config, forward); +} void charybdis_cycle_pointer_default_dpi(bool forward) { step_pointer_default_dpi(&g_charybdis_config, forward); write_charybdis_config_to_eeprom(&g_charybdis_config); } -void charybdis_cycle_pointer_sniping_dpi_noeeprom(bool forward) { step_pointer_sniping_dpi(&g_charybdis_config, forward); } +void charybdis_cycle_pointer_sniping_dpi_noeeprom(bool forward) { + step_pointer_sniping_dpi(&g_charybdis_config, forward); +} void charybdis_cycle_pointer_sniping_dpi(bool forward) { step_pointer_sniping_dpi(&g_charybdis_config, forward); write_charybdis_config_to_eeprom(&g_charybdis_config); } -bool charybdis_get_pointer_sniping_enabled(void) { return g_charybdis_config.is_sniping_enabled; } +bool charybdis_get_pointer_sniping_enabled(void) { + return g_charybdis_config.is_sniping_enabled; +} void charybdis_set_pointer_sniping_enabled(bool enable) { g_charybdis_config.is_sniping_enabled = enable; maybe_update_pointing_device_cpi(&g_charybdis_config); } -bool charybdis_get_pointer_dragscroll_enabled(void) { return g_charybdis_config.is_dragscroll_enabled; } +bool charybdis_get_pointer_dragscroll_enabled(void) { + return g_charybdis_config.is_dragscroll_enabled; +} void charybdis_set_pointer_dragscroll_enabled(bool enable) { g_charybdis_config.is_dragscroll_enabled = enable; maybe_update_pointing_device_cpi(&g_charybdis_config); } -void pointing_device_init_kb(void) { maybe_update_pointing_device_cpi(&g_charybdis_config); } - -# ifndef CONSTRAIN_HID -# define CONSTRAIN_HID(value) ((value) < -127 ? -127 : ((value) > 127 ? 127 : (value))) -# endif // !CONSTRAIN_HID - -/** - * \brief Add optional acceleration effect. - * - * If `CHARYBDIS_ENABLE_POINTER_ACCELERATION` is defined, add a simple and naive - * acceleration effect to the provided value. Return the value unchanged - * otherwise. - */ -# ifndef DISPLACEMENT_WITH_ACCELERATION -# ifdef CHARYBDIS_POINTER_ACCELERATION_ENABLE -# define DISPLACEMENT_WITH_ACCELERATION(d) (CONSTRAIN_HID(d > 0 ? d * d / CHARYBDIS_POINTER_ACCELERATION_FACTOR + d : -d * d / CHARYBDIS_POINTER_ACCELERATION_FACTOR + d)) -# else // !CHARYBDIS_POINTER_ACCELERATION_ENABLE -# define DISPLACEMENT_WITH_ACCELERATION(d) (d) -# endif // CHARYBDIS_POINTER_ACCELERATION_ENABLE -# endif // !DISPLACEMENT_WITH_ACCELERATION - /** * \brief Augment the pointing device behavior. * - * Implement the Charybdis-specific features for pointing devices: - * - Drag-scroll - * - Sniping - * - Acceleration + * Implement drag-scroll. */ static void pointing_device_task_charybdis(report_mouse_t* mouse_report) { static int16_t scroll_buffer_x = 0; @@ -197,12 +189,12 @@ static void pointing_device_task_charybdis(report_mouse_t* mouse_report) { scroll_buffer_x -= mouse_report->x; # else scroll_buffer_x += mouse_report->x; -# endif // CHARYBDIS_DRAGSCROLL_REVERSE_X +# endif // CHARYBDIS_DRAGSCROLL_REVERSE_X # ifdef CHARYBDIS_DRAGSCROLL_REVERSE_Y scroll_buffer_y -= mouse_report->y; # else scroll_buffer_y += mouse_report->y; -# endif // CHARYBDIS_DRAGSCROLL_REVERSE_Y +# endif // CHARYBDIS_DRAGSCROLL_REVERSE_Y mouse_report->x = 0; mouse_report->y = 0; if (abs(scroll_buffer_x) > CHARYBDIS_DRAGSCROLL_BUFFER_SIZE) { @@ -213,9 +205,6 @@ static void pointing_device_task_charybdis(report_mouse_t* mouse_report) { mouse_report->v = scroll_buffer_y > 0 ? 1 : -1; scroll_buffer_y = 0; } - } else if (!g_charybdis_config.is_sniping_enabled) { - mouse_report->x = DISPLACEMENT_WITH_ACCELERATION(mouse_report->x); - mouse_report->y = DISPLACEMENT_WITH_ACCELERATION(mouse_report->y); } } @@ -234,9 +223,9 @@ static bool has_shift_mod(void) { return mod_config(get_mods()) & MOD_MASK_SHIFT; # else return mod_config(get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT; -# endif // NO_ACTION_ONESHOT +# endif // NO_ACTION_ONESHOT } -# endif // POINTING_DEVICE_ENABLE && !NO_CHARYBDIS_KEYCODES +# endif // POINTING_DEVICE_ENABLE && !NO_CHARYBDIS_KEYCODES /** * \brief Outputs the Charybdis configuration to console. @@ -252,16 +241,16 @@ static bool has_shift_mod(void) { static void debug_charybdis_config_to_console(charybdis_config_t* config) { # ifdef CONSOLE_ENABLE dprintf("(charybdis) process_record_kb: config = {\n" - "\traw = 0x%04X,\n" + "\traw = 0x%X,\n" "\t{\n" - "\t\tis_dragscroll_enabled=%b\n" - "\t\tis_sniping_enabled=%b\n" - "\t\tdefault_dpi=0x%02X (%ld)\n" - "\t\tsniping_dpi=0x%01X (%ld)\n" + "\t\tis_dragscroll_enabled=%u\n" + "\t\tis_sniping_enabled=%u\n" + "\t\tdefault_dpi=0x%X (%u)\n" + "\t\tsniping_dpi=0x%X (%u)\n" "\t}\n" "}\n", config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)); -# endif // CONSOLE_ENABLE +# endif // CONSOLE_ENABLE } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -313,7 +302,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { } break; } -# endif // !NO_CHARYBDIS_KEYCODES +# endif // !NO_CHARYBDIS_KEYCODES # ifndef MOUSEKEY_ENABLE // Simulate mouse keys if full support is not enabled (reduces firmware size // while maintaining support for mouse keys). @@ -323,9 +312,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { pointing_device_set_report(mouse_report); pointing_device_send(); } -# endif // !MOUSEKEY_ENABLE -# endif // POINTING_DEVICE_ENABLE - debug_charybdis_config_to_console(&g_charybdis_config); +# endif // !MOUSEKEY_ENABLE +# endif // POINTING_DEVICE_ENABLE + if ((keycode >= POINTER_DEFAULT_DPI_FORWARD && keycode < CHARYBDIS_SAFE_RANGE) || IS_MOUSEKEY(keycode)) { + debug_charybdis_config_to_console(&g_charybdis_config); + } return true; } @@ -340,4 +331,64 @@ void matrix_init_kb(void) { read_charybdis_config_from_eeprom(&g_charybdis_config); matrix_init_user(); } -#endif // POINTING_DEVICE_ENABLE + +# ifdef CHARYBDIS_CONFIG_SYNC +void charybdis_config_sync_handler(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(g_charybdis_config)) { + memcpy(&g_charybdis_config, initiator2target_buffer, sizeof(g_charybdis_config)); + } +} +# endif + +void keyboard_post_init_kb(void) { + maybe_update_pointing_device_cpi(&g_charybdis_config); +# ifdef CHARYBDIS_CONFIG_SYNC + transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, charybdis_config_sync_handler); +# endif + keyboard_post_init_user(); +} + +# ifdef CHARYBDIS_CONFIG_SYNC +void housekeeping_task_kb(void) { + if (is_keyboard_master()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave. + static charybdis_config_t last_charybdis_config = {0}; + static uint32_t last_sync = 0; + bool needs_sync = false; + + // Check if the state values are different. + if (memcmp(&g_charybdis_config, &last_charybdis_config, sizeof(g_charybdis_config))) { + needs_sync = true; + memcpy(&last_charybdis_config, &g_charybdis_config, sizeof(g_charybdis_config)); + } + // Send to slave every 500ms regardless of state change. + if (timer_elapsed32(last_sync) > 500) { + needs_sync = true; + } + + // Perform the sync if requested. + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_KB_CONFIG_SYNC, sizeof(g_charybdis_config), &g_charybdis_config)) { + last_sync = timer_read32(); + } + } + } + // No need to invoke the user-specific callback, as it's been called + // already. +} +# endif // CHARYBDIS_CONFIG_SYNC +#endif // POINTING_DEVICE_ENABLE + +#if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill) || defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill) +void keyboard_pre_init_kb(void) { + setPinInputHigh(A0); + keyboard_pre_init_user(); +} + +void matrix_scan_kb(void) { + if (!readPin(A0)) { + reset_keyboard(); + } + matrix_scan_user(); +} +#endif // KEYBOARD_bastardkb_charybdis_3x5_blackpill || KEYBOARD_bastardkb_charybdis_4x6_blackpill diff --git a/keyboards/bastardkb/charybdis/charybdis.h b/keyboards/bastardkb/charybdis/charybdis.h index 42423c0c92..f624c554f4 100644 --- a/keyboards/bastardkb/charybdis/charybdis.h +++ b/keyboards/bastardkb/charybdis/charybdis.h @@ -21,6 +21,8 @@ // clang-format off #if defined(KEYBOARD_bastardkb_charybdis_3x5) # include "3x5.h" +#elif defined(KEYBOARD_bastardkb_charybdis_3x6) +# include "3x6.h" #elif defined(KEYBOARD_bastardkb_charybdis_4x6) # include "4x6.h" #else @@ -37,7 +39,7 @@ enum charybdis_keycodes { POINTER_DEFAULT_DPI_FORWARD = USER00, # else POINTER_DEFAULT_DPI_FORWARD = SAFE_RANGE, -# endif // VIA_ENABLE +# endif // VIA_ENABLE POINTER_DEFAULT_DPI_REVERSE, POINTER_SNIPING_DPI_FORWARD, POINTER_SNIPING_DPI_REVERSE, @@ -56,7 +58,7 @@ enum charybdis_keycodes { # define SNP_TOG SNIPING_MODE_TOGGLE # define DRGSCRL DRAGSCROLL_MODE # define DRG_TOG DRAGSCROLL_MODE_TOGGLE -# endif // !NO_CHARYBDIS_KEYCODES +# endif // !NO_CHARYBDIS_KEYCODES /** \brief Return the current DPI value for the pointer's default mode. */ uint16_t charybdis_get_pointer_default_dpi(void); @@ -123,4 +125,4 @@ bool charybdis_get_pointer_dragscroll_enabled(void); * are translated into horizontal and vertical scroll movements. */ void charybdis_set_pointer_dragscroll_enabled(bool enable); -#endif // POINTING_DEVICE_ENABLE +#endif // POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/charybdis/post_config.h b/keyboards/bastardkb/charybdis/post_config.h index 540751f6c6..4cfd24c4b6 100644 --- a/keyboards/bastardkb/charybdis/post_config.h +++ b/keyboards/bastardkb/charybdis/post_config.h @@ -20,90 +20,95 @@ #pragma once +// Enable syncing of charybdis config +#ifdef CHARYBDIS_CONFIG_SYNC +# define SPLIT_TRANSACTION_IDS_KB RPC_ID_KB_CONFIG_SYNC +#endif + /* Mouse config. */ #ifndef MOUSEKEY_MOVE_DELTA # ifndef MK_KINETIC_SPEED # define MOUSEKEY_MOVE_DELTA 5 -# else // MK_KINETIC_SPEED +# else // MK_KINETIC_SPEED # define MOUSEKEY_MOVE_DELTA 25 -# endif // !MK_KINETIC_SPEED -#endif // !MOUSEKEY_MOVE_DELTA +# endif // !MK_KINETIC_SPEED +#endif // !MOUSEKEY_MOVE_DELTA #ifndef MOUSEKEY_DELAY # ifndef MK_KINETIC_SPEED # define MOUSEKEY_DELAY 300 -# else // MK_KINETIC_SPEED +# else // MK_KINETIC_SPEED # define MOUSEKEY_DELAY 8 -# endif // !MK_KINETIC_SPEED -#endif // !MOUSEKEY_DELAY +# endif // !MK_KINETIC_SPEED +#endif // !MOUSEKEY_DELAY #ifndef MOUSEKEY_INTERVAL # ifndef MK_KINETIC_SPEED # define MOUSEKEY_INTERVAL 50 -# else // MK_KINETIC_SPEED +# else // MK_KINETIC_SPEED # define MOUSEKEY_INTERVAL 20 -# endif // !MK_KINETIC_SPEED -#endif // !MOUSEKEY_INTERNAL +# endif // !MK_KINETIC_SPEED +#endif // !MOUSEKEY_INTERNAL #ifndef MOUSEKEY_MAX_SPEED # define MOUSEKEY_MAX_SPEED 7 -#endif // !MOUSEKEY_MAX_SPEED +#endif // !MOUSEKEY_MAX_SPEED #ifndef MOUSEKEY_TIME_TO_MAX # define MOUSEKEY_TIME_TO_MAX 60 -#endif // !MOUSEKEY_TIME_TO_MAX +#endif // !MOUSEKEY_TIME_TO_MAX #ifndef MOUSEKEY_INITIAL_SPEED # define MOUSEKEY_INITIAL_SPEED 100 -#endif // !MOUSEKEY_INITIAL_SPEED +#endif // !MOUSEKEY_INITIAL_SPEED #ifndef MOUSEKEY_BASE_SPEED # define MOUSEKEY_BASE_SPEED 1000 -#endif // !MOUSEKEY_BASE_SPEED +#endif // !MOUSEKEY_BASE_SPEED #ifndef MOUSEKEY_DECELERATED_SPEED # define MOUSEKEY_DECELERATED_SPEED 400 -#endif // !MOUSEKEY_DECELERATED_SPEED +#endif // !MOUSEKEY_DECELERATED_SPEED #ifndef MOUSEKEY_ACCELERATED_SPEED # define MOUSEKEY_ACCELERATED_SPEED 3000 -#endif // !MOUSEKEY_ACCELERATED_SPEED +#endif // !MOUSEKEY_ACCELERATED_SPEED /* Mouse scroll config. */ #ifndef MOUSEKEY_WHEEL_DELAY # define MOUSEKEY_WHEEL_DELAY 15 -#endif // !MOUSEKEY_WHEEL_DELAY +#endif // !MOUSEKEY_WHEEL_DELAY #ifndef MOUSEKEY_WHEEL_DELTA # define MOUSEKEY_WHEEL_DELTA 1 -#endif // !MOUSEKEY_WHEEL_DELTA +#endif // !MOUSEKEY_WHEEL_DELTA #ifndef MOUSEKEY_WHEEL_INTERVAL # define MOUSEKEY_WHEEL_INTERVAL 50 -#endif // !MOUSEKEY_WHEEL_INTERVAL +#endif // !MOUSEKEY_WHEEL_INTERVAL #ifndef MOUSEKEY_WHEEL_MAX_SPEED # define MOUSEKEY_WHEEL_MAX_SPEED 8 -#endif // !MOUSEKEY_WHEEL_MAX_SPEED +#endif // !MOUSEKEY_WHEEL_MAX_SPEED #ifndef MOUSEKEY_WHEEL_TIME_TO_MAX # define MOUSEKEY_WHEEL_TIME_TO_MAX 80 -#endif // !MOUSEKEY_WHEEL_TIME_TO_MAX +#endif // !MOUSEKEY_WHEEL_TIME_TO_MAX #ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS # define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8 -#endif // !MOUSEKEY_WHEEL_INITIAL_MOVEMENTS +#endif // !MOUSEKEY_WHEEL_INITIAL_MOVEMENTS #ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS # define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48 -#endif // !MOUSEKEY_WHEEL_BASE_MOVEMENTS +#endif // !MOUSEKEY_WHEEL_BASE_MOVEMENTS #ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS # define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48 -#endif // !MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS +#endif // !MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS #ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS # define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 -#endif // !MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS +#endif // !MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS diff --git a/keyboards/bastardkb/charybdis/readme.md b/keyboards/bastardkb/charybdis/readme.md index 461f33117c..c112c1150e 100644 --- a/keyboards/bastardkb/charybdis/readme.md +++ b/keyboards/bastardkb/charybdis/readme.md @@ -18,33 +18,32 @@ Check out the [keyboard build guides](https://docs.bastardkb.com) for the Charyb ## Building the firmware -### Charybdis (4x6) - -The `default` keymap is inspired from the original [Dactyl Manuform](../../handwired/dactyl_manuform) layout. +**You must specify the shield version when compiling/flashing the firmware.** +The template is: ```shell -qmk compile -kb bastardkb/charybdis/4x6 -km default +qmk compile -kb bastardkb/charybdis/{LAYOUT}/{VERSION}/elitec -km {KEYMAP} ``` -Check out the `via` layout if you're looking for VIA support: +See below for populated commands per layout -```shell -qmk compile -kb bastardkb/charybdis/4x6 -km via -``` +The `default` keymap is inspired from the original [Dactyl Manuform](../../handwired/dactyl_manuform) layout. -### Charybdis (3x5) +Check out the `via` layout if you're looking for VIA support. -The `default` keymap is inspired from the original [Dactyl Manuform](../../handwired/dactyl_manuform) layout. +### Charybdis (4x6) -```shell -qmk compile -kb bastardkb/charybdis/3x5 -km default -``` +| Shield Version | default | via | +|----------------|-----------------------------------------------------------------|-----------------------------------------------------------------| +| v1 | `qmk compile -kb bastardkb/charybdis/4x6/v1/elitec -km default` | `qmk compile -kb bastardkb/charybdis/4x6/v1/elitec -km via` | +| v2 | `qmk compile -kb bastardkb/charybdis/4x6/v2/elitec -km default` | `qmk compile -kb bastardkb/charybdis/4x6/v2/elitec -km via` | -Check out the `via` layout if you're looking for VIA support: +### Charybdis (3x5) -```shell -qmk compile -kb bastardkb/charybdis/3x5 -km via -``` +| Shield Version | default | via | +|----------------|-----------------------------------------------------------------|-----------------------------------------------------------------| +| v1 | `qmk compile -kb bastardkb/charybdis/3x5/v1/elitec -km default` | `qmk compile -kb bastardkb/charybdis/3x5/v1/elitec -km via` | +| v2 | `qmk compile -kb bastardkb/charybdis/3x5/v2/elitec -km default` | `qmk compile -kb bastardkb/charybdis/3x5/v2/elitec -km via` | ## Customizing the firmware @@ -73,7 +72,7 @@ Drag-scroll enables scrolling with the trackball. When drag-scroll is enabled, t Call `charybdis_set_pointer_dragscroll_enabled(bool enable)` to enable/disable drag-scroll. -`charybdis_get_pointer_dragscroll_enabled()` returns whether sniping mode is currently enabled. +`charybdis_get_pointer_dragscroll_enabled()` returns whether drag-scroll mode is currently enabled. To invert the horizontal scrolling direction, define `CHARYBDIS_DRAGSCROLL_REVERSE_X`: @@ -114,20 +113,6 @@ This behavior can be further customized with the following defines: #define CHARYBDIS_SNIPING_DPI_CONFIG_STEP 100 ``` -### Acceleration - -By default, the pointer's movements are linear. To enable acceleration, add the following define: - -```c -#define CHARYBDIS_POINTER_ACCELERATION_ENABLE -``` - -The acceleration factor can be further tune _via_ the `CHARYBDIS_POINTER_ACCELERATION_FACTOR`: - -```c -#define CHARYBDIS_POINTER_ACCELERATION_FACTOR 24 -``` - ### Custom keycodes The Charybdis firmware defines a number of keycodes to leverage its features, namely: @@ -176,3 +161,23 @@ To disable the custom keycodes, and reduce binary size, simply add a definition ```c #define NO_CHARYBDIS_KEYCODES ``` + +### Configuration Syncing + +If you want/need to enable syncing of the charybdis config, such as to read the sniping or drag scroll modes on the other half (such as for displaying the status via rgb matrix, or added on screens, or what not), you can enabled this. To do so, add this to your `config.h`: + +```c +#define CHARYBDIS_CONFIG_SYNC +``` + +Note that you will need to reflash both sides when enabling this. + +### Enable Large Mouse Reports + +By default, the X and Y motion for the pointing device/mouse reports is -127 to 127. You can definitely hit the limit for that with the sensors. You can enable support for -32767 to 32767 by adding this to your `config.h`: + +```c +#define MOUSE_EXTENDED_REPORT +``` + +Note that you will need to reflash both sides when enabling this. diff --git a/keyboards/bastardkb/dilemma/config.h b/keyboards/bastardkb/dilemma/config.h new file mode 100644 index 0000000000..af59efb709 --- /dev/null +++ b/keyboards/bastardkb/dilemma/config.h @@ -0,0 +1,49 @@ +/* + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* Key matrix configuration. */ + +#define MATRIX_ROWS 8 // Rows are doubled-up. +#define MATRIX_COLS 5 + +#define DIODE_DIRECTION ROW2COL + +// Set 0 if debouncing isn't needed. +#define DEBOUNCE 5 + +/* Pointing device configuration. */ + +// Enable use of pointing device on slave split. +#define SPLIT_POINTING_ENABLE + +// Pointing device is on the right split. +#define POINTING_DEVICE_RIGHT + +// Limits the frequency that the sensor is polled for motion. +#define POINTING_DEVICE_TASK_THROTTLE_MS 10 + +// Adjust trackpad rotation. +#define POINTING_DEVICE_ROTATION_90 + +// Configure for the Cirque model used on the Dilemma. +#define CIRQUE_PINNACLE_DIAMETER_MM 35 +#define CIRQUE_PINNACLE_CURVED_OVERLAY diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c new file mode 100644 index 0000000000..e710f3aab7 --- /dev/null +++ b/keyboards/bastardkb/dilemma/dilemma.c @@ -0,0 +1,329 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "dilemma.h" + +#ifdef CONSOLE_ENABLE +# include "print.h" +#endif // CONSOLE_ENABLE + +#ifdef POINTING_DEVICE_ENABLE +# ifndef DILEMMA_MINIMUM_DEFAULT_DPI +# define DILEMMA_MINIMUM_DEFAULT_DPI 400 +# endif // DILEMMA_MINIMUM_DEFAULT_DPI + +# ifndef DILEMMA_DEFAULT_DPI_CONFIG_STEP +# define DILEMMA_DEFAULT_DPI_CONFIG_STEP 200 +# endif // DILEMMA_DEFAULT_DPI_CONFIG_STEP + +# ifndef DILEMMA_MINIMUM_SNIPING_DPI +# define DILEMMA_MINIMUM_SNIPING_DPI 200 +# endif // DILEMMA_MINIMUM_SNIPING_DPI + +# ifndef DILEMMA_SNIPING_DPI_CONFIG_STEP +# define DILEMMA_SNIPING_DPI_CONFIG_STEP 100 +# endif // DILEMMA_SNIPING_DPI_CONFIG_STEP + +// Fixed DPI for drag-scroll. +# ifndef DILEMMA_DRAGSCROLL_DPI +# define DILEMMA_DRAGSCROLL_DPI 100 +# endif // DILEMMA_DRAGSCROLL_DPI + +# ifndef DILEMMA_DRAGSCROLL_BUFFER_SIZE +# define DILEMMA_DRAGSCROLL_BUFFER_SIZE 6 +# endif // !DILEMMA_DRAGSCROLL_BUFFER_SIZE + +typedef union { + uint8_t raw; + struct { + uint8_t pointer_default_dpi : 4; // 16 steps available. + uint8_t pointer_sniping_dpi : 2; // 4 steps available. + bool is_dragscroll_enabled : 1; + bool is_sniping_enabled : 1; + } __attribute__((packed)); +} dilemma_config_t; + +static dilemma_config_t g_dilemma_config = {0}; + +/** + * \brief Set the value of `config` from EEPROM. + * + * Note that `is_dragscroll_enabled` and `is_sniping_enabled` are purposefully + * ignored since we do not want to persist this state to memory. In practice, + * this state is always written to maximize write-performances. Therefore, we + * explicitly set them to `false` in this function. + */ +static void read_dilemma_config_from_eeprom(dilemma_config_t* config) { + config->raw = eeconfig_read_kb() & 0xff; + config->is_dragscroll_enabled = false; + config->is_sniping_enabled = false; +} + +/** + * \brief Save the value of `config` to eeprom. + * + * Note that all values are written verbatim, including whether drag-scroll + * and/or sniper mode are enabled. `read_dilemma_config_from_eeprom(…)` + * resets these 2 values to `false` since it does not make sense to persist + * these across reboots of the board. + */ +static void write_dilemma_config_to_eeprom(dilemma_config_t* config) { + eeconfig_update_kb(config->raw); +} + +/** \brief Return the current value of the pointer's default DPI. */ +static uint16_t get_pointer_default_dpi(dilemma_config_t* config) { + return (uint16_t)config->pointer_default_dpi * DILEMMA_DEFAULT_DPI_CONFIG_STEP + DILEMMA_MINIMUM_DEFAULT_DPI; +} + +/** \brief Return the current value of the pointer's sniper-mode DPI. */ +static uint16_t get_pointer_sniping_dpi(dilemma_config_t* config) { + return (uint16_t)config->pointer_sniping_dpi * DILEMMA_SNIPING_DPI_CONFIG_STEP + DILEMMA_MINIMUM_SNIPING_DPI; +} + +/** \brief Set the appropriate DPI for the input config. */ +static void maybe_update_pointing_device_cpi(dilemma_config_t* config) { + if (config->is_dragscroll_enabled) { + pointing_device_set_cpi(DILEMMA_DRAGSCROLL_DPI); + } else if (config->is_sniping_enabled) { + pointing_device_set_cpi(get_pointer_sniping_dpi(config)); + } else { + pointing_device_set_cpi(get_pointer_default_dpi(config)); + } +} + +/** + * \brief Update the pointer's default DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to DILEMMA_DEFAULT_DPI_CONFIG_STEP. + */ +static void step_pointer_default_dpi(dilemma_config_t* config, bool forward) { + config->pointer_default_dpi += forward ? 1 : -1; + maybe_update_pointing_device_cpi(config); +} + +/** + * \brief Update the pointer's sniper-mode DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to DILEMMA_SNIPING_DPI_CONFIG_STEP. + */ +static void step_pointer_sniping_dpi(dilemma_config_t* config, bool forward) { + config->pointer_sniping_dpi += forward ? 1 : -1; + maybe_update_pointing_device_cpi(config); +} + +uint16_t dilemma_get_pointer_default_dpi(void) { + return get_pointer_default_dpi(&g_dilemma_config); +} + +uint16_t dilemma_get_pointer_sniping_dpi(void) { + return get_pointer_sniping_dpi(&g_dilemma_config); +} + +void dilemma_cycle_pointer_default_dpi_noeeprom(bool forward) { + step_pointer_default_dpi(&g_dilemma_config, forward); +} + +void dilemma_cycle_pointer_default_dpi(bool forward) { + step_pointer_default_dpi(&g_dilemma_config, forward); + write_dilemma_config_to_eeprom(&g_dilemma_config); +} + +void dilemma_cycle_pointer_sniping_dpi_noeeprom(bool forward) { + step_pointer_sniping_dpi(&g_dilemma_config, forward); +} + +void dilemma_cycle_pointer_sniping_dpi(bool forward) { + step_pointer_sniping_dpi(&g_dilemma_config, forward); + write_dilemma_config_to_eeprom(&g_dilemma_config); +} + +bool dilemma_get_pointer_sniping_enabled(void) { + return g_dilemma_config.is_sniping_enabled; +} + +void dilemma_set_pointer_sniping_enabled(bool enable) { + g_dilemma_config.is_sniping_enabled = enable; + maybe_update_pointing_device_cpi(&g_dilemma_config); +} + +bool dilemma_get_pointer_dragscroll_enabled(void) { + return g_dilemma_config.is_dragscroll_enabled; +} + +void dilemma_set_pointer_dragscroll_enabled(bool enable) { + g_dilemma_config.is_dragscroll_enabled = enable; + maybe_update_pointing_device_cpi(&g_dilemma_config); +} + +void pointing_device_init_kb(void) { + maybe_update_pointing_device_cpi(&g_dilemma_config); + pointing_device_init_user(); +} + +/** + * \brief Augment the pointing device behavior. + * + * Implement drag-scroll. + */ +static void pointing_device_task_dilemma(report_mouse_t* mouse_report) { + static int16_t scroll_buffer_x = 0; + static int16_t scroll_buffer_y = 0; + if (g_dilemma_config.is_dragscroll_enabled) { +# ifdef DILEMMA_DRAGSCROLL_REVERSE_X + scroll_buffer_x -= mouse_report->x; +# else + scroll_buffer_x += mouse_report->x; +# endif // DILEMMA_DRAGSCROLL_REVERSE_X +# ifdef DILEMMA_DRAGSCROLL_REVERSE_Y + scroll_buffer_y -= mouse_report->y; +# else + scroll_buffer_y += mouse_report->y; +# endif // DILEMMA_DRAGSCROLL_REVERSE_Y + mouse_report->x = 0; + mouse_report->y = 0; + if (abs(scroll_buffer_x) > DILEMMA_DRAGSCROLL_BUFFER_SIZE) { + mouse_report->h = scroll_buffer_x > 0 ? 1 : -1; + scroll_buffer_x = 0; + } + if (abs(scroll_buffer_y) > DILEMMA_DRAGSCROLL_BUFFER_SIZE) { + mouse_report->v = scroll_buffer_y > 0 ? 1 : -1; + scroll_buffer_y = 0; + } + } +} + +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + if (is_keyboard_master()) { + pointing_device_task_dilemma(&mouse_report); + mouse_report = pointing_device_task_user(mouse_report); + } + return mouse_report; +} + +# if defined(POINTING_DEVICE_ENABLE) && !defined(NO_DILEMMA_KEYCODES) +/** \brief Whether SHIFT mod is enabled. */ +static bool has_shift_mod(void) { +# ifdef NO_ACTION_ONESHOT + return mod_config(get_mods()) & MOD_MASK_SHIFT; +# else + return mod_config(get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT; +# endif // NO_ACTION_ONESHOT +} +# endif // POINTING_DEVICE_ENABLE && !NO_DILEMMA_KEYCODES + +/** + * \brief Outputs the Dilemma configuration to console. + * + * Prints the in-memory configuration structure to console, for debugging. + * Includes: + * - raw value + * - drag-scroll: on/off + * - sniping: on/off + * - default DPI: internal table index/actual DPI + * - sniping DPI: internal table index/actual DPI + */ +static void debug_dilemma_config_to_console(dilemma_config_t* config) { +# ifdef CONSOLE_ENABLE + dprintf("(dilemma) process_record_kb: config = {\n" + "\traw = 0x%X,\n" + "\t{\n" + "\t\tis_dragscroll_enabled=%u\n" + "\t\tis_sniping_enabled=%u\n" + "\t\tdefault_dpi=0x%X (%u)\n" + "\t\tsniping_dpi=0x%X (%u)\n" + "\t}\n" + "}\n", + config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)); +# endif // CONSOLE_ENABLE +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (!process_record_user(keycode, record)) { + debug_dilemma_config_to_console(&g_dilemma_config); + return false; + } +# ifdef POINTING_DEVICE_ENABLE +# ifndef NO_DILEMMA_KEYCODES + switch (keycode) { + case POINTER_DEFAULT_DPI_FORWARD: + if (record->event.pressed) { + // Step backward if shifted, forward otherwise. + dilemma_cycle_pointer_default_dpi(/* forward= */ !has_shift_mod()); + } + break; + case POINTER_DEFAULT_DPI_REVERSE: + if (record->event.pressed) { + // Step forward if shifted, backward otherwise. + dilemma_cycle_pointer_default_dpi(/* forward= */ has_shift_mod()); + } + break; + case POINTER_SNIPING_DPI_FORWARD: + if (record->event.pressed) { + // Step backward if shifted, forward otherwise. + dilemma_cycle_pointer_sniping_dpi(/* forward= */ !has_shift_mod()); + } + break; + case POINTER_SNIPING_DPI_REVERSE: + if (record->event.pressed) { + // Step forward if shifted, backward otherwise. + dilemma_cycle_pointer_sniping_dpi(/* forward= */ has_shift_mod()); + } + break; + case SNIPING_MODE: + dilemma_set_pointer_sniping_enabled(record->event.pressed); + break; + case SNIPING_MODE_TOGGLE: + if (record->event.pressed) { + dilemma_set_pointer_sniping_enabled(!dilemma_get_pointer_sniping_enabled()); + } + break; + case DRAGSCROLL_MODE: + dilemma_set_pointer_dragscroll_enabled(record->event.pressed); + break; + case DRAGSCROLL_MODE_TOGGLE: + if (record->event.pressed) { + dilemma_set_pointer_dragscroll_enabled(!dilemma_get_pointer_dragscroll_enabled()); + } + break; + } +# endif // !NO_DILEMMA_KEYCODES +# endif // POINTING_DEVICE_ENABLE + debug_dilemma_config_to_console(&g_dilemma_config); + if ((keycode >= POINTER_DEFAULT_DPI_FORWARD && keycode < DILEMMA_SAFE_RANGE) || IS_MOUSEKEY(keycode)) { + debug_dilemma_config_to_console(&g_dilemma_config); + } + return true; +} + +void eeconfig_init_kb(void) { + g_dilemma_config.raw = 0; + g_dilemma_config.pointer_default_dpi = 4; + write_dilemma_config_to_eeprom(&g_dilemma_config); + maybe_update_pointing_device_cpi(&g_dilemma_config); + eeconfig_init_user(); +} + +void matrix_init_kb(void) { + read_dilemma_config_from_eeprom(&g_dilemma_config); + matrix_init_user(); +} +#endif // POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/dilemma/dilemma.h b/keyboards/bastardkb/dilemma/dilemma.h new file mode 100644 index 0000000000..fbf54c804b --- /dev/null +++ b/keyboards/bastardkb/dilemma/dilemma.h @@ -0,0 +1,134 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +// clang-format off +#define LAYOUT_split_3x5_2( \ + k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \ + k30, k32, k72, k70 \ +) \ +{ \ + { k00, k01, k02, k03, k04 }, \ + { k10, k11, k12, k13, k14 }, \ + { k20, k21, k22, k23, k24 }, \ + { k30, KC_NO, k32, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44 }, \ + { k50, k51, k52, k53, k54 }, \ + { k60, k61, k62, k63, k64 }, \ + { k70, KC_NO, k72, KC_NO, KC_NO }, \ +} +// clang-format on + +#ifdef POINTING_DEVICE_ENABLE +# ifndef NO_DILEMMA_KEYCODES +enum dilemma_keycodes { +# ifdef VIA_ENABLE + POINTER_DEFAULT_DPI_FORWARD = USER00, +# else + POINTER_DEFAULT_DPI_FORWARD = SAFE_RANGE, +# endif // VIA_ENABLE + POINTER_DEFAULT_DPI_REVERSE, + POINTER_SNIPING_DPI_FORWARD, + POINTER_SNIPING_DPI_REVERSE, + SNIPING_MODE, + SNIPING_MODE_TOGGLE, + DRAGSCROLL_MODE, + DRAGSCROLL_MODE_TOGGLE, + DILEMMA_SAFE_RANGE, +}; + +# define DPI_MOD POINTER_DEFAULT_DPI_FORWARD +# define DPI_RMOD POINTER_DEFAULT_DPI_REVERSE +# define S_D_MOD POINTER_SNIPING_DPI_FORWARD +# define S_D_RMOD POINTER_SNIPING_DPI_REVERSE +# define SNIPING SNIPING_MODE +# define SNP_TOG SNIPING_MODE_TOGGLE +# define DRGSCRL DRAGSCROLL_MODE +# define DRG_TOG DRAGSCROLL_MODE_TOGGLE +# endif // !NO_DILEMMA_KEYCODES + +/** \brief Return the current DPI value for the pointer's default mode. */ +uint16_t dilemma_get_pointer_default_dpi(void); + +/** + * \brief Update the pointer's default DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to DILEMMA_DEFAULT_DPI_CONFIG_STEP. + * + * The new value is persisted in EEPROM. + */ +void dilemma_cycle_pointer_default_dpi(bool forward); + +/** + * \brief Same as `dilemma_cycle_pointer_default_dpi`, but do not write to + * EEPROM. + * + * This means that reseting the board will revert the value to the last + * persisted one. + */ +void dilemma_cycle_pointer_default_dpi_noeeprom(bool forward); + +/** \brief Return the current DPI value for the pointer's sniper-mode. */ +uint16_t dilemma_get_pointer_sniping_dpi(void); + +/** + * \brief Update the pointer's sniper-mode DPI to the next or previous step. + * + * Increases the DPI value if `forward` is `true`, decreases it otherwise. + * The increment/decrement steps are equal to DILEMMA_SNIPING_DPI_CONFIG_STEP. + * + * The new value is persisted in EEPROM. + */ +void dilemma_cycle_pointer_sniping_dpi(bool forward); + +/** + * \brief Same as `dilemma_cycle_pointer_sniping_dpi`, but do not write to + * EEPROM. + * + * This means that reseting the board will revert the value to the last + * persisted one. + */ +void dilemma_cycle_pointer_sniping_dpi_noeeprom(bool forward); + +/** \brief Whether sniper-mode is enabled. */ +bool dilemma_get_pointer_sniping_enabled(void); + +/** + * \brief Enable/disable sniper mode. + * + * When sniper mode is enabled the dpi is reduced to slow down the pointer for + * more accurate movements. + */ +void dilemma_set_pointer_sniping_enabled(bool enable); + +/** \brief Whether drag-scroll is enabled. */ +bool dilemma_get_pointer_dragscroll_enabled(void); + +/** + * \brief Enable/disable drag-scroll mode. + * + * When drag-scroll mode is enabled, horizontal and vertical pointer movements + * are translated into horizontal and vertical scroll movements. + */ +void dilemma_set_pointer_dragscroll_enabled(bool enable); +#endif // POINTING_DEVICE_ENABLE diff --git a/keyboards/bastardkb/dilemma/elitec/config.h b/keyboards/bastardkb/dilemma/elitec/config.h new file mode 100644 index 0000000000..0f26e46fdb --- /dev/null +++ b/keyboards/bastardkb/dilemma/elitec/config.h @@ -0,0 +1,37 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { D4, C6, F5, F7 } +#define MATRIX_COL_PINS \ + { B4, B5, E6, D7, F6 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +//#define SPLIT_HAND_PIN F4 +// If you've soldered the handedness pull-up on the upper side instead of the +// left one, uncomment the following line. +//#define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 diff --git a/keyboards/bastardkb/dilemma/elitec/info.json b/keyboards/bastardkb/dilemma/elitec/info.json new file mode 100644 index 0000000000..f5916f3ab1 --- /dev/null +++ b/keyboards/bastardkb/dilemma/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Dilemma Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/dilemma/elitec/rules.mk b/keyboards/bastardkb/dilemma/elitec/rules.mk new file mode 100644 index 0000000000..e8326bcf09 --- /dev/null +++ b/keyboards/bastardkb/dilemma/elitec/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu diff --git a/keyboards/bastardkb/dilemma/info.json b/keyboards/bastardkb/dilemma/info.json new file mode 100644 index 0000000000..6764219969 --- /dev/null +++ b/keyboards/bastardkb/dilemma/info.json @@ -0,0 +1,46 @@ +{ + "url": "https://bastardkb.com/dilemma", + "usb": { + "pid": "0x1835", + }, + "layouts": { + "LAYOUT_split_3x5_2": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"L30", "x":4, "y":3}, + {"label":"L32", "x":5, "y":3}, + {"label":"R32", "x":10, "y":3}, + {"label":"R30", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/bastardkb/dilemma/keymaps/bstiq/README.md b/keyboards/bastardkb/dilemma/keymaps/bstiq/README.md new file mode 100644 index 0000000000..df1f43cbcb --- /dev/null +++ b/keyboards/bastardkb/dilemma/keymaps/bstiq/README.md @@ -0,0 +1,3 @@ +# Dilemma @bstiq keymap + +Inspired from Miryoku, using home-rows. diff --git a/keyboards/bastardkb/dilemma/keymaps/bstiq/config.h b/keyboards/bastardkb/dilemma/keymaps/bstiq/config.h new file mode 100644 index 0000000000..b2e49c8c6e --- /dev/null +++ b/keyboards/bastardkb/dilemma/keymaps/bstiq/config.h @@ -0,0 +1,153 @@ +/** + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifdef VIA_ENABLE +/* Via configuration. */ +# define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#endif // VIA_ENABLE + +/** + * Configure the global tapping term (default: 200ms). + * If you have a lot of accidental mod activations, crank up the tapping term. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-term + */ +#ifndef TAPPING_TERM +# define TAPPING_TERM 160 +#endif // TAPPING_TERM + +// disable trackpad taps +// #define CIRQUE_PINNACLE_TAPPING_TERM 0 + +/** + * Enable rapid switch from tap to hold. Disable auto-repeat when pressing key + * twice, except for one-shot keys. + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#tapping-force-hold + */ +#define TAPPING_FORCE_HOLD + +/* + * Tap-or-Hold decision modes. + * + * Note that the following flags behave differently when combined (ie. when 2 or + * more are enabled). + * + * See bit.ly/tap-or-hold for a visual explanation of the following tap-or-hold + * decision modes. + */ + +/** + * Faster tap-hold trigger. + * + * Without `PERMISSIVE_HOLD`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 e🠕 Mod(a)🠕 âžž ae + * With `PERMISSIVE_HOLD`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 e🠕 Mod(a)🠕 âžž Mod+e + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#permissive-hold + */ +#define PERMISSIVE_HOLD + +/** + * Prevent normal rollover on alphas from accidentally triggering mods. + * + * Ignores key presses that interrupt a mod-tap. Must-have for Home Row mod. + * + * Without `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 âžž Mod+e + * With `IGNORE_MOD_TAP_INTERRUPT`, within `TAPPING_TERM`: + * Mod(a)🠗 e🠗 Mod(a)🠕 e🠕 âžž ae + * + * See docs.qmk.fm/using-qmk/software-features/tap_hold#ignore-mod-tap-interrupt + */ +#define IGNORE_MOD_TAP_INTERRUPT + +/** Dilemma-specific features. */ + +#ifdef POINTING_DEVICE_ENABLE +// Flip horizontal direction for drag-scroll. +# define DILEMMA_DRAGSCROLL_REVERSE_X +// #define DILEMMA_DRAGSCROLL_REVERSE_Y +#endif // POINTING_DEVICE_ENABLE + +/** RGB Matrix. */ + +#ifdef RGB_MATRIX_ENABLE +// Enable all animations on ARM boards since they have plenty of memory +// available for it. +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +// Limit maximum brightness to keep power consumption reasonable, and avoid +// disconnects. +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 64 + +// Rainbow swirl as startup mode. +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + +// Slow swirl at startup. +# define RGB_MATRIX_STARTUP_SPD 32 + +// Startup values. +# define RGB_MATRIX_STARTUP_HUE 0 +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/bastardkb/dilemma/keymaps/bstiq/keymap.c b/keyboards/bastardkb/dilemma/keymaps/bstiq/keymap.c new file mode 100644 index 0000000000..f8396cb1c2 --- /dev/null +++ b/keyboards/bastardkb/dilemma/keymaps/bstiq/keymap.c @@ -0,0 +1,224 @@ +/** + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum bstiq_layers { + LAYER_BASE = 0, + LAYER_MBO, + LAYER_MEDIA, + LAYER_NAV, + LAYER_MOUSE, + LAYER_SYM, + LAYER_NUM, + LAYER_FUN, +}; + +// Automatically enable sniping when the mouse layer is on. +#define DILEMMA_AUTO_SNIPING_ON_LAYER LAYER_MOUSE + +#define BSP_NAV LT(LAYER_NAV, KC_BSPC) +#define ENT_MBO LT(LAYER_MBO, KC_ENT) +#define TAB_MED LT(LAYER_MEDIA, KC_TAB) +#define ESC_SYM LT(LAYER_SYM, KC_ESC) +#define SPC_NUM LT(LAYER_NUM, KC_SPC) +#define SPC_MBO LT(LAYER_MBO, KC_SPC) +#define MOUSE(KC) LT(LAYER_MOUSE, KC) + +#define USR_RDO KC_AGAIN +#define USR_PST S(KC_INS) +#define USR_CPY C(KC_INS) +#define USR_CUT S(KC_DEL) +#define USR_UND KC_UNDO + +#define MS_L KC_MS_LEFT +#define MS_R KC_MS_RIGHT +#define MS_D KC_MS_DOWN +#define MS_U KC_MS_UP + +#define WH_L KC_MS_WH_LEFT +#define WH_R KC_MS_WH_RIGHT +#define WH_D KC_MS_WH_DOWN +#define WH_U KC_MS_WH_UP + +// clang-format off +/** Convenience macro. */ +#define _KC_LAYOUT_wrapper( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + ...) \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, \ + __VA_ARGS__ +#define KC_LAYOUT_wrapper(...) _KC_LAYOUT_wrapper(__VA_ARGS__) + +/** Base layer with BÉPO layout. */ +#define LAYOUT_LAYER_BASE_BEPO KC_LAYOUT_wrapper( \ + B, W, P, O, QUOT, DOT, V, D, L, J, \ + A, U, I, E, COMM, C, T, S, R, N, \ + Z, Y, X, SLSH, K, M, Q, G, H, F, \ + SPC_MBO, TAB_MED, ESC_SYM, SPC_NUM) + +/** Convenience key shorthands. */ +#define U_NA KC_NO // Present but not available for use. +#define U_NU KC_NO // Available but not used. + +/** Convenience row shorthands. */ +#define ________________HOME_ROW_NA________________ U_NA, U_NA, U_NA, U_NA, U_NA +#define ______________HOME_ROW_GASC_L______________ KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, U_NA +#define ______________HOME_ROW_ALGR_L______________ U_NA, KC_ALGR, U_NA, U_NA, U_NA +#define ______________HOME_ROW_GASC_R______________ U_NA, KC_LCTL, KC_LSFT, KC_LALT, KC_LGUI +#define ______________HOME_ROW_ALGR_R______________ U_NA, U_NA, U_NA, KC_ALGR, U_NA + +/** Layers. */ + +// Buttons. +#define LAYOUT_LAYER_MBO \ + ________________HOME_ROW_NA________________, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + ______________HOME_ROW_GASC_L______________, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \ + KC_BTN3, KC_ALGR, KC_BTN2, KC_BTN1, U_NA, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, \ + U_NA, U_NA, KC_ENT, KC_ENT + +// Media. +#define LAYOUT_LAYER_MEDIA \ + ________________HOME_ROW_NA________________, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + ______________HOME_ROW_GASC_L______________, U_NU, MS_L, MS_D, MS_U, MS_R, \ + ______________HOME_ROW_ALGR_L______________, U_NU, WH_L, WH_D, WH_U, WH_R, \ + U_NA, U_NA, KC_BTN1, KC_BTN3 + +// Navigation. +#define LAYOUT_LAYER_NAV \ + ________________HOME_ROW_NA________________, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, \ + ______________HOME_ROW_GASC_L______________, U_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, \ + ______________HOME_ROW_ALGR_L______________, U_NU, U_NU, U_NU, U_NU, U_NU, \ + U_NA, U_NA, KC_MSTP, KC_MPLY + +// Mouse. +#define LAYOUT_LAYER_MOUSE \ + S_D_MOD, USR_PST, USR_CPY, USR_CUT, USR_UND, USR_RDO, USR_PST, USR_CPY, USR_CUT, USR_UND, \ + DPI_MOD, DRGSCRL, KC_LSFT, DRGSCRL, _______, U_NU, MS_L, MS_D, MS_U, MS_R, \ + USR_RDO, USR_PST, USR_CPY, KC_BTN3, USR_UND, U_NU, WH_L, WH_D, WH_U, WH_R, \ + KC_BTN1, KC_BTN2, KC_BTN1, KC_BTN3 + +// Symbols. +#define LAYOUT_LAYER_SYM \ + KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, ________________HOME_ROW_NA________________, \ + KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, ______________HOME_ROW_GASC_R______________, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_MINS, ______________HOME_ROW_ALGR_R______________, \ + KC_RPRN, KC_LPRN, U_NA, U_NA + +// Numerals. +#define LAYOUT_LAYER_NUM \ + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, ________________HOME_ROW_NA________________, \ + KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, ______________HOME_ROW_GASC_R______________, \ + KC_GRV, KC_1, KC_2, KC_3, KC_UNDS, ______________HOME_ROW_ALGR_R______________, \ + KC_0, KC_MINS, U_NA, U_NA + +// Function keys. +#define LAYOUT_LAYER_FUN \ + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, ________________HOME_ROW_NA________________, \ + KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, ______________HOME_ROW_GASC_R______________, \ + KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, ______________HOME_ROW_ALGR_R______________,\ + KC_APP, KC_TAB, U_NA, U_NA + +/** + * Add Home Row mod to a layout. + * + * Expects a 10-key per row layout. Adds support for GASC (Gui, Alt, Shift, Ctl) + * home row. The layout passed in parameter must contain at least 20 keycodes. + * + * This is meant to be used with `LAYOUT_LAYER_BASE_BEPO` defined above, eg.: + * + * HOME_ROW_MOD_GASC(LAYOUT_LAYER_BASE_BEPO) + */ +#define _HOME_ROW_MOD_GASC( \ + L00, L01, L02, L03, L04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, R15, R16, R17, R18, R19, \ + ...) \ + L00, L01, L02, L03, L04, \ + R05, R06, R07, R08, R09, \ + LGUI_T(L10), LALT_T(L11), LSFT_T(L12), LCTL_T(L13), L14, \ + R15, RCTL_T(R16), RSFT_T(R17), LALT_T(R18), RGUI_T(R19), \ + __VA_ARGS__ +#define HOME_ROW_MOD_GASC(...) _HOME_ROW_MOD_GASC(__VA_ARGS__) + +/** + * Add mouse layer keys to a layout. + * + * Expects a 10-key per row layout. The layout passed in parameter must contain + * at least 30 keycodes. + * + * This is meant to be used with `LAYOUT_LAYER_BASE_BEPO` defined above, eg.: + * + * MOUSE_MOD(LAYOUT_LAYER_BASE_BEPO) + */ +#define _MOUSE_MOD( \ + L00, L01, L02, L03, L04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, R25, R26, R27, R28, R29, \ + ...) \ + L00, L01, L02, L03, L04, \ + R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, \ + R15, R16, R17, R18, R19, \ + L20, MOUSE(L21), L22, L23, L24, \ + R25, R26, R27, R28, MOUSE(R29), \ + __VA_ARGS__ +#define MOUSE_MOD(...) _MOUSE_MOD(__VA_ARGS__) + +#define LAYOUT_wrapper(...) LAYOUT_split_3x5_2(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_wrapper( + MOUSE_MOD(HOME_ROW_MOD_GASC(LAYOUT_LAYER_BASE_BEPO)) + ), + [LAYER_MBO] = LAYOUT_wrapper(LAYOUT_LAYER_MBO), + [LAYER_MEDIA] = LAYOUT_wrapper(LAYOUT_LAYER_MEDIA), + [LAYER_NAV] = LAYOUT_wrapper(LAYOUT_LAYER_NAV), + [LAYER_MOUSE] = LAYOUT_wrapper(LAYOUT_LAYER_MOUSE), + [LAYER_SYM] = LAYOUT_wrapper(LAYOUT_LAYER_SYM), + [LAYER_NUM] = LAYOUT_wrapper(LAYOUT_LAYER_NUM), + [LAYER_FUN] = LAYOUT_wrapper(LAYOUT_LAYER_FUN), +}; +// clang-format on + +#if defined(POINTING_DEVICE_ENABLE) && defined(DILEMMA_AUTO_SNIPING_ON_LAYER) +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + dilemma_set_pointer_sniping_enabled(layer_state_cmp(state, DILEMMA_AUTO_SNIPING_ON_LAYER)); + return state; +} +#endif // POINTING_DEVICE_ENABLE && DILEMMA_AUTO_SNIPING_ON_LAYER + +#ifdef RGB_MATRIX_ENABLE +// Forward-declare this helper function since it is defined in rgb_matrix.c. +void rgb_matrix_update_pwm_buffers(void); +#endif + +void shutdown_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb_red(); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_color_all(RGB_RED); + rgb_matrix_update_pwm_buffers(); +#endif // RGB_MATRIX_ENABLE +} diff --git a/keyboards/bastardkb/dilemma/keymaps/default/keymap.c b/keyboards/bastardkb/dilemma/keymaps/default/keymap.c new file mode 100644 index 0000000000..3f77ebcabb --- /dev/null +++ b/keyboards/bastardkb/dilemma/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/** + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum charybdis_keymap_layers { + LAYER_BASE = 0, + LAYER_NAV, + LAYER_SYM, + LAYER_NUM, +}; + +#define NAV MO(LAYER_NAV) +#define SYM MO(LAYER_SYM) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_BASE] = LAYOUT_split_3x5_2( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ + NAV, CAPSWRD, KC_SPC, SYM + // ╰──────────────────╯ ╰──────────────────╯ + ), + + [LAYER_NAV] = LAYOUT_split_3x5_2( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_DEL, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_LSFT, KC_LCTL, KC_LALT, KC_RGUI, KC_VOLD, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + QK_BOOT, EEP_RST, KC_MPRV, KC_MNXT, KC_MPLY, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, KC_ENT, + // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ + _______, KC_LSFT, KC_SPC, _______ + // ╰──────────────────╯ ╰──────────────────╯ + ), + + [LAYER_SYM] = LAYOUT_split_3x5_2( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_ESC, KC_LBRC, KC_LCBR, KC_LPRN, KC_TILD, KC_CIRC, KC_RPRN, KC_RCBR, KC_RBRC, KC_GRV, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_MINS, KC_ASTR, KC_EQL, KC_UNDS, KC_DLR, KC_HASH, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_PLUS, KC_PIPE, KC_AT, KC_SLSH, KC_PERC, _______, KC_BSLS, KC_AMPR, KC_QUES, KC_EXLM, + // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ + _______, KC_LSFT, KC_SPC, _______ + // ╰──────────────────╯ ╰──────────────────╯ + ), + + [LAYER_NUM] = LAYOUT_split_3x5_2( + // â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® â•â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•® + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_F11, KC_F12, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT, + // ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + // ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ + _______, KC_LSFT, KC_SPC, _______ + // ╰──────────────────╯ ╰──────────────────╯ + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_NAV, LAYER_SYM, LAYER_NUM); +} diff --git a/keyboards/bastardkb/dilemma/readme.md b/keyboards/bastardkb/dilemma/readme.md new file mode 100644 index 0000000000..ecd1f9f1c9 --- /dev/null +++ b/keyboards/bastardkb/dilemma/readme.md @@ -0,0 +1,14 @@ +# Dilemma + +A very small keyboard made for ergonomic enthusiasts. + +- Keyboard Maintainer: [Bastard Keyboards](https://github.com/Bastardkb/) +- Hardware Supported: elite-C V4, Splinky +- Hardware Availability: [Bastardkb.com](https://bastardkb.com/) + +Make example for this keyboard (after setting up your build environment): + + make bastardkb/dilemma/elitec:default + make bastardkb/dilemma/splinky:default + +See the [keyboard build instructions](http://docs.bastardkb.com/) diff --git a/keyboards/bastardkb/dilemma/rules.mk b/keyboards/bastardkb/dilemma/rules.mk new file mode 100644 index 0000000000..499eadfdfb --- /dev/null +++ b/keyboards/bastardkb/dilemma/rules.mk @@ -0,0 +1,25 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality + +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_2 + +DEFAULT_FOLDER = bastardkb/dilemma/splinky diff --git a/keyboards/bastardkb/dilemma/splinky/config.h b/keyboards/bastardkb/dilemma/splinky/config.h new file mode 100644 index 0000000000..80c9e42224 --- /dev/null +++ b/keyboards/bastardkb/dilemma/splinky/config.h @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP4, GP5, GP28, GP26 } +#define MATRIX_COL_PINS \ + { GP8, GP9, GP7, GP6, GP27 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +//#define SPLIT_HAND_PIN GP29 +// If you've soldered the handedness pull-up on the upper side instead of the +// left one, uncomment the following line. +//#define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/xelus/la_plus/keymaps/default/config.h b/keyboards/bastardkb/dilemma/splinky/halconf.h index e559a15426..a4c25c090a 100644 --- a/keyboards/xelus/la_plus/keymaps/default/config.h +++ b/keyboards/bastardkb/dilemma/splinky/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Harrison Chan (Xelus) +/* Copyright 2022 QMK * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,4 +16,6 @@ #pragma once -#define QMK_KEYS_PER_SCAN 4 +#define HAL_USE_I2C TRUE + +#include_next "halconf.h" diff --git a/keyboards/bastardkb/dilemma/splinky/info.json b/keyboards/bastardkb/dilemma/splinky/info.json new file mode 100644 index 0000000000..07ee320bb9 --- /dev/null +++ b/keyboards/bastardkb/dilemma/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Dilemma Splinky", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/dilemma/splinky/mcuconf.h b/keyboards/bastardkb/dilemma/splinky/mcuconf.h new file mode 100644 index 0000000000..5e47eac54f --- /dev/null +++ b/keyboards/bastardkb/dilemma/splinky/mcuconf.h @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE diff --git a/keyboards/bastardkb/dilemma/splinky/rules.mk b/keyboards/bastardkb/dilemma/splinky/rules.mk new file mode 100644 index 0000000000..9c593c6ed8 --- /dev/null +++ b/keyboards/bastardkb/dilemma/splinky/rules.mk @@ -0,0 +1,9 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. +SERIAL_DRIVER = vendor diff --git a/keyboards/bastardkb/dilemma/splinky/splinky.c b/keyboards/bastardkb/dilemma/splinky/splinky.c new file mode 100644 index 0000000000..0100ae06ae --- /dev/null +++ b/keyboards/bastardkb/dilemma/splinky/splinky.c @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "quantum.h" + +// Forward declare RP2040 SDK declaration. +void gpio_init(uint gpio); + +void keyboard_pre_init_kb(void) { + // Ensures that GP26 through GP29 are initialized as digital inputs (as + // opposed to analog inputs). These GPIOs are shared with A0 through A3, + // respectively. On RP2040-B2 and later, the digital inputs are disabled by + // default (see RP2040-E6). + gpio_init(GP26); + gpio_init(GP27); + gpio_init(GP28); + gpio_init(GP29); + keyboard_pre_init_user(); +} diff --git a/keyboards/bastardkb/info.json b/keyboards/bastardkb/info.json new file mode 100644 index 0000000000..2791a78b77 --- /dev/null +++ b/keyboards/bastardkb/info.json @@ -0,0 +1,8 @@ +{ + "url": "https://bastardkb.com", + "manufacturer": "Bastard Keyboards", + "maintainer": "Quentin Lebastard", + "usb": { + "vid": "0xA8F8", + }, +} diff --git a/keyboards/bastardkb/scylla/blackpill/config.h b/keyboards/bastardkb/scylla/blackpill/config.h new file mode 100644 index 0000000000..773ee947d7 --- /dev/null +++ b/keyboards/bastardkb/scylla/blackpill/config.h @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B15, A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B0, B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 diff --git a/keyboards/bastardkb/scylla/blackpill/halconf.h b/keyboards/bastardkb/scylla/blackpill/halconf.h new file mode 100644 index 0000000000..0d4b7b5dc5 --- /dev/null +++ b/keyboards/bastardkb/scylla/blackpill/halconf.h @@ -0,0 +1,29 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +//#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#define HAL_USE_GPT TRUE + +#include_next <halconf.h> diff --git a/keyboards/bastardkb/scylla/blackpill/info.json b/keyboards/bastardkb/scylla/blackpill/info.json new file mode 100644 index 0000000000..587cc2bc04 --- /dev/null +++ b/keyboards/bastardkb/scylla/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Scylla Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/scylla/blackpill/mcuconf.h b/keyboards/bastardkb/scylla/blackpill/mcuconf.h new file mode 100644 index 0000000000..e7cf3681fd --- /dev/null +++ b/keyboards/bastardkb/scylla/blackpill/mcuconf.h @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 FALSE + +//#undef STM32_I2C_I2C1_RX_DMA_STREAM +//#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +//#undef STM32_I2C_I2C1_TX_DMA_STREAM +//#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +//#undef STM32_PWM_USE_TIM3 +//#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +//#undef STM32_SPI_SPI1_RX_DMA_STREAM +//#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +//#undef STM32_SPI_SPI1_TX_DMA_STREAM +//#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +//#undef STM32_SERIAL_USE_USART2 +//#define STM32_SERIAL_USE_USART2 TRUE + +//#undef STM32_UART_USART2_RX_DMA_STREAM +//#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +//#undef STM32_UART_USART2_TX_DMA_STREAM +//#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#undef STM32_GPT_USE_TIM3 +#define STM32_GPT_USE_TIM3 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/scylla/blackpill/rules.mk b/keyboards/bastardkb/scylla/blackpill/rules.mk new file mode 100644 index 0000000000..cf2041ea1c --- /dev/null +++ b/keyboards/bastardkb/scylla/blackpill/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes + +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/scylla/config.h b/keyboards/bastardkb/scylla/config.h index 3e582c4275..777f99197a 100644 --- a/keyboards/bastardkb/scylla/config.h +++ b/keyboards/bastardkb/scylla/config.h @@ -1,5 +1,6 @@ /* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,85 +17,30 @@ */ #pragma once + #include "config_common.h" -#define MATRIX_ROWS 10 +/* Key matrix configuration. */ +#define MATRIX_ROWS 10 // Rows are doubled-up. #define MATRIX_COLS 6 + #define DIODE_DIRECTION ROW2COL -#define MATRIX_ROW_PINS { D7, B5, F7, F6, B6 } -#define MATRIX_COL_PINS { B4, E6, C6, B1, B3, B2 } -#define RGB_DI_PIN D2 -#define RGBLED_NUM 58 -#define RGBLED_SPLIT { 29, 29 } -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_ANIMATIONS +/* Set 0 if debouncing isn't needed. */ #define DEBOUNCE 5 -#define SOFT_SERIAL_PIN D0 -#define MASTER_RIGHT -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 58 -# define RGBLED_SPLIT { 29, 29 } -# define RGBLIGHT_LIMIT_VAL 50 -# define RGBLIGHT_ANIMATIONS -#endif +/* RGB settings. */ +#define RGBLED_NUM 58 +#define RGBLED_SPLIT \ + { 29, 29 } -// RGB matrix support +/* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE # define SPLIT_TRANSPORT_MIRROR -# define DRIVER_LED_TOTAL 58 // Number of LEDs -# define RGB_MATRIX_SPLIT { 29, 29 } +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT RGBLED_SPLIT # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/scylla/info.json b/keyboards/bastardkb/scylla/info.json index 1d3dd39030..026b0f742e 100644 --- a/keyboards/bastardkb/scylla/info.json +++ b/keyboards/bastardkb/scylla/info.json @@ -1,12 +1,7 @@ { - "keyboard_name": "Scylla", - "manufacturer": "Bastard Keyboards", - "url": "https://bastardkb.com/", - "maintainer": "Quentin Lebastard", + "url": "https://bastardkb.com/scylla", "usb": { - "vid": "0xA8F8", "pid": "0x1829", - "device_version": "0.0.1" }, "layouts": { "LAYOUT_split_4x6_5": { diff --git a/keyboards/bastardkb/scylla/keymaps/default/keymap.c b/keyboards/bastardkb/scylla/keymaps/default/keymap.c index fe9a834fa2..85781f6631 100644 --- a/keyboards/bastardkb/scylla/keymaps/default/keymap.c +++ b/keyboards/bastardkb/scylla/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> * * This program is free software: you can redistribute it and/or modify @@ -19,42 +19,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_4x6_5( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, -//-------------------------------------------------//-----------------------------------------------------------// - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, -//-------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_SPC, MO(1), MO(2), KC_ENT, KC_RGUI, - KC_HOME, KC_BSPC, KC_DEL, KC_RALT - ), + [0] = LAYOUT_split_4x6_5(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //-------------------------------------------------//-----------------------------------------------------------// + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //-------------------------------------------------//-----------------------------------------------------------// + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //-------------------------------------------------//-----------------------------------------------------------// + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + //-------------------------------------------------//-----------------------------------------------------------// + KC_LCTL, KC_SPC, MO(1), MO(2), KC_ENT, KC_RGUI, KC_HOME, KC_BSPC, KC_DEL, KC_RALT), - [1] = LAYOUT_split_4x6_5( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, -//---------------------------------------------------------//-----------------------------------------------------------// - QK_BOOT, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, _______, KC_PLUS, -//---------------------------------------------------------//-----------------------------------------------------------// - _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS, KC_PIPE, -//---------------------------------------------------------//-----------------------------------------------------------// - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, -//---------------------------------------------------------//-----------------------------------------------------------// - KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, KC_RGUI, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), + [1] = LAYOUT_split_4x6_5(KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + //---------------------------------------------------------//-----------------------------------------------------------// + QK_BOOT, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, _______, KC_PLUS, + //---------------------------------------------------------//-----------------------------------------------------------// + _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS, KC_PIPE, + //---------------------------------------------------------//-----------------------------------------------------------// + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, + //---------------------------------------------------------//-----------------------------------------------------------// + KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, KC_RGUI, KC_SPC, KC_BSPC, KC_RCTL, KC_ENT), - [2] = LAYOUT_split_4x6_5( - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, _______, RGB_RMOD, RGB_TOG, RGB_MOD, KC_LBRC, KC_RBRC, _______, KC_NLCK, KC_INS, KC_SLCK, KC_MUTE, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_LPRN, KC_RPRN, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLU, -//---------------------------------------------------------//--------------------------------------------------------------// - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, -//---------------------------------------------------------//--------------------------------------------------------------// - KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, QK_BOOT, - KC_SPC, KC_BSPC, KC_RCTL, KC_ENT - ), + [2] = LAYOUT_split_4x6_5(KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //---------------------------------------------------------//--------------------------------------------------------------// + _______, _______, RGB_RMOD, RGB_TOG, RGB_MOD, KC_LBRC, KC_RBRC, _______, KC_NLCK, KC_INS, KC_SLCK, KC_MUTE, + //---------------------------------------------------------//--------------------------------------------------------------// + _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_LPRN, KC_RPRN, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLU, + //---------------------------------------------------------//--------------------------------------------------------------// + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + //---------------------------------------------------------//--------------------------------------------------------------// + KC_LCTL, KC_HOME, KC_TRNS, KC_TRNS, KC_RALT, QK_BOOT, KC_SPC, KC_BSPC, KC_RCTL, KC_ENT), }; diff --git a/keyboards/bastardkb/scylla/readme.md b/keyboards/bastardkb/scylla/readme.md index 70df5cfbb9..5a83083b96 100644 --- a/keyboards/bastardkb/scylla/readme.md +++ b/keyboards/bastardkb/scylla/readme.md @@ -17,6 +17,6 @@ See the [keyboard build instructions](https://docs.bastardkb.com) ## Important information regarding the reset -If you modify this firmware, make sure to always have a RESET key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. +If you modify this firmware, make sure to always have a `QK_BOOT` key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. Otherwise if you're stuck, open the case and reset manually by shorting Gnd and Rst, or pressing the RST button. diff --git a/keyboards/bastardkb/scylla/scylla.h b/keyboards/bastardkb/scylla/scylla.h index 196982952f..4039ad3a94 100644 --- a/keyboards/bastardkb/scylla/scylla.h +++ b/keyboards/bastardkb/scylla/scylla.h @@ -1,5 +1,6 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,28 +16,29 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once + #include "quantum.h" -// SWITCHED 91 and 95 - check on left ? -#define LAYOUT_split_4x6_5( \ - k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ - k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ - k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ - k30, k31, k32, k33, k34, k35, k85, k84, k83, k82, k81, k80, \ - k43, k44, k41, k91, k94, k93, \ - k45, k42, k92, k95 \ -)\ -{\ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { KC_NO, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 }, \ - { k80, k81, k82, k83, k84, k85 }, \ - { KC_NO, k91, k92, k93, k94, k95 }, \ +// clang-format off +#define LAYOUT_split_4x6_5( \ + k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ + k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ + k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ + k30, k31, k32, k33, k34, k35, k85, k84, k83, k82, k81, k80, \ + k43, k44, k41, k91, k94, k93, \ + k45, k42, k92, k95 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { KC_NO, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k80, k81, k82, k83, k84, k85 }, \ + { KC_NO, k91, k92, k93, k94, k95 }, \ } +// clang-format on diff --git a/keyboards/bastardkb/scylla/v1/elitec/config.h b/keyboards/bastardkb/scylla/v1/elitec/config.h new file mode 100644 index 0000000000..0990e6d068 --- /dev/null +++ b/keyboards/bastardkb/scylla/v1/elitec/config.h @@ -0,0 +1,34 @@ +/* + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { D7, B5, F7, F6, B6 } +#define MATRIX_COL_PINS \ + { B4, E6, C6, B1, B3, B2 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D0 + +/* RGB settings. */ +#define RGB_DI_PIN D2 diff --git a/keyboards/bastardkb/scylla/v1/elitec/info.json b/keyboards/bastardkb/scylla/v1/elitec/info.json new file mode 100644 index 0000000000..57b36e1e2a --- /dev/null +++ b/keyboards/bastardkb/scylla/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Scylla Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/scylla/rules.mk b/keyboards/bastardkb/scylla/v1/elitec/rules.mk index fe2991040d..0c131a2eaf 100644 --- a/keyboards/bastardkb/scylla/rules.mk +++ b/keyboards/bastardkb/scylla/v1/elitec/rules.mk @@ -15,8 +15,12 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support -AUDIO_ENABLE = no # Audio output + SPLIT_KEYBOARD = yes -LTO_ENABLE = yes diff --git a/keyboards/bastardkb/scylla/v2/elitec/config.h b/keyboards/bastardkb/scylla/v2/elitec/config.h new file mode 100644 index 0000000000..698f6e426f --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/elitec/config.h @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F4, F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F6, F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 diff --git a/keyboards/bastardkb/scylla/v2/elitec/info.json b/keyboards/bastardkb/scylla/v2/elitec/info.json new file mode 100644 index 0000000000..213bb9a79c --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Scylla Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/scylla/v2/elitec/rules.mk b/keyboards/bastardkb/scylla/v2/elitec/rules.mk new file mode 100644 index 0000000000..0c131a2eaf --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/elitec/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes diff --git a/keyboards/bastardkb/scylla/v2/splinky/config.h b/keyboards/bastardkb/scylla/v2/splinky/config.h new file mode 100644 index 0000000000..5f678fb331 --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/splinky/config.h @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP29, GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP27, GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/scylla/v2/splinky/info.json b/keyboards/bastardkb/scylla/v2/splinky/info.json new file mode 100644 index 0000000000..614e22eefa --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Scylla Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/scylla/v2/splinky/rules.mk b/keyboards/bastardkb/scylla/v2/splinky/rules.mk new file mode 100644 index 0000000000..8dfc0256ab --- /dev/null +++ b/keyboards/bastardkb/scylla/v2/splinky/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/skeletyl/blackpill/config.h b/keyboards/bastardkb/skeletyl/blackpill/config.h new file mode 100644 index 0000000000..cbff281ddc --- /dev/null +++ b/keyboards/bastardkb/skeletyl/blackpill/config.h @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 diff --git a/keyboards/bastardkb/skeletyl/blackpill/halconf.h b/keyboards/bastardkb/skeletyl/blackpill/halconf.h new file mode 100644 index 0000000000..0d4b7b5dc5 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/blackpill/halconf.h @@ -0,0 +1,29 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +//#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#define HAL_USE_GPT TRUE + +#include_next <halconf.h> diff --git a/keyboards/bastardkb/skeletyl/blackpill/info.json b/keyboards/bastardkb/skeletyl/blackpill/info.json new file mode 100644 index 0000000000..16106f2f82 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Skeletyl Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/skeletyl/blackpill/mcuconf.h b/keyboards/bastardkb/skeletyl/blackpill/mcuconf.h new file mode 100644 index 0000000000..e7cf3681fd --- /dev/null +++ b/keyboards/bastardkb/skeletyl/blackpill/mcuconf.h @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 FALSE + +//#undef STM32_I2C_I2C1_RX_DMA_STREAM +//#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +//#undef STM32_I2C_I2C1_TX_DMA_STREAM +//#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +//#undef STM32_PWM_USE_TIM3 +//#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +//#undef STM32_SPI_SPI1_RX_DMA_STREAM +//#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +//#undef STM32_SPI_SPI1_TX_DMA_STREAM +//#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +//#undef STM32_SERIAL_USE_USART2 +//#define STM32_SERIAL_USE_USART2 TRUE + +//#undef STM32_UART_USART2_RX_DMA_STREAM +//#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +//#undef STM32_UART_USART2_TX_DMA_STREAM +//#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#undef STM32_GPT_USE_TIM3 +#define STM32_GPT_USE_TIM3 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/skeletyl/blackpill/rules.mk b/keyboards/bastardkb/skeletyl/blackpill/rules.mk new file mode 100644 index 0000000000..4ecd8c6924 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/blackpill/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 + +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/skeletyl/config.h b/keyboards/bastardkb/skeletyl/config.h index 45886a260f..8494e2bfac 100644 --- a/keyboards/bastardkb/skeletyl/config.h +++ b/keyboards/bastardkb/skeletyl/config.h @@ -1,5 +1,6 @@ /* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,82 +17,30 @@ */ #pragma once + #include "config_common.h" -#define MATRIX_ROWS 8 +/* Key matrix configuration. */ +#define MATRIX_ROWS 8 // Rows are doubled-up. #define MATRIX_COLS 5 -#define RGBLIGHT_LIMIT_VAL 180 -#define MATRIX_ROW_PINS { B5, F7, F6, B6 } -#define MATRIX_COL_PINS { E6, C6, B1, B3, B2 } #define DIODE_DIRECTION ROW2COL -#define RGB_DI_PIN D2 -#define RGBLED_NUM 36 -#define RGBLED_SPLIT { 18, 18 } -#define RGBLIGHT_ANIMATIONS - +/* Set 0 if debouncing isn't needed. */ #define DEBOUNCE 5 -#define SOFT_SERIAL_PIN D0 - -#define MASTER_RIGHT +/* RGB settings. */ +#define RGBLED_NUM 36 +#define RGBLED_SPLIT \ + { 18, 18 } -// RGB matrix support +/* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE # define SPLIT_TRANSPORT_MIRROR -# define DRIVER_LED_TOTAL 36 // Number of LEDs -# define RGB_MATRIX_SPLIT { 18, 18 } +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT RGBLED_SPLIT # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/skeletyl/info.json b/keyboards/bastardkb/skeletyl/info.json index c06e23ba22..55f68dc9b2 100644 --- a/keyboards/bastardkb/skeletyl/info.json +++ b/keyboards/bastardkb/skeletyl/info.json @@ -1,12 +1,7 @@ { - "keyboard_name": "Skeletyl", - "manufacturer": "Bastard Keyboards", - "url": "https://www.bastardkb.com", - "maintainer": "Quentin Lebastard", + "url": "https://www.bastardkb.com/skeletyl", "usb": { - "vid": "0xA8F8", "pid": "0x1830", - "device_version": "0.0.1" }, "layouts": { "LAYOUT_split_3x5_3": { diff --git a/keyboards/bastardkb/skeletyl/skeletyl.h b/keyboards/bastardkb/skeletyl/skeletyl.h index c7ad89bd2b..6d8073153f 100644 --- a/keyboards/bastardkb/skeletyl/skeletyl.h +++ b/keyboards/bastardkb/skeletyl/skeletyl.h @@ -1,5 +1,6 @@ /* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly DELAY <charly@codesink.dev> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +17,7 @@ */ #pragma once + #include "quantum.h" // clang-format off diff --git a/keyboards/bastardkb/skeletyl/v1/elitec/config.h b/keyboards/bastardkb/skeletyl/v1/elitec/config.h new file mode 100644 index 0000000000..fd2101ec55 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v1/elitec/config.h @@ -0,0 +1,34 @@ +/* + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B5, F7, F6, B6 } +#define MATRIX_COL_PINS \ + { E6, C6, B1, B3, B2 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D0 + +/* RGB settings. */ +#define RGB_DI_PIN D2 diff --git a/keyboards/bastardkb/skeletyl/v1/elitec/info.json b/keyboards/bastardkb/skeletyl/v1/elitec/info.json new file mode 100644 index 0000000000..f784c9423d --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Skeletyl Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/skeletyl/rules.mk b/keyboards/bastardkb/skeletyl/v1/elitec/rules.mk index 808b59c93d..399e03a2a5 100644 --- a/keyboards/bastardkb/skeletyl/rules.mk +++ b/keyboards/bastardkb/skeletyl/v1/elitec/rules.mk @@ -12,17 +12,16 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover +NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) -RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support AUDIO_ENABLE = no # Audio output -SPLIT_KEYBOARD = yes -LTO_ENABLE = yes -AUDIO_SUPPORTED = no -RGB_MATRIX_SUPPORTED = yes -RGBLIGHT_SUPPORTED = yes +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support +SPLIT_KEYBOARD = yes LAYOUTS = split_3x5_3 diff --git a/keyboards/bastardkb/skeletyl/v1/info.json b/keyboards/bastardkb/skeletyl/v1/info.json new file mode 100644 index 0000000000..2443086ddf --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v1/info.json @@ -0,0 +1,5 @@ +{ + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/skeletyl/v2/elitec/config.h b/keyboards/bastardkb/skeletyl/v2/elitec/config.h new file mode 100644 index 0000000000..5d4e48d49d --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/elitec/config.h @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 diff --git a/keyboards/bastardkb/skeletyl/v2/elitec/info.json b/keyboards/bastardkb/skeletyl/v2/elitec/info.json new file mode 100644 index 0000000000..0b50c1faa1 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Skeletyl Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/skeletyl/v2/elitec/rules.mk b/keyboards/bastardkb/skeletyl/v2/elitec/rules.mk new file mode 100644 index 0000000000..399e03a2a5 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/elitec/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 diff --git a/keyboards/bastardkb/skeletyl/v2/splinky/config.h b/keyboards/bastardkb/skeletyl/v2/splinky/config.h new file mode 100644 index 0000000000..02a8bd6551 --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/splinky/config.h @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/skeletyl/v2/splinky/info.json b/keyboards/bastardkb/skeletyl/v2/splinky/info.json new file mode 100644 index 0000000000..b90334c78d --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "Skeletyl Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/skeletyl/v2/splinky/rules.mk b/keyboards/bastardkb/skeletyl/v2/splinky/rules.mk new file mode 100644 index 0000000000..1ce16352dd --- /dev/null +++ b/keyboards/bastardkb/skeletyl/v2/splinky/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x5_3 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bastardkb/tbk/info.json b/keyboards/bastardkb/tbk/info.json index d16014c48a..d25ccd5cf6 100644 --- a/keyboards/bastardkb/tbk/info.json +++ b/keyboards/bastardkb/tbk/info.json @@ -1,10 +1,7 @@ { "keyboard_name": "The Bastard Keyboard", - "manufacturer": "Bastard Keyboards", "url": "https://bastardkb.com/", - "maintainer": "Quentin Lebastard", "usb": { - "vid": "0xA8F8", "pid": "0x1828", "device_version": "0.0.1" }, diff --git a/keyboards/bastardkb/tbk/readme.md b/keyboards/bastardkb/tbk/readme.md index 9359e6ad9c..0d552e5caf 100644 --- a/keyboards/bastardkb/tbk/readme.md +++ b/keyboards/bastardkb/tbk/readme.md @@ -17,6 +17,6 @@ See the [keyboard build instructions](https://docs.bastardkb.com) ## Important information regarding the reset -If you modify this firmware, make sure to always have a RESET key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. +If you modify this firmware, make sure to always have a QK_BOOT key that can be triggered using only the master side ! This way you ensure that you can always flash the keyboard, even if you mess up. Otherwise if you're stuck, open the case and reset manually by shorting Gnd and Rst, or pressing the RST button. diff --git a/keyboards/bastardkb/tbkmini/blackpill/config.h b/keyboards/bastardkb/tbkmini/blackpill/config.h new file mode 100644 index 0000000000..ba0c93ff93 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/blackpill/config.h @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Publicw License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { A2, B8, A8, B9 } +#define MATRIX_COL_PINS \ + { B0, B1, B10, B3, B4, B5 } + +/* Handedness. */ +#define SPLIT_HAND_PIN A3 // High -> left, Low -> right. + +/* RGB settings. */ +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_EXTERNAL_PULLUP +#define WS2812_DMA_STREAM STM32_DMA1_STREAM1 +#define WS2812_DMA_CHANNEL 3 +#define WS2812_PWM_TARGET_PERIOD 800000 + +/* Serial configuration for split keyboard. */ +#define SERIAL_USART_TX_PIN A9 + +/* CRC. */ +#define CRC8_USE_TABLE +#define CRC8_OPTIMIZE_SPEED + +/* SPI config for EEPROM. */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +/* EEPROM config. */ +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 diff --git a/keyboards/bastardkb/tbkmini/blackpill/halconf.h b/keyboards/bastardkb/tbkmini/blackpill/halconf.h new file mode 100644 index 0000000000..0d4b7b5dc5 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/blackpill/halconf.h @@ -0,0 +1,29 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +//#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#define HAL_USE_GPT TRUE + +#include_next <halconf.h> diff --git a/keyboards/bastardkb/tbkmini/blackpill/info.json b/keyboards/bastardkb/tbkmini/blackpill/info.json new file mode 100644 index 0000000000..d4f15e44f1 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/blackpill/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "TBK Mini Blackpill", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/tbkmini/blackpill/mcuconf.h b/keyboards/bastardkb/tbkmini/blackpill/mcuconf.h new file mode 100644 index 0000000000..e7cf3681fd --- /dev/null +++ b/keyboards/bastardkb/tbkmini/blackpill/mcuconf.h @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Nick Brassel (tzarc) + * Copyright 2021 Stefan Kerkmann (@KarlK90) + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 FALSE + +//#undef STM32_I2C_I2C1_RX_DMA_STREAM +//#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +//#undef STM32_I2C_I2C1_TX_DMA_STREAM +//#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +//#undef STM32_PWM_USE_TIM3 +//#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +//#undef STM32_SPI_SPI1_RX_DMA_STREAM +//#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +//#undef STM32_SPI_SPI1_TX_DMA_STREAM +//#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +//#undef STM32_SERIAL_USE_USART2 +//#define STM32_SERIAL_USE_USART2 TRUE + +//#undef STM32_UART_USART2_RX_DMA_STREAM +//#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +//#undef STM32_UART_USART2_TX_DMA_STREAM +//#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#undef STM32_GPT_USE_TIM3 +#define STM32_GPT_USE_TIM3 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 5 diff --git a/keyboards/bastardkb/tbkmini/blackpill/rules.mk b/keyboards/bastardkb/tbkmini/blackpill/rules.mk new file mode 100644 index 0000000000..702ed34356 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/blackpill/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = STM32F411 +BOARD = BLACKPILL_STM32_F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint +KEYBOARD_SHARED_EP = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart + +DEBOUNCE_TYPE = asym_eager_defer_pk diff --git a/keyboards/bastardkb/tbkmini/config.h b/keyboards/bastardkb/tbkmini/config.h index 9c0de7ea16..0624c4b4a6 100644 --- a/keyboards/bastardkb/tbkmini/config.h +++ b/keyboards/bastardkb/tbkmini/config.h @@ -1,5 +1,6 @@ /* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,85 +17,30 @@ */ #pragma once + #include "config_common.h" -#define MATRIX_ROWS 8 +/* Key matrix configuration. */ +#define MATRIX_ROWS 8 // Rows are doubled-up. #define MATRIX_COLS 6 -#define RGBLIGHT_LIMIT_VAL 180 -#define MATRIX_ROW_PINS { B5, F7, F6, B6 } -#define MATRIX_COL_PINS { B4, E6, C6, B1, B3, B2 } #define DIODE_DIRECTION ROW2COL -#define RGB_DI_PIN D2 -#define RGBLED_NUM 42 -#define RGBLED_SPLIT { 21, 21 } -#define RGBLIGHT_ANIMATIONS - +/* Set 0 if debouncing isn't needed. */ #define DEBOUNCE 5 -#define SOFT_SERIAL_PIN D0 - -#define LOCKING_SUPPORT_ENABLE -#define LOCKING_RESYNC_ENABLE -#define F_SCL 400000L -#define MASTER_RIGHT +/* RGB settings. */ +#define RGBLED_NUM 42 +#define RGBLED_SPLIT \ + { 21, 21 } -// RGB matrix support +/* RGB matrix support. */ #ifdef RGB_MATRIX_ENABLE # define SPLIT_TRANSPORT_MIRROR -# define DRIVER_LED_TOTAL 42 // Number of LEDs -# define RGB_MATRIX_SPLIT { 21, 21 } +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT RGBLED_SPLIT # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/tbkmini/info.json b/keyboards/bastardkb/tbkmini/info.json index 549879328b..4233599432 100644 --- a/keyboards/bastardkb/tbkmini/info.json +++ b/keyboards/bastardkb/tbkmini/info.json @@ -1,12 +1,7 @@ { - "keyboard_name": "TBK Mini", - "manufacturer": "Bastard Keyboards", - "url": "https://www.bastardkb.com", - "maintainer": "Quentin Lebastard", + "url": "https://www.bastardkb.com/tbk-mini", "usb": { - "vid": "0xA8F8", "pid": "0x1828", - "device_version": "0.0.1" }, "layouts": { "LAYOUT_split_3x6_3": { diff --git a/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c b/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c index 3aa41b6fba..551aea127f 100644 --- a/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c +++ b/keyboards/bastardkb/tbkmini/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> * * This program is free software: you can redistribute it and/or modify @@ -19,52 +19,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, KC_SPC , MO(1), MO(2), KC_ENT , KC_RALT - //`--------------------------' `--------------------------' + [0] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, KC_SPC, MO(1), MO(2), KC_ENT, KC_RALT + //`--------------------------' `--------------------------' - ), + ), - [1] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT - //`--------------------------' `--------------------------' - ), + [1] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT + //`--------------------------' `--------------------------' + ), - [2] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT - //`--------------------------' `--------------------------' - ), + [2] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT + //`--------------------------' `--------------------------' + ), - [3] = LAYOUT_split_3x6_3( - //,-----------------------------------------------------. ,-----------------------------------------------------. - QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT - //`--------------------------' `--------------------------' - ) -}; + [3] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT + //`--------------------------' `--------------------------' + )}; diff --git a/keyboards/bastardkb/tbkmini/tbkmini.h b/keyboards/bastardkb/tbkmini/tbkmini.h index 66235f4f4d..f031c9fed2 100644 --- a/keyboards/bastardkb/tbkmini/tbkmini.h +++ b/keyboards/bastardkb/tbkmini/tbkmini.h @@ -1,5 +1,6 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly DELAY <charly@codesink.dev> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,23 +16,25 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once + #include "quantum.h" -#define LAYOUT_split_3x6_3( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k33, k34, k31, k71, k74, k73 \ -)\ -{\ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { KC_NO, k31, KC_NO, k33, k34, KC_NO }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { KC_NO, k71, KC_NO, k73, k74, KC_NO }, \ +// clang-format off +#define LAYOUT_split_3x6_3( \ + k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ + k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ + k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ + k33, k34, k31, k71, k74, k73 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { KC_NO, k31, KC_NO, k33, k34, KC_NO }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { KC_NO, k71, KC_NO, k73, k74, KC_NO }, \ } +// clang-format on diff --git a/keyboards/bastardkb/tbkmini/v1/elitec/config.h b/keyboards/bastardkb/tbkmini/v1/elitec/config.h new file mode 100644 index 0000000000..5a9ff87efa --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v1/elitec/config.h @@ -0,0 +1,34 @@ +/* + * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { B5, F7, F6, B6 } +#define MATRIX_COL_PINS \ + { B4, E6, C6, B1, B3, B2 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D0 + +/* RGB settings. */ +#define RGB_DI_PIN D2 diff --git a/keyboards/bastardkb/tbkmini/v1/elitec/info.json b/keyboards/bastardkb/tbkmini/v1/elitec/info.json new file mode 100644 index 0000000000..83a9e799e1 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v1/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "TBK Mini Elite-C", + "usb": { + "device_version": "1.0.0", + }, +} diff --git a/keyboards/bastardkb/tbkmini/rules.mk b/keyboards/bastardkb/tbkmini/v1/elitec/rules.mk index 2892f5dd6e..380f48e73b 100644 --- a/keyboards/bastardkb/tbkmini/rules.mk +++ b/keyboards/bastardkb/tbkmini/v1/elitec/rules.mk @@ -12,18 +12,16 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover +NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) -RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support AUDIO_ENABLE = no # Audio output -SPLIT_KEYBOARD = yes -LTO_ENABLE = yes -AUDIO_SUPPORTED = no -RGB_MATRIX_SUPPORTED = yes -RGBLIGHT_SUPPORTED = yes +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support +SPLIT_KEYBOARD = yes LAYOUTS = split_3x6_3 diff --git a/keyboards/bastardkb/tbkmini/v2/elitec/config.h b/keyboards/bastardkb/tbkmini/v2/elitec/config.h new file mode 100644 index 0000000000..1feeac092b --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/elitec/config.h @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { F7, C6, D4, B5 } +#define MATRIX_COL_PINS \ + { F6, F5, B6, D7, E6, B4 } + +/* Handedness. */ +#define MASTER_RIGHT + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN D2 + +/* RGB settings. */ +#define RGB_DI_PIN D3 diff --git a/keyboards/bastardkb/tbkmini/v2/elitec/info.json b/keyboards/bastardkb/tbkmini/v2/elitec/info.json new file mode 100644 index 0000000000..50cfe860dd --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/elitec/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "TBK Mini Elite-C", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/tbkmini/v2/elitec/rules.mk b/keyboards/bastardkb/tbkmini/v2/elitec/rules.mk new file mode 100644 index 0000000000..380f48e73b --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/elitec/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 diff --git a/keyboards/bastardkb/tbkmini/v2/splinky/config.h b/keyboards/bastardkb/tbkmini/v2/splinky/config.h new file mode 100644 index 0000000000..ed0b4a6a54 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/splinky/config.h @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* Key matrix configuration. */ +#define MATRIX_ROW_PINS \ + { GP26, GP5, GP4, GP9 } +#define MATRIX_COL_PINS \ + { GP27, GP28, GP15, GP6, GP7, GP8 } + +/* Handedness. */ +#define MASTER_RIGHT + +// To use the handedness pin, resistors need to be installed on the adapter PCB. +// If so, uncomment the following code, and undefine MASTER_RIGHT above. +// #define SPLIT_HAND_PIN GP13 +// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left. + +/* serial.c configuration (for split keyboard). */ +#define SOFT_SERIAL_PIN GP1 + +/* RGB settings. */ +#define RGB_DI_PIN GP0 + +/* Reset. */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U diff --git a/keyboards/bastardkb/tbkmini/v2/splinky/info.json b/keyboards/bastardkb/tbkmini/v2/splinky/info.json new file mode 100644 index 0000000000..ca66bceeff --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/splinky/info.json @@ -0,0 +1,6 @@ +{ + "keyboard_name": "TBK Mini Splinky", + "usb": { + "device_version": "2.0.0", + }, +} diff --git a/keyboards/bastardkb/tbkmini/v2/splinky/rules.mk b/keyboards/bastardkb/tbkmini/v2/splinky/rules.mk new file mode 100644 index 0000000000..6b55f6e595 --- /dev/null +++ b/keyboards/bastardkb/tbkmini/v2/splinky/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SPLIT_KEYBOARD = yes +LAYOUTS = split_3x6_3 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/bbrfkr/dynamis/config.h b/keyboards/bbrfkr/dynamis/config.h index c888afb25e..ccf5f3f1c9 100644 --- a/keyboards/bbrfkr/dynamis/config.h +++ b/keyboards/bbrfkr/dynamis/config.h @@ -45,5 +45,5 @@ #define ENCODERS_PAD_A { B7 } #define ENCODERS_PAD_B { E6 } -#define PMW3360_CS_PIN SPI_SS_PIN +#define PMW33XX_CS_PIN SPI_SS_PIN #define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/bear_face/config.h b/keyboards/bear_face/config.h index 593f8a23a4..c11f27db10 100644 --- a/keyboards/bear_face/config.h +++ b/keyboards/bear_face/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* bear_face matrix pinout */ #define MATRIX_ROW_PINS { F5, F6, F4, F1, B0, B6 } #define MATRIX_COL_PINS { B5, C7, C6, F0, E6, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/beatervan/config.h b/keyboards/beatervan/config.h index 15f1ea2c39..3354a35bd5 100644 --- a/keyboards/beatervan/config.h +++ b/keyboards/beatervan/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4, B5, F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bemeier/bmek/rev1/config.h b/keyboards/bemeier/bmek/rev1/config.h index 5c738499f7..37f4025c22 100755 --- a/keyboards/bemeier/bmek/rev1/config.h +++ b/keyboards/bemeier/bmek/rev1/config.h @@ -23,7 +23,5 @@ { D4, D7, B6, B4, B7 } #define MATRIX_COL_PINS \ { F1, B0, B1, B2, B3, D0, D1, D2, C6, C7, F7, F6, F5, F4, B5 } -#define UNUSED_PINS \ - { D4, D5, F0, B7 } #define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev2/config.h b/keyboards/bemeier/bmek/rev2/config.h index c97d0417ad..a478cfa951 100755 --- a/keyboards/bemeier/bmek/rev2/config.h +++ b/keyboards/bemeier/bmek/rev2/config.h @@ -22,8 +22,6 @@ #define MATRIX_ROW_PINS \ { F4, F5, D7, B5, B4 } #define MATRIX_COL_PINS \ - { F6, B0, B1, F7, C7, C6, B6, F1, B2, B3, D6, D3, D2, D1, D0 } -#define UNUSED_PINS \ - { D4, D5, F0, B7 } + { F6, B0, B1, F7, C7, C6, B6, F1, B2, B3, D6, D3, D2, D1, D0 } #define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev3/config.h b/keyboards/bemeier/bmek/rev3/config.h index fd74a74027..6171efc8c2 100755 --- a/keyboards/bemeier/bmek/rev3/config.h +++ b/keyboards/bemeier/bmek/rev3/config.h @@ -22,8 +22,6 @@ #define MATRIX_ROW_PINS \ { F1, B4, B5, D6, D7 } #define MATRIX_COL_PINS \ - { B6, C6, C7, F7, F6, F5, F4, F0, B7, D0, D1, D2, D3, D5, D4 } -#define UNUSED_PINS \ - { D0, B1, B2, B3 } + { B6, C6, C7, F7, F6, F5, F4, F0, B7, D0, D1, D2, D3, D5, D4 } #define RGB_DI_PIN E6 diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 79fe4a739a..4980416017 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/biacco42/ergo42/keymaps/hdbx/keymap.c b/keyboards/biacco42/ergo42/keymaps/hdbx/keymap.c index bb3b6fac48..58f01bb322 100644 --- a/keyboards/biacco42/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/biacco42/ergo42/keymaps/hdbx/keymap.c @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // RGB Underglow使用時ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼æ¯Žã®ã‚«ãƒ©ãƒ¼åˆ‡ã‚Šæ›¿ãˆ -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } @@ -148,7 +148,7 @@ void matrix_init_user(void) { layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _RAISE: rgblight_setrgb_chartreuse(); // RAISE:シャルトリューズ break; diff --git a/keyboards/biacco42/meishi/config.h b/keyboards/biacco42/meishi/config.h index 3420c30035..5d5d422d13 100644 --- a/keyboards/biacco42/meishi/config.h +++ b/keyboards/biacco42/meishi/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5 } #define MATRIX_COL_PINS { B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/biacco42/meishi2/config.h b/keyboards/biacco42/meishi2/config.h index 723aae73ff..a99aa088a9 100644 --- a/keyboards/biacco42/meishi2/config.h +++ b/keyboards/biacco42/meishi2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, E6 } #define MATRIX_COL_PINS { F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/binepad/bn003/config.h b/keyboards/binepad/bn003/config.h index 72051f3c39..1c818b7459 100644 --- a/keyboards/binepad/bn003/config.h +++ b/keyboards/binepad/bn003/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { C6 } #define MATRIX_COL_PINS { B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/binepad/bn009/config.h b/keyboards/binepad/bn009/config.h index 8fb7182d91..48c2fd984c 100644 --- a/keyboards/binepad/bn009/config.h +++ b/keyboards/binepad/bn009/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { D2, D1, D0 } #define MATRIX_COL_PINS { B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bioi/g60ble/config.h b/keyboards/bioi/g60ble/config.h index c87292c635..e710c19b98 100644 --- a/keyboards/bioi/g60ble/config.h +++ b/keyboards/bioi/g60ble/config.h @@ -11,7 +11,6 @@ { E6, B0, F1, F5, F4 } #define MATRIX_COL_PINS \ { F6, F7, B3, C7, C6, B6, B5, D5, B4, D7, D6, D4, D1, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bioi/morgan65/config.h b/keyboards/bioi/morgan65/config.h index e4ad58c3a7..2ce3c7a56b 100644 --- a/keyboards/bioi/morgan65/config.h +++ b/keyboards/bioi/morgan65/config.h @@ -37,8 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E6, C6, F4, B2, D4 } #define MATRIX_COL_PINS { F5, F6, F7, C7, B0, B7, B5, D5, B4, D7, D6, D1, D0, B3 } -//#define QMK_KEYS_PER_SCAN 4 - /* Backlight Setup */ #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 12 diff --git a/keyboards/blackplum/config.h b/keyboards/blackplum/config.h index 9c9805d423..999e655a94 100644 --- a/keyboards/blackplum/config.h +++ b/keyboards/blackplum/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, B6, B4, B5, D6, D7, D5, D3, D4 } #define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blank/blank01/config.h b/keyboards/blank/blank01/config.h index 4ee950216a..220d0852fe 100644 --- a/keyboards/blank/blank01/config.h +++ b/keyboards/blank/blank01/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, B3 } #define MATRIX_COL_PINS { D5, D4, D6, D7, B5, B4, B6, C6, C7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blank_tehnologii/manibus/config.h b/keyboards/blank_tehnologii/manibus/config.h index f739334e0d..8e7f4e8a11 100644 --- a/keyboards/blank_tehnologii/manibus/config.h +++ b/keyboards/blank_tehnologii/manibus/config.h @@ -29,7 +29,6 @@ #define MATRIX_COL_PINS { B5, B4, D7, D6, F0, F1, C6 } #define MATRIX_ROW_PINS_RIGHT { D6, D7, B4, F7, E6 } #define MATRIX_COL_PINS_RIGHT { B1, B2, B3, F1, F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blaster75/config.h b/keyboards/blaster75/config.h index cad1d20ea8..7f17869ce5 100644 --- a/keyboards/blaster75/config.h +++ b/keyboards/blaster75/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B0, B4, B5, B6, B7, C6, C7, D0, D1, D2, D3, D4, D5, D6, D7 } -#define UNUSED_PINS /* Diode Direction */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index e543ab16d9..661605480a 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D1, D4, E6, B5, D2, F6, B3, B2, B6 } #define MATRIX_COL_PINS { D0, B4, C6, D7, F4, F5, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/boardrun/bizarre/config.h b/keyboards/boardrun/bizarre/config.h index 4034ced4e8..5b9fb46286 100644 --- a/keyboards/boardrun/bizarre/config.h +++ b/keyboards/boardrun/bizarre/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/boardrun/classic/config.h b/keyboards/boardrun/classic/config.h index f6ac6ee88e..f65abc2ff4 100644 --- a/keyboards/boardrun/classic/config.h +++ b/keyboards/boardrun/classic/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/boardsource/holiday/spooky/config.h b/keyboards/boardsource/holiday/spooky/config.h deleted file mode 100644 index e2c0600a10..0000000000 --- a/keyboards/boardsource/holiday/spooky/config.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2020 boardsource - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 - -#define DIRECT_PINS { {E6,B4,B5}, {B3,B2,B6}} - -#define RGB_DI_PIN D3 -#define RGBLIGHT_ANIMATIONS -#ifdef RGBLIGHT_ENABLE -#define RGBLED_NUM 5 // Number of LEDs -#endif - - -//#define BACKLIGHT_PIN B7 -//#define BACKLIGHT_LEVELS 3 -//#define BACKLIGHT_BREATHING - -//#define RGB_DI_PIN E2 -//#ifdef RGB_DI_PIN -//# define RGBLED_NUM 16 -//# define RGBLIGHT_HUE_STEP 8 -//# define RGBLIGHT_SAT_STEP 8 -//# define RGBLIGHT_VAL_STEP 8 -//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ -//# define RGBLIGHT_ANIMATIONS -/*== or choose animations ==*/ -//# define RGBLIGHT_EFFECT_BREATHING -//# define RGBLIGHT_EFFECT_RAINBOW_MOOD -//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -//# define RGBLIGHT_EFFECT_SNAKE -//# define RGBLIGHT_EFFECT_KNIGHT -//# define RGBLIGHT_EFFECT_CHRISTMAS -//# define RGBLIGHT_EFFECT_STATIC_GRADIENT -//# define RGBLIGHT_EFFECT_RGB_TEST -//# define RGBLIGHT_EFFECT_ALTERNATING -/*== customize breathing effect ==*/ -/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -/*==== use exp() and sin() ====*/ -//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -//#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/boardsource/holiday/spooky/info.json b/keyboards/boardsource/holiday/spooky/info.json index b8964d881e..56be9f7d26 100644 --- a/keyboards/boardsource/holiday/spooky/info.json +++ b/keyboards/boardsource/holiday/spooky/info.json @@ -1,24 +1,46 @@ { - "keyboard_name": "spooky", - "manufacturer": "Boardsource", - "url": "https://boardsource.xyz/store/5f783f6da2c1b43e37ca0795", - "maintainer": "boardsource", - "usb": { - "vid": "0x4273", - "pid": "0x1031", - "device_version": "0.0.1" - }, - "layouts": { - "LAYOUT_ortho_2x3": { - "layout": [ - { "label": "k00", "x": 0, "y": 0 }, - { "label": "k01", "x": 1, "y": 0 }, - { "label": "k02", "x": 2, "y": 0 }, - - { "label": "k10", "x": 0, "y": 1 }, - { "label": "k11", "x": 1, "y": 1 }, - { "label": "k12", "x": 2, "y": 1 } - ] - } + "manufacturer": "Boardsource", + "keyboard_name": "Spooky", + "maintainer": "waffle87", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "rgblight": true + }, + "matrix_pins": { + "direct": [ + ["E6", "B4", "B5"], + ["B3", "B2", "B6"] + ] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x1031", + "vid": "0x4273" + }, + "rgblight": { + "led_count": 5, + "pin": "D3", + "sleep": true, + "animations": { + "all": true } + }, + "community_layouts": [ + "ortho_2x3" + ], + "layouts": { + "LAYOUT_ortho_2x3": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 } + ] + } + } } diff --git a/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c index 63fbb1b94c..96c21f53f3 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 boardsource +/* Copyright 2022 boardsource * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,15 +15,9 @@ */ #include QMK_KEYBOARD_H -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ - [_BASE] = LAYOUT_ortho_2x3( + [0] = LAYOUT_ortho_2x3( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 - ), - }; + ) +}; diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c index eb56d11735..0afc136854 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 boardsource +/* Copyright 2022 boardsource * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,17 +15,11 @@ */ #include QMK_KEYBOARD_H -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ - [_BASE] = LAYOUT_ortho_2x3( + [0] = LAYOUT_ortho_2x3( RGB_TOG, KC_VOLU, KC_F2, RGB_MOD, KC_VOLD, KC_F1 - ), + ) }; #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -34,46 +28,44 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { static void render_RIP(void) { static const char PROGMEM my_logo[] = { -0xff, 0xff, 0x07, 0x1e, 0x70, 0xc0, 0x00, 0x00, 0xe0, 0x78, 0x1e, 0x07, 0xff, 0xfe, 0x00, 0x00, -0x00, 0x00, 0x03, 0x06, 0x1c, 0xb8, 0xf0, 0xe0, 0xb8, 0x1c, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x66, 0x63, 0x63, 0x43, 0x43, 0xc3, 0xc2, 0x82, -0x00, 0x00, 0x00, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0xc0, 0xf0, 0x30, 0xf0, 0x80, 0x00, 0x00, 0xc0, -0xf0, 0x10, 0x00, 0x00, 0x00, 0xf3, 0xf3, 0x00, 0x00, 0x10, 0x18, 0xfe, 0x18, 0x10, 0x10, 0x10, -0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, -0x30, 0x10, 0x18, 0x18, 0x18, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x90, 0x90, 0x98, -0x98, 0x98, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x90, 0x98, 0x98, 0x18, 0x18, 0x10, 0x00, -0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, -0x00, 0x10, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x01, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x18, 0x10, 0x10, 0x18, 0x18, 0x0d, 0x0f, -0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x07, 0x00, 0x00, 0x01, 0x0f, 0x1c, 0x1e, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x18, 0x18, 0x18, -0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x1f, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x18, 0x10, -0x10, 0x10, 0x18, 0x18, 0x08, 0x00, 0x00, 0x08, 0x18, 0x10, 0x11, 0x11, 0x11, 0x19, 0x0f, 0x0e, -0x00, 0x30, 0x30, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, -0x30, 0x10, 0x18, 0x18, 0x10, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x40, 0xf0, 0xb0, 0x10, 0x18, -0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x70, 0x10, 0x18, 0x18, 0x10, 0x30, -0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x18, -0x10, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x30, 0x10, 0x18, 0x10, 0x30, 0xf0, -0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, -0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x10, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, -0xc4, 0x8c, 0x8c, 0xcc, 0xc4, 0x77, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x7d, 0xc7, 0xc3, 0x82, -0x82, 0xc3, 0xc7, 0x7d, 0x7c, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0x80, 0x80, 0xc0, 0xc0, -0x7f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, -0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xd8, 0xcc, -0xc6, 0xc3, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0x70, -0x3f, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xc7, 0xc3, 0xc1, 0x00, 0x00, -0x00, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0x60, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00 - }; - + 0xff, 0xff, 0x07, 0x1e, 0x70, 0xc0, 0x00, 0x00, 0xe0, 0x78, 0x1e, 0x07, 0xff, 0xfe, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x06, 0x1c, 0xb8, 0xf0, 0xe0, 0xb8, 0x1c, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x66, 0x63, 0x63, 0x43, 0x43, 0xc3, 0xc2, 0x82, + 0x00, 0x00, 0x00, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0xc0, 0xf0, 0x30, 0xf0, 0x80, 0x00, 0x00, 0xc0, + 0xf0, 0x10, 0x00, 0x00, 0x00, 0xf3, 0xf3, 0x00, 0x00, 0x10, 0x18, 0xfe, 0x18, 0x10, 0x10, 0x10, + 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x30, 0x10, 0x18, 0x18, 0x18, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x90, 0x90, 0x98, + 0x98, 0x98, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x90, 0x98, 0x98, 0x18, 0x18, 0x10, 0x00, + 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, + 0x00, 0x10, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x01, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x18, 0x10, 0x10, 0x18, 0x18, 0x0d, 0x0f, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x07, 0x00, 0x00, 0x01, 0x0f, 0x1c, 0x1e, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x18, 0x18, 0x18, + 0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x18, 0x10, + 0x10, 0x10, 0x18, 0x18, 0x08, 0x00, 0x00, 0x08, 0x18, 0x10, 0x11, 0x11, 0x11, 0x19, 0x0f, 0x0e, + 0x00, 0x30, 0x30, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, + 0x30, 0x10, 0x18, 0x18, 0x10, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x40, 0xf0, 0xb0, 0x10, 0x18, + 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x70, 0x10, 0x18, 0x18, 0x10, 0x30, + 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x18, + 0x10, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x30, 0x10, 0x18, 0x10, 0x30, 0xf0, + 0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x10, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, + 0xc4, 0x8c, 0x8c, 0xcc, 0xc4, 0x77, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x7d, 0xc7, 0xc3, 0x82, + 0x82, 0xc3, 0xc7, 0x7d, 0x7c, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0x80, 0x80, 0xc0, 0xc0, + 0x7f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xd8, 0xcc, + 0xc6, 0xc3, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0x70, + 0x3f, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xc7, 0xc3, 0xc1, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0x60, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00 + }; oled_write_raw_P(my_logo, sizeof(my_logo)); } bool oled_task_user(void) { render_RIP(); - return false; - } - + return false; +} #endif diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c index f8cac50875..1ddad75827 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 boardsource +/* Copyright 2022 boardsource * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,18 +15,13 @@ */ #include QMK_KEYBOARD_H -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ - [_BASE] = LAYOUT_ortho_2x3( + [0] = LAYOUT_ortho_2x3( RGB_TOG, KC_1, KC_2, RGB_MOD, KC_3,KC_4 - ), + ) }; + #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; @@ -34,46 +29,44 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { static void render_RIP(void) { static const char PROGMEM my_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, -0x04, 0x7c, 0xfc, 0xf0, 0x00, 0x00, 0x40, 0x20, 0xf0, 0x7c, 0x06, 0x00, 0x41, 0xc0, 0x00, 0x00, -0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xc0, 0x00, -0x00, 0x00, 0xe0, 0x60, 0x00, 0x80, 0x40, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x02, -0x01, 0xc1, 0xf8, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, -0x03, 0x00, 0x00, 0x0f, 0x06, 0x01, 0x00, 0x1e, 0x1f, 0x10, 0x00, 0x00, 0x1e, 0x1f, 0x08, 0xc0, -0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x11, 0x08, 0x04, 0x1e, 0x11, 0x00, -0x08, 0x06, 0x01, 0x00, 0x1e, 0x19, 0x08, 0x00, 0x1e, 0x0b, 0x08, 0x00, 0x1f, 0x1b, 0x08, 0x00, -0x18, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x19, 0x08, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, -0x84, 0x84, 0x84, 0xcc, 0x38, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x04, 0x05, 0x0f, 0x79, 0xe1, 0x00, -0x00, 0x00, 0xc0, 0x78, 0x0c, 0x00, 0x00, 0x0c, 0x84, 0x84, 0xcc, 0xf8, 0x30, 0x00, 0x00, 0xe0, -0xf8, 0x0c, 0x04, 0x04, 0x0c, 0xf8, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x08, 0x0c, -0x04, 0x04, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x0c, 0x04, 0x0c, 0x18, 0xf0, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, -0x10, 0x10, 0x10, 0x19, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x07, 0x00, -0x20, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x1d, 0x0f, 0x00, 0x00, 0x03, -0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x00, 0x00, 0x38, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x18, 0x1c, -0x16, 0x13, 0x10, 0x10, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, + 0x04, 0x7c, 0xfc, 0xf0, 0x00, 0x00, 0x40, 0x20, 0xf0, 0x7c, 0x06, 0x00, 0x41, 0xc0, 0x00, 0x00, + 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xc0, 0x00, + 0x00, 0x00, 0xe0, 0x60, 0x00, 0x80, 0x40, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x02, + 0x01, 0xc1, 0xf8, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, + 0x03, 0x00, 0x00, 0x0f, 0x06, 0x01, 0x00, 0x1e, 0x1f, 0x10, 0x00, 0x00, 0x1e, 0x1f, 0x08, 0xc0, + 0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x11, 0x08, 0x04, 0x1e, 0x11, 0x00, + 0x08, 0x06, 0x01, 0x00, 0x1e, 0x19, 0x08, 0x00, 0x1e, 0x0b, 0x08, 0x00, 0x1f, 0x1b, 0x08, 0x00, + 0x18, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x19, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, + 0x84, 0x84, 0x84, 0xcc, 0x38, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x04, 0x05, 0x0f, 0x79, 0xe1, 0x00, + 0x00, 0x00, 0xc0, 0x78, 0x0c, 0x00, 0x00, 0x0c, 0x84, 0x84, 0xcc, 0xf8, 0x30, 0x00, 0x00, 0xe0, + 0xf8, 0x0c, 0x04, 0x04, 0x0c, 0xf8, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x08, 0x0c, + 0x04, 0x04, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x0c, 0x04, 0x0c, 0x18, 0xf0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x10, 0x10, 0x10, 0x19, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x07, 0x00, + 0x20, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x1d, 0x0f, 0x00, 0x00, 0x03, + 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x00, 0x00, 0x38, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x18, 0x1c, + 0x16, 0x13, 0x10, 0x10, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - oled_write_raw_P(my_logo, sizeof(my_logo)); } bool oled_task_user(void) { render_RIP(); - return false; - } - + return false; +} #endif diff --git a/keyboards/boardsource/holiday/spooky/rules.mk b/keyboards/boardsource/holiday/spooky/rules.mk index ce35761cc9..6e7633bfe0 100644 --- a/keyboards/boardsource/holiday/spooky/rules.mk +++ b/keyboards/boardsource/holiday/spooky/rules.mk @@ -1,20 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output - -LAYOUTS = ortho_2x3 +# This file intentionally left blank diff --git a/keyboards/boardsource/lulu/config.h b/keyboards/boardsource/lulu/config.h index d4fea42b33..f96a228429 100644 --- a/keyboards/boardsource/lulu/config.h +++ b/keyboards/boardsource/lulu/config.h @@ -2,40 +2,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once - #include "config_common.h" - -#define MATRIX_ROWS 10 -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS {C6, D7, E6, B4, B5} - -// wiring of each half -#define MATRIX_COL_PINS {F6, F7, B1, B3, B2, B6} -#define USE_SERIAL -#define SOFT_SERIAL_PIN D2 -#define SPLIT_USB_DETECT #define RGB_DI_PIN D3 - -#define ENCODERS_PAD_A { F0 } -#define ENCODERS_PAD_B { F1 } -#define ENCODERS_PAD_A_RIGHT { F0 } -#define ENCODERS_PAD_B_RIGHT { F1 } - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 -#define DIODE_DIRECTION COL2ROW -#ifdef RGB_MATRIX_ENABLE - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 - #define RGBLED_NUM 70 // Number of LEDs - #define DRIVER_LED_TOTAL RGBLED_NUM - #define RGB_MATRIX_SPLIT { 35, 35 } - #define SPLIT_TRANSPORT_MIRROR - #define RGBLIGHT_LIMIT_VAL 150 - #define ENABLE_RGB_MATRIX_ALPHAS_MODS - #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT - #define ENABLE_RGB_MATRIX_BREATHING - #define ENABLE_RGB_MATRIX_BAND_SAT - #define ENABLE_RGB_MATRIX_BAND_VAL -#endif - +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +#define DRIVER_LED_TOTAL 70 +#define RGB_MATRIX_SPLIT { 35, 35 } +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL diff --git a/keyboards/boardsource/lulu/info.json b/keyboards/boardsource/lulu/info.json index 4cfc688740..5ee5c59c1a 100644 --- a/keyboards/boardsource/lulu/info.json +++ b/keyboards/boardsource/lulu/info.json @@ -1,22 +1,177 @@ { - "keyboard_name": "Lulu", - "manufacturer": "Boardsource", - "url": "https://boardsource.xyz/store/61d0b772319a1f3cc53ba2fb", - "maintainer": "boardsource", - "usb": { - "vid": "0x4273", - "pid": "0x7685", - "device_version": "0.0.1" - }, - "layouts": { - "LAYOUT": { - "layout": [ - {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5}, - {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5}, - {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5}, - {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5}, - {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15} - ] - } + "manufacturer": "Boardsource", + "keyboard_name": "lulu", + "maintainer": "waffle87", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "build": { + "lto": true + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "oled": true + }, + "matrix_pins": { + "cols": ["F6", "F7", "B1", "B3", "B2", "B6"], + "rows": ["C6", "D7", "E6", "B4", "B5"] + }, + "processor": "atmega32u4", + "url": "https://boardsource.xyz/projects/60de24d6847112054777bbdd", + "usb": { + "device_version": "1.0.0", + "pid": "0x7685", + "vid": "0x4273" + }, + "split": { + "enabled": true, + "soft_serial_pin": "D2" + }, + "encoder": { + "enabled": true, + "rotary": [ + { "pin_a": "F0", "pin_b": "F1" } + ] + }, + "rgb_matrix": { + "layout": [ + { "flags": 2, "x": 86, "y": 55 }, + { "flags": 2, "x": 51, "y": 55 }, + { "flags": 2, "x": 17, "y": 40 }, + { "flags": 2, "x": 17, "y": 10 }, + { "flags": 2, "x": 51, "y": 10 }, + { "flags": 2, "x": 86, "y": 10 }, + { "flags": 2, "x": 137, "y": 55 }, + { "flags": 2, "x": 172, "y": 55 }, + { "flags": 2, "x": 206, "y": 40 }, + { "flags": 2, "x": 206, "y": 10 }, + { "flags": 2, "x": 172, "y": 10 }, + { "flags": 2, "x": 137, "y": 10 }, + { "flags": 1, "matrix": [0, 0], "x": 0, "y": 0 }, + { "flags": 4, "matrix": [0, 1], "x": 17, "y": 0 }, + { "flags": 4, "matrix": [0, 2], "x": 34, "y": 0 }, + { "flags": 4, "matrix": [0, 3], "x": 51, "y": 0 }, + { "flags": 4, "matrix": [0, 4], "x": 68, "y": 0 }, + { "flags": 4, "matrix": [0, 5], "x": 86, "y": 0 }, + { "flags": 4, "matrix": [5, 5], "x": 137, "y": 0 }, + { "flags": 4, "matrix": [5, 4], "x": 155, "y": 0 }, + { "flags": 4, "matrix": [5, 3], "x": 172, "y": 0 }, + { "flags": 4, "matrix": [5, 2], "x": 189, "y": 0 }, + { "flags": 4, "matrix": [5, 1], "x": 206, "y": 0 }, + { "flags": 1, "matrix": [5, 0], "x": 224, "y": 0 }, + { "flags": 1, "matrix": [1, 0], "x": 0, "y": 16 }, + { "flags": 4, "matrix": [1, 1], "x": 17, "y": 16 }, + { "flags": 4, "matrix": [1, 2], "x": 34, "y": 16 }, + { "flags": 4, "matrix": [1, 3], "x": 51, "y": 16 }, + { "flags": 4, "matrix": [1, 4], "x": 68, "y": 16 }, + { "flags": 4, "matrix": [1, 5], "x": 86, "y": 16 }, + { "flags": 4, "matrix": [6, 5], "x": 137, "y": 16 }, + { "flags": 4, "matrix": [6, 4], "x": 155, "y": 16 }, + { "flags": 4, "matrix": [6, 3], "x": 172, "y": 16 }, + { "flags": 4, "matrix": [6, 2], "x": 189, "y": 16 }, + { "flags": 4, "matrix": [6, 1], "x": 206, "y": 16 }, + { "flags": 1, "matrix": [6, 4], "x": 224, "y": 16 }, + { "flags": 1, "matrix": [2, 0], "x": 0, "y": 32 }, + { "flags": 4, "matrix": [2, 1], "x": 17, "y": 32 }, + { "flags": 4, "matrix": [2, 2], "x": 34, "y": 32 }, + { "flags": 4, "matrix": [2, 3], "x": 51, "y": 32 }, + { "flags": 4, "matrix": [2, 4], "x": 68, "y": 32 }, + { "flags": 4, "matrix": [2, 5], "x": 86, "y": 32 }, + { "flags": 4, "matrix": [7, 5], "x": 137, "y": 32 }, + { "flags": 4, "matrix": [7, 4], "x": 155, "y": 32 }, + { "flags": 4, "matrix": [7, 3], "x": 172, "y": 32 }, + { "flags": 4, "matrix": [7, 2], "x": 189, "y": 32 }, + { "flags": 4, "matrix": [7, 1], "x": 206, "y": 32 }, + { "flags": 1, "matrix": [7, 4], "x": 224, "y": 32 }, + { "flags": 1, "matrix": [3, 0], "x": 0, "y": 48 }, + { "flags": 4, "matrix": [3, 1], "x": 17, "y": 48 }, + { "flags": 4, "matrix": [3, 2], "x": 34, "y": 48 }, + { "flags": 4, "matrix": [3, 3], "x": 51, "y": 48 }, + { "flags": 4, "matrix": [3, 4], "x": 68, "y": 48 }, + { "flags": 4, "matrix": [3, 5], "x": 86, "y": 48 }, + { "flags": 4, "matrix": [4, 5], "x": 103, "y": 48 }, + { "flags": 4, "matrix": [9, 5], "x": 120, "y": 48 }, + { "flags": 4, "matrix": [8, 5], "x": 137, "y": 48 }, + { "flags": 4, "matrix": [8, 4], "x": 155, "y": 48 }, + { "flags": 4, "matrix": [8, 3], "x": 172, "y": 48 }, + { "flags": 4, "matrix": [8, 2], "x": 189, "y": 48 }, + { "flags": 4, "matrix": [8, 1], "x": 206, "y": 48 }, + { "flags": 1, "matrix": [8, 4], "x": 224, "y": 48 }, + { "flags": 1, "matrix": [4, 1], "x": 34, "y": 64 }, + { "flags": 1, "matrix": [4, 2], "x": 51, "y": 64 }, + { "flags": 1, "matrix": [4, 3], "x": 68, "y": 64 }, + { "flags": 1, "matrix": [4, 4], "x": 86, "y": 64 }, + { "flags": 1, "matrix": [9, 4], "x": 137, "y": 64 }, + { "flags": 1, "matrix": [9, 3], "x": 155, "y": 64 }, + { "flags": 1, "matrix": [9, 2], "x": 172, "y": 64 }, + { "flags": 1, "matrix": [9, 1], "x": 189, "y": 64 } + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.5 }, + { "matrix": [0, 1], "x": 1, "y": 0.375 }, + { "matrix": [0, 2], "x": 2, "y": 0.125 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.125 }, + { "matrix": [0, 5], "x": 5, "y": 0.25 }, + { "matrix": [5, 5], "x": 10.5, "y": 0.25 }, + { "matrix": [5, 4], "x": 11.5, "y": 0.125 }, + { "matrix": [5, 3], "x": 12.5, "y": 0 }, + { "matrix": [5, 2], "x": 13.5, "y": 0.125 }, + { "matrix": [5, 1], "x": 14.5, "y": 0.375 }, + { "matrix": [5, 0], "x": 15.5, "y": 0.5 }, + { "matrix": [1, 0], "x": 0, "y": 1.5 }, + { "matrix": [1, 1], "x": 1, "y": 1.375 }, + { "matrix": [1, 2], "x": 2, "y": 1.125 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.125 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [6, 5], "x": 10.5, "y": 1.25 }, + { "matrix": [6, 4], "x": 11.5, "y": 1.125 }, + { "matrix": [6, 3], "x": 12.5, "y": 1 }, + { "matrix": [6, 2], "x": 13.5, "y": 1.125 }, + { "matrix": [6, 1], "x": 14.5, "y": 1.375 }, + { "matrix": [6, 0], "x": 15.5, "y": 1.5 }, + { "matrix": [2, 0], "x": 0, "y": 2.5 }, + { "matrix": [2, 1], "x": 1, "y": 2.375 }, + { "matrix": [2, 2], "x": 2, "y": 2.125 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.125 }, + { "matrix": [2, 5], "x": 5, "y": 2.25 }, + { "matrix": [7, 5], "x": 10.5, "y": 2.25 }, + { "matrix": [7, 4], "x": 11.5, "y": 2.125 }, + { "matrix": [7, 3], "x": 12.5, "y": 2 }, + { "matrix": [7, 2], "x": 13.5, "y": 2.125 }, + { "matrix": [7, 1], "x": 14.5, "y": 2.375 }, + { "matrix": [7, 0], "x": 15.5, "y": 2.5 }, + { "matrix": [3, 0], "x": 0, "y": 3.5 }, + { "matrix": [3, 1], "x": 1, "y": 3.375 }, + { "matrix": [3, 2], "x": 2, "y": 3.125 }, + { "matrix": [3, 3], "x": 3, "y": 3 }, + { "matrix": [3, 4], "x": 4, "y": 3.125 }, + { "matrix": [3, 5], "x": 5, "y": 3.25 }, + { "matrix": [4, 5], "x": 6, "y": 2.75 }, + { "matrix": [9, 5], "x": 9.5, "y": 2.75 }, + { "matrix": [8, 5], "x": 10.5, "y": 3.25 }, + { "matrix": [8, 4], "x": 11.5, "y": 3.125 }, + { "matrix": [8, 3], "x": 12.5, "y": 3 }, + { "matrix": [8, 2], "x": 13.5, "y": 3.125 }, + { "matrix": [8, 1], "x": 14.5, "y": 3.375 }, + { "matrix": [8, 0], "x": 15.5, "y": 3.5 }, + { "matrix": [4, 1], "x": 2.5, "y": 4.125 }, + { "matrix": [4, 2], "x": 3.5, "y": 4.15 }, + { "matrix": [4, 3], "x": 4.5, "y": 4.25 }, + { "matrix": [4, 4], "h": 1.5, "x": 6, "y": 4.25 }, + { "matrix": [9, 4], "h": 1.5, "x": 9.5, "y": 4.25 }, + { "matrix": [9, 3], "x": 11, "y": 4.25 }, + { "matrix": [9, 2], "x": 12, "y": 4.15 }, + { "matrix": [9, 1], "x": 13, "y": 4.15 } + ] } + } } diff --git a/keyboards/boardsource/lulu/keymaps/default/keymap.c b/keyboards/boardsource/lulu/keymaps/default/keymap.c index 8624b51b6a..cbee1401ed 100644 --- a/keyboards/boardsource/lulu/keymaps/default/keymap.c +++ b/keyboards/boardsource/lulu/keymaps/default/keymap.c @@ -106,24 +106,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return false; -} -#endif diff --git a/keyboards/boardsource/lulu/keymaps/via/keymap.c b/keyboards/boardsource/lulu/keymaps/via/keymap.c index 912ea38559..de635a6128 100644 --- a/keyboards/boardsource/lulu/keymaps/via/keymap.c +++ b/keyboards/boardsource/lulu/keymaps/via/keymap.c @@ -102,4 +102,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ) }; - diff --git a/keyboards/boardsource/lulu/lulu.c b/keyboards/boardsource/lulu/lulu.c index 7a25fce50c..be6d565a32 100644 --- a/keyboards/boardsource/lulu/lulu.c +++ b/keyboards/boardsource/lulu/lulu.c @@ -1,267 +1,237 @@ // Copyright 2022 Cole Smith <cole@boadsource.xyz> // SPDX-License-Identifier: GPL-2.0-or-later +#include "encoder.h" -#include "lulu.h" -#ifdef RGB_MATRIX_ENABLE - -led_config_t g_led_config = { { - {11,10, 9, 8, 7, 6}, - {17,16,15,14,13,12}, - {23,22,21,20,19,18}, - {29,28,27,26,25,24}, - {NO_LED,34,33,32,31,30}, - {41,42,43,44,45,46}, - {47,48,49,50,51,52}, - {53,54,55,56,57,58}, - {59,60,61,62,63,64}, - {NO_LED,65,66,67,68,69} -},{ - - {86,55},{51,55},{17,40},{17,10},{51,10},{86,10}, - {0,0}, {17,0}, {34,0}, {51,0}, {68,0}, {86,0}, - {0,16},{17,16},{34,16},{51,16},{68,16},{86,16}, - {0,32},{17,32},{34,32},{51,32},{68,32},{86,32}, - {0,48},{17,48},{34,48},{51,48},{68,48},{86,48},{103,48}, - {34,64},{51,64},{68,64},{86,64}, - - - {137,55},{172,55},{206,40},{206,10},{172,10},{137,10}, - {137,0}, {155,0}, {172,0}, {189,0}, {206,0}, {224,0}, - {137,16},{155,16},{172,16},{189,16},{206,16},{224,16}, - {137,32},{155,32},{172,32},{189,32},{206,32},{224,32}, - {137,48},{155,48},{172,48},{189,48},{155,48},{137,48},{120,48}, - {172,64},{189,64},{155,64},{137,64} -},{2,2,2,2,2,2, - 4,4,4,4,4,1, - 1,4,4,4,4,4, - 4,4,4,4,4,1, - 1,4,4,4,4,4, - 1,4,1,1,1, - 2,2,2,2,2,2, - 4,4,4,4,4,1, - 1,4,4,4,4,4, - 4,4,4,4,4,1, - 1,4,4,4,4,4, - 1,4,1,1,1 -}}; - +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return true; +} #endif - - #ifdef OLED_ENABLE oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (!is_keyboard_master()) { - return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return OLED_ROTATION_180; } return rotation; } void render_layer1_logo(void){ - static const char PROGMEM layer_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, -0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, -0xfc, 0x0e, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, -0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, -0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, -0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, -0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - oled_write_raw_P(layer_logo, sizeof(layer_logo)); + static const char PROGMEM layer_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, + 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0xfc, 0x0e, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, + 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, + 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, + 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, + 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(layer_logo, sizeof(layer_logo)); } + void render_layer2_logo(void){ - static const char PROGMEM layer_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, -0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, -0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, -0x3f, 0x70, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, -0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, -0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, -0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, -0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, -0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 -}; + static const char PROGMEM layer_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, + 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, + 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, + 0x3f, 0x70, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, + 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, + 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, + 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 + }; oled_write_raw_P(layer_logo, sizeof(layer_logo)); } + void render_layer3_logo(void){ - static const char PROGMEM layer_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, -0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, -0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x38, 0x1f, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, -0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, -0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, -0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 -}; + static const char PROGMEM layer_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, + 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, + 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x38, 0x1f, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, + 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, + 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, + 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 + }; oled_write_raw_P(layer_logo, sizeof(layer_logo)); } + void render_layer4_logo(void){ - static const char PROGMEM layer_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, -0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, -0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, -0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, -0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, -0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, -0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 -}; + static const char PROGMEM layer_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x18, 0x30, 0x60, 0xe0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x0f, 0x0f, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, + 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x80, 0x00, + 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf0, 0x60, + 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x01, 0x03, 0x07, + 0x07, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, + 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 + }; oled_write_raw_P(layer_logo, sizeof(layer_logo)); } void render_logo(void) { static const char PROGMEM logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, -0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, -0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, -0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, -0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, -0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, -0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, -0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, + 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0xe0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfc, 0x1e, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x80, 0xc0, + 0x80, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0e, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, + 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0xc0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x1f, 0xff, 0xff, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x78, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe0, 0x78, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; oled_write_raw_P(logo, sizeof(logo)); } -enum Layers{ - _QWERTY, - _RAISE, - _LOWER, - _ADJUST -}; void process_layer_state(void) { switch (get_highest_layer(layer_state)) { - case _QWERTY: + case 0: render_layer1_logo(); break; - case _LOWER: + case 1: render_layer2_logo(); break; - case _RAISE: + case 2: render_layer3_logo(); break; - case _ADJUST: + case 3: render_layer4_logo(); break; } @@ -277,4 +247,3 @@ bool oled_task_kb(void) { return false; } #endif - diff --git a/keyboards/boardsource/lulu/lulu.h b/keyboards/boardsource/lulu/lulu.h deleted file mode 100644 index bda65f63e0..0000000000 --- a/keyboards/boardsource/lulu/lulu.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022 Cole Smith <cole@boadsource.xyz> -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "quantum.h" -#include "split_util.h" -#define has_usb() is_keyboard_master() -#define is_master is_keyboard_master() -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ - L41, L42, L43, L44, R41, R42, R43, R44 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { KC_NO, L41, L42, L43, L44, L45 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 }, \ - { KC_NO, R44, R43, R42, R41, R40 } \ - } - diff --git a/keyboards/boardsource/lulu/rules.mk b/keyboards/boardsource/lulu/rules.mk index 06d206cb55..32afd21635 100644 --- a/keyboards/boardsource/lulu/rules.mk +++ b/keyboards/boardsource/lulu/rules.mk @@ -1,26 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -SPLIT_KEYBOARD = yes -RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 -RGB_MATRIX_SUPPORTED = yes -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -LTO_ENABLE = yes -ENCODER_ENABLE = yes diff --git a/keyboards/boardsource/microdox/.noci b/keyboards/boardsource/microdox/.noci deleted file mode 100644 index e69de29bb2..0000000000 --- a/keyboards/boardsource/microdox/.noci +++ /dev/null diff --git a/keyboards/boardsource/microdox/config.h b/keyboards/boardsource/microdox/config.h deleted file mode 100644 index f2ba806ae7..0000000000 --- a/keyboards/boardsource/microdox/config.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2020 Cole Smith <cole@boadsource.xyz> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" - -#define VENDOR_ID 0xF7E0 -#define PRODUCT_ID 0x0412 -#define DEVICE_VER 0x0000 -#define MANUFACTURER Boardsource -#define PRODUCT microdox - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 5 -#define MATRIX_ROW_PINS \ - { B2, B6, B4, B5 } - -// wiring of each half -#define MATRIX_COL_PINS \ - { F4, F5, F6, F7, B1 } -#define USE_SERIAL -#define SOFT_SERIAL_PIN D2 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 12 // Number of LEDs -# define RGBLED_SPLIT \ - { 6, 6 } -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_STATIC_GRADIENT - -#endif - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT diff --git a/keyboards/boardsource/microdox/info.json b/keyboards/boardsource/microdox/info.json index 3255056002..37f190d42d 100644 --- a/keyboards/boardsource/microdox/info.json +++ b/keyboards/boardsource/microdox/info.json @@ -1,54 +1,70 @@ { - "keyboard_name": "microdox", - "url": "https://boardsource.xyz/store/5f2e7e4a2902de7151494f92", - "maintainer": "boardsource", - "layouts": { - "LAYOUT_split_3x5_3": { - "layout": [ - { "label": "Q", "x": 0, "y": 0.3 }, - { "label": "W", "x": 1, "y": 0.1 }, - { "label": "E", "x": 2, "y": 0 }, - { "label": "R", "x": 3, "y": 0.1 }, - { "label": "T", "x": 4, "y": 0.2 }, - - { "label": "Y", "x": 8, "y": 0.2 }, - { "label": "U", "x": 9, "y": 0.1 }, - { "label": "I", "x": 10, "y": 0 }, - { "label": "O", "x": 11, "y": 0.1 }, - { "label": "P", "x": 12, "y": 0.3 }, - - { "label": "A", "x": 0, "y": 1.3 }, - { "label": "S", "x": 1, "y": 1.1 }, - { "label": "D", "x": 2, "y": 1 }, - { "label": "F", "x": 3, "y": 1.1 }, - { "label": "G", "x": 4, "y": 1.2 }, - - { "label": "H", "x": 8, "y": 1.2 }, - { "label": "J", "x": 9, "y": 1.1 }, - { "label": "K", "x": 10, "y": 1 }, - { "label": "L", "x": 11, "y": 1.1 }, - { "label": ";", "x": 12, "y": 1.3 }, - - { "label": "Z", "x": 0, "y": 2.3 }, - { "label": "X", "x": 1, "y": 2.1 }, - { "label": "C", "x": 2, "y": 2 }, - { "label": "V", "x": 3, "y": 2.1 }, - { "label": "B", "x": 4, "y": 2.2 }, - - { "label": "N", "x": 8, "y": 2.2 }, - { "label": "M", "x": 9, "y": 2.1 }, - { "label": ",", "x": 10, "y": 2 }, - { "label": ".", "x": 11, "y": 2.1 }, - { "label": "/", "x": 12, "y": 2.3 }, - - { "label": "GUI / KC_HANJ", "x": 3, "y": 3.7 }, - { "label": "Lower", "x": 4, "y": 3.7 }, - { "label": "Space", "x": 5, "y": 3.2 }, - - { "label": "Enter", "x": 7, "y": 3.2 }, - { "label": "Raise", "x": 8, "y": 3.7 }, - { "label": "Alt / KC_HAEN", "x": 9, "y": 3.7 } - ] - } + "manufacturer": "Boardsource", + "keyboard_name": "microdox", + "maintainer": "waffle87", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "build": { + "lto": true + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "oled": true + }, + "url": "https://boardsource.xyz/store/5f2e7e4a2902de7151494f92", + "usb": { + "pid": "0x0412", + "vid": "0xF7E0" + }, + "split": { + "enabled": true + }, + "community_layouts": [ + "split_3x5_3" + ], + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [4, 4], "x": 5, "y": 0 }, + { "matrix": [4, 3], "x": 6, "y": 0 }, + { "matrix": [4, 2], "x": 7, "y": 0 }, + { "matrix": [4, 1], "x": 8, "y": 0 }, + { "matrix": [4, 0], "x": 9, "y": 0 }, + { "matrix": [1, 0], "x": 10, "y": 0 }, + { "matrix": [1, 1], "x": 11, "y": 0 }, + { "matrix": [1, 2], "x": 12, "y": 0 }, + { "matrix": [1, 3], "x": 13, "y": 0 }, + { "matrix": [1, 4], "x": 14, "y": 0 }, + { "matrix": [5, 4], "x": 15, "y": 0 }, + { "matrix": [5, 3], "x": 16, "y": 0 }, + { "matrix": [5, 2], "x": 17, "y": 0 }, + { "matrix": [5, 1], "x": 18, "y": 0 }, + { "matrix": [5, 0], "x": 19, "y": 0 }, + { "matrix": [2, 0], "x": 20, "y": 0 }, + { "matrix": [2, 1], "x": 21, "y": 0 }, + { "matrix": [2, 2], "x": 22, "y": 0 }, + { "matrix": [2, 3], "x": 23, "y": 0 }, + { "matrix": [2, 4], "x": 24, "y": 0 }, + { "matrix": [6, 4], "x": 25, "y": 0 }, + { "matrix": [6, 3], "x": 26, "y": 0 }, + { "matrix": [6, 2], "x": 27, "y": 0 }, + { "matrix": [6, 1], "x": 28, "y": 0 }, + { "matrix": [6, 0], "x": 29, "y": 0 }, + { "matrix": [3, 2], "x": 30, "y": 0 }, + { "matrix": [3, 3], "x": 31, "y": 0 }, + { "matrix": [3, 4], "x": 32, "y": 0 }, + { "matrix": [7, 4], "x": 33, "y": 0 }, + { "matrix": [7, 3], "x": 34, "y": 0 }, + { "matrix": [7, 2], "x": 35, "y": 0 } + ] } + } } diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c index f4ac92ea0d..8c177be5a5 100644 --- a/keyboards/boardsource/microdox/keymaps/cole/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2020 Cole Smith <cole@boadsource.xyz> +Copyright 2022 Cole Smith <cole@boadsource.xyz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/boardsource/microdox/keymaps/cole/rules.mk b/keyboards/boardsource/microdox/keymaps/cole/rules.mk deleted file mode 100644 index dd68e9d3b0..0000000000 --- a/keyboards/boardsource/microdox/keymaps/cole/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OLED_ENABLE = yes diff --git a/keyboards/boardsource/microdox/keymaps/default/keymap.c b/keyboards/boardsource/microdox/keymaps/default/keymap.c index 6fe94011f4..8a090b6f8f 100644 --- a/keyboards/boardsource/microdox/keymaps/default/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/default/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2020 Cole Smith <cole@boadsource.xyz> +Copyright 2022 Cole Smith <cole@boadsource.xyz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/boardsource/microdox/keymaps/via/rules.mk b/keyboards/boardsource/microdox/keymaps/via/rules.mk index 7fad85c015..1e5b99807c 100644 --- a/keyboards/boardsource/microdox/keymaps/via/rules.mk +++ b/keyboards/boardsource/microdox/keymaps/via/rules.mk @@ -1,3 +1 @@ -OLED_ENABLE = yes VIA_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/boardsource/microdox/microdox.c b/keyboards/boardsource/microdox/microdox.c index abfe65a2bd..76ee6bc54e 100644 --- a/keyboards/boardsource/microdox/microdox.c +++ b/keyboards/boardsource/microdox/microdox.c @@ -1,5 +1,5 @@ /* -Copyright 2020 Cole Smith <cole@boadsource.xyz> +Copyright 2022 Cole Smith <cole@boadsource.xyz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,9 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "microdox.h" - #ifdef OLED_ENABLE +#include "oled_driver.h" +#include "bitwise.h" +#include "action_layer.h" + oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_180; @@ -26,14 +28,12 @@ oled_rotation_t oled_init_kb(oled_rotation_t rotation) { static void render_logo(void) { static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0 + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 }; oled_write_P(qmk_logo, false); } - static void render_status(void) { switch (get_highest_layer(layer_state)) { case 0: @@ -74,3 +74,24 @@ bool oled_task_kb(void) { return false; } #endif + +#ifdef ENCODER_ENABLE +#include "encoder.h" +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + } else { + if (clockwise) { + tap_code(KC_MNXT); + } else { + tap_code(KC_MPRV); + } + } + return true; +} +#endif diff --git a/keyboards/boardsource/microdox/microdox.h b/keyboards/boardsource/microdox/microdox.h deleted file mode 100644 index 8b63b46415..0000000000 --- a/keyboards/boardsource/microdox/microdox.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2020 Cole Smith <cole@boadsource.xyz> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "quantum.h" -#define xxx KC_NO - -#define LAYOUT_split_3x5_3(\ - k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \ - k32, k33, k34, k74, k73, k72 \ - ) \ - { \ - { k00, k01, k02, k03, k04 }, \ - { k10, k11, k12, k13, k14 }, \ - { k20, k21, k22, k23, k24 }, \ - { xxx, xxx, k32, k33, k34 }, \ - { k40, k41, k42, k43, k44 }, \ - { k50, k51, k52, k53, k54 }, \ - { k60, k61, k62, k63, k64 }, \ - { xxx, xxx, k72, k73, k74 } \ - } diff --git a/keyboards/boardsource/microdox/readme.md b/keyboards/boardsource/microdox/readme.md index 0a468bd4a3..d5b22a2854 100644 --- a/keyboards/boardsource/microdox/readme.md +++ b/keyboards/boardsource/microdox/readme.md @@ -8,8 +8,9 @@ Make example for this keyboard (after setting up your build environment): + make boardsource/microdox/v1:default make boardsource/microdox/v2:default -Remove `v2` from above command if you purchased your PCBs prior to April 2022 +Compile `v1` firmware if you purchased your PCBs prior to April 2022. 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/boardsource/microdox/rules.mk b/keyboards/boardsource/microdox/rules.mk deleted file mode 100644 index a15c5aded1..0000000000 --- a/keyboards/boardsource/microdox/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -SPLIT_KEYBOARD = yes - -LAYOUTS = split_3x5_3 diff --git a/keyboards/boardsource/microdox/v1/config.h b/keyboards/boardsource/microdox/v1/config.h new file mode 100644 index 0000000000..111033dd67 --- /dev/null +++ b/keyboards/boardsource/microdox/v1/config.h @@ -0,0 +1,20 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/boardsource/microdox/v1/info.json b/keyboards/boardsource/microdox/v1/info.json new file mode 100644 index 0000000000..a79153a73c --- /dev/null +++ b/keyboards/boardsource/microdox/v1/info.json @@ -0,0 +1,25 @@ +{ + "features": { + "rgblight": true + }, + "matrix_pins": { + "cols": ["F4", "F5", "F6", "F7", "B1"], + "rows": ["B2", "B6", "B4", "B5"] + }, + "usb": { + "device_version": "1.0.0" + }, + "split": { + "soft_serial_pin": "D2" + }, + "rgblight": { + "pin": "D3", + "sleep": true, + "led_count": 12, + "split_count": [6, 6], + "max_brightness": 150, + "animations": { + "all": true + } + } +} diff --git a/keyboards/boardsource/microdox/v1/rules.mk b/keyboards/boardsource/microdox/v1/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/boardsource/microdox/v1/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/boardsource/microdox/v2/config.h b/keyboards/boardsource/microdox/v2/config.h index 1f8bc7c3d9..50207651ab 100644 --- a/keyboards/boardsource/microdox/v2/config.h +++ b/keyboards/boardsource/microdox/v2/config.h @@ -1,45 +1,14 @@ // Copyright 2022 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#undef MATRIX_ROW_PINS -#undef MATRIX_COL_PINS -#define MATRIX_ROW_PINS \ - { F4, D2, C6, B1 } -#define MATRIX_COL_PINS \ - { D4, D7, B3, F7, F6 } -#define MATRIX_ROW_PINS_RIGHT \ - { F5, F7, F6, E6 } -#define MATRIX_COL_PINS_RIGHT \ - { F4, B1, D7, C6, B3 } -#undef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D3 -#undef RGB_DI_PIN #define RGB_DI_PIN B5 -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# undef RGBLED_SPLIT -# define RGBLED_NUM 8 -# define RGBLED_SPLIT { 4, 4 } // underglow only -# define RGBLIGHT_SLEEP -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -#endif -#ifdef RGB_MATRIX_ENABLE -# define DRIVER_LED_TOTAL 44 -# define RGB_MATRIX_SPLIT { 22, 22 } -# define RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#endif -#ifdef ENCODER_ENABLE -# define ENCODERS_PAD_A { E6 } -# define ENCODERS_PAD_B { B2 } -# define ENCODERS_PAD_A_RIGHT { B6 } -# define ENCODERS_PAD_B_RIGHT { B2 } -#endif +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +#define DRIVER_LED_TOTAL 44 +#define RGB_MATRIX_SPLIT { 22, 22 } +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/keyboards/boardsource/microdox/v2/info.json b/keyboards/boardsource/microdox/v2/info.json new file mode 100644 index 0000000000..a53dfff708 --- /dev/null +++ b/keyboards/boardsource/microdox/v2/info.json @@ -0,0 +1,82 @@ +{ + "features": { + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["D4", "D7", "B3", "F7", "F6"], + "rows": ["F4", "D2", "C6", "B1"] + }, + "usb": { + "device_version": "2.0.0" + }, + "encoder": { + "enabled": true, + "rotary": [ + { "pin_a": "E6", "pin_b": "B2"} + ] + }, + "split": { + "soft_serial_pin": "D3", + "matrix_pins": { + "right": { + "cols": ["F4", "B1", "D7", "C6", "B3"], + "rows": ["F5", "F7", "F6", "E6"] + } + }, + "encoder": { + "right": { + "rotary": [ + { "pin_a": "B6", "pin_b": "B2" } + ] + } + } + }, + "rgb_matrix": { + "layout": [ + { "flags": 2, "x": 12, "y": 11 }, + { "flags": 2, "x": 86, "y": 11 }, + { "flags": 2, "x": 86, "y": 53 }, + { "flags": 2, "x": 0, "y": 64 }, + { "flags": 2, "x": 211, "y": 11 }, + { "flags": 2, "x": 136, "y": 11 }, + { "flags": 2, "x": 136, "y": 53 }, + { "flags": 2, "x": 224, "y": 64 }, + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 }, + { "flags": 4, "matrix": [0, 1], "x": 24, "y": 0 }, + { "flags": 4, "matrix": [0, 2], "x": 49, "y": 0 }, + { "flags": 4, "matrix": [0, 3], "x": 74, "y": 0 }, + { "flags": 4, "matrix": [0, 4], "x": 99, "y": 0 }, + { "flags": 4, "matrix": [4, 4], "x": 124, "y": 0 }, + { "flags": 4, "matrix": [4, 3], "x": 149, "y": 0 }, + { "flags": 4, "matrix": [4, 2], "x": 174, "y": 0 }, + { "flags": 4, "matrix": [4, 1], "x": 199, "y": 0 }, + { "flags": 4, "matrix": [4, 0], "x": 224, "y": 0 }, + { "flags": 4, "matrix": [1, 0], "x": 0, "y": 21 }, + { "flags": 4, "matrix": [1, 1], "x": 24, "y": 21 }, + { "flags": 4, "matrix": [1, 2], "x": 49, "y": 21 }, + { "flags": 4, "matrix": [1, 3], "x": 74, "y": 21 }, + { "flags": 4, "matrix": [1, 4], "x": 99, "y": 21 }, + { "flags": 4, "matrix": [5, 4], "x": 124, "y": 21 }, + { "flags": 4, "matrix": [5, 3], "x": 149, "y": 21 }, + { "flags": 4, "matrix": [5, 2], "x": 174, "y": 21 }, + { "flags": 4, "matrix": [5, 1], "x": 199, "y": 21 }, + { "flags": 4, "matrix": [5, 0], "x": 224, "y": 21 }, + { "flags": 4, "matrix": [2, 0], "x": 0, "y": 42 }, + { "flags": 4, "matrix": [2, 1], "x": 24, "y": 42 }, + { "flags": 4, "matrix": [2, 2], "x": 49, "y": 42 }, + { "flags": 4, "matrix": [2, 3], "x": 74, "y": 42 }, + { "flags": 4, "matrix": [2, 4], "x": 99, "y": 42 }, + { "flags": 4, "matrix": [6, 4], "x": 124, "y": 42 }, + { "flags": 4, "matrix": [6, 3], "x": 149, "y": 42 }, + { "flags": 4, "matrix": [6, 2], "x": 174, "y": 42 }, + { "flags": 4, "matrix": [6, 1], "x": 199, "y": 42 }, + { "flags": 4, "matrix": [6, 0], "x": 224, "y": 42 }, + { "flags": 1, "matrix": [3, 2], "x": 49, "y": 64 }, + { "flags": 1, "matrix": [3, 3], "x": 74, "y": 64 }, + { "flags": 1, "matrix": [3, 4], "x": 99, "y": 64 }, + { "flags": 1, "matrix": [7, 4], "x": 124, "y": 64 }, + { "flags": 1, "matrix": [7, 3], "x": 149, "y": 64 }, + { "flags": 1, "matrix": [7, 2], "x": 174, "y": 64 } + ] + } +} diff --git a/keyboards/boardsource/microdox/v2/rules.mk b/keyboards/boardsource/microdox/v2/rules.mk index 0d57a06d1e..32afd21635 100644 --- a/keyboards/boardsource/microdox/v2/rules.mk +++ b/keyboards/boardsource/microdox/v2/rules.mk @@ -1,8 +1 @@ -RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 -RGB_MATRIX_SUPPORTED = yes -RGBLIGHT_ENABLE = no -OLED_ENABLE = yes -OLED_DRIVER = SSD1306 -ENCODER_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/boardsource/microdox/v2/v2.c b/keyboards/boardsource/microdox/v2/v2.c deleted file mode 100644 index 11476a6ea2..0000000000 --- a/keyboards/boardsource/microdox/v2/v2.c +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 jack (@waffle87) -// SPDX-License-Identifier: GPL-2.0-or-later -#include "v2.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { - { - { 13, 14, 15, 16, 17 }, - { 12, 11, 10, 9, 8 }, - { 3, 4, 5, 6, 7 }, - { NO_LED, NO_LED, 2, 1, 0 }, - //18-21 left underglow - { 35, 36, 37, 38, 39 }, - { 34, 33, 32, 31, 30 }, - { 25, 26, 27, 28, 29 }, - { NO_LED, NO_LED, 24, 23, 22 } - //40-44 right underglow - }, { - {99,64}, {74,64}, {49,64}, //0-2 - {0,42}, {24,42}, {49,42}, {74,42}, {99,42}, //3-7 - {99,21}, {74,21}, {49,21}, {24,21}, {0,21}, //8-12 - {0,0}, {24,0}, {49,0}, {74,0}, {99,0}, //13-17 - {12,11}, {86,11}, {86,53}, {0,64}, //18-21 - {124,64}, {149,64}, {174,64}, //22-24 - {224,42}, {199,42}, {174,42}, {149,42}, {124,42}, //25-29 - {124,21}, {149,21}, {174,21}, {199,21}, {224,21}, //30-34 - {224,0}, {199,0}, {174,0}, {149,0}, {124,0}, //35-39 - {211,11}, {136,11}, {136,53}, {224,64} //40-44 - }, { - 1, 1, 1, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 2, 2, 2, 2, - 1, 1, 1, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, - 2, 2, 2, 2 - } -}; -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } else { - if (clockwise) { - tap_code(KC_MNXT); - } else { - tap_code(KC_MPRV); - } - } - return false; -} -#endif diff --git a/keyboards/boardsource/microdox/v2/v2.h b/keyboards/boardsource/microdox/v2/v2.h deleted file mode 100644 index 400660fffa..0000000000 --- a/keyboards/boardsource/microdox/v2/v2.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2022 jack (@waffle87) -// SPDX-License-Identifier: GPL-2.0-or-later -#pragma once -#include "quantum.h" -#define xxx KC_NO - -#define LAYOUT_split_3x5_3(\ - k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \ - k32, k33, k34, k74, k73, k72 \ - ) \ - { \ - { k00, k01, k02, k03, k04 }, \ - { k10, k11, k12, k13, k14 }, \ - { k20, k21, k22, k23, k24 }, \ - { xxx, xxx, k32, k33, k34 }, \ - { k40, k41, k42, k43, k44 }, \ - { k50, k51, k52, k53, k54 }, \ - { k60, k61, k62, k63, k64 }, \ - { xxx, xxx, k72, k73, k74 } \ - } diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h index 62e75b36dd..80ca48c995 100644 --- a/keyboards/boardwalk/config.h +++ b/keyboards/boardwalk/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bolsa/damapad/config.h b/keyboards/bolsa/damapad/config.h index fd3db403f5..16c4006896 100644 --- a/keyboards/bolsa/damapad/config.h +++ b/keyboards/bolsa/damapad/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { E6, F7, C7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, B7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bop/config.h b/keyboards/bop/config.h index c1a6078cb4..00bae0f655 100644 --- a/keyboards/bop/config.h +++ b/keyboards/bop/config.h @@ -27,7 +27,6 @@ #define MATRIX_COL_PINS { D5, C5, B0, B1, B2, B3, B4, B5, B6, E7, E6, F0, F7, F6, F5, F4, F3, F2, F1, C6 } // If your board is spamming the end column, change C7 to C6 in the line above and short those pins on the controller -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/botanicalkeyboards/fm2u/config.h b/keyboards/botanicalkeyboards/fm2u/config.h index 23e4ad208b..4664c79d3d 100644 --- a/keyboards/botanicalkeyboards/fm2u/config.h +++ b/keyboards/botanicalkeyboards/fm2u/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bpiphany/four_banger/config.h b/keyboards/bpiphany/four_banger/config.h index ec8a0956be..5408ee3350 100644 --- a/keyboards/bpiphany/four_banger/config.h +++ b/keyboards/bpiphany/four_banger/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B2, B6 } #define MATRIX_COL_PINS { B5, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index 1ca00f231d..a0f088802a 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_COL_PINS { B0, B3, B2, B1, B6, B4, B5, C7 } #define MATRIX_ROW_PINS { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } -#define UNUSED_PINS { C0, C1, C2, C3, C4, D2, D7 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/config.h b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/config.h index 4bc6d2c3c0..e45034f9a8 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/config.h +++ b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/config.h @@ -2,6 +2,7 @@ // place overrides here #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY #define LEADER_TIMEOUT 800 #define DISABLE_SPACE_CADET_ROLLOVER diff --git a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/keymap.c index dd2098d945..6db177c183 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/keymap.c +++ b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/keymap.c @@ -52,17 +52,33 @@ qk_tap_dance_action_t tap_dance_actions[] = { // Tap once for CTRL, twice for Caps Lock [TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS), [COPA] = ACTION_TAP_DANCE_DOUBLE(LCTL(KC_C), LCTL(KC_V)), - [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEmojis, NULL, NULL, 800), - [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAnimals, NULL, NULL, 800), - //[SYMBOLS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleSymbols, NULL, NULL, 800), - [FOODS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleFoods, NULL, NULL, 800), - [ETC] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleEtc, NULL, NULL, 800), - //[VEHICLES] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleVehicles, NULL, NULL, 800), - //[SUPPLEMENT] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleSupplement, NULL, NULL, 800), - [ALLS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(cycleAll, NULL, NULL, 800) + [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL), + [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL), + //[SYMBOLS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleSymbols, NULL, NULL), + [FOODS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleFoods, NULL, NULL), + [ETC] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEtc, NULL, NULL), + //[VEHICLES] = ACTION_TAP_DANCE_FN_ADVANCED(cycleVehicles, NULL, NULL), + //[SUPPLEMENT] = ACTION_TAP_DANCE_FN_ADVANCED(cycleSupplement, NULL, NULL), + [ALLS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAll, NULL, NULL) // Other declarations would go here, separated by commas, if you have them }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(EMOJIS): + case TD(ANIMAL): + //case TD(SYMBOLS): + case TD(FOODS): + case TD(ETC): + //case TD(VEHICLES): + //case TD(SUPPLEMENT): + case TD(ALLS): + return 800; + default: + return TAPPING_TERM; + } +} + // macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/variableTapDance.md b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/variableTapDance.md index b2e5041393..c3fce50f2a 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/variableTapDance.md +++ b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/variableTapDance.md @@ -3,7 +3,4 @@ Tap Dance is constrained normally by `TAPPING_TERM` defined in your keyboard's c -- `ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term)` : This works the same as `ACTION_TAP_DANCE_FN_ADVANCED` just with the extra `tap_specific_tapping_term` arguement at the end. This way you can set a specific tap dance to have a longer or shorter tap in between your taps, giving you more, or less, time in between each tap. - - -`tap_specific_tapping_term` should be the same type and range of values that one would put into the `TAPPING_TERM` definition in the config.h file. +- Implementing `uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record)`, you can set a specific tap dance to have a longer or shorter tap in between your taps, giving you more, or less, time in between each tap. The return value should be the same type and range of values that one would put into the `TAPPING_TERM` definition in the config.h file. diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index 819b68e40f..1d2c594cfb 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ //#define MATRIX_ROW_PINS { D0, D5 } //#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index cc4d0bca63..4553d4e0e3 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { uint8_t layer; - layer = biton32(layer_state); + layer = get_highest_layer(layer_state); if (current_layer_global != layer) { current_layer_global = layer; @@ -132,7 +132,7 @@ void tap_helper(keyrecord_t *record, uint16_t orig_mod, uint16_t macro_mod, uint bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t layer; - layer = biton32(layer_state); + layer = get_highest_layer(layer_state); if (layer == PROG2) { if (keycode >= KC_A && keycode <= KC_EXSEL && \ !( // do not send LSFT + these keycodes, they are needed for emulating the US layout diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index 7884462021..dc55cdf9fd 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case KM_BLOWRAK: ph_caps_led_on(); diff --git a/keyboards/bpiphany/sixshooter/config.h b/keyboards/bpiphany/sixshooter/config.h index a943bcc249..9c713d92dd 100644 --- a/keyboards/bpiphany/sixshooter/config.h +++ b/keyboards/bpiphany/sixshooter/config.h @@ -11,7 +11,6 @@ { F7, F6, F1 }, \ { F5, F4, F0 } \ } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index 2d185e0c28..9aa010c85c 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, B3, B4, B2, B1, C7, B6, B5 } #define MATRIX_COL_PINS { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } -#define UNUSED_PINS { B0, C4, D3 } #define LED_NUM_LOCK_PIN C5 #define LED_CAPS_LOCK_PIN C6 diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index c8d3039202..5a29c90eab 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6 } #define MATRIX_COL_PINS { D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/buildakb/potato65/config.h b/keyboards/buildakb/potato65/config.h index 1c9b6f1549..6e363d42ad 100644 --- a/keyboards/buildakb/potato65/config.h +++ b/keyboards/buildakb/potato65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/buildakb/potato65hs/config.h b/keyboards/buildakb/potato65hs/config.h index dc83f4456e..e102000fb5 100644 --- a/keyboards/buildakb/potato65hs/config.h +++ b/keyboards/buildakb/potato65hs/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F5, F4, F6, F0, D2 } #define MATRIX_COL_PINS { D3, D4, D6, D7, B4, B5, B6, F1, B0, B1, B2, B3, B7, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/buildakb/potato65s/config.h b/keyboards/buildakb/potato65s/config.h index 6ad3183c84..6a19a5aceb 100644 --- a/keyboards/buildakb/potato65s/config.h +++ b/keyboards/buildakb/potato65s/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F5, F4, F6, F0, D2 } #define MATRIX_COL_PINS { D3, D4, D6, D7, B4, B5, B6, F1, B0, B1, B2, B3, B7, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/buzzard/rev1/config.h b/keyboards/buzzard/rev1/config.h index 2a7ea22ec1..7e4628c6ec 100644 --- a/keyboards/buzzard/rev1/config.h +++ b/keyboards/buzzard/rev1/config.h @@ -20,7 +20,6 @@ { F4, F5, F6, F7 } #define MATRIX_COL_PINS \ { B1, B3, B2, B6, B5, B4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cablecardesigns/cypher/rev6/config.h b/keyboards/cablecardesigns/cypher/rev6/config.h index 235a50a1bf..2ec01133fc 100644 --- a/keyboards/cablecardesigns/cypher/rev6/config.h +++ b/keyboards/cablecardesigns/cypher/rev6/config.h @@ -10,7 +10,6 @@ #define MATRIX_ROW_PINS { B0, F1, F5, F6, F7, D1, F4, D4, C6, C7 } #define MATRIX_COL_PINS { D6, D7, B4, B5, B6, B7, B3, B2, B1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/caffeinated/serpent65/config.h b/keyboards/caffeinated/serpent65/config.h index 1d3e71d94a..35f2a3ae5f 100644 --- a/keyboards/caffeinated/serpent65/config.h +++ b/keyboards/caffeinated/serpent65/config.h @@ -41,7 +41,6 @@ EncA (B6) because it is not used in the default PCB All Extra pins (A8, B15, B14, B13, B3, B5, B8, B9) , for the same reason; B0, which is unconnected on the PCB */ -//#define UNUSED_PINS { B0, B6, B13, B14, B15, B8, B9, B5, B3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/canary/canary60rgb/v1/config.h b/keyboards/canary/canary60rgb/v1/config.h index f02b29c1b9..3d2dd81d88 100644 --- a/keyboards/canary/canary60rgb/v1/config.h +++ b/keyboards/canary/canary60rgb/v1/config.h @@ -38,7 +38,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cannonkeys/atlas_alps/config.h b/keyboards/cannonkeys/atlas_alps/config.h index 17d8c62634..d88edb945c 100644 --- a/keyboards/cannonkeys/atlas_alps/config.h +++ b/keyboards/cannonkeys/atlas_alps/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS { B5, B4, D1, D7, D6 } #define MATRIX_COL_PINS { B6, C6, D2, E6, C7, B3, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cannonkeys/ortho75/ortho75.c b/keyboards/cannonkeys/ortho75/ortho75.c index 7c722d7156..58b7396a1b 100644 --- a/keyboards/cannonkeys/ortho75/ortho75.c +++ b/keyboards/cannonkeys/ortho75/ortho75.c @@ -5,47 +5,48 @@ uint8_t layer = 0; -uint32_t layer_state_set_kb(uint32_t state) { - state = layer_state_set_user(state); - layer = biton32(state); - return state; +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + layer = get_highest_layer(state); + return state; } bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) return false; - uint16_t mapped_code = 0; - if (index == 0) { - if (clockwise) { - switch(layer){ - case 0: - default: - mapped_code = KC_VOLU; - break; - case 1: - mapped_code = KC_MEDIA_NEXT_TRACK; - break; - case 2: - mapped_code = KC_PGDN; - break; + uint16_t mapped_code = 0; + if (index == 0) { + if (clockwise) { + switch (layer) { + case 0: + default: + mapped_code = KC_VOLU; + break; + case 1: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case 2: + mapped_code = KC_PGDN; + break; + } + } else { + switch (layer) { + case 0: + default: + mapped_code = KC_VOLD; + break; + case 1: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case 2: + mapped_code = KC_PGUP; + break; + } } - } else { - switch(layer){ - case 0: - default: - mapped_code = KC_VOLD; - break; - case 1: - mapped_code = KC_MEDIA_PREV_TRACK; - break; - case 2: - mapped_code = KC_PGUP; - break; + uint16_t held_keycode_timer = timer_read(); + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY) { /* no-op */ } + unregister_code(mapped_code); } - uint16_t held_keycode_timer = timer_read(); - register_code(mapped_code); - while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } - unregister_code(mapped_code); - } - return true; + return true; } diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index bd7eaf1885..9435377839 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -240,7 +240,7 @@ void read_host_led_state(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); - layer = biton32(state); + layer = get_highest_layer(state); oled_request_wakeup(); return state; } diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index fff8b65bd7..1e8465387c 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -145,7 +145,7 @@ static char* get_time(void) { hour = 12; } - static char time_str[8] = ""; + static char time_str[11] = ""; sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); return time_str; @@ -162,7 +162,7 @@ static char* get_date(void) { day = day_config; } - static char date_str[11] = ""; + static char date_str[15] = ""; sprintf(date_str, "%04d-%02d-%02d", year, month, day); return date_str; diff --git a/keyboards/capsunlocked/cu24/config.h b/keyboards/capsunlocked/cu24/config.h index 1d3bdb1212..552a991af8 100644 --- a/keyboards/capsunlocked/cu24/config.h +++ b/keyboards/capsunlocked/cu24/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { E6, F5, B4, B6, C6, C7 } #define MATRIX_COL_PINS { F0, F1, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/capsunlocked/cu65/config.h b/keyboards/capsunlocked/cu65/config.h index 1ac332aa64..bf2055cb50 100644 --- a/keyboards/capsunlocked/cu65/config.h +++ b/keyboards/capsunlocked/cu65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F4, F5, F6, D3 } #define MATRIX_COL_PINS { D6, D7, D4, B4, B5, B6, C6, D5, C7, F0, E6, B0, B1, B7, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/capsunlocked/cu7/config.h b/keyboards/capsunlocked/cu7/config.h index 0bf17fe96c..3f93aae5e8 100644 --- a/keyboards/capsunlocked/cu7/config.h +++ b/keyboards/capsunlocked/cu7/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D7, F0, F6 } #define MATRIX_COL_PINS { F5, F7, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/capsunlocked/cu75/config.h b/keyboards/capsunlocked/cu75/config.h index 0168668134..27c1dd4e2f 100644 --- a/keyboards/capsunlocked/cu75/config.h +++ b/keyboards/capsunlocked/cu75/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 16 #define MATRIX_ROW_PINS {F1, B7, B3, D2, D3, B2} #define MATRIX_COL_PINS {F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, B1, B0, F0} -#define UNUSED_PINS {} #define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile #define RGBLED_NUM 24 // Number of LEDs diff --git a/keyboards/capsunlocked/cu80/v1/config.h b/keyboards/capsunlocked/cu80/v1/config.h index f2acea9fef..949fca07df 100644 --- a/keyboards/capsunlocked/cu80/v1/config.h +++ b/keyboards/capsunlocked/cu80/v1/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B5, B4, F7, D7, D6 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, C7, C6, B6, B0, E6, B7, B3, B2, D2, D3, D5, D4} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/catch22/config.h b/keyboards/catch22/config.h index 8deead431c..94be3c3451 100644 --- a/keyboards/catch22/config.h +++ b/keyboards/catch22/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS { } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cest73/tkm/config.h b/keyboards/cest73/tkm/config.h index 9b48d1a7d8..a11e7a5e9b 100644 --- a/keyboards/cest73/tkm/config.h +++ b/keyboards/cest73/tkm/config.h @@ -27,7 +27,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7, D0 } /* column handy ruler: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 */ #define MATRIX_COL_PINS { D1, D2, D3, D4, D5, D6, D7, F0, F1, F4 } -#define UNUSED_PINS { } //NOTE: if D6 pin shows any issues in exploatation the LED on the Teensy is to be removed diff --git a/keyboards/charue/charon/config.h b/keyboards/charue/charon/config.h index 89c9ebde7c..61734ac4ea 100644 --- a/keyboards/charue/charon/config.h +++ b/keyboards/charue/charon/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, C7 } #define MATRIX_COL_PINS { D3, D5, B4, D7, D6, D4, F7, F6, F5, F4, F1, F0, B5, B6, C6 } -#define UNUSED_PINS { B7, D0, D1, D2 } #define DIODE_DIRECTION COL2ROW /* LED config */ diff --git a/keyboards/charue/sunsetter_r2/config.h b/keyboards/charue/sunsetter_r2/config.h index 5a0f2e3f8e..aa835564e0 100644 --- a/keyboards/charue/sunsetter_r2/config.h +++ b/keyboards/charue/sunsetter_r2/config.h @@ -12,7 +12,6 @@ /* Keyboard Matrix Assignment s*/ #define MATRIX_ROW_PINS { B3, B2, F4, F5, F6 } #define MATRIX_COL_PINS { F0, F1, F7, B1, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS { B7 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chavdai40/rev1/config.h b/keyboards/chavdai40/rev1/config.h index 5ce1111bae..47ec1ca1ff 100644 --- a/keyboards/chavdai40/rev1/config.h +++ b/keyboards/chavdai40/rev1/config.h @@ -38,7 +38,6 @@ #define MATRIX_ROW_PINS { A0, A15, B5, B6 } #define MATRIX_COL_PINS { B8, B4, B3, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chavdai40/rev2/config.h b/keyboards/chavdai40/rev2/config.h index e45d2b2db1..5f277415fa 100644 --- a/keyboards/chavdai40/rev2/config.h +++ b/keyboards/chavdai40/rev2/config.h @@ -38,7 +38,6 @@ #define MATRIX_ROW_PINS { A0, A15, B5, B6 } #define MATRIX_COL_PINS { B7, B4, B3, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/axon40/config.h b/keyboards/checkerboards/axon40/config.h index 9f9209df70..08d505f494 100644 --- a/keyboards/checkerboards/axon40/config.h +++ b/keyboards/checkerboards/axon40/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS { D2, D3, D1, D5 } #define MATRIX_COL_PINS { C7, B7, D4, D6, F0, F1, C6, B6, B5, B4, E6, B0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/candybar_ortho/config.h b/keyboards/checkerboards/candybar_ortho/config.h index ee5d973365..fb0d209fdd 100644 --- a/keyboards/checkerboards/candybar_ortho/config.h +++ b/keyboards/checkerboards/candybar_ortho/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS { B4, D4, D7, D6, B5, B6, C7, C6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/g_idb60/config.h b/keyboards/checkerboards/g_idb60/config.h index 2aa9dc7747..4f8c1e650f 100644 --- a/keyboards/checkerboards/g_idb60/config.h +++ b/keyboards/checkerboards/g_idb60/config.h @@ -26,7 +26,6 @@ Copyright 2021 Nathan Spears /* key matrix pins */ #define MATRIX_ROW_PINS { D6, D7, B4, B5, F7 } #define MATRIX_COL_PINS { B6, C6, C7, D4, F6, F0, B0, F1, F4, F5, D1, D0, D3, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/nop60/config.h b/keyboards/checkerboards/nop60/config.h index 09524f940c..9cd70c1d7d 100644 --- a/keyboards/checkerboards/nop60/config.h +++ b/keyboards/checkerboards/nop60/config.h @@ -26,7 +26,6 @@ Copyright 2021 Nathan Spears /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, E6, B7, C6 } #define MATRIX_COL_PINS { F6, F5, F4, D0, D7, D3, D4, D5, D6, F7, C7, B4, B6, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/phoenix45_ortho/config.h b/keyboards/checkerboards/phoenix45_ortho/config.h index 9fc442cc8f..a7d1a9a1d5 100644 --- a/keyboards/checkerboards/phoenix45_ortho/config.h +++ b/keyboards/checkerboards/phoenix45_ortho/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, D1, D0, C4 } #define MATRIX_COL_PINS { D3, C2, C5, B0, D6, D5, D4, B4, B5, B6, B7, C7, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/plexus75/config.h b/keyboards/checkerboards/plexus75/config.h index 0acab1cf99..3cee0be178 100644 --- a/keyboards/checkerboards/plexus75/config.h +++ b/keyboards/checkerboards/plexus75/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D2, B3, B1, F1, F0 } #define MATRIX_COL_PINS { B2, B0, D1, F7, F6, F5, F4, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/plexus75_he/config.h b/keyboards/checkerboards/plexus75_he/config.h index 202eee2e27..096c2e4f0c 100644 --- a/keyboards/checkerboards/plexus75_he/config.h +++ b/keyboards/checkerboards/plexus75_he/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C2, D0, D1, D2, D6, B0, B3, B2, C6, B1 } #define MATRIX_COL_PINS { C4, C5, D3, C7, B7, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/pursuit40/config.h b/keyboards/checkerboards/pursuit40/config.h index a9714dc2d2..e794580789 100644 --- a/keyboards/checkerboards/pursuit40/config.h +++ b/keyboards/checkerboards/pursuit40/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, D1, F4, F5 } #define MATRIX_COL_PINS { F1, E6, B7, D5, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/quark/config.h b/keyboards/checkerboards/quark/config.h index f985c49b48..dda0f9f189 100644 --- a/keyboards/checkerboards/quark/config.h +++ b/keyboards/checkerboards/quark/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C5, C4, C6, C7, B7 } #define MATRIX_COL_PINS { B4, B5, B6, B3, C2, B2, D6, D2, D3, D4, D5, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/quark_lp/config.h b/keyboards/checkerboards/quark_lp/config.h index 076132fd51..b4664ec5c2 100644 --- a/keyboards/checkerboards/quark_lp/config.h +++ b/keyboards/checkerboards/quark_lp/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C5, C4, C6, C7 } #define MATRIX_COL_PINS { B6, B5, B4, B3, B0, D6, D5, D4, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/quark_plus/config.h b/keyboards/checkerboards/quark_plus/config.h index 6883a8d565..919df92e6d 100644 --- a/keyboards/checkerboards/quark_plus/config.h +++ b/keyboards/checkerboards/quark_plus/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B1, C2, D0, D6, B0, B6, B5 } #define MATRIX_COL_PINS { C6, D1, D5, D4, D3, D2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/quark_squared/config.h b/keyboards/checkerboards/quark_squared/config.h index 56bcd720eb..d9af2af4b3 100644 --- a/keyboards/checkerboards/quark_squared/config.h +++ b/keyboards/checkerboards/quark_squared/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C5, C4, C6, C7, B7 } #define MATRIX_COL_PINS { B4, B5, B6, B3, C2, B2, D6, D2, D3, D4, D5, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/snop60/config.h b/keyboards/checkerboards/snop60/config.h index 573f102fcb..f084870939 100644 --- a/keyboards/checkerboards/snop60/config.h +++ b/keyboards/checkerboards/snop60/config.h @@ -26,7 +26,6 @@ Copyright 2022 Nathan Spears /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D6, B4, B5 } #define MATRIX_COL_PINS { B6, C6, C7, D5, F7, F6, F5, F4, F1, F0, B0, E6, D4, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/checkerboards/ud40_ortho_alt/config.h b/keyboards/checkerboards/ud40_ortho_alt/config.h index 7819d1b002..9ba1df7d8a 100644 --- a/keyboards/checkerboards/ud40_ortho_alt/config.h +++ b/keyboards/checkerboards/ud40_ortho_alt/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, F0, F1, F4 } #define MATRIX_COL_PINS { B2, B1, F7, D6, D7, B4, B5, B6, C6, C7, F5, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cherrybstudio/cb1800/config.h b/keyboards/cherrybstudio/cb1800/config.h index c6266e4459..7c10378e97 100644 --- a/keyboards/cherrybstudio/cb1800/config.h +++ b/keyboards/cherrybstudio/cb1800/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cherrybstudio/cb87/config.h b/keyboards/cherrybstudio/cb87/config.h index 1f497cee03..fa9a752801 100644 --- a/keyboards/cherrybstudio/cb87/config.h +++ b/keyboards/cherrybstudio/cb87/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3 } #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, F5, C6, C7, F7 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cherrybstudio/cb87rgb/config.h b/keyboards/cherrybstudio/cb87rgb/config.h index 030f1e6047..d915e59c7f 100644 --- a/keyboards/cherrybstudio/cb87rgb/config.h +++ b/keyboards/cherrybstudio/cb87rgb/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, F6 } #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, F5, C6, C7, F7 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cherrybstudio/cb87v2/config.h b/keyboards/cherrybstudio/cb87v2/config.h index e3f7b9bb9e..d3d5818b1c 100644 --- a/keyboards/cherrybstudio/cb87v2/config.h +++ b/keyboards/cherrybstudio/cb87v2/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, F6 } #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, F5, C6, C7, F7 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cheshire/curiosity/config.h b/keyboards/cheshire/curiosity/config.h index 50b69789ff..3f6bdf4f0a 100644 --- a/keyboards/cheshire/curiosity/config.h +++ b/keyboards/cheshire/curiosity/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B13, B14, A4, A2, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, B9, B8, B7, B6, B5, B4, B3, A15 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chickenman/ciel/config.h b/keyboards/chickenman/ciel/config.h index 800b570590..ce73bdc831 100644 --- a/keyboards/chickenman/ciel/config.h +++ b/keyboards/chickenman/ciel/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C5, C4, B0, C7, B7 } #define MATRIX_COL_PINS { C6, B6, B5, B4, B3, B2, B1, D6, D5, D4, D3, D2, D1, D0, C2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chlx/merro60/config.h b/keyboards/chlx/merro60/config.h index 9cf509da86..fab584880d 100644 --- a/keyboards/chlx/merro60/config.h +++ b/keyboards/chlx/merro60/config.h @@ -33,8 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, D5, D3, B5, F4 } #define MATRIX_COL_PINS { B7, D1, D0, B0, B1, E6, B2, B3, D2, D7, B4, B6, C6, C7, D6 } -#define UNUSED_PINS -// #define UNUSED_PINS { F0, F1, F5, F6, F7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/chlx/str_merro60/config.h b/keyboards/chlx/str_merro60/config.h index c310396030..9c8a0a64b8 100644 --- a/keyboards/chlx/str_merro60/config.h +++ b/keyboards/chlx/str_merro60/config.h @@ -35,8 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, C7, F7, F6, F5, F4, F1, F0, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, E6, B0, B1, B2 } -#define UNUSED_PINS -// #define UNUSED_PINS { B4, B5, B6, D4, D5, D6, D7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/chocv/config.h b/keyboards/chocv/config.h index 4d1ea3794a..16c2682646 100644 --- a/keyboards/chocv/config.h +++ b/keyboards/chocv/config.h @@ -25,7 +25,6 @@ #define MATRIX_ROW_PINS { F4, F5, D1, D0 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, C6, D7, E6, B4, B5} - #define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cipulot/kallos/config.h b/keyboards/cipulot/kallos/config.h index 9c7e298caf..27923128d3 100644 --- a/keyboards/cipulot/kallos/config.h +++ b/keyboards/cipulot/kallos/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B3, B2, F0, C7, F4, F1 } #define MATRIX_COL_PINS \ { F5, F6, C6, B6, B5, B4, D7, D6, D4, D5, D3, F7, D2, D1, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c index 3bb1a2c009..3f5ebc8655 100755 --- a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c +++ b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c @@ -134,10 +134,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------=======------------------------' */ [_TERMINAL] = LAYOUT_ortho_4x4( - _______, TERM_ABOUT, _______, _______, - TERM_OFF, TERM_PRINT, _______, _______, - _______, TERM_FLUSH, _______, _______, - TERM_ON, TERM_HELP , _______, _______ + _______, TERM_ABOUT, _______, _______, + _______, TERM_PRINT, _______, _______, + _______, TERM_FLUSH, _______, _______, + _______, TERM_HELP , _______, _______ ), /* ADMIN * ,-----------------------------------------. diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 8fa32bcee5..3131bb405a 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -12,7 +12,6 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -TERMINAL_ENABLE = yes NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index cd1296034b..c482a41acd 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, B4, B5, B6, B7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 0ac18c7aa5..07e0ec394d 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { F0, F1, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index c14b575678..721e8977d6 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { A2, A1, A0, B8 } #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0 } -// #define UNUSED_PINS { B14 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ckeys/washington/config.h b/keyboards/ckeys/washington/config.h index 643f61c5d6..8849c4e834 100644 --- a/keyboards/ckeys/washington/config.h +++ b/keyboards/ckeys/washington/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6 } #define MATRIX_COL_PINS { F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ckeys/washington/keymaps/default/keymap.c b/keyboards/ckeys/washington/keymaps/default/keymap.c index 95e0f3ab59..9ce0181fe4 100644 --- a/keyboards/ckeys/washington/keymaps/default/keymap.c +++ b/keyboards/ckeys/washington/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool encoder_update_user(uint8_t index, bool clockwise) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _BASE: if (clockwise) { tap_code(KC_VOLU); @@ -62,7 +62,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _BASE: oled_write_P(PSTR("Default\n"), false); break; diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 56d4c47071..7b7d2bdce0 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -199,7 +199,7 @@ void matrix_scan_user(void) { if (!rgblight_config.enable || rgblight_config.mode != 1) { return; } - uint32_t layer = layer_state; + layer_state_t layer = layer_state; uint8_t val = rgblight_config.val; if (layer & (1<<_FL)) { diff --git a/keyboards/contender/config.h b/keyboards/contender/config.h index f2ccbc7fe6..e6d32c8a62 100644 --- a/keyboards/contender/config.h +++ b/keyboards/contender/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, D3, B5, B7, B4, B2 } #define MATRIX_COL_PINS { C7, D6, B3, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index 7e4fddb59f..a6be554875 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/contra/keymaps/default/keymap.c b/keyboards/contra/keymaps/default/keymap.c index 6c05ebebff..1a365c9a6d 100644 --- a/keyboards/contra/keymaps/default/keymap.c +++ b/keyboards/contra/keymaps/default/keymap.c @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_planck_mit( _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/converter/a1200/miss1200/config.h b/keyboards/converter/a1200/miss1200/config.h index 7347f1948c..80053df0db 100644 --- a/keyboards/converter/a1200/miss1200/config.h +++ b/keyboards/converter/a1200/miss1200/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0, B1, B3 } #define MATRIX_COL_PINS { D0, D1, C7, D6, B7, B6, B5, B4, E6, D7, C6, D4, B2, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/a1200/mistress1200/config.h b/keyboards/converter/a1200/mistress1200/config.h index 123d6165d6..6e869e1db5 100644 --- a/keyboards/converter/a1200/mistress1200/config.h +++ b/keyboards/converter/a1200/mistress1200/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0, B1, B3 } #define MATRIX_COL_PINS { D0, D1, C7, D6, B7, B6, B5, B4, E6, D7, C6, D4, B2, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/a1200/teensy2pp/config.h b/keyboards/converter/a1200/teensy2pp/config.h index 84a81c297c..9342bd344c 100644 --- a/keyboards/converter/a1200/teensy2pp/config.h +++ b/keyboards/converter/a1200/teensy2pp/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F2, F3, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D2, D3, D4, D5, D6, D7, E0, E1, C0, C1, C2, C3, C4, C5, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h index 33c6303036..b3f03979bc 100644 --- a/keyboards/converter/modelm101/config.h +++ b/keyboards/converter/modelm101/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0 } #define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/modelm101_teensy2/config.h b/keyboards/converter/modelm101_teensy2/config.h index eb443856cd..99eae26e01 100644 --- a/keyboards/converter/modelm101_teensy2/config.h +++ b/keyboards/converter/modelm101_teensy2/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, C6, C7, D5, D4 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, B0, B1, B2, B3, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/modelm_ssk/config.h b/keyboards/converter/modelm_ssk/config.h index ff7aa12000..aed3761091 100644 --- a/keyboards/converter/modelm_ssk/config.h +++ b/keyboards/converter/modelm_ssk/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D5, D4, D3, D2, D1 } #define MATRIX_ROW_PINS { F0, F1, F2, F3, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_IIe/config.h index be21814f80..27ad0610b5 100644 --- a/keyboards/converter/numeric_keypad_IIe/config.h +++ b/keyboards/converter/numeric_keypad_IIe/config.h @@ -94,7 +94,6 @@ http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_conn #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { B0, B2, D2, D3 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define SOFT_SERIAL_PIN D0 #define DEBOUNCE 5 diff --git a/keyboards/cool836a/config.h b/keyboards/cool836a/config.h index 1b4f3b8916..d2f134c778 100644 --- a/keyboards/cool836a/config.h +++ b/keyboards/cool836a/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, B5, B4, F4, B1, B6 } #define MATRIX_COL_PINS { F5, D0, B2, C6, D7, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/copenhagen_click/click_pad_v1/config.h b/keyboards/copenhagen_click/click_pad_v1/config.h index 07e498856a..88c1393fac 100755 --- a/keyboards/copenhagen_click/click_pad_v1/config.h +++ b/keyboards/copenhagen_click/click_pad_v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7 } #define MATRIX_COL_PINS { F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h index 9fe37c68a4..a93d34f4fb 100644 --- a/keyboards/coseyfannitutti/discipad/config.h +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { B1, B0, D7, D6, D4 } #define MATRIX_COL_PINS { C0, C1, C2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h index 7d9c73f480..258efdb965 100644 --- a/keyboards/coseyfannitutti/discipline/config.h +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B2, A1, B1, A0, B0 } #define MATRIX_COL_PINS { A2, B3, A3, B4, A4, D5, D6, C6, C5, C4, C3, C2, C1, C0, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h index 1b9c4c4fac..86294fa7c2 100644 --- a/keyboards/coseyfannitutti/mullet/config.h +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 } #define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h index 3d5badf883..daa0cb91dc 100644 --- a/keyboards/coseyfannitutti/mulletpad/config.h +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 } #define MATRIX_COL_PINS { F0, C7, C6, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/mysterium/config.h b/keyboards/coseyfannitutti/mysterium/config.h index b6bb2f8510..d11a02c5f0 100644 --- a/keyboards/coseyfannitutti/mysterium/config.h +++ b/keyboards/coseyfannitutti/mysterium/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17*/ #define MATRIX_ROW_PINS { C2, C3, C7, C4, C6, C5 } #define MATRIX_COL_PINS { A0, B0, A1, B1, A2, B2, A3, B3, A4, B4, A5, A6, A7, D6, D5, D1, D0, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/coseyfannitutti/romeo/config.h b/keyboards/coseyfannitutti/romeo/config.h index d82277dc89..e70b99984e 100644 --- a/keyboards/coseyfannitutti/romeo/config.h +++ b/keyboards/coseyfannitutti/romeo/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11*/ #define MATRIX_ROW_PINS { B1, B4, B3, B2 } #define MATRIX_COL_PINS { C5, C4, C3, D0, C2, D1, C1, C0, D4, B0, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cozykeys/bloomer/v2/config.h b/keyboards/cozykeys/bloomer/v2/config.h index 49fac4d254..4cbe7025db 100644 --- a/keyboards/cozykeys/bloomer/v2/config.h +++ b/keyboards/cozykeys/bloomer/v2/config.h @@ -24,6 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { D0, D1, D3, D2, D4, B2 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B1, B4, C6, E6, B5, B6, B7, D6, C7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cozykeys/bloomer/v3/config.h b/keyboards/cozykeys/bloomer/v3/config.h index 4bb291be56..222afaf7dc 100644 --- a/keyboards/cozykeys/bloomer/v3/config.h +++ b/keyboards/cozykeys/bloomer/v3/config.h @@ -24,6 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { D0, D1, D3, D2, D4, B2 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B1, B4, C6, E6, B5, B6, B7, D6, C7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cozykeys/speedo/v2/config.h b/keyboards/cozykeys/speedo/v2/config.h index 1ab81ed7d1..52ef4bed87 100644 --- a/keyboards/cozykeys/speedo/v2/config.h +++ b/keyboards/cozykeys/speedo/v2/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { D1, D2, D3, C6, C7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, D0, B7, B3, B2, B1, B0 } -#define UNUSED_PINS { D5, D4, D6, D7, B4 } #define DIODE_DIRECTION COL2ROW // Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed diff --git a/keyboards/cozykeys/speedo/v3/config.h b/keyboards/cozykeys/speedo/v3/config.h index 9928e91f98..39aa73adc8 100644 --- a/keyboards/cozykeys/speedo/v3/config.h +++ b/keyboards/cozykeys/speedo/v3/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B6, B2, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS { D2, D3, B0, B4 } #define DIODE_DIRECTION COL2ROW #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/cradio/config.h b/keyboards/cradio/config.h index 65895f8492..90a5401590 100644 --- a/keyboards/cradio/config.h +++ b/keyboards/cradio/config.h @@ -25,17 +25,6 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 5 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * NO_DIODE = switches are directly connected to AVR pins - * -*/ #define DIRECT_PINS { \ { E6, F7, F6, F5, F4 }, \ { B1, B3, B2, B6, D3 }, \ @@ -50,7 +39,6 @@ { B5, B4, NO_PIN, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -66,4 +54,3 @@ /* Top right key on right half */ #define BOOTMAGIC_LITE_ROW_RIGHT 4 #define BOOTMAGIC_LITE_COLUMN_RIGHT 4 - diff --git a/keyboards/cradio/readme.md b/keyboards/cradio/readme.md index 7f3cef0969..df23e72bea 100644 --- a/keyboards/cradio/readme.md +++ b/keyboards/cradio/readme.md @@ -18,6 +18,12 @@ Make example for this keyboard (after setting up your build environment): make cradio:default +### RP2040 Controllers + +Pro Micro RP2040 controllers are supported with [QMK Converters](https://docs.qmk.fm/#/feature_converters). The make command example for Adafruit's KB2040 are: + + make CONVERT_TO=kb2040 cradio:default + 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). ## Bootloader diff --git a/keyboards/craftwalk/config.h b/keyboards/craftwalk/config.h index 8bb7623376..ce953b43fe 100644 --- a/keyboards/craftwalk/config.h +++ b/keyboards/craftwalk/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, B3, B5 } #define MATRIX_COL_PINS { B1, F7, F5, F4, B2, E6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crawlpad/config.h b/keyboards/crawlpad/config.h index dd8b7dde07..06939422b0 100755 --- a/keyboards/crawlpad/config.h +++ b/keyboards/crawlpad/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, F4, F5 } #define MATRIX_COL_PINS { D4, D5, D6, D7 } -#define UNUSED_PINS /* Pins for custom per-row LEDs. Should be changed to use named pins. */ #define LED_ROW_PINS { 8, 9, 10, 11 } diff --git a/keyboards/crazy_keyboard_68/config.h b/keyboards/crazy_keyboard_68/config.h index e6c7b4c9ef..d1fa1bb5d2 100644 --- a/keyboards/crazy_keyboard_68/config.h +++ b/keyboards/crazy_keyboard_68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crbn/config.h b/keyboards/crbn/config.h index d2ff5b1fea..47f8ca93a6 100644 --- a/keyboards/crbn/config.h +++ b/keyboards/crbn/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B1, F7, F6 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/creatkeebs/glacier/config.h b/keyboards/creatkeebs/glacier/config.h index 2da93150f6..0af5d6f6b7 100644 --- a/keyboards/creatkeebs/glacier/config.h +++ b/keyboards/creatkeebs/glacier/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, F4, E6, F5, D0 } #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, F6, B0, B6, C6, C7, B1, B2, B3, B7, D3, D2, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/creatkeebs/thera/config.h b/keyboards/creatkeebs/thera/config.h index 863897acbf..68494a1cd6 100644 --- a/keyboards/creatkeebs/thera/config.h +++ b/keyboards/creatkeebs/thera/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B2, B1, B0, E6, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crimsonkeyboards/resume1800/config.h b/keyboards/crimsonkeyboards/resume1800/config.h index 3e8304935b..d1b0903ce6 100644 --- a/keyboards/crimsonkeyboards/resume1800/config.h +++ b/keyboards/crimsonkeyboards/resume1800/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A5, A0, A1, B1, B2, B0 } #define MATRIX_COL_PINS { A2, B3, A3, B4, A4, D1, D5, D6, A6, A7, C7, C6, C5, C4, D7, C3, C2, C1, C0, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crkbd/keymaps/davidrambo/config.h b/keyboards/crkbd/keymaps/davidrambo/config.h index bf96f265f4..df5e0611e1 100644 --- a/keyboards/crkbd/keymaps/davidrambo/config.h +++ b/keyboards/crkbd/keymaps/davidrambo/config.h @@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SPLIT -//#define SSD1306OLED - #define TAPPING_TERM 200 #define PERMISSIVE_HOLD diff --git a/keyboards/crkbd/keymaps/davidrambo/keymap.c b/keyboards/crkbd/keymaps/davidrambo/keymap.c index 6e97795220..98ab35bf75 100644 --- a/keyboards/crkbd/keymaps/davidrambo/keymap.c +++ b/keyboards/crkbd/keymaps/davidrambo/keymap.c @@ -16,9 +16,6 @@ #include QMK_KEYBOARD_H -//extern uint8_t is_master; - - enum custom_layers { _COLEMAK, _SYMBOL, diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index a506295749..c00bee6da6 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -263,9 +263,6 @@ bool led_update_user(led_t led_state) { } */ - - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { @@ -319,27 +316,15 @@ void oled_render_layer_state(void) { oled_write_ln_P(PSTR("Layer: Layer Switch"),false); break; default: +#if defined (LAYER_STATE_32BIT) snprintf(string, sizeof(string), "%ld",layer_state); +#else + snprintf(string, sizeof(string), "%d",layer_state); +#endif oled_write_P(PSTR("Layer: Undef-"),false); oled_write_ln(string, false); } - } - -/* -void matrix_render_user(struct CharacterMatrix *matrix) { - if (has_usb()) { - // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - //matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); - } else { - matrix_write(matrix, read_logo()); - } } -*/ char keylog_str[24] = {}; const char code_to_name[60] = { @@ -393,7 +378,7 @@ void oled_render_logo(void) { } bool oled_task_user(void) { - if (is_master) { + if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 6ef428a11f..ab84e5c580 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -84,7 +84,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { const char *read_logo(void); bool oled_task_user(void){ - switch (biton32(layer_state)){ + switch (get_highest_layer(layer_state)){ case _DVORAK: oled_write_ln_P(PSTR("DVRK"), false); break; diff --git a/keyboards/crkbd/keymaps/edvorakjp/keymap.c b/keyboards/crkbd/keymaps/edvorakjp/keymap.c index 5e56da61a9..f3b801da68 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/keymap.c +++ b/keyboards/crkbd/keymaps/edvorakjp/keymap.c @@ -54,9 +54,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case L_EDVORAKJP_LOWER: rgblight_sethsv_noeeprom_red(); break; diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index e5ff029565..cd75f8e277 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -9,7 +9,7 @@ void render_layer_state(void) { char layer_name[17]; oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case L_EDVORAKJP_BASE: oled_write_ln_P(PSTR("Default"), false); break; diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index 45fe8c37a8..2a35f60dad 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -3,9 +3,6 @@ #define EE_HANDS #define SPLIT_USB_DETECT -#undef USE_I2C -#undef SSD1306OLED - #define USE_SERIAL_PD2 #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c index 6bf1233659..c4ac5e736c 100644 --- a/keyboards/crkbd/keymaps/gotham/oled.c +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -1,7 +1,5 @@ #pragma once -extern uint8_t is_master; - #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) # include "rgb.c" #endif diff --git a/keyboards/crkbd/keymaps/hvp/config.h b/keyboards/crkbd/keymaps/hvp/config.h index f32ec8cfbe..106e7535e3 100644 --- a/keyboards/crkbd/keymaps/hvp/config.h +++ b/keyboards/crkbd/keymaps/hvp/config.h @@ -28,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - - #define USE_SERIAL_PD2 //#define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c index 9e72504653..c3d25cd99c 100644 --- a/keyboards/crkbd/keymaps/hvp/keymap.c +++ b/keyboards/crkbd/keymaps/hvp/keymap.c @@ -91,14 +91,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -112,42 +107,26 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here - matrix_write(matrix, read_layer_state()); - matrix_write(matrix, read_keylog()); - //matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); + oled_write(read_layer_state(), false); + oled_write(read_keylog(), false); + //oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state()), false; + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; + oled_write(read_logo(), false); } + return false; } -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/crkbd/keymaps/hvp/rules.mk b/keyboards/crkbd/keymaps/hvp/rules.mk index 640a07b305..c7ed029e3d 100644 --- a/keyboards/crkbd/keymaps/hvp/rules.mk +++ b/keyboards/crkbd/keymaps/hvp/rules.mk @@ -1,10 +1,5 @@ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c - # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ @@ -14,4 +9,6 @@ SRC += ./lib/glcdfont.c \ TAP_DANCE_ENABLE = yes EXTRAKEY_ENABLE = yes # Audio control and System control +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # LOCAL_GLCDFONT = yes diff --git a/keyboards/crkbd/keymaps/jarred/config.h b/keyboards/crkbd/keymaps/jarred/config.h index 012356241d..e5c2029a52 100644 --- a/keyboards/crkbd/keymaps/jarred/config.h +++ b/keyboards/crkbd/keymaps/jarred/config.h @@ -28,9 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - #define USE_SERIAL_PD2 //#define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/jarred/keymap.c b/keyboards/crkbd/keymaps/jarred/keymap.c index b938636c2a..b0e181b37f 100644 --- a/keyboards/crkbd/keymaps/jarred/keymap.c +++ b/keyboards/crkbd/keymaps/jarred/keymap.c @@ -5,10 +5,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -65,15 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void matrix_init_user(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(); // turns on the display - #endif -} - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // When add source files to SRC in rules.mk, you can use functions. const char *read_logo(void); @@ -84,7 +72,7 @@ const char *read_keylogs(void); char matrix_line_str[24]; const char *read_layer_state(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); strcpy(matrix_line_str, "Layer: "); @@ -142,37 +130,18 @@ const char *read_usb_state(void) { return matrix_line_str; } -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { if (is_keyboard_master()) { - matrix_write(matrix, read_layer_state()); - matrix_write(matrix, "\n"); - matrix_write(matrix, read_usb_state()); - matrix_write(matrix, "\n"); - matrix_write(matrix, read_keylogs()); - matrix_write(matrix, "\n"); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_usb_state(), false); + oled_write_ln(read_keylogs(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk index c5a73d5bd6..f18100d7ff 100644 --- a/keyboards/crkbd/keymaps/jarred/rules.mk +++ b/keyboards/crkbd/keymaps/jarred/rules.mk @@ -16,19 +16,17 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ #./lib/layer_state_reader.c \ # ./lib/mode_icon_reader.c \ # ./lib/host_led_state_reader.c \ # ./lib/timelogger.c \ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index e44ae520f4..2801436709 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -29,9 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 219db22433..6a1e2e0cde 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -182,13 +182,13 @@ bool oled_task_user(void) { master_oled_cleared = true; } render_logo(); - return; + return false; } // Drashna style timeout for LED and OLED Roughly 8mins else if (timer_elapsed32(oled_timer) > 480000) { oled_off(); rgb_matrix_disable_noeeprom(); - return; + return false; } else { oled_on(); diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk index 5566a6130b..d2c2f649e0 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/rules.mk +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -11,6 +11,3 @@ OLED_DRIVER = SSD1306 # If you want to change the display of OLED, you need to change here SRC += logo_reader.c \ layer.c - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/keymaps/madhatter/config.h b/keyboards/crkbd/keymaps/madhatter/config.h index bcf4e05005..6cbe5befb8 100644 --- a/keyboards/crkbd/keymaps/madhatter/config.h +++ b/keyboards/crkbd/keymaps/madhatter/config.h @@ -28,9 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/madhatter/keymap.c b/keyboards/crkbd/keymaps/madhatter/keymap.c index c228a7b573..f833428a02 100644 --- a/keyboards/crkbd/keymaps/madhatter/keymap.c +++ b/keyboards/crkbd/keymaps/madhatter/keymap.c @@ -17,10 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H -#ifdef SSD1306OLED -# include "ssd1306.h" -# include <string.h> -#endif +#include <string.h> enum corny_layers { _QWERTY, @@ -108,14 +105,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_get_mode(); #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -129,42 +121,26 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here - matrix_write(matrix, read_layer_state()); - matrix_write(matrix, read_keylog()); - //matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); + oled_write(read_layer_state(), false); + oled_write(read_keylog(), false); + //oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/crkbd/keymaps/madhatter/rules.mk b/keyboards/crkbd/keymaps/madhatter/rules.mk index 489b16ef1c..89a2791bcd 100644 --- a/keyboards/crkbd/keymaps/madhatter/rules.mk +++ b/keyboards/crkbd/keymaps/madhatter/rules.mk @@ -1,13 +1,11 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ # ./lib/mode_icon_reader.c \ # ./lib/host_led_state_reader.c \ # ./lib/timelogger.c \ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c index bea80d2fd6..e29fda6deb 100644 --- a/keyboards/crkbd/keymaps/ninjonas/keymap.c +++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "ninjonas.h" -uint8_t is_master; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper( //,----------------------------------------------------. ,----------------------------------------------------. diff --git a/keyboards/crkbd/keymaps/oled_sample/config.h b/keyboards/crkbd/keymaps/oled_sample/config.h index 41568c5916..450653e46c 100644 --- a/keyboards/crkbd/keymaps/oled_sample/config.h +++ b/keyboards/crkbd/keymaps/oled_sample/config.h @@ -21,10 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once //#define USE_MATRIX_I2C -#ifdef KEYBOARD_crkbd_rev1_common -# undef USE_I2C -# define USE_SERIAL -#endif /* Select hand configuration */ diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 3300684d63..994aef314e 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -26,11 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define EE_HANDS #ifdef OLED_ENABLE -# undef SSD1306OLED # define OLED_TIMEOUT 600000 #endif -#undef USE_I2C #define USE_SERIAL_PD2 // #define FORCE_NKRO diff --git a/keyboards/crkbd/keymaps/rs/config.h b/keyboards/crkbd/keymaps/rs/config.h index a2d5092dee..60f33e7585 100644 --- a/keyboards/crkbd/keymaps/rs/config.h +++ b/keyboards/crkbd/keymaps/rs/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -// #define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/rs/oled.c b/keyboards/crkbd/keymaps/rs/oled.c index bd8ae7d299..a4c71daac2 100644 --- a/keyboards/crkbd/keymaps/rs/oled.c +++ b/keyboards/crkbd/keymaps/rs/oled.c @@ -1,13 +1,10 @@ -#ifdef SSD1306OLED +#ifdef OLED_ENABLE #include QMK_KEYBOARD_H -#include "ssd1306.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -extern uint8_t is_master; - // When add source files to SRC in rules.mk, you can use functions. const char *read_logo(void); const char *read_keylog(void); @@ -47,7 +44,6 @@ void update_keymap_status(void) { #endif void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display update_keymap_status(); } @@ -74,31 +70,18 @@ layer_state_t layer_state_set_user(layer_state_t state) { } static inline void render_keymap_status(struct CharacterMatrix *matrix) { - matrix_write(matrix, layer_status_buf); + oled_write(layer_status_buf); } -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +bool oled_task_user(void) { + if (is_keyboard_master()) { render_keymap_status(matrix); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; + oled_write(read_logo(), false); } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); + return false; } #endif diff --git a/keyboards/crkbd/keymaps/rs/rules.mk b/keyboards/crkbd/keymaps/rs/rules.mk index c754ebdcbc..5a76c38f38 100644 --- a/keyboards/crkbd/keymaps/rs/rules.mk +++ b/keyboards/crkbd/keymaps/rs/rules.mk @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here SRC += oled.c \ - ./lib/glcdfont.c \ ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 3a31f8613f..2d2b394369 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -28,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -// #define SSD1306OLED -#undef USE_I2C -#undef SSD1306OLED - #define USE_SERIAL_PD2 // #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/config.h b/keyboards/crkbd/keymaps/thumb_ctrl/config.h index 4aee2aed14..10b89aede5 100755 --- a/keyboards/crkbd/keymaps/thumb_ctrl/config.h +++ b/keyboards/crkbd/keymaps/thumb_ctrl/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -// #define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c index cbd7a46890..a4b4f67fb4 100755 --- a/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c +++ b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c @@ -4,9 +4,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif extern keymap_config_t keymap_config; @@ -129,14 +126,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -150,42 +142,26 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +bool oled_task_user(void) { + if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk index e1d691834d..193aa14dac 100755 --- a/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk +++ b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk @@ -16,19 +16,17 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ # ./lib/mode_icon_reader.c \ # ./lib/host_led_state_reader.c \ # ./lib/timelogger.c \ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index 735caadaee..36afd9b469 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -7,8 +7,6 @@ #define SPLIT_USB_DETECT // #define RGB_LAYER_ENABLE -#undef USE_I2C -#undef SSD1306OLED #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index f3cf5cb2f6..77229a3603 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (!is_master) { + if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } return rotation; @@ -165,7 +165,7 @@ void oled_render_logo(void) { } bool oled_task_user(void) { - if (is_master) { + if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { diff --git a/keyboards/crkbd/keymaps/vayashiko/rules.mk b/keyboards/crkbd/keymaps/vayashiko/rules.mk index b8ba838422..c29927421d 100644 --- a/keyboards/crkbd/keymaps/vayashiko/rules.mk +++ b/keyboards/crkbd/keymaps/vayashiko/rules.mk @@ -21,8 +21,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h index d1c3855402..94494bafd8 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h @@ -5,9 +5,6 @@ #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c index 7940e28025..eb30873f5b 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c @@ -4,9 +4,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -122,14 +119,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -138,42 +130,23 @@ void set_keylog(uint16_t keycode, keyrecord_t *record); const char *read_keylog(void); const char *read_keylogs(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here - matrix_write(matrix, read_layer_state()); - matrix_write(matrix, "\n"); - matrix_write(matrix, read_keylog()); - matrix_write(matrix, "\n"); - matrix_write(matrix, read_keylogs()); - matrix_write(matrix, "\n"); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif } diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk b/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk index 44ff63ada1..ed4d34a70b 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk @@ -1,14 +1,12 @@ # Build Options RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 BOOTLOADER = atmel-dfu # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/keymaps/vxid/config.h b/keyboards/crkbd/keymaps/vxid/config.h index d9c0cbccf4..7a4596f3b2 100644 --- a/keyboards/crkbd/keymaps/vxid/config.h +++ b/keyboards/crkbd/keymaps/vxid/config.h @@ -28,9 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define USE_SSD_I2C - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/crkbd/keymaps/vxid/rules.mk b/keyboards/crkbd/keymaps/vxid/rules.mk index cb104fb344..432e219476 100644 --- a/keyboards/crkbd/keymaps/vxid/rules.mk +++ b/keyboards/crkbd/keymaps/vxid/rules.mk @@ -16,19 +16,17 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ # ./lib/mode_icon_reader.c \ # ./lib/host_led_state_reader.c \ # ./lib/timelogger.c \ - -VPATH += keyboards/crkbd/lib -LIB_SRC += ssd1306.c i2c.c diff --git a/keyboards/crkbd/lib/i2c.c b/keyboards/crkbd/lib/i2c.c deleted file mode 100644 index 7b82e838c2..0000000000 --- a/keyboards/crkbd/lib/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -#if defined(USE_SSD_I2C) - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} -#endif diff --git a/keyboards/crkbd/lib/i2c.h b/keyboards/crkbd/lib/i2c.h deleted file mode 100644 index 710662c7ab..0000000000 --- a/keyboards/crkbd/lib/i2c.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/crkbd/lib/layer_state_reader.c b/keyboards/crkbd/lib/layer_state_reader.c index 63d80b136c..601fd71958 100644 --- a/keyboards/crkbd/lib/layer_state_reader.c +++ b/keyboards/crkbd/lib/layer_state_reader.c @@ -29,7 +29,11 @@ const char *read_layer_state(void) { snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); break; default: +#if defined (LAYER_STATE_32BIT) snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); +#else + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%d", layer_state); +#endif } return layer_state_str; diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 4f373d53da..2e91f24848 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -18,6 +18,7 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes # if firmware size over limit, try this option # LTO_ENABLE = yes diff --git a/keyboards/custommk/genesis/rev1/config.h b/keyboards/custommk/genesis/rev1/config.h index 7bd527449b..9eaa4ddd76 100644 --- a/keyboards/custommk/genesis/rev1/config.h +++ b/keyboards/custommk/genesis/rev1/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, C7, C6, B6, B5 } #define MATRIX_COL_PINS { F4, F5, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/custommk/genesis/rev2/config.h b/keyboards/custommk/genesis/rev2/config.h index a8f6ae8644..0f4eb64efe 100644 --- a/keyboards/custommk/genesis/rev2/config.h +++ b/keyboards/custommk/genesis/rev2/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, C7, C6, B6, B5, B0} #define MATRIX_COL_PINS { F4, F5, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/borsdorf/config.h b/keyboards/cutie_club/borsdorf/config.h index 9c12a349e3..6d77293aea 100644 --- a/keyboards/cutie_club/borsdorf/config.h +++ b/keyboards/cutie_club/borsdorf/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A15, A14, B12, B5, B4 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/giant_macro_pad/config.h b/keyboards/cutie_club/giant_macro_pad/config.h index c6b63dfa9c..7d306a44c8 100755 --- a/keyboards/cutie_club/giant_macro_pad/config.h +++ b/keyboards/cutie_club/giant_macro_pad/config.h @@ -27,7 +27,6 @@ */ #define MATRIX_ROW_PINS { C10, C11, C12, D2, B3, B4, B5, B6, B7, B8, A3, B2, B1, B0, C5, C4, A7, A6, A5, A4 } #define MATRIX_COL_PINS { C9, C8, C7, C6, B15, B14, B13, B12, A8, A15, B9, A2, A1, A0, C3, C2, C1, C0, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/keebcats/denis/config.h b/keyboards/cutie_club/keebcats/denis/config.h index 32b93e1eaa..ada603ab48 100644 --- a/keyboards/cutie_club/keebcats/denis/config.h +++ b/keyboards/cutie_club/keebcats/denis/config.h @@ -27,7 +27,6 @@ */ #define MATRIX_ROW_PINS { B2, D0, F5, F4, F1 } #define MATRIX_COL_PINS { E6, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } -#define UNUSED_PINS { B0, B1, B7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/keebcats/dougal/config.h b/keyboards/cutie_club/keebcats/dougal/config.h index 616b7818f1..e59732a56b 100644 --- a/keyboards/cutie_club/keebcats/dougal/config.h +++ b/keyboards/cutie_club/keebcats/dougal/config.h @@ -27,7 +27,6 @@ */ #define MATRIX_ROW_PINS { B2, D0, F5, F4, F1 } #define MATRIX_COL_PINS { E6, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, B7 } -#define UNUSED_PINS { B0, B1, B3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/novus/config.h b/keyboards/cutie_club/novus/config.h index 8fa4014ca3..6c601e729e 100644 --- a/keyboards/cutie_club/novus/config.h +++ b/keyboards/cutie_club/novus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B6, C6, C7, B2, B3, D0, D1, D2, D3, D7, B4, B5, D5, D4, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h index f354efe72e..b020db7b93 100644 --- a/keyboards/cutie_club/wraith/config.h +++ b/keyboards/cutie_club/wraith/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B7 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cx60/config.h b/keyboards/cx60/config.h index a80c1398d8..c396ff8b93 100644 --- a/keyboards/cx60/config.h +++ b/keyboards/cx60/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F1, F4, F5, F6, E6 } #define MATRIX_COL_PINS { C7, C6, F7, F0, B4, D7, D6, B0, B1, B2, B3, D2, D3, D5 } -#define UNUSED_PINS /* Backlight Setup */ #define BACKLIGHT_PIN B7 diff --git a/keyboards/dailycraft/bat43/config.h b/keyboards/dailycraft/bat43/config.h index 4c42f6a06d..d3833931a4 100644 --- a/keyboards/dailycraft/bat43/config.h +++ b/keyboards/dailycraft/bat43/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, D7, C6, D4, F7, F6, F5, F4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, B5, B4 } -// #define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/claw44/rev1/config.h b/keyboards/dailycraft/claw44/rev1/config.h index bcfcbababa..6256f3db9c 100644 --- a/keyboards/dailycraft/claw44/rev1/config.h +++ b/keyboards/dailycraft/claw44/rev1/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/dailycraft/owl8/config.h b/keyboards/dailycraft/owl8/config.h index 3704497521..4bae3460d0 100644 --- a/keyboards/dailycraft/owl8/config.h +++ b/keyboards/dailycraft/owl8/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { F4, F7, B3, B6, F5, F6, B1, B2, D4, C6, D7, E6, NO_PIN, NO_PIN, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/sandbox/rev1/config.h b/keyboards/dailycraft/sandbox/rev1/config.h index 2bd405d2aa..332aa6cdc1 100644 --- a/keyboards/dailycraft/sandbox/rev1/config.h +++ b/keyboards/dailycraft/sandbox/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/sandbox/rev2/config.h b/keyboards/dailycraft/sandbox/rev2/config.h index 06905afe47..f24c8ef740 100644 --- a/keyboards/dailycraft/sandbox/rev2/config.h +++ b/keyboards/dailycraft/sandbox/rev2/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/stickey4/config.h b/keyboards/dailycraft/stickey4/config.h index d9bd0f3301..ad7bd295bb 100644 --- a/keyboards/dailycraft/stickey4/config.h +++ b/keyboards/dailycraft/stickey4/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { D4, C6, D7, E6, NO_PIN, NO_PIN, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/wings42/rev1/config.h b/keyboards/dailycraft/wings42/rev1/config.h index 0d53ff7634..992729e3af 100644 --- a/keyboards/dailycraft/wings42/rev1/config.h +++ b/keyboards/dailycraft/wings42/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/wings42/rev1_extkeys/config.h b/keyboards/dailycraft/wings42/rev1_extkeys/config.h index b2fe3210b6..2f32c483fe 100644 --- a/keyboards/dailycraft/wings42/rev1_extkeys/config.h +++ b/keyboards/dailycraft/wings42/rev1_extkeys/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B2, B4 } #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4, B6, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dailycraft/wings42/rev2/config.h b/keyboards/dailycraft/wings42/rev2/config.h index f1e7716bb4..3314ac118b 100644 --- a/keyboards/dailycraft/wings42/rev2/config.h +++ b/keyboards/dailycraft/wings42/rev2/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, NO_PIN } #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/daji/seis_cinco/config.h b/keyboards/daji/seis_cinco/config.h index 0472a84805..a4824a6e73 100644 --- a/keyboards/daji/seis_cinco/config.h +++ b/keyboards/daji/seis_cinco/config.h @@ -28,7 +28,6 @@ */ #define MATRIX_ROW_PINS { B2, B10, B11, A9, A6 } #define MATRIX_COL_PINS { B1, B0, A7, B14, A8, B15, A0, C15, C14, C13, B5, B4, B3, A15, A10, A14 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/db/db63/config.h b/keyboards/db/db63/config.h index e938096a8e..2ee4fe23c1 100644 --- a/keyboards/db/db63/config.h +++ b/keyboards/db/db63/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index 0dc107bd51..1318ec77d7 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, C7, C6, B6, B4 } #define MATRIX_COL_PINS { F0, B7, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index 5ce6f43c26..ebcf4a0182 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 } #define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } -#define UNUSED_PINS #define F_SCL 350000UL diff --git a/keyboards/dc01/left/i2c.c b/keyboards/dc01/left/i2c.c deleted file mode 100644 index c72789403e..0000000000 --- a/keyboards/dc01/left/i2c.c +++ /dev/null @@ -1,159 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} diff --git a/keyboards/dc01/left/i2c.h b/keyboards/dc01/left/i2c.h deleted file mode 100644 index 0d93e4ecaa..0000000000 --- a/keyboards/dc01/left/i2c.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index 969d97e268..d3133b3732 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, E6, D6, D7, B4 } #define MATRIX_COL_PINS { F0, B7, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index e4dcfd549d..4fc84508e0 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS { F1, E6, F6, F5, F4, D4, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/flatbread60/config.h b/keyboards/delikeeb/flatbread60/config.h index 055eec6af5..772ed61faf 100644 --- a/keyboards/delikeeb/flatbread60/config.h +++ b/keyboards/delikeeb/flatbread60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, B1, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/vaguettelite/config.h b/keyboards/delikeeb/vaguettelite/config.h index c57dd2187a..ba956b1798 100644 --- a/keyboards/delikeeb/vaguettelite/config.h +++ b/keyboards/delikeeb/vaguettelite/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, B3, D1, D2, D3, F5 } #define MATRIX_COL_PINS { F6, F7, B1, B2, B6, B5, B4, E6, D7, C6, D0, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/vanana/rev1/config.h b/keyboards/delikeeb/vanana/rev1/config.h index 8213404eb3..8a054927b9 100644 --- a/keyboards/delikeeb/vanana/rev1/config.h +++ b/keyboards/delikeeb/vanana/rev1/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D7, B4, B5, B6 } #define MATRIX_COL_PINS { B2, B3, B1, F7, F5, F6, D3, D1, D0, D4, C6, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/vanana/rev2/config.h b/keyboards/delikeeb/vanana/rev2/config.h index 8397424aa9..e6f95fa9d4 100644 --- a/keyboards/delikeeb/vanana/rev2/config.h +++ b/keyboards/delikeeb/vanana/rev2/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, C6, E6, B4, B5, F5} #define MATRIX_COL_PINS { B3, B1, F7, F6, F4, D2, D3, D0, D4, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/vaneela/config.h b/keyboards/delikeeb/vaneela/config.h index c240196291..43d8a9041b 100644 --- a/keyboards/delikeeb/vaneela/config.h +++ b/keyboards/delikeeb/vaneela/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, F7, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/vaneela/keymaps/default/keymap.c b/keyboards/delikeeb/vaneela/keymaps/default/keymap.c index b1d7401b9d..57df91cd4d 100644 --- a/keyboards/delikeeb/vaneela/keymaps/default/keymap.c +++ b/keyboards/delikeeb/vaneela/keymaps/default/keymap.c @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT_ortho_5x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,TERM_ON, TERM_OFF, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/delikeeb/vaneela/keymaps/via/keymap.c b/keyboards/delikeeb/vaneela/keymaps/via/keymap.c index 65194b84d3..4bfee3daf5 100644 --- a/keyboards/delikeeb/vaneela/keymaps/via/keymap.c +++ b/keyboards/delikeeb/vaneela/keymaps/via/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT_ortho_5x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,TERM_ON, TERM_OFF, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/delikeeb/vaneelaex/config.h b/keyboards/delikeeb/vaneelaex/config.h index 836402fcea..006c55020f 100644 --- a/keyboards/delikeeb/vaneelaex/config.h +++ b/keyboards/delikeeb/vaneelaex/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, B2, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B5, B4, E6, D7, C6, D4 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/delikeeb/waaffle/rev3/config.h b/keyboards/delikeeb/waaffle/rev3/config.h index 12ff241f4c..6b8604e289 100644 --- a/keyboards/delikeeb/waaffle/rev3/config.h +++ b/keyboards/delikeeb/waaffle/rev3/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, B6, B2, B3, B1, F5, F6, F7 } #define MATRIX_COL_PINS { D3, D2, B5, B4, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/deltapad/config.h b/keyboards/deltapad/config.h index 78c8027a04..dffb30cf71 100644 --- a/keyboards/deltapad/config.h +++ b/keyboards/deltapad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, D1, D0 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/demiurge/config.h b/keyboards/demiurge/config.h index fcc9960845..f20f07c584 100755 --- a/keyboards/demiurge/config.h +++ b/keyboards/demiurge/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F4, F6, F7, C7 } #define MATRIX_COL_PINS { E6, F5, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B7, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index b8c7ef4274..80fc4d89bc 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -109,7 +109,7 @@ report_mouse_t currentReport = {}; bool process_record_user(uint16_t keycode, keyrecord_t *record) { //uint8_t layer; - //layer = biton32(layer_state); // get the current layer //Or don't, I didn't use it. + //layer = get_highest_layer(layer_state); // get the current layer //Or don't, I didn't use it. bool returnVal = true; //this is to determine if more key processing is needed. //custom layer handling for tri_layer, @@ -437,7 +437,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; void matrix_scan_user(void) { - //uint8_t layer = biton32(layer_state); + //uint8_t layer = get_highest_layer(layer_state); for (uint8_t i = 0; i<LONGPRESS_COUNT; i++){ if ((timer_elapsed(special_timers[i]) >= CUSTOM_LONGPRESS) && (!special_key_states[i]) && special_key_pressed[i]){ switch (i + SAFE_RANGE){ diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 9fd0a69d64..5fc549ee02 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 } #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dm9records/plaid/config.h b/keyboards/dm9records/plaid/config.h index 2ea548dd11..1875566cf6 100644 --- a/keyboards/dm9records/plaid/config.h +++ b/keyboards/dm9records/plaid/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B5, B3, D4 } #define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index f11b744066..d96c250609 100644 --- a/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -195,7 +195,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_plaid_grid( QK_BOOT,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c index 6dcabb160e..e617d0dd5f 100644 --- a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c @@ -129,7 +129,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_laye // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _LOWER: diff --git a/keyboards/dm9records/tartan/config.h b/keyboards/dm9records/tartan/config.h index 0f608d2e33..a64d584d8e 100644 --- a/keyboards/dm9records/tartan/config.h +++ b/keyboards/dm9records/tartan/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B5, B3, B0, C0 } #define MATRIX_COL_PINS { D7, D6, D5, D4, B1, B2, C1, C2, C3, C5, D1, D0, C4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dmqdesign/spin/config.h b/keyboards/dmqdesign/spin/config.h index 8253c6030f..72efc0f556 100644 --- a/keyboards/dmqdesign/spin/config.h +++ b/keyboards/dmqdesign/spin/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F0, F1, F4 } #define MATRIX_COL_PINS { F5, F6, F7, C7, C6 } -#define UNUSED_PINS { D5, D2, D1, D0, B7, B3, B2, B0, E6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 5832927baf..34a44066d4 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B2 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/doio/kb16/config.h b/keyboards/doio/kb16/config.h index 043a492006..911ba9d3d5 100644 --- a/keyboards/doio/kb16/config.h +++ b/keyboards/doio/kb16/config.h @@ -39,9 +39,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Larger keys per scan */ -#define QMK_KEYS_PER_SCAN 12 - /* Use the custom font */ #define OLED_FONT_H "lib/glcdfont.c" diff --git a/keyboards/doio/kb16/keymaps/default/keymap.c b/keyboards/doio/kb16/keymaps/default/keymap.c index 0d229c753b..df72bbe15a 100644 --- a/keyboards/doio/kb16/keymaps/default/keymap.c +++ b/keyboards/doio/kb16/keymaps/default/keymap.c @@ -133,5 +133,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_MAP_ENABLE const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [_BASE] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [_FN] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_FN1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [_FN2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; #endif diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 243020ae1f..2f922435e6 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/donutcables/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h index 4796c68c30..2d16e78457 100644 --- a/keyboards/donutcables/scrabblepad/config.h +++ b/keyboards/donutcables/scrabblepad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, F1, C7, F2, C6, F3, C5, F4, C4, F5, C3, F6, C2, F7, C1 } #define MATRIX_COL_PINS { D6, D7, E0, E1, B7, D2, D3, D4, C0, B4, B5, B6, F0, E6, E7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/doodboard/duckboard/config.h b/keyboards/doodboard/duckboard/config.h index f0a7a54c28..853d997094 100644 --- a/keyboards/doodboard/duckboard/config.h +++ b/keyboards/doodboard/duckboard/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS #define ENCODERS_PAD_A { F5 } #define ENCODERS_PAD_B { F6 } diff --git a/keyboards/doodboard/duckboard_r2/config.h b/keyboards/doodboard/duckboard_r2/config.h index b431f471b6..23b255b7d9 100644 --- a/keyboards/doodboard/duckboard_r2/config.h +++ b/keyboards/doodboard/duckboard_r2/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS #define ENCODERS_PAD_A { F6 } #define ENCODERS_PAD_B { F5 } diff --git a/keyboards/doppelganger/config.h b/keyboards/doppelganger/config.h index a72fa76d1c..5570cdf9bb 100644 --- a/keyboards/doppelganger/config.h +++ b/keyboards/doppelganger/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E6, F1, C7, F7, F6 } #define MATRIX_COL_PINS { F4, F0, B7, B3, B2, B1, D5, D3, D2 } -#define UNUSED_PINS #define MATRIX_ROW_PINS_RIGHT { D7, D6, D4, E6, B5 } #define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, F7, C7, C6, B6 } diff --git a/keyboards/doppelganger/doppelganger.c b/keyboards/doppelganger/doppelganger.c index 04d19480da..304d764028 100644 --- a/keyboards/doppelganger/doppelganger.c +++ b/keyboards/doppelganger/doppelganger.c @@ -15,25 +15,31 @@ */ #include "doppelganger.h" -void keyboard_pre_init_kb (void) { - setPinOutput(C6); - setPinOutput(B0); +void keyboard_pre_init_kb(void) { + setPinOutput(C6); + setPinOutput(B0); } bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(C6, !led_state.caps_lock); - } - return res; + bool res = led_update_user(led_state); + if (res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(C6, !led_state.caps_lock); + } + return res; } __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - writePin(B0, !(state & (1UL << 1))); - return state; + writePin(B0, !(state & (1UL << 1))); + return state; +} + +// Override core logic as we reuse SPLIT_HAND_PIN within matrix pins +bool is_keyboard_left(void) { + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); } diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h index 6a1710da87..dfd0cde6d8 100644 --- a/keyboards/doro67/rgb/config.h +++ b/keyboards/doro67/rgb/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index ff7eb6f6d4..ad7fee9009 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -20,7 +20,6 @@ /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index 5c42a927e6..c4a3f82117 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -57,7 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODER_RESOLUTIONS { 4, 4 } #define ENCODER_RESOLUTIONS_RIGHT { 4, 1 } -#define UNUSED_PINS #define EE_HANDS diff --git a/keyboards/draytronics/daisy/config.h b/keyboards/draytronics/daisy/config.h index 2c51c2862a..3e0895cff3 100644 --- a/keyboards/draytronics/daisy/config.h +++ b/keyboards/draytronics/daisy/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, C0, C1} #define MATRIX_COL_PINS { C2, C3, C4, C5 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B1, D0 } #define ENCODERS_PAD_B { B2, D1 } diff --git a/keyboards/draytronics/elise/config.h b/keyboards/draytronics/elise/config.h index 0f8b307f6d..309b68039f 100644 --- a/keyboards/draytronics/elise/config.h +++ b/keyboards/draytronics/elise/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2,B3, B1, F0, F1} #define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3, D5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/draytronics/elise_v2/config.h b/keyboards/draytronics/elise_v2/config.h index cd971248a7..d4e4e2dc28 100644 --- a/keyboards/draytronics/elise_v2/config.h +++ b/keyboards/draytronics/elise_v2/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2,B3, B1, F0, F1} #define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3, D5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/draytronics/scarlet/config.h b/keyboards/draytronics/scarlet/config.h index fbfcbf33ff..4d55960783 100644 --- a/keyboards/draytronics/scarlet/config.h +++ b/keyboards/draytronics/scarlet/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } #define MATRIX_COL_PINS { A5, A6, A7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/drewkeys/iskar/config.h b/keyboards/drewkeys/iskar/config.h index aa5485f05b..3f5504ba5a 100644 --- a/keyboards/drewkeys/iskar/config.h +++ b/keyboards/drewkeys/iskar/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #define MATRIX_ROW_PINS { D6, D7, B4, B5, D4 } #define MATRIX_COL_PINS { B6, C6, C7, F6, F5, F4, F7, F1, F0, E6, B7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/drhigsby/bkf/config.h b/keyboards/drhigsby/bkf/config.h index 4803db9fb6..b5b1914f4e 100644 --- a/keyboards/drhigsby/bkf/config.h +++ b/keyboards/drhigsby/bkf/config.h @@ -35,7 +35,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, F7, B1, B3 } #define MATRIX_COL_PINS { B6, B2, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Define encoder pads */ #define ENCODERS_PAD_A { F4 } diff --git a/keyboards/drhigsby/dubba175/config.h b/keyboards/drhigsby/dubba175/config.h index 27ecd3b5ae..c1e15170dc 100644 --- a/keyboards/drhigsby/dubba175/config.h +++ b/keyboards/drhigsby/dubba175/config.h @@ -35,7 +35,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B3, B2, B5 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/drhigsby/ogurec/config.h b/keyboards/drhigsby/ogurec/config.h index 05ef0cdf6c..a6e01fdb78 100644 --- a/keyboards/drhigsby/ogurec/config.h +++ b/keyboards/drhigsby/ogurec/config.h @@ -35,7 +35,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, B6, B2 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, F4, F5 } -#define UNUSED_PINS { F7, B1, B3 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/drhigsby/packrat/config.h b/keyboards/drhigsby/packrat/config.h index 0b05e6a86a..b55f36c222 100644 --- a/keyboards/drhigsby/packrat/config.h +++ b/keyboards/drhigsby/packrat/config.h @@ -35,7 +35,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F7, B1, B6, B2 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B3 } -#define UNUSED_PINS { F6 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dtisaac/cg108/config.h b/keyboards/dtisaac/cg108/config.h index ec4dce5f54..211b60b3e0 100644 --- a/keyboards/dtisaac/cg108/config.h +++ b/keyboards/dtisaac/cg108/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F1, F0, F5, F6, F7, D4, D5, D3, D2, D0 } #define MATRIX_COL_PINS { C7, C6, B4, D7, B3, B2, B0, E6, B1, D1, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dtisaac/dosa40rgb/config.h b/keyboards/dtisaac/dosa40rgb/config.h index ccb3f74867..2651a4d9b5 100644 --- a/keyboards/dtisaac/dosa40rgb/config.h +++ b/keyboards/dtisaac/dosa40rgb/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B7, D7, F1, F0 } #define MATRIX_COL_PINS { D1, D6, D3, D2, B6, C6, C7, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dtisaac/dtisaac01/config.h b/keyboards/dtisaac/dtisaac01/config.h index 71b5baa093..9b9a012ab4 100644 --- a/keyboards/dtisaac/dtisaac01/config.h +++ b/keyboards/dtisaac/dtisaac01/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, B4, D2, B2, B1, B3, D4, D6 } #define MATRIX_COL_PINS { C7, C6, D0, B5, F0, D7, B0, B7, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c b/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c index 70dc17bb13..65f128a26b 100644 --- a/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c +++ b/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c @@ -34,8 +34,8 @@ enum { //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - [TD_F1_GAME] = ACTION_TAP_DANCE_DUAL_ROLE(KC_F1, GAME), - [TD_CAPS_FN] = ACTION_TAP_DANCE_DUAL_ROLE(KC_CAPS, 5) + [TD_F1_GAME] = ACTION_TAP_DANCE_LAYER_MOVE(KC_F1, GAME), + [TD_CAPS_FN] = ACTION_TAP_DANCE_LAYER_MOVE(KC_CAPS, 5) }; enum macro_id { diff --git a/keyboards/ducky/one2mini/1861st/config.h b/keyboards/ducky/one2mini/1861st/config.h index f1fcb4faa1..39050f6102 100644 --- a/keyboards/ducky/one2mini/1861st/config.h +++ b/keyboards/ducky/one2mini/1861st/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D11, B4, B5, B6, B7 } #define MATRIX_COL_PINS { B10, B9, C13, C12, C11, C10, C9, C8, A15, A14, A13, D0, D1, D2, B8 } #define DIP_SWITCH_MATRIX_GRID { {0,14}, {1,14}, {2,14}, {3,14} } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ducky/one2sf/1967st/config.h b/keyboards/ducky/one2sf/1967st/config.h index f5d1904d8a..c5abcdac94 100644 --- a/keyboards/ducky/one2sf/1967st/config.h +++ b/keyboards/ducky/one2sf/1967st/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D11, B4, B5, B6, B7 } #define MATRIX_COL_PINS { B10, B9, C13, C12, C11, C10, C9, C8, A15, A14, A13, D0, D1, D2,B15,B8 } #define DIP_SWITCH_MATRIX_GRID { {0,14}, {1,14}, {2,14}, {3,14} } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dumbo/config.h b/keyboards/dumbo/config.h index ab99c291bd..811f3d98f6 100644 --- a/keyboards/dumbo/config.h +++ b/keyboards/dumbo/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring #define MATRIX_ROW_PINS { D4, D7, E6, B4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} -#define UNUSED_PINS #define ENCODERS_PAD_A { F4, C6 } #define ENCODERS_PAD_B { F5, B5 } diff --git a/keyboards/dumbpad/v0x/config.h b/keyboards/dumbpad/v0x/config.h index 6d503c9abe..973cb87b86 100644 --- a/keyboards/dumbpad/v0x/config.h +++ b/keyboards/dumbpad/v0x/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 5 #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Single rotary encoder */ #define ENCODERS_PAD_A { D0 } diff --git a/keyboards/dumbpad/v0x_right/config.h b/keyboards/dumbpad/v0x_right/config.h index 0380203fdf..d02d5fe8a3 100644 --- a/keyboards/dumbpad/v0x_right/config.h +++ b/keyboards/dumbpad/v0x_right/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 5 #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS /* Single rotary encoder */ #define ENCODERS_PAD_A { D4 } diff --git a/keyboards/dumbpad/v1x/config.h b/keyboards/dumbpad/v1x/config.h index 0d967a6a01..4c5b14d61c 100644 --- a/keyboards/dumbpad/v1x/config.h +++ b/keyboards/dumbpad/v1x/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 5 #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Single rotary encoder */ #define ENCODERS_PAD_A { B2 } diff --git a/keyboards/dumbpad/v1x_dualencoder/config.h b/keyboards/dumbpad/v1x_dualencoder/config.h index 13f4785d8a..29340597b3 100644 --- a/keyboards/dumbpad/v1x_dualencoder/config.h +++ b/keyboards/dumbpad/v1x_dualencoder/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 5 #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Dual rotary encoders */ #define ENCODERS_PAD_A { B2, D0 } diff --git a/keyboards/dumbpad/v1x_right/config.h b/keyboards/dumbpad/v1x_right/config.h index 23c2685dde..79f0ec1503 100644 --- a/keyboards/dumbpad/v1x_right/config.h +++ b/keyboards/dumbpad/v1x_right/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 5 #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS /* Single rotary encoder */ #define ENCODERS_PAD_A { D4 } diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 753e7c5612..64ef45437f 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index e392109119..e5ead20c12 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -17,7 +17,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c index ec3b3cc2d5..a93f0ab4ca 100644 --- a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c +++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c @@ -4,12 +4,12 @@ // thanks to atlacat, hailbreno, itsaferbie and weeheavy... // and special thanks to AGausmann and drashna for the layer-activated RGB underglow -// https://www.reddit.com/r/olkb/comments/6t1vdu/update_layeractivated_rgb_underglow/ +// https://www.reddit.com/r/olkb/comments/6t1vdu/update_layeractivated_rgb_underglow/ // https://github.com/AGausmann/qmk_firmware/blob/agausmann-v3.x/keyboards/nyquist/keymaps/agausmann/keymap.c #include QMK_KEYBOARD_H -/* +/* * Each layer gets a name for readability. * The underscores don't mean anything - you can * have a layer called STUFF or any other name. @@ -23,8 +23,8 @@ #define NL 2 // Numpad Layer #define RL 3 // RGB Layer -/* -* Let's give an easier name to the RGB modes +/* +* Let's give an easier name to the RGB modes * and assign the ones we want to the different layer * these will then be used by the function below * @@ -49,10 +49,10 @@ // #define RGB_RL_MODE rgblight_mode_noeeprom(22) //rgb mode for RL layer #define RGB_RL_LIGHT rgblight_sethsv_noeeprom_red() //rgb light for RL layer - + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - + /* Keymap BL: Base Layer (Default Layer) * * ,-----------------------------------------------------------. @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_STA, RGB_BRE, RGB_RAI, RGB_SWI, _______, _______, RGB_SNA, RGB_KNI, RGB_GRA, RGB_XMS, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(FL), _______, _______, _______, TO(BL), _______), - + }; @@ -175,25 +175,25 @@ void matrix_scan_user(void) { #ifdef RGBLIGHT_ENABLE static uint8_t old_layer = 1; - uint8_t new_layer = biton32(layer_state); + uint8_t new_layer = get_highest_layer(layer_state); if (old_layer != new_layer) { switch (new_layer) { case BL: RGB_BL_MODE; - RGB_BL_LIGHT; + RGB_BL_LIGHT; break; case FL: RGB_FL_MODE; - RGB_FL_LIGHT; + RGB_FL_LIGHT; break; case NL: - RGB_NL_MODE; - RGB_NL_LIGHT; + RGB_NL_MODE; + RGB_NL_LIGHT; break; case RL: - RGB_RL_MODE; - RGB_RL_LIGHT; + RGB_RL_MODE; + RGB_RL_LIGHT; break; } diff --git a/keyboards/dz60/keymaps/marianas/customLogic.c b/keyboards/dz60/keymaps/marianas/customLogic.c index f22bd882e9..03ba92fe92 100644 --- a/keyboards/dz60/keymaps/marianas/customLogic.c +++ b/keyboards/dz60/keymaps/marianas/customLogic.c @@ -11,7 +11,7 @@ static int16_t fnTimer = 0; layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) + switch (get_highest_layer(state)) { case QWERTY: rgblight_mode(9); diff --git a/keyboards/dz60/keymaps/xtonhasvim/keymap.c b/keyboards/dz60/keymaps/xtonhasvim/keymap.c index 9a482686d8..49bc20b576 100644 --- a/keyboards/dz60/keymaps/xtonhasvim/keymap.c +++ b/keyboards/dz60/keymaps/xtonhasvim/keymap.c @@ -73,7 +73,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { static uint32_t last_state = 0; if(last_state != state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _CMD: user_led_on(); break; @@ -85,5 +85,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { } return state; } - - diff --git a/keyboards/dztech/bocc/config.h b/keyboards/dztech/bocc/config.h index 3e68abba52..d9f0224ae8 100644 --- a/keyboards/dztech/bocc/config.h +++ b/keyboards/dztech/bocc/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, F0 } #define MATRIX_COL_PINS { B5, B6, C6, C7, F7, F6, F5, F4, F1, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/duo_s/config.h b/keyboards/dztech/duo_s/config.h index ef46b2a207..d08e1547be 100644 --- a/keyboards/dztech/duo_s/config.h +++ b/keyboards/dztech/duo_s/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { A15, B3, B4, B5, B11 } #define MATRIX_COL_PINS { B12, B13, B14, A8, B9, C13, C14, C15, A1, A2, A3, A4, A5, A6, A7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h index fc836b5ebb..e3250acef1 100644 --- a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h @@ -7,8 +7,6 @@ #define TAP_HOLD_CAPS_DELAY 0 #define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 4 - // some speed shit #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h index c2b14f5284..ca64eeb69b 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h @@ -51,8 +51,6 @@ // #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define QMK_KEYS_PER_SCAN 4 - // #define RGB_MATRIX_KEYRELEASES // some speed shit diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c index a12358c8d9..287496e17f 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c @@ -96,7 +96,7 @@ void rgb_matrix_indicators_user(void) uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _NAV: if (this_led & (1 << USB_LED_NUM_LOCK)) { rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index a7c6360568..6af35cf779 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -62,7 +62,7 @@ void rgb_matrix_indicators_user(void) uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _LAYER1: rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; @@ -78,7 +78,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _LAYER3: if (this_led & (1 << USB_LED_NUM_LOCK)) { rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); diff --git a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c index c13fcc1d35..daef7b271d 100644 --- a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c @@ -37,7 +37,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { void rgb_matrix_indicators_user(void) { if (!g_suspend_state) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _QWERTY: rgb_matrix_layer_helper(0x00, 0x0F, 0xFF); break; @@ -46,7 +46,7 @@ void rgb_matrix_indicators_user(void) } } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _FNM: rgb_matrix_set_color(0, 0x00, 0xFF, 0x00); rgb_matrix_set_color(1, 0x00, 0x00, 0x00); diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h index cfeba003bd..2fdb3e5f4c 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h @@ -46,8 +46,6 @@ // #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define QMK_KEYS_PER_SCAN 4 - // #define RGB_MATRIX_KEYRELEASES #define NO_ACTION_ONESHOT diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index 7bdad00144..86d74bf73a 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index 9426a7be99..89dc7c2b7f 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h index 7e5dfd6703..9638fab985 100644 --- a/keyboards/dztech/dz60rgb/v2_1/config.h +++ b/keyboards/dztech/dz60rgb/v2_1/config.h @@ -39,7 +39,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index ccfe91b66b..b1be1fb430 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index 865ac2ab21..89b2315ee6 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h index 64e2a40bda..f4ec86ae9d 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h @@ -39,7 +39,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 9af78167ad..ab2dca7a69 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } #define MATRIX_COL_PINS { A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index 140d74fee0..3e52252889 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h index 3ab221391e..0ddd807f88 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h @@ -39,7 +39,6 @@ */ #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz64rgb/config.h b/keyboards/dztech/dz64rgb/config.h index 5239aa7fea..11f623c1bd 100644 --- a/keyboards/dztech/dz64rgb/config.h +++ b/keyboards/dztech/dz64rgb/config.h @@ -20,7 +20,6 @@ #define MATRIX_COLS 14 #define MATRIX_ROW_PINS { F5, F4, F1, B3, B2 } #define MATRIX_COL_PINS { C7, F7, F6, F0, B0, B1, B4, D7, D6, D4, D5, D3, D2, B7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c index 8bd6069107..817c0fd2ff 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -238,5 +238,5 @@ void rgb_matrix_indicators_user(void) { } // Show Selected Layer - rgb_matrix_set_color(layers_leds_map[biton32(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); -}
\ No newline at end of file + rgb_matrix_set_color(layers_leds_map[get_highest_layer(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); +} diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c index c313f467e3..2ebbddcef7 100644 --- a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c @@ -1,20 +1,20 @@ #include QMK_KEYBOARD_H /**************** SOME GLOBALS *********************/ - + bool onMac = false; bool isLeader = false; bool isBlinking = false; bool isRecording = false; bool isPlaying = false; -const float led_dim_ratio = 0.50; -static uint16_t blink_cycle_timer, - blink_fade_in_timer, - blink_fade_out_timer, +const float led_dim_ratio = 0.50; +static uint16_t blink_cycle_timer, + blink_fade_in_timer, + blink_fade_out_timer, macro_one_play_timer, macro_two_play_timer, macro_play_blink_timer = 2000; -static uint8_t fade_in_step_counter, +static uint8_t fade_in_step_counter, fade_out_step_counter, blink_hsv_value; @@ -26,13 +26,13 @@ Function to set color with hsv arguments - "val_ratio" is used to adjust brightness ratio */ void rgb_matrix_set_color_hsv(uint8_t led, uint16_t hue, uint16_t sat, uint16_t val, float val_ratio) { - const uint8_t h = hue <= 255 ? hue : rgb_matrix_config.hsv.h; + const uint8_t h = hue <= 255 ? hue : rgb_matrix_config.hsv.h; const uint8_t s = sat <= 255 ? sat : rgb_matrix_config.hsv.s; const uint8_t v = val <= 255 ? val * val_ratio : rgb_matrix_config.hsv.v * val_ratio; HSV hsv_in = {h, s, v}; RGB rgb_out = hsv_to_rgb(hsv_in); rgb_matrix_set_color(led, rgb_out.r, rgb_out.g, rgb_out.b); -} +} void reset_blink_cycle(void) { blink_cycle_timer = timer_read(); @@ -110,31 +110,31 @@ const layers_leds_map[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT_65_ansi( - KC_GESC, 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_INS, - 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, KC_PGUP, - KC_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_GESC, 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_INS, + 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, KC_PGUP, + KC_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_MAC] = LAYOUT_65_ansi( - 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, - 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, - 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, 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, 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, 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, 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, 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_LALT, KC_LGUI, KC_TRNS, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_FN] = LAYOUT_65_ansi( - DYN_REC_STOP, 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_NO, KC_NO, - KC_TRNS, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, DYN_MACRO_PLAY2, DYN_REC_START2, - KC_TRNS, KC_BRID, KC_VOLD, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, DYN_MACRO_PLAY1, DYN_REC_START1, - KC_TRNS, TO(_MAIN), TO(_MAC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_TRNS, RGB_VAI, KC_NO, + DYN_REC_STOP, 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_NO, KC_NO, + KC_TRNS, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, DYN_MACRO_PLAY2, DYN_REC_START2, + KC_TRNS, KC_BRID, KC_VOLD, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, DYN_MACRO_PLAY1, DYN_REC_START1, + KC_TRNS, TO(_MAIN), TO(_MAC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SPD, RGB_SPI, KC_TRNS, RGB_VAI, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD ), -}; +}; //**************** MATRIX SCANS *********************// -void rgb_matrix_indicators_user(void) { +void rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE @@ -144,7 +144,7 @@ void rgb_matrix_indicators_user(void) { /* CapsLock LED indicator */ if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color_hsv(30, 999, 0, led_constant_val, 0.75); // WHITE - } + } /* Current layer LED indicator */ rgb_matrix_set_color_hsv(layers_leds_map[get_highest_layer(layer_state)], 999, 0, led_constant_val, led_dim_ratio); // WHITE @@ -155,7 +155,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color_hsv(30, 999, 999, 999, 1); // CONFIG } else { rgb_matrix_set_color_hsv(14, 999, 999, 999, led_dim_ratio); // CONFIG - } + } /* Blinking LED indicator when recording Dynamic Macro */ if (isRecording && isBlinking) { @@ -174,7 +174,7 @@ void rgb_matrix_indicators_user(void) { } } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _FN: /* Dynamic Macro LED indicator */ if (isRecording) { @@ -188,12 +188,12 @@ void rgb_matrix_indicators_user(void) { /* Layer LED indicators */ rgb_matrix_set_color_hsv(45, 999, 0, led_constant_val, led_dim_ratio); /* WHITE Layer _MAIN */ rgb_matrix_set_color_hsv(46, 999, 0, led_constant_val, led_dim_ratio); /* WHITE Layer _MAC */ - break; + break; } #endif /* RGB_MATRIX */ } - + bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool pressed = record->event.pressed; if (pressed) { @@ -202,12 +202,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { onMac = true; break; case TO(_MAIN): - onMac = false; + onMac = false; break; } } return true; -} +} //**************** LEADER *********************// @@ -244,7 +244,7 @@ const uint8_t french_accent_index[3] = { [_ACUTE] = 2 }; -/* +/* This represent unicode decimal values Each index will be mapped to numpad keycode to out put the correct sequence All codes in this array should be of size 3 @@ -272,8 +272,8 @@ const uint8_t french_decimal_unicodes[5][3][2] = { /*[Letter][Accent][Case]*/ } },{ { - 140, // î - 206 // Î + 140, // î + 206 // Î } },{ { @@ -306,7 +306,7 @@ This is designed and work on an English language keyboard setting on both Window => accept french_letter and french_accent enum's as argument */ void send_french_accent(uint8_t letter, uint8_t accent) { - + bool isCaps; uint8_t decimal_unicode_in; uint8_t decimal_unicode_size = 3; @@ -330,7 +330,7 @@ void send_french_accent(uint8_t letter, uint8_t accent) { }; /* - Function to tap the correct keycodes in sequence for the + Function to tap the correct keycodes in sequence for the "Windows Alt Code" requested, aka Decimal Unicodes */ void tap_win_alt_code(void) { @@ -341,7 +341,7 @@ void send_french_accent(uint8_t letter, uint8_t accent) { tap_code(numpad_key_map[decimal_unicode_out[i]]); } } - + isCaps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? true : false; if (onMac) { @@ -372,7 +372,7 @@ void send_french_accent(uint8_t letter, uint8_t accent) { /*Couple functions used to output the same macro on two different sequences*/ -/* (|) */ +/* (|) */ void ldrkey_send_paranthesis_wrap_ini(void) { SEND_STRING("()" SS_TAP(X_LEFT)); } @@ -382,7 +382,7 @@ void ldrkey_send_paranthesis_wrap_word(void) { onMac ? SEND_STRING(SS_LALT(SS_TAP(X_LEFT)) "(" SS_LALT(SS_TAP(X_RIGHT)) ")") : SEND_STRING(SS_LCTL(SS_TAP(X_LEFT)) "(" SS_LCTL(SS_TAP(X_RIGHT)) ")"); } -/* (selection) */ +/* (selection) */ void ldrkey_send_paranthesis_wrap_selection(void) { onMac ? SEND_STRING(SS_LGUI(SS_TAP(X_X)) "()" SS_TAP(X_LEFT) SS_LGUI(SS_TAP(X_V)) SS_TAP(X_RIGHT)) : SEND_STRING(SS_LCTL(SS_TAP(X_X)) "()" SS_TAP(X_LEFT) SS_LCTL(SS_TAP(X_V)) SS_TAP(X_RIGHT)); } @@ -419,9 +419,9 @@ void ldrkey_send_curlybrace_wrap_selection(void) { LEADER_EXTERNS(); -void matrix_scan_user(void) +void matrix_scan_user(void) { - LEADER_DICTIONARY() + LEADER_DICTIONARY() { leading = false; leader_end(); @@ -476,49 +476,49 @@ void matrix_scan_user(void) tap_code(KC_CAPS); } /* ± => LdrKey > = > - */ - SEQ_TWO_KEYS(KC_EQL, KC_MINS) { - onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_EQL)))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P1) SS_UP(X_LALT)); + SEQ_TWO_KEYS(KC_EQL, KC_MINS) { + onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_EQL)))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P1) SS_UP(X_LALT)); } /* ≤ => LdrKey > - > = */ - SEQ_TWO_KEYS(KC_MINS, KC_EQL) { - onMac ? SEND_STRING(SS_LALT(SS_TAP(X_COMM))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P3) SS_UP(X_LALT)); + SEQ_TWO_KEYS(KC_MINS, KC_EQL) { + onMac ? SEND_STRING(SS_LALT(SS_TAP(X_COMM))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P3) SS_UP(X_LALT)); } /* ≥ => LdrKey > = > = */ - SEQ_TWO_KEYS(KC_EQL, KC_EQL) { - onMac ? SEND_STRING(SS_LALT(SS_TAP(X_DOT))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P2) SS_UP(X_LALT)); + SEQ_TWO_KEYS(KC_EQL, KC_EQL) { + onMac ? SEND_STRING(SS_LALT(SS_TAP(X_DOT))) : SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P2) SS_TAP(X_P4) SS_TAP(X_P2) SS_UP(X_LALT)); } /* <= => LdrKey > , > , */ - SEQ_TWO_KEYS(KC_COMM, KC_COMM) { - SEND_STRING(SS_LSFT(SS_TAP(X_COMM)) SS_TAP(X_SPC) SS_TAP(X_EQL) SS_TAP(X_LEFT) SS_TAP(X_BSPC) SS_TAP(X_RIGHT)); + SEQ_TWO_KEYS(KC_COMM, KC_COMM) { + SEND_STRING(SS_LSFT(SS_TAP(X_COMM)) SS_TAP(X_SPC) SS_TAP(X_EQL) SS_TAP(X_LEFT) SS_TAP(X_BSPC) SS_TAP(X_RIGHT)); } /* => => LdrKey > . > . */ - SEQ_TWO_KEYS(KC_DOT, KC_DOT) { - SEND_STRING("=>"); + SEQ_TWO_KEYS(KC_DOT, KC_DOT) { + SEND_STRING("=>"); } /* ", " => LdrKey > " " */ - SEQ_ONE_KEY(KC_SPC) { - SEND_STRING(", "); + SEQ_ONE_KEY(KC_SPC) { + SEND_STRING(", "); } /* ". " => LdrKey > " " > " " */ - SEQ_TWO_KEYS(KC_SPC, KC_SPC) { - SEND_STRING(". "); + SEQ_TWO_KEYS(KC_SPC, KC_SPC) { + SEND_STRING(". "); } /* Backward delete current word (on cursor) */ - SEQ_TWO_KEYS(KC_BSPC, KC_BSPC) { - onMac ? SEND_STRING(SS_LALT(SS_TAP(X_RIGHT)) SS_LALT(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)) : SEND_STRING(SS_LCTL(SS_TAP(X_RIGHT)) SS_LCTL(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)); + SEQ_TWO_KEYS(KC_BSPC, KC_BSPC) { + onMac ? SEND_STRING(SS_LALT(SS_TAP(X_RIGHT)) SS_LALT(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)) : SEND_STRING(SS_LCTL(SS_TAP(X_RIGHT)) SS_LCTL(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)); } /* Previous word delete */ - SEQ_ONE_KEY(KC_BSPC) { - onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)) : SEND_STRING(SS_LCTL(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)); + SEQ_ONE_KEY(KC_BSPC) { + onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)) : SEND_STRING(SS_LCTL(SS_LSFT(SS_TAP(X_LEFT))) SS_TAP(X_BSPC)); } /* Forward delete current word (on cursor) */ - SEQ_TWO_KEYS(KC_DEL, KC_DEL) { + SEQ_TWO_KEYS(KC_DEL, KC_DEL) { - onMac ? SEND_STRING(SS_LALT(SS_TAP(X_LEFT)) SS_LALT(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)) : SEND_STRING(SS_LCTL(SS_TAP(X_LEFT)) SS_LCTL(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)); + onMac ? SEND_STRING(SS_LALT(SS_TAP(X_LEFT)) SS_LALT(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)) : SEND_STRING(SS_LCTL(SS_TAP(X_LEFT)) SS_LCTL(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)); } /* Next word delete */ - SEQ_ONE_KEY(KC_DEL) { - onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)): SEND_STRING(SS_LCTL(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)); + SEQ_ONE_KEY(KC_DEL) { + onMac ? SEND_STRING(SS_LALT(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)): SEND_STRING(SS_LCTL(SS_LSFT(SS_TAP(X_RIGHT))) SS_TAP(X_DEL)); } /* ` => LdrKey > Escape */ SEQ_ONE_KEY(KC_GESC) { @@ -548,7 +548,7 @@ void matrix_scan_user(void) SEQ_ONE_KEY(KC_Q) { onMac ? SEND_STRING(SS_LGUI(SS_TAP(X_Q))) : SEND_STRING(SS_LALT(SS_TAP(X_F4))); } - /* " => LdrKey > ' */ + /* " => LdrKey > ' */ SEQ_ONE_KEY(KC_QUOT) { SEND_STRING("\""); } @@ -657,48 +657,48 @@ void matrix_scan_user(void) ldrkey_send_curlybrace_wrap_selection(); } /* Select everything on this line before cursor => LdrKey > Left */ - SEQ_ONE_KEY(KC_LEFT) { + SEQ_ONE_KEY(KC_LEFT) { onMac ? SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_LEFT)))) : SEND_STRING(SS_LSFT(SS_TAP(X_HOME))); } /* Select everything on this line after cursor => LdrKey > Right */ - SEQ_ONE_KEY(KC_RIGHT) { + SEQ_ONE_KEY(KC_RIGHT) { onMac ? SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_RIGHT)))) : SEND_STRING(SS_LSFT(SS_TAP(X_END))); } /* Select everything on this line before cursor and bring on previous line => LdrKey > Left > Left */ - SEQ_TWO_KEYS(KC_LEFT, KC_LEFT) { - onMac ? SEND_STRING(SS_LSFT(SS_TAP(X_UP) SS_LGUI(SS_TAP(X_RIGHT)))) : SEND_STRING(SS_LSFT(SS_TAP(X_UP) SS_TAP(X_END))); + SEQ_TWO_KEYS(KC_LEFT, KC_LEFT) { + onMac ? SEND_STRING(SS_LSFT(SS_TAP(X_UP) SS_LGUI(SS_TAP(X_RIGHT)))) : SEND_STRING(SS_LSFT(SS_TAP(X_UP) SS_TAP(X_END))); } /* Select everything on this line => LdrKey > Right > Left */ - SEQ_TWO_KEYS(KC_RIGHT, KC_LEFT) { - onMac ? SEND_STRING(SS_LGUI(SS_TAP(X_RIGHT) SS_LSFT(SS_LGUI(SS_TAP(X_LEFT))))) : SEND_STRING(SS_TAP(X_END) SS_LSFT(SS_TAP(X_HOME))); + SEQ_TWO_KEYS(KC_RIGHT, KC_LEFT) { + onMac ? SEND_STRING(SS_LGUI(SS_TAP(X_RIGHT) SS_LSFT(SS_LGUI(SS_TAP(X_LEFT))))) : SEND_STRING(SS_TAP(X_END) SS_LSFT(SS_TAP(X_HOME))); } /* Select 1x Page Up on the page before the cursor => LdrKey > Up */ - SEQ_ONE_KEY(KC_UP) { + SEQ_ONE_KEY(KC_UP) { SEND_STRING(SS_LSFT(SS_TAP(X_PGUP))); } /* Select 1x Page Down on the page after the cursor => LdrKey > Down */ - SEQ_ONE_KEY(KC_DOWN) { - SEND_STRING(SS_LSFT(SS_TAP(X_PGDN))); + SEQ_ONE_KEY(KC_DOWN) { + SEND_STRING(SS_LSFT(SS_TAP(X_PGDN))); } /* Select everything on the page before the cursor => LdrKey > Up > Up */ - SEQ_TWO_KEYS(KC_UP, KC_UP) { + SEQ_TWO_KEYS(KC_UP, KC_UP) { onMac ? SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_UP)))) : SEND_STRING(SS_LSFT(SS_LCTL(SS_TAP(X_HOME)))); } /* Select everything on the page after the cursor => LdrKey > Down > Down */ - SEQ_TWO_KEYS(KC_DOWN, KC_DOWN) { + SEQ_TWO_KEYS(KC_DOWN, KC_DOWN) { onMac ? SEND_STRING(SS_LSFT(SS_LGUI(SS_TAP(X_DOWN)))) : SEND_STRING(SS_LSFT(SS_LCTL(SS_TAP(X_END)))); } /* HELPER => spit out the url of the layout description page on github */ - SEQ_FIVE_KEYS(KC_GESC, KC_GESC, KC_GESC, KC_GESC, KC_GESC) { + SEQ_FIVE_KEYS(KC_GESC, KC_GESC, KC_GESC, KC_GESC, KC_GESC) { SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/keyboards/dztech/dz65rgb/keymaps/drootz"); } /* google.ca => LdrKey > G > G */ - SEQ_TWO_KEYS(KC_G, KC_G) { - SEND_STRING("https://google.ca" SS_TAP(X_ENT)); + SEQ_TWO_KEYS(KC_G, KC_G) { + SEND_STRING("https://google.ca" SS_TAP(X_ENT)); } /* @gmail => LdrKey > M > L > T */ - SEQ_THREE_KEYS(KC_M, KC_L, KC_T) { - SEND_STRING("mailto." SS_TAP(X_D) SS_TAP(X_A) SS_TAP(X_N) SS_TAP(X_I) SS_TAP(X_E) SS_TAP(X_L) SS_TAP(X_R) SS_TAP(X_A) SS_TAP(X_C) SS_TAP(X_I) SS_TAP(X_N) SS_TAP(X_E) "@gmail.com"); + SEQ_THREE_KEYS(KC_M, KC_L, KC_T) { + SEND_STRING("mailto." SS_TAP(X_D) SS_TAP(X_A) SS_TAP(X_N) SS_TAP(X_I) SS_TAP(X_E) SS_TAP(X_L) SS_TAP(X_R) SS_TAP(X_A) SS_TAP(X_C) SS_TAP(X_I) SS_TAP(X_N) SS_TAP(X_E) "@gmail.com"); } /* Show Desktop => LdrKey > D */ SEQ_ONE_KEY(KC_D) { diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h index 586e5765aa..25842ac186 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h @@ -47,8 +47,6 @@ // #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define QMK_KEYS_PER_SCAN 4 - // #define RGB_MATRIX_KEYRELEASES // some speed shit diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c index 00915a9b4f..0c7bfbbb48 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c @@ -91,7 +91,7 @@ void rgb_matrix_indicators_user(void) uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _NAV: if (IS_LED_ON(this_led, USB_LED_NUM_LOCK)) { rgb_matrix_set_color(17, 0xFF, 0x00, 0x00); diff --git a/keyboards/dztech/dz65rgb/keymaps/yuannan/config.h b/keyboards/dztech/dz65rgb/keymaps/yuannan/config.h index 0a005cbca3..ef5023f8c6 100644 --- a/keyboards/dztech/dz65rgb/keymaps/yuannan/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/yuannan/config.h @@ -30,8 +30,6 @@ #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 8 -//#define QMK_KEYS_PER_SCAN 12nn - #define MOUSEKEY_DELAY 0 #define MOUSEKEY_INTERVAL 1 #define MOUSEKEY_MOVE_DELTA 1 diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h index 6c21fa22c2..27c99f91f6 100755 --- a/keyboards/dztech/dz65rgb/v3/config.h +++ b/keyboards/dztech/dz65rgb/v3/config.h @@ -30,7 +30,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, F4, E6, C6 } #define MATRIX_COL_PINS { F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/dztech/dz96/config.h b/keyboards/dztech/dz96/config.h index 189edb4e73..534bd56cd9 100644 --- a/keyboards/dztech/dz96/config.h +++ b/keyboards/dztech/dz96/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, E6, F0, D5, D4, D6, C7 } #define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/e88/config.h b/keyboards/e88/config.h index 89bbbd1d60..87b87b4365 100644 --- a/keyboards/e88/config.h +++ b/keyboards/e88/config.h @@ -35,7 +35,6 @@ #define MATRIX_ROW_PINS { B7, D7, B4, C6, B5, B6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2, D3, B3, B2, B1, E6, D5, D6, D4 } -#define UNUSED_PINS {B0} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ealdin/quadrant/config.h b/keyboards/ealdin/quadrant/config.h index f78db423ea..ff217d933c 100644 --- a/keyboards/ealdin/quadrant/config.h +++ b/keyboards/ealdin/quadrant/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B2, F7, B3, B6, B1 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/earth_rover/config.h b/keyboards/earth_rover/config.h index 9fbc8c13da..081834972e 100644 --- a/keyboards/earth_rover/config.h +++ b/keyboards/earth_rover/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ebastler/e80_1800/config.h b/keyboards/ebastler/e80_1800/config.h index c21285483c..85e2a4e409 100644 --- a/keyboards/ebastler/e80_1800/config.h +++ b/keyboards/ebastler/e80_1800/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS { B7, B3, D2, C12, C11, C10, A15 } #define MATRIX_COL_PINS { A1, A0, C3, C2, F1, F0, C15, C14, C13, C4, C5, B0, B1, B2, B9, A13, A8, C9, C8 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ebastler/isometria_75/rev1/config.h b/keyboards/ebastler/isometria_75/rev1/config.h index 787d33e16d..2c2a62fc26 100644 --- a/keyboards/ebastler/isometria_75/rev1/config.h +++ b/keyboards/ebastler/isometria_75/rev1/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A15, B4, B5, B6, B7, B8} #define MATRIX_COL_PINS { B12, B13, B14, B15, A8, A10, A13, A14, B9, C13, F0, F1, A0, B2, B10, B11 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h index 65cb050d6c..f674c50f23 100644 --- a/keyboards/eco/rev1/config.h +++ b/keyboards/eco/rev1/config.h @@ -24,4 +24,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* ECO V1 pin-out */ #define MATRIX_ROW_PINS { B1, B6, B2, B3 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h index bbc0492e06..091b4ffcce 100644 --- a/keyboards/eco/rev2/config.h +++ b/keyboards/eco/rev2/config.h @@ -24,4 +24,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* ECO V2.1 pin-out */ #define MATRIX_ROW_PINS { D7, B5, B4, E6 } #define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } -#define UNUSED_PINS diff --git a/keyboards/edc40/config.h b/keyboards/edc40/config.h index 8e47136e6b..907cf257fe 100644 --- a/keyboards/edc40/config.h +++ b/keyboards/edc40/config.h @@ -32,7 +32,6 @@ */ #define MATRIX_ROW_PINS { D4, D6, D7, F7 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D0, D1, D2, D3, D5, B4, B5 } - #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/edi/hardlight/mk1/config.h b/keyboards/edi/hardlight/mk1/config.h index be136fe9c9..321946b46c 100644 --- a/keyboards/edi/hardlight/mk1/config.h +++ b/keyboards/edi/hardlight/mk1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, D4, D6, D7, B4 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5 } -#define UNUSED_PINS { B7, D2, D3, D5 } /* COL2ROW, ROW2COL */ diff --git a/keyboards/edi/standaside/config.h b/keyboards/edi/standaside/config.h index 83cc9f3eef..ebf0f6de9a 100644 --- a/keyboards/edi/standaside/config.h +++ b/keyboards/edi/standaside/config.h @@ -20,7 +20,6 @@ */ #define MATRIX_ROW_PINS { D1, F4, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { F5, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS {} /* COL2ROW, ROW2COL */ diff --git a/keyboards/eek/config.h b/keyboards/eek/config.h index a9d3d5e75b..e183afa0be 100644 --- a/keyboards/eek/config.h +++ b/keyboards/eek/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { D4, C6, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS { D2, D1, D0 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/efreet/config.h b/keyboards/efreet/config.h index 6370544c2b..e937fe57c2 100644 --- a/keyboards/efreet/config.h +++ b/keyboards/efreet/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, D6, D5, D4, D3, D2, D1, C2 } #define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/elephant42/config.h b/keyboards/elephant42/config.h index 92f1303480..26d9daba4e 100644 --- a/keyboards/elephant42/config.h +++ b/keyboards/elephant42/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D4, C6, D7, E6 } #define MATRIX_COL_PINS \ { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/emajesty/eiri/config.h b/keyboards/emajesty/eiri/config.h index 748558719f..fb8f2d357d 100644 --- a/keyboards/emajesty/eiri/config.h +++ b/keyboards/emajesty/eiri/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B5, B2, B6 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/emi20/config.h b/keyboards/emi20/config.h index 5bd1775659..6bd6981274 100644 --- a/keyboards/emi20/config.h +++ b/keyboards/emi20/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B6 } #define MATRIX_COL_PINS { C7, C6, B5, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eniigmakeyboards/ek60/config.h b/keyboards/eniigmakeyboards/ek60/config.h index b9bd26b39b..75cadda935 100644 --- a/keyboards/eniigmakeyboards/ek60/config.h +++ b/keyboards/eniigmakeyboards/ek60/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B2, B1, B0, F0, B4 } #define MATRIX_COL_PINS { F7, C6, F6, B6, F5, F4, B5, F1, E6, D0, D7, D5, D1, D3, D2 } -#define UNUSED_PINS { B3, B7, C7, D4, D6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eniigmakeyboards/ek65/config.h b/keyboards/eniigmakeyboards/ek65/config.h index 35a38fdbdc..a3872f02f2 100644 --- a/keyboards/eniigmakeyboards/ek65/config.h +++ b/keyboards/eniigmakeyboards/ek65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, E6, B2, B1, B0 } -#define UNUSED_PINS { B3, B7, D4, D6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eniigmakeyboards/ek87/config.h b/keyboards/eniigmakeyboards/ek87/config.h index a15994b7f9..133738e460 100644 --- a/keyboards/eniigmakeyboards/ek87/config.h +++ b/keyboards/eniigmakeyboards/ek87/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0 } #define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, E6, D3, D2, D1 } -#define UNUSED_PINS { D5 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index d057e05c35..a7d9d1a91b 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B3, B2, B7, C6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, F7, F6, F5, F4, F1, F0, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ep/comsn/hs68/config.h b/keyboards/ep/comsn/hs68/config.h index 1a7e681bd2..7998faf673 100644 --- a/keyboards/ep/comsn/hs68/config.h +++ b/keyboards/ep/comsn/hs68/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B6, B5, B4, D0, F6 } #define MATRIX_COL_PINS \ { B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ep/comsn/mollydooker/config.h b/keyboards/ep/comsn/mollydooker/config.h index 879c4405f4..416f3b5477 100644 --- a/keyboards/ep/comsn/mollydooker/config.h +++ b/keyboards/ep/comsn/mollydooker/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F4, F5, F6, F7, D2 } #define MATRIX_COL_PINS \ { B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ep/comsn/tf_longeboye/config.h b/keyboards/ep/comsn/tf_longeboye/config.h index 73ec20acfb..964705bff3 100644 --- a/keyboards/ep/comsn/tf_longeboye/config.h +++ b/keyboards/ep/comsn/tf_longeboye/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B5, B4, D1, D2, D3 } #define MATRIX_COL_PINS \ { F4, F5, F6, F7, B1, B3, B2, B6, F0, F1, C7, D5, B7, E6, D7, C6, D4, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/epoch80/config.h b/keyboards/epoch80/config.h index f960058d74..7c1e66ddc0 100644 --- a/keyboards/epoch80/config.h +++ b/keyboards/epoch80/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D1, D0, B3, B0, B2, B1 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D4, D6, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c index a5b107baae..91798ab188 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c @@ -190,7 +190,7 @@ static bool is_macro1_recording = false; // The current set of active layers (as a bitmask). // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). -static uint32_t current_layer_state = 0; +static layer_state_t current_layer_state = 0; layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is diff --git a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index 5c08d30727..67c50eb129 100644 --- a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -200,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -262,4 +262,3 @@ void matrix_scan_user(void) { // } // return true; //} - diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c index 229ece0d74..eff7f111b4 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -98,7 +98,7 @@ static bool is_macro1_recording = false; // The current set of active layers (as a bitmask). // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). -static uint32_t current_layer_state = 0; +static layer_state_t current_layer_state = 0; layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 73b1077b83..3ab66078fe 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index fab2977356..93b82df8cf 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -20,8 +20,6 @@ // debounce settings // remove these after getting a new keyboard // #define DEBOUNCE 50 -// #define QMK_KEYS_PER_SCAN 4 - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -725,7 +723,7 @@ void led_set_user(uint8_t usb_led) { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index da20820787..acd3a44e16 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -7,6 +7,7 @@ #undef TAPPING_TERM #define TAPPING_TERM 175 +#define TAPPING_TERM_PER_KEY #undef DEBOUNCE #define DEBOUNCE 15 @@ -24,7 +25,6 @@ #define LEADER_TIMEOUT 1000 #define PERMISSIVE_HOLD -#define QMK_KEYS_PER_SCAN 4 #define DANCING_TERM 175 #define ONESHOT_TAP_TOGGLE 5 diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c index 59e3e2b0dc..1d5e1cee00 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c @@ -13,14 +13,32 @@ qk_tap_dance_action_t tap_dance_actions[] = { [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), - [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, scln_coln_finished, scln_coln_reset, DANCING_TERM), - [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, quot_dquot_finished, quot_dquot_reset, DANCING_TERM), - [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, dot_comm_finished, dot_comm_reset, DANCING_TERM), - [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM), - [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, u_arrows_gui_finished, u_arrows_gui_reset, DANCING_TERM), - [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, h_mouse_gui_finished, h_mouse_gui_reset, DANCING_TERM), - [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, j_media_meh_finished, j_media_meh_reset, DANCING_TERM), - [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, w_media_meh_finished, w_media_meh_reset, DANCING_TERM), - [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset, DANCING_TERM), - [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, m_chords_hyper_finished, m_chords_hyper_reset, DANCING_TERM), + [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, scln_coln_finished, scln_coln_reset), + [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, quot_dquot_finished, quot_dquot_reset), + [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dot_comm_finished, dot_comm_reset), + [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, none_lead_finished, none_lead_reset), + [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, u_arrows_gui_finished, u_arrows_gui_reset), + [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, h_mouse_gui_finished, h_mouse_gui_reset), + [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, j_media_meh_finished, j_media_meh_reset), + [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, w_media_meh_finished, w_media_meh_reset), + [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset), + [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, m_chords_hyper_finished, m_chords_hyper_reset), }; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(SCLN_COLN): + case TD(QUOT_DQUO): + case TD(DOT_COMM): + case TD(NONE_LEAD): + case TD(U_ARR_GUI): + case TD(H_MOU_GUI): + case TD(J_MED_MEH): + case TD(W_MED_MEH): + case TD(K_NUM_HYP): + case TD(M_CHO_HYP): + return DANCING_TERM; + default: + return TAPPING_TERM; + } +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c index fd022681b0..ed407def79 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -1,6 +1,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); switch (layer) { case DVORAK: diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c index b6edc17532..91884c8e76 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/keymap.c @@ -370,7 +370,7 @@ LEADER_EXTERNS(); void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (keyboard_report->mods & MOD_BIT(KC_LSFT) || ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && @@ -677,4 +677,4 @@ void matrix_init_user(void) wait_ms(1000); rgblight_effect_knight(50); -}
\ No newline at end of file +} diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c index c8d0a6b5dd..01427c2d2d 100644 --- a/keyboards/ergodox_ez/keymaps/kou/keymap.c +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -284,7 +284,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c index 5d797beb18..542e123db3 100644 --- a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c +++ b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c @@ -813,7 +813,7 @@ case RU_7: layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); // ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c index 10b6567cdb..bb6ba5ae34 100644 --- a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c +++ b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c @@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index e31391a674..a3c2176951 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -218,7 +218,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); @@ -431,4 +431,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c index 1d12093bab..ba578dd1c5 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -1057,7 +1057,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 85455fa9d9..6f602e828e 100644 --- a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -157,7 +157,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c index 024cefd270..c69621ab98 100644 --- a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -245,11 +245,11 @@ void keyboard_post_init_user_keymap(void) { } // light up leds based on the layer -uint32_t layer_state_set_user_keymap(uint32_t state) { +layer_state_t layer_state_set_user_keymap(layer_state_t state) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case LR_SYSCTL: ergodox_right_led_3_on(); // blue break; @@ -306,7 +306,7 @@ uint32_t layer_state_set_user_keymap(uint32_t state) { // SYSCTL on first tap, MOUSE ON second tap // void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { -// uint8_t layer = biton32(layer_state); +// uint8_t layer = get_highest_layer(layer_state); // switch(state->count) { // case 1: diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h index 1913a2d369..84c5adfc9e 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/config.h +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/config.h @@ -2,13 +2,9 @@ #define KEYMAP_CONFIG_H - #define RGBLIGHT_SLEEP +#define RGBLIGHT_SLEEP -#ifndef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 -#endif // !QMK_KEYS_PER_SCAN - #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c index 3e607edb39..595f3b4ee1 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c @@ -228,7 +228,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case SYMB: ergodox_right_led_1_on(); if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); } @@ -268,4 +268,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { } return state; } - diff --git a/keyboards/ergodox_ez/keymaps/rishka/keymap.c b/keyboards/ergodox_ez/keymaps/rishka/keymap.c index 102803e512..0d6ac9fe95 100644 --- a/keyboards/ergodox_ez/keymaps/rishka/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rishka/keymap.c @@ -138,7 +138,7 @@ void keyboard_post_init_user(void) { }; // Runs whenever there is a layer state change. -uint32_t layer_state_set_user(layer_state_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/rmw/config.h b/keyboards/ergodox_ez/keymaps/rmw/config.h index 1ecf8b8b79..1b7528a4a7 100644 --- a/keyboards/ergodox_ez/keymaps/rmw/config.h +++ b/keyboards/ergodox_ez/keymaps/rmw/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USB_MAX_POWER_CONSUMPTION 500 -#define QMK_KEYS_PER_SCAN 4 /* Set 0 if debouncing isn't needed */ #undef DEBOUNCE #define DEBOUNCE 5 diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index 1446ea7466..04aa6a99fd 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -228,7 +228,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index 42ac13775f..c8ddc23a8b 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -139,7 +139,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if(layer == 1) { @@ -157,7 +157,7 @@ void matrix_scan_user(void) { } if(keyboard_report->mods & MOD_BIT(KC_LSFT)) - { + { ergodox_right_led_1_set (LED_BRIGHTNESS_HI); ergodox_right_led_1_on (); } else { @@ -182,7 +182,7 @@ void matrix_scan_user(void) { } if(keyboard_report->mods & MOD_BIT(KC_LCTRL)) - { + { ergodox_right_led_3_set (LED_BRIGHTNESS_HI); ergodox_right_led_3_on (); } else { @@ -195,7 +195,7 @@ void matrix_scan_user(void) { }; void led_set_user(uint8_t usb_led){ - if (usb_led & (1 << USB_LED_CAPS_LOCK)) + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { capsOn = true; }else { diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 080d3f6cef..96218bbe99 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -228,7 +228,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/testing/keymap.c b/keyboards/ergodox_ez/keymaps/testing/keymap.c index 5c1fc4af28..3aee63ddf1 100644 --- a/keyboards/ergodox_ez/keymaps/testing/keymap.c +++ b/keyboards/ergodox_ez/keymaps/testing/keymap.c @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c index 948f2b4794..c1c037ef23 100644 --- a/keyboards/ergodox_ez/keymaps/vim/keymap.c +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -330,7 +330,7 @@ void matrix_init_user(void) { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py index b447ecaf5c..310512c920 100755 --- a/keyboards/ergodox_ez/util/compile_keymap.py +++ b/keyboards/ergodox_ez/util/compile_keymap.py @@ -27,29 +27,34 @@ PY2 = sys.version_info.major == 2 if PY2: chr = unichr - KEYBOARD_LAYOUTS = { # These map positions in the parsed layout to # positions in the KEYMAP MATRIX 'ergodox_ez': [ - [ 0, 1, 2, 3, 4, 5, 6], [38, 39, 40, 41, 42, 43, 44], - [ 7, 8, 9, 10, 11, 12, 13], [45, 46, 47, 48, 49, 50, 51], - [14, 15, 16, 17, 18, 19 ], [ 52, 53, 54, 55, 56, 57], - [20, 21, 22, 23, 24, 25, 26], [58, 59, 60, 61, 62, 63, 64], - [27, 28, 29, 30, 31 ], [ 65, 66, 67, 68, 69], - [ 32, 33], [70, 71 ], - [ 34], [72 ], - [ 35, 36, 37], [73, 74, 75 ], + [0, 1, 2, 3, 4, 5, 6], + [38, 39, 40, 41, 42, 43, 44], + [7, 8, 9, 10, 11, 12, 13], + [45, 46, 47, 48, 49, 50, 51], + [14, 15, 16, 17, 18, 19], + [52, 53, 54, 55, 56, 57], + [20, 21, 22, 23, 24, 25, 26], + [58, 59, 60, 61, 62, 63, 64], + [27, 28, 29, 30, 31], + [65, 66, 67, 68, 69], + [32, 33], + [70, 71], + [34], + [72], + [35, 36, 37], + [73, 74, 75], ] } -ROW_INDENTS = { - 'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0] -} +ROW_INDENTS = {'ergodox_ez': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 5, 0, 6, 0, 4, 0]} BLANK_LAYOUTS = [ -# Compact Layout -""" + # Compact Layout + """ .------------------------------------.------------------------------------. | | | | | | | | | | | | | | | !-----+----+----+----+----+----------!-----+----+----+----+----+----+-----! @@ -70,8 +75,8 @@ BLANK_LAYOUTS = [ '-----------------' '-----------------' """, -# Wide Layout -""" + # Wide Layout + """ .---------------------------------------------. .---------------------------------------------. | | | | | | | | ! | | | | | | | !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! @@ -93,26 +98,22 @@ BLANK_LAYOUTS = [ """, ] - DEFAULT_CONFIG = { - "keymaps_includes": [ - "keymap_common.h", - ], + "keymaps_includes": ["keymap_common.h",], 'filler': "-+.'!:x", 'separator': "|", 'default_key_prefix': ["KC_"], } - SECTIONS = [ 'layout_config', 'layers', ] - # Markdown Parsing -ONELINE_COMMENT_RE = re.compile(r""" +ONELINE_COMMENT_RE = re.compile( + r""" ^ # comment must be at the start of the line \s* # arbitrary whitespace // # start of the comment @@ -121,22 +122,26 @@ ONELINE_COMMENT_RE = re.compile(r""" """, re.MULTILINE | re.VERBOSE ) -INLINE_COMMENT_RE = re.compile(r""" +INLINE_COMMENT_RE = re.compile( + r""" ([\,\"\[\]\{\}\d]) # anythig that might end a expression \s+ # comment must be preceded by whitespace // # start of the comment \s # and succeded by whitespace (?:[^\"\]\}\{\[]*) # the comment (except things which might be json) $ # until the end of line -""", re.MULTILINE | re.VERBOSE) +""", re.MULTILINE | re.VERBOSE +) -TRAILING_COMMA_RE = re.compile(r""" +TRAILING_COMMA_RE = re.compile( + r""" , # the comma (?:\s*) # arbitrary whitespace $ # only works if the trailing comma is followed by newline (\s*) # arbitrary whitespace ([\]\}]) # end of an array or object -""", re.MULTILINE | re.VERBOSE) +""", re.MULTILINE | re.VERBOSE +) def loads(raw_data): @@ -178,9 +183,7 @@ def parse_config(path): def end_section(): if section['start_line'] >= 0: if section['name'] == 'layout_config': - config.update(loads("\n".join( - section['code_lines'] - ))) + config.update(loads("\n".join(section['code_lines']))) elif section['sub_name'].startswith('layer'): layer_name = section['sub_name'] config['layer_lines'][layer_name] = section['code_lines'] @@ -215,6 +218,7 @@ def parse_config(path): assert 'layout' in config return config + # header file parsing IF0_RE = re.compile(r""" @@ -224,7 +228,6 @@ IF0_RE = re.compile(r""" #endif """, re.MULTILINE | re.DOTALL | re.VERBOSE) - COMMENT_RE = re.compile(r""" /\* .*? @@ -244,6 +247,7 @@ def regex_partial(re_str_fmt, flags): def partial(*args, **kwargs): re_str = re_str_fmt.format(*args, **kwargs) return re.compile(re_str, flags) + return partial @@ -256,7 +260,6 @@ KEYDEF_REP = regex_partial(r""" ) # capture group end """, re.MULTILINE | re.DOTALL | re.VERBOSE) - ENUM_RE = re.compile(r""" ( enum @@ -268,7 +271,6 @@ ENUM_RE = re.compile(r""" ) # capture group end """, re.MULTILINE | re.DOTALL | re.VERBOSE) - ENUM_KEY_REP = regex_partial(r""" ( {} # the prefixes @@ -309,14 +311,13 @@ def parse_valid_keys(config, out_path): include_path = os.path.join(dirpath, include) if os.path.exists(include_path): header_data = read_header_file(include_path) - valid_keycodes.update( - parse_keydefs(config, header_data) - ) + valid_keycodes.update(parse_keydefs(config, header_data)) return valid_keycodes # Keymap Parsing + def iter_raw_codes(layer_lines, filler, separator): filler_re = re.compile("[" + filler + " ]") for line in layer_lines: @@ -346,28 +347,21 @@ LAYER_CHANGE_RE = re.compile(r""" (DF|TG|MO)\(\d+\) """, re.VERBOSE) - MACRO_RE = re.compile(r""" M\(\w+\) """, re.VERBOSE) - UNICODE_RE = re.compile(r""" U[0-9A-F]{4} """, re.VERBOSE) - NON_CODE = re.compile(r""" ^[^A-Z0-9_]$ """, re.VERBOSE) def parse_uni_code(raw_code): - macro_id = "UC_" + ( - unicodedata.name(raw_code) - .replace(" ", "_") - .replace("-", "_") - ) + macro_id = "UC_" + (unicodedata.name(raw_code).replace(" ", "_").replace("-", "_")) code = "M({})".format(macro_id) uc_hex = "{:04X}".format(ord(raw_code)) return code, macro_id, uc_hex @@ -407,19 +401,13 @@ def parse_code(raw_code, key_prefixes, valid_keycodes): def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): keymap = {} - raw_codes = list(iter_raw_codes( - layer_lines, config['filler'], config['separator'] - )) + raw_codes = list(iter_raw_codes(layer_lines, config['filler'], config['separator'])) indexed_codes = iter_indexed_codes(raw_codes, key_indexes) key_prefixes = config['key_prefixes'] for raw_code, key_index, row_index in indexed_codes: - code, macro_id, uc_hex = parse_code( - raw_code, key_prefixes, valid_keycodes - ) + code, macro_id, uc_hex = parse_code(raw_code, key_prefixes, valid_keycodes) # TODO: line numbers for invalid codes - err_msg = "Could not parse key '{}' on row {}".format( - raw_code, row_index - ) + err_msg = "Could not parse key '{}' on row {}".format(raw_code, row_index) assert code is not None, err_msg # print(repr(raw_code), repr(code), macro_id, uc_hex) if macro_id: @@ -432,17 +420,14 @@ def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): def parse_keymaps(config, valid_keycodes): keymaps = collections.OrderedDict() - key_indexes = config.get( - 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] - ) + key_indexes = config.get('key_indexes', KEYBOARD_LAYOUTS[config['layout']]) # TODO: maybe validate key_indexes for layer_name, layer_lines, in config['layer_lines'].items(): - keymaps[layer_name] = parse_keymap( - config, key_indexes, layer_lines, valid_keycodes - ) + keymaps[layer_name] = parse_keymap(config, key_indexes, layer_lines, valid_keycodes) return keymaps + # keymap.c output USERCODE = """ @@ -453,7 +438,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -572,7 +557,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ }}; """ - UNICODE_MACRO_TEMPLATE = """ case {macro_id}: unicode_action_function(0x{hi:02x}, 0x{lo:02x}); @@ -584,9 +568,7 @@ def unicode_macro_cases(config): for macro_id, uc_hex in config['unicode_macros'].items(): hi = int(uc_hex, 16) >> 8 lo = int(uc_hex, 16) & 0xFF - yield UNICODE_MACRO_TEMPLATE.format( - macro_id=macro_id, hi=hi, lo=lo - ) + yield UNICODE_MACRO_TEMPLATE.format(macro_id=macro_id, hi=hi, lo=lo) def iter_keymap_lines(keymap, row_indents=None): diff --git a/keyboards/ergoslab/keymaps/default/keymap.c b/keyboards/ergoslab/keymaps/default/keymap.c index 59415618a8..093d586eba 100644 --- a/keyboards/ergoslab/keymaps/default/keymap.c +++ b/keyboards/ergoslab/keymaps/default/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGBLIGHT_ENABLE layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); switch (layer) { case BASE: rgblight_sethsv(HSV_ERGOSLAB_ORANGE); diff --git a/keyboards/ericrlau/numdiscipline/rev1/config.h b/keyboards/ericrlau/numdiscipline/rev1/config.h index 72abf556d4..8aa4be245d 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/config.h +++ b/keyboards/ericrlau/numdiscipline/rev1/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B2, A1, B1, A0, B0 } #define MATRIX_COL_PINS { A2, B3, A3, B4, A4, D5, D6, C6, C5, C4, C3, C2, C1, C0, D7, A5, A6, A7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eternal_keypad/config.h b/keyboards/eternal_keypad/config.h index d98af99960..29933bcbb0 100644 --- a/keyboards/eternal_keypad/config.h +++ b/keyboards/eternal_keypad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eternal_keypad/keymaps/kyek/config.h b/keyboards/eternal_keypad/keymaps/kyek/config.h index 226b16e546..36ab46334c 100644 --- a/keyboards/eternal_keypad/keymaps/kyek/config.h +++ b/keyboards/eternal_keypad/keymaps/kyek/config.h @@ -17,5 +17,3 @@ #define ONESHOT_TIMEOUT 2000 #define FORCE_NKRO -#define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/eu_isolation/config.h b/keyboards/eu_isolation/config.h index 49355bfec8..0681896cb9 100644 --- a/keyboards/eu_isolation/config.h +++ b/keyboards/eu_isolation/config.h @@ -23,7 +23,6 @@ /* NIU Mini PCB default pin-out */ #define MATRIX_ROW_PINS { D2, D3, F1, F0 } #define MATRIX_COL_PINS { D0, D1, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evancookaudio/sleepingdinosaur/config.h b/keyboards/evancookaudio/sleepingdinosaur/config.h index c6818085e1..73c24861c5 100644 --- a/keyboards/evancookaudio/sleepingdinosaur/config.h +++ b/keyboards/evancookaudio/sleepingdinosaur/config.h @@ -32,4 +32,3 @@ #define MATRIX_ROW_PINS {D1, D0, D4, C6, D7} #define MATRIX_COL_PINS {B3, B1, F7, F6, F5, F4} -#define UNUSED_PINS diff --git a/keyboards/evancookaudio/tenpad/config.h b/keyboards/evancookaudio/tenpad/config.h index e49d8e9b1a..f72ffeb685 100644 --- a/keyboards/evancookaudio/tenpad/config.h +++ b/keyboards/evancookaudio/tenpad/config.h @@ -33,5 +33,4 @@ #define MATRIX_ROW_PINS {D0, D1} #define MATRIX_COL_PINS {F4, F5, F6, F7, B1} -#define UNUSED_PINS {B3, B2, B6, B7, D5, C7, F1, F0, B4, E6, D7, C6, D4 } diff --git a/keyboards/eve/meteor/config.h b/keyboards/eve/meteor/config.h index 4947167645..fd40e2e568 100644 --- a/keyboards/eve/meteor/config.h +++ b/keyboards/eve/meteor/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B5, B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0, D7} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index 25fb7d4a0b..bf086b394a 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -9,7 +9,6 @@ /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { F1, F4, F5, F0, B3, B0 } #define MATRIX_COL_PINS { B2, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1, C6, C7, E6, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/atom47/rev2/config.h b/keyboards/evyd13/atom47/rev2/config.h index cba27459cd..a314395501 100644 --- a/keyboards/evyd13/atom47/rev2/config.h +++ b/keyboards/evyd13/atom47/rev2/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B1,B2,B3,B7} #define MATRIX_COL_PINS {D7,D5,F0,F1,F4,F6,F7,D4,C7,C6,D6,B5,B4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/evyd13/atom47/rev3/config.h b/keyboards/evyd13/atom47/rev3/config.h index a00f5177fe..4ca725705b 100644 --- a/keyboards/evyd13/atom47/rev3/config.h +++ b/keyboards/evyd13/atom47/rev3/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B3,B2,B1,B0} #define MATRIX_COL_PINS {B7,F0,F1,F4,F6,D4,D6,D7,B4,B5,C6,C7,F7} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/evyd13/atom47/rev4/config.h b/keyboards/evyd13/atom47/rev4/config.h index 19add7be46..8d8b477e4a 100644 --- a/keyboards/evyd13/atom47/rev4/config.h +++ b/keyboards/evyd13/atom47/rev4/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {D0,C2,C5,C6} #define MATRIX_COL_PINS {C4,C7,B7,B6,B5,B2,B1,B0,D6,D5,D4,D3,D2} -#define UNUSED_PINS #define ENCODERS_PAD_A { B3 } #define ENCODERS_PAD_B { B4 } diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h index 4ab41e9567..d16ac9404f 100644 --- a/keyboards/evyd13/atom47/rev5/config.h +++ b/keyboards/evyd13/atom47/rev5/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS {B1,B2,B3,D4} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,D7,B4,B5,B6,C6,C7} -#define UNUSED_PINS {B0,B7,D2,D3,D5,D6} /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/eon40/config.h b/keyboards/evyd13/eon40/config.h index a10c3924fc..3a3fdfccff 100644 --- a/keyboards/evyd13/eon40/config.h +++ b/keyboards/evyd13/eon40/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {B7,D5,F5,F6} #define MATRIX_COL_PINS {F0,F1,F4,D3,D4,D6,D7,B4,B5,B6,C6,C7} -#define UNUSED_PINS {B1,B2,B3} #define ENCODERS_PAD_A { E6, B0, D1 } #define ENCODERS_PAD_B { F7, D0, D2 } diff --git a/keyboards/evyd13/eon65/config.h b/keyboards/evyd13/eon65/config.h index 02d8e96474..c9796792aa 100644 --- a/keyboards/evyd13/eon65/config.h +++ b/keyboards/evyd13/eon65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D3,D5,B1,B2,B3} #define MATRIX_COL_PINS {B0,D2,D4,D6,D7,B4,B5,B6,C6,C7,F7,F6,F5,F4,F1,F0} -#define UNUSED_PINS {B7,D0,D1} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/eon75/config.h b/keyboards/evyd13/eon75/config.h index 4cc5d89300..c77a0c9be9 100644 --- a/keyboards/evyd13/eon75/config.h +++ b/keyboards/evyd13/eon75/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D1,D0,D3,D2,D6,D4,D7,B4,B5,B6,C6,C7} #define MATRIX_COL_PINS {E6,F0,F1,F4,F5,F6,F7,B3} -#define UNUSED_PINS {B2,B1} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/eon87/config.h b/keyboards/evyd13/eon87/config.h index 8b23338406..4379f6106e 100644 --- a/keyboards/evyd13/eon87/config.h +++ b/keyboards/evyd13/eon87/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {B1,B2,B3,D4,D1,D5} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,E6,B7,D3,D2} -#define UNUSED_PINS {B0} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/eon95/config.h b/keyboards/evyd13/eon95/config.h index c10eab2fcf..4fb9906832 100644 --- a/keyboards/evyd13/eon95/config.h +++ b/keyboards/evyd13/eon95/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D1,D0,D3,D2,D6,D4,D7,B4,B5,B6,C6,C7} #define MATRIX_COL_PINS {E6,F0,F1,F4,F5,F6,F7,B3,B2,B1} -#define UNUSED_PINS {} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/gh80_1800/config.h b/keyboards/evyd13/gh80_1800/config.h index 2be1840b77..c1e0a1533c 100644 --- a/keyboards/evyd13/gh80_1800/config.h +++ b/keyboards/evyd13/gh80_1800/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D5,B4,B5,B6,C6,C7,B0,B2,B1,B3} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,D3,D2,D1,D0,B7} -#define UNUSED_PINS {E6} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/gh80_3700/config.h b/keyboards/evyd13/gh80_3700/config.h index fdc4b7968c..a83c5563bf 100644 --- a/keyboards/evyd13/gh80_3700/config.h +++ b/keyboards/evyd13/gh80_3700/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {B3,C7,C6,B6,B5,B4} #define MATRIX_COL_PINS {B0,D7,D6,D4} -#define UNUSED_PINS {} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/gud70/config.h b/keyboards/evyd13/gud70/config.h index f942e47164..a6aeea3423 100644 --- a/keyboards/evyd13/gud70/config.h +++ b/keyboards/evyd13/gud70/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D7,D6,D4,E6,B7} #define MATRIX_COL_PINS {D5,D3,D2,D1,D0,B4,B5,B6,C6,C7,F0,F1,F4,F5,F6,F7} -#define UNUSED_PINS {} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/minitomic/config.h b/keyboards/evyd13/minitomic/config.h index 118ea3693b..f17184715f 100644 --- a/keyboards/evyd13/minitomic/config.h +++ b/keyboards/evyd13/minitomic/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {B1,B3,D4,D6} #define MATRIX_COL_PINS {C6,B6,B5,B4,D7,F0,F1,F4,F5,F6,F7,B7,E6} -#define UNUSED_PINS {B2,D0,D1,D2,D3,D5} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/mx5160/config.h b/keyboards/evyd13/mx5160/config.h index caa88da9a5..eccfd287b7 100644 --- a/keyboards/evyd13/mx5160/config.h +++ b/keyboards/evyd13/mx5160/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {C6,C7,B5,B6,D7,B4,D4,D6,D5,D3} #define MATRIX_COL_PINS {D0,D1,D2,F7,F6,F5,F4,F1,F0,E6} -#define UNUSED_PINS {B7,B0} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/evyd13/nt660/config.h b/keyboards/evyd13/nt660/config.h index 716c910911..be1b892280 100644 --- a/keyboards/evyd13/nt660/config.h +++ b/keyboards/evyd13/nt660/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS {B7,E6,F6,F7,C7} #define MATRIX_COL_PINS {D6,D7,B4,B5,B6,C6,B0,B1,B2,B3,F0,F1,F4,F5,D4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/nt750/config.h b/keyboards/evyd13/nt750/config.h index 68d7603202..30f453ebd8 100644 --- a/keyboards/evyd13/nt750/config.h +++ b/keyboards/evyd13/nt750/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS {B2,B3,B7,D0,D1,D2} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,D4,E6,B1,B0} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/nt980/config.h b/keyboards/evyd13/nt980/config.h index 785507d0c8..b4757a844d 100644 --- a/keyboards/evyd13/nt980/config.h +++ b/keyboards/evyd13/nt980/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, D1, D0, C6, C7, B5, B6, B4, D7, D4, D6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/omrontkl/config.h b/keyboards/evyd13/omrontkl/config.h index 40ba73dfe9..9f51b63a9f 100644 --- a/keyboards/evyd13/omrontkl/config.h +++ b/keyboards/evyd13/omrontkl/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D0,D1,D2,D3,D4,B7} #define MATRIX_COL_PINS {F0,C7,F1,C6,F4,B6,F5,B5,F6,B4,F7,D7,D6,D5,B3,B1,B2} -#define UNUSED_PINS {E6,B0} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/pockettype/config.h b/keyboards/evyd13/pockettype/config.h index f4755a1b42..21e27d130e 100644 --- a/keyboards/evyd13/pockettype/config.h +++ b/keyboards/evyd13/pockettype/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {D3,D1,D7,B5} #define MATRIX_COL_PINS {F6,F7,B1,B3,B2,B6,B4,E6,C6,D4,D0,D2} -#define UNUSED_PINS {B1,B2,B3} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/quackfire/config.h b/keyboards/evyd13/quackfire/config.h index 60d1164551..c2bf0598c3 100644 --- a/keyboards/evyd13/quackfire/config.h +++ b/keyboards/evyd13/quackfire/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS {D3,F5,F4,F0,B7,B2,E6,B0} #define MATRIX_COL_PINS {B3,F1,B1,D5,D2,D1,D0,D4,D6,D7,B4,B5,B6,C6,C7} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/evyd13/solheim68/config.h b/keyboards/evyd13/solheim68/config.h index d5d8d4fc24..d622cc1695 100644 --- a/keyboards/evyd13/solheim68/config.h +++ b/keyboards/evyd13/solheim68/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {E6,B0,B1,B2,B3} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,D4,D5,D3} -#define UNUSED_PINS {B7,D0,D1,D2} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/evyd13/ta65/config.h b/keyboards/evyd13/ta65/config.h index 4ea54f6a2a..a65210e0ed 100644 --- a/keyboards/evyd13/ta65/config.h +++ b/keyboards/evyd13/ta65/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} #define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} -#define UNUSED_PINS #define ENCODERS_PAD_A { B2 } #define ENCODERS_PAD_B { B1 } diff --git a/keyboards/evyd13/wasdat/config.h b/keyboards/evyd13/wasdat/config.h index 821cc26b65..02db1dc2ab 100644 --- a/keyboards/evyd13/wasdat/config.h +++ b/keyboards/evyd13/wasdat/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D6, D4, F6, F7, F4, F5, F0, F1 } #define MATRIX_COL_PINS { C7, B6, C6, B4, B5, D7, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, D3, B7, B3 } // Columns 6-12 controlled by demux -#define UNUSED_PINS #define SN74X138_ADDRESS_PINS { D2, D1, D0 } diff --git a/keyboards/evyd13/wasdat_code/config.h b/keyboards/evyd13/wasdat_code/config.h index 84c2614c39..ca79477e12 100644 --- a/keyboards/evyd13/wasdat_code/config.h +++ b/keyboards/evyd13/wasdat_code/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, C7, C6, B6, B5, B4, D7, D6 } #define MATRIX_COL_PINS { F7, F5, F6, F1, F4, F0, NO_PIN, D5, D3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } // Columns 6 and 9-15 controlled by demux -#define UNUSED_PINS #define SN74X138_ADDRESS_PINS { D2, D1, D0 } #define SN74X138_E3_PIN D4 diff --git a/keyboards/evyd13/wonderland/config.h b/keyboards/evyd13/wonderland/config.h index 538c1ef889..b0ac35cff8 100644 --- a/keyboards/evyd13/wonderland/config.h +++ b/keyboards/evyd13/wonderland/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B0,D1,D2,D3,D5} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,C7,C6,B6,B5,B4,D7,D6,D4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/exclusive/e65/config.h b/keyboards/exclusive/e65/config.h index 49f4e916d9..6b65d5ea9b 100644 --- a/keyboards/exclusive/e65/config.h +++ b/keyboards/exclusive/e65/config.h @@ -27,7 +27,6 @@ { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS \ { C6, C7, D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/exclusive/e65/keymaps/masterzen/keymap.c b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c index 156832de4e..898a294f7e 100644 --- a/keyboards/exclusive/e65/keymaps/masterzen/keymap.c +++ b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c @@ -102,7 +102,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { edit = false; } - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _ADJUST: temp_config.mode = rgblight_get_mode(); rgblight_mode_noeeprom(1); diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h index d00a6ac715..c4765ce93c 100644 --- a/keyboards/exclusive/e6_rgb/config.h +++ b/keyboards/exclusive/e6_rgb/config.h @@ -12,7 +12,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F1, F4, F5, F6, D6 } #define MATRIX_COL_PINS { D7, B4, B5, B6, C6, C7, F7, F0, B0, B1, D2, D3, B3, B2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW //rgb light setting diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 0999d13bf1..6f684a24e6 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* QMK E6-V2 PCB default pin-out */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B7 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/exclusive/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h index 213fb34947..6e82f4650b 100644 --- a/keyboards/exclusive/e6v2/oe/config.h +++ b/keyboards/exclusive/e6v2/oe/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* QMK E6-V2 PCB default pin-out */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { C7, C6, B5, B4, D7, D6, D4, F6, F7, F5, F4, F1, F0, B0, B1 } -#define UNUSED_PINS { E6, B2, B3, B7 } #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index 217885e44f..ff985f4255 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } #define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c index 6987e84021..2793cffe93 100644 --- a/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c +++ b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c @@ -121,7 +121,7 @@ layer_state_t layer_state_set_user(layer_state_t state) edit = false; } - switch (biton32(state)) + switch (get_highest_layer(state)) { case _ADJUST: mode = rgblight_get_mode(); diff --git a/keyboards/exclusive/e7v1se/config.h b/keyboards/exclusive/e7v1se/config.h index 2eee4ef01f..32e913bd12 100644 --- a/keyboards/exclusive/e7v1se/config.h +++ b/keyboards/exclusive/e7v1se/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, F0 } #define MATRIX_COL_PINS { D5, D3, D2, D1, D0, D7, D6, D4, B4, B5, B6, C6, C7, F7, F6, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index 2683403204..49d5efc7b0 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B7, F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h index 6f51688db7..ad7938f17c 100644 --- a/keyboards/exent/config.h +++ b/keyboards/exent/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } #define MATRIX_COL_PINS { D7, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A1, A0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eyeohdesigns/babyv/config.h b/keyboards/eyeohdesigns/babyv/config.h index 75b5e19384..00f609b282 100644 --- a/keyboards/eyeohdesigns/babyv/config.h +++ b/keyboards/eyeohdesigns/babyv/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B5, D2, D5, D3 } #define MATRIX_COL_PINS { D0, D1, B4, D7, D6, D4, B0, B1, B2, F0, F1, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/eyeohdesigns/theboulevard/config.h b/keyboards/eyeohdesigns/theboulevard/config.h index ad3d630f4f..7417e63143 100644 --- a/keyboards/eyeohdesigns/theboulevard/config.h +++ b/keyboards/eyeohdesigns/theboulevard/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7, B1, E6, F0, F1 } #define MATRIX_COL_PINS { B0, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 3a38df9130..1dc4236c51 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h index 3bd00eebae..4aa7aaf348 100755 --- a/keyboards/fallacy/config.h +++ b/keyboards/fallacy/config.h @@ -26,7 +26,6 @@ */ #define MATRIX_ROW_PINS { B1, B2, B3, C6, C7 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS { B0, B7 } /* COL2ROW or ROW2COL */ diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index 99089e9e0a..68c14ea61c 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } // #define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } -// #define UNUSED_PINS //#define DIODE_DIRECTION diff --git a/keyboards/feels/feels65/config.h b/keyboards/feels/feels65/config.h index 13ce5c6afd..d036fdddd9 100644 --- a/keyboards/feels/feels65/config.h +++ b/keyboards/feels/feels65/config.h @@ -24,6 +24,5 @@ /* default pinout */ #define MATRIX_ROW_PINS { D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ferris/0_2/config.h b/keyboards/ferris/0_2/config.h index f51e5dd8f1..4e454fd0a0 100644 --- a/keyboards/ferris/0_2/config.h +++ b/keyboards/ferris/0_2/config.h @@ -52,8 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B7, B6, B5, A2, A0, A0, A0, A0 } #define MATRIX_COL_PINS \ { B8, B4, B3, A15, A14, A1, A1, A1, A1, A1 } -#define UNUSED_PINS \ - { A3, A4, A5, A6, A7, A8, A9, A10, A13, B0, B1, B2, B9, B12, B13, B14, B15, C13, C14, C15, F0, F1 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ferris/sweep/config.h b/keyboards/ferris/sweep/config.h index 4d4d7d309f..c74c1bf6c5 100644 --- a/keyboards/ferris/sweep/config.h +++ b/keyboards/ferris/sweep/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018-2020 +/* Copyright 2018-2020 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp> David Philip Barr <@davidphilipbarr> Pierre Chevalier <pierrechevalier83@gmail.com> @@ -32,17 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 8 #define MATRIX_COLS 5 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * NO_DIODE = switches are directly connected to AVR pins - * -*/ #define DIRECT_PINS { \ { E6, F7, F6, F5, F4 }, \ { B1, B3, B2, B6, D3 }, \ @@ -57,10 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B5, B4, NO_PIN, NO_PIN, NO_PIN } \ } - - -#define UNUSED_PINS - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/ferris/sweep/readme.md b/keyboards/ferris/sweep/readme.md index 332ab2c790..b66bed5df0 100644 --- a/keyboards/ferris/sweep/readme.md +++ b/keyboards/ferris/sweep/readme.md @@ -31,6 +31,13 @@ For Elite-C or compatible controllers using `DFU` bootloader, add the line `BOOT [QMK Toolbox](http://qmk.fm/toolbox) can also be used to set EEPROM handedness. Place the controller in bootloader mode and select menu option Tools -> EEPROM -> Set Left/Right Hand +### RP2040 Controllers + +Pro Micro RP2040 controllers are supported with [QMK Converters](https://docs.qmk.fm/#/feature_converters). The make command example with handedness setting for Adafruit's KB2040 are: + + make CONVERT_TO=kb2040 ferris/sweep:default:uf2-split-left + make CONVERT_TO=kb2040 ferris/sweep:default:uf2-split-right + ## Bootloader Enter the bootloader in 3 ways: diff --git a/keyboards/fjlabs/7vhotswap/config.h b/keyboards/fjlabs/7vhotswap/config.h index bc03d3d79e..1bb8d77a22 100644 --- a/keyboards/fjlabs/7vhotswap/config.h +++ b/keyboards/fjlabs/7vhotswap/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B0, F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/ad65/config.h b/keyboards/fjlabs/ad65/config.h index cbab1ed111..de19592464 100644 --- a/keyboards/fjlabs/ad65/config.h +++ b/keyboards/fjlabs/ad65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/bks65/config.h b/keyboards/fjlabs/bks65/config.h index 7f0fb50e3e..d7da95f678 100644 --- a/keyboards/fjlabs/bks65/config.h +++ b/keyboards/fjlabs/bks65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/bks65solder/config.h b/keyboards/fjlabs/bks65solder/config.h index 8d65b22434..5bb4800aa0 100644 --- a/keyboards/fjlabs/bks65solder/config.h +++ b/keyboards/fjlabs/bks65solder/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/bolsa65/config.h b/keyboards/fjlabs/bolsa65/config.h index e3280216be..4c0b2bdfad 100644 --- a/keyboards/fjlabs/bolsa65/config.h +++ b/keyboards/fjlabs/bolsa65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F1, F0, F6, F5, F4 } #define MATRIX_COL_PINS { C7, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/kf87/config.h b/keyboards/fjlabs/kf87/config.h index 9f4a3b239b..0313d0247d 100644 --- a/keyboards/fjlabs/kf87/config.h +++ b/keyboards/fjlabs/kf87/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B4, B5, B6, C0, E1, E0 } #define MATRIX_COL_PINS { F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/kyuu/config.h b/keyboards/fjlabs/kyuu/config.h index 59ce1c61fa..7d83a83dc8 100644 --- a/keyboards/fjlabs/kyuu/config.h +++ b/keyboards/fjlabs/kyuu/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/ldk65/config.h b/keyboards/fjlabs/ldk65/config.h index b37f371812..5321f569fa 100644 --- a/keyboards/fjlabs/ldk65/config.h +++ b/keyboards/fjlabs/ldk65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/midway60/config.h b/keyboards/fjlabs/midway60/config.h index 9dde640bee..d218cb7022 100644 --- a/keyboards/fjlabs/midway60/config.h +++ b/keyboards/fjlabs/midway60/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/mk61rgbansi/config.h b/keyboards/fjlabs/mk61rgbansi/config.h index 54a787103f..02b2a741d4 100644 --- a/keyboards/fjlabs/mk61rgbansi/config.h +++ b/keyboards/fjlabs/mk61rgbansi/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/polaris/config.h b/keyboards/fjlabs/polaris/config.h index 87d8423b9f..dc6fce6c84 100644 --- a/keyboards/fjlabs/polaris/config.h +++ b/keyboards/fjlabs/polaris/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/ready100/config.h b/keyboards/fjlabs/ready100/config.h index 8edf1c5d08..9258d4ddba 100644 --- a/keyboards/fjlabs/ready100/config.h +++ b/keyboards/fjlabs/ready100/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/sinanju/config.h b/keyboards/fjlabs/sinanju/config.h index 01d81a2f3d..751dd24383 100644 --- a/keyboards/fjlabs/sinanju/config.h +++ b/keyboards/fjlabs/sinanju/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/solanis/config.h b/keyboards/fjlabs/solanis/config.h index 40b9ad8525..05c528efb6 100644 --- a/keyboards/fjlabs/solanis/config.h +++ b/keyboards/fjlabs/solanis/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B4, B5, B6, C0, E1, E0 } #define MATRIX_COL_PINS { F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/swordfish/config.h b/keyboards/fjlabs/swordfish/config.h index ad184d17b6..0a0f66f275 100644 --- a/keyboards/fjlabs/swordfish/config.h +++ b/keyboards/fjlabs/swordfish/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B0, B1, C7, C6, B6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B2, B3, B7, B5, B4, D7, D6, D4, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/tf60ansi/config.h b/keyboards/fjlabs/tf60ansi/config.h index 54a787103f..02b2a741d4 100644 --- a/keyboards/fjlabs/tf60ansi/config.h +++ b/keyboards/fjlabs/tf60ansi/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/tf60v2/config.h b/keyboards/fjlabs/tf60v2/config.h index 54a787103f..02b2a741d4 100644 --- a/keyboards/fjlabs/tf60v2/config.h +++ b/keyboards/fjlabs/tf60v2/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fjlabs/tf65rgbv2/config.h b/keyboards/fjlabs/tf65rgbv2/config.h index 4a71d1dac7..981eb2144e 100644 --- a/keyboards/fjlabs/tf65rgbv2/config.h +++ b/keyboards/fjlabs/tf65rgbv2/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flehrad/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h index c0f73366a7..dbb23e1ffb 100644 --- a/keyboards/flehrad/bigswitch/config.h +++ b/keyboards/flehrad/bigswitch/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B5 } #define MATRIX_COL_PINS { B6 } -#define UNUSED_PINS { } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/flehrad/bigswitch/keymaps/333fred/config.h b/keyboards/flehrad/bigswitch/keymaps/333fred/config.h index 3273cc8db4..6e9219115c 100644 --- a/keyboards/flehrad/bigswitch/keymaps/333fred/config.h +++ b/keyboards/flehrad/bigswitch/keymaps/333fred/config.h @@ -24,3 +24,4 @@ // Long tapping term on the big switch, because it takes so long to press #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD diff --git a/keyboards/flehrad/downbubble/config.h b/keyboards/flehrad/downbubble/config.h index fa13006a97..2d22a98ae4 100644 --- a/keyboards/flehrad/downbubble/config.h +++ b/keyboards/flehrad/downbubble/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F2, F3, F4, F5, F6 } #define MATRIX_COL_PINS { F7, C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flehrad/numbrero/config.h b/keyboards/flehrad/numbrero/config.h index 8360dfb3f9..f39e99c8bb 100644 --- a/keyboards/flehrad/numbrero/config.h +++ b/keyboards/flehrad/numbrero/config.h @@ -16,7 +16,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, B5, B4, E6, F7 } #define MATRIX_COL_PINS { D1, D0, D4, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flehrad/snagpad/config.h b/keyboards/flehrad/snagpad/config.h index 946534ebb8..728c624462 100644 --- a/keyboards/flehrad/snagpad/config.h +++ b/keyboards/flehrad/snagpad/config.h @@ -16,7 +16,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flehrad/tradestation/config.h b/keyboards/flehrad/tradestation/config.h index 6b8f021ebc..aef6f60472 100644 --- a/keyboards/flehrad/tradestation/config.h +++ b/keyboards/flehrad/tradestation/config.h @@ -31,7 +31,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, C6, D4, D0 } #define MATRIX_COL_PINS { F7, B1, D7, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index 3e7da10503..d10f94bc00 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { C7, B6, B3, B5, B4, D7, D4, D5, D3, D2, D1, D0, B7, B0, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fluorite/config.h b/keyboards/fluorite/config.h index b414389c0b..f4e973d5d1 100644 --- a/keyboards/fluorite/config.h +++ b/keyboards/fluorite/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flx/lodestone/config.h b/keyboards/flx/lodestone/config.h index 844e769a6c..b232e7f06e 100644 --- a/keyboards/flx/lodestone/config.h +++ b/keyboards/flx/lodestone/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B3, B7, F0, F1, F4 } #define MATRIX_COL_PINS { B2, F5, F6, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/flygone60/rev3/config.h b/keyboards/flygone60/rev3/config.h index e75eb64617..cb752315e0 100644 --- a/keyboards/flygone60/rev3/config.h +++ b/keyboards/flygone60/rev3/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, D5, B7, F1} #define MATRIX_COL_PINS { F0, E6, B1, B2, B3, B0, D4, D6, D7, B4, B5, B6, C6, C7} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/foostan/cornelius/config.h b/keyboards/foostan/cornelius/config.h index fa3493e455..e3b7ed4f64 100644 --- a/keyboards/foostan/cornelius/config.h +++ b/keyboards/foostan/cornelius/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, C7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/for_science/config.h b/keyboards/for_science/config.h index 32c335bbb3..f3f2d1ffc9 100644 --- a/keyboards/for_science/config.h +++ b/keyboards/for_science/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } //#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } -#define UNUSED_PINS //#define USE_I2C #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index a0eb1b93e6..725e3d7a79 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D1, D0, D3, D5 } #define MATRIX_COL_PINS { F5, F4, F1, F0, B0, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 270cf0ad6e..eb702fc948 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } #define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/foxlab/time80/config.h b/keyboards/foxlab/time80/config.h index 7e7e521f27..e0a1cbeaf8 100644 --- a/keyboards/foxlab/time80/config.h +++ b/keyboards/foxlab/time80/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B1, B2, B3, B5, B6, B7, B0 } #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7, A0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fr4/southpaw75/config.h b/keyboards/fr4/southpaw75/config.h index d96d5bc20c..3f613c371b 100644 --- a/keyboards/fr4/southpaw75/config.h +++ b/keyboards/fr4/southpaw75/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { B5, F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fr4/unix60/config.h b/keyboards/fr4/unix60/config.h index 03ae2c509d..5e0b52ee80 100644 --- a/keyboards/fr4/unix60/config.h +++ b/keyboards/fr4/unix60/config.h @@ -26,7 +26,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { E6, B4, B5, F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index c494f6aa77..9db3d0abe5 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -10,7 +10,6 @@ #define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { B3, B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/fractal/keymaps/default/keymap.c b/keyboards/fractal/keymaps/default/keymap.c index 6b0a8cc18c..ded4890d8c 100644 --- a/keyboards/fractal/keymaps/default/keymap.c +++ b/keyboards/fractal/keymaps/default/keymap.c @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_5x12( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/free_willy/config.h b/keyboards/free_willy/config.h index 918821b787..a5250a8c39 100644 --- a/keyboards/free_willy/config.h +++ b/keyboards/free_willy/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/friedrich/config.h b/keyboards/friedrich/config.h index 5b601cf6c0..531a9af4d5 100644 --- a/keyboards/friedrich/config.h +++ b/keyboards/friedrich/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F4, F1, F0, F5, D5 } #define MATRIX_COL_PINS { F6, F7, E6, B2, B3, D4, D6, D7, B4, C6, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index bf727460c6..d922620dde 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D #define MATRIX_ROW_PINS { B0, B1, B2, B3, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } -#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/function96/v1/config.h b/keyboards/function96/v1/config.h index 9f36f8b5f5..e3f603cd7c 100644 --- a/keyboards/function96/v1/config.h +++ b/keyboards/function96/v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F0, C15, C14, C13, B9 } #define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B10, B12, A13, A14, A15, B3, B4, B5, B6, B7, B8} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/function96/v2/config.h b/keyboards/function96/v2/config.h index 5c49a16785..5f44ea397e 100644 --- a/keyboards/function96/v2/config.h +++ b/keyboards/function96/v2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A9, A8, B15, B14, B13, B12 } #define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, A14, A15, B3, B4, B5, B6, B7, B8, B9} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/funky40/config.h b/keyboards/funky40/config.h index 2346adef27..20e2c890a4 100644 --- a/keyboards/funky40/config.h +++ b/keyboards/funky40/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, C6, B4, B5 } #define MATRIX_COL_PINS { D3, F5, F4, F7, B1, B6, B2, B3, D2, F6, E6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gboards/butterstick/config.h b/keyboards/gboards/butterstick/config.h index 84e1899081..50f23cb945 100644 --- a/keyboards/gboards/butterstick/config.h +++ b/keyboards/gboards/butterstick/config.h @@ -12,7 +12,6 @@ #define MATRIX_COLS 10 #define MATRIX_ROW_PINS { F4, F5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/gboards/gergo/keymaps/colemak/keymap.c b/keyboards/gboards/gergo/keymaps/colemak/keymap.c index b2e79114f2..35b1e0b653 100644 --- a/keyboards/gboards/gergo/keymaps/colemak/keymap.c +++ b/keyboards/gboards/gergo/keymaps/colemak/keymap.c @@ -146,8 +146,8 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - //uint8_t layer = biton32(layer_state); - biton32(layer_state); + //uint8_t layer = get_highest_layer(layer_state); + get_highest_layer(layer_state); }; @@ -171,4 +171,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; }; - diff --git a/keyboards/gboards/gergoplex/config.h b/keyboards/gboards/gergoplex/config.h index f118bb4017..bd8c075190 100644 --- a/keyboards/gboards/gergoplex/config.h +++ b/keyboards/gboards/gergoplex/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, F5, F4, F1 } #define MATRIX_COL_PINS { B1, B2, B3, D2, D3 } -#define UNUSED_PINS #define IGNORE_MOD_TAP_INTERRUPT #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h index f66c334b85..e2c27583fa 100644 --- a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h +++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h @@ -27,3 +27,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define COMBO_ALLOW_ACTION_KEYS #define COMBO_VARIABLE_LEN + +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c index e3b8944814..8b832cbac8 100644 --- a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c +++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c @@ -199,5 +199,14 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [GAME] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) + [GAME] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset) }; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: + return 275; + default: + return TAPPING_TERM; + } +} diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h index 69c87cd154..7ddbefea2a 100644 --- a/keyboards/geekboards/macropad_v2/config.h +++ b/keyboards/geekboards/macropad_v2/config.h @@ -20,7 +20,6 @@ #define MATRIX_COLS 4 #define DIRECT_PINS {{B13, B15, B3, B5}, {B12, B14, A13, B7}} -#define UNUSED_PINS #define RGBLED_NUM 42 #define DRIVER_LED_TOTAL 42 diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index 47cb82f215..bdf2d39c98 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -7,7 +7,6 @@ #define MATRIX_ROW_PINS { B0, D4} #define MATRIX_COL_PINS { F7, F6, D2, D3} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define LOCKING_SUPPORT_ENABL diff --git a/keyboards/generic_panda/panda65_01/config.h b/keyboards/generic_panda/panda65_01/config.h index 41cf77a389..e3cab53758 100644 --- a/keyboards/generic_panda/panda65_01/config.h +++ b/keyboards/generic_panda/panda65_01/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A9, A8, B15, A6, A4 } #define MATRIX_COL_PINS { A3, A10, B7, B6, B5, B4, B3, A15, A14, A2, A1, A0, F1, F0, B10, B11 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/genone/eclipse_65/config.h b/keyboards/genone/eclipse_65/config.h index c13f04ad29..0bc5fa68a1 100644 --- a/keyboards/genone/eclipse_65/config.h +++ b/keyboards/genone/eclipse_65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B3, B7, B0, B1, B2 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/genone/g1_65/config.h b/keyboards/genone/g1_65/config.h index ecbbf6e8c4..de1714f7cd 100644 --- a/keyboards/genone/g1_65/config.h +++ b/keyboards/genone/g1_65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B3, B7, B0, B1, B2 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gentleman65/config.h b/keyboards/gentleman65/config.h index a58111d7df..7ebaae3e5a 100644 --- a/keyboards/gentleman65/config.h +++ b/keyboards/gentleman65/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D1, F7, F1 } #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, D5, C7, F0, B2, B1, B3, B0, B7, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gh60/revc/config.h b/keyboards/gh60/revc/config.h index f7f85bfaf7..286bb53cba 100644 --- a/keyboards/gh60/revc/config.h +++ b/keyboards/gh60/revc/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } // Rev B/C #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c index 964f40f1c0..ffb87ef009 100644 --- a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c +++ b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_scan_user(void) { - uint32_t layer = layer_state; + layer_state_t layer = layer_state; if (layer & (1<<1)) { gh60_fn_led_on(); @@ -120,4 +120,4 @@ void matrix_scan_user(void) { } else { gh60_esc_led_off(); } -};
\ No newline at end of file +}; diff --git a/keyboards/gh60/revc/keymaps/default/keymap.c b/keyboards/gh60/revc/keymaps/default/keymap.c index a8fd4f3c22..4ebc71ff4b 100644 --- a/keyboards/gh60/revc/keymaps/default/keymap.c +++ b/keyboards/gh60/revc/keymaps/default/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { //Layer LED indicators - uint32_t layer = layer_state; + layer_state_t layer = layer_state; if (layer & (1<<1)) { gh60_wasd_leds_on(); diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index b84e7564fc..77bf54de63 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -97,7 +97,7 @@ void matrix_scan_user(void) { // Layer LED indicators // ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster - uint32_t layer = layer_state; + layer_state_t layer = layer_state; if (layer & (1<<1)) { gh60_wasd_leds_on(); } else { diff --git a/keyboards/gh60/satan/config.h b/keyboards/gh60/satan/config.h index 487400d574..3a094be74f 100644 --- a/keyboards/gh60/satan/config.h +++ b/keyboards/gh60/satan/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B2 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/gh60/satan/keymaps/addcninblue/keymap.c b/keyboards/gh60/satan/keymaps/addcninblue/keymap.c index 5012fee56b..2b1a417fb5 100644 --- a/keyboards/gh60/satan/keymaps/addcninblue/keymap.c +++ b/keyboards/gh60/satan/keymaps/addcninblue/keymap.c @@ -177,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (old_layer != layer) { switch (layer) { diff --git a/keyboards/gh60/satan/keymaps/admiralStrokers/config.h b/keyboards/gh60/satan/keymaps/admiralStrokers/config.h index b1c1600e9d..5bb9bd59a8 100644 --- a/keyboards/gh60/satan/keymaps/admiralStrokers/config.h +++ b/keyboards/gh60/satan/keymaps/admiralStrokers/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 diff --git a/keyboards/gh60/satan/keymaps/fakb/config.h b/keyboards/gh60/satan/keymaps/fakb/config.h index fcdf1f1528..720b359c1e 100644 --- a/keyboards/gh60/satan/keymaps/fakb/config.h +++ b/keyboards/gh60/satan/keymaps/fakb/config.h @@ -18,7 +18,6 @@ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h index 1476722c74..b3df0ae2f6 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F1, F0, F5, F6, F7, D4, D5, D3, D2, D0 } #define MATRIX_COL_PINS { C7, C6, B4, D7, B3, B2, B0, E6, B1, D1, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ghs/rar/config.h b/keyboards/ghs/rar/config.h index 33ce4f0e5c..7b93dc2197 100644 --- a/keyboards/ghs/rar/config.h +++ b/keyboards/ghs/rar/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gizmo_engineering/gk6/config.h b/keyboards/gizmo_engineering/gk6/config.h index 5bc2e400bf..1a8bf51312 100755 --- a/keyboards/gizmo_engineering/gk6/config.h +++ b/keyboards/gizmo_engineering/gk6/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4} #define MATRIX_COL_PINS { B5, C6, C7, F7, F6, D5, D3, D2, F1, F4, B7, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/gkeyboard/gkb_m16/config.h b/keyboards/gkeyboard/gkb_m16/config.h index 3e89084879..9df13da954 100644 --- a/keyboards/gkeyboard/gkb_m16/config.h +++ b/keyboards/gkeyboard/gkb_m16/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, D5, D6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gl516/a52gl/config.h b/keyboards/gl516/a52gl/config.h index 8c7ea45bbd..0841d8e26e 100644 --- a/keyboards/gl516/a52gl/config.h +++ b/keyboards/gl516/a52gl/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring of each half #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/gl516/j73gl/config.h b/keyboards/gl516/j73gl/config.h index 01dc309a5c..bbbb1110c6 100644 --- a/keyboards/gl516/j73gl/config.h +++ b/keyboards/gl516/j73gl/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring of each half #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, E6 } -#define UNUSED_PINS /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/gl516/n51gl/config.h b/keyboards/gl516/n51gl/config.h index 69e770a6b9..44b31834c1 100644 --- a/keyboards/gl516/n51gl/config.h +++ b/keyboards/gl516/n51gl/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring of each half #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D7 } #define ENCODERS_PAD_B { E6 } diff --git a/keyboards/glenpickle/chimera_ergo/keymaps/default/keymap.c b/keyboards/glenpickle/chimera_ergo/keymaps/default/keymap.c index 51ab0e92cd..dd7e32f7dc 100644 --- a/keyboards/glenpickle/chimera_ergo/keymaps/default/keymap.c +++ b/keyboards/glenpickle/chimera_ergo/keymaps/default/keymap.c @@ -131,7 +131,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: diff --git a/keyboards/glenpickle/chimera_ls/keymaps/default/keymap.c b/keyboards/glenpickle/chimera_ls/keymaps/default/keymap.c index 0affeef389..1ae70e6245 100644 --- a/keyboards/glenpickle/chimera_ls/keymaps/default/keymap.c +++ b/keyboards/glenpickle/chimera_ls/keymaps/default/keymap.c @@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: diff --git a/keyboards/glenpickle/chimera_ortho/keymaps/default/keymap.c b/keyboards/glenpickle/chimera_ortho/keymaps/default/keymap.c index 6a676493dd..bc783f540c 100644 --- a/keyboards/glenpickle/chimera_ortho/keymaps/default/keymap.c +++ b/keyboards/glenpickle/chimera_ortho/keymaps/default/keymap.c @@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: diff --git a/keyboards/gmmk/gmmk2/p96/ansi/ansi.c b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c new file mode 100644 index 0000000000..455a598982 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/ansi.c @@ -0,0 +1,332 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ansi.h" + +#ifdef RGB_MATRIX_ENABLE + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, k00, Esc + {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 1, k10, F1 + {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 2, k20, F2 + {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 3, k30, F3 + {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 4, k40, F4 + {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 5, k50, F5 + {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 6, k60, F6 + {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 7, k70, F7 + {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 8, k80, F8 + {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 9, k90, F9 + {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 10, ka0, F10 + {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 11, kb0, F11 + {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 12, kc0, F12 + {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 13, kd0, Printscreen + {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 14, k06, Delete + {1, CS1_SW2, CS2_SW2, CS3_SW2}, // 15, k16, Insert + {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 16, k26, Page Up + {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 17, k36, Page Down + + {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 18, k01, ` + {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 19, k11, 1 + {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 20, k21, 2 + {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 21, k31, 3 + {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 22, k41, 4 + {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 23, k51, 5 + {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 24, k61, 6 + {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 25, k71, 7 + {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 26, k81, 8 + {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 27, k91, 9 + {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 28, ka1, 0 + {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 29, kb1, - + {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 30, kc1, = + {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 31, kd1, Backspace + {1, CS7_SW1, CS8_SW1, CS9_SW1}, // 32, k46, Num Lock + {1, CS7_SW2, CS8_SW2, CS9_SW2}, // 33, k56, Num / + {1, CS7_SW3, CS8_SW3, CS9_SW3}, // 34, k66, Num * + {1, CS7_SW4, CS8_SW4, CS9_SW4}, // 35, k76, Num - + + {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 36, k02, Tab + {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 37, k12, Q + {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 38, k22, W + {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 39, k32, E + {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 40, k42, R + {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 41, k52, T + {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 42, k62, Y + {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 43, k72, U + {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 44, k82, I + {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 45, k92, O + {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 46, ka2, P + {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 47, kb2, [ + {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 48, kc2, ] + {1, CS1_SW9, CS2_SW9, CS3_SW9}, // 49, kd3, "\\" + {1, CS7_SW5, CS8_SW5, CS9_SW5}, // 50, k86, Num 7 + {1, CS7_SW6, CS8_SW6, CS9_SW6}, // 51, k96, Num 8 + {1, CS7_SW7, CS8_SW7, CS9_SW7}, // 52, ka6, Num 9 + {1, CS7_SW8, CS8_SW8, CS9_SW8}, // 53, kb6, Num + + + {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 54, k03, Caps Lock + {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 55, k13, A + {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 56, k23, S + {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 57, k33, D + {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 58, k43, F + {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 59, k53, G + {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 60, k63, H + {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 61, k73, J + {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 62, k83, K + {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 63, k93, L + {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 64, ka3, ; + {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 65, kb3, ' + {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 66, kc3, Enter + {1, CS7_SW9, CS8_SW9, CS9_SW9}, // 67, ka7, Num 4 + {1, CS7_SW10, CS8_SW10, CS9_SW10}, // 68, kb7, Num 5 + {1, CS7_SW11, CS8_SW11, CS9_SW11}, // 69, kc7, Num 6 + + {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 70, k04, Shift_L + {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 71, k24, Z + {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 72, k34, X + {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 73, k44, C + {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 74, k54, V + {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 75, k64, B + {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 76, k74, N + {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 77, k84, M + {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 78, k94, , + {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 79, ka4, . + {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 80, kb4, / + {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 81, kd4, Shift_R + {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 82, k17, Up + {1, CS10_SW1, CS11_SW1, CS12_SW1}, // 83, k67, Num 1 + {1, CS10_SW2, CS11_SW2, CS12_SW2}, // 84, k77, Num 2 + {1, CS10_SW3, CS11_SW3, CS12_SW3}, // 85, k87, Num 3 + {1, CS10_SW4, CS11_SW4, CS12_SW4}, // 86, k97, Enter_R + + {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 87, k05, Ctrl_L + {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 88, k15, Win_L + {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 89, k25, Alt_L + {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 90, k65, Space + {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 91, k95, Alt_R + {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 92, ka5, FN + {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 93, kc5, Ctrl_R + {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 94, k07, Left + {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 95, k27, Down + {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 96, k37, Right + {1, CS10_SW6, CS11_SW6, CS12_SW6}, // 97, k47, Num 0 + {1, CS10_SW7, CS11_SW7, CS12_SW7}, // 98, k57, Num . + + {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 101, LED 1 + {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 102, LED 2 + {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 103, LED 3 + {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 104, LED 4 + {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 105, LED 5 + {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 106, LED 6 + {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 107, LED 7 + {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 108, LED 8 + {1, CS13_SW9, CS14_SW9, CS15_SW9}, // 109, LED 9 + {1, CS13_SW10, CS14_SW10, CS15_SW10}, // 110, LED 10 + {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 111, LED 11 + {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 112, LED 12 + {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 113, LED 13 + {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 114, LED 14 + {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 115, LED 15 + {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 116, LED 16 + {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 117, LED 17 + {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 118, LED 18 + {1, CS16_SW9, CS17_SW9, CS18_SW9}, // 119, LED 19 + {1, CS16_SW10, CS17_SW10, CS18_SW10} // 120, LED 20 +}; + +#define __ NO_LED + +led_config_t g_led_config = {{ + { 0, 18, 36, 54, 70, 87, 14, 94}, + { 1, 19, 37, 55, __, 88, 15, 82}, + { 2, 20, 38, 56, 71, 89, 16, 95}, + { 3, 21, 39, 57, 72, __, 17, 96}, + { 4, 22, 40, 58, 73, __, 32, 97}, + { 5, 23, 41, 59, 74, __, 33, 98}, + { 6, 24, 42, 60, 75, 90, 34, 83}, + { 7, 25, 43, 61, 76, __, 35, 84}, + { 8, 26, 44, 62, 77, __, 50, 85}, + { 9, 27, 45, 63, 78, 91, 51, 86}, + {10, 28, 46, 64, 79, 92, 52, 67}, + {11, 29, 47, 65, 80, __, 53, 68}, + {12, 30, 48, __, __, 93, __, 69}, + {13, 31, 49, 66, 81, __, __, __} +}, { + { 11, 0}, // 0, k00, Esc + { 22, 0}, // 1, k10, F1 + { 33, 0}, // 2, k20, F2 + { 44, 0}, // 3, k30, F3 + { 55, 0}, // 4, k40, F4 + { 66, 0}, // 5, k50, F5 + { 77, 0}, // 6, k60, F6 + { 88, 0}, // 7, k70, F7 + { 99, 0}, // 8, k80, F8 + { 110, 0}, // 9, k90, F9 + { 121, 0}, // 10, ka0, F10 + { 132, 0}, // 11, kb0, F11 + { 143, 0}, // 12, kc0, F12 + { 154, 0}, // 13, kd0, Printscreen + { 165, 0}, // 14, k06, Delete + { 176, 0}, // 15, k16, Insert + { 187, 0}, // 16, k26, Page Up + { 198, 0}, // 17, k36, Page Down + + { 11, 11}, // 18, k01, ` + { 22, 11}, // 19, k11, 1 + { 33, 11}, // 20, k21, 2 + { 44, 11}, // 21, k31, 3 + { 55, 11}, // 22, k41, 4 + { 66, 11}, // 23, k51, 5 + { 77, 11}, // 24, k61, 6 + { 88, 11}, // 25, k71, 7 + { 99, 11}, // 26, k81, 8 + { 110, 11}, // 27, k91, 9 + { 121, 11}, // 28, ka1, 0 + { 132, 11}, // 29, kb1, - + { 143, 11}, // 30, kc1, = + { 154, 11}, // 31, kd1, Backspace + { 165, 11}, // 32, k46, Num Lock + { 176, 11}, // 33, k56, Num / + { 187, 11}, // 34, k66, Num * + { 198, 11}, // 35, k76, Num - + + { 11, 22}, // 36, k02, Tab + { 22, 22}, // 37, k12, Q + { 33, 22}, // 38, k22, W + { 44, 22}, // 39, k32, E + { 55, 22}, // 40, k42, R + { 66, 22}, // 41, k52, T + { 77, 22}, // 42, k62, Y + { 88, 22}, // 43, k72, U + { 99, 22}, // 44, k82, I + { 110, 22}, // 45, k92, O + { 121, 22}, // 46, ka2, P + { 132, 22}, // 47, kb2, [ + { 143, 22}, // 48, kc2, ] + { 154, 22}, // 49, kd3, "\\" + { 165, 22}, // 50, k86, Num 7 + { 176, 22}, // 51, k96, Num 8 + { 187, 22}, // 52, ka6, Num 9 + { 198, 22}, // 53, kb6, Num + + + { 11, 33}, // 54, k03, Caps Lock + { 22, 33}, // 55, k13, A + { 33, 33}, // 56, k23, S + { 44, 33}, // 57, k33, D + { 55, 33}, // 58, k43, F + { 66, 33}, // 59, k53, G + { 77, 33}, // 60, k63, H + { 88, 33}, // 61, k73, J + { 99, 33}, // 62, k83, K + { 110, 33}, // 63, k93, L + { 121, 33}, // 64, ka3, ; + { 132, 33}, // 65, kb3, ' + { 154, 33}, // 66, kc3, Enter + { 165, 33}, // 67, ka7, Num 4 + { 176, 33}, // 68, kb7, Num 5 + { 187, 33}, // 69, kc7, Num 6 + + { 11, 44}, // 70, k04, Shift_L + { 33, 44}, // 71, k24, Z + { 44, 44}, // 72, k34, X + { 55, 44}, // 73, k44, C + { 66, 44}, // 74, k54, V + { 77, 44}, // 75, k64, B + { 88, 44}, // 76, k74, N + { 99, 44}, // 77, k84, M + { 110, 44}, // 78, k94, , + { 121, 44}, // 79, ka4, . + { 132, 44}, // 80, kb4, / + { 143, 44}, // 81, kd4, Shift_R + { 154, 44}, // 82, k17, Up + { 165, 44}, // 83, k67, Num 1 + { 176, 44}, // 84, k77, Num 2 + { 187, 44}, // 85, k87, Num 3 + { 198, 44}, // 86, k97, Enter_R + + { 11, 55}, // 87, k05, Ctrl_L + { 22, 55}, // 88, k15, Win_L + { 33, 55}, // 89, k25, Alt_L + { 77, 55}, // 90, k65, Space + { 110, 55}, // 91, k95, Alt_R + { 121, 55}, // 92, ka5, FN + { 132, 55}, // 93, kc5, Ctrl_R + { 143, 55}, // 94, k07, Left + { 154, 55}, // 95, k27, Down + { 165, 55}, // 96, k37, Right + { 176, 55}, // 97, k47, Num 0 + { 187, 55}, // 98, k57, Num . + + { 0, 0}, // 101, LED 1 + { 0, 6}, // 102, LED 2 + { 0, 12}, // 103, LED 3 + { 0, 18}, // 104, LED 4 + { 0, 24}, // 105, LED 5 + { 0, 30}, // 106, LED 6 + { 0, 36}, // 107, LED 7 + { 0, 42}, // 108, LED 8 + { 0, 48}, // 109, LED 9 + { 0, 54}, // 110, LED 10 + { 209, 0}, // 111, LED 11 + { 209, 6}, // 112, LED 12 + { 209, 12}, // 113, LED 13 + { 209, 18}, // 114, LED 14 + { 209, 24}, // 115, LED 15 + { 209, 30}, // 116, LED 16 + { 209, 36}, // 117, LED 17 + { 209, 42}, // 118, LED 18 + { 209, 48}, // 119, LED 19 + { 209, 54} // 120, LED 20 +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif + +#ifdef EEPROM_ENABLE + +#include "spi_master.h" + +void spi_init(void) { + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; + + // Try releasing special pins for a short time + setPinInput(SPI_SCK_PIN); + setPinInput(SPI_MOSI_PIN); + setPinInput(SPI_MISO_PIN); + + chThdSleepMilliseconds(10); + + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_WB32_CURRENT_LEVEL3); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + } +} + +#endif diff --git a/keyboards/gmmk/gmmk2/p96/ansi/ansi.h b/keyboards/gmmk/gmmk2/p96/ansi/ansi.h new file mode 100644 index 0000000000..d449a198df --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/ansi.h @@ -0,0 +1,54 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Del Ins PgUp PgDn +// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Num / * - +// Tab Q W E R T Y U I O P [ ] \\ 7 8 9 + +// Caps A S D F G H J K L ; ' Enter 4 5 6 + +// Sh_L Z X C V B N M , . / Sh_R Up 1 2 3 Enter +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right 0 . Enter + +// clang-format off +#define LAYOUT( \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, k06, k16, k26, k36,\ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, k46, k56, k66, k76,\ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, k86, k96, ka6, kb6,\ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kd3, ka7, kb7, kc7, \ + k04, k24, k34, k44, k54, k64, k74, k84, k94, ka4, kb4, kd4, k17, k67, k77, k87, k97,\ + k05, k15, k25, k65, k95, ka5, kc5, k07, k27, k37, k47, k57 \ +)\ +{\ + { k00, k01, k02, k03, k04, k05, k06, k07},\ + { k10, k11, k12, k13, ___, k15, k16, k17},\ + { k20, k21, k22, k23, k24, k25, k26, k27},\ + { k30, k31, k32, k33, k34, ___, k36, k37},\ + { k40, k41, k42, k43, k44, ___, k46, k47},\ + { k50, k51, k52, k53, k54, ___, k56, k57},\ + { k60, k61, k62, k63, k64, k65, k66, k67},\ + { k70, k71, k72, k73, k74, ___, k76, k77},\ + { k80, k81, k82, k83, k84, ___, k86, k87},\ + { k90, k91, k92, k93, k94, k95, k96, k97},\ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7},\ + { kb0, kb1, kb2, kb3, kb4, ___, kb6, kb7},\ + { kc0, kc1, kc2, ___, ___, kc5, ___, kc7},\ + { kd0, kd1, kd2, kd3, kd4, ___, ___, ___} \ +} diff --git a/keyboards/ai03/jp60/keymaps/default/config.h b/keyboards/gmmk/gmmk2/p96/ansi/config.h index 9e0623524a..9f386a4211 100644 --- a/keyboards/ai03/jp60/keymaps/default/config.h +++ b/keyboards/gmmk/gmmk2/p96/ansi/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 ai03 +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,5 +16,6 @@ #pragma once -/* Increase scan quantity for improved performance */ -#define QMK_KEYS_PER_SCAN 12 +#include "config_common.h" + +#define PRODUCT_ID 0x504B diff --git a/keyboards/gmmk/gmmk2/p96/ansi/info.json b/keyboards/gmmk/gmmk2/p96/ansi/info.json new file mode 100644 index 0000000000..1fe1530e4e --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/info.json @@ -0,0 +1,119 @@ +{ + "keyboard_name": "GMMK V2 96 ANSI", + "url": "http://www.pcgamingrace.com", + "maintainer": "GloriousThrall", + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "ESC", "x": 0, "y": 0 }, + + { "label": "F1", "x": 1.25, "y": 0 }, + { "label": "F2", "x": 2.25, "y": 0 }, + { "label": "F3", "x": 3.25, "y": 0 }, + { "label": "F4", "x": 4.25, "y": 0 }, + + { "label": "F5", "x": 5.5, "y": 0 }, + { "label": "F6", "x": 6.5, "y": 0 }, + { "label": "F7", "x": 7.5, "y": 0 }, + { "label": "F8", "x": 8.5, "y": 0 }, + + { "label": "F9", "x": 9.75, "y": 0 }, + { "label": "F10", "x": 10.75, "y": 0 }, + { "label": "F11", "x": 11.75, "y": 0 }, + { "label": "F12", "x": 12.75, "y": 0 }, + + { "label": "Printscreen", "x": 14, "y": 0 }, + { "label": "Delete", "x": 15.5, "y": 0 }, + { "label": "Insert", "x": 16.5, "y": 0 }, + { "label": "Page Up", "x": 17.5, "y": 0 }, + { "label": "Page Down", "x": 18.5, "y": 0 }, + + { "label": "`", "x": 0, "y": 1 }, + { "label": "1", "x": 1, "y": 1 }, + { "label": "2", "x": 2, "y": 1 }, + { "label": "3", "x": 3, "y": 1 }, + { "label": "4", "x": 4, "y": 1 }, + { "label": "5", "x": 5, "y": 1 }, + { "label": "6", "x": 6, "y": 1 }, + { "label": "7", "x": 7, "y": 1 }, + { "label": "8", "x": 8, "y": 1 }, + { "label": "9", "x": 9, "y": 1 }, + { "label": "0", "x": 10, "y": 1 }, + { "label": "-", "x": 11, "y": 1 }, + { "label": "=", "x": 12, "y": 1 }, + { "label": "Backspace", "x": 13, "y": 1, "w": 2}, + { "label": "Num Lock", "x": 15.5, "y": 1 }, + { "label": "/", "x": 16.5, "y": 1 }, + { "label": "*", "x": 17.5, "y": 1 }, + { "label": "-", "x": 18.5, "y": 1 }, + + { "label": "Tab", "x": 0, "y": 2, "w": 1.5}, + { "label": "Q", "x": 1.5, "y": 2 }, + { "label": "W", "x": 2.5, "y": 2 }, + { "label": "E", "x": 3.5, "y": 2 }, + { "label": "R", "x": 4.5, "y": 2 }, + { "label": "T", "x": 5.5, "y": 2 }, + { "label": "Y", "x": 6.5, "y": 2 }, + { "label": "U", "x": 7.5, "y": 2 }, + { "label": "I", "x": 8.5, "y": 2 }, + { "label": "O", "x": 9.5, "y": 2 }, + { "label": "P", "x": 10.5, "y": 2 }, + { "label": "[", "x": 11.5, "y": 2 }, + { "label": "]", "x": 12.5, "y": 2 }, + { "label": "\\", "x": 13.5, "y": 2 , "w": 1.25}, + { "label": "7", "x": 15.5, "y": 2 }, + { "label": "8", "x": 16.5, "y": 2 }, + { "label": "9", "x": 17.5, "y": 2, "w": 1.5}, + { "label": "+", "x": 18.5, "y": 2 ,"h":2}, + + { "label": "Caps Lock", "x": 0, "y": 3, "w": 1.75}, + { "label": "A", "x": 1.75, "y": 3 }, + { "label": "S", "x": 2.75, "y": 3 }, + { "label": "D", "x": 3.75, "y": 3 }, + { "label": "F", "x": 4.75, "y": 3 }, + { "label": "G", "x": 5.75, "y": 3 }, + { "label": "H", "x": 6.75, "y": 3 }, + { "label": "J", "x": 7.75, "y": 3 }, + { "label": "K", "x": 8.75, "y": 3 }, + { "label": "L", "x": 9.75, "y": 3 }, + { "label": ";", "x": 10.75, "y": 3 }, + { "label": "'", "x": 11.75, "y": 3 }, + { "label": "Enter", "x": 12.75, "y": 3, "w": 2.25 }, + { "label": "4", "x": 15.5, "y": 3 }, + { "label": "5", "x": 16.5, "y": 3 }, + { "label": "6", "x": 17.5, "y": 3 }, + + { "label": "Shift", "x": 0, "y": 4, "w": 2.25}, + { "label": "Z", "x": 2.25, "y": 4 }, + { "label": "X", "x": 3.25, "y": 4 }, + { "label": "C", "x": 4.25, "y": 4 }, + { "label": "V", "x": 5.25, "y": 4 }, + { "label": "B", "x": 6.25, "y": 4 }, + { "label": "N", "x": 7.25, "y": 4 }, + { "label": "M", "x": 8.25, "y": 4 }, + { "label": ",", "x": 9.25, "y": 4 }, + { "label": ".", "x": 10.25, "y": 4 }, + { "label": "/", "x": 11.25, "y": 4 }, + { "label": "Shift", "x": 12.25, "y": 4, "w": 1.75}, + { "label": "Up", "x": 14.25, "y": 4 }, + { "label": "1", "x": 15.5, "y": 4 }, + { "label": "2", "x": 16.5, "y": 4 }, + { "label": "3", "x": 17.5, "y": 4 }, + { "label": "Enter", "x": 18.5, "y": 4 ,"h":2}, + + { "label": "Ctrl", "x": 0, "y": 5, "w": 1.25}, + { "label": "Win", "x": 1.25, "y": 5, "w": 1.25}, + { "label": "Alt", "x": 2.5, "y": 5, "w": 1.25}, + { "label": "Space", "x": 3.75, "y": 5, "w": 6.25}, + { "label": "Alt", "x": 10, "y": 5 }, + { "label": "FN", "x": 11, "y": 5 }, + { "label": "Ctrl", "x": 12, "y": 5 }, + { "label": "Left", "x": 13.25, "y": 5 }, + { "label": "Down", "x": 14.25, "y": 5 }, + { "label": "Right", "x": 15.25, "y": 5 }, + { "label": "0", "x": 16.5, "y": 5 }, + { "label": ".", "x": 17.5, "y": 5 } + ] + } + } +} diff --git a/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..7ea51338aa --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +enum custom_layers { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______) +}; diff --git a/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/readme.md b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/readme.md new file mode 100644 index 0000000000..fd8536d5de --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/readme.md @@ -0,0 +1 @@ +# ANSI GMMKV2 96% Layout diff --git a/keyboards/xelus/dharma/keymaps/via/config.h b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/config.h index 5d972dd48c..b656a22f1b 100644 --- a/keyboards/xelus/dharma/keymaps/via/config.h +++ b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 Harrison Chan (Xelus) +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,6 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #pragma once -#define QMK_KEYS_PER_SCAN 4 +#include "config_common.h" + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c new file mode 100644 index 0000000000..c61740193e --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +enum custom_layers { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______), +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/rules.mk b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/gmmk/gmmk2/p96/ansi/readme.md b/keyboards/gmmk/gmmk2/p96/ansi/readme.md new file mode 100644 index 0000000000..0d01979bb3 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/readme.md @@ -0,0 +1,23 @@ +# GMMK V2 96% (ANSI) + +A keyboard made and sold by Glorious LLC. Equipped with the WestBerry G7 ARM Cortex-M4 microcontroller + +* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall) +* Hardware Supported: GMMK V2 +* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com) + +Make example for this keyboard (after setting up your build environment): + + make gmmk/gmmk2/p96/ansi:default + +Flashing example for this keyboard: + + make gmmk/gmmk2/p96/ansi:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Hold the Reset switch mounted on the surface of the PCB while connecting the USB cable (remove the spacebar key and press and hold the pin on the right side) +* Hold the Escape key while connecting the USB cable (also erases persistent settings) +* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap + +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/gmmk/gmmk2/p96/ansi/rules.mk b/keyboards/gmmk/gmmk2/p96/ansi/rules.mk new file mode 100644 index 0000000000..ba78129495 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/ansi/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = WB32F3G71 + +# Bootloader selection +BOOTLOADER = wb32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite. +MOUSEKEY_ENABLE = yes # Mouse keys. +EXTRAKEY_ENABLE = yes # Audio control and System control. +CONSOLE_ENABLE = no # Console for debug. +COMMAND_ENABLE = no # Commands for debug and configuration. +NKRO_ENABLE = yes # Enable NKRO Rollover. +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality. +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow. +AUDIO_ENABLE = no # Audio output. +RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects. +RGB_MATRIX_DRIVER = AW20216 # Enable RGB matrix effects. +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = spi_flash diff --git a/keyboards/gmmk/gmmk2/p96/config.h b/keyboards/gmmk/gmmk2/p96/config.h new file mode 100644 index 0000000000..fec383c240 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/config.h @@ -0,0 +1,126 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x320F +#define MANUFACTURER Glorious + +#define PRODUCT GMMK 2 96 + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS \ + { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13 } +#define MATRIX_COL_PINS \ + { A0, A1, A2, A3, A4, A8, A9, A10 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +#define TAP_CODE_DELAY 10 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +/* External spi flash */ +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14 +#define WEAR_LEVELING_BACKING_SIZE 2048 + +/* SPI Config for LED Driver */ +#define SPI_DRIVER SPIDQ +#define SPI_SCK_PIN A5 +#define SPI_MOSI_PIN A7 +#define SPI_MISO_PIN A6 + +#define DRIVER_1_CS A15 +#define DRIVER_2_CS B15 +#define DRIVER_1_EN C13 +#define DRIVER_2_EN C13 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_2_LED_TOTAL 54 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +/* Set debounce time to 5ms */ +#define DEBOUNCE 5 + +/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */ +// #define FORCE_NKRO diff --git a/keyboards/gmmk/gmmk2/p96/halconf.h b/keyboards/gmmk/gmmk2/p96/halconf.h new file mode 100644 index 0000000000..293d182917 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/halconf.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/wb_support/gmmk2/halconf.h -r platforms/chibios/boards/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next <halconf.h> + diff --git a/keyboards/ai03/jp60/keymaps/via/config.h b/keyboards/gmmk/gmmk2/p96/iso/config.h index 9e0623524a..97a391b09c 100644 --- a/keyboards/ai03/jp60/keymaps/via/config.h +++ b/keyboards/gmmk/gmmk2/p96/iso/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 ai03 +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,5 +16,6 @@ #pragma once -/* Increase scan quantity for improved performance */ -#define QMK_KEYS_PER_SCAN 12 +#include "config_common.h" + +#define PRODUCT_ID 0x505A diff --git a/keyboards/gmmk/gmmk2/p96/iso/info.json b/keyboards/gmmk/gmmk2/p96/iso/info.json new file mode 100644 index 0000000000..96e9f1312b --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/info.json @@ -0,0 +1,120 @@ +{ + "keyboard_name": "GMMK V2 96 ISO", + "url": "http://www.pcgamingrace.com", + "maintainer": "GloriousThrall", + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "ESC", "x": 0, "y": 0 }, + + { "label": "F1", "x": 1.25, "y": 0 }, + { "label": "F2", "x": 2.25, "y": 0 }, + { "label": "F3", "x": 3.25, "y": 0 }, + { "label": "F4", "x": 4.25, "y": 0 }, + + { "label": "F5", "x": 5.5, "y": 0 }, + { "label": "F6", "x": 6.5, "y": 0 }, + { "label": "F7", "x": 7.5, "y": 0 }, + { "label": "F8", "x": 8.5, "y": 0 }, + + { "label": "F9", "x": 9.75, "y": 0 }, + { "label": "F10", "x": 10.75, "y": 0 }, + { "label": "F11", "x": 11.75, "y": 0 }, + { "label": "F12", "x": 12.75, "y": 0 }, + + { "label": "Printscreen", "x": 14, "y": 0 }, + { "label": "Delete", "x": 15.5, "y": 0 }, + { "label": "Insert", "x": 16.5, "y": 0 }, + { "label": "Page Up", "x": 17.5, "y": 0 }, + { "label": "Page Down", "x": 18.5, "y": 0 }, + + { "label": "`", "x": 0, "y": 1 }, + { "label": "1", "x": 1, "y": 1 }, + { "label": "2", "x": 2, "y": 1 }, + { "label": "3", "x": 3, "y": 1 }, + { "label": "4", "x": 4, "y": 1 }, + { "label": "5", "x": 5, "y": 1 }, + { "label": "6", "x": 6, "y": 1 }, + { "label": "7", "x": 7, "y": 1 }, + { "label": "8", "x": 8, "y": 1 }, + { "label": "9", "x": 9, "y": 1 }, + { "label": "0", "x": 10, "y": 1 }, + { "label": "-", "x": 11, "y": 1 }, + { "label": "=", "x": 12, "y": 1 }, + { "label": "Backspace", "x": 13, "y": 1, "w": 2}, + { "label": "Num Lock", "x": 15.5, "y": 1 }, + { "label": "/", "x": 16.5, "y": 1 }, + { "label": "*", "x": 17.5, "y": 1 }, + { "label": "-", "x": 18.5, "y": 1 }, + + { "label": "Tab", "x": 0, "y": 2, "w": 1.5}, + { "label": "Q", "x": 1.5, "y": 2 }, + { "label": "W", "x": 2.5, "y": 2 }, + { "label": "E", "x": 3.5, "y": 2 }, + { "label": "R", "x": 4.5, "y": 2 }, + { "label": "T", "x": 5.5, "y": 2 }, + { "label": "Y", "x": 6.5, "y": 2 }, + { "label": "U", "x": 7.5, "y": 2 }, + { "label": "I", "x": 8.5, "y": 2 }, + { "label": "O", "x": 9.5, "y": 2 }, + { "label": "P", "x": 10.5, "y": 2 }, + { "label": "[", "x": 11.5, "y": 2 }, + { "label": "]", "x": 12.5, "y": 2 }, + { "label": "Enter", "x": 13.5, "y": 2 ,"h":2, "w": 1.25}, + { "label": "7", "x": 15.5, "y": 2 }, + { "label": "8", "x": 16.5, "y": 2 }, + { "label": "9", "x": 17.5, "y": 2, "w": 1.5}, + { "label": "+", "x": 18.5, "y": 2 ,"h":2}, + + { "label": "Caps Lock", "x": 0, "y": 3, "w": 1.75}, + { "label": "A", "x": 1.75, "y": 3 }, + { "label": "S", "x": 2.75, "y": 3 }, + { "label": "D", "x": 3.75, "y": 3 }, + { "label": "F", "x": 4.75, "y": 3 }, + { "label": "G", "x": 5.75, "y": 3 }, + { "label": "H", "x": 6.75, "y": 3 }, + { "label": "J", "x": 7.75, "y": 3 }, + { "label": "K", "x": 8.75, "y": 3 }, + { "label": "L", "x": 9.75, "y": 3 }, + { "label": ";", "x": 10.75, "y": 3 }, + { "label": "'", "x": 11.75, "y": 3 }, + { "label": "#", "x": 12.75, "y": 3 }, + { "label": "4", "x": 15.5, "y": 3 }, + { "label": "5", "x": 16.5, "y": 3 }, + { "label": "6", "x": 17.5, "y": 3 }, + + { "label": "Shift", "x": 0, "y": 4, "w": 1.25}, + { "label": "\\", "x": 1.25, "y": 4 }, + { "label": "Z", "x": 2.25, "y": 4 }, + { "label": "X", "x": 3.25, "y": 4 }, + { "label": "C", "x": 4.25, "y": 4 }, + { "label": "V", "x": 5.25, "y": 4 }, + { "label": "B", "x": 6.25, "y": 4 }, + { "label": "N", "x": 7.25, "y": 4 }, + { "label": "M", "x": 8.25, "y": 4 }, + { "label": ",", "x": 9.25, "y": 4 }, + { "label": ".", "x": 10.25, "y": 4 }, + { "label": "/", "x": 11.25, "y": 4 }, + { "label": "Shift", "x": 12.25, "y": 4, "w": 1.75}, + { "label": "Up", "x": 14.25, "y": 4 }, + { "label": "1", "x": 15.5, "y": 4 }, + { "label": "2", "x": 16.5, "y": 4 }, + { "label": "3", "x": 17.5, "y": 4 }, + { "label": "Enter", "x": 18.5, "y": 4 ,"h":2}, + + { "label": "Ctrl", "x": 0, "y": 5, "w": 1.25}, + { "label": "Win", "x": 1.25, "y": 5, "w": 1.25}, + { "label": "Alt", "x": 2.5, "y": 5, "w": 1.25}, + { "label": "Space", "x": 3.75, "y": 5, "w": 6.25}, + { "label": "Alt", "x": 10, "y": 5 }, + { "label": "FN", "x": 11, "y": 5 }, + { "label": "Ctrl", "x": 12, "y": 5 }, + { "label": "Left", "x": 13.25, "y": 5 }, + { "label": "Down", "x": 14.25, "y": 5 }, + { "label": "Right", "x": 15.25, "y": 5 }, + { "label": "0", "x": 16.5, "y": 5 }, + { "label": ".", "x": 17.5, "y": 5 } + ] + } + } +} diff --git a/keyboards/gmmk/gmmk2/p96/iso/iso.c b/keyboards/gmmk/gmmk2/p96/iso/iso.c new file mode 100644 index 0000000000..e1fee18079 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/iso.c @@ -0,0 +1,328 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "iso.h" + +#ifdef RGB_MATRIX_ENABLE + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, k00, Esc + {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 1, k10, F1 + {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 2, k20, F2 + {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 3, k30, F3 + {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 4, k40, F4 + {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 5, k50, F5 + {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 6, k60, F6 + {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 7, k70, F7 + {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 8, k80, F8 + {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 9, k90, F9 + {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 10, ka0, F10 + {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 11, kb0, F11 + {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 12, kc0, F12 + {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 13, kd0, Printscreen + {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 14, k06, Delete + {1, CS1_SW2, CS2_SW2, CS3_SW2}, // 15, k16, Insert + {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 16, k26, Page Up + {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 17, k36, Page Down + + {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 18, k01, ` + {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 19, k11, 1 + {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 20, k21, 2 + {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 21, k31, 3 + {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 22, k41, 4 + {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 23, k51, 5 + {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 24, k61, 6 + {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 25, k71, 7 + {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 26, k81, 8 + {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 27, k91, 9 + {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 28, ka1, 0 + {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 29, kb1, - + {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 30, kc1, = + {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 31, kd1, Backspace + {1, CS7_SW1, CS8_SW1, CS9_SW1}, // 32, k46, Num Lock + {1, CS7_SW2, CS8_SW2, CS9_SW2}, // 33, k56, Num / + {1, CS7_SW3, CS8_SW3, CS9_SW3}, // 34, k66, Num * + {1, CS7_SW4, CS8_SW4, CS9_SW4}, // 35, k76, Num - + + {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 36, k02, Tab + {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 37, k12, Q + {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 38, k22, W + {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 39, k32, E + {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 40, k42, R + {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 41, k52, T + {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 42, k62, Y + {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 43, k72, U + {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 44, k82, I + {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 45, k92, O + {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 46, ka2, P + {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 47, kb2, [ + {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 48, kc2, ] + {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 49, kd3, Enter + {1, CS7_SW5, CS8_SW5, CS9_SW5}, // 50, k86, Num 7 + {1, CS7_SW6, CS8_SW6, CS9_SW6}, // 51, k96, Num 8 + {1, CS7_SW7, CS8_SW7, CS9_SW7}, // 52, ka6, Num 9 + {1, CS7_SW8, CS8_SW8, CS9_SW8}, // 53, kb6, Num + + + {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 54, k03, Caps Lock + {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 55, k13, A + {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 56, k23, S + {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 57, k33, D + {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 58, k43, F + {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 59, k53, G + {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 60, k63, H + {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 61, k73, J + {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 62, k83, K + {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 63, k93, L + {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 64, ka3, ; + {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 65, kb3, ' + {1, CS1_SW10, CS2_SW10, CS3_SW10}, // 66, kc3, # + {1, CS7_SW9, CS8_SW9, CS9_SW9}, // 67, ka7, Num 4 + {1, CS7_SW10, CS8_SW10, CS9_SW10}, // 68, kb7, Num 5 + {1, CS7_SW11, CS8_SW11, CS9_SW11}, // 69, kc7, Num 6 + + {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 70, k04, Shift_L + {0, CS13_SW12, CS14_SW12, CS15_SW12}, // 71, k14, "\\" + {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 72, k24, Z + {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 73, k34, X + {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 74, k44, C + {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 75, k54, V + {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 76, k64, B + {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 77, k74, N + {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 78, k84, M + {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 79, k94, , + {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 80, ka4, . + {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 81, kb4, / + {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 82, kd4, Shift_R + {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 83, k17, Up + {1, CS10_SW1, CS11_SW1, CS12_SW1}, // 84, k67, Num 1 + {1, CS10_SW2, CS11_SW2, CS12_SW2}, // 85, k77, Num 2 + {1, CS10_SW3, CS11_SW3, CS12_SW3}, // 86, k87, Num 3 + {1, CS10_SW4, CS11_SW4, CS12_SW4}, // 87, k97, Enter_R + + {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 88, k05, Ctrl_L + {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 89, k15, Win_L + {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 90, k25, Alt_L + {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 91, k65, Space + {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 92, k95, Alt_R + {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 93, ka5, FN + {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 94, kc5, Ctrl_R + {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 95, k07, Left + {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 96, k27, Down + {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 97, k37, Right + {1, CS10_SW6, CS11_SW6, CS12_SW6}, // 98, k47, Num 0 + {1, CS10_SW7, CS11_SW7, CS12_SW7}, // 99, k57, Num . + + {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 101, LED 1 + {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 102, LED 2 + {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 103, LED 3 + {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 104, LED 4 + {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 105, LED 5 + {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 106, LED 6 + {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 107, LED 7 + {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 108, LED 8 + {1, CS13_SW9, CS14_SW9, CS15_SW9}, // 109, LED 9 + {1, CS13_SW10, CS14_SW10, CS15_SW10}, // 110, LED 10 + {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 111, LED 11 + {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 112, LED 12 + {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 113, LED 13 + {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 114, LED 14 + {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 115, LED 15 + {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 116, LED 16 + {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 117, LED 17 + {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 118, LED 18 + {1, CS16_SW9, CS17_SW9, CS18_SW9}, // 119, LED 19 + {1, CS16_SW10, CS17_SW10, CS18_SW10} // 120, LED 20 +}; + +#define __ NO_LED + +led_config_t g_led_config = {{ + { 0, 18, 36, 54, 70, 88, 14, 95}, + { 1, 19, 37, 55, 71, 89, 15, 83}, + { 2, 20, 38, 56, 72, 90, 16, 96}, + { 3, 21, 39, 57, 73, __, 17, 97}, + { 4, 22, 40, 58, 74, __, 32, 98}, + { 5, 23, 41, 59, 75, __, 33, 99}, + { 6, 24, 42, 60, 76, 91, 34, 84}, + { 7, 25, 43, 61, 77, __, 35, 85}, + { 8, 26, 44, 62, 78, __, 50, 86}, + { 9, 27, 45, 63, 79, 92, 51, 87}, + {10, 28, 46, 64, 80, 93, 52, 67}, + {11, 29, 47, 65, 81, __, 53, 68}, + {12, 30, 48, 66, __, 94, __, 69}, + {13, 31, __, 49, 82, __, __, __} +}, { + { 11, 0}, // 0, k00, Esc + { 22, 0}, // 1, k10, F1 + { 33, 0}, // 2, k20, F2 + { 44, 0}, // 3, k30, F3 + { 55, 0}, // 4, k40, F4 + { 66, 0}, // 5, k50, F5 + { 77, 0}, // 6, k60, F6 + { 88, 0}, // 7, k70, F7 + { 99, 0}, // 8, k80, F8 + { 110, 0}, // 9, k90, F9 + { 121, 0}, // 10, ka0, F10 + { 132, 0}, // 11, kb0, F11 + { 143, 0}, // 12, kc0, F12 + { 154, 0}, // 13, kd0, Printscreen + { 165, 0}, // 14, k06, Delete + { 176, 0}, // 15, k16, Insert + { 187, 0}, // 16, k26, Page Up + { 198, 0}, // 17, k36, Page Down + { 11, 11}, // 18, k01, ` + { 22, 11}, // 19, k11, 1 + { 33, 11}, // 20, k21, 2 + { 44, 11}, // 21, k31, 3 + { 55, 11}, // 22, k41, 4 + { 66, 11}, // 23, k51, 5 + { 77, 11}, // 24, k61, 6 + { 88, 11}, // 25, k71, 7 + { 99, 11}, // 26, k81, 8 + { 110, 11}, // 27, k91, 9 + { 121, 11}, // 28, ka1, 0 + { 132, 11}, // 29, kb1, - + { 143, 11}, // 30, kc1, = + { 154, 11}, // 31, kd1, Backspace + { 165, 11}, // 32, k46, Num Lock + { 176, 11}, // 33, k56, Num / + { 187, 11}, // 34, k66, Num * + { 198, 11}, // 35, k76, Num - + { 11, 22}, // 36, k02, Tab + { 22, 22}, // 37, k12, Q + { 33, 22}, // 38, k22, W + { 44, 22}, // 39, k32, E + { 55, 22}, // 40, k42, R + { 66, 22}, // 41, k52, T + { 77, 22}, // 42, k62, Y + { 88, 22}, // 43, k72, U + { 99, 22}, // 44, k82, I + { 110, 22}, // 45, k92, O + { 121, 22}, // 46, ka2, P + { 132, 22}, // 47, kb2, [ + { 143, 22}, // 48, kc2, ] + { 154, 22}, // 49, kd3, Enter + { 165, 22}, // 50, k86, Num 7 + { 176, 22}, // 51, k96, Num 8 + { 187, 22}, // 52, ka6, Num 9 + { 198, 22}, // 53, kb6, Num + + { 11, 33}, // 54, k03, Caps Lock + { 22, 33}, // 55, k13, A + { 33, 33}, // 56, k23, S + { 44, 33}, // 57, k33, D + { 55, 33}, // 58, k43, F + { 66, 33}, // 59, k53, G + { 77, 33}, // 60, k63, H + { 88, 33}, // 61, k73, J + { 99, 33}, // 62, k83, K + { 110, 33}, // 63, k93, L + { 121, 33}, // 64, ka3, ; + { 132, 33}, // 65, kb3, ' + { 143, 33}, // 66, kc3, # + { 165, 33}, // 67, ka7, Num 4 + { 176, 33}, // 68, kb7, Num 5 + { 187, 33}, // 69, kc7, Num 6 + { 11, 44}, // 70, k04, Shift_L + { 22, 44}, // 71, k14, "\\" + { 33, 44}, // 72, k24, Z + { 44, 44}, // 73, k34, X + { 55, 44}, // 74, k44, C + { 66, 44}, // 75, k54, V + { 77, 44}, // 76, k64, B + { 88, 44}, // 77, k74, N + { 99, 44}, // 78, k84, M + { 110, 44}, // 79, k94, , + { 121, 44}, // 80, ka4, . + { 132, 44}, // 81, kb4, / + { 143, 44}, // 82, kd4, Shift_R + { 154, 44}, // 83, k17, Up + { 165, 44}, // 84, k67, Num 1 + { 176, 44}, // 85, k77, Num 2 + { 187, 44}, // 86, k87, Num 3 + { 198, 44}, // 87, k97, Enter_R + { 11, 55}, // 88, k05, Ctrl_L + { 22, 55}, // 89, k15, Win_L + { 33, 55}, // 90, k25, Alt_L + { 77, 55}, // 91, k65, Space + { 110, 55}, // 92, k95, Alt_R + { 121, 55}, // 93, ka5, FN + { 132, 55}, // 94, kc5, Ctrl_R + { 143, 55}, // 95, k07, Left + { 154, 55}, // 96, k27, Down + { 165, 55}, // 97, k37, Right + { 176, 55}, // 98, k47, Num 0 + { 187, 55}, // 99, k57, Num . + { 0, 0}, // 101, LED 1 + { 0, 6}, // 102, LED 2 + { 0, 12}, // 103, LED 3 + { 0, 18}, // 104, LED 4 + { 0, 24}, // 105, LED 5 + { 0, 30}, // 106, LED 6 + { 0, 36}, // 107, LED 7 + { 0, 42}, // 108, LED 8 + { 0, 48}, // 109, LED 9 + { 0, 54}, // 110, LED 10 + { 209, 0}, // 111, LED 11 + { 209, 6}, // 112, LED 12 + { 209, 12}, // 113, LED 13 + { 209, 18}, // 114, LED 14 + { 209, 24}, // 115, LED 15 + { 209, 30}, // 116, LED 16 + { 209, 36}, // 117, LED 17 + { 209, 42}, // 118, LED 18 + { 209, 48}, // 119, LED 19 + { 209, 54} // 120, LED 20 +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif + +#ifdef EEPROM_ENABLE + +#include "spi_master.h" + +void spi_init(void) { + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; + + // Try releasing special pins for a short time + setPinInput(SPI_SCK_PIN); + setPinInput(SPI_MOSI_PIN); + setPinInput(SPI_MISO_PIN); + + chThdSleepMilliseconds(10); + + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_WB32_CURRENT_LEVEL3); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + } +} + +#endif diff --git a/keyboards/gmmk/gmmk2/p96/iso/iso.h b/keyboards/gmmk/gmmk2/p96/iso/iso.h new file mode 100644 index 0000000000..f575befdc1 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/iso.h @@ -0,0 +1,54 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Del Ins PgUp PgDn +// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Num / * - +// Tab Q W E R T Y U I O P [ ] Enter 7 8 9 + +// Caps A S D F G H J K L ; ' # Enter 4 5 6 + +// Sh_L \ Z X C V B N M , . / Sh_R Up 1 2 3 Enter +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right 0 . Enter + +// clang-format off +#define LAYOUT( \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, k06, k16, k26, k36,\ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, k46, k56, k66, k76,\ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd3, k86, k96, ka6, kb6,\ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kc3, ka7, kb7, kc7, \ + k04, k14, k24, k34, k44, k54, k64, k74, k84, k94, ka4, kb4, kd4, k17, k67, k77, k87, k97,\ + k05, k15, k25, k65, k95, ka5, kc5, k07, k27, k37, k47, k57 \ +)\ +{\ + { k00, k01, k02, k03, k04, k05, k06, k07},\ + { k10, k11, k12, k13, k14, k15, k16, k17},\ + { k20, k21, k22, k23, k24, k25, k26, k27},\ + { k30, k31, k32, k33, k34, ___, k36, k37},\ + { k40, k41, k42, k43, k44, ___, k46, k47},\ + { k50, k51, k52, k53, k54, ___, k56, k57},\ + { k60, k61, k62, k63, k64, k65, k66, k67},\ + { k70, k71, k72, k73, k74, ___, k76, k77},\ + { k80, k81, k82, k83, k84, ___, k86, k87},\ + { k90, k91, k92, k93, k94, k95, k96, k97},\ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7},\ + { kb0, kb1, kb2, kb3, kb4, ___, kb6, kb7},\ + { kc0, kc1, kc2, kc3, ___, kc5, ___, kc7},\ + { kd0, kd1, ___, kd3, kd4, ___, ___, ___} \ +} diff --git a/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/keymap.c b/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/keymap.c new file mode 100644 index 0000000000..1b41235e3c --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_SAI, RGB_SAD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______) +}; diff --git a/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/readme.md b/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/readme.md new file mode 100644 index 0000000000..b83b40941d --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/keymaps/default/readme.md @@ -0,0 +1 @@ +# ISO GMMKV2 96% Layout diff --git a/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h new file mode 100644 index 0000000000..b656a22f1b --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/keymap.c b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/keymap.c new file mode 100644 index 0000000000..0656566cf7 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC, 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_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_SAI, RGB_SAD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, + _______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______), +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/rules.mk b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/gmmk/gmmk2/p96/iso/readme.md b/keyboards/gmmk/gmmk2/p96/iso/readme.md new file mode 100644 index 0000000000..88a9211973 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/readme.md @@ -0,0 +1,23 @@ +# GMMK V2 96% (ISO) + +A keyboard made and sold by Glorious LLC. Equipped with the WestBerry G7 ARM Cortex-M4 microcontroller + +* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall) +* Hardware Supported: GMMK V2 +* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com) + +Make example for this keyboard (after setting up your build environment): + + make gmmk/gmmk2/p96/iso:default + +Flashing example for this keyboard: + + make gmmk/gmmk2/p96/iso:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Hold the Reset switch mounted on the surface of the PCB while connecting the USB cable (remove the spacebar key and press and hold the pin on the right side) +* Hold the Escape key while connecting the USB cable (also erases persistent settings) +* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap + +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/gmmk/gmmk2/p96/iso/rules.mk b/keyboards/gmmk/gmmk2/p96/iso/rules.mk new file mode 100644 index 0000000000..ba78129495 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/iso/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = WB32F3G71 + +# Bootloader selection +BOOTLOADER = wb32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite. +MOUSEKEY_ENABLE = yes # Mouse keys. +EXTRAKEY_ENABLE = yes # Audio control and System control. +CONSOLE_ENABLE = no # Console for debug. +COMMAND_ENABLE = no # Commands for debug and configuration. +NKRO_ENABLE = yes # Enable NKRO Rollover. +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality. +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow. +AUDIO_ENABLE = no # Audio output. +RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects. +RGB_MATRIX_DRIVER = AW20216 # Enable RGB matrix effects. +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = spi_flash diff --git a/keyboards/gmmk/gmmk2/p96/mcuconf.h b/keyboards/gmmk/gmmk2/p96/mcuconf.h new file mode 100644 index 0000000000..c58ff986b1 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/mcuconf.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/wb_support/gmmk2/mcuconf.h -r platforms/chibios/GENERIC_WB32_F3G71XX/configs/mcuconf.h` + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef WB32_SPI_USE_QSPI +#define WB32_SPI_USE_QSPI TRUE + +#undef WB32_SPI_USE_SPIM2 +#define WB32_SPI_USE_SPIM2 TRUE diff --git a/keyboards/boardsource/holiday/spooky/spooky.c b/keyboards/gmmk/gmmk2/p96/p96.c index 87fe02c1a8..47edcfe1ad 100644 --- a/keyboards/boardsource/holiday/spooky/spooky.c +++ b/keyboards/gmmk/gmmk2/p96/p96.c @@ -1,4 +1,4 @@ -/* Copyright 2020 boardsource +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,4 +14,4 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "spooky.h" +#include "p96.h" diff --git a/keyboards/gmmk/gmmk2/p96/p96.h b/keyboards/gmmk/gmmk2/p96/p96.h new file mode 100644 index 0000000000..e7b37d6816 --- /dev/null +++ b/keyboards/gmmk/gmmk2/p96/p96.h @@ -0,0 +1,25 @@ +/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_gmmk_gmmk2_p96_ansi) +# include "ansi/ansi.h" +#elif defined(KEYBOARD_gmmk_gmmk2_p96_iso) +# include "iso/iso.h" +#endif // GMMK V2 revisions diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h index aba69c8872..aea22c5434 100644 --- a/keyboards/gmmk/pro/config.h +++ b/keyboards/gmmk/pro/config.h @@ -113,9 +113,6 @@ #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -/* Send up to 4 key press events per scan */ -#define QMK_KEYS_PER_SCAN 4 - /* Set debounce time to 5ms */ #define DEBOUNCE 5 diff --git a/keyboards/gon/nerd60/config.h b/keyboards/gon/nerd60/config.h index 85dfe0a339..90b4b18494 100644 --- a/keyboards/gon/nerd60/config.h +++ b/keyboards/gon/nerd60/config.h @@ -13,7 +13,6 @@ /* matrix pins */ #define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 } #define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gon/nerdtkl/config.h b/keyboards/gon/nerdtkl/config.h index ec2cbc8a32..66b132e052 100644 --- a/keyboards/gon/nerdtkl/config.h +++ b/keyboards/gon/nerdtkl/config.h @@ -13,7 +13,6 @@ /* matrix pins */ #define MATRIX_ROW_PINS { B4, E2, F4, F7, F1, F6, C6, F5, D7, C7 } #define MATRIX_COL_PINS { E6, B0, B1, B2, B3, F0, D0, D5, D1 } -#define UNUSED_PINS #define BOOTMAGIC_LITE_ROW 8 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c index c4294c812e..bda83bb5da 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c @@ -241,7 +241,7 @@ void matrix_scan_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _BL: custom_backlight_level(0); break; diff --git a/keyboards/gopolar/gg86/config.h b/keyboards/gopolar/gg86/config.h index 7566bd2c3f..7964834623 100644 --- a/keyboards/gopolar/gg86/config.h +++ b/keyboards/gopolar/gg86/config.h @@ -35,9 +35,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - /* Use the custom font */ #define OLED_FONT_H "lib/glcdfont.c" diff --git a/keyboards/gorthage_truck/config.h b/keyboards/gorthage_truck/config.h index c3777f7318..2e1c9ea0a6 100644 --- a/keyboards/gorthage_truck/config.h +++ b/keyboards/gorthage_truck/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, C7, B3, B7, D7} #define MATRIX_COL_PINS { F0, F1, F4, F7, D6, E6, B0, B1, B2} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gowla/config.h b/keyboards/gowla/config.h index 8f178c6aba..c0eef6ba5b 100644 --- a/keyboards/gowla/config.h +++ b/keyboards/gowla/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Pin-out */ #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { B5, B4, E6 } -#define UNUSED_PINS /* ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/gray_studio/cod67/config.h b/keyboards/gray_studio/cod67/config.h index 20612363ec..178cc3dc13 100644 --- a/keyboards/gray_studio/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS { D7, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 0a67e39bcf..d8b67b3c50 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } #define MATRIX_COL_PINS { B0, B3, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/grid600/press/config.h b/keyboards/grid600/press/config.h index 7afe784e06..9800c38402 100644 --- a/keyboards/grid600/press/config.h +++ b/keyboards/grid600/press/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0 } #define MATRIX_COL_PINS { F1, F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/h0oni/deskpad/config.h b/keyboards/h0oni/deskpad/config.h index d01487a5f7..7d6e4605ad 100644 --- a/keyboards/h0oni/deskpad/config.h +++ b/keyboards/h0oni/deskpad/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D7, C6 } #define MATRIX_COL_PINS { D0, D4, D1} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/h0oni/hotduck/config.h b/keyboards/h0oni/hotduck/config.h index 5ee44e4e23..67cb2fdced 100644 --- a/keyboards/h0oni/hotduck/config.h +++ b/keyboards/h0oni/hotduck/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7, F6, F5 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, D3} -#define UNUSED_PINS // #define LED_CAPS_LOCK_PIN B2 // #define LED_PIN_ON_STATE 0 diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h index c992f7fe33..c7e03e483b 100644 --- a/keyboards/hadron/ver2/config.h +++ b/keyboards/hadron/ver2/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Hadron Ver0 PCB default pin-out */ #define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 } #define MATRIX_COL_PINS { F6, F7, D6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } -#define UNUSED_PINS // configure oled driver for the 128x32 oled #define OLED_UPDATE_INTERVAL 33 // ~30fps diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index c61cc9a1e0..76353b6ee4 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -41,7 +41,6 @@ #define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 } #define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B13 } #define ENCODERS_PAD_B { B14 } diff --git a/keyboards/halfcliff/config.h b/keyboards/halfcliff/config.h index 0ef616b967..23b40935ee 100644 --- a/keyboards/halfcliff/config.h +++ b/keyboards/halfcliff/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F5, F6, F7, D7, B5, F5, F6, F7, D7, B5 } #define MATRIX_COL_PINS { B4, E6, C6, B6, B2 } -#define UNUSED_PINS //#define NUMBER_OF_ENCODERS 1 #define ENCODERS_PAD_A { D4 } diff --git a/keyboards/han60/config.h b/keyboards/han60/config.h index 70267edb81..1c65f6ba90 100644 --- a/keyboards/han60/config.h +++ b/keyboards/han60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D3, D2, D1, D0} #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index 2ff8a9a115..703cd93e64 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -43,7 +43,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5, C6, C7, D0, D1, F0, D3, D4, F1, D6, D7, E0, E1, E2, E3, E4, E5, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/2x5keypad/config.h b/keyboards/handwired/2x5keypad/config.h index f53879f19a..00c4ac1ab4 100644 --- a/keyboards/handwired/2x5keypad/config.h +++ b/keyboards/handwired/2x5keypad/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B2 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/3dp660/config.h b/keyboards/handwired/3dp660/config.h index 8a8fe8ea30..eaae958e4d 100644 --- a/keyboards/handwired/3dp660/config.h +++ b/keyboards/handwired/3dp660/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/412_64/config.h b/keyboards/handwired/412_64/config.h index de6d79e0a9..b32afc2033 100644 --- a/keyboards/handwired/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -20,7 +20,6 @@ */ #define MATRIX_ROW_PINS { D3, F4, F5, F6, F7, B1, B3, B2 } #define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 } -#define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/42/config.h b/keyboards/handwired/42/config.h index 34c9a0500c..5ec89cce84 100644 --- a/keyboards/handwired/42/config.h +++ b/keyboards/handwired/42/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_COL_PINS { F5, F6, F7, F0, F1, F4, B6, B5, D7, C7, D6, B7 } #define MATRIX_ROW_PINS { D2, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/6key/config.h b/keyboards/handwired/6key/config.h index efa24db048..b7d983d75f 100644 --- a/keyboards/handwired/6key/config.h +++ b/keyboards/handwired/6key/config.h @@ -25,7 +25,6 @@ /* pin-out */ #define MATRIX_ROW_PINS { B4, D0 } #define MATRIX_COL_PINS { D3, D2, D1 } -#define UNUSED_PINS /* dip switch */ #define DIP_SWITCH_PINS { C6 } diff --git a/keyboards/handwired/6macro/config.h b/keyboards/handwired/6macro/config.h index 7fe3be6556..1e8c296855 100644 --- a/keyboards/handwired/6macro/config.h +++ b/keyboards/handwired/6macro/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pinout - DON'T CHANGE */ #define MATRIX_ROW_PINS { B3, B4 } #define MATRIX_COL_PINS { B0, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h index 8bb20b7fdf..784eeb1298 100644 --- a/keyboards/handwired/aek64/config.h +++ b/keyboards/handwired/aek64/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Originally made for a Teensy 2++ #define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, D3, D0, D1, D2 } #define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/amigopunk/config.h b/keyboards/handwired/amigopunk/config.h index b6e79d05f2..c6f1a99537 100644 --- a/keyboards/handwired/amigopunk/config.h +++ b/keyboards/handwired/amigopunk/config.h @@ -25,7 +25,6 @@ /* Key matrix pins */ #define MATRIX_ROW_PINS { C0, C1, C2, C3, C4, C5 } #define MATRIX_COL_PINS { B6, B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/angel/config.h b/keyboards/handwired/angel/config.h index ffa5110fe5..ce1bf11ed6 100644 --- a/keyboards/handwired/angel/config.h +++ b/keyboards/handwired/angel/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, B5, B4 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B3, B1, F7, F6, F5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW // https://docs.qmk.fm/using-qmk/software-features/tap_hold diff --git a/keyboards/handwired/aplx2/config.h b/keyboards/handwired/aplx2/config.h index d1ec168038..cbe0ef91ba 100644 --- a/keyboards/handwired/aplx2/config.h +++ b/keyboards/handwired/aplx2/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { D1 } #define MATRIX_COL_PINS { B5, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 8517852270..1b9a0b2419 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D3, D2, D1, D0 } #define MATRIX_COL_PINS \ { C6, D7, E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index 436b37f8a0..9615075121 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h index 550bfd183f..1f07965555 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h index 51d3b9080b..4bc89f5ce7 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index c7365fe20c..f433427ab0 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D3, D2, D1, D0 } #define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/axon/config.h b/keyboards/handwired/axon/config.h index e4ace3ba4e..50be74b882 100644 --- a/keyboards/handwired/axon/config.h +++ b/keyboards/handwired/axon/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D5, D6, D4, D0 } #define MATRIX_COL_PINS { B0, D7, B1, B2, C0, C1, C2, C3, C4, C5, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/baredev/rev1/info.json b/keyboards/handwired/baredev/rev1/info.json index 6292817538..d35e3644ba 100644 --- a/keyboards/handwired/baredev/rev1/info.json +++ b/keyboards/handwired/baredev/rev1/info.json @@ -9,13 +9,6 @@ "term": 175 }, "matrix_pins": { - "unused": [ - "F1", - "F4", - "F5", - "F6", - "F7" - ], "cols": [ "B6", "B7", @@ -703,4 +696,4 @@ ] } } -}
\ No newline at end of file +} diff --git a/keyboards/handwired/battleship_gamepad/config.h b/keyboards/handwired/battleship_gamepad/config.h index 92ad57d178..25389c0245 100644 --- a/keyboards/handwired/battleship_gamepad/config.h +++ b/keyboards/handwired/battleship_gamepad/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* joystick configuration */ #define JOYSTICK_BUTTON_COUNT 25 diff --git a/keyboards/handwired/bolek/config.h b/keyboards/handwired/bolek/config.h index 33fbf59ac1..b6cbea8f39 100644 --- a/keyboards/handwired/bolek/config.h +++ b/keyboards/handwired/bolek/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, B5, D3, D2, D1, B4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, E6, D7, C6, D0, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/bstk100/config.h b/keyboards/handwired/bstk100/config.h index 2c79452943..c51031b2b5 100644 --- a/keyboards/handwired/bstk100/config.h +++ b/keyboards/handwired/bstk100/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/cans12er/config.h b/keyboards/handwired/cans12er/config.h index 117474691a..240a2a5da9 100644 --- a/keyboards/handwired/cans12er/config.h +++ b/keyboards/handwired/cans12er/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F7, B1, B3 } #define MATRIX_COL_PINS { D0, D4, C6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/chiron/config.h b/keyboards/handwired/chiron/config.h index 7b72988431..52bb89519b 100644 --- a/keyboards/handwired/chiron/config.h +++ b/keyboards/handwired/chiron/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Pro Micro Pins A3, A2, A1, A0, 15, 14, 16 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS // Pro Micro Pins RX1 #define SPLIT_HAND_PIN D2 diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index 4927762d8e..433aabc5b7 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/co60/rev1/config.h b/keyboards/handwired/co60/rev1/config.h index a41bde6fa2..5234c5b920 100644 --- a/keyboards/handwired/co60/rev1/config.h +++ b/keyboards/handwired/co60/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h index 16fa7cb4c5..934a6a2d25 100644 --- a/keyboards/handwired/co60/rev7/config.h +++ b/keyboards/handwired/co60/rev7/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A8, A2, B13, B2, B10 } #define MATRIX_COL_PINS { A10, A9, A3, A4, A5, A6, B0, B1, A15, B3, B4, B5, C13, C14, C15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h index 41d87f6c71..a941ea493d 100644 --- a/keyboards/handwired/colorlice/config.h +++ b/keyboards/handwired/colorlice/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6, B0, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/concertina/64key/config.h b/keyboards/handwired/concertina/64key/config.h index 1b09c403f6..cb897ba109 100644 --- a/keyboards/handwired/concertina/64key/config.h +++ b/keyboards/handwired/concertina/64key/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS { D3, D2 } /* LEDs are not used in the standard 64key configuration. */ #define RGB_DI_PIN D3 diff --git a/keyboards/handwired/curiosity/config.h b/keyboards/handwired/curiosity/config.h index 35bfef4794..4cd00d8b2d 100644 --- a/keyboards/handwired/curiosity/config.h +++ b/keyboards/handwired/curiosity/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D0, F7, F6, F5 } #define MATRIX_COL_PINS { D3, D4, F4, C6, D7, E6, B5, B4, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/d48/config.h b/keyboards/handwired/d48/config.h index 6b6ae5ce3f..47ae30a98f 100644 --- a/keyboards/handwired/d48/config.h +++ b/keyboards/handwired/d48/config.h @@ -10,7 +10,6 @@ #define MATRIX_ROW_PINS { B8, B9, B1, B2, B4 } #define MATRIX_COL_PINS { A2, B0, A7, A8, A13, A14, B12, B11, B10, B15, B14, B13 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h index cce0d050a7..c10096e590 100644 --- a/keyboards/handwired/dactyl_left/config.h +++ b/keyboards/handwired/dactyl_left/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS \ { D0, B7, B3, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h index 09a5897f7a..e02c7c889c 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D6, D7, E0, E1, C0, C1, C2 } #define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/dc/mc/001/config.h b/keyboards/handwired/dc/mc/001/config.h index db03889cc1..b6d6f60dfc 100644 --- a/keyboards/handwired/dc/mc/001/config.h +++ b/keyboards/handwired/dc/mc/001/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { \ { B4, B0, B1, B2, B3 } \ } -#define UNUSED_PINS /* RE_CHANNEL_A = _BV(6), diff --git a/keyboards/handwired/dqz11n1g/config.h b/keyboards/handwired/dqz11n1g/config.h index fbfdeb30ae..3bd8123426 100644 --- a/keyboards/handwired/dqz11n1g/config.h +++ b/keyboards/handwired/dqz11n1g/config.h @@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Column read via SPI (shift register) */ /* #define MATRIX_COL_PINS { } */ -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN F7 /* A0 */ #define LED_NUM_LOCK_PIN F5 /*A2 */ diff --git a/keyboards/handwired/eagleii/config.h b/keyboards/handwired/eagleii/config.h index c17635caf1..2007137d84 100644 --- a/keyboards/handwired/eagleii/config.h +++ b/keyboards/handwired/eagleii/config.h @@ -6,6 +6,5 @@ #define MATRIX_COLS 12 #define MATRIX_ROW_PINS { D0, B5, F1, B2, F7, F6, D4, D7, B4, B7, F5, B0 } #define MATRIX_COL_PINS { D2, C6, E6, D5, B3, D3, D1, C7, F0, B6, B1, F4 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/handwired/ergocheap/config.h b/keyboards/handwired/ergocheap/config.h index 136ba9d81c..9d99463961 100644 --- a/keyboards/handwired/ergocheap/config.h +++ b/keyboards/handwired/ergocheap/config.h @@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD /* * Feature disable options diff --git a/keyboards/handwired/evk/v1_3/config.h b/keyboards/handwired/evk/v1_3/config.h index a280c49f3b..9a2192ec44 100644 --- a/keyboards/handwired/evk/v1_3/config.h +++ b/keyboards/handwired/evk/v1_3/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B0, B1, B2, B3, B7, D0 } #define MATRIX_COL_PINS \ { D1, D2, D3, C6, C7, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // the positive current flows into the rows and then out of the columns negative. diff --git a/keyboards/handwired/fc200rt_qmk/config.h b/keyboards/handwired/fc200rt_qmk/config.h index d0b9fc2cab..1ac044e8b2 100644 --- a/keyboards/handwired/fc200rt_qmk/config.h +++ b/keyboards/handwired/fc200rt_qmk/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, E6, B7, D0, D1 } #define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index 8f392c35d0..9b5af88e57 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, F7, B6, B5, B4 } #define MATRIX_COL_PINS { B0, B1, B2, B3, F0, D0, D1, D2, D3, C6, C7, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/floorboard/config.h b/keyboards/handwired/floorboard/config.h index 84b748d520..2f071df7bd 100644 --- a/keyboards/handwired/floorboard/config.h +++ b/keyboards/handwired/floorboard/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A2, A1, A0, B8 } #define MATRIX_COL_PINS { B7, B6, B5, B4, B3, B2, B1, B9, B0, B15, B14, B13 } -#define UNUSED_PINS { B10, B11, B12, A14, A13, A4, A5, A6, A7, A8, A15, A10, A9 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/frankie_macropad/config.h b/keyboards/handwired/frankie_macropad/config.h index 823be87688..883807239b 100644 --- a/keyboards/handwired/frankie_macropad/config.h +++ b/keyboards/handwired/frankie_macropad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2 } #define MATRIX_COL_PINS { B3, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 2d917b412e..11463a0162 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -209,7 +209,7 @@ void press_underscore(void) { uint8_t old_layer=_BASE; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); frenchdev_led_1_off(); frenchdev_led_2_off(); diff --git a/keyboards/handwired/fruity60/config.h b/keyboards/handwired/fruity60/config.h index a3a1e2beb8..b21e752d85 100644 --- a/keyboards/handwired/fruity60/config.h +++ b/keyboards/handwired/fruity60/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B6, B5, D7, C6, D0, D1 } #define MATRIX_COL_PINS \ { F7, F6, F5, F4, F1, F0, D2, D3, B7, D6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 480f6f73aa..eb9efef846 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index ee781012b1..690e96365c 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // ER DR CR BR AR FR FL AL BL CL DL EL #define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h index 7aa147b4e4..84224a4514 100644 --- a/keyboards/handwired/heisenberg/config.h +++ b/keyboards/handwired/heisenberg/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D3, D2, D1, D0 } #define MATRIX_COL_PINS \ { C6, D7, E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h index cd818ca2bc..b6529b3ddf 100644 --- a/keyboards/handwired/hexon38/config.h +++ b/keyboards/handwired/hexon38/config.h @@ -11,7 +11,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F0, B2, F4 } #define MATRIX_COL_PINS { C6, D3, D2, D1, D0, B7, F6, F7, B6, B5, B4, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/hillside/0_1/0_1.c b/keyboards/handwired/hillside/0_1/0_1.c deleted file mode 100644 index ee096f18a7..0000000000 --- a/keyboards/handwired/hillside/0_1/0_1.c +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2021 Michael McCoyd (@mmccoyd) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "0_1.h" diff --git a/keyboards/handwired/hillside/0_1/keymaps/default/keymap.json b/keyboards/handwired/hillside/0_1/keymaps/default/keymap.json deleted file mode 100644 index 5c672f8b8b..0000000000 --- a/keyboards/handwired/hillside/0_1/keymaps/default/keymap.json +++ /dev/null @@ -1,101 +0,0 @@ -{ "version": 1, - "notes": "", - "documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", - "keyboard": "handwired/hillside/0_1", - "keymap": "default", - "layout": "LAYOUT", - "layers": [ - ["KC_TAB" , "KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T", - "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P" , "KC_BSPC", - - "KC_CAPS", "KC_A" , "KC_S" , "KC_D" , "KC_F" , "KC_G", - "KC_H" , "KC_J" , "KC_K" , "KC_L" , "KC_SCLN" , "KC_ENT", - - "KC_LSFT", "KC_Z" , "KC_X" , "KC_C" , "KC_V" , "KC_B" , "KC_GRV", - "KC_ESC" , "KC_N" , "KC_M" , "KC_COMM" , "KC_DOT" , "KC_SLSH" , "KC_RSFT", - - "KC_LCTL", "KC_LGUI" , "KC_LALT" , "MO(5)" , "MO(3)", - "MO(4)" , "KC_SPC" , "KC_LALT" , "KC_RGUI" , "KC_QUOT" - - ], - ["KC_TAB" , "KC_QUOT" , "KC_COMM" , "KC_DOT" , "KC_P" , "KC_Y", - "KC_F" , "KC_G" , "KC_C" , "KC_R" , "KC_L" , "KC_BSPC", - - "KC_CAPS", "KC_A" , "KC_O" , "KC_E" , "KC_U" , "KC_I", - "KC_D" , "KC_H" , "KC_T" , "KC_N" , "KC_S" , "KC_ENT", - - "KC_LSFT", "KC_SCLN" , "KC_Q" , "KC_J" , "KC_K" , "KC_X" , "KC_GRV", - "KC_ESC" , "KC_B" , "KC_M" , "KC_W" , "KC_V" , "KC_Z" , "KC_RSFT", - - "KC_LCTL", "KC_LGUI" , "KC_LALT" , "MO(5)" , "MO(3)", - "MO(4)" , "KC_SPC" , "KC_LALT" , "KC_RGUI" , "KC_SLSH" - - ], - ["KC_TAB" , "KC_Q" , "KC_W" , "KC_F" , "KC_P" , "KC_B", - "KC_J" , "KC_L" , "KC_U" , "KC_Y" , "KC_SCLN" , "KC_BSPC", - - "KC_CAPS", "KC_A" , "KC_R" , "KC_S" , "KC_T" , "KC_G", - "KC_M" , "KC_N" , "KC_E" , "KC_I" , "KC_O" , "KC_ENT", - - "KC_LSFT", "KC_Z" , "KC_X" , "KC_C" , "KC_D" , "KC_V" , "KC_GRV", - "KC_ESC" , "KC_K" , "KC_H" , "KC_COMM" , "KC_DOT" , "KC_SLSH" , "KC_RSFT", - - "KC_LCTL", "KC_LGUI" , "KC_LALT" , "MO(5)" , "MO(3)", - "MO(4)" , "KC_SPC" , "KC_LALT" , "KC_RGUI" , "KC_QUOT" - - ], - ["KC_NO" , "KC_INS" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_VOLU", - "KC_PGUP", "KC_HOME" , "KC_NO" , "KC_END" , "KC_NO" , "KC_DEL", - - "KC_NO" , "KC_LGUI" , "KC_LALT" , "KC_LCTL" , "KC_LSFT" , "KC_VOLD", - "KC_PGDN", "KC_LEFT" , "KC_UP" , "KC_RGHT" , "KC_NO" , "KC_TRNS", - - "KC_LSFT", "LCTL(KC_Z)" , "LCTL(KC_X)" , "LCTL(KC_C)", "LCTL(KC_V)" , "LCTL(KC_Y)", "KC_MUTE", - "KC_ESC" , "OSM(MOD_RALT)", "LCTL(KC_LEFT)", "KC_DOWN" , "LCTL(KC_RGHT)", "KC_APP" , "KC_TRNS", - - "KC_TRNS", "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", - "MO(6)" , "KC_BSPC" , "KC_TRNS" , "KC_TRNS" , "KC_RCTL" - - ], - ["KC_F11" , "KC_EXLM" , "KC_AT" , "KC_HASH" , "KC_DLR" , "KC_PERC", - "KC_CIRC", "KC_AMPR" , "KC_ASTR" , "KC_LPRN" , "KC_RPRN" , "KC_TRNS", - - "KC_F12" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F4" , "KC_F5", - "KC_PIPE", "KC_LSFT" , "KC_LCTL" , "KC_LALT" , "KC_LGUI" , "KC_TRNS", - - "KC_LSFT", "KC_F6" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10" , "KC_PSCR", - "KC_ESC" , "KC_BSLS" , "KC_LBRC" , "KC_RBRC" , "KC_LCBR" , "KC_RCBR" , "KC_TRNS", - - "KC_TRNS", "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "MO(6)", - "KC_TRNS", "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_RCTL" - - ], - ["KC_TAB" , "KC_MINS" , "KC_PLUS" , "KC_EQL" , "KC_SLSH" , "KC_ASTR", - "KC_COMM", "KC_7" , "KC_8" , "KC_9" , "KC_NO" , "KC_TRNS", - - "KC_NO" , "KC_LGUI" , "KC_LALT" , "KC_LCTL" , "KC_LSFT" , "KC_NO", - "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_UNDS" , "KC_TRNS", - - "KC_TRNS", "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO", - "KC_NO" , "KC_DOT" , "KC_4" , "KC_5" , "KC_6" , "KC_NO" , "KC_TRNS", - - "KC_TRNS", "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO", - "KC_NO" , "KC_BSPC" , "KC_TRNS" , "KC_TRNS" , "KC_RCTL" - - ], - ["KC_NO" , "DF(0)" , "DF(1)" , "DF(2)" , "AG_SWAP" , "AG_NORM", - "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO", - - "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "CL_SWAP" , "CL_NORM", - "RGB_MOD", "RGB_VAI" , "RGB_HUI" , "RGB_SAI" , "KC_NO" , "KC_NO", - - "QK_BOOT", "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO", - "RGB_TOG", "RGB_RMOD" , "RGB_VAD" , "RGB_HUD" , "RGB_SAD" , "KC_NO" , "KC_NO", - - "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_TRNS", - "KC_TRNS", "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" - - ] - ], - "author": "@mmccoyd" -} diff --git a/keyboards/handwired/hillside/0_1/keymaps/default/readme.md b/keyboards/handwired/hillside/0_1/keymaps/default/readme.md deleted file mode 100644 index 1890d5808c..0000000000 --- a/keyboards/handwired/hillside/0_1/keymaps/default/readme.md +++ /dev/null @@ -1,212 +0,0 @@ -# Default Keymap - -This default keymap follows many of the norms seen in non-programmable keyboards - to ease initial use of the Hillside keyboard. -It is a starting point for you to tweak over time to better suit _your_ preferences. -You can easily customize it with the - [QMK configurator](https://config.qmk.fm/#/hillside/0_1/LAYOUT) - or with the [via firmware](https://caniusevia.com). - -Some of its key features are: -- A mostly standard base layer with letters, some symbols, shift, modifier and delete keys - in the expected places for non-programmable keyboards. -- QWERTY, Colemak-DH and Dvorak options for the letter and symbol layout. -- Comfortable modifier and function or symbol combinations on the non-base layers - using modifiers on the home row of the navigation/edit, symbol/function and number-pad layers. -- Word navigation and cut/copy/paste keys on the navigation layer. -- A slightly optimized number pad with the more frequently used numbers on the home row. - -We've deliberately omitted some features: -- Combos: because the online configuration tools do not handle them - and because they would add to the initial learning curve, - as helpful to a keymap as a light sprinkling of combos can be. -- Multi-function mod-tap keys, auto shift capitalization and auto-exit modes such as CAPWORD or NUMWORD: - as they may be too large a step for someone new to programmable keyboards. - -## Base Layer - -``` -| TAB | Q | W | E | R | T |---------------------------| Y | U | I | O | P | BKSPC | -| CAPS | A | S | D | F | G |---------------------------| H | J | K | L | ; | ENTER | -| SHIFT | Z | X | C | V | B | ~ |---------------| ESC | N | M | , | . | / | SHIFT | ---------------|CTRL |-----| GUI | ALT | Num | Nav |---| Sym |SPACE| ALT | GUI |-----| ' |-------------- -``` - -The base layer provides a very standard key layout: - -- Return, Tab, backspace and shift keys in the outer columns. -- Alt/option and win/command keys on both thumbs, with the location swappable for windows or mac. -- A space key on the right thumb. - -The differences from a standard layout are: - -- There are three additional "shift" keys - to access the navigation/editing, symbol/function, and number layers. -- Esc and `~ are above the thumbs. -- The Menu and AltGr keys are on a layer. - -The default layout is QWERTY with alternatives of Dvorak and Colemak-DH -and the alt/option and win/command key locations are swappable for windows or mac. - -<details> -<summary>Details of Dvorak and Colemak-DH</summary> -The Dvorak and Colemak-DH base layers - have identical non-alpha and non-symbol keys as the QWERTY base layer. -In the Dvorak layout, the symbol key in the bottom row is the "/?" symbols - so that the same 12 symbols are taken care of on the base layer. - -``` -Dvorak -| TAB | ' | , | . | P | Y |---------------------------| F | G | C | R | L | BKSPC | -| CAPS | A | O | E | U | I |---------------------------| D | H | T | N | S | ENTER | -| SHIFT | ; | Q | J | K | X | ~ |---------------| ESC | B | M | W | V | Z | SHIFT | ---------------|CTRL |-----| GUI | ALT | Num | Nav |---| Sym |SPACE| ALT | GUI |-----| / |-------------- - -Colemak-DH -| TAB | Q | W | F | P | B |---------------------------| J | L | U | Y | ; | BKSPC | -| CAPS | A | R | S | T | G |---------------------------| M | N | E | I | O | ENTER | -| SHIFT | Z | X | C | D | V | ~ |---------------| ESC | K | H | , | . | / | SHIFT | ---------------|CTRL |-----| GUI | ALT | Num | Nav |---| Sym |SPACE| ALT | GUI |-----| ' |-------------- -``` -</details> - -## Navigation, Editing and Media Layer - -``` -| | INS | | | |VOL+ |---------------------------|PG_UP|HOME | | END| | DEL | -| | GUI | ALT |CTRL |SHIFT|VOL- |---------------------------|PG_DN|LEFT | UP |RIGHT| | ENTER | -| SHIFT |UNDO | CUT |COPY |PASTE|REDO |MUTE |---------------| ESC |RALT |WORDL|DOWN |WORDR|MENU | SHIFT | ---------------|CTRL |-----| GUI | ALT | Num | *** |---| Adj |BSPC | ALT | GUI |-----|CTRL |-------------- -``` -Holding down the Nav key accesses a navigation and editing layer: - -- Navigation arrows are on and below the right home row in a cross pattern. - This feels more natural for a column stagger keyboard than an inverted T. - The keys below that move left or right by a word. - Home, end, and page up/down are beside them. -- Modifiers in the left home row make it easier to use the arrows - to select text with the shift key or move between desktops or tabs. -- Editing keys appear on the lower left. - The edit keys, modifiers and arrows make it easy to move text around without leaving the layer. -- Delete is in the upper right, and a backspace key is on the thumb. -- The base layer modifiers and escape are in the same spots as on the base layer, - and a right-hand control key is added. -- Media volume and play keys are on the left, accessible with one hand. -- Menu and AltGr keys fill out the layer. -- A few keys do nothing and are available for more user-specific needs. - -## Symbol and Function Layer - -``` -| F11 | ! | @ | # | $ | % |---------------------------| ^ | & | * | ( | ) | BSPC | -| F12 | F1 | F2 | F3 | F4 | F5 |---------------------------| | |SHIFT|CTRL | ALT | GUI | ENTER | -| SHIFT | F6 | F7 | F8 | F9 | F10 |PRTSC|---------------| ESC | \ | [ | ] | { | } | SHIFT | ---------------|CTRL |-----| GUI | ALT | Num | Adj |---| *** |SPACE| ALT | GUI |-----|CTRL |-------------- -``` -Holding down the Sym key accesses a layer of symbol and function keys: - -- The symbols usually found on the number keys are in the top row. - If desired, you can use these positions for other things, - as the symbols are also accessible from the number pad layer with the shift key. -- Several more symbols appear on the right. -- The function keys are on the left, beginning with two rows of five. -- A row of modifiers in the home row allows the comfortable creation of any modifier and function key combination. -- The base layer modifier and escape keys are still available, as is a right-hand control key. - -## Number Pad and Algebraic Layer -``` -| TAB | - | + | = | / | * |---------------------------| . | 7 | 8 | 9 | | BSPC | -| | GUI | ALT |CTRL |SHIFT| |---------------------------| 0 | 1 | 2 | 3 | _ | ENTER | -| SHIFT | | | | | | |---------------| ESC | , | 4 | 5 | 6 | | SHIFT | ---------------|CTRL |-----| GUI | ALT | *** | |---| |BSPC | ALT | GUI |-----|CTRL |-------------- -``` -Holding down the Num key accesses a number pad and arithmetic symbols: - -- The number pad has the lowest numbers swapped into the home row as these are the most commonly used. -- A row of modifiers in the home row allows the comfortable creation of any modifier and number combination. -- Symbols commonly used with numbers fill out the layer - and can be combined with the home row mods or the existing base layer modifiers on the right hand. -- Several keys remain unused and await more user-specific needs. - - -## Adjust Layer -``` -| |QWERT|DVORK|COLMK|AG_SWAP|AG_NORM|-----------------------| | | | | | | -| | | | |CTR_S|CTR_N|---------------------------|MOD+ |BRI+ |HUE+ |SAT+ | | | -| QK_BOOT | | | | | | |--------------|RGBTOG|MOD- |BRI- |HUE- |SAT- | | | ---------------| |-----| | | | *** |---| *** | | | |-----| |-------------- -``` -Simultaneously holding down the Nav and Sym keys enables keys to adjust various keyboard settings: - -- The base layer can be set to QWERTY, Colemak-DH or Dvorak, - but the keyboard reverts to QWERTY each time it is plugged in. -- Alt/option and GUI/command can be swapped for mac users or restored to the windows norm. - This setting persists over power loss. -- The backlight LEDs can be enabled, disabled, and controlled. - These settings also persist over power loss. - - -## Make it Yours - -If you are coming from a traditional keyboard, - with a row-staggered layout and a large set of physical keys, - learning to use a column staggered (ergo) and layer-based keyboard, - which uses layers instead of finger reaches to access numbers, symbols and functions, - will be an adjustment for your muscle memory and your mental keyboard map. -This default layout tries to simplify that adjustment by keeping things in the expected spots when possible. - -Yet this layout is only a decent compromise and is not optimal for each user. - -The online configurator makes it easy to tweak this layout to your needs. -You can add additional layers or completely switch around what these do. - -Some changes you might consider making: -- Put some of your most-used key combinations on the unused keys on the navigation layer. -- If you are on a mac, switch the editing and word navigation keys from ctrl-x to cmd-x. -- Change the shift keys to one-shot shift keys, - where pressing and releasing them shifts the next key pressed. - That is much easier on your hands than holding them down. - Yet, they can still be held as usual if desired. -- Instead of holding down the thumb key to keep the symbol layer active, - you could use a one-shot layer key. - One-shot modifiers are likely less stress on your hands and may even be faster. - You would still be able to hold it down instead. -- Instead of holding down the key for the number pad layer, - you could make it a layer toggle, like caps lock is a capitalization toggle key. - -Here are some other keymaps for inspiration and ideas: -- The [Ferris default](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ferris/keymaps/default) uses more advanced features as it has far fewer keys to work with. -- The [Miryoku](https://github.com/manna-harbour/miryoku/tree/master/docs/reference) keymap ensures that all modifiers are comfortably available with each character key. -- The [Kyria default](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria/keymaps/default) has different keymap choices and a couple more keys. - -A good metaphor is to think of your keymap as a bonsai tree that you tweak slightly over time - in response to ideas of how it might serve you better. - - -## Why no keymap.c - -Via and the online configurator provide straightforward visual ways to work with a simple layout, - and both use a .json keymap format. -So this default ```keymap.json``` was created with the online configurator - and formatted for easier reading and editing. - -If you wish, you can edit the ```keymap.json``` directly in a text editor, optionally use the below ```json2hill.py``` to restore the spacing, and then compile and flash it. - -Or, you can use the graphical configurator to edit the keymap. To do that: - -- Open the [QMK configurator](https://config.qmk.fm/#/handwired/hillside/LAYOUT) -- Using the green up arrow button, load the keymap from ```qmk_firmware/keyboards/handwired/hillside/keymaps/default/keymap.json``` -- Make the changes you wish to the layout -- Save the keymap using the green down arrow button. -- Copy those changes back into your QMK repository and reformat for easy reading using the format script: -``` -./keyboards/handwired/hillside/0_1/keymaps/json2hill.py --input <Your download directory>/default.json > ./keyboards/handwired/hillside/0_1/keymaps/default/keymap.json -``` - You may need to make that script executable with ```chmod +x```. After your keymap is safely copied and formated, you may want to remove the keymap from your download directory so later downloads will automatically receive the same file name. - -After either method of editing, compile and flash the keymap as usual. - -You can combine a .json based keymap with more advanced features specified in .c files - with a bit more complexity. -For example, see -[pierrec83's Kyria map](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria/keymaps/pierrec83). diff --git a/keyboards/handwired/hillside/48/48.c b/keyboards/handwired/hillside/48/48.c new file mode 100644 index 0000000000..a1d2c2f6e4 --- /dev/null +++ b/keyboards/handwired/hillside/48/48.c @@ -0,0 +1,4 @@ +// Copyright 2022 Michael McCoyd (@mmccoyd) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "48.h" diff --git a/keyboards/handwired/hillside/0_1/0_1.h b/keyboards/handwired/hillside/48/48.h index 0aeefdf630..65e1aaee30 100644 --- a/keyboards/handwired/hillside/0_1/0_1.h +++ b/keyboards/handwired/hillside/48/48.h @@ -1,4 +1,4 @@ -// Copyright 2021 Michael McCoyd (@mmccoyd) +// Copyright 2022 Michael McCoyd (@mmccoyd) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/keyboards/handwired/hillside/0_1/config.h b/keyboards/handwired/hillside/48/config.h index c83b23d0e8..c83b23d0e8 100644 --- a/keyboards/handwired/hillside/0_1/config.h +++ b/keyboards/handwired/hillside/48/config.h diff --git a/keyboards/handwired/hillside/0_1/info.json b/keyboards/handwired/hillside/48/info.json index 7e128d5191..2325c2d8d3 100644 --- a/keyboards/handwired/hillside/0_1/info.json +++ b/keyboards/handwired/hillside/48/info.json @@ -2,7 +2,7 @@ "manufacturer": "mmccoyd", "maintainer": "mmccoyd", - "keyboard_name": "Hillside", + "keyboard_name": "Hillside48", "url": "http://github.com/mmccoyd/hillside/", "tags": ["split", "column stagger", "choc v1", "choc spaced" ], @@ -44,7 +44,7 @@ "LAYOUT": { "layout": [ - {"label": "Tab", "x": 0, "y": 0.93}, + {"label": "`", "x": 0, "y": 0.93}, {"label": "Q", "x": 1, "y": 0.93}, {"label": "W", "x": 2, "y": 0.31}, {"label": "E", "x": 3, "y": 0}, @@ -59,7 +59,7 @@ {"label": "Backspace", "x": 14.5, "y": 0.93}, - {"label": "Ctrl", "x": 0, "y": 1.93}, + {"label": "Tab", "x": 0, "y": 1.93}, {"label": "A", "x": 1, "y": 1.93}, {"label": "S", "x": 2, "y": 1.31}, {"label": "D", "x": 3, "y": 1}, @@ -71,7 +71,7 @@ {"label": "K", "x": 11.5, "y": 1}, {"label": "L", "x": 12.5, "y": 1.31}, {"label": ";", "x": 13.5, "y": 1.93}, - {"label": "'", "x": 14.5, "y": 1.93}, + {"label": "Enter", "x": 14.5, "y": 1.93}, {"label": "Shift", "x": 0, "y": 2.93}, @@ -80,9 +80,9 @@ {"label": "C", "x": 3, "y": 2}, {"label": "V", "x": 4, "y": 2.28}, {"label": "B", "x": 5, "y": 2.42}, - {"label": "`", "x": 6, "y": 2.78}, + {"label": "Esc", "x": 6, "y": 2.78}, - {"label": "Esc", "x": 8.5, "y": 2.78}, + {"label": "Caps", "x": 8.5, "y": 2.78}, {"label": "N", "x": 9.5, "y": 2.42}, {"label": "M", "x": 10.5, "y": 2.28}, {"label": ",", "x": 11.5, "y": 2}, @@ -91,18 +91,18 @@ {"label": "Shift", "x": 14.5, "y": 2.93}, - {"label": "Enter", "x": 2, "y": 3.31}, + {"label": "Ctrl", "x": 2, "y": 3.31}, {"label": "Gui", "x": 3.5, "y": 3.28}, {"label": "Alt", "x": 4.5, "y": 3.42}, - {"label": "Num", "x": 5.5, "y": 3.78}, - {"label": "Nav", "x": 6.5, "y": 4.14}, + {"label": "Sym", "x": 5.5, "y": 3.78}, + {"label": "Shift", "x": 6.5, "y": 4.14}, - {"label": "Sym", "x": 8, "y": 4.14}, + {"label": "Nav", "x": 8, "y": 4.14}, {"label": "Space", "x": 9, "y": 3.78}, {"label": "Alt", "x": 10, "y": 3.42}, {"label": "Gui", "x": 11, "y": 3.28}, - {"label": "App", "x": 12.5, "y": 3.31} + {"label": "'", "x": 12.5, "y": 3.31} ] } } diff --git a/keyboards/handwired/hillside/48/keymaps/default/config.h b/keyboards/handwired/hillside/48/keymaps/default/config.h new file mode 100644 index 0000000000..1f71d42e67 --- /dev/null +++ b/keyboards/handwired/hillside/48/keymaps/default/config.h @@ -0,0 +1,9 @@ +// Copyright 2022 Michael McCoyd (@mmccoyd) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Some boards have issues detecting handedness using the vbus voltage, +// such as Elite-C v3, but not v3.1 on, and apparently some ProMicro boards. +// For those boards, use usb detection instead. +// #define SPLIT_USB_DETECT diff --git a/keyboards/handwired/hillside/48/keymaps/default/keymap.json b/keyboards/handwired/hillside/48/keymaps/default/keymap.json new file mode 100644 index 0000000000..364ab726a0 --- /dev/null +++ b/keyboards/handwired/hillside/48/keymaps/default/keymap.json @@ -0,0 +1,88 @@ +{ "version": 1, + "notes": "", + "documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "handwired/hillside/48", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + ["KC_GRV" , "KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T", + "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P" , "KC_BSPC", + + "KC_TAB" , "KC_A" , "KC_S" , "KC_D" , "KC_F" , "KC_G", + "KC_H" , "KC_J" , "KC_K" , "KC_L" , "KC_SCLN" , "KC_ENT", + + "KC_LSFT" , "KC_Z" , "KC_X" , "KC_C" , "KC_V" , "KC_B" , "KC_ESC", + "CAPS_WORD" , "KC_N" , "KC_M" , "KC_COMM", "KC_DOT" , "KC_SLSH" , "KC_RSFT", + + "KC_LCTL" , "KC_LGUI" , "KC_LALT", "MO(3)" , "OSM(MOD_LSFT)", + "MO(4)" , "KC_SPC" , "KC_LALT", "KC_RGUI", "KC_QUOT" + + ], + ["KC_GRV" , "KC_QUOT" , "KC_COMM", "KC_DOT" , "KC_P" , "KC_Y", + "KC_F" , "KC_G" , "KC_C" , "KC_R" , "KC_L" , "KC_BSPC", + + "KC_TAB" , "KC_A" , "KC_O" , "KC_E" , "KC_U" , "KC_I", + "KC_D" , "KC_H" , "KC_T" , "KC_N" , "KC_S" , "KC_ENT", + + "KC_LSFT" , "KC_SCLN" , "KC_Q" , "KC_J" , "KC_K" , "KC_X" , "KC_ESC", + "CAPS_WORD" , "KC_B" , "KC_M" , "KC_W" , "KC_V" , "KC_Z" , "KC_RSFT", + + "KC_LCTL" , "KC_LGUI" , "KC_LALT", "MO(3)" , "OSM(MOD_LSFT)", + "MO(4)" , "KC_SPC" , "KC_LALT", "KC_RGUI", "KC_SLSH" + + ], + ["KC_GRV" , "KC_Q" , "KC_W" , "KC_F" , "KC_P" , "KC_B", + "KC_J" , "KC_L" , "KC_U" , "KC_Y" , "KC_SCLN" , "KC_BSPC", + + "KC_TAB" , "KC_A" , "KC_R" , "KC_S" , "KC_T" , "KC_G", + "KC_M" , "KC_N" , "KC_E" , "KC_I" , "KC_O" , "KC_ENT", + + "KC_LSFT" , "KC_Z" , "KC_X" , "KC_C" , "KC_D" , "KC_V" , "KC_ESC", + "CAPS_WORD" , "KC_K" , "KC_H" , "KC_COMM", "KC_DOT" , "KC_SLSH" , "KC_RSFT", + + "KC_LCTL" , "KC_LGUI" , "KC_LALT", "MO(3)" , "OSM(MOD_LSFT)", + "MO(4)" , "KC_SPC" , "KC_LALT", "KC_RGUI", "KC_QUOT" + + ], + ["KC_HOME" , "KC_EXLM" , "KC_AT" , "KC_HASH", "KC_DLR" , "KC_PERC", + "KC_CIRC" , "KC_AMPR" , "KC_ASTR", "KC_LPRN", "KC_RPRN" , "KC_DEL", + + "KC_END" , "KC_LGUI" , "KC_LALT", "KC_LCTL", "KC_LSFT" , "KC_INS", + "KC_LBRC" , "KC_RBRC" , "KC_MINS", "KC_EQL" , "KC_BSLS" , "KC_TRNS", + + "KC_LSFT" , "KC_NO" , "KC_VOLD", "KC_MUTE", "KC_VOLU" , "KC_MPLY" , "OSM(MOD_RALT)", + "KC_APP" , "KC_LCBR" , "KC_RCBR", "KC_UNDS", "KC_PLUS" , "KC_PIPE" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS", "KC_TRNS", "OSM(MOD_LSFT)", + "MO(5)" , "KC_TRNS" , "KC_TRNS", "KC_TRNS", "KC_RCTL" + + ], + ["LCTL(KC_X)", "KC_1" , "KC_2" , "KC_3" , "KC_4" , "KC_5", + "KC_6" , "KC_7" , "KC_8" , "KC_9" , "KC_0" , "KC_BSPC", + + "LCTL(KC_C)", "KC_LEFT" , "KC_DOWN", "KC_UP" , "KC_RGHT" , "LCTL(KC_V)", + "KC_PGUP" , "KC_RSFT" , "KC_RCTL", "KC_LALT", "KC_RGUI" , "KC_PGDN", + + "KC_LSFT" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F4" , "KC_F5" , "LCTL(KC_Z)", + "LCTL(KC_Y)", "KC_F6" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS", "MO(5)" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS", "KC_TRNS", "KC_RCTL" + + ], + ["KC_NO" , "DF(0)" , "DF(1)" , "DF(2)" , "AG_SWAP" , "CG_SWAP", + "KC_NO" , "KC_F11" , "KC_F12" , "KC_PSCR", "KC_NO" , "KC_NO", + + "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" , "AG_NORM" , "CG_NORM", + "RGB_MOD" , "RGB_VAI" , "RGB_HUI", "RGB_SAI", "KC_NO" , "KC_NO", + + "KC_NO" , "KC_LGUI" , "KC_LALT", "KC_LCTL", "KC_LSFT" , "KC_NO" , "KC_NO", + "RGB_TOG" , "RGB_RMOD", "RGB_VAD", "RGB_HUD", "RGB_SAD" , "KC_NO" , "QK_BOOT", + + "KC_NO" , "KC_NO" , "KC_NO" , "KC_TRNS", "KC_NO", + "KC_TRNS" , "KC_NO" , "KC_NO" , "KC_NO" , "KC_NO" + + ] + ], + "author": "@mmccoyd" +} diff --git a/keyboards/handwired/hillside/48/keymaps/default/readme.md b/keyboards/handwired/hillside/48/keymaps/default/readme.md new file mode 100644 index 0000000000..9bf294eff0 --- /dev/null +++ b/keyboards/handwired/hillside/48/keymaps/default/readme.md @@ -0,0 +1,159 @@ +# Default Keymap + +For easier initial use, this keymap follows the layout of more standard keyboards where possible. It is a starting point for you to tweak over time to suit your preferences better. You can easily customize it with the [QMK configurator](https://config.qmk.fm/#/handwired/hillside/48/LAYOUT). + +Some of its key features are: +- Numbers and symbols along the top row of their layers for familiarity. +- Comfortable combination of modifier and function or symbol on the non-base layers + using modifiers on the home row of the symbol and number/function layers. +- A layer with both navigation and editing keys allows document editing without leaving the layer. +- QWERTY, Colemak-DH and Dvorak base layer options. + +## Base Layer + +``` +| ` | Q | W | E | R | T |---------------------------| Y | U | I | O | P | BKSPC | +| TAB | A | S | D | F | G |---------------------------| H | J | K | L | ; | ENTER | +| SHIFT | Z | X | C | V | B | ESC |---------------|CAPS | N | M | , | . | / | SHIFT | +--------------|CTRL |-----| GUI | ALT | Sym |SHIFT|---| Nav |SPACE| ALT | GUI |-----| ' |-------------- +``` + +The base layer provides a very standard key layout with five differences: + +- Numbers, functions and most symbols are accessed with number and symbol shift keys. +- Escape is on the left thumb. +- The left thumb has a shift key that affects the next key pressed. So to get 'A', press and release the thumb shift key, press 'a'. You can also hold the key down, and it will work like a standard shift key. There are still standard shift keys at either end of the keyboard. +- The right upper thumb turns on a mode that capitalizes all letters until something other than a letter, digit, dash, underscore, delete or backspace is typed. The caps word mode also times out after five seconds of no key presses. +- The Menu and AltGr keys are on a layer. + +The default layout is QWERTY with alternatives of Dvorak and Colemak-DH, and the alt/option and the win/command key locations are swappable for windows or mac. + + +<details> +<summary>Details of Dvorak and Colemak-DH</summary> +The Dvorak and Colemak-DH base layers + have identical non-alpha and non-symbol keys as the QWERTY base layer. + +``` +Dvorak +| ` | ' | , | . | P | Y |---------------------------| F | G | C | R | L | BKSPC | +| TAB | A | O | E | U | I |---------------------------| D | H | T | N | S | ENTER | +| SHIFT | ; | Q | J | K | X | ESC |---------------|CAPS | B | M | W | V | Z | SHIFT | +--------------|CTRL |-----| GUI | ALT | Sym |SHIFT|---| Nav |SPACE| ALT | GUI |-----| / |-------------- + +Colemak-DH +| ` | Q | W | F | P | B |---------------------------| J | L | U | Y | ; | BKSPC | +| TAB | A | R | S | T | G |---------------------------| M | N | E | I | O | ENTER | +| SHIFT | Z | X | C | D | V | ESC |---------------|CAPS | K | H | , | . | / | SHIFT | +--------------|CTRL |-----| GUI | ALT | Sym |SHIFT|---| Nav |SPACE| ALT | GUI |-----| ' |-------------- +``` +</details> + +## Symbol and Media Layer + +``` +| HOME | ! | @ | # | $ | % |---------------------------| ^ | & | * | ( | ) | DEL | +| END | GUI | ALT |CTRL |SHIFT| INS |---------------------------| [ | ] | - | = | \ | ENTER | +| SHIFT | |VOL- |MUTE |VOL+ |PLAY |OSM ALT |------------|MENU | { | } | _ | + | | | SHIFT | +--------------|CTRL |-----| GUI | ALT | *** |SHIFT|---| Adj |SPACE| ALT | GUI |-----|CTRL |-------------- +``` +Holding down the SYM key accesses the symbol layer: + +- The symbols not present on the base layer are along the top row and right side, similar to a full-size keyboard. +- Duplicates of the modifier keys are along the left home keys. This allows a very comfortable combination of any set of modifiers plus a key on the right side of the board. +- Forward delete is on the upper right, taking backspace's place. +- The Windows OS application menu key is on the upper right thumb. +- The AltGr key affects the next key pressed so that it can combine with a key on any layer. It changes the meaning of the next key pressed after the AltGr key is pressed and released. For example, to do AltGr-h: press SYM, press and release AltGr, release SYM, press and release h. + +## Navigation, Editing, Number and Function Layer + +``` +| CUT | 1 | 2 | 3 | 4 | 5 |---------------------------| 6 | 7 | 8 | 9 | 0 | BSPC | +| COPY |LEFT |DOWN | UP |RIGHT|PASTE|---------------------------|PG_UP|SHIFT|CTRL | ALT | GUI | PG_DN | +| SHIFT | F1 | F2 | F3 | F4 | F5 |UNDO |---------------|REDO | F6 | F7 | F8 | F9 | F10 | SHIFT | +--------------|CTRL |-----| GUI | ALT | Adj |SHIFT|---| *** |SPACE| ALT | GUI |-----|CTRL |-------------- +``` +Holding down the Nav/Edit key accesses the navigation, editing, number and function layer: + +- Numbers are along the top row, and function keys are on the bottom row. +- The arrow keys on the left can be combined with the home row modifiers on the right to easily move around and select text, which can then be cut, copied and pasted. + + +## Adjust Layer +``` +| |QWERT|DVORK|COLMK|AG_SWAP|CTR_SWAP|----------------------| | F11 | F12 |PR_SCR| | | +| | | | |AG_NORM|CTR_NORM|----------------------|MOD+ |BRI+ |HUE+ |SAT+ | | | +| | GUI | ALT |CTRL |SHIFT| | |--------------|RGBTOG|MOD- |BRI- |HUE- |SAT- | | BOOT | +--------------| |-----| | | *** | |---| *** | | | |-----| |-------------- +``` +Simultaneously holding down the Sym and Nav/Edit keys enables keys to adjust keyboard settings: + +- The base layer can be set to QWERTY, Colemak-DH or Dvorak, although the keyboard reverts to QWERTY each time it is plugged in. +- Alt/option and GUI/command can be swapped for mac users or restored to the windows norm. +- The backlight LEDs can be enabled, disabled, and controlled. +- BOOT allows loading new firmware, such as for keymap changes. +- The remaining Fn keys are here with modifiers to use with them. + +## Make it Yours + +If you are coming from a traditional keyboard, + with a row-staggered layout and a large set of physical keys, + learning to use a column staggered (ergo) and layer-based keyboard, + which uses layers instead of finger reaches to access numbers, symbols and functions, + will be an adjustment for your muscle memory and your mental keyboard map. +This default layout tries to simplify that adjustment by keeping things in the expected spots when possible. + +Yet this layout is only a decent compromise and is not optimal for each user. +The online configurator makes it easy to tweak this layout to your needs. +You can add additional layers or completely switch around what these do. + +A good metaphor is to think of your keymap as a bonsai tree that you tweak slightly over time + in response to ideas of how it might serve you better. + +Some changes you might consider making: +- If you are on a mac, switch the editing keys from ctrl-x to cmd-x. +- Change the shift keys to one-shot shift keys, + where pressing and releasing them shifts the next key pressed. + That is much easier on your hands than holding them down. + Yet, they can still be held as usual if desired. +- Instead of holding down the thumb key to keep the symbol layer active, + you could use a one-shot layer key. + One-shot modifiers are likely less stress on your hands and may even be faster. + You would still be able to hold it down instead. + +Here are some other keymaps for inspiration and ideas: +- The [Ferris default](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ferris/keymaps/default) uses more advanced features as it has far fewer keys. +- The [Miryoku](https://github.com/manna-harbour/miryoku/tree/master/docs/reference) keymap ensures that all modifiers are comfortably available with each character key. +- The [Kyria default](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria/keymaps/default) has different keymap choices and a couple more keys. + + + +## Why no keymap.c + +The online configurator provides a straightforward visual way to work with a simple layout + and uses a .json keymap format. +So this default ```keymap.json``` was created with the online configurator + and formatted for easier reading and editing. + +If you wish, you can edit the ```keymap.json``` directly in a text editor, optionally use the below ```json2hill48.py``` to restore the spacing, and then compile and flash it. + +Or, you can use the graphical configurator to edit the keymap. To do that: + +- Open the [QMK configurator](https://config.qmk.fm/#/handwired/hillside/48/LAYOUT) +- Using the green up arrow button, load the keymap from ```qmk_firmware/keyboards/handwired/hillside/48/keymaps/default/keymap.json``` +- Make the changes you wish to the layout +- Save the keymap using the green down arrow button. +- Copy those changes back into your QMK repository and reformat for easy reading using the format script: +``` +./keyboards/handwired/hillside/48/keymaps/json2hill48.py \ + --input <Your download directory>/default.json \ + > ./keyboards/handwired/hillside/48/keymaps/default/keymap.json +``` + You may need to make that script executable with ```chmod +x```. After your keymap is safely copied and formatted, you may want to remove the keymap from your download directory so later downloads will automatically receive the same file name. + +After either method of editing, compile and flash the keymap as usual. + +You can combine a .json based keymap with more advanced features specified in .c files + with a bit more complexity. +For example, see +[pierrec83's Kyria map](https://github.com/qmk/qmk_firmware/tree/master/keyboards/splitkb/kyria/keymaps/pierrec83).
\ No newline at end of file diff --git a/keyboards/handwired/hillside/48/keymaps/default/rules.mk b/keyboards/handwired/hillside/48/keymaps/default/rules.mk new file mode 100644 index 0000000000..4711d2ff74 --- /dev/null +++ b/keyboards/handwired/hillside/48/keymaps/default/rules.mk @@ -0,0 +1 @@ +CAPS_WORD_ENABLE = yes diff --git a/keyboards/handwired/hillside/0_1/keymaps/json2hill.py b/keyboards/handwired/hillside/48/keymaps/json2hill48.py index a9971c0d78..c4fb5b1037 100755 --- a/keyboards/handwired/hillside/0_1/keymaps/json2hill.py +++ b/keyboards/handwired/hillside/48/keymaps/json2hill48.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 -# Copyright 2020-2021 Pierre Viseu Chevalier, Michael McCoyd (@pierrechevalier83, @mmccoyd) +# Copyright 2020-2022 Pierre Viseu Chevalier, Michael McCoyd (@pierrechevalier83, @mmccoyd) # SPDX-License-Identifier: GPL-2.0-or-later -"""Pretty print keymap json in more readable row/side organized format.""" +"""Pretty print keymap json in more readable row/side organized format, based on ROW_SIZES.""" import argparse import json @@ -28,14 +28,20 @@ For example, for one layer: ], """ -indent_level=4 # number of spaces of initial indent per output line +# The structure of the keymap. Tuples describing row sizes. +# (<Keys upto and including (one-indexed) keycount x> <are in half rows of y>) +ROW_SIZES = [(24, 6), + (38, 7), + (48, 5), + ] + +### +### Below here should not need to changed for different keyboards +### -# The structure of the keymap -# [[Endpoint of sides with identical widths, side width, mapping to column],...] -KEYS_TO_COL = [[24, 6, lambda n: n % 6], - [38, 7, lambda n: (n - 24) % 7], - [48, 5, lambda n: (n - 38) % 5]] -LAST_KEY = KEYS_TO_COL[-1][0] - 1 +LAST_KEY = ROW_SIZES[-1][0] - 1 + +indent_level=4 # number of spaces of initial indent per output line def parse_cli(): parser = argparse.ArgumentParser(description='Hillside keymap formatter') @@ -54,12 +60,15 @@ class Column(NamedTuple): def get_col(key_index): """Return Column for key_index.""" - for keys, num_cols, col_fn in KEYS_TO_COL: - if key_index < keys: - col_num = col_fn(key_index) - return Column(col_num, + index_prior = 0 # index of last key in rows of the prior size + for keys_upto, num_cols in ROW_SIZES: # For row sizes from top + if key_index < keys_upto: # Find range key_index is in + col_num = (key_index - index_prior) % num_cols + return Column(col_num, # Return column plus side and row ends flags ends_side=col_num == num_cols - 1, - ends_row=(keys - 1 - key_index) % (2 * num_cols) == 0) + ends_row=(keys_upto - 1 - key_index) % + (2 * num_cols) == 0) + index_prior = keys_upto # Big O: row ranges * keys, but range is small def format_layers(layers): formatted = indent_level * " " + "\"layers\": [\n" @@ -133,4 +142,5 @@ def main(): keymap_json = json.loads(args.input.read()) print(format_keymap(keymap_json)) -main() +if __name__ == "__main__": + main() diff --git a/keyboards/handwired/hillside/0_1/keymaps/via/keymap.json b/keyboards/handwired/hillside/48/keymaps/via/keymap.json index a015f0241c..b4848a72ee 100644 --- a/keyboards/handwired/hillside/0_1/keymaps/via/keymap.json +++ b/keyboards/handwired/hillside/48/keymaps/via/keymap.json @@ -1,6 +1,6 @@ { "version": 1, "notes": "", - "keyboard": "handwired/hillside/0_1", + "keyboard": "handwired/hillside/48", "keymap": "via", "layout": "LAYOUT", "layers": [ diff --git a/keyboards/handwired/hillside/0_1/readme.md b/keyboards/handwired/hillside/48/readme.md index f1ff0f8506..ec6dffc0f2 100644 --- a/keyboards/handwired/hillside/0_1/readme.md +++ b/keyboards/handwired/hillside/48/readme.md @@ -2,7 +2,7 @@ ![hillside](https://imgur.com/XW0rX13.png) -[Hillside](https://github.com/mmccoyd/hillside) +[Hillside 48](https://github.com/mmccoyd/hillside) is a split ergonomic keyboard with 3x6+4+2 choc-spaced keys with aggressive column stagger, a longer thumb arc and a breakoff outer-pinky column. @@ -13,11 +13,11 @@ Make example for this keyboard (after setting up your build environment): - make handwired/hillside/0_1:default + make handwired/hillside/48:default Flashing example for this keyboard: - make handwired/hillside/0_1:default:flash + make handwired/hillside/48:default:flash ## Bootloader diff --git a/keyboards/handwired/hillside/0_1/rules.mk b/keyboards/handwired/hillside/48/rules.mk index 2501147ea8..2501147ea8 100644 --- a/keyboards/handwired/hillside/0_1/rules.mk +++ b/keyboards/handwired/hillside/48/rules.mk diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h index d430e008dd..825edd40ca 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, C7, B4, B5, B6, C6 } #define MATRIX_COL_PINS { F0, E6, B0, D0, D1, D2, D3, D5, D4, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index 8080cf1138..6d4e8f7d33 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B5, B3, D4 } #define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 9c9b7a09a9..e9f99eaba3 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_COL_PINS { E6, B7, D0, D1, D2, D3, D4, D5, D6, D7, E0, E1, C0, C1, C2, C3, C4, C5, C7, F1 } #define MATRIX_ROW_PINS { F0, B5, B4, B3, B2, B1, B0, E7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index 2a0f34cab1..cabfebbfcd 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, D5, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/jopr/config.h b/keyboards/handwired/jopr/config.h index 484415752b..5625f99521 100644 --- a/keyboards/handwired/jopr/config.h +++ b/keyboards/handwired/jopr/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D6, D2, D4, D3, D5, D7, C6, B6, F5 } #define MATRIX_COL_PINS { B3, B2, B1, B0, F7, E6, F6, B5, C7, B4, D1 } -#define UNUSED_PINS { B7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/jot50/config.h b/keyboards/handwired/jot50/config.h index 5d3c6773e1..d3ce848df6 100644 --- a/keyboards/handwired/jot50/config.h +++ b/keyboards/handwired/jot50/config.h @@ -9,7 +9,6 @@ /* pro_micro pin-out */ #define MATRIX_ROW_PINS { D7, E6, B4, B6, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } -#define UNUSED_PINS /* leds */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h index f1ae28b9dc..9468505c44 100644 --- a/keyboards/handwired/jotanck/config.h +++ b/keyboards/handwired/jotanck/config.h @@ -9,7 +9,6 @@ /* pro_micro pin-out */ #define MATRIX_ROW_PINS { D7, E6, B6, B2 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } -#define UNUSED_PINS /* leds */ #define JOTANCK_LEDS diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h index 0afe9be035..b0e3ebcf8c 100644 --- a/keyboards/handwired/jotpad16/config.h +++ b/keyboards/handwired/jotpad16/config.h @@ -9,7 +9,6 @@ /* pro_micro pin-out */ #define MATRIX_ROW_PINS { B6, B2, D2, D3 } #define MATRIX_COL_PINS { E6, D7, B3, B1 } -#define UNUSED_PINS /* leds */ #define JOTPAD16_LEDS diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h index acca0a265a..e3c08722e2 100644 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ b/keyboards/handwired/jtallbean/split_65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { C6, B5, B4, D7, D6, D4, D2, D3, B7 } // B7 is not actually used, but it is needed since # of entries must equal 9 #define MATRIX_ROW_PINS_RIGHT { E6, F0, F1, F7, D7 } #define MATRIX_COL_PINS_RIGHT { B4, B5, B6, C6, C7, D4, D6, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/k_numpad17/config.h b/keyboards/handwired/k_numpad17/config.h index fd412cb723..ebe38b9d31 100644 --- a/keyboards/handwired/k_numpad17/config.h +++ b/keyboards/handwired/k_numpad17/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D4, C6, D7, E6 } #define MATRIX_COL_PINS { B2, B1, F6 , F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index 0200f5e180..44046dcfa1 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7, D6 } #define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 333f8a769f..0ffc3e9d97 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -89,7 +89,7 @@ void matrix_init_user(void) { } void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (layer) { PORTC |= _BV(PC7); } else { diff --git a/keyboards/handwired/lagrange/config.h b/keyboards/handwired/lagrange/config.h index 0b9638178d..14a5767272 100644 --- a/keyboards/handwired/lagrange/config.h +++ b/keyboards/handwired/lagrange/config.h @@ -30,7 +30,6 @@ #define MATRIX_COL_PINS { B4, B5, D7, B6, C6, D6 } #define MATRIX_ROW_PINS_RIGHT { B5, B4, D7, B6, C6, D6, D4 } #define MATRIX_COL_PINS_RIGHT { C7, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/leftynumpad/config.h b/keyboards/handwired/leftynumpad/config.h index 33dc93fc0e..e05ceae098 100644 --- a/keyboards/handwired/leftynumpad/config.h +++ b/keyboards/handwired/leftynumpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { E6, B4, B5, B6, B2 } -#define UNUSED_PINS {D3, D2, B0, D5, B3, B1, F7, F6, F5, F4 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/lemonpad/config.h b/keyboards/handwired/lemonpad/config.h index 32ccfda88a..7db499aba4 100644 --- a/keyboards/handwired/lemonpad/config.h +++ b/keyboards/handwired/lemonpad/config.h @@ -37,7 +37,6 @@ { E6, D7, C6 }, \ { B4, B5, D4 } \ } -#define UNUSED_PINS //#define BACKLIGHT_PIN B7 //#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h index 7453fb0202..42974d48a5 100644 --- a/keyboards/handwired/lovelive9/config.h +++ b/keyboards/handwired/lovelive9/config.h @@ -13,7 +13,6 @@ #define DIODE_DIRECTION COL2ROW -#define UNUSED_PINS /* ws2812 RGB LED */ #define RGB_DI_PIN D3 diff --git a/keyboards/handwired/m40/5x5_macropad/config.h b/keyboards/handwired/m40/5x5_macropad/config.h index 935bc3992c..fb9938c9d6 100644 --- a/keyboards/handwired/m40/5x5_macropad/config.h +++ b/keyboards/handwired/m40/5x5_macropad/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/macroboard/config.h b/keyboards/handwired/macroboard/config.h index 91f2b6a6a7..0d2aba2a38 100644 --- a/keyboards/handwired/macroboard/config.h +++ b/keyboards/handwired/macroboard/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/macroboard/f411/config.h b/keyboards/handwired/macroboard/f411/config.h index d0d88f0c9e..31cb5fa11b 100644 --- a/keyboards/handwired/macroboard/f411/config.h +++ b/keyboards/handwired/macroboard/f411/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A15, B3, B4, B5, B7 } #define MATRIX_COL_PINS { B12, B13, B14, B15, A8, A10 } -#define UNUSED_PINS #define AUDIO_INIT_DELAY #define AUDIO_PIN B10 diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index 7cf32ea0ed..ab24503ea0 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index d53c51a01a..7eab860061 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/marauder/config.h b/keyboards/handwired/marauder/config.h index fdc269fb7f..a3165c480d 100644 --- a/keyboards/handwired/marauder/config.h +++ b/keyboards/handwired/marauder/config.h @@ -36,7 +36,7 @@ #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, B0 } #define DIODE_DIRECTION COL2ROW #define LAYER_STATE_8BIT -#define QMK_KEYS_PER_SCAN 12 // moar gaming code + #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLED_NUM 7 diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h index 923428df56..659bed03e2 100644 --- a/keyboards/handwired/mechboards_micropad/config.h +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6 } #define MATRIX_COL_PINS { B2, B3, B1, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/meck_tkl/blackpill_f401/config.h b/keyboards/handwired/meck_tkl/blackpill_f401/config.h index cca2eac3a9..eff5d5d81f 100644 --- a/keyboards/handwired/meck_tkl/blackpill_f401/config.h +++ b/keyboards/handwired/meck_tkl/blackpill_f401/config.h @@ -7,8 +7,6 @@ { B15, A8, A9, B14, A15, B3 } #define MATRIX_COL_PINS \ { B4, B5, B6, B7, B8, B9, A1, A2, A3, A4, A5, A6, A7, B0, B1, A0, B10 } -#define UNUSED_PINS \ - { A10, A11, A12, B2, B12, C14, C15 } #define LED_CAPS_LOCK_PIN C13 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index 0707e7a8ec..4c27d9da4d 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* MinOrca PCB default pin-out */ #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } #define MATRIX_ROW_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/mutepad/config.h b/keyboards/handwired/mutepad/config.h index bf030bce4b..bc763fc29d 100644 --- a/keyboards/handwired/mutepad/config.h +++ b/keyboards/handwired/mutepad/config.h @@ -23,7 +23,6 @@ { F6 } #define MATRIX_COL_PINS \ { B1, B3, B2, B6 } -#define UNUSED_PINS /* encoder support */ #define ENCODERS_PAD_A \ diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index 702bdaacf7..4cb41fc431 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { C6 } #define MATRIX_ROW_PINS { B6 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/novem/config.h b/keyboards/handwired/novem/config.h index a442f493e2..81fe2d877f 100644 --- a/keyboards/handwired/novem/config.h +++ b/keyboards/handwired/novem/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B4, B5 } #define MATRIX_COL_PINS { B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/nozbe_macro/config.h b/keyboards/handwired/nozbe_macro/config.h index 289e5afcfe..fe69a0833a 100644 --- a/keyboards/handwired/nozbe_macro/config.h +++ b/keyboards/handwired/nozbe_macro/config.h @@ -28,7 +28,6 @@ { B0 } #define MATRIX_COL_PINS \ { D1, D0, D4, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index 4690cce003..0651b524f8 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, B1, B3, B6, B5 } #define MATRIX_COL_PINS { D1, D0, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/oem_ansi_fullsize/config.h b/keyboards/handwired/oem_ansi_fullsize/config.h index 6d2ca75e9b..0ba0cb3897 100644 --- a/keyboards/handwired/oem_ansi_fullsize/config.h +++ b/keyboards/handwired/oem_ansi_fullsize/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { C3, C2, C1, C0, E1, E0, D7, E6, D5, D4, D3, D2, D1, D0, B7, B0, B1, B2, B3, B4, B5, F6 } // C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF CG CH CI CJ CK CL -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h index 3825d3f7ec..6489226c24 100644 --- a/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/keyboards/handwired/onekey/blackpill_f401/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } -#define UNUSED_PINS #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h index 3797217153..630f567c26 100644 --- a/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/keyboards/handwired/onekey/blackpill_f411/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } -#define UNUSED_PINS #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h index 44ec0bfc6e..cd33f05ab0 100755 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } -#define UNUSED_PINS #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD5 diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 3eb7699a8b..f84cbb8dce 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { B0 } #define MATRIX_ROW_PINS { A7 } -#define UNUSED_PINS #define BACKLIGHT_PIN A0 #define BACKLIGHT_PWM_DRIVER PWMD2 diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index f491d4d393..88c15806ce 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD /* * Feature disable options diff --git a/keyboards/handwired/onekey/elite_c/config.h b/keyboards/handwired/onekey/elite_c/config.h index f495a1c38b..0612a6351a 100644 --- a/keyboards/handwired/onekey/elite_c/config.h +++ b/keyboards/handwired/onekey/elite_c/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { F4 } #define MATRIX_ROW_PINS { F5 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 @@ -30,3 +29,6 @@ #define RGB_CI_PIN B1 #define ADC_PIN F6 + +#define QMK_WAITING_TEST_BUSY_PIN F6 +#define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/config.h b/keyboards/handwired/onekey/evb_wb32f3g71/config.h index 91ae8b8996..e68272d8d6 100644 --- a/keyboards/handwired/onekey/evb_wb32f3g71/config.h +++ b/keyboards/handwired/onekey/evb_wb32f3g71/config.h @@ -8,4 +8,3 @@ #define MATRIX_COL_PINS { B12 } #define MATRIX_ROW_PINS { B13 } -#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/evb_wb32fq95/config.h b/keyboards/handwired/onekey/evb_wb32fq95/config.h index 9014d08f52..069de03687 100644 --- a/keyboards/handwired/onekey/evb_wb32fq95/config.h +++ b/keyboards/handwired/onekey/evb_wb32fq95/config.h @@ -8,4 +8,3 @@ #define MATRIX_COL_PINS { B12 } #define MATRIX_ROW_PINS { B13 } -#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/kb2040/config.h b/keyboards/handwired/onekey/kb2040/config.h new file mode 100644 index 0000000000..24a7d3a3eb --- /dev/null +++ b/keyboards/handwired/onekey/kb2040/config.h @@ -0,0 +1,29 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define PRODUCT Onekey Raspberry Pi RP2040 +#define MATRIX_COL_PINS \ + { GP4 } +#define MATRIX_ROW_PINS \ + { GP5 } +#define DEBUG_MATRIX_SCAN_RATE + +#define QMK_WAITING_TEST_BUSY_PIN GP8 +#define QMK_WAITING_TEST_YIELD_PIN GP9 + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +#define RGB_DI_PIN A1 + +// settings for the oled keyboard demo with Adafruit 0.91" OLED display on the Stemma QT port +#define OLED_DISPLAY_128X32 +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP12 +#define I2C1_SCL_PIN GP13 + diff --git a/keyboards/handwired/onekey/kb2040/mcuconf.h b/keyboards/handwired/onekey/kb2040/mcuconf.h new file mode 100644 index 0000000000..57e58e14d7 --- /dev/null +++ b/keyboards/handwired/onekey/kb2040/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include_next <mcuconf.h> + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE diff --git a/keyboards/handwired/onekey/kb2040/readme.md b/keyboards/handwired/onekey/kb2040/readme.md new file mode 100644 index 0000000000..54ea25a6a5 --- /dev/null +++ b/keyboards/handwired/onekey/kb2040/readme.md @@ -0,0 +1,10 @@ +# Adafruit KB2040 onekey with OLED + +To trigger keypress, short together pins *GP4* and *GP5*. + +Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk. + +## Supported Hardware + +* [Adafruit KB2040 - RP2040 Kee Boar](https://www.adafruit.com/product/5302) +* Optional [128x32 OLED display on the Stemma QT port](https://www.adafruit.com/product/4440) diff --git a/keyboards/handwired/onekey/kb2040/rules.mk b/keyboards/handwired/onekey/kb2040/rules.mk new file mode 100644 index 0000000000..624b331bf8 --- /dev/null +++ b/keyboards/handwired/onekey/kb2040/rules.mk @@ -0,0 +1,9 @@ +# MCU name +MCU = RP2040 +BOOTLOADER = rp2040 + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + +OPT_DEFS += -DHAL_USE_I2C=TRUE + diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h new file mode 100644 index 0000000000..0c75fa3044 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/config.h @@ -0,0 +1,12 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#if !defined(QMK_WAITING_TEST_BUSY_PIN) +# define QMK_WAITING_TEST_BUSY_PIN A8 +#endif + +#if !defined(QMK_WAITING_TEST_YIELD_PIN) +# define QMK_WAITING_TEST_YIELD_PIN A9 +#endif diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c new file mode 100644 index 0000000000..ecf67d3b3c --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c @@ -0,0 +1,47 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(KC_A)}; + +#if defined(__AVR__) +# pragma message "AVR uses polled waiting by default, running theses tests will not show any difference" +static inline void chThdSleepMicroseconds(uint32_t us) { + wait_us(us); +} +#endif + +void keyboard_post_init_user(void) { + setPinOutput(QMK_WAITING_TEST_BUSY_PIN); + setPinOutput(QMK_WAITING_TEST_YIELD_PIN); +} + +static inline void wait_us_polling_with_strobe(uint32_t us) { + writePinHigh(QMK_WAITING_TEST_BUSY_PIN); + wait_us(us); + writePinLow(QMK_WAITING_TEST_BUSY_PIN); +} + +static inline void wait_us_yield_with_strobe(uint32_t us) { + writePinHigh(QMK_WAITING_TEST_YIELD_PIN); + chThdSleepMicroseconds(us); + writePinLow(QMK_WAITING_TEST_YIELD_PIN); +} + +static const uint32_t waiting_values[] = {0, 1, 5, 10, 25, 50, 100, 150, 200, 500, 1000}; + +void housekeeping_task_user(void) { + static uint32_t last_bench = 0; + if (timer_elapsed32(last_bench) > 500) { + for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) { + wait_us_polling_with_strobe(waiting_values[i]); + wait_us(10); + } + for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) { + wait_us_yield_with_strobe(waiting_values[i]); + wait_us(10); + } + last_bench = timer_read32(); + } +} diff --git a/keyboards/handwired/onekey/nucleo_l432kc/config.h b/keyboards/handwired/onekey/nucleo_l432kc/config.h index 7aa74f6682..9c20898d34 100644 --- a/keyboards/handwired/onekey/nucleo_l432kc/config.h +++ b/keyboards/handwired/onekey/nucleo_l432kc/config.h @@ -8,7 +8,6 @@ #define MATRIX_COL_PINS { A2 } #define MATRIX_ROW_PINS { A1 } -#define UNUSED_PINS #define BACKLIGHT_PIN B8 #define BACKLIGHT_PWM_DRIVER PWMD4 diff --git a/keyboards/handwired/onekey/onekey.c b/keyboards/handwired/onekey/onekey.c index cbd67012ce..a29f9ea6d0 100644 --- a/keyboards/handwired/onekey/onekey.c +++ b/keyboards/handwired/onekey/onekey.c @@ -1 +1,12 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #include "onekey.h" + +void keyboard_post_init_kb(void) { + debug_enable = true; + debug_matrix = true; + debug_keyboard = true; + debug_mouse = true; + keyboard_post_init_user(); +} diff --git a/keyboards/handwired/onekey/promicro/config.h b/keyboards/handwired/onekey/promicro/config.h index 9c8961d5ca..67f0c9a7c5 100644 --- a/keyboards/handwired/onekey/promicro/config.h +++ b/keyboards/handwired/onekey/promicro/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { F4 } #define MATRIX_ROW_PINS { F5 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 @@ -30,3 +29,6 @@ #define RGB_CI_PIN B1 #define ADC_PIN F6 + +#define QMK_WAITING_TEST_BUSY_PIN F6 +#define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index 5600ae33ae..986cee5560 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { A2 } #define MATRIX_ROW_PINS { A1 } -#define UNUSED_PINS #define BACKLIGHT_PIN B8 #define BACKLIGHT_PWM_DRIVER PWMD4 diff --git a/keyboards/handwired/onekey/rp2040/config.h b/keyboards/handwired/onekey/rp2040/config.h new file mode 100644 index 0000000000..f4e45a8981 --- /dev/null +++ b/keyboards/handwired/onekey/rp2040/config.h @@ -0,0 +1,22 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define PRODUCT Onekey Raspberry Pi RP2040 +#define MATRIX_COL_PINS \ + { GP4 } +#define MATRIX_ROW_PINS \ + { GP5 } +#define DEBUG_MATRIX_SCAN_RATE + +#define QMK_WAITING_TEST_BUSY_PIN GP8 +#define QMK_WAITING_TEST_YIELD_PIN GP9 + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +#define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/rp2040/readme.md b/keyboards/handwired/onekey/rp2040/readme.md new file mode 100644 index 0000000000..9014479f8d --- /dev/null +++ b/keyboards/handwired/onekey/rp2040/readme.md @@ -0,0 +1,12 @@ +# Raspberry Pi 2040 onekey + +To trigger keypress, short together pins *GP4* and *GP5*. + +Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk. + +## Supported Hardware + +* Raspberry Pi Pico +* SparkFun Pro Micro - RP2040 +* Adafruit KB2040 - RP2040 Kee Boar +* ...and many more RP2040 based development boards diff --git a/keyboards/handwired/onekey/rp2040/rules.mk b/keyboards/handwired/onekey/rp2040/rules.mk new file mode 100644 index 0000000000..646402d0bb --- /dev/null +++ b/keyboards/handwired/onekey/rp2040/rules.mk @@ -0,0 +1,3 @@ +# MCU name +MCU = RP2040 +BOOTLOADER = rp2040 diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/config.h index 1825b936d8..6f97baf57f 100644 --- a/keyboards/handwired/onekey/sipeed_longan_nano/config.h +++ b/keyboards/handwired/onekey/sipeed_longan_nano/config.h @@ -22,7 +22,6 @@ { B0 } #define MATRIX_ROW_PINS \ { A7 } -#define UNUSED_PINS #define BACKLIGHT_PIN A1 /* Green LED. */ #define BACKLIGHT_PWM_DRIVER PWMD5 /* GD32 numbering scheme starts from 0, TIMER4 on GD32 boards is TIMER5 on STM32 boards. */ diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h index e0f6d00050..3995df6c35 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/config.h +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h @@ -22,7 +22,6 @@ #define MATRIX_COL_PINS { B4 } #define MATRIX_ROW_PINS { B5 } -#define UNUSED_PINS #define BACKLIGHT_PIN C8 #define BACKLIGHT_PWM_DRIVER PWMD3 diff --git a/keyboards/handwired/onekey/stm32f405_feather/config.h b/keyboards/handwired/onekey/stm32f405_feather/config.h index 32d7807975..07cbe70a30 100644 --- a/keyboards/handwired/onekey/stm32f405_feather/config.h +++ b/keyboards/handwired/onekey/stm32f405_feather/config.h @@ -22,4 +22,3 @@ #define MATRIX_COL_PINS { C2 } #define MATRIX_ROW_PINS { C3 } -#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/teensy_2/config.h b/keyboards/handwired/onekey/teensy_2/config.h index b83262ef05..e52d1bed6d 100644 --- a/keyboards/handwired/onekey/teensy_2/config.h +++ b/keyboards/handwired/onekey/teensy_2/config.h @@ -22,10 +22,12 @@ #define MATRIX_COL_PINS { F4 } #define MATRIX_ROW_PINS { F5 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 #define RGB_DI_PIN F6 #define ADC_PIN F6 + +#define QMK_WAITING_TEST_BUSY_PIN F6 +#define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/teensy_2pp/config.h b/keyboards/handwired/onekey/teensy_2pp/config.h index 886ad70cbf..0c8bde7764 100644 --- a/keyboards/handwired/onekey/teensy_2pp/config.h +++ b/keyboards/handwired/onekey/teensy_2pp/config.h @@ -22,10 +22,12 @@ #define MATRIX_COL_PINS { F4 } #define MATRIX_ROW_PINS { F5 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 #define RGB_DI_PIN F6 #define ADC_PIN F6 + +#define QMK_WAITING_TEST_BUSY_PIN F6 +#define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h index e388b01af8..63845ed673 100644 --- a/keyboards/handwired/onekey/teensy_32/config.h +++ b/keyboards/handwired/onekey/teensy_32/config.h @@ -23,7 +23,6 @@ #define MATRIX_COL_PINS { D5 } #define MATRIX_ROW_PINS { B2 } -#define UNUSED_PINS // i2c_master defines #define I2C1_SCL_PIN B0 // A2 on pinout = B0 diff --git a/keyboards/handwired/onekey/teensy_35/chconf.h b/keyboards/handwired/onekey/teensy_35/chconf.h new file mode 100644 index 0000000000..ee8312c526 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_35/chconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/handwired/onekey/teensy_35/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +#include_next <chconf.h> diff --git a/keyboards/handwired/onekey/teensy_35/config.h b/keyboards/handwired/onekey/teensy_35/config.h new file mode 100644 index 0000000000..18eebcaffd --- /dev/null +++ b/keyboards/handwired/onekey/teensy_35/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// TODO: including this causes "error: expected identifier before '(' token" errors +//#include "config_common.h" + +#define PRODUCT Onekey Teensy 3.5 + +#define MATRIX_COL_PINS { D5 } // 20/A6 +#define MATRIX_ROW_PINS { B2 } // 19/A5 + +// i2c_master defines +#define I2C1_SCL_PIN B0 // 16/A2 on pinout +#define I2C1_SDA_PIN B1 // 17/A3 on pinout +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/onekey/teensy_35/halconf.h b/keyboards/handwired/onekey/teensy_35/halconf.h new file mode 100644 index 0000000000..6ac756d0f2 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_35/halconf.h @@ -0,0 +1,28 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/handwired/onekey/teensy_35/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_SERIAL TRUE + +#define SERIAL_USB_BUFFERS_SIZE 256 + +#include_next <halconf.h> diff --git a/keyboards/handwired/onekey/teensy_35/mcuconf.h b/keyboards/handwired/onekey/teensy_35/mcuconf.h new file mode 100644 index 0000000000..dc508eee7d --- /dev/null +++ b/keyboards/handwired/onekey/teensy_35/mcuconf.h @@ -0,0 +1,50 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define K60x_MCUCONF + +/* + * HAL driver system settings. + */ + +/* Select the MCU clocking mode below by enabling the appropriate block. */ + +/* PEE mode - 120MHz system clock driven by external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 120000000UL // 120 MHz (RUN) +#define KINETIS_SYSCLK_FREQUENCY KINETIS_PLLCLK_FREQUENCY +#define KINETIS_BUSCLK_FREQUENCY 60000000UL +#define KINETIS_FLASHCLK_FREQUENCY 24000000UL // 24 MHz (RUN) + +#define KINETIS_CLKDIV1_OUTDIV1 1 // -> 0 +#define KINETIS_CLKDIV1_OUTDIV2 2 // -> 1 +#define KINETIS_CLKDIV1_OUTDIV4 5 // -> 4 + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE +#define KINETIS_USB_USB0_IRQ_PRIORITY 5 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/teensy_35/rules.mk b/keyboards/handwired/onekey/teensy_35/rules.mk new file mode 100644 index 0000000000..8ebefd03f5 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_35/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = MK64FX512 + +# Bootloader selection +BOOTLOADER = halfkay + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h index 4e594e7d7e..d30d58ea1e 100644 --- a/keyboards/handwired/onekey/teensy_lc/config.h +++ b/keyboards/handwired/onekey/teensy_lc/config.h @@ -23,7 +23,6 @@ #define MATRIX_COL_PINS { D5 } #define MATRIX_ROW_PINS { B2 } -#define UNUSED_PINS // i2c_master defines #define I2C1_SCL_PIN B0 // A2 on pinout = B0 diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index c16cf77cd4..f88d2b7002 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/ortho5x14/config.h b/keyboards/handwired/ortho5x14/config.h index 0be408cbf4..e74a645870 100644 --- a/keyboards/handwired/ortho5x14/config.h +++ b/keyboards/handwired/ortho5x14/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B4, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/ortho5x14/keymaps/2u/keymap.c b/keyboards/handwired/ortho5x14/keymaps/2u/keymap.c index 70a96fac9d..d785825332 100644 --- a/keyboards/handwired/ortho5x14/keymaps/2u/keymap.c +++ b/keyboards/handwired/ortho5x14/keymaps/2u/keymap.c @@ -343,9 +343,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_PGUP_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, KC_HOME), [TD_PGDN_END] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, KC_END), - [TD_Q_LrALT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_Q, _ALT), - [TD_R_LrKey] = ACTION_TAP_DANCE_DUAL_ROLE(KC_R, _RAISE), - [TD_T_LrMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_T, _MOUSE), + [TD_Q_LrALT] = ACTION_TAP_DANCE_LAYER_MOVE(KC_Q, _ALT), + [TD_R_LrKey] = ACTION_TAP_DANCE_LAYER_MOVE(KC_R, _RAISE), + [TD_T_LrMS] = ACTION_TAP_DANCE_LAYER_MOVE(KC_T, _MOUSE), [TD_SHIFT_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,lshift_finished, lshift_reset), [TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPACE, KC_ENT), diff --git a/keyboards/handwired/ortho5x14/keymaps/split1/keymap.c b/keyboards/handwired/ortho5x14/keymaps/split1/keymap.c index b152503aaf..3734510f8c 100644 --- a/keyboards/handwired/ortho5x14/keymaps/split1/keymap.c +++ b/keyboards/handwired/ortho5x14/keymaps/split1/keymap.c @@ -279,9 +279,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_PGUP_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, KC_HOME), [TD_PGDN_END] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, KC_END), - [TD_Q_LrALT] = ACTION_TAP_DANCE_DUAL_ROLE(KC_Q, _ALT), - [TD_R_LrKey] = ACTION_TAP_DANCE_DUAL_ROLE(KC_R, _RAISE), - [TD_T_LrMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_T, _MOUSE), + [TD_Q_LrALT] = ACTION_TAP_DANCE_LAYER_MOVE(KC_Q, _ALT), + [TD_R_LrKey] = ACTION_TAP_DANCE_LAYER_MOVE(KC_R, _RAISE), + [TD_T_LrMS] = ACTION_TAP_DANCE_LAYER_MOVE(KC_T, _MOUSE), [TD_SHIFT_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,lshift_finished, lshift_reset), [TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPACE, KC_ENT), diff --git a/keyboards/handwired/ortho_brass/config.h b/keyboards/handwired/ortho_brass/config.h index 694b93c4ee..8b546c04c0 100644 --- a/keyboards/handwired/ortho_brass/config.h +++ b/keyboards/handwired/ortho_brass/config.h @@ -27,8 +27,6 @@ { D3, D2, D1, D0 } #define MATRIX_COL_PINS \ { F4, F7, F5, F1, C7, F0, B1, B0, F6, B6, B2, B3 } -#define UNUSED_PINS \ - { B0, B1, B2, F0, F1, F4, D4, D5, E6 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/ortho_brass/keymaps/default/keymap.c b/keyboards/handwired/ortho_brass/keymaps/default/keymap.c index 948a7bd1bc..f32529b6a7 100644 --- a/keyboards/handwired/ortho_brass/keymaps/default/keymap.c +++ b/keyboards/handwired/ortho_brass/keymaps/default/keymap.c @@ -162,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ortho_4x12_1x2uC( _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h index 44e2a1b5da..abb5efc284 100644 --- a/keyboards/handwired/p65rgb/config.h +++ b/keyboards/handwired/p65rgb/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, D5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B0, B1, B2, B3, B7, D0, D1, D2, D3, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index 3667d46296..c846dd387a 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, F7, B1, B3 } #define MATRIX_COL_PINS { D4, C6, D7, E6, F5, F6, B6, B2, F4, B5} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/pill60/blackpill_f401/config.h b/keyboards/handwired/pill60/blackpill_f401/config.h index d56ba94ea4..7de8654319 100644 --- a/keyboards/handwired/pill60/blackpill_f401/config.h +++ b/keyboards/handwired/pill60/blackpill_f401/config.h @@ -20,5 +20,3 @@ { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } #define MATRIX_ROW_PINS \ { B4, B3, A15, B13, B5 } -#define UNUSED_PINS \ - { A9, A11, A12, C13, C14, C15, B10 } diff --git a/keyboards/handwired/pill60/blackpill_f411/config.h b/keyboards/handwired/pill60/blackpill_f411/config.h index b106c2d290..7de8654319 100644 --- a/keyboards/handwired/pill60/blackpill_f411/config.h +++ b/keyboards/handwired/pill60/blackpill_f411/config.h @@ -20,6 +20,3 @@ { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } #define MATRIX_ROW_PINS \ { B4, B3, A15, B13, B5 } -#define UNUSED_PINS \ - { A9, A11, A12, C13, C14, C15, B10 } - diff --git a/keyboards/handwired/pill60/bluepill/config.h b/keyboards/handwired/pill60/bluepill/config.h index f68f518b97..1ba5ff2069 100644 --- a/keyboards/handwired/pill60/bluepill/config.h +++ b/keyboards/handwired/pill60/bluepill/config.h @@ -20,5 +20,3 @@ { A8, B11, B10, B15, A10, A1, A2, A3, A4, A5, A6, A7, B0, B1 } #define MATRIX_ROW_PINS \ { B4, B3, A15, B13, B5 } -#define UNUSED_PINS \ - { A0, A9, A11, A12, C13, C14, C15 } diff --git a/keyboards/handwired/postageboard/mini/config.h b/keyboards/handwired/postageboard/mini/config.h index d4f654a7a4..13247e9b4d 100644 --- a/keyboards/handwired/postageboard/mini/config.h +++ b/keyboards/handwired/postageboard/mini/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5 } #define MATRIX_COL_PINS { E6, B3, B7 } -#define UNUSED_PINS { D0, D1, D2, D3, D4, D6, D7, B4, B5, B6, C6, C7, B2, B1, B0, F7, F6, F5, F4, F1, F0 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/postageboard/r1/config.h b/keyboards/handwired/postageboard/r1/config.h index 078e66dd75..d5058a2d12 100644 --- a/keyboards/handwired/postageboard/r1/config.h +++ b/keyboards/handwired/postageboard/r1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6 } #define MATRIX_COL_PINS { B7, C6, C7 } -#define UNUSED_PINS { D4, D6, D7, B4, B5, D5, D3, D2, D1, D0, B2, B3, F0, F1, F4, F5, F6, F7, E6, B0, B1 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index bb68ab28a1..88919b934e 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B1, E6, D5, D6, B4, D7, D4, F1, F0, B0 } #define MATRIX_COL_PINS { D0, B3, B2, D1, D2, D3, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c index 0e6802996d..b5b616d55b 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c @@ -87,7 +87,7 @@ void led_set_user(uint8_t usb_led) { //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - if (biton32(state) == 1) { + if (get_highest_layer(state) == 1) { writePinHigh(C6); } else { writePinLow(C6); diff --git a/keyboards/handwired/prime_exl_plus/config.h b/keyboards/handwired/prime_exl_plus/config.h index 6b02ea50f4..46b235f9ee 100644 --- a/keyboards/handwired/prime_exl_plus/config.h +++ b/keyboards/handwired/prime_exl_plus/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D2, D6, B4, F1, E6, F0, F4, B5, D7, D3 } #define MATRIX_COL_PINS { F5, F6, F7, C7, C6, B6, B7, B3, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index 875b3d7401..cdd71da3db 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -35,7 +35,6 @@ #define ENCODERS_PAD_A { F7 } #define ENCODERS_PAD_B { F6 } #define ENCODER_RESOLUTION 4 -#define UNUSED_PINS /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/promicro/config.h b/keyboards/handwired/prkl30/promicro/config.h index d9ccb00314..929ebe7682 100644 --- a/keyboards/handwired/prkl30/promicro/config.h +++ b/keyboards/handwired/prkl30/promicro/config.h @@ -35,7 +35,6 @@ #define ENCODERS_PAD_A { D3 } #define ENCODERS_PAD_B { D2 } #define ENCODER_RESOLUTION 4 -#define UNUSED_PINS /* RGB Light Configuration */ diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 73fffcc45f..a447a70abd 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F5, F6, F7, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define TRACKPOINT_PINS \ { B7, B6, D7 } -#define UNUSED_PINS /* * Keyboard Matrix Assignments diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 1903b2f9ba..77f83361e6 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -529,7 +529,7 @@ void led_reset(void) { } void led_set_default_layer_indicator(void) { - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); rgbsps_set(LED_IND_ALT, COLOR_BLANK); @@ -553,7 +553,7 @@ void led_set_layer_indicator(void) { rgbsps_set(LED_IND_GREEK, COLOR_BLANK); rgbsps_set(LED_IND_EMOJI, COLOR_BLANK); - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (oldlayer == layer) { return; } @@ -1014,7 +1014,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - layer = biton32(layer_state); + layer = get_highest_layer(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 0630fd43e3..1e5e8906ed 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -2,12 +2,6 @@ #define PRIYADI_PROMETHIUM -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE - #define RGBSPS_ENABLE #define RGBSPS_DEMO_ENABLE diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 94b505aa2c..faa096ce08 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -532,7 +532,7 @@ void led_reset(void) { } void led_set_default_layer_indicator(void) { - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); rgbsps_set(LED_IND_ALT, COLOR_BLANK); @@ -556,7 +556,7 @@ void led_set_layer_indicator(void) { rgbsps_set(LED_IND_GREEK, COLOR_BLANK); rgbsps_set(LED_IND_EMOJI, COLOR_BLANK); - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (oldlayer == layer) { return; } @@ -989,7 +989,7 @@ void process_doublespace(bool pressed, bool *isactive, bool *otheractive, bool * } #endif -uint32_t layer_state_set_kb(uint32_t state) +layer_state_t layer_state_set_kb(layer_state_t state) { // turn on punc layer if both fun & num are on if ((state & ((1UL<<_NUM) | (1UL<<_FUN))) == ((1UL<<_NUM) | (1UL<<_FUN))) { @@ -1017,7 +1017,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { lshift = keyboard_report->mods & MOD_BIT(KC_LSFT); rshift = keyboard_report->mods & MOD_BIT(KC_RSFT); - layer = biton32(layer_state); + layer = get_highest_layer(layer_state); #ifdef DOUBLESPACE_LAYER_ENABLE // double-space: send space immediately if any other key depressed before space is released diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h index 81141a3ebf..5d26b9f430 100644 --- a/keyboards/handwired/pteron/config.h +++ b/keyboards/handwired/pteron/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 } #define MATRIX_COL_PINS { F4, F6, F5, F7, B1, B3, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/pteron38/config.h b/keyboards/handwired/pteron38/config.h index 95eaa86e3b..a877d8dfa3 100644 --- a/keyboards/handwired/pteron38/config.h +++ b/keyboards/handwired/pteron38/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, B4, B5, B6 } #define MATRIX_COL_PINS { F6, F5, F7, B1, B3, C6, D4, D0, D1, D2 } -#define UNUSED_PINS { D7, F4, D3 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/pteron44/config.h b/keyboards/handwired/pteron44/config.h index d28e6c3b36..517d498eaa 100644 --- a/keyboards/handwired/pteron44/config.h +++ b/keyboards/handwired/pteron44/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, B4, B5, B6 } #define MATRIX_COL_PINS { F4, F6, F5, F7, B1, B3, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS { D7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index 22eea072d4..89e6fc9595 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // See note in retro_refit.h for an explanation of how this matrix is wired up #define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/riblee_f401/config.h b/keyboards/handwired/riblee_f401/config.h index 3437f3c7b9..ed0ff636f1 100644 --- a/keyboards/handwired/riblee_f401/config.h +++ b/keyboards/handwired/riblee_f401/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c index 6892c0fb49..bee4de5ede 100644 --- a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c +++ b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_5x12( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/handwired/riblee_f411/config.h b/keyboards/handwired/riblee_f411/config.h index 35d51754d2..6cf4b6370a 100644 --- a/keyboards/handwired/riblee_f411/config.h +++ b/keyboards/handwired/riblee_f411/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B14, A0, B8, B9 } -#define UNUSED_PINS { A1, A7, B2, B11, B12, B13 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/riblee_f411/keymaps/default/keymap.c b/keyboards/handwired/riblee_f411/keymaps/default/keymap.c index 2e9485d6b9..ff7e1117b8 100644 --- a/keyboards/handwired/riblee_f411/keymaps/default/keymap.c +++ b/keyboards/handwired/riblee_f411/keymaps/default/keymap.c @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_5x12( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/handwired/rs60/config.h b/keyboards/handwired/rs60/config.h index 60553af596..506b0bff0d 100644 --- a/keyboards/handwired/rs60/config.h +++ b/keyboards/handwired/rs60/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B6, B4, B2, E6 } #define MATRIX_COL_PINS { C6, D4, D0, D1, D2, D3, F4, F5, F6, F7, B1, B3} -#define UNUSED_PINS { } #define QMK_ESC_OUTPUT C6 #define QMK_ESC_INPUT B4 diff --git a/keyboards/handwired/rs60/keymaps/default/keymap.c b/keyboards/handwired/rs60/keymaps/default/keymap.c index 6b311a7ebb..6d5dc4a32a 100644 --- a/keyboards/handwired/rs60/keymaps/default/keymap.c +++ b/keyboards/handwired/rs60/keymaps/default/keymap.c @@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_5x12( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/handwired/selene/config.h b/keyboards/handwired/selene/config.h index be61d7da23..25603183a7 100644 --- a/keyboards/handwired/selene/config.h +++ b/keyboards/handwired/selene/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { B10, B9, B15, B14, B13, B8} #define MATRIX_COL_PINS { A9, A10, B11, B7, B6, B5, B4, B3, B2, B1, B0, C14, A4, A5, A6, A7, A8, A15, A13, A14, B12 } -#define UNUSED_PINS #define RGB_DI_PIN A3 #define RGBLED_NUM 50 diff --git a/keyboards/handwired/sick68/config.h b/keyboards/handwired/sick68/config.h index 846f50a87a..79ce50ba8b 100644 --- a/keyboards/handwired/sick68/config.h +++ b/keyboards/handwired/sick68/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D3, D2, D1, D0, D4 } #define MATRIX_COL_PINS \ { C6, D7, E6, B4, B5, B0, D5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/sick_pad/config.h b/keyboards/handwired/sick_pad/config.h index bc563be4f1..7f8df32c06 100644 --- a/keyboards/handwired/sick_pad/config.h +++ b/keyboards/handwired/sick_pad/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B9, B15, B14, B13 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/slash/config.h b/keyboards/handwired/slash/config.h index 325b3b5cfd..f3c92e6dd2 100644 --- a/keyboards/handwired/slash/config.h +++ b/keyboards/handwired/slash/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, D6, B7, B6, B5, D7, C6, D0 } #define MATRIX_COL_PINS { D2, F0, F1, F4, F5, F6, F7, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/snatchpad/config.h b/keyboards/handwired/snatchpad/config.h index dce9776dcd..188135b4d6 100644 --- a/keyboards/handwired/snatchpad/config.h +++ b/keyboards/handwired/snatchpad/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F4, F5, F6 } #define MATRIX_COL_PINS { B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index b4825cf1a2..0c8e86704e 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h @@ -15,7 +15,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h index 18a6690c25..98e21b43f1 100644 --- a/keyboards/handwired/steamvan/rev1/config.h +++ b/keyboards/handwired/steamvan/rev1/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A6, A5, A4, A3 } #define MATRIX_COL_PINS { A9, A8, B15, B14, B13, A10, B9, B6, B5, B4, B3, A15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/sticc14/config.h b/keyboards/handwired/sticc14/config.h index 962c9e0356..19ae8d1dbf 100644 --- a/keyboards/handwired/sticc14/config.h +++ b/keyboards/handwired/sticc14/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1 } #define MATRIX_COL_PINS { B6, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/symmetric70_proto/promicro/config.h b/keyboards/handwired/symmetric70_proto/promicro/config.h index 570de7039d..aa0725cab6 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/config.h +++ b/keyboards/handwired/symmetric70_proto/promicro/config.h @@ -48,7 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. +-----------------+ ***************************************/ -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/symmetric70_proto/proton_c/config.h b/keyboards/handwired/symmetric70_proto/proton_c/config.h index 92716a21f6..c0df9b2067 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/config.h +++ b/keyboards/handwired/symmetric70_proto/proton_c/config.h @@ -56,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. +-----------------+ ***************************************/ -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/symmetry60/config.h b/keyboards/handwired/symmetry60/config.h index 22cb401e8d..17ea91745b 100644 --- a/keyboards/handwired/symmetry60/config.h +++ b/keyboards/handwired/symmetry60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B6, B5, B4, D7, D6, D4, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/t111/config.h b/keyboards/handwired/t111/config.h index 6cd9616165..691bc7d121 100644 --- a/keyboards/handwired/t111/config.h +++ b/keyboards/handwired/t111/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { B15, B11, B10, B1, B0, A10, A9, A7, A6, A5, A4, A8, B13, B14 } /* 0 1 2 3 4 5 6 7 8 9 A B C D*/ -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index 4659804169..e59f7efbe1 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D4, D0} #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7, D1} /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index a2c843a79f..4dec0f1341 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, D7, D6 } #define MATRIX_COL_PINS { B0, D0, D5, B6, D4, C7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 8062aa711f..8d0631072f 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -193,7 +193,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, QK_BOOT, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 97bb0b905f..a4b468faef 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -43,7 +43,6 @@ #define MATRIX_COL_PINS { F1, F4, F5 } #define MATRIX_ROW_PINS { F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h index ab46bc5276..5bfb17ee31 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/config.h +++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h @@ -85,7 +85,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B0 +/* PMW33XX Settings */ +#define PMW33XX_CS_PIN B0 #define POINTING_DEVICE_RIGHT diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h index d8d36e824c..ab72957b5c 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h @@ -47,5 +47,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_B \ { C7 } -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B6 +/* PMW33XX Settings */ +#define PMW33XX_CS_PIN B6 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h index f9a44587b0..bf7f2c7605 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h @@ -25,9 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B0, B1, B2, B3, B4, B5 } #define MATRIX_ROW_PINS \ { B10, B11, B12, A14, A13, A15 } - -#define UNUSED_PINS \ - { A0, A2, A7, A8 } // B2 used for BOOT1, has internal pull down? // A9 has internal pull-down // A11 and A12 are used for USB sense. DO NOT USE. @@ -99,6 +96,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define DEBUG_EEPROM_OUTPUT /* pmw3360 config */ -#define PMW3360_CS_PIN B9 -#define PMW3360_SPI_MODE 3 -#define PMW3360_SPI_DIVISOR 8 +#define PMW33XX_CS_PIN B9 +#define PMW33XX_SPI_DIVISOR 8 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index 5f0350810c..b31f450553 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS \ { B12, B13, B14, B15, A8, A10 } -#define UNUSED_PINS \ - { C15 } - #define DIODE_DIRECTION COL2ROW // #define USB_VBUS_PIN B10 // doesn't seem to work for me on one of my controllers... */ @@ -102,7 +99,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64 /* pmw3360 config */ -#define PMW3360_CS_PIN B0 -#define PMW3360_SPI_MODE 3 -#define PMW3360_SPI_DIVISOR 64 -#define PMW3360_FIRMWARE_UPLOAD_FAST +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h index 442d474920..6eb3186332 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -51,5 +51,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_B \ { D4 } -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B0 +/* PMW33XX Settings */ +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c index 0ae49b6397..d3e2e02975 100644 --- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c @@ -159,10 +159,8 @@ void charybdis_set_pointer_dragscroll_enabled(bool enable) { maybe_update_pointing_device_cpi(&g_charybdis_config); } -void pointing_device_init_kb(void) { maybe_update_pointing_device_cpi(&g_charybdis_config); } - # ifndef CONSTRAIN_HID -# define CONSTRAIN_HID(value) ((value) < -127 ? -127 : ((value) > 127 ? 127 : (value))) +# define CONSTRAIN_HID(value) ((value) < XY_REPORT_MIN ? XY_REPORT_MIN : ((value) > XY_REPORT_MAX ? XY_REPORT_MAX : (value))) # endif // !CONSTRAIN_HID /** @@ -249,17 +247,17 @@ static bool has_shift_mod(void) { */ __attribute__((unused)) static void debug_charybdis_config_to_console(charybdis_config_t* config) { # ifdef CONSOLE_ENABLE - dprintf("(charybdis) process_record_kb: config = {\n" - "\traw = 0x%04X,\n" - "\t{\n" - "\t\tis_dragscroll_enabled=%b\n" - "\t\tis_sniping_enabled=%b\n" - "\t\tdefault_dpi=0x%02X (%ld)\n" - "\t\tsniping_dpi=0x%01X (%ld)\n" - "\t}\n" - "}\n", - config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)); -# endif // CONSOLE_ENABLE + IGNORE_FORMAT_WARNING(dprintf("(charybdis) process_record_kb: config = {\n" + "\traw = 0x%04X,\n" + "\t{\n" + "\t\tis_dragscroll_enabled=%b\n" + "\t\tis_sniping_enabled=%b\n" + "\t\tdefault_dpi=0x%02X (%ld)\n" + "\t\tsniping_dpi=0x%01X (%ld)\n" + "\t}\n" + "}\n", + config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config))); +# endif // CONSOLE_ENABLE } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -339,6 +337,7 @@ void charybdis_config_sync_handler(uint8_t initiator2target_buffer_size, const v } void keyboard_post_init_kb(void) { + maybe_update_pointing_device_cpi(&g_charybdis_config); transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, charybdis_config_sync_handler); keyboard_post_init_user(); diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h index ef68263c06..82de3bc0ba 100644 --- a/keyboards/handwired/traveller/config.h +++ b/keyboards/handwired/traveller/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D3, D2 } #define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 288acbe108..2cd57db35f 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -219,7 +219,7 @@ void LayerLEDSet(uint8_t layr) { uint8_t old_layer = _QW; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (old_layer != layer) { LayerLEDSet(layer); diff --git a/keyboards/handwired/tritium_numpad/config.h b/keyboards/handwired/tritium_numpad/config.h index 73c0201e03..7fee66e04f 100644 --- a/keyboards/handwired/tritium_numpad/config.h +++ b/keyboards/handwired/tritium_numpad/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F6, B1, B2 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN D5 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c index b618675295..50bbf232b5 100644 --- a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c +++ b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c @@ -9,7 +9,7 @@ void keyboard_pre_init_user(void) layer_state_t layer_state_set_user(layer_state_t state) { // Switch layer LED accordingly - switch (biton32(state)) { + switch (get_highest_layer(state)) { case 0: writePinHigh(B0); break; diff --git a/keyboards/handwired/twadlee/tp69/config.h b/keyboards/handwired/twadlee/tp69/config.h index 0af5afa517..dd69394916 100644 --- a/keyboards/handwired/twadlee/tp69/config.h +++ b/keyboards/handwired/twadlee/tp69/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B2, B1, B0, C0, D1, D0, D3, D4, D2, C3 } /* 20 21 18 0 1 3 4 5 */ #define MATRIX_COL_PINS { D5, D6, A4, B16, B17, A1, A2, D7 } -#define UNUSED_PINS /* for trackpoint: C1 (22) C2 (23) */ diff --git a/keyboards/handwired/unicomp_mini_m/config.h b/keyboards/handwired/unicomp_mini_m/config.h index 78b42577d8..77e2d1c7ea 100644 --- a/keyboards/handwired/unicomp_mini_m/config.h +++ b/keyboards/handwired/unicomp_mini_m/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1 } #define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, B7, D5, D4, D3, D2 } -#define UNUSED_PINS #define LED_PIN_ON_STATE 0 #define LED_NUM_LOCK_PIN B6 diff --git a/keyboards/handwired/uthol/rev1/config.h b/keyboards/handwired/uthol/rev1/config.h index dbda8e90ed..30c1e17e3e 100644 --- a/keyboards/handwired/uthol/rev1/config.h +++ b/keyboards/handwired/uthol/rev1/config.h @@ -26,4 +26,3 @@ /* Uthol PCB default pin-out */ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { D3, B6, B2, B3, B1, F7, F6, F5, F4, B5, B4, D2 } -#define UNUSED_PINS diff --git a/keyboards/handwired/uthol/rev2/config.h b/keyboards/handwired/uthol/rev2/config.h index 3ef6fc172c..2750282d30 100644 --- a/keyboards/handwired/uthol/rev2/config.h +++ b/keyboards/handwired/uthol/rev2/config.h @@ -26,7 +26,6 @@ /* Uthol PCB default pin-out */ #define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, B5, B4, B6, B2, B3 } -#define UNUSED_PINS //RGB Stuff #define RGB_DI_PIN E6 diff --git a/keyboards/handwired/uthol/rev3/config.h b/keyboards/handwired/uthol/rev3/config.h index 90880998b7..ded5aead8e 100644 --- a/keyboards/handwired/uthol/rev3/config.h +++ b/keyboards/handwired/uthol/rev3/config.h @@ -30,7 +30,6 @@ #define MATRIX_ROW_PINS \ { A4, A3, A2, A1, A0 } -#define UNUSED_PINS // Encoder config #define ENCODERS_PAD_A \ @@ -57,6 +56,7 @@ #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD // RGB Stuff #define RGB_DI_PIN B0 diff --git a/keyboards/handwired/videowriter/config.h b/keyboards/handwired/videowriter/config.h index ad54ca3c13..8bb4835e3d 100644 --- a/keyboards/handwired/videowriter/config.h +++ b/keyboards/handwired/videowriter/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, C6, D1, D0, D4, D2, D3, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/wabi/config.h b/keyboards/handwired/wabi/config.h index 63068c6bc0..f78413445a 100644 --- a/keyboards/handwired/wabi/config.h +++ b/keyboards/handwired/wabi/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { D5, F5, F6, F7, B0 } #define MATRIX_COL_PINS { F4, F1, F0, E6, B3, B7, D0, D1, D2, D3, D4, D6, D7, B5 } -#define UNUSED_PINS { B1, B2, C7, C6, B6, B4 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index 163f7db6ae..16290df805 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h index 5c1469b1f0..2502b4d196 100644 --- a/keyboards/handwired/xealous/config.h +++ b/keyboards/handwired/xealous/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate. #define FORCE_NKRO -#define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously... #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h index c9093342c4..37d424b01e 100644 --- a/keyboards/handwired/xealousbrown/config.h +++ b/keyboards/handwired/xealousbrown/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS { } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/z150/config.h b/keyboards/handwired/z150/config.h index 5f0a321db6..96bda8c8d8 100644 --- a/keyboards/handwired/z150/config.h +++ b/keyboards/handwired/z150/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B13, B14, B15, A8, A9, A3, A10, A1, A2, A15, A0 } #define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4 } -#define UNUSED_PINS #define NUM_LOCK_LED_PIN B5 #define SCROLL_LOCK_LED_PIN B4 diff --git a/keyboards/handwired/zergo/config.h b/keyboards/handwired/zergo/config.h index 9ede839248..8453b8efc9 100644 --- a/keyboards/handwired/zergo/config.h +++ b/keyboards/handwired/zergo/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B1, D7, C3, D6, D5, D4 } #define MATRIX_COL_PINS { C7, C6, C5, C4, C2, C1, B7, D3, D2, B6, B5, B4, B3, B2 } -#define UNUSED_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, C0, E0, E1, E4, E5, F0, F1, F2, F3, F4, F5, F6, F7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hardlineworks/otd_plus/config.h b/keyboards/hardlineworks/otd_plus/config.h index 77b340c893..95c5ee6ec6 100644 --- a/keyboards/hardlineworks/otd_plus/config.h +++ b/keyboards/hardlineworks/otd_plus/config.h @@ -8,7 +8,6 @@ #define MATRIX_ROW_PINS { D2, D4, D1, E6, F5, C6, B6, F6, F0, D0, D6, D3 } #define MATRIX_COL_PINS { B3, B2, B1, B7, B0, F1, D7, F7, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/helix/pico/keymaps/mtei/config.h b/keyboards/helix/pico/keymaps/mtei/config.h index 1a4dc2c842..a633105ff9 100644 --- a/keyboards/helix/pico/keymaps/mtei/config.h +++ b/keyboards/helix/pico/keymaps/mtei/config.h @@ -13,8 +13,6 @@ #undef TAPPING_TERM #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. - see tmk_core/common/action_tapping.c */ // If you need more program area, try select and reduce rgblight modes to use. diff --git a/keyboards/helix/pico/keymaps/mtei/keymap.c b/keyboards/helix/pico/keymaps/mtei/keymap.c index b703ca376d..f641829292 100644 --- a/keyboards/helix/pico/keymaps/mtei/keymap.c +++ b/keyboards/helix/pico/keymaps/mtei/keymap.c @@ -242,7 +242,7 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); static int current_default_layer; -uint32_t default_layer_state_set_kb(uint32_t state) { +layer_state_t default_layer_state_set_kb(layer_state_t state) { // 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0) // 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1) current_default_layer = state - 1; diff --git a/keyboards/helix/rev2/keymaps/default/oled_display.c b/keyboards/helix/rev2/keymaps/default/oled_display.c index ad5558869f..384356bd14 100644 --- a/keyboards/helix/rev2/keymaps/default/oled_display.c +++ b/keyboards/helix/rev2/keymaps/default/oled_display.c @@ -86,7 +86,7 @@ static void render_layer_status(void) { break; default: oled_write_P(PSTR("Undef-"), false); - snprintf(buf,sizeof(buf), "%ld", layer_state); + snprintf(buf,sizeof(buf), "%u", layer_state); oled_write(buf, false); } oled_write_P(PSTR("\n"), false); diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c index 5de00cb14c..80d0392ffb 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c @@ -5,9 +5,9 @@ // keymaps definitions are moved to keymap_Xrows.c. #ifdef RGBLIGHT_ENABLE -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case L_EDVORAKJP_LOWER: rgblight_sethsv_noeeprom_red(); break; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 207aebc423..14e3e5533b 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -19,7 +19,7 @@ void render_layer_state(void) { char layer_name[17]; oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case L_EDVORAKJP_BASE: oled_write_ln_P(PSTR("Default"), false); break; diff --git a/keyboards/helix/rev2/keymaps/five_rows/config.h b/keyboards/helix/rev2/keymaps/five_rows/config.h index 4aae9b5cac..43f14aaf2c 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/config.h +++ b/keyboards/helix/rev2/keymaps/five_rows/config.h @@ -6,8 +6,6 @@ #undef TAPPING_TERM #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. - see tmk_core/common/action_tapping.c */ #undef OLED_UPDATE_INTERVAL #ifdef DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index d992425de7..4d9dc16a9e 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -379,8 +379,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { int current_default_layer; -uint32_t default_layer_state_set_user(uint32_t state) { - current_default_layer = biton32(state); +layer_state_t default_layer_state_set_user(layer_state_t state) { + current_default_layer = get_highest_layer(state); return state; } diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h index 50d9aa3306..5050599075 100644 --- a/keyboards/helix/rev3_4rows/config.h +++ b/keyboards/helix/rev3_4rows/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h index 589ffda25b..489eeded06 100644 --- a/keyboards/helix/rev3_5rows/config.h +++ b/keyboards/helix/rev3_5rows/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h index ab679d14b9..a6fd32c613 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h @@ -6,8 +6,6 @@ #undef TAPPING_TERM #define TAPPING_TERM 300 #define PERMISSIVE_HOLD -/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. - see tmk_core/common/action_tapping.c */ #undef OLED_UPDATE_INTERVAL #ifdef DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c index d992425de7..4d9dc16a9e 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c @@ -379,8 +379,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { int current_default_layer; -uint32_t default_layer_state_set_user(uint32_t state) { - current_default_layer = biton32(state); +layer_state_t default_layer_state_set_user(layer_state_t state) { + current_default_layer = get_highest_layer(state); return state; } diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h index 4909bb5e8a..c264169d5b 100644 --- a/keyboards/hhkb_lite_2/config.h +++ b/keyboards/hhkb_lite_2/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F5, F4, F1, F0, B0, B1, B2, B3 } #define MATRIX_COL_PINS { F6, F7, B6, B5, B4, D7, D6, D4, D5, C7, C6, D3, D2, D1} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h index 45b72bd163..3475843da2 100644 --- a/keyboards/hifumi/config.h +++ b/keyboards/hifumi/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6 } #define MATRIX_COL_PINS { F4, F5, F6 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/hineybush/h08_ocelot/config.h b/keyboards/hineybush/h08_ocelot/config.h index 4b10abc1e3..2499e4ba50 100644 --- a/keyboards/hineybush/h08_ocelot/config.h +++ b/keyboards/hineybush/h08_ocelot/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B6 } #define MATRIX_COL_PINS { F4, C7, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h10/config.h b/keyboards/hineybush/h10/config.h index 7c878f4f3d..2f8fb70069 100644 --- a/keyboards/hineybush/h10/config.h +++ b/keyboards/hineybush/h10/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, C6, B6, B5, B4, D7 } #define MATRIX_COL_PINS { F0, C7, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h60/config.h b/keyboards/hineybush/h60/config.h index 3a2109067c..f2205d1121 100644 --- a/keyboards/hineybush/h60/config.h +++ b/keyboards/hineybush/h60/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B6, B5, B4, D7, E6 } #define MATRIX_COL_PINS { B3, D0, D1, D2, D3, D5, D6, C7, F0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h65/config.h b/keyboards/hineybush/h65/config.h index e205822ee3..f4f3900afe 100644 --- a/keyboards/hineybush/h65/config.h +++ b/keyboards/hineybush/h65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, D6, D4, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, B0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h65_hotswap/config.h b/keyboards/hineybush/h65_hotswap/config.h index e205822ee3..f4f3900afe 100644 --- a/keyboards/hineybush/h65_hotswap/config.h +++ b/keyboards/hineybush/h65_hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, D6, D4, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, B0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h660s/config.h b/keyboards/hineybush/h660s/config.h index 64548b60e4..582c1b0958 100644 --- a/keyboards/hineybush/h660s/config.h +++ b/keyboards/hineybush/h660s/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, E6, B3, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h index ab5cae00d9..f1428d0b19 100644 --- a/keyboards/hineybush/h75_singa/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, D0, D1, D2, D6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, B2, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h87a/config.h b/keyboards/hineybush/h87a/config.h index 8059e54cb9..1200dbd9fb 100644 --- a/keyboards/hineybush/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, D0, D1, B5, B6, D7, B4, D6, D4 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c index d59438f6b3..d505d5171d 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c @@ -245,7 +245,7 @@ void matrix_scan_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _BL: custom_backlight_level(0); rgblight_sethsv_noeeprom(180,100,255); diff --git a/keyboards/hineybush/h88/config.h b/keyboards/hineybush/h88/config.h index c86c41fcf6..79481fbb0a 100644 --- a/keyboards/hineybush/h88/config.h +++ b/keyboards/hineybush/h88/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, D0, D1, B5, B6, D7, B4, D6, D4 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h index b5ca670a7f..a92ddc1aa8 100644 --- a/keyboards/hineybush/hbcp/config.h +++ b/keyboards/hineybush/hbcp/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B6, D0, C7, C6, C5 } #define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } -#define UNUSED_PINS //EITHERWAY is supported through a custom matrix //#define DIODE_DIRECTION EITHERWAY diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index b5bf45e31f..4014bc804f 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B2, B3, D0, B1, D2, D1, D5, D3, D6, D4, B4, D7 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, B7, B0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index c423e0328b..6557696f89 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, C7, C6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B2, B1, B0, B5, B4, D7, D6, D4 } -#define UNUSED_PINS { B6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h index daec667868..62de4db381 100644 --- a/keyboards/hineybush/sm68/config.h +++ b/keyboards/hineybush/sm68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B1, B0, D4, D1 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hnahkb/freyr/config.h b/keyboards/hnahkb/freyr/config.h index ed4d97c0bb..57abe3e37e 100644 --- a/keyboards/hnahkb/freyr/config.h +++ b/keyboards/hnahkb/freyr/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } #define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hnahkb/stella/config.h b/keyboards/hnahkb/stella/config.h index b213467ac7..043c9933da 100644 --- a/keyboards/hnahkb/stella/config.h +++ b/keyboards/hnahkb/stella/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } #define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hnahkb/vn66/config.h b/keyboards/hnahkb/vn66/config.h index 52c03503ae..92fd3d456c 100644 --- a/keyboards/hnahkb/vn66/config.h +++ b/keyboards/hnahkb/vn66/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B2, B3, D2, F7 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/horizon/config.h b/keyboards/horizon/config.h index 5ab65f31dc..65af08d288 100644 --- a/keyboards/horizon/config.h +++ b/keyboards/horizon/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D2, D1, F4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6, D4, D0 } -#define UNUSED_PINS { } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/horrortroll/chinese_pcb/black_e65/config.h b/keyboards/horrortroll/chinese_pcb/black_e65/config.h index f544206b81..bcd38d62c7 100644 --- a/keyboards/horrortroll/chinese_pcb/black_e65/config.h +++ b/keyboards/horrortroll/chinese_pcb/black_e65/config.h @@ -38,9 +38,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - /* LED Indicator */ #define LED_CAPS_LOCK_PIN C7 diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h index 82465cf99c..8a227f3c49 100644 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h @@ -38,9 +38,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - #ifdef RGB_MATRIX_ENABLE #define DRIVER_LED_TOTAL 86 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h index 09e89b13c4..d3c385f64e 100644 --- a/keyboards/horrortroll/handwired_k552/config.h +++ b/keyboards/horrortroll/handwired_k552/config.h @@ -39,9 +39,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - /* EEPROM size */ #define EEPROM_PAGE_SIZE #define FEE_PAGE_SIZE 0x800 diff --git a/keyboards/horrortroll/lemon40/config.h b/keyboards/horrortroll/lemon40/config.h index 600ef01657..c3e1972ae3 100644 --- a/keyboards/horrortroll/lemon40/config.h +++ b/keyboards/horrortroll/lemon40/config.h @@ -38,9 +38,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Larger keys per scan */ -#define QMK_KEYS_PER_SCAN 12 - /* RGB light config */ #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/horrortroll/paws60/config.h b/keyboards/horrortroll/paws60/config.h index 7bd3ac8be3..055a6ae319 100644 --- a/keyboards/horrortroll/paws60/config.h +++ b/keyboards/horrortroll/paws60/config.h @@ -37,6 +37,3 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO - -/* Larger keys per scan */ -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c index fe07e6f91d..eb4692a4c2 100644 --- a/keyboards/hotdox/keymaps/default/keymap.c +++ b/keyboards/hotdox/keymaps/default/keymap.c @@ -163,7 +163,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_right_led_1_off(); ergodox_right_led_2_off(); diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c index 3516f20303..d4b8f491fd 100644 --- a/keyboards/hotdox/keymaps/eozaki/keymap.c +++ b/keyboards/hotdox/keymaps/eozaki/keymap.c @@ -170,7 +170,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/hotdox/keymaps/kloki/keymap.c b/keyboards/hotdox/keymaps/kloki/keymap.c index f858effd54..2550b68978 100644 --- a/keyboards/hotdox/keymaps/kloki/keymap.c +++ b/keyboards/hotdox/keymaps/kloki/keymap.c @@ -189,7 +189,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 3e47dbef77..adc6f94f1f 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 } #define MATRIX_COL_PINS { F1, F4, F5, E6, F0, B7, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS { B6, C6, C7, F6 } /* bootloader configuration */ diff --git a/keyboards/ianklug/grooveboard/config.h b/keyboards/ianklug/grooveboard/config.h index 007a86529c..1a42b95b41 100644 --- a/keyboards/ianklug/grooveboard/config.h +++ b/keyboards/ianklug/grooveboard/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { F7, F6, D1, D2 } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW @@ -142,5 +141,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h index df30e84aca..4e027625fd 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h @@ -50,7 +50,6 @@ #define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, C4, B0, B10, B13, C6, C7, C8, C9 } #define MATRIX_ROW_PINS { A7, C5, B1, B12, B14, B15, A8, A9 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ibnuda/alicia_cook/config.h b/keyboards/ibnuda/alicia_cook/config.h index 04f368dce6..8e8c46b694 100644 --- a/keyboards/ibnuda/alicia_cook/config.h +++ b/keyboards/ibnuda/alicia_cook/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, F4, F5 } #define MATRIX_COL_PINS { B5, F6, F7, B1, B3, B2, B4, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ibnuda/gurindam/config.h b/keyboards/ibnuda/gurindam/config.h index da86f8557e..ec281a7c56 100644 --- a/keyboards/ibnuda/gurindam/config.h +++ b/keyboards/ibnuda/gurindam/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2} #define MATRIX_COL_PINS { F6, F5, F4, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/idb/idb_60/config.h b/keyboards/idb/idb_60/config.h index eaaaf45d7d..24960dcbd5 100644 --- a/keyboards/idb/idb_60/config.h +++ b/keyboards/idb/idb_60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, D0, D1, D2, D3, D4, D5, D6, B0, B1 } #define MATRIX_COL_PINS { B2, B3, B4, C6, B6, B7, C7, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/idobao/id67/config.h b/keyboards/idobao/id67/config.h index 64b0001cfb..59e34654b5 100644 --- a/keyboards/idobao/id67/config.h +++ b/keyboards/idobao/id67/config.h @@ -1,42 +1,12 @@ -/* Copyright 2021 Tybera - * Copyright 2021 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Tybera (@tybera) +// Copyright 2021 Werther (@thewerther) +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "config_common.h" -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 } -#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, B7, D5, D1, D2, D3, D4, D0, D6, D7, B4 } - -#define DIODE_DIRECTION COL2ROW #define RGB_DI_PIN F0 // RGB Matrix config @@ -44,60 +14,73 @@ #ifndef ID67_DISABLE_UNDERGLOW #define DRIVER_LED_TOTAL 77 #else - #define DRIVER_LED_TOTAL 67 + #define DRIVER_LED_TOTAL (77 - 10) #endif #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_KEYPRESSES - #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue - #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes - #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes - #define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation - #define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right - #define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right - #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation - #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness - #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation - #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness - #define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient - #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right - #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom - #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in - #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in - #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right - #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard - #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard - #define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard - #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard - #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard - #define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue - #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back - #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left - #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right + #define ENABLE_RGB_MATRIX_SOLID_COLOR // Static single color + #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation + #define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness + #define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard + #define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard + #define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation + #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back + #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left + #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right - // don't need `#if`, animation modes themselves check defines - // #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + /* RGB_MATRIX_FRAMEBUFFER_EFFECTS -- don't enable */ // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN - // #endif // #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - // don't need `#if`, animation modes themselves check defines - // #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) - #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE// Pulses keys hit to hue & value then fades value out - #define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue + /* RGB_MATRIX_KEYPRESSES || RGB_MATRIX_KEYRELEASES */ + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out - #define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out - #define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out - #define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out - #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out - // #endif // #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) -#endif // #if defined(RGB_MATRIX_ENABLE) + #define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#endif // RGB_MATRIX_ENABLE + +/* ----------------------- + * Feature disable options + * These options are also useful to firmware size reduction. + * ----------------------- */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +// #define NO_ACTION_LAYER +// #define NO_ACTION_TAPPING +// #define NO_ACTION_ONESHOT diff --git a/keyboards/idobao/id67/id67.c b/keyboards/idobao/id67/id67.c index 155cc74087..17bcd9a943 100644 --- a/keyboards/idobao/id67/id67.c +++ b/keyboards/idobao/id67/id67.c @@ -1,19 +1,7 @@ -/* Copyright 2021 Tybera - * Copyright 2021 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Tybera (@tybera) +// Copyright 2021 Werther (@thewerther) +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #include "id67.h" @@ -25,6 +13,23 @@ * These "LED Index to *" arrays are in that reversed order! * i.e., Space row on top, listed right to left */ led_config_t g_led_config = { { + /* Under- / Per-Key + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │66 │65 │64 │63 │62 │61 │60 │59 │58 │57 │56 │55 │54 │ 53 │52 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ 51 │50 │49 │48 │47 │46 │45 │44 │43 │42 │41 │40 │39 │ 38 │37 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ 36 │35 │34 │33 │32 │31 │30 │29 │28 │27 │26 │25 │ 24 │23 │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ 22 │21 │20 │19 │18 │17 │16 │15 │14 │13 │12 │ 11 │10 │ 9 │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ │ 2 │ 1 │ 0 │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + * + * Bottom Side (as seen from top orientation) + * 67 68 69 70 71 + * 76 75 74 73 72 + */ // Key Matrix to LED Index {66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52}, {51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37}, @@ -34,63 +39,30 @@ led_config_t g_led_config = { { }, { // LED Index to Physical Position // based on: https://gist.github.com/vinorodrigues/07fd735683856b2a06c7c52b9b3878cb - {224, 64}, {209, 64}, {194, 64}, {170, 64}, {151, 64}, {95, 64}, {39, 64}, {21, 64}, {2, 64}, - {224, 48}, {209, 48}, {189, 48}, {168, 48}, {153, 48}, {138, 48}, {123, 48}, {108, 48}, {93, 48}, {78, 48}, {63, 48}, {49, 48}, {34, 48}, {9, 48}, - {224, 32}, {200, 32}, {175, 32}, {161, 32}, {146, 32}, {131, 32}, {116, 32}, {101, 32}, {86, 32}, {71, 32}, {56, 32}, {41, 32}, {26, 32}, {6, 32}, - {224, 16}, {205, 16}, {187, 16}, {172, 16}, {157, 16}, {142, 16}, {127, 16}, {112, 16}, {97, 16}, {82, 16}, {67, 16}, {52, 16}, {37, 16}, {22, 16}, {4, 16}, - {224, 0}, {202, 0}, {179, 0}, {164, 0}, {149, 0}, {134, 0}, {119, 0}, {105, 0}, {90, 0}, {75, 0}, {60, 0}, {45, 0}, {30, 0}, {15, 0}, {0, 0} - #ifndef ID67_DISABLE_UNDERGLOW + // **NB: In reverse order** + {224,64 }, {209,64 }, {194,64 }, {170,64 }, {151,64 }, { 95,64 }, { 39,64 }, { 21,64 }, { 2,64 }, + {224,48 }, {209,48 }, {189,48 }, {168,48 }, {153,48 }, {138,48 }, {123,48 }, {108,48 }, { 93,48 }, { 78,48 }, { 63,48 }, { 49,48 }, { 34,48 }, { 9,48 }, + {224,32 }, {200,32 }, {175,32 }, {161,32 }, {146,32 }, {131,32 }, {116,32 }, {101,32 }, { 86,32 }, { 71,32 }, { 56,32 }, { 41,32 }, { 26,32 }, { 6,32 }, + {224,16 }, {205,16 }, {187,16 }, {172,16 }, {157,16 }, {142,16 }, {127,16 }, {112,16 }, { 97,16 }, { 82,16 }, { 67,16 }, { 52,16 }, { 37,16 }, { 22,16 }, { 4,16 }, + {224,0 }, {202,0 }, {179,0 }, {164,0 }, {149,0 }, {134,0 }, {119,0 }, {105,0 }, { 90,0 }, { 75,0 }, { 60,0 }, { 45,0 }, { 30,0 }, { 15,0 }, { 0,0 } // underglow LEDs + #ifndef ID67_DISABLE_UNDERGLOW , {0, 0}, {56, 0}, {112, 0}, {168, 0}, {224, 0}, {224, 64}, {168, 64}, {112, 64}, {56, 64}, {0, 64} #endif }, { // LED Index to Flag - 4, 4, 4, 1, 1, 4, 1, 1, 1, // first row - 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // second row + // **NB: In reverse order** + 1, 1, 1, 1, 1, 4, 1, 1, 1, // fifth/bottom row + 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // fourth row 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, // third row - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // fourth row - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 // fifth row + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // second row + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 // first/top row // underglow LEDs #ifndef ID67_DISABLE_UNDERGLOW - , 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 + , 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2 #endif } }; -#endif // #ifdef RGB_MATRIX_ENABLE - - -/* Use `#define ID67_CAPS_LOCK_KEY_INDEX 36` in `keymaps/yourkeymap/config.h` - * if you want to enable Caps-Lock LED mode */ -#if defined(RGB_MATRIX_ENABLE) && defined(ID67_CAPS_LOCK_KEY_INDEX) - -#define ID67_CAPS_LOCK_MAX_BRIGHTNESS 0xFF -#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS - #undef ID67_CAPS_LOCK_MAX_BRIGHTNESS - #define ID67_CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS -#endif - -#define ID67_CAPS_LOCK_VAL_STEP 8 -#ifdef RGB_MATRIX_VAL_STEP - #undef ID67_CAPS_LOCK_VAL_STEP - #define ID67_CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP -#endif - -/* This function is defined as weak, so if you create your own in keymap then - * that will compile, not this */ -__attribute__((weak)) -void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - uint8_t b = rgb_matrix_get_val(); - if (b < ID67_CAPS_LOCK_VAL_STEP) { - b = ID67_CAPS_LOCK_VAL_STEP; - } else if (b < (ID67_CAPS_LOCK_MAX_BRIGHTNESS - ID67_CAPS_LOCK_VAL_STEP)) { - b += ID67_CAPS_LOCK_VAL_STEP; // one step more than current brightness - } else { - b = ID67_CAPS_LOCK_MAX_BRIGHTNESS; - } - rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, b, b, b); // white, with the adjusted brightness - } -} - -#endif // #ifdef ID67_CAPS_LOCK_KEY_INDEX +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id67/id67.h b/keyboards/idobao/id67/id67.h index a8eead92a0..cd5ab8de09 100644 --- a/keyboards/idobao/id67/id67.h +++ b/keyboards/idobao/id67/id67.h @@ -1,36 +1,8 @@ -/* Copyright 2021 Tybera - * Copyright 2021 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Tybera (@tybera) +// Copyright 2021 Werther (@thewerther) +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" - -#define ___ KC_NO - -#define LAYOUT_65_ansi_blocker( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E }, \ - { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, ___, K43, ___, ___, K46, ___, ___, ___, K4A, K4B, K4C, K4D, K4E }, \ -} diff --git a/keyboards/idobao/id67/info.json b/keyboards/idobao/id67/info.json index f626bd88e5..5d70e19cd8 100644 --- a/keyboards/idobao/id67/info.json +++ b/keyboards/idobao/id67/info.json @@ -1,90 +1,105 @@ { - "keyboard_name": "ID67", "manufacturer": "IDOBAO", - "url": "https://idobao.net", + "keyboard_name": "ID67", "maintainer": "thewerther", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "debounce": 5, + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "command": false, + "console": false, + "nkro": true, + "backlight": false, + "rgblight": false + }, + "matrix_pins": { + "cols": ["C7", "F6", "F5", "F4", "F1", "B7", "D5", "D1", "D2", "D3", "D4", "D0", "D6", "D7", "B4"], + "rows": ["B0", "B1", "B2", "B3", "F7"] + }, + "processor": "atmega32u4", + "url": "https://idobao.net/search?type=product&q=ID67*", "usb": { "vid": "0x6964", - "pid": "0x0067", - "device_version": "0.0.2" - }, - "layout_aliases": { - "LAYOUT": "LAYOUT_65_ansi_blocker" + "pid": "0x0267", + "device_version": "2.0.0" }, "layouts": { "LAYOUT_65_ansi_blocker": { "layout": [ - {"label":"K00 (B0,C7)", "x":0, "y":0}, - {"label":"K01 (B0,F6)", "x":1, "y":0}, - {"label":"K02 (B0,F5)", "x":2, "y":0}, - {"label":"K03 (B0,F4)", "x":3, "y":0}, - {"label":"K04 (B0,F1)", "x":4, "y":0}, - {"label":"K05 (B0,B7)", "x":5, "y":0}, - {"label":"K06 (B0,D5)", "x":6, "y":0}, - {"label":"K07 (B0,D1)", "x":7, "y":0}, - {"label":"K08 (B0,D2)", "x":8, "y":0}, - {"label":"K09 (B0,D3)", "x":9, "y":0}, - {"label":"K0A (B0,D4)", "x":10, "y":0}, - {"label":"K0B (B0,D0)", "x":11, "y":0}, - {"label":"K0C (B0,D6)", "x":12, "y":0}, - {"label":"K0D (B0,D7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,B4)", "x":15, "y":0}, + { "matrix": [0, 0], "x":0, "y":0 }, + { "matrix": [0, 1], "x":1, "y":0 }, + { "matrix": [0, 2], "x":2, "y":0 }, + { "matrix": [0, 3], "x":3, "y":0 }, + { "matrix": [0, 4], "x":4, "y":0 }, + { "matrix": [0, 5], "x":5, "y":0 }, + { "matrix": [0, 6], "x":6, "y":0 }, + { "matrix": [0, 7], "x":7, "y":0 }, + { "matrix": [0, 8], "x":8, "y":0 }, + { "matrix": [0, 9], "x":9, "y":0 }, + { "matrix": [0, 10], "x":10, "y":0 }, + { "matrix": [0, 11], "x":11, "y":0 }, + { "matrix": [0, 12], "x":12, "y":0 }, + { "matrix": [0, 13], "x":13, "y":0, "w":2 }, + { "matrix": [0, 14], "x":15, "y":0 }, - {"label":"K10 (B1,C7)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,F6)", "x":1.5, "y":1}, - {"label":"K12 (B1,F5)", "x":2.5, "y":1}, - {"label":"K13 (B1,F4)", "x":3.5, "y":1}, - {"label":"K14 (B1,F1)", "x":4.5, "y":1}, - {"label":"K15 (B1,B7)", "x":5.5, "y":1}, - {"label":"K16 (B1,D5)", "x":6.5, "y":1}, - {"label":"K17 (B1,D1)", "x":7.5, "y":1}, - {"label":"K18 (B1,D2)", "x":8.5, "y":1}, - {"label":"K19 (B1,D3)", "x":9.5, "y":1}, - {"label":"K1A (B1,D4)", "x":10.5, "y":1}, - {"label":"K1B (B1,D0)", "x":11.5, "y":1}, - {"label":"K1C (B1,D6)", "x":12.5, "y":1}, - {"label":"K1D (B1,D7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (B1,B4)", "x":15, "y":1}, + { "matrix": [1, 0], "x":0, "y":1, "w":1.5 }, + { "matrix": [1, 1], "x":1.5, "y":1 }, + { "matrix": [1, 2], "x":2.5, "y":1 }, + { "matrix": [1, 3], "x":3.5, "y":1 }, + { "matrix": [1, 4], "x":4.5, "y":1 }, + { "matrix": [1, 5], "x":5.5, "y":1 }, + { "matrix": [1, 6], "x":6.5, "y":1 }, + { "matrix": [1, 7], "x":7.5, "y":1 }, + { "matrix": [1, 8], "x":8.5, "y":1 }, + { "matrix": [1, 9], "x":9.5, "y":1 }, + { "matrix": [1, 10], "x":10.5, "y":1 }, + { "matrix": [1, 11], "x":11.5, "y":1 }, + { "matrix": [1, 12], "x":12.5, "y":1 }, + { "matrix": [1, 13], "x":13.5, "y":1, "w":1.5 }, + { "matrix": [1, 14], "x":15, "y":1 }, - {"label":"K20 (B2,C7)", "x":0, "y":2, "w":1.75}, - {"label":"K21 (B2,F6)", "x":1.75, "y":2}, - {"label":"K22 (B2,F5)", "x":2.75, "y":2}, - {"label":"K23 (B2,F4)", "x":3.75, "y":2}, - {"label":"K24 (B2,F1)", "x":4.75, "y":2}, - {"label":"K25 (B2,B7)", "x":5.75, "y":2}, - {"label":"K26 (B2,D5)", "x":6.75, "y":2}, - {"label":"K27 (B2,D1)", "x":7.75, "y":2}, - {"label":"K28 (B2,D2)", "x":8.75, "y":2}, - {"label":"K29 (B2,D3)", "x":9.75, "y":2}, - {"label":"K2A (B2,D4)", "x":10.75, "y":2}, - {"label":"K2B (B2,D0)", "x":11.75, "y":2}, - {"label":"K2D (B2,D7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K2E (B2,B4)", "x":15, "y":2}, + { "matrix": [2, 0], "x":0, "y":2, "w":1.75 }, + { "matrix": [2, 1], "x":1.75, "y":2 }, + { "matrix": [2, 2], "x":2.75, "y":2 }, + { "matrix": [2, 3], "x":3.75, "y":2 }, + { "matrix": [2, 4], "x":4.75, "y":2 }, + { "matrix": [2, 5], "x":5.75, "y":2 }, + { "matrix": [2, 6], "x":6.75, "y":2 }, + { "matrix": [2, 7], "x":7.75, "y":2 }, + { "matrix": [2, 8], "x":8.75, "y":2 }, + { "matrix": [2, 9], "x":9.75, "y":2 }, + { "matrix": [2, 10], "x":10.75, "y":2 }, + { "matrix": [2, 11], "x":11.75, "y":2 }, + { "matrix": [2, 13], "x":12.75, "y":2, "w":2.25 }, + { "matrix": [2, 14], "x":15, "y":2 }, - {"label":"K30 (B3,C7)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,F5)", "x":2.25, "y":3}, - {"label":"K33 (B3,F4)", "x":3.25, "y":3}, - {"label":"K34 (B3,F1)", "x":4.25, "y":3}, - {"label":"K35 (B3,B7)", "x":5.25, "y":3}, - {"label":"K36 (B3,D5)", "x":6.25, "y":3}, - {"label":"K37 (B3,D1)", "x":7.25, "y":3}, - {"label":"K38 (B3,D2)", "x":8.25, "y":3}, - {"label":"K39 (B3,D3)", "x":9.25, "y":3}, - {"label":"K3A (B3,D4)", "x":10.25, "y":3}, - {"label":"K3B (B3,D0)", "x":11.25, "y":3}, - {"label":"K3C (B3,D6)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,D7)", "x":14, "y":3}, - {"label":"K3E (B3,B4)", "x":15, "y":3}, + { "matrix": [3, 0], "x":0, "y":3, "w":2.25 }, + { "matrix": [3, 2], "x":2.25, "y":3 }, + { "matrix": [3, 3], "x":3.25, "y":3 }, + { "matrix": [3, 4], "x":4.25, "y":3 }, + { "matrix": [3, 5], "x":5.25, "y":3 }, + { "matrix": [3, 6], "x":6.25, "y":3 }, + { "matrix": [3, 7], "x":7.25, "y":3 }, + { "matrix": [3, 8], "x":8.25, "y":3 }, + { "matrix": [3, 9], "x":9.25, "y":3 }, + { "matrix": [3, 10], "x":10.25, "y":3 }, + { "matrix": [3, 11], "x":11.25, "y":3 }, + { "matrix": [3, 12], "x":12.25, "y":3, "w":1.75 }, + { "matrix": [3, 13], "x":14, "y":3 }, + { "matrix": [3, 14], "x":15, "y":3 }, - {"label":"K40 (F7,C7)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (F7,F6)", "x":1.25, "y":4, "w":1.25}, - {"label":"K43 (F7,F4)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (F7,D5)", "x":3.75, "y":4, "w":6.25}, - {"label":"K4A (F7,D4)", "x":10, "y":4, "w":1.25}, - {"label":"K4B (F7,D0)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4C (F7,D6)", "x":13, "y":4}, - {"label":"K4D (F7,D7)", "x":14, "y":4}, - {"label":"K4E (F7,B4)", "x":15, "y":4} + { "matrix": [4, 0], "x":0, "y":4, "w":1.25 }, + { "matrix": [4, 1], "x":1.25, "y":4, "w":1.25 }, + { "matrix": [4, 3], "x":2.5, "y":4, "w":1.25 }, + { "matrix": [4, 6], "x":3.75, "y":4, "w":6.25 }, + { "matrix": [4, 10], "x":10, "y":4, "w":1.25 }, + { "matrix": [4, 11], "x":11.25, "y":4, "w":1.25 }, + { "matrix": [4, 12], "x":13, "y":4 }, + { "matrix": [4, 13], "x":14, "y":4 }, + { "matrix": [4, 14], "x":15, "y":4 } ] } } diff --git a/keyboards/idobao/id67/keymaps/default/keymap.c b/keyboards/idobao/id67/keymaps/default/keymap.c index 54b39ad4a7..55e6fd88cd 100644 --- a/keyboards/idobao/id67/keymaps/default/keymap.c +++ b/keyboards/idobao/id67/keymaps/default/keymap.c @@ -1,23 +1,22 @@ -/* Copyright 2021 Tybera - * Copyright 2022 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Tybera (@tybera) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backspc│ ~ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PUp│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ │Fn1 │Ctrl│ │Lf │Dn │Rt │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [0] = LAYOUT_65_ansi_blocker( 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_TILD, 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, KC_DEL, @@ -25,12 +24,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │Tog│Up │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lf │Dn │Rt │ │ │ │ │ │Ins│Hom│PUp│ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │RST│Sp+│Sp-│ │Vl-│Mut│Vl+│Del│End│PDn│ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [1] = LAYOUT_65_ansi_blocker( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, - _______, QK_BOOT, RGB_SPI, RGB_SPD, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, + _______, QK_BOOT, RGB_SPI, RGB_SPD, _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - + ) }; diff --git a/keyboards/idobao/id67/keymaps/idobao/keymap.c b/keyboards/idobao/id67/keymaps/idobao/keymap.c new file mode 100644 index 0000000000..55ff6e5730 --- /dev/null +++ b/keyboards/idobao/id67/keymaps/idobao/keymap.c @@ -0,0 +1,341 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// Copyright 2022 IDOBAO (@idobaokb) +// SPDX-License-Identifier: GPL-2.0-or-later + +/* ------------------------------------------------------------------ + * This is the IDOBAO factory default keymap ;) + * ------------------------------------------------------------------ */ + +#include QMK_KEYBOARD_H +#include "version.h" + +#ifdef RGB_MATRIX_ENABLE + +typedef union { + uint32_t raw; + struct { + bool rgb_disable_perkey:1; + #ifndef ID67_DISABLE_UNDERGLOW + bool rgb_disable_underglow:1; + #endif // ID67_DISABLE_UNDERGLOW + }; +} user_config_t; + +#endif // RGB_MATRIX_ENABLE + +enum { + KC_MCON = USER00, // macOS Open Mission Control + KC_LPAD, // macOS Open Launchpad + #ifdef RGB_MATRIX_ENABLE + RGB_TPK, // Toggle Per-Key + #ifndef ID67_DISABLE_UNDERGLOW + RGB_TUG, // Toggle Underglow + #endif // ID67_DISABLE_UNDERGLOW + #endif //RGB_MATRIX_ENABLE + KB_VRSN = USER09 // debug, type version +}; + +#ifndef RGB_MATRIX_ENABLE + #define RGB_TPK _______ + #define RGB_TUG _______ +#else + #ifdef ID67_DISABLE_UNDERGLOW + #define RGB_TUG _______ + #endif // ID67_DISABLE_UNDERGLOW +#endif // RGB_MATRIX_ENABLE + +enum macos_consumer_usages { + _AC_SHOW_ALL_WINDOWS = 0x29F, // mapped to KC_MCON + _AC_SHOW_ALL_APPS = 0x2A0 // mapped to KC_LPAD +}; + +/* Special Keys */ +#define SK_LT1C LT(1, KC_CAPS) // Layer Tap 1, i.e., Tap = Caps Lock, Hold = Layer 1 +#define SK_LT2A LT(2, KC_APP) // Layer Tap 2, i.e., Tap = Menu, Hold = Layer 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backspc│ ~ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │*Caps*│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PUp│ *Caps* => `LT(1, KC_CAPS)` + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ │Fn1 │*Mn*│ │Lf │Dn │Rt │ *Mn* => `LT(2, KC_APP)` + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker( + 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_TILD, + 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, KC_DEL, + SK_LT1C, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), SK_LT2A, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │Tog│Up │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │TUG│TPK│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lf │Dn │Rt │ │ │ │ │ │Ins│Hom│PUp│ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │RST│Sp+│Sp-│ │Vl-│Mut│Vl+│Del│End│PDn│ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, RGB_TUG, RGB_TPK, _______, _______, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, + _______, QK_BOOT, RGB_SPI, RGB_SPD, KB_VRSN, KC_VOLD, KC_MUTE, KC_VOLU, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGB_MATRIX_ENABLE + +/* + * RGB Stuff + */ + +#define ID67_CAPS_LOCK_KEY_INDEX 36 // position of Caps Lock key + +#define ID67_CAPS_LOCK_MAX_BRIGHTNESS 0xFF +#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #undef ID67_CAPS_LOCK_MAX_BRIGHTNESS + #define ID67_CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#define ID67_CAPS_LOCK_VAL_STEP 8 +#ifdef RGB_MATRIX_VAL_STEP + #undef ID67_CAPS_LOCK_VAL_STEP + #define ID67_CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP +#endif + +user_config_t user_config; + +void id67_update_rgb_mode(void) { + uint8_t flags = LED_FLAG_ALL; + + if (user_config.rgb_disable_perkey + #ifndef ID67_DISABLE_UNDERGLOW + && user_config.rgb_disable_underglow + #endif // ID67_DISABLE_UNDERGLOW + ) { + flags = 0; // All OFF Condition + } else { + if (user_config.rgb_disable_perkey) { + #ifndef ID67_DISABLE_UNDERGLOW + flags = LED_FLAG_UNDERGLOW | 0xF0; + #else + flags = 0xF0; + #endif // ID67_DISABLE_UNDERGLOW + } + #ifndef ID67_DISABLE_UNDERGLOW + if (user_config.rgb_disable_underglow) { + flags = LED_FLAG_MODIFIER | LED_FLAG_KEYLIGHT | LED_FLAG_INDICATOR | 0xF0; + } + #endif // ID67_DISABLE_UNDERGLOW + } + + if (flags == 0) { + rgb_matrix_set_flags(0); + rgb_matrix_set_color_all(HSV_OFF); + } else { + rgb_matrix_set_flags(flags); + rgb_matrix_enable_noeeprom(); + } + + eeconfig_update_kb(user_config.raw); // write back to EEPROM +} + +void id67_get_rgb_mode(void) { + user_config.raw = eeconfig_read_kb(); // read config from EEPROM + id67_update_rgb_mode(); +} + +void keyboard_post_init_user(void) { + id67_get_rgb_mode(); +} + +void eeconfig_init_user(void) { + // EEPROM is getting reset! + user_config.raw = 0; + id67_update_rgb_mode(); +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // Caps Lock key stuff + + if (host_keyboard_led_state().caps_lock) { + uint8_t v = rgb_matrix_get_val(); + if (v < ID67_CAPS_LOCK_VAL_STEP) { + v = ID67_CAPS_LOCK_VAL_STEP; + } else if (v < (ID67_CAPS_LOCK_MAX_BRIGHTNESS - ID67_CAPS_LOCK_VAL_STEP)) { + if (!user_config.rgb_disable_perkey) { + v += ID67_CAPS_LOCK_VAL_STEP; // inc. by one more step than current brightness + } // else leave as current brightness + } else { + v = ID67_CAPS_LOCK_MAX_BRIGHTNESS; + } + rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, v, v, v); // white, brightness adjusted + } else if (user_config.rgb_disable_perkey) { + rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off + } +} + +#endif // RGB_MATRIX_ENABLE + +/* + * Extra keys and RGB Toggle handler + */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + // handle RGB toggle key - this ensures caps lock always works + #ifdef RGB_MATRIX_ENABLE + + case QK_BOOT: + if (record->event.pressed) { + rgb_matrix_set_color_all(RGB_MATRIX_MAXIMUM_BRIGHTNESS, 0, 0); // All red + rgb_matrix_driver.flush(); + } + return true; + + case RGB_TOG: + /* roll through the LED modes + * | Level | Per-key | Underglow | + * |-------------|---------|-----------| + * | 0 (default) | on | on | + * | 1 | OFF | on | + * | 2 | on | OFF | + * | 3 | OFF | OFF | + * + * for ID67_DISABLE_UNDERGLOW + * | Level | Per-key | + * |-------------|---------| + * | 0 (default) | on | + * | 1 | OFF | + */ + if (record->event.pressed) { + if ((!user_config.rgb_disable_perkey) + #ifndef ID67_DISABLE_UNDERGLOW + && (!user_config.rgb_disable_underglow) + #endif // ID67_DISABLE_UNDERGLOW + ) { + user_config.rgb_disable_perkey = 1; + + #ifndef ID67_DISABLE_UNDERGLOW + + } else if (user_config.rgb_disable_perkey && (!user_config.rgb_disable_underglow)) { + user_config.rgb_disable_perkey = 0; + user_config.rgb_disable_underglow = 1; + + } else if ((!user_config.rgb_disable_perkey) && user_config.rgb_disable_underglow) { + user_config.rgb_disable_perkey = 1; + + #endif // ID67_DISABLE_UNDERGLOW + + } else { + user_config.rgb_disable_perkey = 0; + #ifndef ID67_DISABLE_UNDERGLOW + user_config.rgb_disable_underglow = 0; + #endif // ID67_DISABLE_UNDERGLOW + } + + id67_update_rgb_mode(); + } + return false; + + case RGB_TPK: + if (record->event.pressed) { + user_config.rgb_disable_perkey ^= 1; + id67_update_rgb_mode(); + } + return false; + + #ifndef ID67_DISABLE_UNDERGLOW + + case RGB_TUG: + if (record->event.pressed) { + user_config.rgb_disable_underglow ^= 1; + id67_update_rgb_mode(); + } + return false; + + #endif // ID67_DISABLE_UNDERGLOW + + case EE_CLR: + if (!record->event.pressed) { // on release + id67_get_rgb_mode(); + } + return true; // let this one pass on + + #endif // RGB_MATRIX_ENABLE + + // print firmware version + case KB_VRSN: + if (!get_mods()) { + if (!record->event.pressed) { + SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " (v" QMK_VERSION ")"); + } + } + return false; + + // @see: https://github.com/qmk/qmk_firmware/issues/10111#issuecomment-752300353 + case KC_MCON: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_WINDOWS); + } else { + host_consumer_send(0); + } + return false; + + case KC_LPAD: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_APPS); + } else { + host_consumer_send(0); + } + return false; + + default: + return true; /* Process all other keycodes normally */ + } +} diff --git a/keyboards/idobao/id80/v3/keymaps/via/rules.mk b/keyboards/idobao/id67/keymaps/idobao/rules.mk index ca9fed0e6b..ca9fed0e6b 100644 --- a/keyboards/idobao/id80/v3/keymaps/via/rules.mk +++ b/keyboards/idobao/id67/keymaps/idobao/rules.mk diff --git a/keyboards/idobao/id67/keymaps/thewerther/config.h b/keyboards/idobao/id67/keymaps/thewerther/config.h index a63a92b171..4cd526feea 100644 --- a/keyboards/idobao/id67/keymaps/thewerther/config.h +++ b/keyboards/idobao/id67/keymaps/thewerther/config.h @@ -1,23 +1,11 @@ -/* Copyright 2021 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Werther (@thewerther) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #define DRIVER_LED_UNDERGLOW 10 #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD #if defined(RGB_MATRIX_ENABLE) #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS diff --git a/keyboards/idobao/id67/keymaps/thewerther/keymap.c b/keyboards/idobao/id67/keymaps/thewerther/keymap.c index 8af720755f..ef37b210f5 100644 --- a/keyboards/idobao/id67/keymaps/thewerther/keymap.c +++ b/keyboards/idobao/id67/keymaps/thewerther/keymap.c @@ -1,19 +1,5 @@ -/* Copyright 2021 Tybera - * Copyright 2021 thewerther - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Werther (@thewerther) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H @@ -36,14 +22,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, - _______, RESET, RGB_SPI, RGB_SPD, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, KC_END, + _______, QK_BOOT, RGB_SPI, RGB_SPD, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; void matrix_scan_user(void) { -# if defined(RGB_MATRIX_ENABLE) + #if defined(RGB_MATRIX_ENABLE) int current_effect = rgb_matrix_get_mode(); if (current_effect >= RGB_MATRIX_SOLID_REACTIVE_SIMPLE && current_effect <= RGB_MATRIX_SOLID_MULTISPLASH) { // set all underglow leds to current color @@ -52,6 +38,5 @@ void matrix_scan_user(void) { rgb_matrix_set_color(i, current_color.r, current_color.g, current_color.b); } } -# endif + #endif } - diff --git a/keyboards/idobao/id67/keymaps/via/keymap.c b/keyboards/idobao/id67/keymaps/via/keymap.c index ff0bfff745..0014fb3bbf 100644 --- a/keyboards/idobao/id67/keymaps/via/keymap.c +++ b/keyboards/idobao/id67/keymaps/via/keymap.c @@ -1,22 +1,22 @@ -/* Copyright 2021 Tybera - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ +// Copyright 2021 Tybera (@tybera) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backspc│ ~ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PUp│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ │Fn1 │Ctrl│ │Lf │Dn │Rt │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [0] = LAYOUT_65_ansi_blocker( 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_TILD, 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, KC_DEL, @@ -24,13 +24,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │Tog│Up │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lf │Dn │Rt │ │ │ │ │ │Ins│Hom│PUp│ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │RST│Sp+│Sp-│ │Vl-│Mut│Vl+│Del│End│PDn│ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [1] = LAYOUT_65_ansi_blocker( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, - _______, QK_BOOT, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, + _______, QK_BOOT, RGB_SPI, RGB_SPD, _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [2] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -38,11 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + [3] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; diff --git a/keyboards/idobao/id67/keymaps/vinorodrigues/config.h b/keyboards/idobao/id67/keymaps/vinorodrigues/config.h index 92b3ec0658..f7ada65953 100644 --- a/keyboards/idobao/id67/keymaps/vinorodrigues/config.h +++ b/keyboards/idobao/id67/keymaps/vinorodrigues/config.h @@ -1,26 +1,14 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + /* * IDOBAO ID67 Keymap for a ID67 Bestype, built for Mac use - * Copyright (C) 2022 Vino Rodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #pragma once -#if defined(RGB_MATRIX_ENABLE) - #define VIA_QMK_RGBLIGHT_ENABLE - #define ID67_DISABLE_UNDERGLOW // personal choice, I use a ID67 Bestype +#ifdef RGB_MATRIX_ENABLE + #define ID67_DISABLE_UNDERGLOW #ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS diff --git a/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c b/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c index c62db2c724..1bf6971730 100644 --- a/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c +++ b/keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c @@ -1,19 +1,8 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + /* * IDOBAO ID67 Keymap for a ID67 Bestype, built for Mac use - * Copyright (C) 2022 Vino Rodrigues - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H @@ -44,30 +33,85 @@ enum macos_consumer_usages { #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backspc│ ~ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │*Caps*│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PUp│ *Caps* => `LT(1, KC_CAPS)` + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Opt │Comm│ │Fn1 │Fn2 │ │Lf │Dn │Rt │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [_BASE] = LAYOUT_65_ansi_blocker( KC_GESC, 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_GRAVE, \ 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_BSLASH, KC_DELETE, \ LT1_C_L, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, FN_MO13, FN_MO23, KC_LEFT, KC_DOWN, KC_RIGHT), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │ ~ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ ERASE │F13│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │Up │ │ │ │ │ │ │ │PSc│Hom│End│Eject│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │Lf │Dn │Rt │ │ │ │ │ │ │PUp│PDn│ enter │Hom│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shft │ │ │ │ │ │ │ │ │Ins│Del│Shift │ │End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ctrl│opt │comm│ │ │Fn3 │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [_FN1] = LAYOUT_65_ansi_blocker( 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_ERAS, KC_F13, \ _______, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_HOME, KC_END, KC_EJCT, KC_INS, \ KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, KC_PENT, KC_HOME, \ KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DELETE, KC_LSFT, _______, KC_END, \ KC_RCTL, KC_RALT, KC_RGUI, _______, _______, _______, _______, _______, _______), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │Esc│SB-│SB+│mMC│mLP│Br-│Br+│Prv│Ply│Nxt│Mut│Vl-│Vl+│ out │F14│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tog │Mod│ │ │ │ │ │ │ │ │ │ │ │ │PSc│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │mod│ │ │ │ │ │ │ │ │Hu+│Sa+│ │SLk│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Hu-│Sa-│ │Br+│Pau│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │Fn3 │ │ │Sp-│Br-│Sp+│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [_FN2] = LAYOUT_65_ansi_blocker( KC_ESC, KC_BRID, KC_BRIU, KC_MCON, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_OUT, KC_F14, \ RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, \ XXXXXXX, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_SAI, XXXXXXX, KC_SLCK, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_SAD, XXXXXXX, RGB_VAI, KC_PAUS, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SPD, RGB_VAD, RGB_SPI), + + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠+ * │RST│M01│M02│M03│M04│M05│M06│M07│M08│M09│M10│M11│M12│ Power │F15│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Sleep│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ Debug │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │Ver│ │ │ │ │ │ │ │M00│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ Wake │ │ │ │M13│M14│M15│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ [_FN3] = LAYOUT_65_ansi_blocker( - RESET, MACRO01, MACRO02, MACRO03, MACRO04, MACRO05, MACRO06, MACRO07, MACRO08, MACRO09, MACRO10, MACRO11, MACRO12, KC_POWER, KC_F15, \ + QK_BOOT, MACRO01, MACRO02, MACRO03, MACRO04, MACRO05, MACRO06, MACRO07, MACRO08, MACRO09, MACRO10, MACRO11, MACRO12, KC_POWER, KC_F15, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KB_VRSN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MACRO00, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, KC_WAKE, XXXXXXX, XXXXXXX, MACRO13, MACRO14, MACRO15), + XXXXXXX, XXXXXXX, XXXXXXX, KC_WAKE, XXXXXXX, XXXXXXX, MACRO13, MACRO14, MACRO15) }; #ifdef RGB_MATRIX_ENABLE @@ -248,12 +292,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_MCON: if (record->event.pressed) { host_consumer_send(_AC_SHOW_ALL_WINDOWS); + } else { + host_consumer_send(0); } return false; case KC_LPAD: if (record->event.pressed) { host_consumer_send(_AC_SHOW_ALL_APPS); + } else { + host_consumer_send(0); } return false; diff --git a/keyboards/idobao/id67/keymaps/vinorodrigues/rules.mk b/keyboards/idobao/id67/keymaps/vinorodrigues/rules.mk index 24f7bdab9c..cf6371fda0 100644 --- a/keyboards/idobao/id67/keymaps/vinorodrigues/rules.mk +++ b/keyboards/idobao/id67/keymaps/vinorodrigues/rules.mk @@ -1,5 +1,3 @@ LTO_ENABLE = yes VIA_ENABLE = yes - -KEY_LOCK_ENABLE = no # Enable KC_LOCK support -NKRO_ENABLE = no # N-Key Rollover must be OFF for mac keys to work +NKRO_ENABLE = no # N-Key Rollover must be OFF for mac keys to work diff --git a/keyboards/idobao/id67/post_rules.mk b/keyboards/idobao/id67/post_rules.mk index 5eecdef4ce..32832a65b2 100644 --- a/keyboards/idobao/id67/post_rules.mk +++ b/keyboards/idobao/id67/post_rules.mk @@ -2,13 +2,7 @@ # this enables switching off thoes LEDs # Usage: `make idobao/id67:default UNDERGLOW=off` -ifeq ($(findstring off,$(UNDERGLOW)), off) - $(info ** UNDERGLOW OFF) - OPT_DEFS += -DID67_DISABLE_UNDERGLOW -else ifeq ($(findstring no,$(UNDERGLOW)), no) - $(info ** NO UNDERGLOW) - OPT_DEFS += -DID67_DISABLE_UNDERGLOW -else ifeq ($(findstring 0,$(UNDERGLOW)), 0) - $(info ** Nil UNDERGLOW) +UNDERGLOW ?= yes +ifneq ($(strip $(UNDERGLOW)), yes) OPT_DEFS += -DID67_DISABLE_UNDERGLOW endif diff --git a/keyboards/idobao/id67/readme.md b/keyboards/idobao/id67/readme.md index b69e2e60b1..c2d59eedeb 100644 --- a/keyboards/idobao/id67/readme.md +++ b/keyboards/idobao/id67/readme.md @@ -1,25 +1,32 @@ # IDOBAO ID67 -![id67](https://idobao.github.io/assets/img/idobao-id67.png) +![id67](https://i.imgur.com/XiEnksS.png) A 65% hotswap keyboard from IDOBAO. ## ANSI support: -* Keyboard Maintainer: Tybera *(fmr.)*, [thewerther](https://github.com/thewerther) *(curr.)* -* Hardware Supported: IDOBAO ID67, ID67V2, ID67 Crystal & ID67 Bestype -* Hardware Availability: IDOBAO website: +* Keyboard Maintainer: + - [Tybera](https://github.com/tybera) *(fmr.)* + - [Werther](https://github.com/thewerther) *(curr.)* + - [Vino Rodrigues](https://github.com/vinorodrigues) *(curr.)* +* Hardware Supported: + - **IDOBAO ID67** + - **ID67v2** + - **ID67 Crystal** + - **ID67 Bestype** +* Hardware Availability: [IDOBAO.net](https://idobao.net/search?type=product&q=ID67*): * [ID67](https://www.idobao.net/products/idobao-id67-65-hot-swappable-mechanical-keyboard-kit-1) - * [ID67V2](https://idobao.net/products/idobao-id67v2-65-hot-swappable-mechanical-keyboard-kit) + * [ID67v2](https://idobao.net/products/idobao-id67v2-65-hot-swappable-mechanical-keyboard-kit) * [ID67 Crystal](https://idobao.net/products/idobao-id67-crystal-keyboard-kit-gasket-mount-version) * [ID67 Bestype](https://idobao.net/products/idobao-id67-bestype-keyboard-kit-aluminum-with-brass-weight) -## Layout +## ANSI Layout -![ID67 layout](https://idobao.github.io/kle/idobao-id67.png) +![ID67 Layout](https://idobao.github.io/kle/idobao-id67.png) -## Compiling and flashing +## Compiling and Flashing Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/idobao/id67/rules.mk b/keyboards/idobao/id67/rules.mk index 729e1ca67c..ce58b87be5 100644 --- a/keyboards/idobao/id67/rules.mk +++ b/keyboards/idobao/id67/rules.mk @@ -1,21 +1,5 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes # Enable RGB Matrix feature RGB_MATRIX_DRIVER = WS2812 # ID67 uses WS2812 driver -LAYOUTS = 65_ansi_blocker diff --git a/keyboards/idobao/id75/v1/config.h b/keyboards/idobao/id75/v1/config.h index 16cffdfbad..8671bbcd75 100644 --- a/keyboards/idobao/id75/v1/config.h +++ b/keyboards/idobao/id75/v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B3, C7, B6, C6 } #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D5, D3, D2, D1, D0, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/idobao/id75/v2/config.h b/keyboards/idobao/id75/v2/config.h index a36ba404a6..4029d80bf8 100644 --- a/keyboards/idobao/id75/v2/config.h +++ b/keyboards/idobao/id75/v2/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B0, B3, C7, B6, C6 } #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D5, D3, D2, D1, D0, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/idobao/id80/v3/ansi/ansi.c b/keyboards/idobao/id80/v3/ansi/ansi.c new file mode 100644 index 0000000000..2b298924cf --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/ansi.c @@ -0,0 +1,76 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ansi.h" + +#define __ NO_LED + +#ifdef RGB_MATRIX_ENABLE + +/* Per-key LED's + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │79 ││78 │77 │76 │75 ││74 │73 │72 │71 ││70 │69 │68 │67 ││66 ││65 │ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │64 │63 │62 │61 │60 │59 │58 │57 │56 │55 │54 │53 │52 │ 51 ││50 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ 49 │48 │47 │46 │45 │44 │43 │42 │41 │40 │39 │38 │37 │ 36 ││35 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ 34 │33 │32 │31 │30 │29 │28 │27 │26 │25 │24 │23 │ 22 │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ 21 │20 │19 │18 │17 │16 │15 │14 │13 │12 │11 │ 10 │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ 9 │ + * │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ 2 │ 1 │ 0 │ + * └───┴───┴───┘ + * Underglow (as seen from top) + * ┌────┬────┬────┬────┬────┬────┠+ * │ 80 │ 81 │ 82 │ 83 │ 84 │ 85 │ + * ├────┼────┴────┴────┴────┼────┤ + * │ 93 │ │ 86 │ + * ├────┼────┬────┬────┬────┼────┤ + * │ 92 │ 91 │ 90 │ 89 │ 88 │ 87 │ + * └────┴────┴────┴────┴────┴────┘ + */ + +led_config_t g_led_config = { { + // Key Matrix to LED Index + /* Generated with: https://xelus.netlify.app/guides/KLE_to_RGB_parser */ + { 8, 21, 34, 49, 64, 79, __, __, __, __, __ }, + { 7, __, 33, 48, 63, 78, __, __, __, __, __ }, + { 6, 20, 32, 47, 62, 77, __, __, 35, 50, 65 }, + { 0, 19, 31, 46, 61, 76, 9, __, 36, __, 67 }, + { 1, 18, 30, 45, 60, 75, 10, 22, 37, 52, 68 }, + { 2, 17, 29, 44, 59, 74, 11, 23, 38, 53, 69 }, + { 5, 16, 28, 43, 58, 73, __, __, __, 51, 66 }, + { 3, 15, 27, 42, 57, 72, 12, 24, 39, 54, 70 }, + { 4, 14, 26, 41, 56, 71, 13, 25, 40, 55, __ }, +}, { + /* NB: Reversed order */ + // per-key + {224,64 }, {209,64 }, {195,64 }, {173,61 }, {151,61 }, { 94,61 }, { 39,61 }, { 20,61 }, { 2,61 }, + {209,52 }, {185,49 }, {165,49 }, {151,49 }, {136,49 }, {121,49 }, {106,49 }, { 92,49 }, { 77,49 }, { 62,49 }, { 48,49 }, { 33,49 }, { 9,49 }, + {196,38 }, {173,38 }, {158,38 }, {143,38 }, {129,38 }, {114,38 }, { 99,38 }, { 84,38 }, { 70,38 }, { 55,38 }, { 40,38 }, { 26,38 }, { 6,38 }, + {224,26 }, {202,26 }, {184,26 }, {169,26 }, {154,26 }, {140,26 }, {125,26 }, {110,26 }, { 95,26 }, { 81,26 }, { 66,26 }, { 51,26 }, { 37,26 }, { 22,26 }, { 4,26 }, + {224,15 }, {198,15 }, {176,15 }, {162,15 }, {147,15 }, {132,15 }, {118,15 }, {103,15 }, { 88,15 }, { 73,15 }, { 59,15 }, { 44,15 }, { 29,15 }, { 15,15 }, { 0,15 }, + {224,0 }, {206,0 }, {187,0 }, {173,0 }, {158,0 }, {143,0 }, {125,0 }, {110,0 }, { 95,0 }, { 81,0 }, { 62,0 }, { 48,0 }, { 33,0 }, { 18,0 }, { 0,0 }, + // underglow + { 0,0 }, { 45,0 }, { 90,0 }, {134,0 }, {179,0 }, {224,0 }, + {224,32 }, + {224,64 }, {179,64 }, {134,64 }, { 90,64 }, { 45,64 }, { 0,64 }, + { 0,32 } +}, { + /* NB: Reversed order */ + 4, 4, 4, 4, 4, 1, 4, 4, 4, + 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + // + 2, 2, 2, 2, 2, 2, + 2, + 2, 2, 2, 2, 2, 2, + 2 +} }; + +#endif diff --git a/keyboards/idobao/id80/v3/ansi/ansi.h b/keyboards/idobao/id80/v3/ansi/ansi.h new file mode 100644 index 0000000000..d9bef6d021 --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/ansi.h @@ -0,0 +1,6 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "quantum.h" diff --git a/keyboards/idobao/id80/v3/ansi/config.h b/keyboards/idobao/id80/v3/ansi/config.h new file mode 100644 index 0000000000..1b99fd7908 --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/config.h @@ -0,0 +1,97 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +/* -------------------------------- + * Bootmagic Lite key configuration + * use the Esc key + * -------------------------------- */ + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 5 + +/* ---------------- + * RGB Matrix stuff + * ---------------- */ + +#define RGB_DI_PIN E2 + +// RGB Matrix config +#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE) + + #define DRIVER_LED_TOTAL 94 + + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255 + + #define RGB_MATRIX_KEYPRESSES + + #define ENABLE_RGB_MATRIX_SOLID_COLOR // Static single color + #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation + #define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness + #define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard + #define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard + #define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation + #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back + #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left + #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right + + /* don't need `#if`, animation modes themselves check defines + * #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) */ + // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + /* #endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS */ + + /* don't need `#if`, animation modes themselves check defines + * #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) */ + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out + /* #endif // RGB_MATRIX_KEYPRESSES | RGB_MATRIX_KEYRELEASES */ +#endif // RGB_MATRIX_ENABLE + +/* ----------------------- + * Feature disable options + * These options are also useful to firmware size reduction. + * ----------------------- */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/idobao/id80/v3/ansi/info.json b/keyboards/idobao/id80/v3/ansi/info.json new file mode 100644 index 0000000000..c7768130e1 --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/info.json @@ -0,0 +1,121 @@ +{ + "manufacturer": "IDOBAO", + "keyboard_name": "IDOBAO ID80v3", + "maintainer": "vinorodrigues", + "bootloader": "atmel-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "backlight": false, + "rgblight": false + }, + "matrix_pins": { + "cols": ["B7", "B3", "B2", "B1", "B0", "E6", "F1", "F4", "F5", "F6", "F7"], + "rows": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"] + }, + "processor": "atmega32u4", + "url": "https://idobao.net/search?type=product&q=id80*", + "usb": { + "vid": "0x6964", + "pid": "0x0380", + "device_version": "3.0.0" + }, + "layouts": { + "LAYOUT_80_ansi": { + "layout": [ + { "matrix": [0, 5], "x": 0, "y": 0 }, + { "matrix": [1, 5], "x": 1.25, "y": 0 }, + { "matrix": [2, 5], "x": 2.25, "y": 0 }, + { "matrix": [3, 5], "x": 3.25, "y": 0 }, + { "matrix": [4, 5], "x": 4.25, "y": 0 }, + { "matrix": [5, 5], "x": 5.5, "y": 0 }, + { "matrix": [6, 5], "x": 6.5, "y": 0 }, + { "matrix": [7, 5], "x": 7.5, "y": 0 }, + { "matrix": [8, 5], "x": 8.5, "y": 0 }, + { "matrix": [7, 10], "x": 9.75, "y": 0 }, + { "matrix": [5, 10], "x": 10.75, "y": 0 }, + { "matrix": [4, 10], "x": 11.75, "y": 0 }, + { "matrix": [3, 10], "x": 12.75, "y": 0 }, + { "matrix": [6, 10], "x": 14, "y": 0 }, + { "matrix": [2, 10], "x": 15.25, "y": 0 }, + + { "matrix": [0, 4], "x": 0, "y": 1.25 }, + { "matrix": [1, 4], "x": 1, "y": 1.25 }, + { "matrix": [2, 4], "x": 2, "y": 1.25 }, + { "matrix": [3, 4], "x": 3, "y": 1.25 }, + { "matrix": [4, 4], "x": 4, "y": 1.25 }, + { "matrix": [5, 4], "x": 5, "y": 1.25 }, + { "matrix": [6, 4], "x": 6, "y": 1.25 }, + { "matrix": [7, 4], "x": 7, "y": 1.25 }, + { "matrix": [8, 4], "x": 8, "y": 1.25 }, + { "matrix": [8, 9], "x": 9, "y": 1.25 }, + { "matrix": [7, 9], "x": 10, "y": 1.25 }, + { "matrix": [5, 9], "x": 11, "y": 1.25 }, + { "matrix": [4, 9], "x": 12, "y": 1.25 }, + { "matrix": [6, 9], "x": 13, "y": 1.25, "w": 2 }, + { "matrix": [2, 9], "x": 15.25, "y": 1.25 }, + + { "matrix": [0, 3], "x":0, "y":2.25, "w":1.5}, + { "matrix": [1, 3], "x":1.5, "y":2.25}, + { "matrix": [2, 3], "x":2.5, "y":2.25}, + { "matrix": [3, 3], "x":3.5, "y":2.25}, + { "matrix": [4, 3], "x":4.5, "y":2.25}, + { "matrix": [5, 3], "x":5.5, "y":2.25}, + { "matrix": [6, 3], "x":6.5, "y":2.25}, + { "matrix": [7, 3], "x":7.5, "y":2.25}, + { "matrix": [8, 3], "x":8.5, "y":2.25}, + { "matrix": [8, 8], "x":9.5, "y":2.25}, + { "matrix": [7, 8], "x":10.5, "y":2.25}, + { "matrix": [5, 8], "x":11.5, "y":2.25}, + { "matrix": [4, 8], "x":12.5, "y":2.25}, + { "matrix": [3, 8], "x":13.5, "y":2.25, "w":1.5}, + { "matrix": [2, 8], "x":15.25, "y":2.25}, + + { "matrix": [0, 2], "x":0, "y":3.25, "w":1.75}, + { "matrix": [1, 2], "x":1.75, "y":3.25}, + { "matrix": [2, 2], "x":2.75, "y":3.25}, + { "matrix": [3, 2], "x":3.75, "y":3.25}, + { "matrix": [4, 2], "x":4.75, "y":3.25}, + { "matrix": [5, 2], "x":5.75, "y":3.25}, + { "matrix": [6, 2], "x":6.75, "y":3.25}, + { "matrix": [7, 2], "x":7.75, "y":3.25}, + { "matrix": [8, 2], "x":8.75, "y":3.25}, + { "matrix": [8, 7], "x":9.75, "y":3.25}, + { "matrix": [7, 7], "x":10.75, "y":3.25}, + { "matrix": [5, 7], "x":11.75, "y":3.25}, + { "matrix": [4, 7], "x":12.75, "y":3.25, "w":2.25}, + + { "matrix": [0, 1], "x":0, "y":4.25, "w":2.25}, + { "matrix": [2, 1], "x":2.25, "y":4.25}, + { "matrix": [3, 1], "x":3.25, "y":4.25}, + { "matrix": [4, 1], "x":4.25, "y":4.25}, + { "matrix": [5, 1], "x":5.25, "y":4.25}, + { "matrix": [6, 1], "x":6.25, "y":4.25}, + { "matrix": [7, 1], "x":7.25, "y":4.25}, + { "matrix": [8, 1], "x":8.25, "y":4.25}, + { "matrix": [8, 6], "x":9.25, "y":4.25}, + { "matrix": [7, 6], "x":10.25, "y":4.25}, + { "matrix": [5, 6], "x":11.25, "y":4.25}, + { "matrix": [4, 6], "x":12.25, "y":4.25, "w":1.75}, + + { "matrix": [3, 6], "x":14.25, "y":4.5}, + + { "matrix": [0, 0], "x":0, "y":5.25, "w":1.25}, + { "matrix": [1, 0], "x":1.25, "y":5.25, "w":1.25}, + { "matrix": [2, 0], "x":2.5, "y":5.25, "w":1.25}, + { "matrix": [6, 0], "y":5.25, "w":6.25}, + { "matrix": [8, 0], "x":10, "y":5.25, "w":1.5}, + { "matrix": [7, 0], "x":11.5, "y":5.25, "w":1.5}, + + { "matrix": [5, 0], "x":13.25, "y":5.5}, + { "matrix": [4, 0], "x":14.25, "y":5.5}, + { "matrix": [3, 0], "x":15.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/default/keymap.c b/keyboards/idobao/id80/v3/ansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..127647c664 --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Esc││F1 │F2 │F3 │F4 ││F5 │F6 │F7 │F8 ││F9 │F10│F11│F12││Fn1││Ins│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │`~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │-_ │=+ │Backspc││Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[{ │]} │ \| ││Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │;: │'" │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │,< │.> │/? │Shift │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ ↑ │ + * │Ctrl│Win │Alt │ Space │ Alt │Ctrl │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ ↠│ ↓ │ → │ + * └───┴───┴───┘ + */ + [0] = LAYOUT_80_ansi( + 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, MO(1), KC_INS, + KC_GRV, 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_HOME, + 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, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Rst││ │ │ │ ││ │ │ │ ││ │PSc│SLk│Pau││ ││Mut│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││Vl+│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ │Tog│ │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│Sp+│Sp-│ │ ││Vl-│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ │ │ │mod│ │ │NKR│ │ │ │ │ │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│PUp│ + * │ │ │ │ │ │ │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│Hom│PDn│End│ + * └───┴───┴───┘ + */ + [1] = LAYOUT_80_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_RMOD, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c new file mode 100644 index 0000000000..e0d786e5e2 --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/keymap.c @@ -0,0 +1,315 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// Copyright 2022 IDOBAO (@idobaokb) +// SPDX-License-Identifier: GPL-2.0-or-later + +/* ------------------------------------------------------------------ + * This is the IDOBAO factory default keymap ;) + * ------------------------------------------------------------------ */ + +#include QMK_KEYBOARD_H +#include "version.h" + +#ifdef RGB_MATRIX_ENABLE + +typedef union { + uint32_t raw; + struct { + bool rgb_disable_perkey:1; + bool rgb_disable_underglow:1; + }; +} user_config_t; + +#endif // RGB_MATRIX_ENABLE + +enum { + _BASE = 0, + _FN1, + _FN2, + _FN3 +}; + +enum { + KC_MCON = USER00, // macOS Open Mission Control + KC_LPAD, // macOS Open Launchpad + #ifdef RGB_MATRIX_ENABLE + RGB_TPK, // Toggle Per-Key + RGB_TUG, // Toggle Underglow + #endif // RGB_MATRIX_ENABLE + KB_VRSN = USER09 // debug, type version +}; + +#ifndef RGB_MATRIX_ENABLE + #define RGB_TPK _______ + #define RGB_TUG _______ +#endif // RGB_MATRIX_ENABLE + +enum macos_consumer_usages { + _AC_SHOW_ALL_WINDOWS = 0x29F, // mapped to KC_MCON + _AC_SHOW_ALL_APPS = 0x2A0 // mapped to KC_LPAD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Esc││F1 │F2 │F3 │F4 ││F5 │F6 │F7 │F8 ││F9 │F10│F11│F12││Fn1││Ins│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │`~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │-_ │=+ │Backspc││Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[{ │]} │ \| ││Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │;: │'" │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │,< │.> │/? │Shift │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ ↑ │ + * │Ctrl│Win │Alt │ Space │ Alt │Ctrl │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ ↠│ ↓ │ → │ + * └───┴───┴───┘ + */ + [_BASE] = LAYOUT_80_ansi( + 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, MO(_FN1), KC_INS, + KC_GRV, 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_HOME, + 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, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Rst││ │ │ │ ││ │ │ │ ││ │PSc│SLk│Pau││ ││Mut│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││Vl+│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ │Tog│ │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│Sp+│Sp-│ │ ││Vl-│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ │ │ │mod│Ver│ │NKR│ │ │ │ │ │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│PUp│ + * │ │ │ │ │ │ │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│Hom│PDn│End│ + * └───┴───┴───┘ + */ + [_FN1] = LAYOUT_80_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_RMOD, KB_VRSN, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ ││ │ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ │ + * │ │ │ │ │ │ │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ │ │ │ + * └───┴───┴───┘ + */ + [_FN2] = LAYOUT_80_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN3] = LAYOUT_80_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGB_MATRIX_ENABLE + +/* + * RGB Stuff + */ + +#define ID80_CAPS_LOCK_KEY_INDEX 34 // position of Caps Lock key + +#define ID80_CAPS_LOCK_MAX_BRIGHTNESS 0xFF +#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #undef ID80_CAPS_LOCK_MAX_BRIGHTNESS + #define ID80_CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#define ID80_CAPS_LOCK_VAL_STEP 8 +#ifdef RGB_MATRIX_VAL_STEP + #undef ID80_CAPS_LOCK_VAL_STEP + #define ID80_CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP +#endif + +user_config_t user_config; + +void id80_update_rgb_mode(void) { + uint8_t flags = LED_FLAG_ALL; + + if (user_config.rgb_disable_perkey && user_config.rgb_disable_underglow) { + flags = 0; // All OFF Condition + } else { + if (user_config.rgb_disable_perkey) { + flags = LED_FLAG_UNDERGLOW | 0xF0; + } + if (user_config.rgb_disable_underglow) { + flags = LED_FLAG_MODIFIER | LED_FLAG_KEYLIGHT | LED_FLAG_INDICATOR | 0xF0; + } + } + + if (flags == 0) { + rgb_matrix_set_flags(0); + rgb_matrix_set_color_all(HSV_OFF); + } else { + rgb_matrix_set_flags(flags); + rgb_matrix_enable_noeeprom(); + } + + eeconfig_update_kb(user_config.raw); // write back to EEPROM +} + +void id80_get_rgb_mode(void) { + user_config.raw = eeconfig_read_kb(); // read config from EEPROM + id80_update_rgb_mode(); +} + +void keyboard_post_init_user(void) { + id80_get_rgb_mode(); +} + +void eeconfig_init_user(void) { + // EEPROM is getting reset! + user_config.raw = 0; + id80_update_rgb_mode(); +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // Caps Lock key stuff + + if (host_keyboard_led_state().caps_lock) { + uint8_t v = rgb_matrix_get_val(); + if (v < ID80_CAPS_LOCK_VAL_STEP) { + v = ID80_CAPS_LOCK_VAL_STEP; + } else if (v < (ID80_CAPS_LOCK_MAX_BRIGHTNESS - ID80_CAPS_LOCK_VAL_STEP)) { + if (!user_config.rgb_disable_perkey) { + v += ID80_CAPS_LOCK_VAL_STEP; // inc. by one more step than current brightness + } // else leave as current brightness + } else { + v = ID80_CAPS_LOCK_MAX_BRIGHTNESS; + } + rgb_matrix_set_color(ID80_CAPS_LOCK_KEY_INDEX, v, v, v); // white, brightness adjusted + } else if (user_config.rgb_disable_perkey) { + rgb_matrix_set_color(ID80_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off + } +} + +#endif // RGB_MATRIX_ENABLE + +/* + * Extra keys and RGB Toggle handler + */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + // handle RGB toggle key - this ensures caps lock always works + #ifdef RGB_MATRIX_ENABLE + + case QK_BOOT: + if (record->event.pressed) { + rgb_matrix_set_color_all(RGB_MATRIX_MAXIMUM_BRIGHTNESS, 0, 0); // All red + rgb_matrix_driver.flush(); + } + return true; + + case RGB_TOG: + /* roll through the LED modes + * | Level | Per-key | Underglow | + * |------------|---------|-----------| + * | 0 (defalt) | on | on | + * | 1 | OFF | on | + * | 2 | on | OFF | + * | 3 | OFF | OFF | + */ + if (record->event.pressed) { + if ( (!user_config.rgb_disable_perkey) && (!user_config.rgb_disable_underglow) ) { + user_config.rgb_disable_perkey = 1; + } else if ( user_config.rgb_disable_perkey && (!user_config.rgb_disable_underglow) ) { + user_config.rgb_disable_perkey = 0; + user_config.rgb_disable_underglow = 1; + } else if ( (!user_config.rgb_disable_perkey) && user_config.rgb_disable_underglow ) { + user_config.rgb_disable_perkey = 1; + } else { + user_config.rgb_disable_perkey = 0; + user_config.rgb_disable_underglow = 0; + } + id80_update_rgb_mode(); + } + return false; + + case RGB_TPK: + if (record->event.pressed) { + user_config.rgb_disable_perkey ^= 1; + id80_update_rgb_mode(); + } + return false; + + case RGB_TUG: + if (record->event.pressed) { + user_config.rgb_disable_underglow ^= 1; + id80_update_rgb_mode(); + } + return false; + + case EE_CLR: + if (!record->event.pressed) { // on release + id80_get_rgb_mode(); + } + return true; // let this one pass on + + #endif // RGB_MATRIX_ENABLE + + // print firmware version + case KB_VRSN: + if (!get_mods()) { + if (!record->event.pressed) { + SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " (v" QMK_VERSION ")"); + } + } + return false; + + // @see: https://github.com/qmk/qmk_firmware/issues/10111#issuecomment-752300353 + case KC_MCON: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_WINDOWS); + } else { + host_consumer_send(0); + } + return false; + + case KC_LPAD: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_APPS); + } else { + host_consumer_send(0); + } + return false; + + default: + return true; /* Process all other keycodes normally */ + } +} diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/idobao/rules.mk b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/rules.mk new file mode 100644 index 0000000000..ca9fed0e6b --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/keymaps/idobao/rules.mk @@ -0,0 +1,2 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/via/keymap.c b/keyboards/idobao/id80/v3/ansi/keymaps/via/keymap.c new file mode 100644 index 0000000000..9ca5d285fa --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/keymaps/via/keymap.c @@ -0,0 +1,90 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Esc││F1 │F2 │F3 │F4 ││F5 │F6 │F7 │F8 ││F9 │F10│F11│F12││Fn1││Ins│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │`~ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │-_ │=+ │Backspc││Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[{ │]} │ \| ││Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │;: │'" │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │,< │.> │/? │Shift │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ ↑ │ + * │Ctrl│Win │Alt │ Space │ Alt │Ctrl │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ ↠│ ↓ │ → │ + * └───┴───┴───┘ + */ + [0] = LAYOUT_80_ansi( + 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, MO(1), KC_INS, + KC_GRV, 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_HOME, + 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, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │Rst││ │ │ │ ││ │ │ │ ││ │PSc│SLk│Pau││ ││Mut│ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││Vl+│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ │Tog│ │Mod│Hu+│Hu-│Sa+│Sa-│Br+│Br-│Sp+│Sp-│ │ ││Vl-│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ │ │ │mod│ │ │NKR│ │ │ │ │ │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│PUp│ + * │ │ │ │ │ │ │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│Hom│PDn│End│ + * └───┴───┴───┘ + */ + [1] = LAYOUT_80_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_RMOD, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* + * ┌───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───┬───┬───┬───â”┌───â”┌───┠+ * │ ││ │ │ │ ││ │ │ │ ││ │ │ │ ││ ││ │ + * ├───┼┴──┬┴──┬┴──┬┴──┬┴┴─┬─┴─┬─┴─┬─┴─┬─┴┴┬──┴┬──┴┬──┴┬──┴┴───┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │┌───┠+ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┘│ │ + * │ │ │ │ │ │ │┌───┼───┼───┠+ * └────┴────┴────┴────────────────────────┴─────┴─────┘│ │ │ │ + * └───┴───┴───┘ + */ + [2] = LAYOUT_80_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_80_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/idobao/id80/v3/ansi/keymaps/via/rules.mk b/keyboards/idobao/id80/v3/ansi/keymaps/via/rules.mk new file mode 100644 index 0000000000..ca9fed0e6b --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +LTO_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/idobao/id80/v3/ansi/rules.mk b/keyboards/idobao/id80/v3/ansi/rules.mk new file mode 100644 index 0000000000..eab741fd0a --- /dev/null +++ b/keyboards/idobao/id80/v3/ansi/rules.mk @@ -0,0 +1,5 @@ +# This file intentionally left blank +# ** settings are data driven & stored in `info.json` ** + +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/idobao/id80/v3/config.h b/keyboards/idobao/id80/v3/config.h deleted file mode 100644 index e962cf1922..0000000000 --- a/keyboards/idobao/id80/v3/config.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2020 Sergey Vlasov <sigprof@gmail.com> -Copyright 2022 peepeetee - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 9 -#define MATRIX_COLS 11 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - * The matrix description in the vendor-supplied JSON file for kbfirmware.com - * had 9 columns: - * { D0, D1, D2, D3, D5, D4, D6, D7, B4 } - * and 12 rows: - * { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } - * However, the row 6 was completely empty, and the pin F0 was not actually - * routed anywhere on the PCB, therefore this row was removed to save some - * resources (the EEPROM space for dynamic keymaps is especially scarce). - * - * After doing the above change, the matrix was transposed (rows and columns - * were swapped), because a matrix with the COL2ROW layout can be scanned much - * more efficiently than a matrix with the ROW2COL layout (depending on various - * optimizations, the difference in scan rate can be over 2 times). Because of - * this, the "columns" in the matrix layout now mostly correspond to physical - * rows, and the "rows" have mostly vertical physical orientation. - */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, E6, F1, F4, F5, F6, F7 } - -#define DIODE_DIRECTION COL2ROW - -#undef RGB_DI_PIN -#define RGB_DI_PIN B6 -#ifdef RGB_MATRIX_ENABLE -# define DRIVER_LED_TOTAL 96 /* 16 Bottom 80 top*/ -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define RGB_MATRIX_KEYPRESSES -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only if RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif - -/* Bootmagic Lite key configuration: use the Esc key */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 5 - -#define ENCODERS_PAD_A { C7 } -#define ENCODERS_PAD_B { C6 } - - - - diff --git a/keyboards/idobao/id80/v3/info.json b/keyboards/idobao/id80/v3/info.json deleted file mode 100644 index b011e1d6e6..0000000000 --- a/keyboards/idobao/id80/v3/info.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "keyboard_name": "ID80 v3", - "manufacturer": "IDOBAO", - "url": "", - "maintainer": "qmk", - "usb": { - "vid": "0x6964", - "pid": "0x0080", - "device_version": "0.0.3" - }, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"Fn", "x":14, "y":0}, - {"label":"Insert", "x":15.25, "y":0}, - - {"label":"`", "x":0, "y":1.25}, - {"label":"1", "x":1, "y":1.25}, - {"label":"2", "x":2, "y":1.25}, - {"label":"3", "x":3, "y":1.25}, - {"label":"4", "x":4, "y":1.25}, - {"label":"5", "x":5, "y":1.25}, - {"label":"6", "x":6, "y":1.25}, - {"label":"7", "x":7, "y":1.25}, - {"label":"8", "x":8, "y":1.25}, - {"label":"9", "x":9, "y":1.25}, - {"label":"0", "x":10, "y":1.25}, - {"label":"-", "x":11, "y":1.25}, - {"label":"=", "x":12, "y":1.25}, - {"label":"Backspace", "x":13, "y":1.25, "w":2}, - {"label":"Home", "x":15.25, "y":1.25}, - - {"label":"Tab", "x":0, "y":2.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.25}, - {"label":"W", "x":2.5, "y":2.25}, - {"label":"E", "x":3.5, "y":2.25}, - {"label":"R", "x":4.5, "y":2.25}, - {"label":"T", "x":5.5, "y":2.25}, - {"label":"Y", "x":6.5, "y":2.25}, - {"label":"U", "x":7.5, "y":2.25}, - {"label":"I", "x":8.5, "y":2.25}, - {"label":"O", "x":9.5, "y":2.25}, - {"label":"P", "x":10.5, "y":2.25}, - {"label":"[", "x":11.5, "y":2.25}, - {"label":"]", "x":12.5, "y":2.25}, - {"label":"\\", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.25}, - - {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, - {"label":"A", "x":1.75, "y":3.25}, - {"label":"S", "x":2.75, "y":3.25}, - {"label":"D", "x":3.75, "y":3.25}, - {"label":"F", "x":4.75, "y":3.25}, - {"label":"G", "x":5.75, "y":3.25}, - {"label":"H", "x":6.75, "y":3.25}, - {"label":"J", "x":7.75, "y":3.25}, - {"label":"K", "x":8.75, "y":3.25}, - {"label":"L", "x":9.75, "y":3.25}, - {"label":";", "x":10.75, "y":3.25}, - {"label":"'", "x":11.75, "y":3.25}, - {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, - - {"label":"Shift", "x":0, "y":4.25, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.25}, - {"label":"X", "x":3.25, "y":4.25}, - {"label":"C", "x":4.25, "y":4.25}, - {"label":"V", "x":5.25, "y":4.25}, - {"label":"B", "x":6.25, "y":4.25}, - {"label":"N", "x":7.25, "y":4.25}, - {"label":"M", "x":8.25, "y":4.25}, - {"label":",", "x":9.25, "y":4.25}, - {"label":".", "x":10.25, "y":4.25}, - {"label":"/", "x":11.25, "y":4.25}, - {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, - {"label":"\u2191", "x":14.25, "y":4.5}, - - {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, - {"x":3.75, "y":5.25, "w":6.25}, - {"label":"Alt", "x":10, "y":5.25, "w":1.5}, - {"label":"Ctrl", "x":11.5, "y":5.25, "w":1.5}, - {"label":"\u2190", "x":13.25, "y":5.5}, - {"label":"\u2193", "x":14.25, "y":5.5}, - {"label":"\u2192", "x":15.25, "y":5.5} - ] - } - } -} diff --git a/keyboards/idobao/id80/v3/keymaps/default/keymap.c b/keyboards/idobao/id80/v3/keymaps/default/keymap.c deleted file mode 100644 index f7886f1e0e..0000000000 --- a/keyboards/idobao/id80/v3/keymaps/default/keymap.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2020 Sergey Vlasov <sigprof@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - 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, MO(1), KC_INS, - KC_GRV, 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_HOME, - 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, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, - _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_STEP - ), -}; - diff --git a/keyboards/idobao/id80/v3/keymaps/default/readme.md b/keyboards/idobao/id80/v3/keymaps/default/readme.md deleted file mode 100644 index 8ae9f656cd..0000000000 --- a/keyboards/idobao/id80/v3/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for id80 diff --git a/keyboards/idobao/id80/v3/keymaps/via/keymap.c b/keyboards/idobao/id80/v3/keymaps/via/keymap.c deleted file mode 100644 index 19787b6b89..0000000000 --- a/keyboards/idobao/id80/v3/keymaps/via/keymap.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2020 Sergey Vlasov <sigprof@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - 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, MO(1), KC_INS, - KC_GRV, 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_HOME, - 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, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, - _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_STEP - ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; - diff --git a/keyboards/idobao/id80/v3/readme.md b/keyboards/idobao/id80/v3/readme.md index dc6c67b4f4..ad3b9b272c 100644 --- a/keyboards/idobao/id80/v3/readme.md +++ b/keyboards/idobao/id80/v3/readme.md @@ -1,27 +1,36 @@ -# ID80v3 +# IDOBAO ID80v3 -![ID80v3](https://i.imgur.com/PGvZfQj.jpg) +![IDOBAO ID80](https://i.imgur.com/977ENjp.png) -A 75% hotswap in-switch RGB keyboard with an encoder. +A 75% hotswap keyboard from IDOBAO. -* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) -* Hardware Supported: ID80v3 -* Hardware Availability: Not avaliable yet +## ANSI Support + +* Keyboard Maintainer: [Vino Rodrigues](https://github.com/vinorodrigues) +* Hardware Supported: **IDOBAO ID80v3** +* Hardware Availability: [IDOBAO.net](https://idobao.net/search?type=product&q=id80*) + +## ANSI Layout + +![](https://idobao.github.io/kle/idobao-id80.png) + +## Compiling and Flashing Make example for this keyboard (after setting up your build environment): - make idobao/id80/v3:default + make idobao/id80/v3/ansi:default Flashing example for this keyboard: - make idobao/id80/v3:default:flash + make idobao/id80/v3/ansi:default:flash -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). +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). ## Bootloader Enter the bootloader in 3 ways: -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Bootmagic reset**: Hold down the [Escape] key (the top left key) and plug in the keyboard * **Physical reset button**: Briefly press the button on the back of the PCB -* **Keycode in layout**: Press the key mapped to `RESET` if it is available +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/idobao/id80/v3/rules.mk b/keyboards/idobao/id80/v3/rules.mk index 6805b8f0f9..218fc05539 100644 --- a/keyboards/idobao/id80/v3/rules.mk +++ b/keyboards/idobao/id80/v3/rules.mk @@ -1,23 +1,2 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes -LTO_ENABLE = yes - -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 +# Defalt to the ansi version +DEFAULT_FOLDER = idobao/id80/v3/ansi diff --git a/keyboards/idobao/id80/v3/v3.c b/keyboards/idobao/id80/v3/v3.c deleted file mode 100644 index cd05a26a49..0000000000 --- a/keyboards/idobao/id80/v3/v3.c +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 peepeetee (@peepeetee) -// Copyright 2022 Xelus22 -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "v3.h" - -#ifdef ENCODER_ENABLE -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code_delay(KC_VOLU, 10); - } else { - tap_code_delay(KC_VOLD, 10); - } - } - return true; -} -#endif - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 8, 9, 34, 35, 64, 65, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 7, NO_LED, 33, 36, 63, 66, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, - { 6, 10, 32, 37, 62, 67, NO_LED, NO_LED, 49, 50, 79 }, - { 0, 11, 31, 38, 61, 68, 21, NO_LED, 48, NO_LED, 77 }, - { 1, 12, 30, 39, 60, 69, 20, 22, 47, 52, 76 }, - { 2, 13, 29, 40, 59, 70, 19, 23, 46, 53, 75 }, - { 5, 14, 28, 41, 58, 71, NO_LED, NO_LED, NO_LED, 51, 78 }, - { 3, 15, 27, 42, 57, 72, 18, 24, 45, 54, 74 }, - { 4, 16, 26, 43, 56, 73, 17, 25, 44, 55, NO_LED }, -}, { - // LED Index to Physical Position -{224, 64}, {209, 64}, {195, 64}, {173, 61}, {151, 61}, {94 , 61}, {39 , 61}, {20 , 61}, {2 , 61}, {9 , 50}, {33 , 50}, -{48 , 50}, {62 , 50}, {77 , 50}, {92 , 50}, {106, 50}, {121, 50}, {136, 50}, {151, 50}, {165, 50}, {185, 50}, {209, 53}, -{196, 39}, {173, 39}, {158, 39}, {143, 39}, {129, 39}, {114, 39}, {99 , 39}, {84 , 39}, {70 , 39}, {55 , 39}, {40 , 39}, -{26 , 39}, {6 , 39}, {4 , 28}, {22 , 28}, {37 , 28}, {51 , 28}, {66 , 28}, {81 , 28}, {95 , 28}, {110, 28}, {125, 28}, -{140, 28}, {154, 28}, {169, 28}, {184, 28}, {202, 28}, {224, 28}, {224, 17}, {198, 17}, {176, 17}, {162, 17}, {147, 17}, -{132, 17}, {118, 17}, {103, 17}, {88 , 17}, {73 , 17}, {59 , 17}, {44 , 17}, {29 , 17}, {15 , 17}, {0 , 17}, {0 , 0}, -{18 , 0}, {33 , 0}, {48 , 0}, {62 , 0}, {81 , 0}, {95 , 0}, {110, 0}, {125, 0}, {143, 0}, {158, 0}, {173, 0}, -{187, 0}, {206, 0}, {224, 0}, - -{ 207, 13}, -{ 207, 32}, -{ 207, 51},{ 174, 51},{ 141, 51},{ 108, 51},{ 73, 51},{ 40, 51},{ 13, 51 }, -{ 13, 32}, -{ 13, 13},{ 40, 13},{ 73, 13},{ 108, 13},{ 141, 13},{ 174, 13}, - -}, { - // LED Index to Flag -1,1,1,1,1,4,1,1,1, -1,4,4,4,4,4,4,4,4,4,4,1,1, -1,4,4,4,4,4,4,4,4,4,4,4,1, -1,4,4,4,4,4,4,4,4,4,4,4,4,4,1, -1,1,4,4,4,4,4,4,4,4,4,4,4,4,4, -1,4,4,4,4,1,1,1,1,4,4,4,4,1,1, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - -} }; - -#endif diff --git a/keyboards/idobao/id80/v3/v3.h b/keyboards/idobao/id80/v3/v3.h deleted file mode 100644 index 94626fe4f6..0000000000 --- a/keyboards/idobao/id80/v3/v3.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 Sergey Vlasov <sigprof@gmail.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, KA7, KA5, KA4, KA3, KA6, KA2, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K98, K97, K95, K94, K96, K92, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K88, K87, K85, K84, K83, K82, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K78, K77, K75, K74, \ - K10, K12, K13, K14, K15, K16, K17, K18, K68, K67, K65, K64, K63, \ - K00, K01, K02, K06, K08, K07, K05, K04, K03 \ -) { \ - { K00, K10, K20, K30, K40, K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K01, KC_NO, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, K82, K92, KA2 }, \ - { K03, K13, K23, K33, K43, K53, K63, KC_NO, K83, KC_NO, KA3 }, \ - { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4 }, \ - { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5 }, \ - { K06, K16, K26, K36, K46, K56, KC_NO, KC_NO, KC_NO, K96, KA6 }, \ - { K07, K17, K27, K37, K47, K57, K67, K77, K87, K97, KA7 }, \ - { K08, K18, K28, K38, K48, K58, K68, K78, K88, K98, KC_NO }, \ -} diff --git a/keyboards/idobao/id87/v1/config.h b/keyboards/idobao/id87/v1/config.h index 6ae4cee1b5..3d60f14f1e 100644 --- a/keyboards/idobao/id87/v1/config.h +++ b/keyboards/idobao/id87/v1/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B7, F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/idobao/id87/v2/config.h b/keyboards/idobao/id87/v2/config.h index a9d00d518b..8f1a9ddf03 100644 --- a/keyboards/idobao/id87/v2/config.h +++ b/keyboards/idobao/id87/v2/config.h @@ -1,137 +1,78 @@ -// Copyright 2022 peepeetee (@peepeetee) +// Copyright 2022 vinorodrigues (@vinorodrigues) // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "config_common.h" -/* key matrix size */ -#define MATRIX_ROWS 11 -#define MATRIX_COLS 9 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B7, F7, F6, F5, F4, F1 } - -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -//#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL - -#define LED_CAPS_LOCK_PIN C7 - -//#define BACKLIGHT_PIN B7 -//#define BACKLIGHT_LEVELS 3 -//#define BACKLIGHT_BREATHING +/* ---------------- + * RGB Matrix stuff + * ---------------- */ #define RGB_DI_PIN E2 -# define DRIVER_LED_TOTAL 103 /* 16 Bottom 87 top*/ -#ifdef RGB_DI_PIN -# define RGBLED_NUM 103 /* 16 Bottom 87 top*/ -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define RGB_MATRIX_KEYPRESSES -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_WAVE -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif - - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -#define FORCE_NKRO - -/* + +// RGB Matrix config +#if defined(RGB_MATRIX_ENABLE) + + #define DRIVER_LED_TOTAL 103 + + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255 + + #define RGB_MATRIX_KEYPRESSES + + #define ENABLE_RGB_MATRIX_SOLID_COLOR // Static single color + #define ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes + #define ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation + #define ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness + #define ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in + #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard + #define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard + #define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation + #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back + #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left + #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right + + /* RGB_MATRIX_FRAMEBUFFER_EFFECTS -- do not enable */ + // #define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + + /* RGB_MATRIX_KEYPRESSES | RGB_MATRIX_KEYRELEASES */ + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out + #define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#endif // RGB_MATRIX_ENABLE + + +/* ----------------------- * Feature disable options * These options are also useful to firmware size reduction. - */ + * ----------------------- */ /* disable debug print */ //#define NO_DEBUG @@ -143,7 +84,3 @@ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/idobao/id87/v2/info.json b/keyboards/idobao/id87/v2/info.json index ef18643d70..7292ce29ca 100644 --- a/keyboards/idobao/id87/v2/info.json +++ b/keyboards/idobao/id87/v2/info.json @@ -1,103 +1,126 @@ { - "keyboard_name": "ID87", "manufacturer": "IDOBAO", - "url": "https://www.idobao.net/products/idobao-id87-80-hot-swappable-mechanical-keyboard-kit", - "maintainer": "qmk", + "keyboard_name": "ID87v2", + "maintainer": "vinorodrigues", + "bootloader": "atmel-dfu", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "backlight": false, + "rgblight": false + }, + "debounce": 5, + "matrix_pins": { + "cols": ["D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], + "rows": ["E6", "B0", "B1", "B2", "B3", "B7", "F7", "F6", "F5", "F4", "F1"] + }, + "processor": "atmega32u4", + "url": "https://idobao.net/search?type=product&q=ID87*", "usb": { "vid": "0x6964", - "pid": "0x0087", - "device_version": "0.0.2" + "pid": "0x0287", + "device_version": "2.0.0" }, "layouts": { "LAYOUT_tkl_ansi": { "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - {"label":"~", "x":0, "y":1.5}, - {"label":"1", "x":1, "y":1.5}, - {"label":"2", "x":2, "y":1.5}, - {"label":"3", "x":3, "y":1.5}, - {"label":"4", "x":4, "y":1.5}, - {"label":"5", "x":5, "y":1.5}, - {"label":"6", "x":6, "y":1.5}, - {"label":"7", "x":7, "y":1.5}, - {"label":"8", "x":8, "y":1.5}, - {"label":"9", "x":9, "y":1.5}, - {"label":"0", "x":10, "y":1.5}, - {"label":"-", "x":11, "y":1.5}, - {"label":"=", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"PgUp", "x":17.25, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"[", "x":11.5, "y":2.5}, - {"label":"]", "x":12.5, "y":2.5}, - {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"PgDn", "x":17.25, "y":2.5}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":";", "x":10.75, "y":3.5}, - {"label":"'", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",", "x":9.25, "y":4.5}, - {"label":".", "x":10.25, "y":4.5}, - {"label":"/", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, - {"label":"Up", "x":16.25, "y":4.5}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, - {"label":"Alt", "x":10, "y":5.5, "w":1.25}, - {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, - {"label":"LT(1, KC_APP)", "x":12.5, "y":5.5, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, - {"label":"Left", "x":15.25, "y":5.5}, - {"label":"Down", "x":16.25, "y":5.5}, - {"label":"Right", "x":17.25, "y":5.5} + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0 }, + { "matrix": [0, 5], "x": 5, "y": 0 }, + { "matrix": [0, 6], "x": 6.5, "y": 0 }, + { "matrix": [0, 7], "x": 7.5, "y": 0 }, + { "matrix": [0, 8], "x": 8.5, "y": 0 }, + { "matrix": [6, 8], "x": 9.5, "y": 0 }, + { "matrix": [6, 7], "x": 11, "y": 0 }, + { "matrix": [6, 5], "x": 12, "y": 0 }, + { "matrix": [6, 4], "x": 13, "y": 0 }, + { "matrix": [6, 3], "x": 14, "y": 0 }, + { "matrix": [6, 6], "x": 15.25, "y": 0 }, + { "matrix": [6, 2], "x": 16.25, "y": 0 }, + { "matrix": [6, 1], "x": 17.25, "y": 0 }, + + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.25 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 6], "x": 6, "y": 1.25 }, + { "matrix": [1, 7], "x": 7, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [7, 8], "x": 9, "y": 1.25 }, + { "matrix": [7, 0], "x": 10, "y": 1.25 }, + { "matrix": [7, 7], "x": 11, "y": 1.25 }, + { "matrix": [7, 5], "x": 12, "y": 1.25 }, + { "matrix": [7, 3], "x": 13, "y": 1.25, "w": 2 }, + { "matrix": [7, 6], "x": 15.25, "y": 1.25 }, + { "matrix": [7, 2], "x": 16.25, "y": 1.25 }, + { "matrix": [7, 1], "x": 17.25, "y": 1.25 }, + + { "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1.5, "y": 2.25 }, + { "matrix": [2, 2], "x": 2.5, "y": 2.25 }, + { "matrix": [2, 3], "x": 3.5, "y": 2.25 }, + { "matrix": [2, 4], "x": 4.5, "y": 2.25 }, + { "matrix": [2, 5], "x": 5.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8.5, "y": 2.25 }, + { "matrix": [8, 8], "x": 9.5, "y": 2.25 }, + { "matrix": [8, 7], "x": 10.5, "y": 2.25 }, + { "matrix": [8, 5], "x": 11.5, "y": 2.25 }, + { "matrix": [8, 4], "x": 12.5, "y": 2.25 }, + { "matrix": [8, 3], "w": 1.5, "x": 13.5, "y": 2.25 }, + { "matrix": [8, 6], "x": 15.25, "y": 2.25 }, + { "matrix": [8, 2], "x": 16.25, "y": 2.25 }, + { "matrix": [8, 1], "x": 17.25, "y": 2.25 }, + + { "matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75 }, + { "matrix": [3, 1], "x": 1.75, "y": 3.25 }, + { "matrix": [3, 2], "x": 2.75, "y": 3.25 }, + { "matrix": [3, 3], "x": 3.75, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.75, "y": 3.25 }, + { "matrix": [3, 5], "x": 5.75, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.75, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.75, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.75, "y": 3.25 }, + { "matrix": [9, 8], "x": 9.75, "y": 3.25 }, + { "matrix": [9, 7], "x": 10.75, "y": 3.25 }, + { "matrix": [9, 5], "x": 11.75, "y": 3.25 }, + { "matrix": [9, 3], "x": 12.75, "y": 3.25, "w": 2.25 }, + + { "matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25 }, + { "matrix": [4, 2], "x": 2.25, "y": 4.25 }, + { "matrix": [4, 3], "x": 3.25, "y": 4.25 }, + { "matrix": [4, 4], "x": 4.25, "y": 4.25 }, + { "matrix": [4, 5], "x": 5.25, "y": 4.25 }, + { "matrix": [4, 6], "x": 6.25, "y": 4.25 }, + { "matrix": [4, 7], "x": 7.25, "y": 4.25 }, + { "matrix": [4, 8], "x": 8.25, "y": 4.25 }, + { "matrix": [10, 8], "x": 9.25, "y": 4.25 }, + { "matrix": [10, 7], "x": 10.25, "y": 4.25 }, + { "matrix": [10, 5], "x": 11.25, "y": 4.25 }, + { "matrix": [10, 4], "x": 12.25, "y": 4.25, "w": 2.75 }, + { "matrix": [9, 2], "x": 16.25, "y": 4.25 }, + + { "matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25 }, + { "matrix": [5, 8], "x": 10, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 7], "x": 11.25, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 4], "x": 12.5, "y": 5.25, "w": 1.25 }, + { "matrix": [5, 3], "x": 13.75, "y": 5.25, "w": 1.25 }, + { "matrix": [10, 6], "x": 15.25, "y": 5.25 }, + { "matrix": [10, 2], "x": 16.25, "y": 5.25 }, + { "matrix": [10, 1], "x": 17.25, "y": 5.25 } ] } } diff --git a/keyboards/idobao/id87/v2/keymaps/default/keymap.c b/keyboards/idobao/id87/v2/keymaps/default/keymap.c index 9465dca531..53690899c1 100644 --- a/keyboards/idobao/id87/v2/keymaps/default/keymap.c +++ b/keyboards/idobao/id87/v2/keymaps/default/keymap.c @@ -1,35 +1,58 @@ -/* -Copyright 2020 Tybera -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H +#define LT_1_AP LT(1, KC_APP) // Tap = Menu, Hold = MO(1) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │Ctrl│GUI │Alt │ │ Alt│ GUI│Fn1*│Ctrl│ │ ↠│ ↓ │ → │ Fn1* => Tap = Menu, Hold = MO(1) + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ [0] = LAYOUT_tkl_ansi( - 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, - KC_GRV, 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_INS, KC_HOME, KC_PGUP, - 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, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_tkl_ansi( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, - _______, BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, - _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC, RGB_MOD + 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, + KC_GRV, 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_INS, KC_HOME, KC_PGUP, + 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, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT_1_AP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Rst│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hu+│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │Tog│Mod│ │ │ │ │ │ │ │ │ │ │ │ │St-│Hu-│St+│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ │ │mod│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ │ │ │ │ │ │NRO│ │ │ │ │ │ │Br+│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ │ │ │ │ │ │ │ │ │Sp-│Br-│Sp+│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_tkl_ansi( + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI, + _______, _______, RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI + ) }; diff --git a/keyboards/idobao/id87/v2/keymaps/default/readme.md b/keyboards/idobao/id87/v2/keymaps/default/readme.md deleted file mode 100644 index 6054431de4..0000000000 --- a/keyboards/idobao/id87/v2/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for id87
\ No newline at end of file diff --git a/keyboards/idobao/id87/v2/keymaps/idobao/config.h b/keyboards/idobao/id87/v2/keymaps/idobao/config.h new file mode 100644 index 0000000000..a1612e6e32 --- /dev/null +++ b/keyboards/idobao/id87/v2/keymaps/idobao/config.h @@ -0,0 +1,4 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c b/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c new file mode 100644 index 0000000000..59b60b7e1d --- /dev/null +++ b/keyboards/idobao/id87/v2/keymaps/idobao/keymap.c @@ -0,0 +1,299 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// Copyright 2022 IDOBAO (@idobaokb) +// SPDX-License-Identifier: GPL-2.0-or-later + +/* ------------------------------------------------------------------ + * This is the IDOBAO factory default keymap ;) + * ------------------------------------------------------------------ */ + +#include QMK_KEYBOARD_H +#include "version.h" + +#ifdef RGB_MATRIX_ENABLE + +typedef union { + uint32_t raw; + struct { + bool rgb_disable_perkey:1; + bool rgb_disable_underglow:1; + }; +} user_config_t; + +#endif // RGB_MATRIX_ENABLE + +enum { + KC_MCON = USER00, // macOS Open Mission Control + KC_LPAD, // macOS Open Launchpad + #ifdef RGB_MATRIX_ENABLE + RGB_TPK, // Toggle Per-Key + RGB_TUG, // Toggle Underglow + #endif // RGB_MATRIX_ENABLE + KB_VRSN = USER09 // debug, type version +}; + +#ifndef RGB_MATRIX_ENABLE + #define RGB_TPK _______ + #define RGB_TUG _______ +#endif + +enum macos_consumer_usages { + _AC_SHOW_ALL_WINDOWS = 0x29F, // mapped to KC_MCON + _AC_SHOW_ALL_APPS = 0x2A0 // mapped to KC_LPAD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Backspc│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │Ctrl│GUI │Alt │ space │ Alt│ GUI│MO(1│Ctrl│ │ ↠│ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_tkl_ansi( + 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, + KC_GRV, 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_INS, KC_HOME, KC_PGUP, + 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, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Rst│ │BR+│BR-│mMC│mLP│ │Br-│Br+│Prv│Ply│ │Nxt│Mut│Vl-│Vl+│ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hu+│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │Tog│Mod│ │ │ │ │ │ │ │ │ │ │ │ │St-│Hu-│St+│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ │ │mod│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ │ │ │ │Ver│ │NRO│ │ │ │ │ MO(2) │ │Br+│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ │ │ │ │ │ │ │ │ │Sp-│Br-│Sp+│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [1] = LAYOUT_tkl_ansi( + QK_BOOT, KC_BRID, KC_BRIU, KC_MCON, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI, + _______, _______, RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KB_VRSN, _______, NK_TOGG, _______, _______, _______, _______, MO(2), RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI + ), + + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │M00│M01│M02│M03│M04│M05│M06│M07│M08│M09│M10│ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │M11│M12│M13│M14│M15│M16│ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + MACRO00, MACRO01, MACRO02, MACRO03, MACRO04, MACRO05, MACRO06, MACRO07, MACRO08, MACRO09, MACRO10, _______, _______, _______, _______, _______, _______, + _______, MACRO11, MACRO12, MACRO13, MACRO14, MACRO15, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGB_MATRIX_ENABLE + +/* + * RGB Stuff + */ + +#define ID87_CAPS_LOCK_KEY_INDEX 40 // position of Caps Lock key + +#define ID87_CAPS_LOCK_MAX_BRIGHTNESS 0xFF +#ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #undef ID87_CAPS_LOCK_MAX_BRIGHTNESS + #define ID87_CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#define ID87_CAPS_LOCK_VAL_STEP 8 +#ifdef RGB_MATRIX_VAL_STEP + #undef ID87_CAPS_LOCK_VAL_STEP + #define ID87_CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP +#endif + +user_config_t user_config; + +void id87_update_rgb_mode(void) { + uint8_t flags = LED_FLAG_ALL; + + if (user_config.rgb_disable_perkey && user_config.rgb_disable_underglow) { + flags = 0; // All OFF Condition + } else { + if (user_config.rgb_disable_perkey) { + flags = LED_FLAG_UNDERGLOW | 0xF0; + } + if (user_config.rgb_disable_underglow) { + flags = LED_FLAG_MODIFIER | LED_FLAG_KEYLIGHT | LED_FLAG_INDICATOR | 0xF0; + } + } + + if (flags == 0) { + rgb_matrix_set_flags(0); + rgb_matrix_set_color_all(HSV_OFF); + } else { + rgb_matrix_set_flags(flags); + rgb_matrix_enable_noeeprom(); + } + + eeconfig_update_kb(user_config.raw); // write back to EEPROM +} + +void id87_get_rgb_mode(void) { + user_config.raw = eeconfig_read_kb(); // read config from EEPROM + id87_update_rgb_mode(); +} + +void keyboard_post_init_user(void) { + id87_get_rgb_mode(); +} + +void eeconfig_init_user(void) { + // EEPROM is getting reset! + user_config.raw = 0; + id87_update_rgb_mode(); +} + +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // Caps Lock key stuff + + if (host_keyboard_led_state().caps_lock) { + uint8_t v = rgb_matrix_get_val(); + if (v < ID87_CAPS_LOCK_VAL_STEP) { + v = ID87_CAPS_LOCK_VAL_STEP; + } else if (v < (ID87_CAPS_LOCK_MAX_BRIGHTNESS - ID87_CAPS_LOCK_VAL_STEP)) { + if (!user_config.rgb_disable_perkey) { + v += ID87_CAPS_LOCK_VAL_STEP; // inc. by one more step than current brightness + } // else leave as current brightness + } else { + v = ID87_CAPS_LOCK_MAX_BRIGHTNESS; + } + rgb_matrix_set_color(ID87_CAPS_LOCK_KEY_INDEX, v, v, v); // white, brightness adjusted + } else if (user_config.rgb_disable_perkey) { + rgb_matrix_set_color(ID87_CAPS_LOCK_KEY_INDEX, HSV_OFF); // off + } +} + +#endif // RGB_MATRIX_ENABLE + +/* + * Extra keys and RGB Toggle handler + */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + // handle RGB toggle key - this ensures caps lock always works + #ifdef RGB_MATRIX_ENABLE + + case QK_BOOT: + if (record->event.pressed) { + rgb_matrix_set_color_all(RGB_MATRIX_MAXIMUM_BRIGHTNESS, 0, 0); // All red + rgb_matrix_driver.flush(); + } + return true; + + case RGB_TOG: + /* roll through the LED modes + * | Level | Per-key | Underglow | + * |------------|---------|-----------| + * | 0 (defalt) | on | on | + * | 1 | OFF | on | + * | 2 | on | OFF | + * | 3 | OFF | OFF | + */ + if (record->event.pressed) { + if ( (!user_config.rgb_disable_perkey) && (!user_config.rgb_disable_underglow) ) { + user_config.rgb_disable_perkey = 1; + } else if ( user_config.rgb_disable_perkey && (!user_config.rgb_disable_underglow) ) { + user_config.rgb_disable_perkey = 0; + user_config.rgb_disable_underglow = 1; + } else if ( (!user_config.rgb_disable_perkey) && user_config.rgb_disable_underglow ) { + user_config.rgb_disable_perkey = 1; + } else { + user_config.rgb_disable_perkey = 0; + user_config.rgb_disable_underglow = 0; + } + id87_update_rgb_mode(); + } + return false; + + case RGB_TPK: + if (record->event.pressed) { + user_config.rgb_disable_perkey ^= 1; + id87_update_rgb_mode(); + } + return false; + + case RGB_TUG: + if (record->event.pressed) { + user_config.rgb_disable_underglow ^= 1; + id87_update_rgb_mode(); + } + return false; + + case EE_CLR: + if (!record->event.pressed) { // on release + id87_get_rgb_mode(); + } + return true; // let this one pass on + + #endif // RGB_MATRIX_ENABLE + + // print firmware version + case KB_VRSN: + if (!get_mods()) { + if (!record->event.pressed) { + SEND_STRING(QMK_KEYBOARD ":" QMK_KEYMAP " (v" QMK_VERSION ")"); + } + } + return false; + + // @see: https://github.com/qmk/qmk_firmware/issues/10111#issuecomment-752300353 + case KC_MCON: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_WINDOWS); + } else { + host_consumer_send(0); + } + return false; + + case KC_LPAD: + if (record->event.pressed) { + host_consumer_send(_AC_SHOW_ALL_APPS); + } else { + host_consumer_send(0); + } + return false; + + default: + return true; /* Process all other keycodes normally */ + } +} diff --git a/keyboards/idobao/id87/v2/keymaps/idobao/rules.mk b/keyboards/idobao/id87/v2/keymaps/idobao/rules.mk new file mode 100644 index 0000000000..974ef99660 --- /dev/null +++ b/keyboards/idobao/id87/v2/keymaps/idobao/rules.mk @@ -0,0 +1,3 @@ + +LTO_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/idobao/id87/v2/keymaps/via/config.h b/keyboards/idobao/id87/v2/keymaps/via/config.h new file mode 100644 index 0000000000..a1612e6e32 --- /dev/null +++ b/keyboards/idobao/id87/v2/keymaps/via/config.h @@ -0,0 +1,4 @@ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/idobao/id87/v2/keymaps/via/keymap.c b/keyboards/idobao/id87/v2/keymaps/via/keymap.c index e71a924bfd..15e909c7e7 100644 --- a/keyboards/idobao/id87/v2/keymaps/via/keymap.c +++ b/keyboards/idobao/id87/v2/keymaps/via/keymap.c @@ -1,50 +1,81 @@ -/* -Copyright 2020 Tybera -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +// Copyright 2022 Vino Rodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi( - 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, - KC_GRV, 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_INS, KC_HOME, KC_PGUP, - 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, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │Ctrl│GUI │Alt │ │ Alt│ GUI│MO(1│Ctrl│ │ ↠│ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_tkl_ansi( + 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, + KC_GRV, 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_INS, KC_HOME, KC_PGUP, + 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, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │Rst│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hu+│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │Tog│Mod│ │ │ │ │ │ │ │ │ │ │ │ │St-│Hu-│St+│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ │ │mod│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ │ │ │ │ │ │NRO│ │ │ │ │ MO(2) │ │Br+│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ │ │ │ │ │ │ │ │ │Sp-│Br-│Sp+│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ [1] = LAYOUT_tkl_ansi( - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, - _______, BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, - _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC, RGB_MOD + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI, + _______, _______, RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, MO(2), RGB_VAI, + _______, _______, _______, _______, _______, KC_APP, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI ), - [2] = LAYOUT_tkl_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [3] = LAYOUT_tkl_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + + /* + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │M00│M01│M02│M03│M04│M05│M06│M07│M08│M09│M10│ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │M11│M12│M13│M14│M15│M16│ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + MACRO00, MACRO01, MACRO02, MACRO03, MACRO04, MACRO05, MACRO06, MACRO07, MACRO08, MACRO09, MACRO10, _______, _______, _______, _______, _______, _______, + _______, MACRO11, MACRO12, MACRO13, MACRO14, MACRO15, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/idobao/id87/v2/keymaps/via/rules.mk b/keyboards/idobao/id87/v2/keymaps/via/rules.mk index ca9fed0e6b..974ef99660 100644 --- a/keyboards/idobao/id87/v2/keymaps/via/rules.mk +++ b/keyboards/idobao/id87/v2/keymaps/via/rules.mk @@ -1,2 +1,3 @@ + LTO_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/idobao/id87/v2/readme.md b/keyboards/idobao/id87/v2/readme.md index 06a3f2c08a..f689d2175a 100644 --- a/keyboards/idobao/id87/v2/readme.md +++ b/keyboards/idobao/id87/v2/readme.md @@ -1,12 +1,24 @@ -# ID87 v2 +# IDOBAO ID87 v2 -![ID87 v2](https://i.imgur.com/woTSycN.jpg) +![IDOBAO ID87](https://i.imgur.com/LIpWjog.png) -A TKL keyboard with hotswap sockets and in switch RGB. +A TKL hotswap board from IDOBAO. -* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) -* Hardware Supported: ID87 v2 -* Hardware Availability: [Drop](https://drop.com/buy/idobao-id87-v2-tkl-mechanical-keyboard-kit), [idobao](https://idobao.net/products/idobao-id87-v2-tkl-pcb-mounted-hot-swappable-mechanical-keyboard-kit) +## ANSI Support + +* Keyboard Maintainer: [Vino Rodrigues](https://github.com/vinorodrigues) +* Hardware Supported: + - **IDOBAO ID87v2** + - **IDOBAO ID87 Crystal** + - **IDOBAO ID87 Bestype** + - **IDOBAO ID87 Charm** *(Limited Edition)* +* Hardware Availability: [IDOBAO.net](https://idobao.net/search?type=product&q=ID87*) + +## ANSI Layout + +![](https://idobao.github.io/kle/idobao-id87.png) + +## Compiling & Flashing Make example for this keyboard (after setting up your build environment): @@ -22,6 +34,6 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader in 3 ways: -* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Bootmagic reset**: Hold down the [Escape] key *(the top left)* and plug in the keyboard * **Physical reset button**: Briefly press the button on the back of the PCB -* **Keycode in layout**: Press the key mapped to `RESET` if it is available +* **Keycode in layout**: Press the key mapped to `RESET` *(default is [Fn]+[Escape])* diff --git a/keyboards/idobao/id87/v2/rules.mk b/keyboards/idobao/id87/v2/rules.mk index 1d519258e3..eab741fd0a 100644 --- a/keyboards/idobao/id87/v2/rules.mk +++ b/keyboards/idobao/id87/v2/rules.mk @@ -1,22 +1,5 @@ -# MCU name -MCU = atmega32u4 +# This file intentionally left blank +# ** settings are data driven & stored in `info.json` ** -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 - -LAYOUTS = tkl_ansi diff --git a/keyboards/idobao/id87/v2/v2.c b/keyboards/idobao/id87/v2/v2.c index 5bca630ca3..34f0a74669 100644 --- a/keyboards/idobao/id87/v2/v2.c +++ b/keyboards/idobao/id87/v2/v2.c @@ -1,45 +1,83 @@ -// Copyright 2022 peepeetee (@peepeetee) +// Copyright 2022 vinorodrigues (@vinorodrigues) // SPDX-License-Identifier: GPL-2.0-or-later #include "v2.h" -#ifdef RGB_MATRIX_ENABLE +#define __ NO_LED + +#if defined(RGB_MATRIX_ENABLE) + +/* Under-, Per-Key + * ┌───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┬───┠┌───┬───┬───┠+ * │102│ │101│100│99 │98 │ │97 │96 │95 │94 │ │93 │92 │91 │90 │ │89 │88 │87 │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┠┌───┬───┬───┠+ * │70 │71 │72 │73 │74 │75 │76 │77 │78 │79 │80 │81 │82 │ 83 │ │84 │85 │86 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ 69 │68 │67 │66 │65 │64 │63 │62 │61 │60 │59 │58 │57 │ 56 │ │55 │54 │53 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ 40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │50 │51 │ 52 │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┠+ * │ 39 │38 │37 │36 │35 │34 │33 │32 │31 │30 │29 │ 28 │ │27 │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┠+ * │ 16 │ 17 │ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ │24 │25 │26 │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + * + * Underglow (as seen from top) + * ┌───┬───┬───┬───┬───┬───┬───┠+ * │14 │13 │12 │11 │10 │ 9 │ 8 │ + * ├───┼───┴───┴───┴───┴───┼───┤ + * │15 │ │ 7 │ + * ├───┼───┬───┬───┬───┬───┼───┤ + * │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ + * └───┴───┴───┴───┴───┴───┴───┘ +*/ led_config_t g_led_config = { { // Key Matrix to LED Index - { 102, NO_LED, 101, 100, 99, 98, 97, 96, 95 }, //0 - { 70, 71, 72, 73, 74, 75, 76, 77, 78 }, //1 - { 69, 68, 67, 66, 65, 64, 63, 62, 61 }, //2 - { 40, 41, 42, 43, 44, 45, 46, 47, 48 }, //3 - { 39, NO_LED, 38, 37, 36, 35, 34, 33, 32 }, //4 - { 16, 17, 18, 23, 22, NO_LED, 19, 21, 20 }, //5 - { NO_LED, 87, 88, 90, 91, 92, 89, 93, 94 }, //6 - { 80, 86, 85, 83, NO_LED, 82, 84, 81, 79 }, //7 - { NO_LED, 53, 54, 56, 57, 58, 55, 59, 60 }, //8 - { NO_LED, NO_LED, 27, 52, NO_LED, 51, NO_LED, 50, 49 }, //9 - { NO_LED, 26, 25, NO_LED, 28, 29, 24, 30, 31 } //A + // partially generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser & CSV Excel formula + + { 102, __, 101, 100, 99, 98, 97, 96, 95 }, + { 70, 71, 72, 73, 74, 75, 76, 77, 78 }, + { 69, 68, 67, 66, 65, 64, 63, 62, 61 }, + { 40, 41, 42, 43, 44, 45, 46, 47, 48 }, + { 39, __, 38, 37, 36, 35, 34, 33, 32 }, + { 16, 17, 18, 23, 22, __, 19, 21, 20 }, + { __, 87, 88, 90, 91, 92, 89, 93, 94 }, + { 80, 86, 85, 83, __, 82, 84, 81, 79 }, + { __, 53, 54, 56, 57, 58, 55, 59, 60 }, + { __, __, 27, 52, __, 51, __, 50, 49 }, + { __, 26, 25, __, 28, 29, 24, 30, 31 } }, { // LED Index to Physical Position - { 13, 51 },{ 40, 51},{ 73, 51},{ 108, 51},{ 141, 51},{ 174, 51},{ 207, 51}, - { 207, 32}, - { 207, 13},{ 174, 13},{ 141, 13},{ 108, 13},{ 73, 13},{ 40, 13},{ 13, 13}, - { 13, 32}, - -{ 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 }, -{ 205, 49 }, { 165, 49 }, { 142, 49 }, { 130, 49 }, { 118, 49 }, { 106, 49 }, { 94, 49 }, { 82, 49 }, { 70, 49 }, { 58, 49 }, { 46, 49 }, { 34, 49 }, { 14, 49 }, -{ 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, -{ 217, 30 }, { 205, 30 }, { 193, 30 }, { 172, 30 }, { 157, 30 }, { 145, 30 }, { 133, 30 }, { 121, 30 }, { 109, 30 }, { 97, 30 }, { 85, 30 }, { 73, 30 }, { 61, 30 }, { 49, 30 }, { 37, 30 }, { 25, 30 }, { 10, 30 }, -{ 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, -{ 217, 5 }, { 205, 5 }, { 193, 5 }, { 175, 5 }, { 163, 5 }, { 151, 5 }, { 139, 5 }, { 121, 5 }, { 109, 5 }, { 97, 5 }, { 85, 5 }, { 67, 5 }, { 55, 5 }, { 43, 5 }, { 31, 5 },{ 7, 5 }, + // generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser + // underglow + /* colors are pushed to the edge as only the edges can be seen */ + { 0,64 }, { 37,64 }, { 75,64 }, {112,64 }, {149,64 }, {187,64 }, {224,64 }, + {224,32 }, + {224,0 }, {187,0 }, {149,0 }, {112,0 }, { 75,0 }, { 37,0 }, { 0,0 }, + { 0,32 }, + // under-, per-key + /* pattern is complex; starts at btm-lft, zig-zags up, and ends top-lft */ + { 2,64 }, { 18,64 }, { 34,64 }, { 83,64 }, {131,64 }, {148,64 }, {164,64 }, {180,64 }, {198,64 }, {211,64 }, {224,64 }, // lf-2-rt, btm + {211,52 }, {170,52 }, {146,52 }, {133,52 }, {120,52 }, {107,52 }, { 94,52 }, { 81,52 }, { 68,52 }, { 55,52 }, { 42,52 }, { 29,52 }, { 8,52 }, // rt-2-lf** + { 5,40 }, { 23,40 }, { 36,40 }, { 49,40 }, { 62,40 }, { 75,40 }, { 88,40 }, {101,40 }, {114,40 }, {127,40 }, {140,40 }, {153,40 }, {174,40 }, // lf-2-rt + {224,27 }, {211,27 }, {198,27 }, {179,27 }, {162,27 }, {149,27 }, {136,27 }, {123,27 }, {110,27 }, { 97,27 }, { 84,27 }, { 71,27 }, { 58,27 }, { 45,27 }, { 32,27 }, { 19,27 }, { 3,27 }, // rt-2-lf** + { 0,15 }, { 13,15 }, { 26,15 }, { 39,15 }, { 52,15 }, { 65,15 }, { 78,15 }, { 91,15 }, {104,15 }, {117,15 }, {130,15 }, {143,15 }, {156,15 }, {175,15 }, {198,15 }, {211,15 }, {224,15 }, // lf-2-rt + {224,0 }, {211,0 }, {198,0 }, {182,0 }, {169,0 }, {156,0 }, {143,0 }, {123,0 }, {110,0 }, { 97,0 }, { 84,0 }, { 65,0 }, { 52,0 }, { 39,0 }, { 26,0 }, { 0,0 }, // rt-2-lf**, top }, { // LED Index to Flag -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - -1,1,1,4,1,1,1,1,1,1,1, -1,1,4,4,4,4,4,4,4,4,4,4,1, -9,4,4,4,4,4,4,4,4,4,4,4,1, -1,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,1, -4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1, -1,9,1,4,4,4,4,1,1,1,1,4,4,4,4,1 + // underglow + 2, 2, 2, 2, 2, 2, 2, + 2, + 2, 2, 2, 2, 2, 2, 2, + 2, + // under-, per-key + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }; -#endif +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/idobao/id87/v2/v2.h b/keyboards/idobao/id87/v2/v2.h index 1a75d95755..38b3c9dfda 100644 --- a/keyboards/idobao/id87/v2/v2.h +++ b/keyboards/idobao/id87/v2/v2.h @@ -1,40 +1,6 @@ -/* -Copyright 2020 Tybera -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +// Copyright 2022 vinorodrigues (@vinorodrigues) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "quantum.h" - -#define LAYOUT_tkl_ansi( \ - K00, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ - K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ - K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ -) { \ - { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ - { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58 }, \ - { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ - { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ - { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ - { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ - { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ -} - - diff --git a/keyboards/idobao/id96/config.h b/keyboards/idobao/id96/config.h index 3b0d9afc16..444464019b 100644 --- a/keyboards/idobao/id96/config.h +++ b/keyboards/idobao/id96/config.h @@ -27,7 +27,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/idobao/montex/v1/config.h b/keyboards/idobao/montex/v1/config.h index c21dda65a7..6cd45b2598 100644 --- a/keyboards/idobao/montex/v1/config.h +++ b/keyboards/idobao/montex/v1/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, D6, D7, B4, B5, C6 } #define MATRIX_COL_PINS { D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/illuminati/is0/config.h b/keyboards/illuminati/is0/config.h index 9416fd592f..f589733388 100644 --- a/keyboards/illuminati/is0/config.h +++ b/keyboards/illuminati/is0/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2 } #define MATRIX_COL_PINS { D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/illusion/rosa/config.h b/keyboards/illusion/rosa/config.h index 16f5198907..1bfc08c8c8 100644 --- a/keyboards/illusion/rosa/config.h +++ b/keyboards/illusion/rosa/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D4, F0, B0, B1 } #define MATRIX_COL_PINS { D0, D2, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ilumkb/primus75/config.h b/keyboards/ilumkb/primus75/config.h index 3abd1b219a..2751eaea6c 100644 --- a/keyboards/ilumkb/primus75/config.h +++ b/keyboards/ilumkb/primus75/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, F5, D4, B1, B0, B5, B4, D7, D6, B3, F4, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ilumkb/simpler61/config.h b/keyboards/ilumkb/simpler61/config.h index 26b7f603d4..0b952c25e5 100644 --- a/keyboards/ilumkb/simpler61/config.h +++ b/keyboards/ilumkb/simpler61/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D4, D6, D7, B4, B5, B6, C6, C7, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ilumkb/simpler64/config.h b/keyboards/ilumkb/simpler64/config.h index 475e0d63c9..324745efa8 100644 --- a/keyboards/ilumkb/simpler64/config.h +++ b/keyboards/ilumkb/simpler64/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D4, D6, D7, B4, B5, B6, C6, C7, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ilumkb/volcano660/config.h b/keyboards/ilumkb/volcano660/config.h index a64bcf64ba..7936e968b7 100644 --- a/keyboards/ilumkb/volcano660/config.h +++ b/keyboards/ilumkb/volcano660/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h index 2602dc8286..af9c4ecbe2 100644 --- a/keyboards/inett_studio/sqx/hotswap/config.h +++ b/keyboards/inett_studio/sqx/hotswap/config.h @@ -25,7 +25,6 @@ #define MATRIX_COLS 14 #define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h index 921f2b85ec..8c2405e644 100644 --- a/keyboards/inett_studio/sqx/universal/config.h +++ b/keyboards/inett_studio/sqx/universal/config.h @@ -25,7 +25,6 @@ #define MATRIX_COLS 14 #define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h index 458b2d1042..00dd0bd1f3 100644 --- a/keyboards/input_club/ergodox_infinity/config.h +++ b/keyboards/input_club/ergodox_infinity/config.h @@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // For some reason, the rows are colums in the schematic, and vice versa #define MATRIX_ROW_PINS { B2, B3, B18, B19, C0, C9, C10, C11, D0 } #define MATRIX_COL_PINS { D1, D4, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c index cd65001803..6f9967b46e 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c index c321d546fb..50e3238a7d 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c @@ -335,7 +335,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_on(); ergodox_led_all_on(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c index 3870dd8ffd..c8498fe9e9 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c @@ -492,7 +492,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c index 545429fca0..e941cee154 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c @@ -223,7 +223,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c index dd721e9a78..184eb638c9 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c @@ -659,7 +659,7 @@ void matrix_setup(void) { } void matrix_scan_user(void) { - // uint8_t layer = biton32(layer_state); + // uint8_t layer = get_highest_layer(layer_state); // ergodox_board_led_off(); // ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c index d08b96cc6e..70f49bb5c9 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -221,7 +221,7 @@ void matrix_init_user(void){ // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c index e31c1c5d6b..b202823c77 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c @@ -179,7 +179,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c index 31d218ebfb..c322222baf 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c @@ -309,7 +309,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c index 02f409ad9e..bbc24ea27f 100644 --- a/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c +++ b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c @@ -137,7 +137,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c b/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c index 3c2e0d4da8..a19be6664c 100644 --- a/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/input_club/infinity60/keymaps/jpetermans/keymap.c @@ -239,7 +239,7 @@ void matrix_scan_user(void) { //Turn on layer indicator or page depending on mode switch(led_mode_global) { case MODE_FLASH: //flash preset page leds then single indicator - page = biton32(layer_state) > max_pages ? 7 : biton32(layer_state); + page = get_highest_layer(layer_state) > max_pages ? 7 : get_highest_layer(layer_state); msg=(page << 8) | DISPLAY_PAGE; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); chThdSleepMilliseconds(500); @@ -254,7 +254,7 @@ void matrix_scan_user(void) { break; case MODE_PAGE: //display pre-defined led page - page = biton32(layer_state) > max_pages ? 7 : biton32(layer_state); + page = get_highest_layer(layer_state) > max_pages ? 7 : get_highest_layer(layer_state); msg=(page << 8) | DISPLAY_PAGE; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); break; diff --git a/keyboards/input_club/infinity60/led/config.h b/keyboards/input_club/infinity60/led/config.h index 5bd3b590b9..301003e8b9 100644 --- a/keyboards/input_club/infinity60/led/config.h +++ b/keyboards/input_club/infinity60/led/config.h @@ -20,4 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { D1, D2, D3, D4, D5, D6, D7 } #define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5, C6, C7, D0 } -#define UNUSED_PINS diff --git a/keyboards/input_club/infinity60/rev1/config.h b/keyboards/input_club/infinity60/rev1/config.h index d4ab34bccc..1207dffc78 100644 --- a/keyboards/input_club/infinity60/rev1/config.h +++ b/keyboards/input_club/infinity60/rev1/config.h @@ -20,6 +20,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { D1, D2, D3, D4, D5, D6, D7 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B16, B17, C4, C5, D0 } -#define UNUSED_PINS diff --git a/keyboards/input_club/k_type/config.h b/keyboards/input_club/k_type/config.h index d55bf89236..12cda14a3a 100644 --- a/keyboards/input_club/k_type/config.h +++ b/keyboards/input_club/k_type/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D6, D7, C1, C2, C3, C4, C5, C6, C7 } #define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, D0, D1, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h index fde568ddae..2c2e8c6324 100644 --- a/keyboards/input_club/whitefox/config.h +++ b/keyboards/input_club/whitefox/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D4, D5, D6, D7, C1, C2 } #define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, C10, C11 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/io_mini1800/config.h b/keyboards/io_mini1800/config.h index 88636c2825..3190c1bb45 100644 --- a/keyboards/io_mini1800/config.h +++ b/keyboards/io_mini1800/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { D6, D7, B4, B5, D4, E6, B3, D2, D5, D3 } #define MATRIX_COL_PINS { D1, D0, B7, B2, F0, F1, F7, F6, F4, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/irene/config.h b/keyboards/irene/config.h index 9b745d1c1d..9eb72dcc11 100644 --- a/keyboards/irene/config.h +++ b/keyboards/irene/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, F0, C7, B4, B7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B6, B5, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/iriskeyboards/config.h b/keyboards/iriskeyboards/config.h index 2d06e9f05c..e761d76895 100644 --- a/keyboards/iriskeyboards/config.h +++ b/keyboards/iriskeyboards/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, D4, D6, D7, B4, B5, B6, C6, C7, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/j80/config.h b/keyboards/j80/config.h index 1ad00356fe..dbf277bc4e 100644 --- a/keyboards/j80/config.h +++ b/keyboards/j80/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B2, B3, B5, B6, B7, B0 } #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, A0 } -#define UNUSED_PINS { B4, C1, C0, D0, D1, D2, D3, D4, D5, D6, D7 } #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/jacky_studio/s7_elephant/rev1/config.h b/keyboards/jacky_studio/s7_elephant/rev1/config.h index 96f8d57ede..b4de22c83e 100644 --- a/keyboards/jacky_studio/s7_elephant/rev1/config.h +++ b/keyboards/jacky_studio/s7_elephant/rev1/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jadookb/jkb2/config.h b/keyboards/jadookb/jkb2/config.h index 21ec68ad9b..ec9deec35c 100644 --- a/keyboards/jadookb/jkb2/config.h +++ b/keyboards/jadookb/jkb2/config.h @@ -21,6 +21,5 @@ #define MATRIX_ROW_PINS { B1 } #define MATRIX_COL_PINS { B3 ,B2} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jadookb/jkb2/keymaps/via/config.h b/keyboards/jadookb/jkb2/keymaps/via/config.h deleted file mode 100644 index 31022ca535..0000000000 --- a/keyboards/jadookb/jkb2/keymaps/via/config.h +++ /dev/null @@ -1,19 +0,0 @@ - - /* Copyright 2021 Wizard-GG - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/jadookb/jkb65/config.h b/keyboards/jadookb/jkb65/config.h index dae3cea49a..b7f754c3de 100644 --- a/keyboards/jadookb/jkb65/config.h +++ b/keyboards/jadookb/jkb65/config.h @@ -30,7 +30,6 @@ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6,B1,F1,C7,C6,B6,B5,B4,D7,B3,D4,D5,D3,D2,D1,D0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jadookb/jkb65/keymaps/via/config.h b/keyboards/jadookb/jkb65/keymaps/via/config.h deleted file mode 100644 index 9d4eaf74ee..0000000000 --- a/keyboards/jadookb/jkb65/keymaps/via/config.h +++ /dev/null @@ -1,19 +0,0 @@ - /* Copyright 2021 Wizard-GG - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/jae/j01/config.h b/keyboards/jae/j01/config.h index 1804dfeb4e..4f94a69603 100644 --- a/keyboards/jae/j01/config.h +++ b/keyboards/jae/j01/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B2, B1, B3, B0, D0} #define MATRIX_COL_PINS {D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jagdpietr/drakon/config.h b/keyboards/jagdpietr/drakon/config.h index e6c205e61c..cab8ec9d05 100644 --- a/keyboards/jagdpietr/drakon/config.h +++ b/keyboards/jagdpietr/drakon/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, B5, B6, B0, B1, F1 } #define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B2, B3, B7, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index f4b4963236..d59d30a12e 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* QMK JC65 PCB default pin-out */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B2 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c index 7572b9e073..453cd2360d 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c @@ -224,7 +224,7 @@ void matrix_scan_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _BL: custom_backlight_level(0); rgblight_sethsv_noeeprom(180,100,255); diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 3645e86984..340123270e 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F5, B4 } #define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index ec4628fccb..a1b59f236f 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { F0, F1, F5, B4 } #define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/jm60/config.h b/keyboards/jm60/config.h index d3b5ec7243..bee9ee0ac0 100644 --- a/keyboards/jm60/config.h +++ b/keyboards/jm60/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B11, B10, B2, B1, B0 } #define MATRIX_COL_PINS { A15, C10, C11, C12, D2, B3, B4, B5, B6, B7, B8, B9, A2, A3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/jolofsor/denial75/config.h b/keyboards/jolofsor/denial75/config.h index a5d8b9fe59..4e7852dbc1 100644 --- a/keyboards/jolofsor/denial75/config.h +++ b/keyboards/jolofsor/denial75/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { F7, C7, C6, B5, B4, D7, D6, D4, E6, B1, B2, B3, B7, D0, D1, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/jones/v03/config.h b/keyboards/jones/v03/config.h index 9123005ac4..2c44bbd6bd 100644 --- a/keyboards/jones/v03/config.h +++ b/keyboards/jones/v03/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Same pins for Jones' custom Round-Robin matrix. #define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } #define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. diff --git a/keyboards/jones/v03/keymaps/default_jp/config.h b/keyboards/jones/v03/keymaps/default_jp/config.h index aa06121c1c..7545003ac7 100644 --- a/keyboards/jones/v03/keymaps/default_jp/config.h +++ b/keyboards/jones/v03/keymaps/default_jp/config.h @@ -21,3 +21,4 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/jones/v03/keymaps/default_jp/keymap.c b/keyboards/jones/v03/keymaps/default_jp/keymap.c index 3f5b10208c..bdcb9e88b1 100644 --- a/keyboards/jones/v03/keymaps/default_jp/keymap.c +++ b/keyboards/jones/v03/keymaps/default_jp/keymap.c @@ -51,9 +51,18 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data); // Tap Dance definitions qk_tap_dance_action_t tap_dance_actions[] = { [TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), - [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275), + [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_ESC_NUM): + return 275; + default: + return TAPPING_TERM; + } +} + // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { MAC = SAFE_RANGE, @@ -303,7 +312,7 @@ static tap ql_tap_state = { // Functions that control what our tap dance key does void ql_finished(qk_tap_dance_state_t *state, void *user_data) { ql_tap_state.state = cur_dance(state); - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // ESC key action switch (ql_tap_state.state) { case SINGLE_TAP: @@ -332,7 +341,7 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) { } void ql_reset(qk_tap_dance_state_t *state, void *user_data) { - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // If the key was held down and now is released then switch off the layer if (ql_tap_state.state == TAP_HOLD) { diff --git a/keyboards/jones/v03_1/config.h b/keyboards/jones/v03_1/config.h index e73bb22850..9359b0a51b 100644 --- a/keyboards/jones/v03_1/config.h +++ b/keyboards/jones/v03_1/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Same pins for Jones' custom Round-Robin matrix. #define MATRIX_ROW_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } #define MATRIX_COL_PINS { D4, D7, C7, F1, F4, F5, D6, D5, E6, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // No need to define DIODE_DIRECTION for Jones' custom Round-Robin matrix. diff --git a/keyboards/jones/v03_1/keymaps/default_ansi/config.h b/keyboards/jones/v03_1/keymaps/default_ansi/config.h index 0b51190bbe..ee7b09a90c 100644 --- a/keyboards/jones/v03_1/keymaps/default_ansi/config.h +++ b/keyboards/jones/v03_1/keymaps/default_ansi/config.h @@ -21,6 +21,7 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY // music map for music-mode #define MUSIC_MAP diff --git a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c index 5b1486bb86..a592418c4d 100644 --- a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c +++ b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c @@ -50,9 +50,18 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data); // Tap Dance definitions qk_tap_dance_action_t tap_dance_actions[] = { [TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), - [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275), + [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_ESC_NUM): + return 275; + default: + return TAPPING_TERM; + } +} + // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { MAC = SAFE_RANGE, @@ -244,7 +253,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } } if (index == 1) { /* Second encoder, Left side */ - switch(biton32(layer_state)) { + switch(get_highest_layer(layer_state)) { case _LOWER: if (clockwise) { rgblight_decrease_hue(); @@ -322,7 +331,7 @@ static tap ql_tap_state = { // Functions that control what our tap dance key does void ql_finished(qk_tap_dance_state_t *state, void *user_data) { ql_tap_state.state = cur_dance(state); - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // ESC key action switch (ql_tap_state.state) { case SINGLE_TAP: @@ -351,7 +360,7 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) { } void ql_reset(qk_tap_dance_state_t *state, void *user_data) { - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // If the key was held down and now is released then switch off the layer if (ql_tap_state.state == TAP_HOLD) { diff --git a/keyboards/jones/v03_1/keymaps/default_jp/config.h b/keyboards/jones/v03_1/keymaps/default_jp/config.h index 0b51190bbe..ee7b09a90c 100644 --- a/keyboards/jones/v03_1/keymaps/default_jp/config.h +++ b/keyboards/jones/v03_1/keymaps/default_jp/config.h @@ -21,6 +21,7 @@ // time for long press #define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY // music map for music-mode #define MUSIC_MAP diff --git a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c index 436586a721..56f51d56ce 100644 --- a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c +++ b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c @@ -51,9 +51,18 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data); // Tap Dance definitions qk_tap_dance_action_t tap_dance_actions[] = { [TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), - [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275), + [TD_ESC_NUM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_ESC_NUM): + return 275; + default: + return TAPPING_TERM; + } +} + // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { MAC = SAFE_RANGE, @@ -246,7 +255,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } } if (index == 1) { /* Second encoder, Left side */ - switch(biton32(layer_state)) { + switch(get_highest_layer(layer_state)) { case _LOWER: if (clockwise) { rgblight_decrease_hue(); @@ -324,7 +333,7 @@ static tap ql_tap_state = { // Functions that control what our tap dance key does void ql_finished(qk_tap_dance_state_t *state, void *user_data) { ql_tap_state.state = cur_dance(state); - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // ESC key action switch (ql_tap_state.state) { case SINGLE_TAP: @@ -353,7 +362,7 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) { } void ql_reset(qk_tap_dance_state_t *state, void *user_data) { - switch(state->keycode) { + switch(TAP_DANCE_KEYCODE(state)) { case TD(TD_ESC_NUM): // If the key was held down and now is released then switch off the layer if (ql_tap_state.state == TAP_HOLD) { diff --git a/keyboards/jorne/rev1/config.h b/keyboards/jorne/rev1/config.h index 7144d9fe0a..89f1ce29e9 100644 --- a/keyboards/jorne/rev1/config.h +++ b/keyboards/jorne/rev1/config.h @@ -17,7 +17,6 @@ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/k34/config.h b/keyboards/k34/config.h index 692940a16d..b7cbe618c2 100644 --- a/keyboards/k34/config.h +++ b/keyboards/k34/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F4, B2, E6, B4 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, F5, F6, F7, B1, B3 } -#define UNUSED_PINS { B5, B6, D2, D3 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kabedon/kabedon980/config.h b/keyboards/kabedon/kabedon980/config.h index 7da74f6c92..ad667ae252 100644 --- a/keyboards/kabedon/kabedon980/config.h +++ b/keyboards/kabedon/kabedon980/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS {D0,D2,F7,B1,B0,D6,C7,D7,B5,B2} #define MATRIX_COL_PINS {F5,F4,F6,C6,B6,B4,D3,D1,D4,F1,B3,D5,F0} -#define UNUSED_PINS #define DYNAMIC_KEYMAP_LAYER_COUNT 3 /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kagizaraya/chidori/config.h b/keyboards/kagizaraya/chidori/config.h index 69ec346794..90de362e8b 100644 --- a/keyboards/kagizaraya/chidori/config.h +++ b/keyboards/kagizaraya/chidori/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS \ { F1, F0, B0 } */ -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kagizaraya/halberd/config.h b/keyboards/kagizaraya/halberd/config.h index a559f1a1fe..932c8cac3a 100644 --- a/keyboards/kagizaraya/halberd/config.h +++ b/keyboards/kagizaraya/halberd/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D6, D4, D5, E6 } #define MATRIX_COL_PINS { D7, B4, C7, C6, B6, B5, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kagizaraya/scythe/config.h b/keyboards/kagizaraya/scythe/config.h index 36515c172f..1df0fb6593 100644 --- a/keyboards/kagizaraya/scythe/config.h +++ b/keyboards/kagizaraya/scythe/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F4, D5 } #define MATRIX_COL_PINS { D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/kakunpc/angel17/alpha/config.h b/keyboards/kakunpc/angel17/alpha/config.h index 192464c216..23f64f5376 100644 --- a/keyboards/kakunpc/angel17/alpha/config.h +++ b/keyboards/kakunpc/angel17/alpha/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/angel17/rev1/config.h b/keyboards/kakunpc/angel17/rev1/config.h index f042a089c4..f3ee158546 100644 --- a/keyboards/kakunpc/angel17/rev1/config.h +++ b/keyboards/kakunpc/angel17/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/angel64/alpha/config.h b/keyboards/kakunpc/angel64/alpha/config.h index 6f17407e8a..796bd9dc51 100644 --- a/keyboards/kakunpc/angel64/alpha/config.h +++ b/keyboards/kakunpc/angel64/alpha/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c index 0f2a8dada1..92dfa7da6e 100644 --- a/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c +++ b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case BASE: oled_write_P(PSTR("Default\n"), false); break; diff --git a/keyboards/kakunpc/angel64/rev1/config.h b/keyboards/kakunpc/angel64/rev1/config.h index 6f17407e8a..796bd9dc51 100644 --- a/keyboards/kakunpc/angel64/rev1/config.h +++ b/keyboards/kakunpc/angel64/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c index 6c5184c1b3..601bf5f02f 100644 --- a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c +++ b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c @@ -175,7 +175,7 @@ void matrix_scan_user(void) { #ifdef OLED_ENABLE bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case BASE: oled_write_P(PSTR("Default\n"), false); break; diff --git a/keyboards/kakunpc/business_card/alpha/config.h b/keyboards/kakunpc/business_card/alpha/config.h index 62c3bc180e..9673d0328e 100644 --- a/keyboards/kakunpc/business_card/alpha/config.h +++ b/keyboards/kakunpc/business_card/alpha/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B6 } #define MATRIX_COL_PINS { E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/business_card/beta/config.h b/keyboards/kakunpc/business_card/beta/config.h index f91c78f3bd..3f78333468 100644 --- a/keyboards/kakunpc/business_card/beta/config.h +++ b/keyboards/kakunpc/business_card/beta/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B6 } #define MATRIX_COL_PINS { B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/choc_taro/config.h b/keyboards/kakunpc/choc_taro/config.h index c4d1ac1eda..5ccbbee0cd 100644 --- a/keyboards/kakunpc/choc_taro/config.h +++ b/keyboards/kakunpc/choc_taro/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/kakunpc/rabbit_capture_plan/config.h b/keyboards/kakunpc/rabbit_capture_plan/config.h index 9324d3e739..89aaf90ee3 100644 --- a/keyboards/kakunpc/rabbit_capture_plan/config.h +++ b/keyboards/kakunpc/rabbit_capture_plan/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/suihankey/alpha/config.h b/keyboards/kakunpc/suihankey/alpha/config.h index 00f04c0d32..2d20aa16e9 100644 --- a/keyboards/kakunpc/suihankey/alpha/config.h +++ b/keyboards/kakunpc/suihankey/alpha/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -#define UNUSED_PINS // #define USE_I2C // #undef USE_SERIAL diff --git a/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c index b682f0f15d..d937b68813 100644 --- a/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c +++ b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case BASE: oled_write_P(PSTR("Default\n"), false); break; diff --git a/keyboards/kakunpc/suihankey/rev1/config.h b/keyboards/kakunpc/suihankey/rev1/config.h index 3ff2fdb27b..a1e7183124 100644 --- a/keyboards/kakunpc/suihankey/rev1/config.h +++ b/keyboards/kakunpc/suihankey/rev1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -#define UNUSED_PINS //#define USE_I2C //#undef USE_SERIAL diff --git a/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c index b682f0f15d..d937b68813 100644 --- a/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c +++ b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case BASE: oled_write_P(PSTR("Default\n"), false); break; diff --git a/keyboards/kakunpc/suihankey/split/alpha/config.h b/keyboards/kakunpc/suihankey/split/alpha/config.h index 4131283166..df5a855671 100644 --- a/keyboards/kakunpc/suihankey/split/alpha/config.h +++ b/keyboards/kakunpc/suihankey/split/alpha/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -#define UNUSED_PINS #define USE_I2C #undef USE_SERIAL diff --git a/keyboards/kakunpc/suihankey/split/rev1/config.h b/keyboards/kakunpc/suihankey/split/rev1/config.h index 83dc587e57..097a80a39d 100644 --- a/keyboards/kakunpc/suihankey/split/rev1/config.h +++ b/keyboards/kakunpc/suihankey/split/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -#define UNUSED_PINS #define USE_I2C #undef USE_SERIAL diff --git a/keyboards/kakunpc/thedogkeyboard/config.h b/keyboards/kakunpc/thedogkeyboard/config.h index 51ae24ae03..a0cfbc6405 100644 --- a/keyboards/kakunpc/thedogkeyboard/config.h +++ b/keyboards/kakunpc/thedogkeyboard/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } -#define UNUSED_PINS /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/kapcave/gskt00/config.h b/keyboards/kapcave/gskt00/config.h index 3730df5ea3..5a77496032 100755 --- a/keyboards/kapcave/gskt00/config.h +++ b/keyboards/kapcave/gskt00/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F1, D1, D2, D4, D6, F7, B0, F4 } #define MATRIX_COL_PINS { F6, D7, F5, C7, B4, C6, B6, B5 } -#define UNUSED_PINS #define BOOTMAGIC_LITE_ROW 3 #define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/kapcave/paladin64/config.h b/keyboards/kapcave/paladin64/config.h index 37fee46aaa..4ab6863c4f 100755 --- a/keyboards/kapcave/paladin64/config.h +++ b/keyboards/kapcave/paladin64/config.h @@ -84,7 +84,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, B0, D3 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb58/config.h b/keyboards/kb58/config.h index ea1aad06e2..b50f1021af 100644 --- a/keyboards/kb58/config.h +++ b/keyboards/kb58/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F5, F6, F7, B1, D7, D4, D0 } #define MATRIX_ROW_PINS_RIGHT { F7, B5, B3, B2, B6 } #define MATRIX_COL_PINS_RIGHT { F6, B1, E6, D7, C6, D4, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h index 5251a5d91e..345195b428 100644 --- a/keyboards/kb_elmo/aek2_usb/config.h +++ b/keyboards/kb_elmo/aek2_usb/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, C1, C4, D0, C3, C2, B3, B4 } #define MATRIX_COL_PINS { A1, A0, A2, A3, A4, A5, A6, A7, C7, C6, C5, C0, D6, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/elmopad/config.h b/keyboards/kb_elmo/elmopad/config.h index de2711bbc3..4581fbf94f 100644 --- a/keyboards/kb_elmo/elmopad/config.h +++ b/keyboards/kb_elmo/elmopad/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C5, C4, B2, B1, D7, B0 } #define MATRIX_COL_PINS { C0, C1, C2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/isolation/config.h b/keyboards/kb_elmo/isolation/config.h index 493714310a..6088cd5de2 100644 --- a/keyboards/kb_elmo/isolation/config.h +++ b/keyboards/kb_elmo/isolation/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* direct key pin */ #define DIRECT_PINS {{ B0 }} -#define UNUSED_PINS /* RGB backlight */ #define RGB_DI_PIN B2 diff --git a/keyboards/kb_elmo/m0110a_usb/config.h b/keyboards/kb_elmo/m0110a_usb/config.h index 18a3a405d7..4509b76933 100644 --- a/keyboards/kb_elmo/m0110a_usb/config.h +++ b/keyboards/kb_elmo/m0110a_usb/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, D5 } #define MATRIX_COL_PINS { D7, C0, C1, C2, C3, D1, B4, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/m0116_usb/config.h b/keyboards/kb_elmo/m0116_usb/config.h index 28c82ddb33..7d3581efff 100644 --- a/keyboards/kb_elmo/m0116_usb/config.h +++ b/keyboards/kb_elmo/m0116_usb/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, A0, B2, A2, A1 } #define MATRIX_COL_PINS { D6, D5, D1, D0, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/noah_avr/config.h b/keyboards/kb_elmo/noah_avr/config.h index 07dec2e1c1..6c462d7176 100644 --- a/keyboards/kb_elmo/noah_avr/config.h +++ b/keyboards/kb_elmo/noah_avr/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B4, B6, D7, D5, D0 } #define MATRIX_COL_PINS { D1, D2, D3, D4, C6, C7, F7, F6, F5, F4, F0, F1, B3, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/sesame/config.h b/keyboards/kb_elmo/sesame/config.h index 20e19ea60d..432bb769c3 100644 --- a/keyboards/kb_elmo/sesame/config.h +++ b/keyboards/kb_elmo/sesame/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C4, C5, C6, C7, A7 } #define MATRIX_COL_PINS { D1, D5, D6, D7, C0, C1, C2, C3, A6, A5, A4, A3, A2, A1, A0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kb_elmo/vertex/config.h b/keyboards/kb_elmo/vertex/config.h index b532b63745..9bf46423b4 100644 --- a/keyboards/kb_elmo/vertex/config.h +++ b/keyboards/kb_elmo/vertex/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D2, D4, B7, C6 } #define MATRIX_COL_PINS { C4, C7, D3, D5, B6, D6, B5, B0, B4, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdclack/kaishi65/config.h b/keyboards/kbdclack/kaishi65/config.h index 52b86d3f12..aa8c1e4dd0 100644 --- a/keyboards/kbdclack/kaishi65/config.h +++ b/keyboards/kbdclack/kaishi65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 } #define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/baguette66/rgb/config.h b/keyboards/kbdfans/baguette66/rgb/config.h index 27c8fbc0e5..4f23460964 100644 --- a/keyboards/kbdfans/baguette66/rgb/config.h +++ b/keyboards/kbdfans/baguette66/rgb/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, F4, F5, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, B0, B1, B2, B3, D0, D1, D2, D3, D5, D4, D6} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/baguette66/soldered/config.h b/keyboards/kbdfans/baguette66/soldered/config.h index 624dfadca8..0d96871a74 100644 --- a/keyboards/kbdfans/baguette66/soldered/config.h +++ b/keyboards/kbdfans/baguette66/soldered/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, F4, F5, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, B0, B1, B2, B3, D0, D1, D2, D3, D5, D4, D6} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index 74c8c99ed5..837701c7c4 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -22,7 +22,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index ac2cba6036..b1024b4e21 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -22,7 +22,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bella/soldered/config.h b/keyboards/kbdfans/bella/soldered/config.h index 5992ddaa2c..3f499624b9 100755 --- a/keyboards/kbdfans/bella/soldered/config.h +++ b/keyboards/kbdfans/bella/soldered/config.h @@ -22,7 +22,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, D1, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h index 726e7b2962..2d4cbe4e85 100644 --- a/keyboards/kbdfans/boop65/rgb/config.h +++ b/keyboards/kbdfans/boop65/rgb/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, F4, E6, C6 } #define MATRIX_COL_PINS { F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bounce/75/hotswap/config.h b/keyboards/kbdfans/bounce/75/hotswap/config.h index 95e7bc3052..7921b12edb 100644 --- a/keyboards/kbdfans/bounce/75/hotswap/config.h +++ b/keyboards/kbdfans/bounce/75/hotswap/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bounce/75/soldered/config.h b/keyboards/kbdfans/bounce/75/soldered/config.h index f21ddb9d0b..b0ad114346 100644 --- a/keyboards/kbdfans/bounce/75/soldered/config.h +++ b/keyboards/kbdfans/bounce/75/soldered/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/bounce/pad/config.h b/keyboards/kbdfans/bounce/pad/config.h index aee424ac39..dab7f6f9fe 100644 --- a/keyboards/kbdfans/bounce/pad/config.h +++ b/keyboards/kbdfans/bounce/pad/config.h @@ -21,7 +21,6 @@ #define MATRIX_COLS 4 #define MATRIX_ROW_PINS { C7, B7, B6, B0, B1, B2 } #define MATRIX_COL_PINS { B5, B4, D0, C2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define LED_NUM_LOCK_PIN C6 #define LED_PIN_ON_STATE 1 diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 436ceb4b1c..675128d354 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B7, B3, E6, F0, D5, D4, D6, C7 } #define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index 70c4683242..a2da25a983 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index 9737a9c6d8..4c2cb170d8 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, F0, F1, D4 } // From qmkeyboard.cn #define MATRIX_COL_PINS { C6, C7, E2, F5, F6, F4, D3, D2, D5, D0, D1, B4, D7, D6, E6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index 1fca508a87..d22de44672 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/config.h b/keyboards/kbdfans/kbd67/mkii_soldered/config.h index f955e82c6f..0af4b7ad7b 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/config.h +++ b/keyboards/kbdfans/kbd67/mkii_soldered/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h index 25f645f734..bb3409256c 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/config.h @@ -16,8 +16,6 @@ #pragma once /* place overrides here */ -#undef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 #undef DEBOUNCE #define DEBOUNCE 8 #undef TAPPING_TOGGLE diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h index 2cd513223a..cda14c4bc0 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h @@ -19,9 +19,6 @@ /* 1000Hz USB polling */ #define USB_POLLING_INTERVAL_MS 1 -/* Send up to 4 key press events per scan */ -#define QMK_KEYS_PER_SCAN 4 - /* Force NKRO on boot up */ #define FORCE_NKRO diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h index 23b0a8a30c..b2b4ec3ce6 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h @@ -30,7 +30,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, F4, E6, C6 } #define MATRIX_COL_PINS { F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h index a63a3ee61b..b6311715fd 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/config.h @@ -30,7 +30,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { B1, F1, B2, B3, C6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, B0, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/mkiirgb_iso/config.h b/keyboards/kbdfans/kbd67/mkiirgb_iso/config.h index 03b806821f..415da00b48 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb_iso/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb_iso/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { B1, F1, B2, B3, C6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, B0, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index dbe7f03503..145a928e22 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h index 9a68b4b08e..f156afd9b1 100644 --- a/keyboards/kbdfans/kbd67/rev2/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index e7160abd95..7eb6019c74 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c index 6bbbdd87c1..ce341509a6 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c @@ -38,7 +38,7 @@ void eeconfig_init_user(void) { #define DE_UDIA_CAP UC(0x00DC) layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case NM_MODE: rgblight_setrgb (0x00, 0x66, 0x00); break; @@ -187,4 +187,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______ ), }; - diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index b54ce4d24c..ae8a1ee478 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -17,7 +17,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, F5, D4, B1, B0, B5, B4, D7, D6, B3, F4, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 998f1a25d2..5a6d760355 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case WINDOWS_LAYER: rgblight_setrgb_blue(); break; diff --git a/keyboards/kbdfans/kbd75hs/config.h b/keyboards/kbdfans/kbd75hs/config.h index a06de0dda8..6cb9064461 100644 --- a/keyboards/kbdfans/kbd75hs/config.h +++ b/keyboards/kbdfans/kbd75hs/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd75rgb/config.h b/keyboards/kbdfans/kbd75rgb/config.h index 2499c25933..85ad8150da 100644 --- a/keyboards/kbdfans/kbd75rgb/config.h +++ b/keyboards/kbdfans/kbd75rgb/config.h @@ -30,7 +30,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, F1, B0, B1, B2, C6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, E6, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index 33376c800a..e37124632b 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, D4, F0, D6, D7 } #define MATRIX_COL_PINS { D1, D0, F7, F6, F5, D5, D3, D2, C7, C6, B5, F4, F1, B4, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbd8x_mk2/config.h b/keyboards/kbdfans/kbd8x_mk2/config.h index a33c328a8b..7a2b2aa3c8 100644 --- a/keyboards/kbdfans/kbd8x_mk2/config.h +++ b/keyboards/kbdfans/kbd8x_mk2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h index d3da84af14..1f7d095e9f 100644 --- a/keyboards/kbdfans/kbdmini/config.h +++ b/keyboards/kbdfans/kbdmini/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { B7, E6, F5, F4 } #define MATRIX_COL_PINS { B3, B2, B1, B0, F1, F0, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/kbdpad/mk2/config.h b/keyboards/kbdfans/kbdpad/mk2/config.h index 711d1b03e5..c0f1632169 100644 --- a/keyboards/kbdfans/kbdpad/mk2/config.h +++ b/keyboards/kbdfans/kbdpad/mk2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D1, D2, C6, C7, B6 } #define MATRIX_COL_PINS { C4, C5, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/niu_mini/config.h b/keyboards/kbdfans/niu_mini/config.h index 3eafcd24cf..945c932da9 100644 --- a/keyboards/kbdfans/niu_mini/config.h +++ b/keyboards/kbdfans/niu_mini/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NIU Mini PCB default pin-out */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c index 935dd5c506..8c03ae2df2 100644 --- a/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c +++ b/keyboards/kbdfans/niu_mini/keymaps/tobias/keymap.c @@ -8,7 +8,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. @@ -103,8 +103,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, S(KC_EQL), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_E), KC_RBRC, RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), KC_LSFT, KC_NUBS, RALT(KC_NUBS), S(KC_NUBS), DGRMCRO, XXXXXXX, XXXXXXX, RALT(KC_M), KC_RBRC, S(KC_RBRC), RALT(KC_RBRC), _______, _______, _______, KC_RALT, _______,TO(_ADJUST), _______, _______, _______, _______, _______, _______, TO(_QWERTY) -), - +), + /* Lower * ,-----------------------------------------------------------------------------------. @@ -257,10 +257,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } else { workmode = false; - return false; - } + return false; + } } - + } return true; } @@ -293,7 +293,7 @@ void rgbflag(uint8_t r, uint8_t g, uint8_t b) { layer_state_t layer_state_set_user(layer_state_t state) { // if(rgblight_get_mode() == 1) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _QWERTY: if(!workmode){ rgblight_mode(9); @@ -312,7 +312,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { tap_code(KC_NLCK); } rgbflag(0xFF, 0x00, 0x00); - + break; case _ADJUST: rgblight_mode(1); @@ -350,7 +350,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_mode(1); if(bnumlock) { tap_code(KC_NLCK); - } + } rgbflag(0xFF, 0xFF, 0xFF); break; } @@ -363,8 +363,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { //Layer LED indicators uint32_t layer = layer_state; - - + + if (layer & (1<<2)) { if(!bnumlock) { numlock_changed = true; @@ -373,10 +373,10 @@ layer_state_t layer_state_set_user(layer_state_t state) { bnumlock = true; } } -} +} */ - - + + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { @@ -410,4 +410,4 @@ void led_set_user(uint8_t usb_led) { } -}
\ No newline at end of file +} diff --git a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c index bfda812738..d3c6102b16 100644 --- a/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c +++ b/keyboards/kbdfans/niu_mini/keymaps/xtonhasvim/keymap.c @@ -187,7 +187,7 @@ void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb void set_state_leds(void) { if (rgblight_get_mode() == 1) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _RAISE: rgbflag(C_BLU, C_GRN); break; diff --git a/keyboards/kbdfans/odin/rgb/config.h b/keyboards/kbdfans/odin/rgb/config.h index 81572cee6e..571f6d0d1c 100644 --- a/keyboards/kbdfans/odin/rgb/config.h +++ b/keyboards/kbdfans/odin/rgb/config.h @@ -20,7 +20,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B14, B13, A2 } #define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B12, A15, B3, B4, B5, B6, B7, B8, C13, C14, C15, A0} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kbdfans/odin/soldered/config.h b/keyboards/kbdfans/odin/soldered/config.h index 0731524dad..57ad7e8533 100644 --- a/keyboards/kbdfans/odin/soldered/config.h +++ b/keyboards/kbdfans/odin/soldered/config.h @@ -20,7 +20,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B14, B13, A2 } #define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B12, A15, B3, B4, B5, B6, B7, B8, C13, C14, C15, A0} -#define UNUSED_PINS #define LED_NUM_LOCK_PIN B9 #define LED_CAPS_LOCK_PIN B10 diff --git a/keyboards/kbdfans/phaseone/config.h b/keyboards/kbdfans/phaseone/config.h index d1ab30f614..34ab024a60 100644 --- a/keyboards/kbdfans/phaseone/config.h +++ b/keyboards/kbdfans/phaseone/config.h @@ -22,7 +22,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, C6, C7, F7, F6, F5, F4, F1, E6, B7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN D7 #define LED_CAPS_LOCK_PIN D6 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/kbdfans/tiger80/config.h b/keyboards/kbdfans/tiger80/config.h index c1092c11e9..207f627f7e 100644 --- a/keyboards/kbdfans/tiger80/config.h +++ b/keyboards/kbdfans/tiger80/config.h @@ -22,7 +22,6 @@ #define MATRIX_COLS 16 #define MATRIX_ROW_PINS { B0, E6, B1, B4, D1, D2 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D3, D5, D4, D6, D7, B5, B6, C6, E2, D0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 602a4cc35d..8939dd2fbe 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, F6, F7, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 88a4afa9d3..f6d4e2e42b 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 14 /* * Keyboard Matrix Assignments */ -#define UNUSED_PINS #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c index a449c3ec3d..3b92657d4d 100644 --- a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c @@ -64,7 +64,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { flight_mode = false; rcs_mode = false; - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _PANIC: panic_mode = true; // For use in encoder evaluation rgblight_sethsv_noeeprom(HSV_RED); diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c index 29531b9973..ad56226ac6 100644 --- a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c @@ -42,7 +42,7 @@ void matrix_post_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _LIST: rgblight_sethsv_noeeprom(0,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); @@ -87,6 +87,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } } - - - diff --git a/keyboards/keebio/dilly/config.h b/keyboards/keebio/dilly/config.h index d56c572a4d..2dacb39e07 100644 --- a/keyboards/keebio/dilly/config.h +++ b/keyboards/keebio/dilly/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D7, E6, B4, B1, B3, B2 } #define MATRIX_COL_PINS { D2, D4, C6, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/ergodicity/config.h b/keyboards/keebio/ergodicity/config.h index 975a456300..80603481f1 100644 --- a/keyboards/keebio/ergodicity/config.h +++ b/keyboards/keebio/ergodicity/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, C7, B6, B4 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D7, D6, D4, D3, D2, D1, D0, B7, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c index 0c0fc5a746..013d6c00a5 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c +++ b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c @@ -59,9 +59,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_keymap() {} #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case L_EDVORAKJP_LOWER: rgblight_sethsv_noeeprom_red(); break; diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c index e0c09638b2..bc04f9fbfd 100644 --- a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c +++ b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c @@ -11,7 +11,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_GE #ifdef ENCODER_ENABLE bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _LOWER: clockwise ? tap_code(KC_MS_WH_UP) : tap_code(KC_MS_WH_DOWN); break; @@ -23,7 +23,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { break; } } else if (index == 1) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _LOWER: clockwise ? tap_code(KC_UP) : tap_code(KC_DOWN); break; diff --git a/keyboards/keebio/iris/keymaps/sq5rix/keymap.c b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c index 19a939a55b..d3e0d680a1 100644 --- a/keyboards/keebio/iris/keymaps/sq5rix/keymap.c +++ b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c @@ -134,7 +134,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // tmux screen else if (index == 1) { - switch(biton32(layer_state)){ + switch(get_highest_layer(layer_state)){ case 0: if (clockwise) { send_string(SS_LCTL("B")"p"); @@ -182,4 +182,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(2, layer_state_cmp(state, 4)); return state; } - diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c index d9edfebaa0..6de2279be4 100644 --- a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c +++ b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c @@ -91,7 +91,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE layer_state_set_rgb(state); #endif - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); combo_enable(); // by default, enable combos. switch (layer) { case 0: diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c index de3a5342c0..3695731353 100644 --- a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.c @@ -45,7 +45,7 @@ void matrix_scan_rgb(void) { } void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm) { - if (biton32(layer_state) == _QWERTY) { + if (get_highest_layer(layer_state) == _QWERTY) { if ((this_mod | this_osm) & MOD_MASK_SHIFT) { rgblight_setrgb_gold_at(SHFT_LED1); } else { diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h index 254d3cbac0..8b14d8571d 100644 --- a/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h +++ b/keyboards/keebio/levinson/keymaps/issmirnov/rgb.h @@ -6,7 +6,7 @@ void keyboard_post_init_rgb(void); // If rgb enabled, set underglow for layer -uint32_t layer_state_set_rgb(uint32_t state); +layer_state_t layer_state_set_rgb(layer_state_t state); // Enhance matrix scan code. Note: keep this light, since it runs every 100ms void matrix_scan_rgb(void); diff --git a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c index 16aa965d7d..014e6c9c23 100644 --- a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c @@ -182,7 +182,7 @@ void rgbflag(uint8_t r, uint8_t g, uint8_t b, uint8_t rr, uint8_t gg, uint8_t bb void set_state_leds(void) { if (rgblight_get_mode() == 1) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _RAISE: rgbflag(C_BLU, C_GRN); break; diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/config.h b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h index 09abbccb72..398b285b89 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/config.h +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h @@ -14,13 +14,11 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ - +#pragma once #define TAPPING_TERM 150 #define USE_SERIAL #define EE_HANDS -#define BOOTMAGIC_KEY_SALT KC_ENT - #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" diff --git a/keyboards/keebio/nyquist/keymaps/pitty/keymap.c b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c index 31912bb63e..2016cd1c46 100644 --- a/keyboards/keebio/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c @@ -143,7 +143,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); if (rgb_layer_change) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _LOWER: rgblight_set_purple; rgblight_mode(5); diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c index a367e877fe..7d6f9da30e 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c @@ -64,7 +64,7 @@ void keyboard_post_init_user(void) { } void update_led(void) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _BASE: rgblight_sethsv_noeeprom(HSV_BLUE); break; diff --git a/keyboards/keebio/tragicforce68/config.h b/keyboards/keebio/tragicforce68/config.h index 428a7ca1ff..d39b78c010 100644 --- a/keyboards/keebio/tragicforce68/config.h +++ b/keyboards/keebio/tragicforce68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, B4, E6, C6, D7, D4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebsforall/freebird60/config.h b/keyboards/keebsforall/freebird60/config.h index 736782e836..44331c8612 100644 --- a/keyboards/keebsforall/freebird60/config.h +++ b/keyboards/keebsforall/freebird60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F5, F4, F1, F0, F6 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D0, D1, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebsforall/freebirdnp/lite/config.h b/keyboards/keebsforall/freebirdnp/lite/config.h index 6630124423..031b2ba596 100644 --- a/keyboards/keebsforall/freebirdnp/lite/config.h +++ b/keyboards/keebsforall/freebirdnp/lite/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3 } #define MATRIX_COL_PINS { C7, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebsforall/freebirdnp/pro/config.h b/keyboards/keebsforall/freebirdnp/pro/config.h index b7c850c83d..8986e2ef64 100644 --- a/keyboards/keebsforall/freebirdnp/pro/config.h +++ b/keyboards/keebsforall/freebirdnp/pro/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, B7, B6, B5, B4, B3 } #define MATRIX_COL_PINS { C7, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebsforall/freebirdtkl/config.h b/keyboards/keebsforall/freebirdtkl/config.h index e775ccf083..06b8d65619 100644 --- a/keyboards/keebsforall/freebirdtkl/config.h +++ b/keyboards/keebsforall/freebirdtkl/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B1, B0, B3, D5, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D3, D2, D1 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebwerk/nano_slider/config.h b/keyboards/keebwerk/nano_slider/config.h index 544445f085..7d6a9a8330 100644 --- a/keyboards/keebwerk/nano_slider/config.h +++ b/keyboards/keebwerk/nano_slider/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1 } #define MATRIX_COL_PINS { B0, B1, B2, B3 } -#define UNUSED_PINS #define SLIDER_PIN D4 diff --git a/keyboards/keebzdotnet/fme/config.h b/keyboards/keebzdotnet/fme/config.h index a756fea926..1723e314ef 100644 --- a/keyboards/keebzdotnet/fme/config.h +++ b/keyboards/keebzdotnet/fme/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B6, B5, B7, D2 } #define MATRIX_COL_PINS { B0, B4, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keebzdotnet/wazowski/config.h b/keyboards/keebzdotnet/wazowski/config.h index fb9fc9c118..9670585b45 100644 --- a/keyboards/keebzdotnet/wazowski/config.h +++ b/keyboards/keebzdotnet/wazowski/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keybage/radpad/config.h b/keyboards/keybage/radpad/config.h index ff4d011025..269f5a7967 100644 --- a/keyboards/keybage/radpad/config.h +++ b/keyboards/keybage/radpad/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F5, B5, B6, B2, B3 } #define MATRIX_COL_PINS { E6, B4, D7, B1 } -#define UNUSED_PINS { B0, B7, C7, D2, D3, D5, F0 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keybee/keybee65/config.h b/keyboards/keybee/keybee65/config.h index e8281c8019..1e54bbfb15 100644 --- a/keyboards/keybee/keybee65/config.h +++ b/keyboards/keybee/keybee65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D3, D2, D0, B0, F0 } #define MATRIX_COL_PINS { E6, D1, D5, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyboardio/atreus/config.h b/keyboards/keyboardio/atreus/config.h index ad616634b2..6e6e68dcaf 100644 --- a/keyboards/keyboardio/atreus/config.h +++ b/keyboards/keyboardio/atreus/config.h @@ -49,7 +49,6 @@ #define MATRIX_ROW_PINS { F6, F5, F4, F1 } #define MATRIX_COL_PINS { F7, E2, C7, C6, B6, B5, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keycapsss/o4l_5x12/config.h b/keyboards/keycapsss/o4l_5x12/config.h index b6eed0b04d..84a262e874 100644 --- a/keyboards/keycapsss/o4l_5x12/config.h +++ b/keyboards/keycapsss/o4l_5x12/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c index 050b5a2c3e..2f64a56e9a 100644 --- a/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c +++ b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_5x12( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______,_______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/keycapsss/plaid_pad/rev1/config.h b/keyboards/keycapsss/plaid_pad/rev1/config.h index fee25316dd..1178c7f7e3 100644 --- a/keyboards/keycapsss/plaid_pad/rev1/config.h +++ b/keyboards/keycapsss/plaid_pad/rev1/config.h @@ -19,7 +19,6 @@ #define PRODUCT Plaid-Pad Rev1 #define DEVICE_VER 0x0001 -#define UNUSED_PINS { B3, B4, B5, D4} #define ENCODERS_PAD_A { D1, B2 } #define ENCODERS_PAD_B { D0, B1 } diff --git a/keyboards/keycapsss/plaid_pad/rev2/config.h b/keyboards/keycapsss/plaid_pad/rev2/config.h index f3646dd575..aaa954271e 100644 --- a/keyboards/keycapsss/plaid_pad/rev2/config.h +++ b/keyboards/keycapsss/plaid_pad/rev2/config.h @@ -19,7 +19,6 @@ #define PRODUCT Plaid-Pad Rev2 #define DEVICE_VER 0x0002 -#define UNUSED_PINS { } #define ENCODERS_PAD_A { D1, B2, B4, D4 } #define ENCODERS_PAD_B { D0, B1, B3, B5 } diff --git a/keyboards/keycapsss/plaid_pad/rev3/config.h b/keyboards/keycapsss/plaid_pad/rev3/config.h index 40f96cd5c8..7159059a80 100644 --- a/keyboards/keycapsss/plaid_pad/rev3/config.h +++ b/keyboards/keycapsss/plaid_pad/rev3/config.h @@ -19,7 +19,6 @@ #define PRODUCT Plaid-Pad Rev3 #define DEVICE_VER 0x0003 -#define UNUSED_PINS { } #define ENCODERS_PAD_A { D1, B2, B4, D4 } #define ENCODERS_PAD_B { D0, B1, B3, B5 } diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h index d019bcee15..e513536056 100644 --- a/keyboards/keychron/q2/config.h +++ b/keyboards/keychron/q2/config.h @@ -64,7 +64,8 @@ #define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 /* EEPROM Driver Configuration */ -#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100010 +#define WEAR_LEVELING_LOGICAL_SIZE 2048 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // RGB Matrix Animation modes. Explicitly enabled // For full list of effects, see: diff --git a/keyboards/keychron/q2/rev_0110/rules.mk b/keyboards/keychron/q2/rev_0110/rules.mk index 30394028b3..38d48f0b27 100644 --- a/keyboards/keychron/q2/rev_0110/rules.mk +++ b/keyboards/keychron/q2/rev_0110/rules.mk @@ -20,7 +20,8 @@ ENCODER_ENABLE = no # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = CKLED2001 -EEPROM_DRIVER = i2c +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keychron/q2/rev_0111/rules.mk b/keyboards/keychron/q2/rev_0111/rules.mk index a295f48e10..9332d29432 100644 --- a/keyboards/keychron/q2/rev_0111/rules.mk +++ b/keyboards/keychron/q2/rev_0111/rules.mk @@ -20,7 +20,8 @@ ENCODER_ENABLE = yes # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = CKLED2001 -EEPROM_DRIVER = i2c +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keychron/q2/rev_0112/rules.mk b/keyboards/keychron/q2/rev_0112/rules.mk index 30394028b3..38d48f0b27 100644 --- a/keyboards/keychron/q2/rev_0112/rules.mk +++ b/keyboards/keychron/q2/rev_0112/rules.mk @@ -20,7 +20,8 @@ ENCODER_ENABLE = no # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = CKLED2001 -EEPROM_DRIVER = i2c +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keychron/q2/rev_0113/rules.mk b/keyboards/keychron/q2/rev_0113/rules.mk index a295f48e10..9332d29432 100644 --- a/keyboards/keychron/q2/rev_0113/rules.mk +++ b/keyboards/keychron/q2/rev_0113/rules.mk @@ -20,7 +20,8 @@ ENCODER_ENABLE = yes # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = CKLED2001 -EEPROM_DRIVER = i2c +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = embedded_flash # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keyhive/absinthe/config.h b/keyboards/keyhive/absinthe/config.h index 3ea0cf83d1..98ab67871c 100644 --- a/keyboards/keyhive/absinthe/config.h +++ b/keyboards/keyhive/absinthe/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D1, B6, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D3, D0 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B7 } #define ENCODERS_PAD_B { D5 } diff --git a/keyboards/keyhive/ergosaurus/config.h b/keyboards/keyhive/ergosaurus/config.h index 25c01a4c00..ddb9ef8bfe 100644 --- a/keyboards/keyhive/ergosaurus/config.h +++ b/keyboards/keyhive/ergosaurus/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B5, B4, E6, D4, F6, D3, D2, F4, F5 } #define MATRIX_COL_PINS \ { D7, C6, D0, D1, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/honeycomb/keymaps/default/keymap.c b/keyboards/keyhive/honeycomb/keymaps/default/keymap.c index d0a5961873..429624822e 100755 --- a/keyboards/keyhive/honeycomb/keymaps/default/keymap.c +++ b/keyboards/keyhive/honeycomb/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { report_mouse_t currentReport = {}; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t layer = biton32(layer_state); // get the current layer + //uint8_t layer = get_highest_layer(layer_state); // get the current layer // Basic example functions switch (keycode) { diff --git a/keyboards/keyhive/lattice60/config.h b/keyboards/keyhive/lattice60/config.h index c2d346bc61..e72a6ab6b3 100644 --- a/keyboards/keyhive/lattice60/config.h +++ b/keyboards/keyhive/lattice60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B3, B4, B5, C0, C1, C2, C3 } #define MATRIX_COL_PINS { D7, D6, B0, D5, D1, D4, D0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h index d7bc4b4200..4a177fa93d 100644 --- a/keyboards/keyhive/maypad/config.h +++ b/keyboards/keyhive/maypad/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/navi10/keymaps/default/keymap.c b/keyboards/keyhive/navi10/keymaps/default/keymap.c index d1b3127760..c4295b1553 100644 --- a/keyboards/keyhive/navi10/keymaps/default/keymap.c +++ b/keyboards/keyhive/navi10/keymaps/default/keymap.c @@ -127,5 +127,5 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){ //associate the tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, tk_finished, tk_reset, 275) + [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset) }; diff --git a/keyboards/keyhive/navi10/keymaps/devdev/keymap.c b/keyboards/keyhive/navi10/keymaps/devdev/keymap.c index b0d43ebc69..0fc20cbbd4 100644 --- a/keyboards/keyhive/navi10/keymaps/devdev/keymap.c +++ b/keyboards/keyhive/navi10/keymaps/devdev/keymap.c @@ -259,5 +259,5 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){ //associate the tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, tk_finished, tk_reset, TAPPING_TERM) + [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset) }; diff --git a/keyboards/keyhive/navi10/keymaps/emdarcher/keymap.c b/keyboards/keyhive/navi10/keymaps/emdarcher/keymap.c index 40efed48d5..37850e28f3 100644 --- a/keyboards/keyhive/navi10/keymaps/emdarcher/keymap.c +++ b/keyboards/keyhive/navi10/keymaps/emdarcher/keymap.c @@ -178,5 +178,5 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){ //associate the tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, tk_finished, tk_reset, 275) + [TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset) }; diff --git a/keyboards/keyhive/navi10/rev0/config.h b/keyboards/keyhive/navi10/rev0/config.h index 22a985c280..0d4685b17f 100644 --- a/keyboards/keyhive/navi10/rev0/config.h +++ b/keyboards/keyhive/navi10/rev0/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B6, B2, B3, B4 } #define MATRIX_COL_PINS \ { D1, D0, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/navi10/rev2/config.h b/keyboards/keyhive/navi10/rev2/config.h index 1dfb210b03..c128e8ecdc 100644 --- a/keyboards/keyhive/navi10/rev2/config.h +++ b/keyboards/keyhive/navi10/rev2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B6, B2, B3, B4 } #define MATRIX_COL_PINS \ { D4, C6, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/navi10/rev3/config.h b/keyboards/keyhive/navi10/rev3/config.h index 205535273a..74cf7f77ca 100644 --- a/keyboards/keyhive/navi10/rev3/config.h +++ b/keyboards/keyhive/navi10/rev3/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B6, B2, B3, B4 } #define MATRIX_COL_PINS \ { D4, E6, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/opus/config.h b/keyboards/keyhive/opus/config.h index e5ea2a2d94..5f7f279346 100644 --- a/keyboards/keyhive/opus/config.h +++ b/keyboards/keyhive/opus/config.h @@ -25,7 +25,6 @@ /* PCB pin-out */ #define MATRIX_ROW_PINS {B1, B3, B2, B6} #define MATRIX_COL_PINS {D1, D0, D4, C6, D7, E6, B4, B5, F4, F5, F6, F7} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/smallice/config.h b/keyboards/keyhive/smallice/config.h index aa94a5045a..ac2db030f1 100644 --- a/keyboards/keyhive/smallice/config.h +++ b/keyboards/keyhive/smallice/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B6, B5, B4 } #define MATRIX_COL_PINS { C7, C6, F7, F6, F5, F4, F1, D4, D6, D7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS { E6, F0 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/southpole/config.h b/keyboards/keyhive/southpole/config.h index 044a60dfed..d74682cea2 100644 --- a/keyboards/keyhive/southpole/config.h +++ b/keyboards/keyhive/southpole/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, D3, C6, C7, D5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyhive/uno/rev1/config.h b/keyboards/keyhive/uno/rev1/config.h index 11c84ad2ab..cbd2306106 100644 --- a/keyboards/keyhive/uno/rev1/config.h +++ b/keyboards/keyhive/uno/rev1/config.h @@ -35,7 +35,6 @@ #define DIRECT_PINS { \ { B6 } \ } -#define UNUSED_PINS #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN F6 diff --git a/keyboards/keyhive/uno/rev2/config.h b/keyboards/keyhive/uno/rev2/config.h index 37ea08c017..0539c124b7 100644 --- a/keyboards/keyhive/uno/rev2/config.h +++ b/keyboards/keyhive/uno/rev2/config.h @@ -38,7 +38,6 @@ #define DIRECT_PINS { \ { D0 } \ } -#define UNUSED_PINS #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D1 diff --git a/keyboards/keyhive/ut472/config.h b/keyboards/keyhive/ut472/config.h index 98210f5f9c..a9d24c0c9e 100644 --- a/keyboards/keyhive/ut472/config.h +++ b/keyboards/keyhive/ut472/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D2, D3, D4 } #define MATRIX_COL_PINS { C4, C5, B7, B6, B5, B4, B3, B2, B1, B0, D6, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ diff --git a/keyboards/keyprez/bison/config.h b/keyboards/keyprez/bison/config.h index 727d5fc105..08a81a4a91 100644 --- a/keyboards/keyprez/bison/config.h +++ b/keyboards/keyprez/bison/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, F7, B1, B3, D7 } #define MATRIX_COL_PINS { D3, E6, B2, B4, D4, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyprez/corgi/config.h b/keyboards/keyprez/corgi/config.h index 96ce6b0d62..bebc94e14b 100644 --- a/keyboards/keyprez/corgi/config.h +++ b/keyboards/keyprez/corgi/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F5, F7, B2, B6, F4, F6, B1, B3 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D2, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyprez/unicorn/config.h b/keyboards/keyprez/unicorn/config.h index 57333658d8..739d5b525e 100644 --- a/keyboards/keyprez/unicorn/config.h +++ b/keyboards/keyprez/unicorn/config.h @@ -24,7 +24,6 @@ #define MATRIX_COL_PINS { F5, B2, B5, D7, B4, B6, E6, D4 } #define MATRIX_ROW_PINS_RIGHT { F4, B2, F6, F7, B1, B3 } #define MATRIX_COL_PINS_RIGHT { F5, D3, B5, D7, B4, B6, E6, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keyquest/enclave/config.h b/keyboards/keyquest/enclave/config.h index 931386a775..b91c01dca5 100644 --- a/keyboards/keyquest/enclave/config.h +++ b/keyboards/keyquest/enclave/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments*/ #define MATRIX_ROW_PINS { D6, B6, F5 } #define MATRIX_COL_PINS { B4, B7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/keysofkings/twokey/config.h b/keyboards/keysofkings/twokey/config.h index 99f523df2b..f33537fabb 100755 --- a/keyboards/keysofkings/twokey/config.h +++ b/keyboards/keysofkings/twokey/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B5 } #define MATRIX_COL_PINS { B3, B2 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D7 } diff --git a/keyboards/keystonecaps/gameroyadvance/config.h b/keyboards/keystonecaps/gameroyadvance/config.h index b8d5a69122..3b949040fd 100644 --- a/keyboards/keystonecaps/gameroyadvance/config.h +++ b/keyboards/keystonecaps/gameroyadvance/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_B_RIGHT { B2 } #define SOFT_SERIAL_PIN D2 -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -55,10 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - - -#define QMK_KEYS_PER_SCAN 12 - #define RGB_DI_PIN C7 #ifdef RGB_DI_PIN #define RGBLIGHT_EFFECT_BREATHING diff --git a/keyboards/keyten/kt60_m/config.h b/keyboards/keyten/kt60_m/config.h index 1e0961ce4f..9e2b068777 100644 --- a/keyboards/keyten/kt60_m/config.h +++ b/keyboards/keyten/kt60_m/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, B6, F7, F6 } #define MATRIX_COL_PINS { B7, F0, F1, F4, F5, D1, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kikkou/config.h b/keyboards/kikkou/config.h index 06b9cb3923..f9dbebd28c 100644 --- a/keyboards/kikkou/config.h +++ b/keyboards/kikkou/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, E6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kin80/micro/config.h b/keyboards/kin80/micro/config.h index 546d0bc5f5..2874cb819d 100644 --- a/keyboards/kin80/micro/config.h +++ b/keyboards/kin80/micro/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B6, B3, B1, D6, B7, B5, D1 } #define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS { C7 } #define LED_PIN_ON_STATE 0 #define NUM_LOCK_LED_PIN D2 diff --git a/keyboards/kindakeyboards/conone65/config.h b/keyboards/kindakeyboards/conone65/config.h index 3116265841..5e3dacdb0e 100644 --- a/keyboards/kindakeyboards/conone65/config.h +++ b/keyboards/kindakeyboards/conone65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS {D5,D3,E6,D1,D2} #define MATRIX_COL_PINS {B7,F7,D4,D6,D7,B4,B5,B6,C6,C7,F6,F5,F4,F1,F0,D0} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h index 8a656264ee..8667d2d132 100644 --- a/keyboards/kinesis/alvicstep/config.h +++ b/keyboards/kinesis/alvicstep/config.h @@ -26,7 +26,6 @@ // May be upside down. #define MATRIX_COL_PINS { B0,B1, B2, B3, B4, B5, B6, B7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 8c01bcb83d..72687195ef 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -330,7 +330,7 @@ void matrix_init_user(void) { void matrix_scan_user(void) { #ifdef ALVICSTEP_CONFIG_H - int8_t layer = biton32(layer_state); + int8_t layer = get_highest_layer(layer_state); switch (layer) { case 1: diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h index 54ba07d3d6..baef45e32b 100644 --- a/keyboards/kinesis/kint2pp/config.h +++ b/keyboards/kinesis/kint2pp/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { D7, E0, E1, C0, C6, F6, D4, D2, D3, D0, B7, D1, E6, B4, B2 } #define MATRIX_COL_PINS { E7, F0, F7, B1, B3, B0, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index 188c83345d..88f28d0fe2 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -45,7 +45,6 @@ #define MATRIX_ROW_PINS { D3, C3, C4, C6, D2, B0, D7, A12, A13, B17, B16, D0, B1, C2, D6 } #define MATRIX_COL_PINS { B3, D1, C0, D5, C1, B2, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h index 3e13e84606..6a21e8efad 100644 --- a/keyboards/kinesis/kint41/config.h +++ b/keyboards/kinesis/kint41/config.h @@ -72,7 +72,6 @@ LINE_PIN6 /* COL_6 */ \ } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/kintlc/config.h b/keyboards/kinesis/kintlc/config.h index 8e15fea479..5eb397856e 100644 --- a/keyboards/kinesis/kintlc/config.h +++ b/keyboards/kinesis/kintlc/config.h @@ -72,7 +72,6 @@ LINE_PIN6 /* COL_6 */ \ } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/nguyenvietyen/config.h b/keyboards/kinesis/nguyenvietyen/config.h index f1b41e61bc..b518456e27 100644 --- a/keyboards/kinesis/nguyenvietyen/config.h +++ b/keyboards/kinesis/nguyenvietyen/config.h @@ -21,7 +21,6 @@ // Passed through the port multipler, so 4 pins =16 #define MATRIX_ROW_PINS { D0, D1, D2, D3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index fe44131adb..1ef92a604d 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -23,7 +23,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kineticlabs/emu/hotswap/config.h b/keyboards/kineticlabs/emu/hotswap/config.h index e4b07c155f..23e3b22a37 100644 --- a/keyboards/kineticlabs/emu/hotswap/config.h +++ b/keyboards/kineticlabs/emu/hotswap/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, D4, B3, B1, B0, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kineticlabs/emu/soldered/config.h b/keyboards/kineticlabs/emu/soldered/config.h index e4b07c155f..23e3b22a37 100644 --- a/keyboards/kineticlabs/emu/soldered/config.h +++ b/keyboards/kineticlabs/emu/soldered/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, D4, B3, B1, B0, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/ave/config.h b/keyboards/kingly_keys/ave/config.h index 8a663da356..0776d1ba08 100644 --- a/keyboards/kingly_keys/ave/config.h +++ b/keyboards/kingly_keys/ave/config.h @@ -36,7 +36,6 @@ #define MATRIX_ROW_PINS { B3, F4, F7, F6, F5 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/little_foot/config.h b/keyboards/kingly_keys/little_foot/config.h index 64b187f1cf..68954c6b70 100644 --- a/keyboards/kingly_keys/little_foot/config.h +++ b/keyboards/kingly_keys/little_foot/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, B6, B2, B3, B1 } #define MATRIX_COL_PINS { F5, F7, B5, B4, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/romac/config.h b/keyboards/kingly_keys/romac/config.h index 4d47736bc5..a5478582b1 100644 --- a/keyboards/kingly_keys/romac/config.h +++ b/keyboards/kingly_keys/romac/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h index 0f9afb982c..441584a84e 100644 --- a/keyboards/kingly_keys/romac_plus/config.h +++ b/keyboards/kingly_keys/romac_plus/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, D4, D2, D3 } #define MATRIX_COL_PINS { F6, F5, F4 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B3 } #define ENCODERS_PAD_B { B2 } diff --git a/keyboards/kingly_keys/ropro/config.h b/keyboards/kingly_keys/ropro/config.h index 7900f09d29..092349cbc6 100644 --- a/keyboards/kingly_keys/ropro/config.h +++ b/keyboards/kingly_keys/ropro/config.h @@ -28,7 +28,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, F1, NO_PIN } #define MATRIX_COL_PINS { F0, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2, B6, D2, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kingly_keys/smd_milk/config.h b/keyboards/kingly_keys/smd_milk/config.h index 7e192b61f7..a1a308f088 100644 --- a/keyboards/kingly_keys/smd_milk/config.h +++ b/keyboards/kingly_keys/smd_milk/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C5, D2 } #define MATRIX_COL_PINS { D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kingly_keys/soap/config.h b/keyboards/kingly_keys/soap/config.h index eff9bf64ed..503c77a04b 100644 --- a/keyboards/kingly_keys/soap/config.h +++ b/keyboards/kingly_keys/soap/config.h @@ -26,7 +26,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6 } #define MATRIX_COL_PINS { F4, F1, F0, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index 7570cad543..17c73df412 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4 } #define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, F5, F4, F1, F0, E6, B3, B2, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kira80/config.h b/keyboards/kira80/config.h index 076c360dac..4307eabbdd 100644 --- a/keyboards/kira80/config.h +++ b/keyboards/kira80/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B2, B3, B5, B6, B7, B0 } #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, A0, C2, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kiwikeebs/macro/config.h b/keyboards/kiwikeebs/macro/config.h index 2457f99879..67d02c6396 100644 --- a/keyboards/kiwikeebs/macro/config.h +++ b/keyboards/kiwikeebs/macro/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, D7 } #define MATRIX_COL_PINS { F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kiwikeebs/macro_v2/config.h b/keyboards/kiwikeebs/macro_v2/config.h index 179a08e34c..9a24d57a69 100644 --- a/keyboards/kiwikeebs/macro_v2/config.h +++ b/keyboards/kiwikeebs/macro_v2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4 } #define MATRIX_COL_PINS { B6, C6, C7, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kiwikey/borderland/config.h b/keyboards/kiwikey/borderland/config.h index 350245d1c3..42bc5644bd 100644 --- a/keyboards/kiwikey/borderland/config.h +++ b/keyboards/kiwikey/borderland/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kiwikey/kawii9/config.h b/keyboards/kiwikey/kawii9/config.h index 9f98ca1926..10ab8dfd5b 100644 --- a/keyboards/kiwikey/kawii9/config.h +++ b/keyboards/kiwikey/kawii9/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4 } #define MATRIX_COL_PINS { F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kiwikey/wanderland/config.h b/keyboards/kiwikey/wanderland/config.h index 4107d5717a..fc42b5ff19 100644 --- a/keyboards/kiwikey/wanderland/config.h +++ b/keyboards/kiwikey/wanderland/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F1, E6, E2, C7, D4 } #define MATRIX_COL_PINS { F5, F6, B4, D7, D6, D5, D2, D3, B0, F0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/bakeneko60/config.h b/keyboards/kkatano/bakeneko60/config.h index 97f6ade6a4..fc3da670dc 100644 --- a/keyboards/kkatano/bakeneko60/config.h +++ b/keyboards/kkatano/bakeneko60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/bakeneko65/rev2/config.h b/keyboards/kkatano/bakeneko65/rev2/config.h index e45fef4297..442f69238f 100644 --- a/keyboards/kkatano/bakeneko65/rev2/config.h +++ b/keyboards/kkatano/bakeneko65/rev2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/bakeneko65/rev3/config.h b/keyboards/kkatano/bakeneko65/rev3/config.h index e45fef4297..442f69238f 100644 --- a/keyboards/kkatano/bakeneko65/rev3/config.h +++ b/keyboards/kkatano/bakeneko65/rev3/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/bakeneko80/config.h b/keyboards/kkatano/bakeneko80/config.h index 4b586aeba7..89fd9070a0 100644 --- a/keyboards/kkatano/bakeneko80/config.h +++ b/keyboards/kkatano/bakeneko80/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B0, B1, B7, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/wallaby/config.h b/keyboards/kkatano/wallaby/config.h index a5ef8c4d0c..fc380eecf6 100644 --- a/keyboards/kkatano/wallaby/config.h +++ b/keyboards/kkatano/wallaby/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D5, C7, C6, D4, D0, E6, F0, F1, F4, F5, F6, F7, D7, D6, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kkatano/yurei/config.h b/keyboards/kkatano/yurei/config.h index f5910d4723..95aa6b7ee3 100644 --- a/keyboards/kkatano/yurei/config.h +++ b/keyboards/kkatano/yurei/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D5, C7, C6, D4, D0, E6, F0, F1, F4, F5, F6, F7, D7, D6, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 495c612452..3d1b8eb5d5 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D0, D1, D2, D3, D5, B7 } #define MATRIX_COL_PINS \ { B6, C6, C7, F1, F0, B5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ //#define DIODE_DIRECTION diff --git a/keyboards/kmac_pad/config.h b/keyboards/kmac_pad/config.h index 3d238dbfe9..301a7813da 100644 --- a/keyboards/kmac_pad/config.h +++ b/keyboards/kmac_pad/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E2, D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { C7, C6, B6, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ // #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index 67aad7985e..7138b158a6 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -29,7 +29,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ //#define DIODE_DIRECTION diff --git a/keyboards/knobgoblin/config.h b/keyboards/knobgoblin/config.h index 96303b930a..57a0a016c4 100644 --- a/keyboards/knobgoblin/config.h +++ b/keyboards/knobgoblin/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, B6, B2, B3, B1 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS #define ENCODERS_PAD_A { F7, F5 } #define ENCODERS_PAD_B { F6, F4 } diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 259819e7cf..7ca350b30c 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index 7a63ccc46d..f53944789e 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Column pin configuration */ #define MATRIX_COL_PINS { F0, F4, B5, B4, D7, D6, B0, B1, B3, D2, B7, D0, D1, D3, C6, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kopibeng/mnk65/config.h b/keyboards/kopibeng/mnk65/config.h index 1c2993684d..a5bc7430c8 100644 --- a/keyboards/kopibeng/mnk65/config.h +++ b/keyboards/kopibeng/mnk65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, B7, B3 } #define MATRIX_COL_PINS { D0, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN D1 diff --git a/keyboards/kopibeng/xt65/config.h b/keyboards/kopibeng/xt65/config.h index 3c78f01d52..54195ef454 100644 --- a/keyboards/kopibeng/xt65/config.h +++ b/keyboards/kopibeng/xt65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D1, D2, D3, B6, C6, C7, F0, F1, F4, F5, F6, F7, B2, B3, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm16a/config.h b/keyboards/kprepublic/bm16a/config.h index 17568b446e..7e6289b793 100644 --- a/keyboards/kprepublic/bm16a/config.h +++ b/keyboards/kprepublic/bm16a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D3, D5, D1, D2} #define MATRIX_COL_PINS { D6, D4, D7, B4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm16s/config.h b/keyboards/kprepublic/bm16s/config.h index a473ee3956..2de3ffe3d4 100755 --- a/keyboards/kprepublic/bm16s/config.h +++ b/keyboards/kprepublic/bm16s/config.h @@ -8,7 +8,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D3, D2 } #define MATRIX_COL_PINS { F7, F6, D4, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/config.h index f5f4c8bd4d..8e4710abb3 100755 --- a/keyboards/kprepublic/bm40hsrgb/config.h +++ b/keyboards/kprepublic/bm40hsrgb/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B2, E6, B5 } #define MATRIX_COL_PINS { B6, C6, B4, D7, D4, D6, C7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h index 63176adb50..2534ffd554 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/34keys/config.h @@ -14,9 +14,6 @@ // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define TAPPING_FORCE_HOLD -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - // Mouse key speed and acceleration. #undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 0 @@ -56,4 +53,4 @@ # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN # undef RGB_MATRIX_STARTUP_MODE // # define RGBLIGHT_HUE_STEP 20 -#endif
\ No newline at end of file +#endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h index b38e4b8fc6..e71078415a 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h @@ -30,9 +30,6 @@ #define AUTO_SHIFT_TIMEOUT TAPPING_TERM #define AUTO_SHIFT_NO_SETUP -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - // Mouse key speed and acceleration. #undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 0 @@ -60,10 +57,6 @@ #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE # undef ENABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h index 2b0d0961c4..a88ae7f2e8 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h index d39f6b95c8..cdfa67acb0 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h index a4634c581e..dbadc3da99 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h @@ -25,10 +25,6 @@ //#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGBLIGHT_LIMIT_VAL 10 -//bootmagic -#define BOOTMAGIC_KEY_SALT KC_V -#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q - #ifdef RGB_MATRIX_ENABLE #define TAPPING_TERM 200 diff --git a/keyboards/kprepublic/bm60hsrgb/rev2/config.h b/keyboards/kprepublic/bm60hsrgb/rev2/config.h index 7a1b051f83..09ba659d65 100644 --- a/keyboards/kprepublic/bm60hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb/rev2/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6, D2, D3, D5, F6 } #define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h index 0a63b7819b..ac80357e9f 100644 --- a/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_ec/rev2/config.h @@ -36,7 +36,6 @@ */ #define MATRIX_ROW_PINS { E6, D2, D3, D5, F6 } #define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h index 177ceb49fd..80dc26907c 100644 --- a/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev2/config.h @@ -35,7 +35,6 @@ */ #define MATRIX_ROW_PINS { E6, D2, D3, D5, F6 } #define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h index 0107d3410d..96d8a450c9 100644 --- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6, D2, D3, D5, F6 } #define MATRIX_COL_PINS { B2, B3, B7, B0, B1, F7, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/config.h b/keyboards/kprepublic/bm65hsrgb/rev1/config.h index 8199a75395..c5e8022d35 100644 --- a/keyboards/kprepublic/bm65hsrgb/rev1/config.h +++ b/keyboards/kprepublic/bm65hsrgb/rev1/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. B3, \ E6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/config.h index d5d96a2644..9b9d534c42 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. B3, \ E6 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h index 0748f83cdc..3ddb813486 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev1/keymaps/peepeetee/config.h @@ -35,7 +35,6 @@ // #define MOUSEKEY_MAX_SPEED 10 // #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/kprepublic/bm68hsrgb/rev2/config.h b/keyboards/kprepublic/bm68hsrgb/rev2/config.h index 946bdaba55..86fbb7ae3b 100644 --- a/keyboards/kprepublic/bm68hsrgb/rev2/config.h +++ b/keyboards/kprepublic/bm68hsrgb/rev2/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { D6, D4, D5, D3, F6 } #define MATRIX_COL_PINS { F0, F1, B0, B1, B2, B3, E6, B7, D2, D7, B4, B5, B6, C6, C7} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm80hsrgb/config.h b/keyboards/kprepublic/bm80hsrgb/config.h index 9246d8066a..049aca9b8a 100644 --- a/keyboards/kprepublic/bm80hsrgb/config.h +++ b/keyboards/kprepublic/bm80hsrgb/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, C6, C7 } #define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4, D5, D3, D2, F5, F6, F7, D1, D0, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h index b322afae9b..97cae26cbd 100644 --- a/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h @@ -22,7 +22,6 @@ // #define TERMINAL_HELP #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too // #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings diff --git a/keyboards/kprepublic/bm80v2/config.h b/keyboards/kprepublic/bm80v2/config.h index a0e9a5d2e1..f04ec1d960 100644 --- a/keyboards/kprepublic/bm80v2/config.h +++ b/keyboards/kprepublic/bm80v2/config.h @@ -21,7 +21,6 @@ #define MATRIX_COLS 17 #define MATRIX_ROW_PINS { C7, C6, B6, F5, F7, F6 } #define MATRIX_COL_PINS { E6, F0, F1, F4, D7, D6, B7, B1, B0, B2, B3, D3, D5, D4, D2, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm80v2_iso/config.h b/keyboards/kprepublic/bm80v2_iso/config.h index 17f8653fd9..aee11c42c9 100644 --- a/keyboards/kprepublic/bm80v2_iso/config.h +++ b/keyboards/kprepublic/bm80v2_iso/config.h @@ -21,7 +21,6 @@ #define MATRIX_COLS 17 #define MATRIX_ROW_PINS { C7, C6, B6, F5, F7, F6 } #define MATRIX_COL_PINS { E6, F0, F1, F4, D7, D6, B7, B1, B0, B2, B3, D3, D5, D4, D2, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/kprepublic/bm980hsrgb/config.h b/keyboards/kprepublic/bm980hsrgb/config.h index 4bcc83da43..af7e3f3be3 100644 --- a/keyboards/kprepublic/bm980hsrgb/config.h +++ b/keyboards/kprepublic/bm980hsrgb/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, B6, B5, B4, F7, F6, D7 } #define MATRIX_COL_PINS { B1, B2, B3, B7, D0, D1, D2, D3, D5, E6, F0, F1, F4, F5, D6 } -// #define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/cospad/config.h b/keyboards/kprepublic/cospad/config.h index 75c7c0990c..895cc57a0d 100644 --- a/keyboards/kprepublic/cospad/config.h +++ b/keyboards/kprepublic/cospad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c index af56305e5c..84324c6e0d 100644 --- a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c +++ b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c @@ -271,7 +271,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Makes sure to update the good tri-layer if a layer changes layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _QWERTY_LAYER: state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); break; @@ -289,8 +289,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { } // Makes the tri-layer -uint32_t default_layer_state_set_kb(uint32_t state) { - switch (biton32(state)) { +layer_state_t default_layer_state_set_kb(layer_state_t state) { + switch (get_highest_layer(state)) { case _QWERTY_LAYER: state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); diff --git a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h index 84c02dddd6..a4d3d37561 100644 --- a/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h +++ b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h @@ -34,8 +34,6 @@ // how long before oneshot times out #define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered - #define QMK_KEYS_PER_SCAN 4 - // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. #define COMBO_TERM 200 diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c index e257649369..c096aaea10 100644 --- a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c @@ -42,7 +42,7 @@ void keyboard_post_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _RAISE: rgblight_sethsv_noeeprom(170,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c index baedbb4dd2..af4c3c84bb 100644 --- a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c @@ -42,7 +42,7 @@ void keyboard_post_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _FUNC: rgblight_sethsv_noeeprom(170,255,255); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/config.h b/keyboards/kprepublic/jj50/keymaps/archetype/config.h index a12e070b4f..17ce95a363 100644 --- a/keyboards/kprepublic/jj50/keymaps/archetype/config.h +++ b/keyboards/kprepublic/jj50/keymaps/archetype/config.h @@ -6,4 +6,4 @@ #define AUTO_SHIFT_TIMEOUT 150 #define NO_AUTO_SHIFT_ALPHA #define TAPPING_TERM 150 -//#define BOOTMAGIC_KEY_SALT KC_LCTL +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c index 82c615f135..ff59ef43e5 100644 --- a/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c +++ b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c @@ -167,9 +167,18 @@ qk_tap_dance_action_t tap_dance_actions[] = { // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset), // Layer Switcher ESC - [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100), + [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, layer_switcher, layer_switcher_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_ESC_LAYER): + return 100; + default: + return TAPPING_TERM; + } +} + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ktec/daisy/config.h b/keyboards/ktec/daisy/config.h index 83b9464cc0..ec826ab1af 100644 --- a/keyboards/ktec/daisy/config.h +++ b/keyboards/ktec/daisy/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, D5, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c b/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c index 09854ee89c..3910756f81 100644 --- a/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c @@ -179,7 +179,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ktec/ergodone/keymaps/erovia/keymap.c b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c index 279c8a57c1..502c0dafe6 100644 --- a/keyboards/ktec/ergodone/keymaps/erovia/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c @@ -204,7 +204,7 @@ void matrix_init_user(void) { layer_state_t layer_state_set_user(layer_state_t state) { ergodox_led_all_off(); - switch (biton32(state)) { + switch (get_highest_layer(state)) { case FN: // Red led on Pro Micro for Fn layer ergodox_board_led_on(); diff --git a/keyboards/ktec/ergodone/keymaps/kloki/keymap.c b/keyboards/ktec/ergodone/keymaps/kloki/keymap.c index 87e96d20fd..1347f8f501 100644 --- a/keyboards/ktec/ergodone/keymaps/kloki/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/kloki/keymap.c @@ -198,7 +198,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ktec/ergodone/keymaps/vega/keymap.c b/keyboards/ktec/ergodone/keymaps/vega/keymap.c index 6105cddf15..a0dddd5791 100644 --- a/keyboards/ktec/ergodone/keymaps/vega/keymap.c +++ b/keyboards/ktec/ergodone/keymaps/vega/keymap.c @@ -807,7 +807,7 @@ void matrix_init_user(void){ // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ktec/staryu/config.h b/keyboards/ktec/staryu/config.h index c11d3e074b..876d61223f 100755 --- a/keyboards/ktec/staryu/config.h +++ b/keyboards/ktec/staryu/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { NO_PIN, D0, D1 }, \ { D4, D3, D2 }, \ } -#define UNUSED_PINS #define RGB_DI_PIN C6 #define RGBLED_NUM 1 // Number of LEDs diff --git a/keyboards/kv/revt/config.h b/keyboards/kv/revt/config.h index 49079a6bc2..19e72ad573 100644 --- a/keyboards/kv/revt/config.h +++ b/keyboards/kv/revt/config.h @@ -22,7 +22,6 @@ #define MATRIX_COLS 21 #define MATRIX_ROW_PINS { A6, B13, B8, A0, A1, A2 } #define MATRIX_COL_PINS { B7, B6, B5, B4, B3, B2, B14, B1, B15, B0, B9, B10, B11, B12, A14, A13, A4, A5, A7, A8, A15 } -#define UNUSED_PINS { } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kwub/bloop/config.h b/keyboards/kwub/bloop/config.h index 832fb98d9d..5abbd8d4f9 100644 --- a/keyboards/kwub/bloop/config.h +++ b/keyboards/kwub/bloop/config.h @@ -27,7 +27,6 @@ { F5, F4, C6, C7, D7 } #define MATRIX_COL_PINS \ { B4, B5, B6, F6, F1, F7, F0, B0, B7, D3, D2, D1, D5, D4, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ky01/config.h b/keyboards/ky01/config.h index b5ad4a25e8..47edbd2605 100644 --- a/keyboards/ky01/config.h +++ b/keyboards/ky01/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B5, B4, D7, D4, D6 } #define MATRIX_COL_PINS { B3, B7, D0, D1, D2, D3, D5, F0, F1, F4, F5, F6, F7, C7, C6, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/labbe/labbeminiv1/config.h b/keyboards/labbe/labbeminiv1/config.h index 5a561fecad..4b47be8db8 100644 --- a/keyboards/labbe/labbeminiv1/config.h +++ b/keyboards/labbe/labbeminiv1/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F5, F6 } #define MATRIX_COL_PINS { F0, F1, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/labyrinth75/config.h b/keyboards/labyrinth75/config.h index 97ede34376..c944d14ed5 100644 --- a/keyboards/labyrinth75/config.h +++ b/keyboards/labyrinth75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, E6, D7, C6, D4, D0, D1, D2, D3 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/latincompass/latin17rgb/config.h b/keyboards/latincompass/latin17rgb/config.h index c9e5913f52..585f632c40 100644 --- a/keyboards/latincompass/latin17rgb/config.h +++ b/keyboards/latincompass/latin17rgb/config.h @@ -35,7 +35,6 @@ */ #define MATRIX_ROW_PINS {C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS {F7, F6, F5, F4} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/latincompass/latin47ble/config.h b/keyboards/latincompass/latin47ble/config.h index 2e69294bb5..019e18751d 100644 --- a/keyboards/latincompass/latin47ble/config.h +++ b/keyboards/latincompass/latin47ble/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { D6, D7, B5, B6 ,C6, C7, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/latincompass/latin60rgb/config.h b/keyboards/latincompass/latin60rgb/config.h index e975e6eaf9..0058297dda 100644 --- a/keyboards/latincompass/latin60rgb/config.h +++ b/keyboards/latincompass/latin60rgb/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS {C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS {F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3, D6, D4, D3} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/latincompass/latin64ble/config.h b/keyboards/latincompass/latin64ble/config.h index 901b957b52..5bb3ca4562 100644 --- a/keyboards/latincompass/latin64ble/config.h +++ b/keyboards/latincompass/latin64ble/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/ #define MATRIX_COLS 8 #define MATRIX_ROW_PINS { D0, D1, D2, D3, D6, D7, B5, B6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/latincompass/latin6rgb/config.h b/keyboards/latincompass/latin6rgb/config.h index f5ff59d697..17083580a6 100644 --- a/keyboards/latincompass/latin6rgb/config.h +++ b/keyboards/latincompass/latin6rgb/config.h @@ -36,7 +36,6 @@ */ #define MATRIX_ROW_PINS {C7, C6 } #define MATRIX_COL_PINS {F7, F6, F5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/latincompass/latinpad/config.h b/keyboards/latincompass/latinpad/config.h index bf9538e32d..255ddc89db 100644 --- a/keyboards/latincompass/latinpad/config.h +++ b/keyboards/latincompass/latinpad/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/ #define MATRIX_COLS 4 #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1 } #define MATRIX_COL_PINS { D4, C6, D7, E6 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/latincompass/latinpadble/config.h b/keyboards/latincompass/latinpadble/config.h index 8d7976ae56..09198df612 100644 --- a/keyboards/latincompass/latinpadble/config.h +++ b/keyboards/latincompass/latinpadble/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/ #define MATRIX_COLS 4 #define MATRIX_ROW_PINS { F0, F6, F5, F4, F1 } #define MATRIX_COL_PINS { D6, D7, B5, B6 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h index 7ed6da4064..c9200e2d18 100644 --- a/keyboards/lazydesigners/dimple/config.h +++ b/keyboards/lazydesigners/dimple/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h index 9ffa915e22..53ee2b2bbb 100644 --- a/keyboards/lazydesigners/the50/config.h +++ b/keyboards/lazydesigners/the50/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3 } #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lazydesigners/the60/rev1/config.h b/keyboards/lazydesigners/the60/rev1/config.h index 4c6f606a0e..4d50f75296 100755 --- a/keyboards/lazydesigners/the60/rev1/config.h +++ b/keyboards/lazydesigners/the60/rev1/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index fb8a5d581f..3034c0e2f4 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { B7, D4, D6, F6, F7} \ } -#define UNUSED_PINS /* rotary encoder 1,2,3 closest to usb port is 0*/ #define ENCODERS_PAD_A { D0} diff --git a/keyboards/leeku/finger65/config.h b/keyboards/leeku/finger65/config.h index 97d3835b4b..10cf15b91f 100644 --- a/keyboards/leeku/finger65/config.h +++ b/keyboards/leeku/finger65/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_ROW_PINS { C3, C4, C5, C6, C7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/leeku/finger65/keymaps/madhatter/keymap.c b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c index a69fe69153..f73b0371a1 100644 --- a/keyboards/leeku/finger65/keymaps/madhatter/keymap.c +++ b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // layer_state_t layer_state_set_user(layer_state_t state) { -// switch(biton32(state)) { +// switch(get_highest_layer(state)) { // case _FNMS: // led_off(); // rgb_on(); diff --git a/keyboards/lets_split/keymaps/OLED_sample/config.h b/keyboards/lets_split/keymaps/OLED_sample/config.h deleted file mode 100644 index 6aa909d284..0000000000 --- a/keyboards/lets_split/keymaps/OLED_sample/config.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_I2C -//#define USE_SERIAL - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS -#define FLIP_HALF - -#define SSD1306OLED -//#define OLED_ROTATE180 - -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#ifdef SUBPROJECT_rev1 - #include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "../../rev2/config.h" -#endif - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 6 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c deleted file mode 100644 index a34d5a32be..0000000000 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ /dev/null @@ -1,415 +0,0 @@ -#include QMK_KEYBOARD_H -#include <LUFA/Drivers/Peripheral/TWI.h> -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; - - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, - M_SAMPLE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, RESET, _______, M_SAMPLE, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -// Setting ADJUST layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - rgblight_mode(RGB_current_mode); - layer_on(layer3); - } else { - layer_off(layer3); - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - rgblight_mode(16); - } - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - TOG_STATUS = false; - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - rgblight_mode(15); - } - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - layer_off(_RAISE); - TOG_STATUS = false; - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGB_MOD: - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - return false; - break; - case M_SAMPLE: - if (record->event.pressed){ - SEND_STRING("hello world"); - } - return false; - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif - RGB_current_mode = rgblight_config.mode; -} - -//SSD1306 OLED init and update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED -void matrix_master_OLED_init (void) { - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display -} - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} -#endif - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); - matrix_write(&matrix, led); - matrix_update(&display, &matrix); -} diff --git a/keyboards/lets_split/keymaps/OLED_sample/readme.md b/keyboards/lets_split/keymaps/OLED_sample/readme.md deleted file mode 100644 index 02888855b8..0000000000 --- a/keyboards/lets_split/keymaps/OLED_sample/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -SSD1306 OLED Display via I2C -====== - -Features --------- - -Some features supported by the firmware: - - -* I2C connection between the two halves is required as the OLED display will use this connection as well. Note this - requires pull-up resistors on the data and clock lines. -* OLED display will connect from either side - - -Wiring ------- - - -Work in progress... - - -OLED Configuration -------------------------------- - -Work in progress... diff --git a/keyboards/lets_split/keymaps/OLED_sample/rules.mk b/keyboards/lets_split/keymaps/OLED_sample/rules.mk deleted file mode 100644 index e1716e0c02..0000000000 --- a/keyboards/lets_split/keymaps/OLED_sample/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -SRC += ssd1306.c - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c index c4c26d56bc..27cd9db8b4 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -183,7 +183,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); if (rgb_layer_change) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _RAISE: rgblight_set_orange; rgblight_mode(5); diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index 62e3570468..eb22a1509e 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -255,7 +255,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); writePin(B0, !(state & (1UL << (_NUMPAD)))); - switch(biton32(state)) { + switch(get_highest_layer(state)) { case _RAISE: rgblight_setrgb_at(255, 255, 255, RGBLED_NUM / 2); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h index 1b3fd7544e..c3975da3ca 100644 --- a/keyboards/lets_split/keymaps/piemod/config.h +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -42,7 +42,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_EFFECT_SNAKE_LENGTH 1 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 1 -// Typing Options -#define QMK_KEYS_PER_SCAN 4 - #endif diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c index d723e0c026..8bc32a1eb7 100644 --- a/keyboards/lets_split/keymaps/pitty/keymap.c +++ b/keyboards/lets_split/keymaps/pitty/keymap.c @@ -128,7 +128,7 @@ void persistent_default_layer_set(uint16_t default_layer) { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _NAV: if (RGB_INIT) {} else { diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index 02d9aa21cc..4ecf59006e 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -7,7 +7,6 @@ #define MATRIX_COLS 16 #define MATRIX_ROW_PINS {B0, B3, B2, B1, F5} #define MATRIX_COL_PINS {E6, F4, B7, D5, D3, D2, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4} -#define UNUSED_PINS {} #define RGBLED_NUM 20 // Number of LEDs #define QMK_ESC_OUTPUT E6 // usually COL diff --git a/keyboards/lfkeyboards/lfk78/revb/config.h b/keyboards/lfkeyboards/lfk78/revb/config.h index 34ca869c5f..b94cf4be27 100644 --- a/keyboards/lfkeyboards/lfk78/revb/config.h +++ b/keyboards/lfkeyboards/lfk78/revb/config.h @@ -16,6 +16,5 @@ */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { E6, F7, D2, D3, D4, D5, D6, D7 } -#define UNUSED_PINS #define RGBLED_NUM 31 diff --git a/keyboards/lfkeyboards/lfk78/revc/config.h b/keyboards/lfkeyboards/lfk78/revc/config.h index 1a62dfe4f3..c7c7bc9b5f 100644 --- a/keyboards/lfkeyboards/lfk78/revc/config.h +++ b/keyboards/lfkeyboards/lfk78/revc/config.h @@ -16,6 +16,5 @@ */ #define MATRIX_ROW_PINS { D2, D3, D4, D5, D6 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, E6, E7, F0, F1, F2, F3, C0, C1, C2, C3 } -#define UNUSED_PINS #define RGBLED_NUM 27 diff --git a/keyboards/lfkeyboards/lfk78/revj/config.h b/keyboards/lfkeyboards/lfk78/revj/config.h index 1a62dfe4f3..c7c7bc9b5f 100644 --- a/keyboards/lfkeyboards/lfk78/revj/config.h +++ b/keyboards/lfkeyboards/lfk78/revj/config.h @@ -16,6 +16,5 @@ */ #define MATRIX_ROW_PINS { D2, D3, D4, D5, D6 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, E6, E7, F0, F1, F2, F3, C0, C1, C2, C3 } -#define UNUSED_PINS #define RGBLED_NUM 27 diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index 7d19335eec..a7b7415e02 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {D2, D3, D4, D5, D6, D7 } #define MATRIX_COL_PINS {A0, A1, A2, A3, A4, A5, A6, A7, E6, E7,\ F0, F1, F2, F3, C0, C1, C2 } - #define UNUSED_PINS {B0, B1, B2, B3, B4, B4, B5, B6, B7, C4, C5, C6, C7,\ - D0, D1, E0, E1, E2, E3, E4, F4, F5, F6, F7} #define RGBLED_NUM 25 // Number of LEDs #else /* RevC/D Matrix config */ @@ -37,8 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 16 #define MATRIX_ROW_PINS {F2, D7, D6, D5, D4, D3, F3} #define MATRIX_COL_PINS {A0, A1, A2, A3, A4, A5, A6, A7, C7, C1, C0, E1, E0, C2, C3, C4} - #define UNUSED_PINS {B0, B1, B2, B3, B4, B4, B5, B6, B7, C5, C6, D2, E3, E4, E5, E6, E7, \ - F0, F1, F4, F5, F6, F7} #define RGBLED_NUM 24 // Number of LEDs #endif diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index 7f91008573..84dfdad009 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, F4, F6, F7, C7, C6 } #define MATRIX_COL_PINS { F1, F0, D4, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h index a9f61f849c..0f9ddaef31 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h +++ b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h @@ -19,9 +19,6 @@ /* 1000Hz USB polling */ #define USB_POLLING_INTERVAL_MS 1 -/* Send up to 4 key press events per scan */ -#define QMK_KEYS_PER_SCAN 4 - /* Force NKRO on boot up */ #define FORCE_NKRO diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index 7959c15de0..b304db7548 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 19 #define MATRIX_ROW_PINS {D7, E1, F2, F0, F1} #define MATRIX_COL_PINS {E6, E0, A3, A4, A5, A6, A7, C7, C5, C4, C3, C2, C1, C0, D6, A2, A1, A0, F3} - #define UNUSED_PINS {} #define RGBLED_NUM 26 // Number of LEDs #define AUDIO_VOICES diff --git a/keyboards/lfkeyboards/smk65/revb/config.h b/keyboards/lfkeyboards/smk65/revb/config.h index ecb183e8af..26fcc540f4 100644 --- a/keyboards/lfkeyboards/smk65/revb/config.h +++ b/keyboards/lfkeyboards/smk65/revb/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MATRIX_COLS 16 // #define MATRIX_ROW_PINS {B7, F7, F6, F5, F4} // #define MATRIX_COL_PINS {F0, F1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, B3, B2, B1, B0} -// #define UNUSED_PINS {} // RevB #define DIODE_DIRECTION COL2ROW @@ -37,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 16 #define MATRIX_ROW_PINS {D6, D7, E0, C3, C4} #define MATRIX_COL_PINS {F2, C5, E5, E4, B7, B6, B5, B4, B3, B2, B1, B0, E1, C0, C1, C2} -#define UNUSED_PINS {} #define RGBLED_NUM 20 // Number of LEDs //RevB only: diff --git a/keyboards/lfkeyboards/smk65/revf/config.h b/keyboards/lfkeyboards/smk65/revf/config.h index 1b8295b152..40d4e8cb79 100644 --- a/keyboards/lfkeyboards/smk65/revf/config.h +++ b/keyboards/lfkeyboards/smk65/revf/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B3, B2, B1, F5 } #define MATRIX_COL_PINS { E6, F4, B7, D5, D3, D2, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c index 0e9dd7039b..868d8e5cb4 100644 --- a/keyboards/lily58/lib/layer_state_reader.c +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -28,7 +28,7 @@ const char *read_layer_state(void) { snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); break; default: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%u", layer_state); } return layer_state_str; diff --git a/keyboards/linworks/dolice/config.h b/keyboards/linworks/dolice/config.h index f46e052ad6..b8648e64db 100644 --- a/keyboards/linworks/dolice/config.h +++ b/keyboards/linworks/dolice/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F5, F4, F6, F7, B0, B7, D7, D6, D4 } #define MATRIX_COL_PINS { E6, F0, F1, B4, D5, D3, D2, B2 } -#define UNUSED_PINS { B1, B3, D0, D1, E2 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/linworks/fave65h/config.h b/keyboards/linworks/fave65h/config.h index 9c45f0426b..5fac33e7d5 100644 --- a/keyboards/linworks/fave65h/config.h +++ b/keyboards/linworks/fave65h/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D1, D0, D2, D3, D5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/linworks/fave84h/config.h b/keyboards/linworks/fave84h/config.h index fd1a6554f0..e9e69f3b66 100644 --- a/keyboards/linworks/fave84h/config.h +++ b/keyboards/linworks/fave84h/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B1, B2, B3, D3, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, B0, B7, E6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/linworks/fave87/config.h b/keyboards/linworks/fave87/config.h index 3e2671e7a5..867f66ed1e 100644 --- a/keyboards/linworks/fave87/config.h +++ b/keyboards/linworks/fave87/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D5, D1, D2, D4, D0, F5, F4, F7, F6, B5, B4 } #define MATRIX_COL_PINS { F1, F0, E6, B0, B1, B2, B3, D6, D7 } -#define UNUSED_PINS { B6, C6, C7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/linworks/fave87h/config.h b/keyboards/linworks/fave87h/config.h index 0a7a0244e7..54850aec3f 100644 --- a/keyboards/linworks/fave87h/config.h +++ b/keyboards/linworks/fave87h/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B1, B2, B3, D3, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, B0, B7, E6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/linworks/whale75/config.h b/keyboards/linworks/whale75/config.h index b998effd38..d70ff939e3 100644 --- a/keyboards/linworks/whale75/config.h +++ b/keyboards/linworks/whale75/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7, A0 } #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 } -#define UNUSED_PINS { C13, C14, C15 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/littlealby/mute/config.h b/keyboards/littlealby/mute/config.h index b960708365..aafdddbf9e 100644 --- a/keyboards/littlealby/mute/config.h +++ b/keyboards/littlealby/mute/config.h @@ -30,7 +30,6 @@ #define DIRECT_PINS { \ {B5} \ } -#define UNUSED_PINS #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B6 diff --git a/keyboards/lizard_trick/tenkey_plusplus/config.h b/keyboards/lizard_trick/tenkey_plusplus/config.h index ffda3cad5b..3e9e0d37dc 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/config.h +++ b/keyboards/lizard_trick/tenkey_plusplus/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7 } #define MATRIX_COL_PINS { D5, D3, D2, F7 } -#define UNUSED_PINS #define ENCODERS_PAD_A \ { B4, F0, F4 } diff --git a/keyboards/ll3macorn/bongopad/config.h b/keyboards/ll3macorn/bongopad/config.h index 9a9214dd43..9e1affd59e 100644 --- a/keyboards/ll3macorn/bongopad/config.h +++ b/keyboards/ll3macorn/bongopad/config.h @@ -19,7 +19,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F7, D7, C6, D4 } #define MATRIX_COL_PINS { F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lm_keyboard/lm60n/config.h b/keyboards/lm_keyboard/lm60n/config.h index b11962d822..813fc5b19c 100644 --- a/keyboards/lm_keyboard/lm60n/config.h +++ b/keyboards/lm_keyboard/lm60n/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F5, F6, F7, B3, B2, B1 } #define MATRIX_COL_PINS { B4, D7, D6, D4, D5, D3, D2, D1, D0, C6, B6, B5, F4, F0, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/alexa/config.h b/keyboards/lucid/alexa/config.h index 433c43b5d2..07a73c30fd 100644 --- a/keyboards/lucid/alexa/config.h +++ b/keyboards/lucid/alexa/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/alexa_solder/config.h b/keyboards/lucid/alexa_solder/config.h index 6bbd9eb32d..4b04217ef7 100644 --- a/keyboards/lucid/alexa_solder/config.h +++ b/keyboards/lucid/alexa_solder/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/kbd8x_hs/config.h b/keyboards/lucid/kbd8x_hs/config.h index e6e587c458..99a8ff4729 100644 --- a/keyboards/lucid/kbd8x_hs/config.h +++ b/keyboards/lucid/kbd8x_hs/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B4, B5, B6, C0, E1, E0 } #define MATRIX_COL_PINS { F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/phantom_hs/config.h b/keyboards/lucid/phantom_hs/config.h index bf9f1f371e..f5b6189e90 100644 --- a/keyboards/lucid/phantom_hs/config.h +++ b/keyboards/lucid/phantom_hs/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/phantom_solder/config.h b/keyboards/lucid/phantom_solder/config.h index 2fdc7ef475..6fdca244b6 100644 --- a/keyboards/lucid/phantom_solder/config.h +++ b/keyboards/lucid/phantom_solder/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { F4, F1, F7, F6, F5 } #define MATRIX_COL_PINS { F0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lucid/scarlet/config.h b/keyboards/lucid/scarlet/config.h index 3435720623..118b32d688 100644 --- a/keyboards/lucid/scarlet/config.h +++ b/keyboards/lucid/scarlet/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B4, B5, B6, C0, E1, E0 } #define MATRIX_COL_PINS { F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lw67/config.h b/keyboards/lw67/config.h index 0153a72c30..9f8ed50654 100644 --- a/keyboards/lw67/config.h +++ b/keyboards/lw67/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, B7, D0, D1, D2 } #define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, B0, B1 } -#define UNUSED_PINS /*ENCODER*/ #define ENCODERS_PAD_A { F0 } diff --git a/keyboards/lyso1/lck75/config.h b/keyboards/lyso1/lck75/config.h index 2a9c2c3c80..a631992eb8 100644 --- a/keyboards/lyso1/lck75/config.h +++ b/keyboards/lyso1/lck75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15*/ #define MATRIX_ROW_PINS { C2, C3, C7, C4, C6, C5 } #define MATRIX_COL_PINS { A0, B0, A1, B1, A2, B2, A3, B3, A4, B4, A5, A6, A7, D7, D6, D5 } -#define UNUSED_PINS #define ENCODERS_PAD_B { D1 } #define ENCODERS_PAD_A { D0 } diff --git a/keyboards/lyso1/lefishe/config.h b/keyboards/lyso1/lefishe/config.h index dff7d1503f..fe324c20e2 100644 --- a/keyboards/lyso1/lefishe/config.h +++ b/keyboards/lyso1/lefishe/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B7, F7, F6, F5, F4 } #define MATRIX_COL_PINS { F0, F1, D5, C7, C6, B6, B5, B4, D7, D6, D4, D3, D2, D1, D0, B3, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lz/erghost/config.h b/keyboards/lz/erghost/config.h index 41dac1ccbd..2bc1c8b599 100644 --- a/keyboards/lz/erghost/config.h +++ b/keyboards/lz/erghost/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/m10a/config.h b/keyboards/m10a/config.h index a04f8e4025..8a5b36f4fe 100644 --- a/keyboards/m10a/config.h +++ b/keyboards/m10a/config.h @@ -27,7 +27,6 @@ /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { B6, F7, F6, D6 } #define MATRIX_COL_PINS { F5, F1, F0 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/m10a/keymaps/gam3cat/keymap.c b/keyboards/m10a/keymaps/gam3cat/keymap.c index f962246ef3..86231f8406 100644 --- a/keyboards/m10a/keymaps/gam3cat/keymap.c +++ b/keyboards/m10a/keymaps/gam3cat/keymap.c @@ -115,7 +115,7 @@ void matrix_scan_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _L0: custom_backlight_level(0); break; diff --git a/keyboards/machine_industries/m4_a/config.h b/keyboards/machine_industries/m4_a/config.h index d5f02ebffd..6922ab8a66 100644 --- a/keyboards/machine_industries/m4_a/config.h +++ b/keyboards/machine_industries/m4_a/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { C7, C6 } #define MATRIX_COL_PINS { F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/macro1/config.h b/keyboards/macro1/config.h index d9ba969b3c..66449ee8cc 100644 --- a/keyboards/macro1/config.h +++ b/keyboards/macro1/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, B7, D0, D1, D2, B3 } #define MATRIX_COL_PINS { D3, D4, D6, D7 } -#define UNUSED_PINS /*ENCODER*/ #define ENCODERS_PAD_A { F0 } diff --git a/keyboards/macro3/config.h b/keyboards/macro3/config.h index 9fa5d0ec18..bfd60418a7 100644 --- a/keyboards/macro3/config.h +++ b/keyboards/macro3/config.h @@ -19,7 +19,6 @@ #define ENCODERS_PAD_A { D2, F7 } #define ENCODERS_PAD_B { D3, F6 } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/makrosu/config.h b/keyboards/makrosu/config.h index df9edb2f1c..f441a16f7a 100644 --- a/keyboards/makrosu/config.h +++ b/keyboards/makrosu/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B6 } #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5} -#define UNUSED_PINS #define ENCODERS_PAD_A { E6 } #define ENCODERS_PAD_B { D1 } diff --git a/keyboards/manta60/config.h b/keyboards/manta60/config.h index c0a58cd64b..ce4120249c 100644 --- a/keyboards/manta60/config.h +++ b/keyboards/manta60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 ,B4} #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/manyboard/macro/config.h b/keyboards/manyboard/macro/config.h index ebab49e36a..6b49e670ba 100644 --- a/keyboards/manyboard/macro/config.h +++ b/keyboards/manyboard/macro/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { D4, D5, D6, D7 } -#define UNUSED_PINS /*Encoder Pins*/ #define ENCODERS_PAD_A { C6 } diff --git a/keyboards/maple_computing/6ball/config.h b/keyboards/maple_computing/6ball/config.h index 591fae2d3e..40fb44e7a7 100644 --- a/keyboards/maple_computing/6ball/config.h +++ b/keyboards/maple_computing/6ball/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { F5 } #define MATRIX_COL_PINS { F4, D4, B5, B6, B2, F6 } -#define UNUSED_PINS /* ws2812 RGB LED */ #define RGB_DI_PIN F7 diff --git a/keyboards/maple_computing/christmas_tree/config.h b/keyboards/maple_computing/christmas_tree/config.h index 531c5996d2..984debea4b 100644 --- a/keyboards/maple_computing/christmas_tree/config.h +++ b/keyboards/maple_computing/christmas_tree/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D3, F4, D0, F6, F5, D4 } #define MATRIX_COL_PINS { D1 } -#define UNUSED_PINS #define BACKLIGHT_PIN D2 diff --git a/keyboards/maple_computing/ivy/rev1/config.h b/keyboards/maple_computing/ivy/rev1/config.h index 9b88b89e5e..70747bdcaf 100644 --- a/keyboards/maple_computing/ivy/rev1/config.h +++ b/keyboards/maple_computing/ivy/rev1/config.h @@ -22,6 +22,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Let's Macro V2 pin-out */ #define MATRIX_ROW_PINS { F1, B2, D3 } #define MATRIX_COL_PINS { F5, B3, D5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maple_computing/jnao/config.h b/keyboards/maple_computing/jnao/config.h index d89ca3ddee..e8a2ca39b8 100644 --- a/keyboards/maple_computing/jnao/config.h +++ b/keyboards/maple_computing/jnao/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E6, F0, F5, F6, F7 } #define MATRIX_COL_PINS { F1, F4, B1, B2, B3, B7, D1, D2, D4, D6, D7, B4 } -#define UNUSED_PINS #define BACKLIGHT_PIN D0 diff --git a/keyboards/maple_computing/launchpad/rev1/config.h b/keyboards/maple_computing/launchpad/rev1/config.h index debc28fab3..baceaa43f7 100644 --- a/keyboards/maple_computing/launchpad/rev1/config.h +++ b/keyboards/maple_computing/launchpad/rev1/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Let's Macro V2 pin-out */ #define MATRIX_ROW_PINS { C6, B1, B3, D7 } #define MATRIX_COL_PINS { D2, F7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maple_computing/lets_split_eh/eh/config.h b/keyboards/maple_computing/lets_split_eh/eh/config.h index 43e0266502..b9e6da535d 100644 --- a/keyboards/maple_computing/lets_split_eh/eh/config.h +++ b/keyboards/maple_computing/lets_split_eh/eh/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Let's Split EH? pin-out */ #define MATRIX_ROW_PINS { B1, B3, D7, B4 } #define MATRIX_COL_PINS { F4, F5, C6, B6, B5, D5 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maple_computing/lets_split_eh/keymaps/romus/keymap.c b/keyboards/maple_computing/lets_split_eh/keymaps/romus/keymap.c index ba5b75a5cf..398a324a0f 100644 --- a/keyboards/maple_computing/lets_split_eh/keymaps/romus/keymap.c +++ b/keyboards/maple_computing/lets_split_eh/keymaps/romus/keymap.c @@ -5,8 +5,8 @@ void matrix_init_keymap (void) { } -uint32_t layer_state_set_keymap(uint32_t state) { - +layer_state_t layer_state_set_keymap(layer_state_t state) { + return state; } diff --git a/keyboards/maple_computing/minidox/keymaps/norman/config.h b/keyboards/maple_computing/minidox/keymaps/norman/config.h index 0d3542a03e..ecdf080c2c 100644 --- a/keyboards/maple_computing/minidox/keymaps/norman/config.h +++ b/keyboards/maple_computing/minidox/keymaps/norman/config.h @@ -1,5 +1,4 @@ #pragma once #define PERMISSIVE_HOLD -#define QMK_KEYS_PER_SCAN 4 #define TAPPING_TERM 160 diff --git a/keyboards/maple_computing/the_ruler/config.h b/keyboards/maple_computing/the_ruler/config.h index 61027372b9..f7ccfab276 100644 --- a/keyboards/maple_computing/the_ruler/config.h +++ b/keyboards/maple_computing/the_ruler/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7 } #define MATRIX_COL_PINS { D6, D7, B4, B5, B6, C6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/leftover30/config.h b/keyboards/marksard/leftover30/config.h index 93fd345776..0e23869558 100644 --- a/keyboards/marksard/leftover30/config.h +++ b/keyboards/marksard/leftover30/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, F7, F6, B3, B1, D4, D0 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h index 4448e51268..dcb27a0a3e 100644 --- a/keyboards/marksard/rhymestone/rev1/config.h +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/treadstone32/lite/config.h b/keyboards/marksard/treadstone32/lite/config.h index 90db1a7895..d1afa59beb 100644 --- a/keyboards/marksard/treadstone32/lite/config.h +++ b/keyboards/marksard/treadstone32/lite/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B2, F7, F6, B3, B1, F4, F5 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/treadstone32/rev1/config.h b/keyboards/marksard/treadstone32/rev1/config.h index 3f21ad59c5..b844b874dd 100644 --- a/keyboards/marksard/treadstone32/rev1/config.h +++ b/keyboards/marksard/treadstone32/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F0, E6, B2, B4, D7, D6, D4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/treadstone48/rev1/config.h b/keyboards/marksard/treadstone48/rev1/config.h index 0945f92e95..0666e18cad 100644 --- a/keyboards/marksard/treadstone48/rev1/config.h +++ b/keyboards/marksard/treadstone48/rev1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/marksard/treadstone48/rev2/config.h b/keyboards/marksard/treadstone48/rev2/config.h index 7b18e4d898..b6d8269d88 100644 --- a/keyboards/marksard/treadstone48/rev2/config.h +++ b/keyboards/marksard/treadstone48/rev2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 2ab9c26d2c..127b07d223 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A00, A01, A02, A03, A04 } #define MATRIX_COL_PINS { B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, A05, A06, A07, A10, A11 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/massdrop/alt/keymaps/b_/config.h b/keyboards/massdrop/alt/keymaps/b_/config.h index ca4424bd3f..b7112c9ea7 100644 --- a/keyboards/massdrop/alt/keymaps/b_/config.h +++ b/keyboards/massdrop/alt/keymaps/b_/config.h @@ -23,7 +23,6 @@ // #define MOUSEKEY_MAX_SPEED 10 // #define MOUSEKEY_WHEEL_DELAY 0 //#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 19fc4fed34..936951e34a 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -36,7 +36,6 @@ // #define MOUSEKEY_MAX_SPEED 10 // #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/massdrop/alt/keymaps/pregame/rules.mk b/keyboards/massdrop/alt/keymaps/pregame/rules.mk index 184405662a..5981633f7c 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/rules.mk +++ b/keyboards/massdrop/alt/keymaps/pregame/rules.mk @@ -8,7 +8,6 @@ DYNAMIC_MACRO_ENABLE = no # Dynamic macro recording and play MOUSEKEY_ENABLE = no # Enable mouse control keycodes. Increases firmware size. TAP_DANCE_ENABLE = no # Enable tap dance keys CONSOLE_ENABLE = no # Enable debugging console. Increases firmware size. -TERMINAL_ENABLE = no EXTRAKEY_ENABLE = yes # Audio control and System control # RAW_ENABLE = yes # Raw HID has not yet been implemented for this keyboard # COMBO_ENABLE # Key combo feature diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 15abcaa674..27f3d935a9 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B04, B05, B06, B07, B08, B09, A10, A11, B10, B11, B12 } #define MATRIX_COL_PINS { A00, A01, A02, A03, A04, A05, A06, A07 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index 4850d7eed2..d0bbfd2103 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -20,7 +20,6 @@ #define MOUSEKEY_MAX_SPEED 10 #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk index 9502c242dd..c4fab8ad53 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk @@ -7,7 +7,6 @@ MOUSEKEY_ENABLE = yes # Enable mouse control keycodes. Increases firmware size TAP_DANCE_ENABLE = yes # Enable tap dance keys CONSOLE_ENABLE = yes # Enable debugging console. Increases firmware size. SRC += config_led.c # Used to add files to the compilation/linking list. -TERMINAL_ENABLE = yes EXTRAKEY_ENABLE = yes # Audio control and System control # RAW_ENABLE = yes # Raw HID has not yet been implemented for this keyboard # COMBO_ENABLE # Key combo feature diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 81e7764a9e..692faa35a2 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MOUSEKEY_MAX_SPEED 10 // #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk index e834404e29..4bb43f525b 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -7,7 +7,6 @@ MOUSEKEY_ENABLE = no # Enable mouse control keycodes. Increases firmware size. TAP_DANCE_ENABLE = no # Enable tap dance keys CONSOLE_ENABLE = no # Enable debugging console. Increases firmware size. SRC += config_led.c # Used to add files to the compilation/linking list. -TERMINAL_ENABLE = no EXTRAKEY_ENABLE = yes # Audio control and System control #RAW_ENABLE = yes #Raw HID has not yet been implemented for this keyboard #COMBO_ENABLE #Key combo feature diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h index 37987340ce..f1cbd5f3b0 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h @@ -36,7 +36,6 @@ #define MOUSEKEY_MAX_SPEED 10 #define MOUSEKEY_WHEEL_DELAY 0 #define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. // #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) // #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap // #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/rules.mk b/keyboards/massdrop/ctrl/keymaps/xanimos/rules.mk index 43a312ce4e..2913eff83b 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/rules.mk @@ -8,7 +8,6 @@ TAP_DANCE_ENABLE = yes # Enable tap dance keys CONSOLE_ENABLE = no # Enable debugging console. Increases firmware size. SRC += config_led.c # Used to add files to the compilation/linking list. EXTRAKEY_ENABLE = yes # Audio control and System control -TERMINAL_ENABLE = no # RAW_ENABLE = yes # Raw HID has not yet been implemented for this keyboard # COMBO_ENABLE # Key combo feature # LEADER_ENABLE # Enable leader key chording diff --git a/keyboards/masterworks/classy_tkl/rev_a/config.h b/keyboards/masterworks/classy_tkl/rev_a/config.h index 0821b1dfce..9d9c02effe 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/config.h +++ b/keyboards/masterworks/classy_tkl/rev_a/config.h @@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { C7, F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS \ { B4, D7, D6, D4, C6, D5, D3, D2, D1, D0, B7, B3, B2, B1, B0, E6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matchstickworks/southpad/config.h b/keyboards/matchstickworks/southpad/config.h index 6ccf439740..3e11e34467 100644 --- a/keyboards/matchstickworks/southpad/config.h +++ b/keyboards/matchstickworks/southpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B5, B6, B7, C7, C6 } #define MATRIX_COL_PINS { B0, B1, B2, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matrix/abelx/config.h b/keyboards/matrix/abelx/config.h index 218e3b53a4..29241f1ff6 100644 --- a/keyboards/matrix/abelx/config.h +++ b/keyboards/matrix/abelx/config.h @@ -78,7 +78,6 @@ #define COL15_MASK 0x04 #define COL16_MASK 0x02 -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h index e564576459..830d3d8286 100644 --- a/keyboards/matrix/cain_re/config.h +++ b/keyboards/matrix/cain_re/config.h @@ -28,7 +28,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, C7, C6, D5, D2, D4, D7, B7, D1 } #define MATRIX_COL_PINS { F1, F4, F5, F6, B5, B6, B3, B2, B1, D0, B4, D6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matrix/falcon/config.h b/keyboards/matrix/falcon/config.h index ff3287d735..d25668115c 100644 --- a/keyboards/matrix/falcon/config.h +++ b/keyboards/matrix/falcon/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { F1, B7, F7, F5, F4} #define MATRIX_COL_PINS { F6, B3, B2, B1, B0, C7, C6, B6, B5, B4, D7, D6, D4} -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/matrix/m12og/rev2/config.h b/keyboards/matrix/m12og/rev2/config.h index 5f68217319..6a4b003fbf 100644 --- a/keyboards/matrix/m12og/rev2/config.h +++ b/keyboards/matrix/m12og/rev2/config.h @@ -13,7 +13,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, F0, B7, C7, D3, B0, D1 } #define MATRIX_COL_PINS { F1, F4, F5, F6, F7, B6, B5, B4, D7, D0, D2, D6, D4, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h index df053270d8..cf63bb1bda 100644 --- a/keyboards/matrix/m20add/config.h +++ b/keyboards/matrix/m20add/config.h @@ -68,7 +68,6 @@ DEF_PIN(TCA6424_PORT0, 2), \ DEF_PIN(TCA6424_PORT0, 1) } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matrix/me/config.h b/keyboards/matrix/me/config.h index e9230d11e8..85ec6a04c7 100644 --- a/keyboards/matrix/me/config.h +++ b/keyboards/matrix/me/config.h @@ -22,7 +22,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS {D3, D5, D4, D6, B5, B4} #define MATRIX_COL_PINS {B7, B3, B2, B1, B0, F0, F1, F4, F5, F6, F7, C7, C6, B6, D7} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h index 28bcf4ee6e..83c1942a5f 100644 --- a/keyboards/matrix/noah/config.h +++ b/keyboards/matrix/noah/config.h @@ -13,7 +13,6 @@ #define MATRIX_ROW_PINS { B0, A1, C14, C13, A0} #define MATRIX_COL_PINS { C15, B10, B7, B6, B5, B4, A15, A10, A9, A8, B15, B14, B13, B12, B2} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/matthewdias/m3n3van/config.h b/keyboards/matthewdias/m3n3van/config.h index 2d0d1ffc4c..d389f197ae 100644 --- a/keyboards/matthewdias/m3n3van/config.h +++ b/keyboards/matthewdias/m3n3van/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F5, F6, F1, F7, F0, E6, D3, D0, D1, D2, D4, D6 } #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { D7 } -#define UNUSED_PINS { B0, B1, B2, B3, B7, D5 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matthewdias/minim/config.h b/keyboards/matthewdias/minim/config.h index db837e3990..0e3347c5a9 100644 --- a/keyboards/matthewdias/minim/config.h +++ b/keyboards/matthewdias/minim/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* minim PCB default pin-out */ #define MATRIX_ROW_PINS { D6, D7, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F1, F7, F0, B0, D1, B1, D2, B2, D3, D5, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/matthewdias/txuu/config.h b/keyboards/matthewdias/txuu/config.h index 1bc4f33d6d..854fb5e114 100644 --- a/keyboards/matthewdias/txuu/config.h +++ b/keyboards/matthewdias/txuu/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* m3n3van PCB default pin-out */ #define MATRIX_ROW_PINS { B1, B0, F7, F4, F1 } #define MATRIX_COL_PINS { F0, F5, F6, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS { } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/promicro/config.h b/keyboards/maxipad/promicro/config.h index 008e7929cb..f72fd89c6e 100644 --- a/keyboards/maxipad/promicro/config.h +++ b/keyboards/maxipad/promicro/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } #define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/teensy2/config.h b/keyboards/maxipad/teensy2/config.h index 4e43920d5a..32521bc6a4 100644 --- a/keyboards/maxipad/teensy2/config.h +++ b/keyboards/maxipad/teensy2/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } #define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h index fbabd8b2bb..697fe10621 100644 --- a/keyboards/maxr1998/pulse4k/config.h +++ b/keyboards/maxr1998/pulse4k/config.h @@ -26,7 +26,6 @@ /* Matrix pins */ #define MATRIX_ROW_PINS { B4, E6 } #define MATRIX_COL_PINS { B7, B3, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mb44/config.h b/keyboards/mb44/config.h index ce71f485d0..da822ddfe9 100644 --- a/keyboards/mb44/config.h +++ b/keyboards/mb44/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D6, D5, D4 } #define MATRIX_COL_PINS { C4, C5, C6, C7, B7, B6, B5, B4, B3, B2, B1, B0 } -#define UNUSED_PINS { C2 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mc_76k/config.h b/keyboards/mc_76k/config.h index 7a783ce327..428405d6d2 100644 --- a/keyboards/mc_76k/config.h +++ b/keyboards/mc_76k/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, B6, B0, D1, D0 } #define MATRIX_COL_PINS { D5, D3, D4, B1, D6, D7, B4, B5, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechanickeys/miniashen40/config.h b/keyboards/mechanickeys/miniashen40/config.h index c3a097bf77..1510dc9870 100644 --- a/keyboards/mechanickeys/miniashen40/config.h +++ b/keyboards/mechanickeys/miniashen40/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B1, B2, B3, B4 } #define MATRIX_COL_PINS { C5, C4, C3, D0, C2, D1, C1, C0, D4, B0, D7, D6, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechanickeys/undead60m/config.h b/keyboards/mechanickeys/undead60m/config.h index bbf8bc2f71..e21f4c4870 100644 --- a/keyboards/mechanickeys/undead60m/config.h +++ b/keyboards/mechanickeys/undead60m/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechbrewery/mb65h/config.h b/keyboards/mechbrewery/mb65h/config.h index 3715e66c98..79fc4bdde5 100644 --- a/keyboards/mechbrewery/mb65h/config.h +++ b/keyboards/mechbrewery/mb65h/config.h @@ -25,7 +25,6 @@ #define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechbrewery/mb65s/config.h b/keyboards/mechbrewery/mb65s/config.h index c3c90f53e6..57ae42b415 100644 --- a/keyboards/mechbrewery/mb65s/config.h +++ b/keyboards/mechbrewery/mb65s/config.h @@ -25,7 +25,6 @@ #define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechkeys/acr60/config.h b/keyboards/mechkeys/acr60/config.h index a27841231a..8ef708931f 100644 --- a/keyboards/mechkeys/acr60/config.h +++ b/keyboards/mechkeys/acr60/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechkeys/alu84/config.h b/keyboards/mechkeys/alu84/config.h index a6435fa4f5..286c06f482 100755 --- a/keyboards/mechkeys/alu84/config.h +++ b/keyboards/mechkeys/alu84/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, F5, D4, B1, B0, B5, B4, D7, D6, B3, F4, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechkeys/espectro/config.h b/keyboards/mechkeys/espectro/config.h index 2d7fec72e2..48f3c3f95d 100755 --- a/keyboards/mechkeys/espectro/config.h +++ b/keyboards/mechkeys/espectro/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, E6, F0, D5, D4, D6, C7 } #define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechkeys/mechmini/v2/config.h b/keyboards/mechkeys/mechmini/v2/config.h index 507c89a520..9c7b74f4ef 100755 --- a/keyboards/mechkeys/mechmini/v2/config.h +++ b/keyboards/mechkeys/mechmini/v2/config.h @@ -26,7 +26,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c index 218936a19b..689a9ce36e 100644 --- a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c +++ b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c @@ -87,7 +87,7 @@ void matrix_scan_user(void) { //change colors and rgb modes on layer change layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case raise: rgblight_mode_noeeprom(1); rgblight_setrgb(0xc7, 0x00, 0xf4); @@ -103,4 +103,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { } return state; }; - diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h index 03fc30bc2d..ff1b4367e4 100644 --- a/keyboards/mechkeys/mk60/config.h +++ b/keyboards/mechkeys/mk60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechllama/g35/keymaps/default/keymap.c b/keyboards/mechllama/g35/keymaps/default/keymap.c index 4568f54f54..09d7afe171 100644 --- a/keyboards/mechllama/g35/keymaps/default/keymap.c +++ b/keyboards/mechllama/g35/keymaps/default/keymap.c @@ -67,7 +67,7 @@ const char* get_layer_name(uint8_t layer) { } bool oled_task_user(void) { - oled_write_ln_P(get_layer_name(biton32(layer_state)), false); + oled_write_ln_P(get_layer_name(get_highest_layer(layer_state)), false); return false; } #endif diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index c0cae1600b..fa8b213cc7 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -5,7 +5,6 @@ #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS #define RGB_DI_PIN A7 #define DRIVER_LED_TOTAL 91 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/config.h b/keyboards/mechlovin/adelais/standard_led/arm/config.h index 4377405fc6..2fe1e63632 100644 --- a/keyboards/mechlovin/adelais/standard_led/arm/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h index 9093d262e4..b7696c5a07 100644 --- a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h index cc2ac81bc5..cca6cdfad3 100644 --- a/keyboards/mechlovin/hannah910/config.h +++ b/keyboards/mechlovin/hannah910/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } #define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 3237636be2..70c1a7b8e3 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -34,20 +34,20 @@ void led_set_kb(uint8_t usb_led) { layer_state_t layer_state_set_user(layer_state_t state) { // if on layer 1, turn on D2 LED, otherwise off. - if (biton32(state) == 1) { + if (get_highest_layer(state) == 1) { writePinHigh(D2); } else { writePinLow(D2); } // if on layer 2, turn on D1 LED, otherwise off. - if (biton32(state) == 2) { + if (get_highest_layer(state) == 2) { writePinHigh(D1); } else { writePinLow(D1); } // if on layer 3, turn on D0 LED, otherwise off. - if (biton32(state) == 3) { + if (get_highest_layer(state) == 3) { writePinHigh(D0); } else { writePinLow(D0); diff --git a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c index 437233be52..e0634d85dc 100644 --- a/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c +++ b/keyboards/mechlovin/hex4b/keymaps/nazzer/keymap.c @@ -53,9 +53,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool led_update_user(led_t led_state) { - + // Toggle CAPS_LOCK LED normally - + # if LED_PIN_ON_STATE == 0 // invert the whole thing to avoid having to conditionally !led_state.x later led_state.raw = ~led_state.raw; @@ -69,30 +69,30 @@ bool led_update_user(led_t led_state) { } layer_state_t layer_state_set_user(layer_state_t state) { - - uint8_t layer = biton32(state); - + + uint8_t layer = get_highest_layer(state); + #if defined(LED_NUM_LOCK_PIN) && defined(LED_SCROLL_LOCK_PIN) switch (layer) { case 0: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 1: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); break; case 2: - writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; case 3: - writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); - writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_SCROLL_LOCK_PIN, LED_PIN_ON_STATE); + writePin(LED_NUM_LOCK_PIN, LED_PIN_ON_STATE); break; } #endif - return state; + return state; } diff --git a/keyboards/mechlovin/hex4b/rev1/config.h b/keyboards/mechlovin/hex4b/rev1/config.h index 014209cefd..89538b47c7 100644 --- a/keyboards/mechlovin/hex4b/rev1/config.h +++ b/keyboards/mechlovin/hex4b/rev1/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B7, A2, A1, A3, A4, A5 } #define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, D1, D0 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN D6 #define LED_CAPS_LOCK_PIN D7 diff --git a/keyboards/mechlovin/hex4b/rev2/config.h b/keyboards/mechlovin/hex4b/rev2/config.h index af956f3ec0..cf5aced043 100644 --- a/keyboards/mechlovin/hex4b/rev2/config.h +++ b/keyboards/mechlovin/hex4b/rev2/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A4, B12, B13, B14, B15, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A5, A3, C13, B7, B6, B5, B4, B3 } -#define UNUSED_PINS #define LED_NUM_LOCK_PIN C15 #define LED_CAPS_LOCK_PIN B9 diff --git a/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h index d76d271047..c3125f217f 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A10, B13, B12, B11, C14, C15 } #define MATRIX_COL_PINS { A13, A14, A1, A0, C13, B9, B4, B7, B8, B5, B6, A9, A5, A6, A7, B1, B2, B10, B3, B14, B15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/infinity87/rev2/config.h b/keyboards/mechlovin/infinity87/rev2/config.h index 575e826a9b..ab329db96e 100644 --- a/keyboards/mechlovin/infinity87/rev2/config.h +++ b/keyboards/mechlovin/infinity87/rev2/config.h @@ -31,7 +31,6 @@ * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/infinity875/config.h b/keyboards/mechlovin/infinity875/config.h index 0f81a71f96..4f02ed39c9 100644 --- a/keyboards/mechlovin/infinity875/config.h +++ b/keyboards/mechlovin/infinity875/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/jay60/config.h b/keyboards/mechlovin/jay60/config.h index b0e3d3bd4b..5228f40751 100644 --- a/keyboards/mechlovin/jay60/config.h +++ b/keyboards/mechlovin/jay60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, C1, C0, D7, A1 } #define MATRIX_COL_PINS { B6, B5, B3, B2, B1, B0, A0, A6, A7, C7, C6, C5, C4, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/kanu/config.h b/keyboards/mechlovin/kanu/config.h index 880d87a4ac..d9028d0740 100644 --- a/keyboards/mechlovin/kanu/config.h +++ b/keyboards/mechlovin/kanu/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B6, D3, C6, C7 } #define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/kay60/config.h b/keyboards/mechlovin/kay60/config.h index 7896a6edf4..2cae8a3b67 100644 --- a/keyboards/mechlovin/kay60/config.h +++ b/keyboards/mechlovin/kay60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D3, D2, B1, B5} #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B2, B3, B7, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/olly/bb/config.h b/keyboards/mechlovin/olly/bb/config.h index 52b1e77f6a..00ecb21470 100644 --- a/keyboards/mechlovin/olly/bb/config.h +++ b/keyboards/mechlovin/olly/bb/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS {D6, A5, A4, A3, A6} -#define UNUSED_PINS #define BACKLIGHT_PIN D4 #define BACKLIGHT_BREATHING diff --git a/keyboards/mechlovin/olly/jf/config.h b/keyboards/mechlovin/olly/jf/config.h index d9d839b3b8..4dc4785332 100644 --- a/keyboards/mechlovin/olly/jf/config.h +++ b/keyboards/mechlovin/olly/jf/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D6, A5, A4, A3, A6} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/serratus/config.h b/keyboards/mechlovin/serratus/config.h index 965c34bbd0..4b497875da 100644 --- a/keyboards/mechlovin/serratus/config.h +++ b/keyboards/mechlovin/serratus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ #define MATRIX_ROW_PINS { D5, D2, D4, D3, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechlovin/th1800/config.h b/keyboards/mechlovin/th1800/config.h index 423af0bc14..46c370ae2e 100644 --- a/keyboards/mechlovin/th1800/config.h +++ b/keyboards/mechlovin/th1800/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B7, D0, D1, D5, D6 } #define MATRIX_COL_PINS { A3, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, B3, B2, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/zed60/config.h b/keyboards/mechlovin/zed60/config.h index 7d096d3e96..af78e10b7c 100644 --- a/keyboards/mechlovin/zed60/config.h +++ b/keyboards/mechlovin/zed60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B10, B2, B1, B0, A2 } #define MATRIX_COL_PINS { A10, A3, A9, A8, B15, B14, B13, B12, B5, B4, B3, A15, B7, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechstudio/dawn/config.h b/keyboards/mechstudio/dawn/config.h index 362e2297b2..1b5124d7ea 100644 --- a/keyboards/mechstudio/dawn/config.h +++ b/keyboards/mechstudio/dawn/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS {B1,B2,B3,D1,D6,D4} #define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D5,D3,D2} -#define UNUSED_PINS {B0,B7,D0,E6} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechstudio/ud_40_ortho/config.h b/keyboards/mechstudio/ud_40_ortho/config.h index e83484b2da..ad964a72f5 100644 --- a/keyboards/mechstudio/ud_40_ortho/config.h +++ b/keyboards/mechstudio/ud_40_ortho/config.h @@ -26,7 +26,6 @@ #define MATRIX_ROW_PINS {C2,B4,B5,B6} #define MATRIX_COL_PINS {C5,D0,B3,B2,B1,B0,D6,D5,D4,D3,D2,D1} -#define UNUSED_PINS {C4,C6,C7} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechwild/bbs/config.h b/keyboards/mechwild/bbs/config.h index c7b1880fa0..8798c484f1 100644 --- a/keyboards/mechwild/bbs/config.h +++ b/keyboards/mechwild/bbs/config.h @@ -28,7 +28,6 @@ */ #define MATRIX_ROW_PINS { B12, B10, B13, B1, B14 } #define MATRIX_COL_PINS { B0, A7, A6, A5, A4, A3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechwild/bde/lefty/config.h b/keyboards/mechwild/bde/lefty/config.h index 082295ef7c..50101cbfc5 100644 --- a/keyboards/mechwild/bde/lefty/config.h +++ b/keyboards/mechwild/bde/lefty/config.h @@ -33,7 +33,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D7, D3} #define MATRIX_COL_PINS { F7, B1, B6, B2, B3, F6, F5, F4, D0, D4, C6, E6, B5, B4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechwild/bde/rev2/config.h b/keyboards/mechwild/bde/rev2/config.h index 0f290ecc33..ab5110c19b 100644 --- a/keyboards/mechwild/bde/rev2/config.h +++ b/keyboards/mechwild/bde/rev2/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Key matrix pins */ #define MATRIX_ROW_PINS { C6, D7, B4, D4, E6, B2 } #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4, B5 } -#define UNUSED_PINS /* Encoder pins */ #define ENCODERS_PAD_A { D3 } diff --git a/keyboards/mechwild/bde/righty/config.h b/keyboards/mechwild/bde/righty/config.h index 1764520b13..3cae15b107 100644 --- a/keyboards/mechwild/bde/righty/config.h +++ b/keyboards/mechwild/bde/righty/config.h @@ -33,7 +33,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D7, D3} #define MATRIX_COL_PINS { B4, B5, E6, C6, D4, D0, F4, F5, F6, B6, B3, B2, B1, F7} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mechwild/mercutio/config.h b/keyboards/mechwild/mercutio/config.h index 64dee1bf31..5a8fbe1ec5 100755 --- a/keyboards/mechwild/mercutio/config.h +++ b/keyboards/mechwild/mercutio/config.h @@ -26,7 +26,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D4, C3, C0, C1, C2} #define MATRIX_COL_PINS { B0, D7, D6, D5, B1, B2, B3} -#define UNUSED_PINS /* encoder pins */ #define ENCODERS_PAD_A { B4 } diff --git a/keyboards/mechwild/mokulua/mirrored/config.h b/keyboards/mechwild/mokulua/mirrored/config.h index 599d0543e4..3742bd1958 100644 --- a/keyboards/mechwild/mokulua/mirrored/config.h +++ b/keyboards/mechwild/mokulua/mirrored/config.h @@ -12,7 +12,6 @@ /* Key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Encoder pins */ #define ENCODERS_PAD_A { D2 } diff --git a/keyboards/mechwild/mokulua/standard/config.h b/keyboards/mechwild/mokulua/standard/config.h index 9726f7bf99..21a6f314c3 100644 --- a/keyboards/mechwild/mokulua/standard/config.h +++ b/keyboards/mechwild/mokulua/standard/config.h @@ -12,7 +12,6 @@ /* Key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* Encoder pins */ #define ENCODERS_PAD_A { D2 } diff --git a/keyboards/mechwild/murphpad/config.h b/keyboards/mechwild/murphpad/config.h index 428d6391d0..b52810b424 100644 --- a/keyboards/mechwild/murphpad/config.h +++ b/keyboards/mechwild/murphpad/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Key matrix pins */ #define MATRIX_ROW_PINS { F5, B2, B3, B1, F7, F6 } #define MATRIX_COL_PINS { B5, D7, C6, D4, B6 } -#define UNUSED_PINS /* Encoder pins */ #define ENCODERS_PAD_A { E6, D2 } diff --git a/keyboards/mechwild/obe/config.h b/keyboards/mechwild/obe/config.h index 23d8c94318..1fef5fe001 100644 --- a/keyboards/mechwild/obe/config.h +++ b/keyboards/mechwild/obe/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, A15, B3 } #define MATRIX_COL_PINS { B10, B1, B0, A7, A6, A5, A4, A3, A2, A1 } -#define UNUSED_PINS /* encoder pins */ #define ENCODERS_PAD_A { B5 } diff --git a/keyboards/mechwild/waka60/config.h b/keyboards/mechwild/waka60/config.h index cba318d575..df73f51946 100644 --- a/keyboards/mechwild/waka60/config.h +++ b/keyboards/mechwild/waka60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B8, B4, B3, B9, A15, B12, B13, B14, B15, A8 } #define MATRIX_COL_PINS { B10, B1, B0, A7, A6, A5, A4 } -#define UNUSED_PINS /* encoder pins */ #define ENCODERS_PAD_A { A3 } diff --git a/keyboards/melgeek/mach80/rev1/config.h b/keyboards/melgeek/mach80/rev1/config.h index 868832d808..7d941ba1e3 100755 --- a/keyboards/melgeek/mach80/rev1/config.h +++ b/keyboards/melgeek/mach80/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, E6 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/melgeek/mach80/rev2/config.h b/keyboards/melgeek/mach80/rev2/config.h index 3ac1b87ab5..b08ec05100 100755 --- a/keyboards/melgeek/mach80/rev2/config.h +++ b/keyboards/melgeek/mach80/rev2/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, E6 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h index 9d73a4fe96..bba46db2dd 100644 --- a/keyboards/melgeek/mj61/rev1/config.h +++ b/keyboards/melgeek/mj61/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj61/rev2/config.h b/keyboards/melgeek/mj61/rev2/config.h index 616426df65..e17f291934 100644 --- a/keyboards/melgeek/mj61/rev2/config.h +++ b/keyboards/melgeek/mj61/rev2/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, B13, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj63/rev1/config.h b/keyboards/melgeek/mj63/rev1/config.h index 75f7da43a6..ef8c7872d6 100644 --- a/keyboards/melgeek/mj63/rev1/config.h +++ b/keyboards/melgeek/mj63/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj63/rev2/config.h b/keyboards/melgeek/mj63/rev2/config.h index 616426df65..e17f291934 100644 --- a/keyboards/melgeek/mj63/rev2/config.h +++ b/keyboards/melgeek/mj63/rev2/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, B13, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj64/rev1/config.h b/keyboards/melgeek/mj64/rev1/config.h index fbe170f18e..713c051a09 100644 --- a/keyboards/melgeek/mj64/rev1/config.h +++ b/keyboards/melgeek/mj64/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj64/rev2/config.h b/keyboards/melgeek/mj64/rev2/config.h index fbe170f18e..713c051a09 100644 --- a/keyboards/melgeek/mj64/rev2/config.h +++ b/keyboards/melgeek/mj64/rev2/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj64/rev3/config.h b/keyboards/melgeek/mj64/rev3/config.h index dfde77f24a..ff467af7d6 100644 --- a/keyboards/melgeek/mj64/rev3/config.h +++ b/keyboards/melgeek/mj64/rev3/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, B13, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj65/rev3/config.h b/keyboards/melgeek/mj65/rev3/config.h index d9a8c5a815..5274508744 100644 --- a/keyboards/melgeek/mj65/rev3/config.h +++ b/keyboards/melgeek/mj65/rev3/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B12, B11, B10, B1, A3 } #define MATRIX_COL_PINS { B15, A8, B13, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1, B14 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mj6xy/rev3/config.h b/keyboards/melgeek/mj6xy/rev3/config.h index 8ea2b72030..3c07db143b 100755 --- a/keyboards/melgeek/mj6xy/rev3/config.h +++ b/keyboards/melgeek/mj6xy/rev3/config.h @@ -22,7 +22,6 @@ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B6, B5, B4, D7, D6, D4, D5, F7, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mojo68/rev1/config.h b/keyboards/melgeek/mojo68/rev1/config.h index 74a7e3dc26..de50fb8b1e 100755 --- a/keyboards/melgeek/mojo68/rev1/config.h +++ b/keyboards/melgeek/mojo68/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B0 ,B1, B2, B3, D2, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/mojo75/rev1/config.h b/keyboards/melgeek/mojo75/rev1/config.h index eaac850b6d..f51798a308 100644 --- a/keyboards/melgeek/mojo75/rev1/config.h +++ b/keyboards/melgeek/mojo75/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { B11, B10, B1, B0, A7, A6 } #define MATRIX_COL_PINS { B12, B13, B14, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/tegic/rev1/config.h b/keyboards/melgeek/tegic/rev1/config.h index d847fd2364..49d4550be9 100755 --- a/keyboards/melgeek/tegic/rev1/config.h +++ b/keyboards/melgeek/tegic/rev1/config.h @@ -29,7 +29,6 @@ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/melgeek/z70ultra/rev1/config.h b/keyboards/melgeek/z70ultra/rev1/config.h index 4593051758..022e318da1 100644 --- a/keyboards/melgeek/z70ultra/rev1/config.h +++ b/keyboards/melgeek/z70ultra/rev1/config.h @@ -33,5 +33,4 @@ #define MATRIX_ROW_PINS { B12, B13, B14, B15, A3, B9 } #define MATRIX_COL_PINS { B11, B10, B1, A10, B5, B4, B3, A15, A2, A1, A0, C15, C14, C13 } -#define UNUSED_PINS diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index 6346e855c0..83353f9ba0 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, D0, D1, D4, D5, D6, B0, B1, B2, B3 } #define MATRIX_COL_PINS { D3, D2, B5, B6, C7, C6, C5, C4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/meow65/config.h b/keyboards/meow65/config.h index 22d4ed54df..ecdf7311a4 100644 --- a/keyboards/meow65/config.h +++ b/keyboards/meow65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, B7, F7 } #define MATRIX_COL_PINS { F5, F6, B0, F4, F1, D0, D1, D2, D3, D5, D4, D6, D7, B4, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/merge/iso_macro/config.h b/keyboards/merge/iso_macro/config.h index 94a53e6946..f5a82d2df8 100644 --- a/keyboards/merge/iso_macro/config.h +++ b/keyboards/merge/iso_macro/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { F4, F5, F6} #define MATRIX_COL_PINS { B4, B5, B6} -#define UNUSED_PINS #define BACKLIGHT_PIN B7 /* COL2ROW or ROW2COL */ diff --git a/keyboards/merge/uc1/config.h b/keyboards/merge/uc1/config.h index 1679d589f8..3d89ba0a57 100644 --- a/keyboards/merge/uc1/config.h +++ b/keyboards/merge/uc1/config.h @@ -22,7 +22,6 @@ #define MATRIX_ROW_PINS { B1, B2 } #define MATRIX_COL_PINS { B3, B4 } -#define UNUSED_PINS #define RGB_DI_PIN B5 #define RGBLED_NUM 12 diff --git a/keyboards/merge/um70/config.h b/keyboards/merge/um70/config.h index 1556626e52..b22bd3fb10 100644 --- a/keyboards/merge/um70/config.h +++ b/keyboards/merge/um70/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/merge/um80/config.h b/keyboards/merge/um80/config.h index 9e39647343..d76eee087a 100644 --- a/keyboards/merge/um80/config.h +++ b/keyboards/merge/um80/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, C7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/merge/uma/config.h b/keyboards/merge/uma/config.h index 72e9eaf6b8..99343cc152 100644 --- a/keyboards/merge/uma/config.h +++ b/keyboards/merge/uma/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4 } -#define UNUSED_PINS #define BACKLIGHT_PIN C6 diff --git a/keyboards/mesa/mesa_tkl/config.h b/keyboards/mesa/mesa_tkl/config.h index eaf740d69c..8d322d52e7 100644 --- a/keyboards/mesa/mesa_tkl/config.h +++ b/keyboards/mesa/mesa_tkl/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D1, D0, B0, C6, C7 } #define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0, B1, B2, B3 } -#define UNUSED_PINS { B7, E6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/meson/config.h b/keyboards/meson/config.h index c7c0a3e43e..0206db4674 100644 --- a/keyboards/meson/config.h +++ b/keyboards/meson/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7, C6, F6, F5 } #define MATRIX_COL_PINS { D4, D7, E6, B3, B2, B6, F4 } -// #define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index 76a9086723..46d62e795d 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_COL_PINS { B2, D1, D2, C7, F5, F6, F7, F0, E6 } #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4, D5, D3, F4, F1, B1, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mexsistor/ludmila/config.h b/keyboards/mexsistor/ludmila/config.h index 19c7e5a8de..324a1c4baa 100644 --- a/keyboards/mexsistor/ludmila/config.h +++ b/keyboards/mexsistor/ludmila/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, C7, F7 } #define MATRIX_COL_PINS { F4, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mikeneko65/config.h b/keyboards/mikeneko65/config.h index d5faaba618..f8be58b6d9 100644 --- a/keyboards/mikeneko65/config.h +++ b/keyboards/mikeneko65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, C7 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, E6, B0, B7, D4, D6, D7, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index 2420230247..0e784fe527 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -17,7 +17,6 @@ */ #define MATRIX_ROW_PINS {F0, F1, F4, F5, B4} #define MATRIX_COL_PINS {B5, B6, C6, C7, F7, F6, B0, B1, B2, B3, B7, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/millipad/config.h b/keyboards/millipad/config.h index 82fdeb3953..7c0aa209c1 100644 --- a/keyboards/millipad/config.h +++ b/keyboards/millipad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, C7 } #define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mini_elixivy/config.h b/keyboards/mini_elixivy/config.h index 5955d4b5cb..529414f2c2 100644 --- a/keyboards/mini_elixivy/config.h +++ b/keyboards/mini_elixivy/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F7, F5, F4, F1, F0, B7, D0, D1, D2, D3, D4, D6, D7, B4, C6 } #define ENCODERS_PAD_A { B0 } #define ENCODERS_PAD_B { D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mini_ten_key_plus/config.h b/keyboards/mini_ten_key_plus/config.h index 893a8a6a60..cb70a7d790 100644 --- a/keyboards/mini_ten_key_plus/config.h +++ b/keyboards/mini_ten_key_plus/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F5, F4, B6, D7, C6 } #define ENCODERS_PAD_A { F7 } #define ENCODERS_PAD_B { F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index 43d3066f9e..99ebf5b9af 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F6, F7, C7, D5, D3 }, \ { B5, C6, B6, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ ////#define DIODE_DIRECTION diff --git a/keyboards/minimacro5/config.h b/keyboards/minimacro5/config.h index e839fea224..2dcc91f7ce 100644 --- a/keyboards/minimacro5/config.h +++ b/keyboards/minimacro5/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //speed for double tap #define TAPPING_TERM 200 -#define UNUSED_PINS /* rotary encoder 1,2,3 closest to usb port is 0*/ #define ENCODERS_PAD_B { D3, F6, F7, D4, C6} diff --git a/keyboards/minimacro5/keymaps/devdev/keymap.c b/keyboards/minimacro5/keymaps/devdev/keymap.c index d7f998fa3a..3c203fcc37 100644 --- a/keyboards/minimacro5/keymaps/devdev/keymap.c +++ b/keyboards/minimacro5/keymaps/devdev/keymap.c @@ -37,7 +37,7 @@ enum tap_dances{ bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder*/ - switch(biton32(layer_state)){ + switch(get_highest_layer(layer_state)){ case _MAIN: if (clockwise) { tap_code(KC_VOLU); diff --git a/keyboards/minimon/index_tab/config.h b/keyboards/minimon/index_tab/config.h index fc02185545..7c5612873f 100644 --- a/keyboards/minimon/index_tab/config.h +++ b/keyboards/minimon/index_tab/config.h @@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D3, B7, B3, B2, B1, B0 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D2, F1, F0 } -#define UNUSED_PINS { F4, F5, F6, D1, D0 } /* COL2ROW, ROW2COL*/ diff --git a/keyboards/mino/hotswap/config.h b/keyboards/mino/hotswap/config.h index 62583e7156..39042bfcff 100644 --- a/keyboards/mino/hotswap/config.h +++ b/keyboards/mino/hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, C6, D4, D2} #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index 2b5b831456..fa13775f24 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { D4, B3, B1, F7, B2, B6, F6, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/misonoworks/chocolatebar/config.h b/keyboards/misonoworks/chocolatebar/config.h index 8581a545d3..438ed237e7 100644 --- a/keyboards/misonoworks/chocolatebar/config.h +++ b/keyboards/misonoworks/chocolatebar/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B7, D2, D3 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/misonoworks/karina/config.h b/keyboards/misonoworks/karina/config.h index e77f0fcff5..9460bff0be 100644 --- a/keyboards/misonoworks/karina/config.h +++ b/keyboards/misonoworks/karina/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // pins #define MATRIX_ROW_PINS { D2, D3, D5, F0 } #define MATRIX_COL_PINS { B3, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6} -#define UNUSED_PINS // diode mode #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c index c67f2e387c..842556324f 100644 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ b/keyboards/mitosis/keymaps/carvac_dv/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _STD: @@ -121,4 +121,3 @@ void matrix_scan_user(void) { break; } }; - diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c index 220c140af0..2611e1194c 100644 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ b/keyboards/mitosis/keymaps/datagrok/keymap.c @@ -102,7 +102,7 @@ const size_t defaultlayers_n = sizeof(defaultlayers) / sizeof(defaultlayers[0]); // New keycode KC_LAYO rotates between available default layers (for e.g., // selecting a base layout). Shift+KC_LAYO makes the current one persistent. bool process_record_layout(uint16_t keycode, keyrecord_t *record) { - uint32_t default_layer; + uint8_t default_layer; uint8_t i; #if defined(AUDIO_ENABLE) float saved_song[][2] = SONG(COIN_SOUND); @@ -121,7 +121,7 @@ bool process_record_layout(uint16_t keycode, keyrecord_t *record) { } else { // rotate default layer. // find the current default layer - default_layer = biton32(default_layer_state); + default_layer = get_highest_layer(default_layer_state); // find next valid default layer for (i = 1; i < defaultlayers_n; i++) { if (defaultlayers[(default_layer + i) % defaultlayers_n]) { diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c index 6132ad6f78..27b2eb2525 100644 --- a/keyboards/mitosis/keymaps/default/keymap.c +++ b/keyboards/mitosis/keymaps/default/keymap.c @@ -77,7 +77,7 @@ static bool singular_key = false; bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t layer; - layer = biton32(layer_state); // get the current layer + layer = get_highest_layer(layer_state); // get the current layer //custom layer handling for tri_layer, switch (keycode) { @@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _MALT: @@ -193,4 +193,3 @@ void matrix_scan_user(void) { break; } }; - diff --git a/keyboards/mitosis/keymaps/mjt/keymap.c b/keyboards/mitosis/keymaps/mjt/keymap.c index f00bf59556..0946e40b8e 100644 --- a/keyboards/mitosis/keymaps/mjt/keymap.c +++ b/keyboards/mitosis/keymaps/mjt/keymap.c @@ -181,7 +181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } uint8_t layer; - layer = biton32(layer_state); // get the current layer + layer = get_highest_layer(layer_state); // get the current layer //custom layer handling for tri_layer, switch (keycode) { @@ -310,7 +310,7 @@ void music_scale_user(void) #endif void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: diff --git a/keyboards/mitosis/keymaps/nzen/keymap.c b/keyboards/mitosis/keymaps/nzen/keymap.c index d9fd3641bc..c981441bc9 100644 --- a/keyboards/mitosis/keymaps/nzen/keymap.c +++ b/keyboards/mitosis/keymaps/nzen/keymap.c @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: @@ -205,5 +205,3 @@ void matrix_scan_user(void) { void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); // or UC_WINC }; - - diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index 4d6964dafb..19e55934e6 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F4, D7} #define MATRIX_COL_PINS { C6, C7, F7, F6, F1, E6, B7, B3, B2, B1, B0} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ml/gas75/config.h b/keyboards/ml/gas75/config.h index 4f35c4c265..82d8c134a0 100644 --- a/keyboards/ml/gas75/config.h +++ b/keyboards/ml/gas75/config.h @@ -38,9 +38,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Larger keys per scan */ -#define QMK_KEYS_PER_SCAN 12 - /* Encoder pins */ #define ENCODERS_PAD_A { F0 } #define ENCODERS_PAD_B { F1 } diff --git a/keyboards/mlego/m48/keymaps/default/keymap.c b/keyboards/mlego/m48/keymaps/default/keymap.c index 5eb40a332a..175f42b9b9 100644 --- a/keyboards/mlego/m48/keymaps/default/keymap.c +++ b/keyboards/mlego/m48/keymaps/default/keymap.c @@ -106,10 +106,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJ] = LAYOUT_ortho_4x12( - _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/mlego/m48/rev1/config.h b/keyboards/mlego/m48/rev1/config.h index dcca34c95e..4b718f129c 100644 --- a/keyboards/mlego/m48/rev1/config.h +++ b/keyboards/mlego/m48/rev1/config.h @@ -56,6 +56,5 @@ #endif -#define UNUSED_PINS // you want to comment this if using stm32-dfu as bootloader #define FEE_PAGE_BASE_ADDRESS 0x08008000 diff --git a/keyboards/mlego/m60/rev1/config.h b/keyboards/mlego/m60/rev1/config.h index 437e605149..638a698536 100644 --- a/keyboards/mlego/m60/rev1/config.h +++ b/keyboards/mlego/m60/rev1/config.h @@ -56,6 +56,5 @@ #define RGBLIGHT_EFFECT_TWINKLE #endif -#define UNUSED_PINS // you want to comment this if using stm32-dfu as bootloader #define FEE_PAGE_BASE_ADDRESS 0x08008000 diff --git a/keyboards/mlego/m60_split/rev1/config.h b/keyboards/mlego/m60_split/rev1/config.h index 0bbb56aee0..573ec72288 100644 --- a/keyboards/mlego/m60_split/rev1/config.h +++ b/keyboards/mlego/m60_split/rev1/config.h @@ -83,6 +83,5 @@ #define BOOTMAGIC_LITE_COLUMN_RIGHT 0 #endif -#define UNUSED_PINS // you want to comment this if using stm32-dfu as bootloader #define FEE_PAGE_BASE_ADDRESS 0x08008000 diff --git a/keyboards/mlego/m60_split/rev2/config.h b/keyboards/mlego/m60_split/rev2/config.h index c5b011c437..1f1435a237 100644 --- a/keyboards/mlego/m60_split/rev2/config.h +++ b/keyboards/mlego/m60_split/rev2/config.h @@ -81,4 +81,3 @@ #define BOOTMAGIC_LITE_ROW_RIGHT 5 #define BOOTMAGIC_LITE_COLUMN_RIGHT 0 -#define UNUSED_PINS diff --git a/keyboards/mlego/m65/rev1/config.h b/keyboards/mlego/m65/rev1/config.h index 0e40ae2e3d..988b3cf31f 100644 --- a/keyboards/mlego/m65/rev1/config.h +++ b/keyboards/mlego/m65/rev1/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN B15 -#define UNUSED_PINS #define RGBLIGHT_LAYERS #define ENCODER_RESOLUTION 4 diff --git a/keyboards/mlego/m65/rev2/config.h b/keyboards/mlego/m65/rev2/config.h index db13bbb2ad..55c4f0d2f4 100644 --- a/keyboards/mlego/m65/rev2/config.h +++ b/keyboards/mlego/m65/rev2/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN B15 -#define UNUSED_PINS #define RGBLIGHT_LAYERS #define ENCODER_RESOLUTION 4 diff --git a/keyboards/mlego/m65/rev3/config.h b/keyboards/mlego/m65/rev3/config.h index a4b1ba3343..1ebf730601 100644 --- a/keyboards/mlego/m65/rev3/config.h +++ b/keyboards/mlego/m65/rev3/config.h @@ -59,6 +59,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #endif -#define UNUSED_PINS // you want to comment this if using stm32-dfu as bootloader #define FEE_PAGE_BASE_ADDRESS 0x08008000 diff --git a/keyboards/mlego/m65/rev4/config.h b/keyboards/mlego/m65/rev4/config.h index 07dd0fefaa..606a6bb85c 100644 --- a/keyboards/mlego/m65/rev4/config.h +++ b/keyboards/mlego/m65/rev4/config.h @@ -68,6 +68,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define OLED_FONT_H "keyboards/mlego/m65/lib/glcdfont.c" #endif -#define UNUSED_PINS // you want to comment this if using stm32-dfu as bootloader #define FEE_PAGE_BASE_ADDRESS 0x08008000 diff --git a/keyboards/mmkzoo65/config.h b/keyboards/mmkzoo65/config.h index b562a40859..b874fdef8a 100644 --- a/keyboards/mmkzoo65/config.h +++ b/keyboards/mmkzoo65/config.h @@ -38,4 +38,3 @@ /* å°†USB 轮询速率更改为 1000hz 并为精英游æˆæ¯æ¬¡æ‰«æ使用更大的密钥*/ #define USB_POLLING_INTERVAL_MS 2 -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/mntre/config.h b/keyboards/mntre/config.h index 45d47bad68..ada82728d3 100644 --- a/keyboards/mntre/config.h +++ b/keyboards/mntre/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D5, F7, E6, C7, B3, B2, B1, B0, F0, F1, F4, F5, F6, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mode/m80v1/config.h b/keyboards/mode/m80v1/config.h index a0d39774e6..c31a29003e 100644 --- a/keyboards/mode/m80v1/config.h +++ b/keyboards/mode/m80v1/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { A10, A15, B3, B9, A3, A4 } #define MATRIX_COL_PINS { B8, B7, B6, B5, B4, A2, A1, A0, F1, F0, C15, C14, C13, A7, A6, A5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mokey/ginkgo65/config.h b/keyboards/mokey/ginkgo65/config.h index 5b09351e32..6605744221 100644 --- a/keyboards/mokey/ginkgo65/config.h +++ b/keyboards/mokey/ginkgo65/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ #define MATRIX_ROW_PINS { F7, B7, F5, F1, B0 } #define MATRIX_COL_PINS { C7, F6, B2, F4, B3, E6, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/mokey/ginkgo65hot/config.h b/keyboards/mokey/ginkgo65hot/config.h index 63d633d661..423d844765 100644 --- a/keyboards/mokey/ginkgo65hot/config.h +++ b/keyboards/mokey/ginkgo65hot/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 } #define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/mokey/ginkgo65hot/ginkgo65hot.h b/keyboards/mokey/ginkgo65hot/ginkgo65hot.h index 1a599291b8..e4a42d9ad9 100644 --- a/keyboards/mokey/ginkgo65hot/ginkgo65hot.h +++ b/keyboards/mokey/ginkgo65hot/ginkgo65hot.h @@ -19,7 +19,7 @@ #define XXX KC_NO -/*LAYOUT +/*LAYOUT_65_ansi_blocker * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┠* │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│ k0D │k0E│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ @@ -32,7 +32,7 @@ * │k40 │k41 │k42 │ k44 │k49 │k4A │ │k4C│k4D│k4E│ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ diff --git a/keyboards/mokey/ginkgo65hot/info.json b/keyboards/mokey/ginkgo65hot/info.json index dbe99e1909..929e31e31b 100644 --- a/keyboards/mokey/ginkgo65hot/info.json +++ b/keyboards/mokey/ginkgo65hot/info.json @@ -8,81 +8,84 @@ "pid": "0x3366", "device_version": "0.0.1" }, + "layout_aliases": { + "LAYOUT": "LAYOUT_65_ansi_blocker" + }, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0, "w":2}, - {"label":"k0e", "x":15, "y":0}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15, "y":0}, - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k1d", "x":13.5, "y":1, "w":1.5}, - {"label":"k1e", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k2d", "x":12.75, "y":2, "w":2.25}, - {"label":"k2e", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Return", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, - {"label":"k30", "x":0, "y":3, "w":2.25}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k44", "x":3.75, "y":4, "w":6.25}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] } } -}
\ No newline at end of file +} diff --git a/keyboards/mokey/ginkgo65hot/rules.mk b/keyboards/mokey/ginkgo65hot/rules.mk index 02fbe72525..d04e1a74fa 100644 --- a/keyboards/mokey/ginkgo65hot/rules.mk +++ b/keyboards/mokey/ginkgo65hot/rules.mk @@ -16,3 +16,5 @@ NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/mokey/mokey63/config.h b/keyboards/mokey/mokey63/config.h index 86ff35ad5c..a8917c31f9 100644 --- a/keyboards/mokey/mokey63/config.h +++ b/keyboards/mokey/mokey63/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B5, B6, B2, B3, B1 } #define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mokey/mokey64/config.h b/keyboards/mokey/mokey64/config.h index 60a0b69d38..685d26af00 100644 --- a/keyboards/mokey/mokey64/config.h +++ b/keyboards/mokey/mokey64/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B2, B3, B4, B5 } #define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D2, D1, D3, D5, D4, D6, D7, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mokey/xox70/config.h b/keyboards/mokey/xox70/config.h index 3c1448ee75..a0696aad05 100644 --- a/keyboards/mokey/xox70/config.h +++ b/keyboards/mokey/xox70/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7, B7, F5, F1, B0 } #define MATRIX_COL_PINS { F6, C7, F4, F5, F1, B6, D0, D2, D3, D1, D7, D4, D5, D6, B4, B5, C6, B7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mokey/xox70hot/config.h b/keyboards/mokey/xox70hot/config.h index 3c1448ee75..a0696aad05 100644 --- a/keyboards/mokey/xox70hot/config.h +++ b/keyboards/mokey/xox70hot/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7, B7, F5, F1, B0 } #define MATRIX_COL_PINS { F6, C7, F4, F5, F1, B6, D0, D2, D3, D1, D7, D4, D5, D6, B4, B5, C6, B7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/molecule/config.h b/keyboards/molecule/config.h index 5327b0bd52..8f7396dfc8 100755 --- a/keyboards/molecule/config.h +++ b/keyboards/molecule/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, B6 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/momoka_ergo/config.h b/keyboards/momoka_ergo/config.h index 441c5f4305..e480581220 100644 --- a/keyboards/momoka_ergo/config.h +++ b/keyboards/momoka_ergo/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5, B6, B7 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/monoflex60/config.h b/keyboards/monoflex60/config.h index b8b1b810e3..2663b4ffb3 100644 --- a/keyboards/monoflex60/config.h +++ b/keyboards/monoflex60/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D3, D2, D5 } #define MATRIX_COL_PINS { B7, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 9dab7c7dda..4117f243ac 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -25,7 +25,6 @@ #define BACKLIGHT_PIN F5 #define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2} #define MATRIX_COL_PINS { C5,C3,C1,E1,D6,D2,B7,B3,F6,F7,F3,A5,A1,E2,C7,A6 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN D7 #define DRIVER_LED_TOTAL 110 diff --git a/keyboards/monstargear/xo87/solderable/config.h b/keyboards/monstargear/xo87/solderable/config.h index 460538600f..8b3af96024 100644 --- a/keyboards/monstargear/xo87/solderable/config.h +++ b/keyboards/monstargear/xo87/solderable/config.h @@ -35,7 +35,6 @@ #define KEYLED_COL_PINS { C4,C2,C0,E0,D4,E4,B6,B2,F4,A0,F2,A4,F1,A7,D3,A3 } #define LED_DRIVER_LED_COUNT 93 -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN D7 #define DRIVER_LED_TOTAL 21 diff --git a/keyboards/montsinger/rebound/rev1/config.h b/keyboards/montsinger/rebound/rev1/config.h index b7481c789f..446d6db71d 100644 --- a/keyboards/montsinger/rebound/rev1/config.h +++ b/keyboards/montsinger/rebound/rev1/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { D1, B5, B2, B6 } #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS { D2, D3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/montsinger/rebound/rev2/config.h b/keyboards/montsinger/rebound/rev2/config.h index e71e12c97c..0cdb9f8d61 100644 --- a/keyboards/montsinger/rebound/rev2/config.h +++ b/keyboards/montsinger/rebound/rev2/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { D1, B5, B2, B6, B0 } #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS { } #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D3 } diff --git a/keyboards/montsinger/rebound/rev3/config.h b/keyboards/montsinger/rebound/rev3/config.h index 2a5cde0343..25dee80ff3 100644 --- a/keyboards/montsinger/rebound/rev3/config.h +++ b/keyboards/montsinger/rebound/rev3/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { F4, F5, D1, D0, B0 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } -#define UNUSED_PINS { } #define ENCODERS_PAD_A { D3 } #define ENCODERS_PAD_B { D2 } diff --git a/keyboards/montsinger/rebound/rev4/config.h b/keyboards/montsinger/rebound/rev4/config.h index 06bdd561b9..6b03a19288 100644 --- a/keyboards/montsinger/rebound/rev4/config.h +++ b/keyboards/montsinger/rebound/rev4/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { D1, D0, D4, C6, F7, F6, F5, F4 } #define MATRIX_COL_PINS { D7, E6, B4, B5, B2, B3, B1 } -#define UNUSED_PINS { B6 } #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D3 } diff --git a/keyboards/montsinger/rewind/config.h b/keyboards/montsinger/rewind/config.h index 3e7577f7c9..bc83168ae6 100644 --- a/keyboards/montsinger/rewind/config.h +++ b/keyboards/montsinger/rewind/config.h @@ -35,7 +35,6 @@ diode) #define MATRIX_ROW_PINS { B5, B4, D2, D3, B2 } #define MATRIX_COL_PINS { F6, F7, B1, B3, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS { F4, F5, B6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/morizon/config.h b/keyboards/morizon/config.h index 98d53259d4..732864d2ef 100644 --- a/keyboards/morizon/config.h +++ b/keyboards/morizon/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS { F4 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mountainblocks/mb17/config.h b/keyboards/mountainblocks/mb17/config.h index 820c371693..bd397ee541 100644 --- a/keyboards/mountainblocks/mb17/config.h +++ b/keyboards/mountainblocks/mb17/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, B1, B3, B2, B6 } #define MATRIX_COL_PINS { F7, E6, D7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ms_sculpt/info.json b/keyboards/ms_sculpt/info.json index 734b1443bc..4eaf4b0a75 100644 --- a/keyboards/ms_sculpt/info.json +++ b/keyboards/ms_sculpt/info.json @@ -15,7 +15,6 @@ "matrix_pins": { "rows": ["B10", "B1", "B0", "A7", "A6", "A5", "A4", "A3"], "cols": ["A2","B8","A0","C15","C14","A14","A13","B7","B6","B5","B4","B3","A15","A10","A8","B15","B14","B12"], - "unused": ["B13", "A1", "B9"], "ghost": true, "io_delay": 5 }, diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index 7dcd4ac024..0ff58f4be3 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -163,8 +163,8 @@ void update_layer_leds(void) { static uint8_t old_layer = 255; static uint8_t old_default_layer = 255; - layer = biton32(layer_state); - default_layer = biton32(default_layer_state); + layer = get_highest_layer(layer_state); + default_layer = get_highest_layer(default_layer_state); if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { blink_state = !blink_state; diff --git a/keyboards/mss_studio/m63_rgb/config.h b/keyboards/mss_studio/m63_rgb/config.h index e2aae8469f..a7220ab1c6 100644 --- a/keyboards/mss_studio/m63_rgb/config.h +++ b/keyboards/mss_studio/m63_rgb/config.h @@ -36,9 +36,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - #ifdef RGB_MATRIX_ENABLE #define DRIVER_LED_TOTAL 75 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/mss_studio/m64_rgb/config.h b/keyboards/mss_studio/m64_rgb/config.h index d8ac27024b..c9a1e3f3db 100644 --- a/keyboards/mss_studio/m64_rgb/config.h +++ b/keyboards/mss_studio/m64_rgb/config.h @@ -36,9 +36,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change larger keys per scan for elite gaming */ -#define QMK_KEYS_PER_SCAN 12 - #ifdef RGB_MATRIX_ENABLE #define DRIVER_LED_TOTAL 76 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/mt/blocked65/config.h b/keyboards/mt/blocked65/config.h index bc7dfcadcd..223b0fe0a1 100644 --- a/keyboards/mt/blocked65/config.h +++ b/keyboards/mt/blocked65/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mt/mt40/config.h b/keyboards/mt/mt40/config.h index 5dfa0a10a1..7045dac8aa 100644 --- a/keyboards/mt/mt40/config.h +++ b/keyboards/mt/mt40/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -/* #define UNUSED_PINS */ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mt/mt64rgb/config.h b/keyboards/mt/mt64rgb/config.h index 92c7ad8166..8124a6a4a1 100644 --- a/keyboards/mt/mt64rgb/config.h +++ b/keyboards/mt/mt64rgb/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { D7, D6, D5, D3, D2 } #define MATRIX_COL_PINS {B5, B6, C6, C7, F7, F6,F5, F4, F1, F0, B1, B2, B3, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h index 6b67d84b60..ac510f1967 100644 --- a/keyboards/mt/mt84/config.h +++ b/keyboards/mt/mt84/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { D7, D6, D5, D3, D2, D4 } #define MATRIX_COL_PINS {B5, B6, C6, C7, F7, F6,F5, F4, F1, F0, B1, B2, B3, B7, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mt/mt980/config.h b/keyboards/mt/mt980/config.h index 567e06d1ac..c4b89fa7f7 100644 --- a/keyboards/mt/mt980/config.h +++ b/keyboards/mt/mt980/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mtbkeys/mtb60/hotswap/config.h b/keyboards/mtbkeys/mtb60/hotswap/config.h index 09fec112d1..eeb9bef6ff 100644 --- a/keyboards/mtbkeys/mtb60/hotswap/config.h +++ b/keyboards/mtbkeys/mtb60/hotswap/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pinout */ #define MATRIX_ROW_PINS { D6, D7, B4, B5, D5 } #define MATRIX_COL_PINS { D0, D1, D2, D3, B7, B6, F7, C6, C7, F6, F4, F1, F0, F5, E6 } -#define UNUSED_PINS /* diode direction: COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/mtbkeys/mtb60/solder/config.h b/keyboards/mtbkeys/mtb60/solder/config.h index 3187166bcc..88d6b4097b 100644 --- a/keyboards/mtbkeys/mtb60/solder/config.h +++ b/keyboards/mtbkeys/mtb60/solder/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pinout */ #define MATRIX_ROW_PINS { D0, D1, F4, F1, D2 } #define MATRIX_COL_PINS { E6, F0, F5, F6, F7, D5, D3, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* diode direction: COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/murcielago/rev1/config.h b/keyboards/murcielago/rev1/config.h index 2851ae884b..742e5398d3 100644 --- a/keyboards/murcielago/rev1/config.h +++ b/keyboards/murcielago/rev1/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_A_RIGHT { F6 } #define ENCODERS_PAD_B_RIGHT { F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/config.h b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/config.h index 13cffea4da..0d2051ffd5 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/config.h +++ b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/config.h @@ -21,10 +21,6 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* Change USB Polling Rate to 1000hz and a larger keys per scan for elite gaming */ -#define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 12 - #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #undef ENABLE_RGB_MATRIX_BAND_SAT diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/config.h b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/config.h index ba574e1e3c..fef62c6374 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/config.h +++ b/keyboards/mwstudio/mw65_rgb/keymaps/thearesia/config.h @@ -20,7 +20,3 @@ /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO - -/* Change USB Polling Rate to 1000hz and a larger keys per scan for elite gaming */ -#define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c index 78a17233e3..ddcd3f6642 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c @@ -95,9 +95,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { - tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 3)); + tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 3)); } else { - tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 4)); + tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 4)); } } return true; diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 1ef9a5fc0f..698fd4c6a9 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* matrix pin configuration */ #define MATRIX_ROW_PINS { F4, F1, F7, B1, B7 } #define MATRIX_COL_PINS { D7, D6, D4, D0, C6, B6, D1, B5, D2, B4, D3, D5, B0, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mysticworks/wyvern/config.h b/keyboards/mysticworks/wyvern/config.h index 864be372c4..859eece683 100644 --- a/keyboards/mysticworks/wyvern/config.h +++ b/keyboards/mysticworks/wyvern/config.h @@ -25,7 +25,6 @@ /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS {D0,D1,D5,D3,F7,F6,F5,F4,F1,F0} #define MATRIX_COL_PINS {E6,B0,D4,D6,D7,B4,B5,B6,C6,C7} -#define UNUSED_PINS {B7,D2} /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nacly/ua62/config.h b/keyboards/nacly/ua62/config.h index 0637a9a3d3..464939080c 100644 --- a/keyboards/nacly/ua62/config.h +++ b/keyboards/nacly/ua62/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ncc1701kb/config.h b/keyboards/ncc1701kb/config.h index 09a54276cb..7b57d26f86 100644 --- a/keyboards/ncc1701kb/config.h +++ b/keyboards/ncc1701kb/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NCC-1701-KB PCB default pin-out */ #define MATRIX_ROW_PINS { D4, D6, D7 } #define MATRIX_COL_PINS { B4, B5, B6 } -#define UNUSED_PINS /* BackLight */ #define BACKLIGHT_PIN B7 diff --git a/keyboards/neito/config.h b/keyboards/neito/config.h index 1ad5401f30..01f2545de9 100644 --- a/keyboards/neito/config.h +++ b/keyboards/neito/config.h @@ -25,7 +25,6 @@ #define ENCODERS_PAD_A { B7 } #define ENCODERS_PAD_B { B0 } #define ENCODER_RESOLUTION 4 -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B6 #define BACKLIGHT_ON_STATE 0 diff --git a/keyboards/neopad/rev1/config.h b/keyboards/neopad/rev1/config.h index 92d3392715..aa85ce1975 100755 --- a/keyboards/neopad/rev1/config.h +++ b/keyboards/neopad/rev1/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 3 #define MATRIX_ROW_PINS { F4, F5 } #define MATRIX_COL_PINS { B3, B2, B6 } -#define UNUSED_PINS /* Dual rotary encoders */ #define ENCODERS_PAD_A { D1, D4 } diff --git a/keyboards/neson_design/700e/config.h b/keyboards/neson_design/700e/config.h index f1f26cdbc1..a7f50b184f 100644 --- a/keyboards/neson_design/700e/config.h +++ b/keyboards/neson_design/700e/config.h @@ -32,7 +32,6 @@ #define MATRIX_COLS 16 #define MATRIX_ROW_PINS { E6, B7, F6, F1, F0} #define MATRIX_COL_PINS { F7, B0, B3, B1, B2, F4, C7, C6, B6, B5, B4, D7, D3, D2, D6, D4} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h index d8c3945f50..7d27825eaf 100644 --- a/keyboards/neson_design/n6/config.h +++ b/keyboards/neson_design/n6/config.h @@ -25,7 +25,6 @@ #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { F0, B1, F6, F4, F1} #define MATRIX_COL_PINS { F7, B0, E6, C7, C6, B6, B5, B4, D7, D6, D4, D5, B2, D3, D2 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/newgame40/config.h b/keyboards/newgame40/config.h index ed7df48f72..a04ddf45cc 100644 --- a/keyboards/newgame40/config.h +++ b/keyboards/newgame40/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { F7, B1, B3, B2 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* ws2812 RGB LED */ #define RGB_DI_PIN F6 diff --git a/keyboards/nightingale_studios/hailey/config.h b/keyboards/nightingale_studios/hailey/config.h index 915a8b89d1..73584acd94 100644 --- a/keyboards/nightingale_studios/hailey/config.h +++ b/keyboards/nightingale_studios/hailey/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, B6, A14 } #define MATRIX_COL_PINS { A4, A3, F1, F0, C15, C14, C13, B11, B10, B2, B1, B0, A7, A5, A6, B5, A15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h index 6b975eee8a..81d0f0cbfd 100644 --- a/keyboards/nightly_boards/adellein/config.h +++ b/keyboards/nightly_boards/adellein/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B0, B5, B6 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B7, B3, B2, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/alter/rev1/config.h b/keyboards/nightly_boards/alter/rev1/config.h index 86af00ffd8..fbfa65c2a0 100644 --- a/keyboards/nightly_boards/alter/rev1/config.h +++ b/keyboards/nightly_boards/alter/rev1/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, E6, D0, B7, D5, D3, D2, D1 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/alter_lite/config.h b/keyboards/nightly_boards/alter_lite/config.h index 59b7abf11f..35f10a53e1 100644 --- a/keyboards/nightly_boards/alter_lite/config.h +++ b/keyboards/nightly_boards/alter_lite/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, D3, D5, B5 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, E6, B6, C6, C7, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/conde60/config.h b/keyboards/nightly_boards/conde60/config.h index c50c9e29c9..16a21f20ef 100644 --- a/keyboards/nightly_boards/conde60/config.h +++ b/keyboards/nightly_boards/conde60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, B2, F0, F1, F4 } #define MATRIX_COL_PINS { B0, B3, B7, B6, C6, C7, F7, F6, F5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS #define RGB_DI_PIN D5 #ifdef RGB_DI_PIN diff --git a/keyboards/nightly_boards/n2/config.h b/keyboards/nightly_boards/n2/config.h index ed9b8d8031..a4f19c8a18 100644 --- a/keyboards/nightly_boards/n2/config.h +++ b/keyboards/nightly_boards/n2/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, C7 } #define MATRIX_COL_PINS { F0, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/n40_o/config.h b/keyboards/nightly_boards/n40_o/config.h index 4e812463b2..4f2a5ff5a0 100644 --- a/keyboards/nightly_boards/n40_o/config.h +++ b/keyboards/nightly_boards/n40_o/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, F0, F1, D7, NO_PIN } #define MATRIX_COL_PINS { B5, C7, D6, D4, B3, B2, B1, B0, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/n60_s/config.h b/keyboards/nightly_boards/n60_s/config.h index af26187605..d71fe7733e 100644 --- a/keyboards/nightly_boards/n60_s/config.h +++ b/keyboards/nightly_boards/n60_s/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, D7, D6, D0, E6, NO_PIN } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B0, B1, B2, B3, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/n87/config.h b/keyboards/nightly_boards/n87/config.h index 7281a3c330..64b14b0207 100644 --- a/keyboards/nightly_boards/n87/config.h +++ b/keyboards/nightly_boards/n87/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, F1, F0, D7, B4, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F7, F6, F5, F4, C7, C6, B6, B5, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/n9/config.h b/keyboards/nightly_boards/n9/config.h index b2b87fad44..98c05d887f 100644 --- a/keyboards/nightly_boards/n9/config.h +++ b/keyboards/nightly_boards/n9/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, B1, B3 } #define MATRIX_COL_PINS { F6, F7, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/octopad/config.h b/keyboards/nightly_boards/octopad/config.h index 11c553a070..a17eb502e1 100644 --- a/keyboards/nightly_boards/octopad/config.h +++ b/keyboards/nightly_boards/octopad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B3, NO_PIN } #define MATRIX_COL_PINS { F1, F0, D0, D1, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/paraluman/config.h b/keyboards/nightly_boards/paraluman/config.h index 20eacfde3e..7d3101d116 100644 --- a/keyboards/nightly_boards/paraluman/config.h +++ b/keyboards/nightly_boards/paraluman/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, F7, B1, B0, E6 } #define MATRIX_COL_PINS { B2, F6, F5, F4, F1, F0, D4, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightly_boards/ph_arisu/config.h b/keyboards/nightly_boards/ph_arisu/config.h index 6cb0887cf8..1173bca779 100644 --- a/keyboards/nightly_boards/ph_arisu/config.h +++ b/keyboards/nightly_boards/ph_arisu/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nightmare/config.h b/keyboards/nightmare/config.h index 921d7f70de..706cdbbf37 100644 --- a/keyboards/nightmare/config.h +++ b/keyboards/nightmare/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { B4, B5, D3, D2, D1, D0, F4, F5, F6, F7, B1, B3, B2, B6} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nimrod/config.h b/keyboards/nimrod/config.h index 1c3385a215..8b40ba11f6 100644 --- a/keyboards/nimrod/config.h +++ b/keyboards/nimrod/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F5, B6, D7, C6 } #define MATRIX_COL_PINS { D1, F4, B5, B4, E6, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nix_studio/oxalys80/config.h b/keyboards/nix_studio/oxalys80/config.h index fa45d976fd..8a9403c9a5 100644 --- a/keyboards/nix_studio/oxalys80/config.h +++ b/keyboards/nix_studio/oxalys80/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nopunin10did/jabberwocky/config.h b/keyboards/nopunin10did/jabberwocky/config.h index f90795bc51..cb4f238852 100644 --- a/keyboards/nopunin10did/jabberwocky/config.h +++ b/keyboards/nopunin10did/jabberwocky/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6, B4, B5, B7, D5, C7, F1, F0, B1, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, D7, C6, D4, D0, D2, D3 } -#define UNUSED_PINS /* Indicator LEDs */ #define LED_NUM_LOCK_PIN D1 diff --git a/keyboards/nopunin10did/kastenwagen1840/config.h b/keyboards/nopunin10did/kastenwagen1840/config.h index 7ec0a78ebf..714bed1b0e 100644 --- a/keyboards/nopunin10did/kastenwagen1840/config.h +++ b/keyboards/nopunin10did/kastenwagen1840/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B5, B7, D5, C7, F1, F0, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, E6, D7 } -#define UNUSED_PINS /* Indicator LEDs */ #define LED_INDICATOR_TOP B0 diff --git a/keyboards/nopunin10did/kastenwagen48/config.h b/keyboards/nopunin10did/kastenwagen48/config.h index aea908d24a..1ced831ad9 100644 --- a/keyboards/nopunin10did/kastenwagen48/config.h +++ b/keyboards/nopunin10did/kastenwagen48/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B5, B7, D5, C7, F1, F0, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, E6 } -#define UNUSED_PINS /* Indicator LEDs */ #define LED_INDICATOR_TOP B0 diff --git a/keyboards/nopunin10did/railroad/rev0/config.h b/keyboards/nopunin10did/railroad/rev0/config.h index 19aa2ec8fb..b092687229 100644 --- a/keyboards/nopunin10did/railroad/rev0/config.h +++ b/keyboards/nopunin10did/railroad/rev0/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, D3, D5, C6, C7, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D4, D6, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/novelkeys/novelpad/config.h b/keyboards/novelkeys/novelpad/config.h index 2798738fd3..6980258e33 100755 --- a/keyboards/novelkeys/novelpad/config.h +++ b/keyboards/novelkeys/novelpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, C4, C5, C6, C7 } #define MATRIX_COL_PINS { D7, D6, D5, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/220/config.h b/keyboards/noxary/220/config.h index ebaf8c776e..95814568a2 100644 --- a/keyboards/noxary/220/config.h +++ b/keyboards/noxary/220/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C4, B0, D3, D4, D5, D6 } #define MATRIX_COL_PINS { B4, C5, D2, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h index a4e1c63e9d..88c9214a90 100644 --- a/keyboards/noxary/260/config.h +++ b/keyboards/noxary/260/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 } #define MATRIX_COL_PINS { C7, C6, B6, F4, E6, D0, B4, D1, D2, D3, D7, D6, D4, F1, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/268/config.h b/keyboards/noxary/268/config.h index 6f52937cf7..26d9b272dc 100644 --- a/keyboards/noxary/268/config.h +++ b/keyboards/noxary/268/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F5, F4, F0, F1, D0 } #define MATRIX_COL_PINS { C6, C7, F7, F6, E6, B0, D1, B2, B3, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 6e3e5be283..3cade7ae27 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 } #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, D0, D7, D1, D2, B4, D6, D4, D5, F1, D3, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/268_2_rgb/config.h b/keyboards/noxary/268_2_rgb/config.h index b7164743b9..9856f6401e 100644 --- a/keyboards/noxary/268_2_rgb/config.h +++ b/keyboards/noxary/268_2_rgb/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F6, F5, F4, F0, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F1, E6, B2, B1, D6, B4, D7, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/280/config.h b/keyboards/noxary/280/config.h index 17d06155ce..8ba050ab83 100644 --- a/keyboards/noxary/280/config.h +++ b/keyboards/noxary/280/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, E6, D6, D4, F6, F5, F4, F1, B2, D3, D2, D1} #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, B0, B3} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/vulcan/config.h b/keyboards/noxary/vulcan/config.h index 84c4bec622..e54c0c6044 100644 --- a/keyboards/noxary/vulcan/config.h +++ b/keyboards/noxary/vulcan/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D2, F0, F1 } #define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index bf88418deb..12f62c3ff0 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, F6, F5, F0, B4 } #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, B2, D6, D0, D1, D7, D4, D5, D3, F1, D2, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/np12/config.h b/keyboards/np12/config.h index c769feff96..1f9a14b315 100644 --- a/keyboards/np12/config.h +++ b/keyboards/np12/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { D7, E6, B4, F7 } #define MATRIX_COL_PINS { D1, D0, D4, C6, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 5986308f7b..5e3d640dbd 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -30,7 +30,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, E6, D7, C6, D4 } #define MATRIX_COL_PINS { NO_PIN, NO_PIN, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/obosob/arch_36/config.h b/keyboards/obosob/arch_36/config.h index 6ec4b2a26c..9d38dde232 100644 --- a/keyboards/obosob/arch_36/config.h +++ b/keyboards/obosob/arch_36/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/obosob/steal_this_keyboard/config.h b/keyboards/obosob/steal_this_keyboard/config.h index d5f21482aa..acb0d64b79 100644 --- a/keyboards/obosob/steal_this_keyboard/config.h +++ b/keyboards/obosob/steal_this_keyboard/config.h @@ -47,7 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B5, C6, NO_PIN, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/ocean/addon/config.h b/keyboards/ocean/addon/config.h index 9380a36eb6..00d6a02a9d 100644 --- a/keyboards/ocean/addon/config.h +++ b/keyboards/ocean/addon/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } -#define UNUSED_PINS { D0, D1, D2, D3, D4, F4 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ocean/gin_v2/config.h b/keyboards/ocean/gin_v2/config.h index e1d7b9a74d..1c0dabc4e3 100644 --- a/keyboards/ocean/gin_v2/config.h +++ b/keyboards/ocean/gin_v2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS { D2, D3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ocean/stealth/config.h b/keyboards/ocean/stealth/config.h index 2661b00c55..b0240c4a0e 100644 --- a/keyboards/ocean/stealth/config.h +++ b/keyboards/ocean/stealth/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { D1 } #define MATRIX_COL_PINS { D0, D4, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ocean/sus/config.h b/keyboards/ocean/sus/config.h index 4b2306d387..2446daee7b 100644 --- a/keyboards/ocean/sus/config.h +++ b/keyboards/ocean/sus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { C6, D4, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ocean/wang_ergo/config.h b/keyboards/ocean/wang_ergo/config.h index a9a0d11791..05b6b687ed 100644 --- a/keyboards/ocean/wang_ergo/config.h +++ b/keyboards/ocean/wang_ergo/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5, B6, B2, B3, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ocean/wang_v2/config.h b/keyboards/ocean/wang_v2/config.h index a2cd557720..e9953e63cc 100644 --- a/keyboards/ocean/wang_v2/config.h +++ b/keyboards/ocean/wang_v2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/oddball/config.h b/keyboards/oddball/config.h index d56a1f8f26..30e16490c8 100644 --- a/keyboards/oddball/config.h +++ b/keyboards/oddball/config.h @@ -49,4 +49,4 @@ // #define BOOTMAGIC_LITE_COLUMN 0 #define ADNS9800_CS_PIN SPI_SS_PIN -#define PMW3360_CS_PIN SPI_SS_PIN +#define PMW33XX_CS_PIN SPI_SS_PIN diff --git a/keyboards/oddball/v1/config.h b/keyboards/oddball/v1/config.h index 96aa56f822..7a33a7049a 100644 --- a/keyboards/oddball/v1/config.h +++ b/keyboards/oddball/v1/config.h @@ -28,4 +28,3 @@ */ #define MATRIX_ROW_PINS { F6, B5, B6, F7 } #define MATRIX_COL_PINS { D6, D7, B4, D3, C6, C7 } -#define UNUSED_PINS { B7, D4, D5, E6, F0, F1, F4, F5 } diff --git a/keyboards/oddball/v2/config.h b/keyboards/oddball/v2/config.h index 9ba3bb8dfb..793d305931 100644 --- a/keyboards/oddball/v2/config.h +++ b/keyboards/oddball/v2/config.h @@ -28,4 +28,3 @@ */ #define MATRIX_ROW_PINS { D4, E6, D7, C6 } #define MATRIX_COL_PINS { B7, B5, B4, F5, F6, F7 } -#define UNUSED_PINS { D3, D5, C7, F1, F0, B6, F4 } diff --git a/keyboards/oddball/v2_1/config.h b/keyboards/oddball/v2_1/config.h index 6be3e8a248..9f138d7d52 100644 --- a/keyboards/oddball/v2_1/config.h +++ b/keyboards/oddball/v2_1/config.h @@ -28,4 +28,3 @@ */ #define MATRIX_ROW_PINS { D4, E6, D7, C6 } #define MATRIX_COL_PINS { B6, B5, B4, F5, F6, F7 } -#define UNUSED_PINS { D3, D5, C7, F1, F0, B7, F4 } diff --git a/keyboards/odelia/config.h b/keyboards/odelia/config.h index c3351725a6..c69ebcac30 100644 --- a/keyboards/odelia/config.h +++ b/keyboards/odelia/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B3, B7, B1, B2, B0, F4, F0, F1, D4, B6} #define MATRIX_COL_PINS {B5, B4, D7, D6, E6, D0, D1, D2, D3, D5} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index 612fa7cecc..96fff1b590 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/orange75/config.h b/keyboards/orange75/config.h index 4a867334f9..e2d37a26ac 100644 --- a/keyboards/orange75/config.h +++ b/keyboards/orange75/config.h @@ -7,7 +7,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { E6,F0, F1, F4, F5, F6, F7, C7, C6, B6, B4, D7, D4, D5, D6 } #define MATRIX_COL_PINS { D3, D2, D1, D0, B7, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 6f151c2f1c..a6a64476cd 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* Backlight Setup */ #define BACKLIGHT_PIN F5 diff --git a/keyboards/ortho5by12/config.h b/keyboards/ortho5by12/config.h index 2254999b02..f8b8de4259 100644 --- a/keyboards/ortho5by12/config.h +++ b/keyboards/ortho5by12/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 0 1 2 3 4 5 6 7 8 9 */ #define MATRIX_ROW_PINS { B5, B1, B2, B3, B4, C0, D5, D6, D7, B0 } #define MATRIX_COL_PINS { C2, D0, D1, D4, C3, C1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/orthocode/config.h b/keyboards/orthocode/config.h index 9bab689618..644d7ba255 100644 --- a/keyboards/orthocode/config.h +++ b/keyboards/orthocode/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B0, B1, B2, B3, B4} #define MATRIX_COL_PINS {C4, C3, C2, C1, C0, D7, D6, A7, A4, A5, A6, A3, A2, A1, A0} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/p3d/glitch/config.h b/keyboards/p3d/glitch/config.h index 301597df08..475a2bd442 100644 --- a/keyboards/p3d/glitch/config.h +++ b/keyboards/p3d/glitch/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { D5, D6, B6, D7, C7, B4, B5, D3, D4, C6 } #define MATRIX_COL_PINS { B2, D2, B3, B7, F5, F4, F1, F0 } -#define UNUSED_PINS #define RGB_DI_PIN B1 #define RGBLED_NUM 25 diff --git a/keyboards/pabile/p18/config.h b/keyboards/pabile/p18/config.h index 73c17b676a..a13313413d 100644 --- a/keyboards/pabile/p18/config.h +++ b/keyboards/pabile/p18/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out for PROMICRO */ #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { D2, D7, E6, B4, B5 } -#define UNUSED_PINS /* Encoder position for PROMICRO */ #define ENCODERS_PAD_A { B6, F6 } diff --git a/keyboards/pabile/p20/ver1/config.h b/keyboards/pabile/p20/ver1/config.h index 94c600106b..6b7ed83bd4 100644 --- a/keyboards/pabile/p20/ver1/config.h +++ b/keyboards/pabile/p20/ver1/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } #define MATRIX_COL_PINS { D0, B2, D4, B6 } -#define UNUSED_PINS #define ENCODERS_PAD_A { F5, F7 } #define ENCODERS_PAD_B { F6, B1 } diff --git a/keyboards/pabile/p20/ver2/config.h b/keyboards/pabile/p20/ver2/config.h index 0997001836..f7b41099c4 100644 --- a/keyboards/pabile/p20/ver2/config.h +++ b/keyboards/pabile/p20/ver2/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* pin-out */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { D1, D0, D4, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p40/config.h b/keyboards/pabile/p40/config.h index 7a15886a44..f90aefef0c 100644 --- a/keyboards/pabile/p40/config.h +++ b/keyboards/pabile/p40/config.h @@ -32,7 +32,6 @@ for pro micro facing back of pcb #define MATRIX_ROW_PINS { D4, E6, B4, B5 } #define MATRIX_COL_PINS { D1, D0, B6, B2, B3, B1, F7, F6, F5, F4 } */ -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p40_ortho/config.h b/keyboards/pabile/p40_ortho/config.h index 176072f022..5a8c1625d5 100644 --- a/keyboards/pabile/p40_ortho/config.h +++ b/keyboards/pabile/p40_ortho/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D0, F4, F5 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B2, B3, B1, F7, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p42/config.h b/keyboards/pabile/p42/config.h index e66f14c854..0a6fe4a2fc 100644 --- a/keyboards/pabile/p42/config.h +++ b/keyboards/pabile/p42/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2, C7, D6, B7, B6, B5 } */ -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/palette1202/config.h b/keyboards/palette1202/config.h index c4d231d298..d631ed8463 100644 --- a/keyboards/palette1202/config.h +++ b/keyboards/palette1202/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B6, B2, B3 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } -#define UNUSED_PINS { D2, D3, D4, B1 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/panc40/config.h b/keyboards/panc40/config.h index 6472195394..cc941d56af 100644 --- a/keyboards/panc40/config.h +++ b/keyboards/panc40/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, F4, F5 } #define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index ad48909009..5bf4d4edcd 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/papercranekeyboards/gerald65/config.h b/keyboards/papercranekeyboards/gerald65/config.h index aedb9083bd..318671f298 100644 --- a/keyboards/papercranekeyboards/gerald65/config.h +++ b/keyboards/papercranekeyboards/gerald65/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { B7, D6, E6, B4, B5 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D7, D4, D3, D2, D1, D0, B6, C6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/parallel/parallel_65/hotswap/config.h b/keyboards/parallel/parallel_65/hotswap/config.h index c953d92e64..6abeea3bc8 100644 --- a/keyboards/parallel/parallel_65/hotswap/config.h +++ b/keyboards/parallel/parallel_65/hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/parallel/parallel_65/soldered/config.h b/keyboards/parallel/parallel_65/soldered/config.h index c953d92e64..6abeea3bc8 100644 --- a/keyboards/parallel/parallel_65/soldered/config.h +++ b/keyboards/parallel/parallel_65/soldered/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pdxkbc/config.h b/keyboards/pdxkbc/config.h index 7215b481c9..b24592942f 100644 --- a/keyboards/pdxkbc/config.h +++ b/keyboards/pdxkbc/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F7, B6, F4 } #define MATRIX_COL_PINS { D1, E6 } -#define UNUSED_PINS { D0, D4, C6, D7, B4, B5, F5, F6, B1, B3, B2 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 5b93f4d28c..8f17638549 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/pearl/keymaps/cijanzen/keymap.c b/keyboards/pearl/keymaps/cijanzen/keymap.c index 896e157fd6..5a3f1eb1cd 100644 --- a/keyboards/pearl/keymaps/cijanzen/keymap.c +++ b/keyboards/pearl/keymaps/cijanzen/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /** * Status LED layer indicators courtesy of jetpacktuxedo's firmware */ -uint32_t layer_state_set_kb(uint32_t state) +layer_state_t layer_state_set_kb(layer_state_t state) { if (state & (1<<1)) { // if we are on layer 1 PORTD |= (1 << PD0); // light num lock led diff --git a/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c b/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c index 759c6fdc7d..4fd35f63ce 100644 --- a/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/pearl/keymaps/jetpacktuxedo/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_kb(uint32_t state) { +layer_state_t layer_state_set_kb(layer_state_t state) { // if we are on layer 1 if (state & (1<<1)){ // light num lock led diff --git a/keyboards/pearl/keymaps/phil/keymap.c b/keyboards/pearl/keymaps/phil/keymap.c index 56326d423f..492c4cb0c5 100755 --- a/keyboards/pearl/keymaps/phil/keymap.c +++ b/keyboards/pearl/keymaps/phil/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_kb(uint32_t state) { +layer_state_t layer_state_set_kb(layer_state_t state) { if (state & (1<<QWERTY)){ PORTD &= ~(1 << PD0); } else { diff --git a/keyboards/pearl/keymaps/rask/keymap.c b/keyboards/pearl/keymaps/rask/keymap.c index bafb2b9738..30c8b6344f 100644 --- a/keyboards/pearl/keymaps/rask/keymap.c +++ b/keyboards/pearl/keymaps/rask/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /** * Status LED layer indicators courtesy of jetpacktuxedo's firmware */ -uint32_t layer_state_set_kb(uint32_t state) +layer_state_t layer_state_set_kb(layer_state_t state) { // if we are on layer 1 if (state & (1<<1)){ diff --git a/keyboards/pearlboards/atlas/config.h b/keyboards/pearlboards/atlas/config.h index 2ec131f0f0..a90e3e190b 100644 --- a/keyboards/pearlboards/atlas/config.h +++ b/keyboards/pearlboards/atlas/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D6, E1, C0, C4, E3 } #define MATRIX_COL_PINS { D5, D4, C1, C2, C3, C5, C7, A7, A6, A5, A4, A3, A2, A1, A0, F7 } -#define UNUSED_PINS { E4, E5, E6, E7, F0, F1, F2, F3, B0, B4, B5, B7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearlboards/pandora/config.h b/keyboards/pearlboards/pandora/config.h index 46a887c6ab..85661f2993 100644 --- a/keyboards/pearlboards/pandora/config.h +++ b/keyboards/pearlboards/pandora/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, D7, D6, B3, B0 } #define MATRIX_COL_PINS { D2, D1, D0, D3, D5, B5, B6, B7, D4, C6, C7, F0, F1, F4, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearlboards/zeus/config.h b/keyboards/pearlboards/zeus/config.h index 19d14f701b..2a371716b5 100644 --- a/keyboards/pearlboards/zeus/config.h +++ b/keyboards/pearlboards/zeus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, C1, E1, E0, D7, D6 } #define MATRIX_COL_PINS { F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, C7, C2, C0 } -#define UNUSED_PINS { E3, E4, E5, B0, B4, B5, B6, B7, D4 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearlboards/zeuspad/config.h b/keyboards/pearlboards/zeuspad/config.h index e4182d05ed..484af3d2d9 100644 --- a/keyboards/pearlboards/zeuspad/config.h +++ b/keyboards/pearlboards/zeuspad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, D5, F7, F4, F1 } #define MATRIX_COL_PINS { B0, F0, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/peej/lumberjack/config.h b/keyboards/peej/lumberjack/config.h index 3142738330..f9f927f9d9 100644 --- a/keyboards/peej/lumberjack/config.h +++ b/keyboards/peej/lumberjack/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 10 #define MATRIX_ROW_PINS { C0, B5, B4, B3, B2, B1 } #define MATRIX_COL_PINS { B0, D7, D6, D5, D4, D1, D0, C1, C2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/peej/rosaline/config.h b/keyboards/peej/rosaline/config.h index 9efd6c0ff7..4389572588 100644 --- a/keyboards/peej/rosaline/config.h +++ b/keyboards/peej/rosaline/config.h @@ -23,7 +23,6 @@ #define MATRIX_COLS 8 #define MATRIX_ROW_PINS { C0, B5, B4, B3, B2, B1, C3, D5 } #define MATRIX_COL_PINS { B0, D7, D6, C2, D4, D1, D0, C1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/peej/tripel/config.h b/keyboards/peej/tripel/config.h index 6f11bfb405..1ea4947f32 100644 --- a/keyboards/peej/tripel/config.h +++ b/keyboards/peej/tripel/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 8 #define MATRIX_ROW_PINS { C6, D4, D0, B4, E6, D7, D1, D2, D3 } #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5 } -#define UNUSED_PINS { F4 } /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pegasus/config.h b/keyboards/pegasus/config.h index cf71fdab68..2729258198 100644 --- a/keyboards/pegasus/config.h +++ b/keyboards/pegasus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, E6 } #define MATRIX_COL_PINS { D2, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5 } -//#define UNUSED_PINS { B0, B1, B2, B3, B7 } /* COL2ROW, ROW2COL*/ diff --git a/keyboards/peranekofactory/tone/rev1/config.h b/keyboards/peranekofactory/tone/rev1/config.h index fa69ad2a3f..03e4b3cae9 100644 --- a/keyboards/peranekofactory/tone/rev1/config.h +++ b/keyboards/peranekofactory/tone/rev1/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { D4, C6, D7, E6, F6, F7, B1, B3 } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/peranekofactory/tone/rev2/config.h b/keyboards/peranekofactory/tone/rev2/config.h index fa69ad2a3f..03e4b3cae9 100644 --- a/keyboards/peranekofactory/tone/rev2/config.h +++ b/keyboards/peranekofactory/tone/rev2/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIRECT_PINS { \ { D4, C6, D7, E6, F6, F7, B1, B3 } \ } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index ebaaae28d9..8b0c8ad8da 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/percent/canoe/keymaps/dhertz/keymap.c b/keyboards/percent/canoe/keymaps/dhertz/keymap.c index 7e8170aefc..7d855e8fa7 100644 --- a/keyboards/percent/canoe/keymaps/dhertz/keymap.c +++ b/keyboards/percent/canoe/keymaps/dhertz/keymap.c @@ -49,8 +49,8 @@ void keyboard_post_init_user(void) { rgblight_sethsv_teal(); } -uint32_t layer_state_set_keymap(uint32_t state) { - switch (biton32(state)) { +layer_state_t layer_state_set_keymap(layer_state_t state) { + switch (get_highest_layer(state)) { case 1: rgblight_sethsv_noeeprom_magenta(); break; diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h index d7df79cebe..1f05360aae 100644 --- a/keyboards/percent/canoe_gen2/config.h +++ b/keyboards/percent/canoe_gen2/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B1,B3,B2,F5,F4} #define MATRIX_COL_PINS {B0,D0,C6,B6,B5,B4,D7,D6,D4,D5,D3,D2,D1,F6,F7} -#define UNUSED_PINS /* Uncomment if your encoder doesn't react to every turn or skips */ //#define ENCODER_RESOLUTION 2 diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h index 2966a84aed..0e61f5d2ff 100644 --- a/keyboards/percent/skog_lite/config.h +++ b/keyboards/percent/skog_lite/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B5 } #define MATRIX_COL_PINS { C4, C2, D7, C7, C6, A0, A1, A2, A3, A7, A6, A4, A5, C5, C3} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index 35f2131fc5..2b1e6b1e5f 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D5, C7, C6, D4, D0, E6, F0, F1, F4, F5, F6, F7, D7, D6, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/phoenix/phoenix.c b/keyboards/phoenix/phoenix.c index a8e9a42a04..706a65b4de 100644 --- a/keyboards/phoenix/phoenix.c +++ b/keyboards/phoenix/phoenix.c @@ -74,7 +74,7 @@ void manipulate_led(uint32_t led, bool on) { } -layer_state_t layer_state_set_kb(uint32_t state) { +layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); uint8_t layer = get_highest_layer(state); diff --git a/keyboards/picolab/frusta_fundamental/config.h b/keyboards/picolab/frusta_fundamental/config.h index 8ebfa35d09..6a3e76ba8c 100644 --- a/keyboards/picolab/frusta_fundamental/config.h +++ b/keyboards/picolab/frusta_fundamental/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B1, B2, B3, B7, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pierce/keymaps/durken1/config.h b/keyboards/pierce/keymaps/durken1/config.h index 7d19a0b83b..bc0bb1c4b8 100644 --- a/keyboards/pierce/keymaps/durken1/config.h +++ b/keyboards/pierce/keymaps/durken1/config.h @@ -27,9 +27,6 @@ #define PERMISSIVE_HOLD -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - // Combo settings #define COMBO_COUNT 3 #define COMBO_TERM 35 @@ -74,4 +71,3 @@ #ifdef AUTO_BUTTONS #define AUTO_BUTTONS_TIMEOUT 750 #endif - diff --git a/keyboards/pimentoso/paddino02/rev1/config.h b/keyboards/pimentoso/paddino02/rev1/config.h index 3060794b42..b9661afbaa 100755 --- a/keyboards/pimentoso/paddino02/rev1/config.h +++ b/keyboards/pimentoso/paddino02/rev1/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/pimentoso/paddino02/rev2/left/config.h b/keyboards/pimentoso/paddino02/rev2/left/config.h index 4bf4b1dcaf..9de375d0b3 100755 --- a/keyboards/pimentoso/paddino02/rev2/left/config.h +++ b/keyboards/pimentoso/paddino02/rev2/left/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D4, D1 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pimentoso/paddino02/rev2/right/config.h b/keyboards/pimentoso/paddino02/rev2/right/config.h index 3393107a06..38253bb4a2 100755 --- a/keyboards/pimentoso/paddino02/rev2/right/config.h +++ b/keyboards/pimentoso/paddino02/rev2/right/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F6, F5 } #define MATRIX_COL_PINS { B6, B2, B3, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h index ebb69a0119..f6b8dc4343 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -36,7 +36,6 @@ // wiring of each half #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index c7f2ab8ef6..c980f9d302 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -36,7 +36,6 @@ // wiring of each half #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pisces/config.h b/keyboards/pisces/config.h index ce65056d1a..42db825e3e 100644 --- a/keyboards/pisces/config.h +++ b/keyboards/pisces/config.h @@ -45,7 +45,6 @@ */ #define MATRIX_ROW_PINS { C4, B0, C7 } #define MATRIX_COL_PINS { B1, B2, B3, B4, B5, B6, B7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pizzakeyboards/pizza65/config.h b/keyboards/pizzakeyboards/pizza65/config.h index b0a6a3df2b..1789ead3e8 100644 --- a/keyboards/pizzakeyboards/pizza65/config.h +++ b/keyboards/pizzakeyboards/pizza65/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B15, A10, F1, A0, A1 } #define MATRIX_COL_PINS { A9, A8, F0, A2, A3, A4, B9, B8, B7, B6, B5, B4, B3, A15, A14, A13} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pjb/eros/config.h b/keyboards/pjb/eros/config.h index d6b690d0dd..c8d9692461 100644 --- a/keyboards/pjb/eros/config.h +++ b/keyboards/pjb/eros/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { B2, B1, B0, D7, B7, D1 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, D4, D5, B4, D3, D2, E6, B3 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/pkb65/config.h b/keyboards/pkb65/config.h index c4c707d3e8..ab71d1633e 100644 --- a/keyboards/pkb65/config.h +++ b/keyboards/pkb65/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B7, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 8fb9dda32a..847480b3e2 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #define QMK_ESC_OUTPUT F1 #define QMK_ESC_INPUT D5 diff --git a/keyboards/planck/keymaps/ariccb/config.h b/keyboards/planck/keymaps/ariccb/config.h index 322aa9277f..464a8cd5db 100644 --- a/keyboards/planck/keymaps/ariccb/config.h +++ b/keyboards/planck/keymaps/ariccb/config.h @@ -40,6 +40,7 @@ //#define MIDI_ADVANCED #define TAPPING_TERM 150 +#define TAPPING_TERM_PER_KEY #define IGNORE_MOD_TAP_INTERRUPT // #define IGNORE_MOD_TAP_INTERRUPT // #define HOLD_ON_OTHER_KEY_PRESS diff --git a/keyboards/planck/keymaps/ariccb/keymap.c b/keyboards/planck/keymaps/ariccb/keymap.c index c0b4e490fa..33d0a26273 100644 --- a/keyboards/planck/keymaps/ariccb/keymap.c +++ b/keyboards/planck/keymaps/ariccb/keymap.c @@ -379,9 +379,18 @@ void usl_reset(qk_tap_dance_state_t *state, void *user_data) { // Associate our tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [UNDS_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, usl_finished, usl_reset, 175) + [UNDS_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, usl_finished, usl_reset) }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(UNDS_LOWER): + return 175; + default: + return TAPPING_TERM; + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!process_select_word(keycode, record, SELWORD)) { return false; } if (!process_caps_word(keycode, record)) { return false; } @@ -661,4 +670,4 @@ void process_combo_event(uint16_t combo_index, bool pressed) { } break; } -}
\ No newline at end of file +} diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index 8fe66b3781..7ff410c767 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c @@ -142,7 +142,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_BREATHING breathing_enable(); @@ -151,7 +151,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { layer_off(_LOWER); - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_BREATHING breathing_self_disable(); @@ -164,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RAISE: if (record->event.pressed) { layer_on(_RAISE); - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_BREATHING breathing_enable(); @@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { layer_off(_RAISE); - uint8_t default_layer = biton32(default_layer_state); + uint8_t default_layer = get_highest_layer(default_layer_state); if (default_layer == _QWERTY) { #ifdef BACKLIGHT_BREATHING breathing_self_disable(); diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c index cec3f0186a..bfe61294af 100644 --- a/keyboards/planck/keymaps/charlesrocket/keymap.c +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -101,7 +101,7 @@ void set_layer_color(int layer) { void rgb_matrix_indicators_user(void) { if (g_suspend_state || keyboard_config.disable_layer_led) { return; } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case 0: set_layer_color(0); break; diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 3453d41746..8041e0bada 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_planck_grid( _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/planck/keymaps/grahampheath/keymap.c b/keyboards/planck/keymaps/grahampheath/keymap.c index babe67c442..eb5401eabd 100644 --- a/keyboards/planck/keymaps/grahampheath/keymap.c +++ b/keyboards/planck/keymaps/grahampheath/keymap.c @@ -231,7 +231,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool has_layer_changed = true; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); static uint8_t old_layer = 0; if (old_layer != layer) { diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c index 0368c98420..fae5a94713 100644 --- a/keyboards/planck/keymaps/oryx/keymap.c +++ b/keyboards/planck/keymaps/oryx/keymap.c @@ -94,7 +94,7 @@ void rgb_matrix_indicators_user(void) { if (keyboard_config.disable_layer_led) { return; } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case 1: set_layer_color(0); break; diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index c85e8656e6..d72b6d3908 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -5,12 +5,6 @@ #define PRIYADI_PLANCK -/* bootmagic salt key */ -#define BOOTMAGIC_KEY_SALT KC_ESC - -/* skip bootmagic and eeconfig */ -#define BOOTMAGIC_KEY_SKIP KC_SPACE - #define UNICODE_TYPE_DELAY 0 #define LAYOUT_DVORAK diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index 0fb08540d4..78e12d3120 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #endif /* diff --git a/keyboards/planck/keymaps/roguepullrequest/rules.mk b/keyboards/planck/keymaps/roguepullrequest/rules.mk index 9394c96e5b..5eb053e886 100644 --- a/keyboards/planck/keymaps/roguepullrequest/rules.mk +++ b/keyboards/planck/keymaps/roguepullrequest/rules.mk @@ -1,4 +1,3 @@ AUDIO_ENABLE = yes COMMAND_ENABLE = no -TERMINAL_ENABLE = no TAP_DANCE_ENABLE = yes diff --git a/keyboards/planck/keymaps/rootiest/config.h b/keyboards/planck/keymaps/rootiest/config.h index fc1fc81761..5bb5a73a29 100644 --- a/keyboards/planck/keymaps/rootiest/config.h +++ b/keyboards/planck/keymaps/rootiest/config.h @@ -87,6 +87,7 @@ /* * TAP-DANCE options */ +#define TAPPING_TERM_PER_KEY // Control Tap-Dance time individually by key #define TAPPING_TERM 250 // Default time allowed before resetting a Tap-Dance combo #define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */ #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ diff --git a/keyboards/planck/keymaps/rootiest/keymap.c b/keyboards/planck/keymaps/rootiest/keymap.c index 634bf2829e..c289c50e5b 100644 --- a/keyboards/planck/keymaps/rootiest/keymap.c +++ b/keyboards/planck/keymaps/rootiest/keymap.c @@ -502,7 +502,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { if (index == 0) { /* First encoder */ uint16_t held_keycode_timer = timer_read(); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case 0: // Base Layer if ((get_mods() & MOD_MASK_GUI)) { // GUI-ed if (clockwise) { @@ -1656,13 +1656,26 @@ void sml_reset(qk_tap_dance_state_t* state, void* user_data) { sml_state.state = // Tap Dance definitions qk_tap_dance_action_t tap_dance_actions[] = { // Tap once for °, twice for ℉, thrice for ℃ - [TD_DEG_DEGF] = ACTION_TAP_DANCE_FN(send_degree_symbol), // - [TD_LSHFT_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, scap_finished, scap_reset, 200), // - [TD_LCTL_STICKY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, slctl_finished, slctl_reset, 200), // - [TD_LALT_STICKY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, slalt_finished, slalt_reset, 200), // - [TD_SMILEY] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, sml_finished, sml_reset, 500), + [TD_DEG_DEGF] = ACTION_TAP_DANCE_FN(send_degree_symbol), // + [TD_LSHFT_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, scap_finished, scap_reset), // + [TD_LCTL_STICKY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, slctl_finished, slctl_reset), // + [TD_LALT_STICKY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, slalt_finished, slalt_reset), // + [TD_SMILEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sml_finished, sml_reset), }; +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TD(TD_LSHFT_CAPS): + case TD(TD_LCTL_STICKY): + case TD(TD_LALT_STICKY): + return 200; + case TD(TD_SMILEY): + return 500; + default: + return TAPPING_TERM; + } +} + // Dip-Switch controls void dip_switch_update_user(uint8_t index, bool active) { switch (index) { diff --git a/keyboards/planck/keymaps/rootiest/rules.mk b/keyboards/planck/keymaps/rootiest/rules.mk index b669d8bb7d..ca0f90b6e9 100644 --- a/keyboards/planck/keymaps/rootiest/rules.mk +++ b/keyboards/planck/keymaps/rootiest/rules.mk @@ -20,8 +20,5 @@ KEY_LOCK_ENABLE = yes # Enables using lock key to maintain holds # SWAP_HANDS_ENABLE = yes # Enables the swap hands function # DEBOUNCE_TYPE = sym_eager_pk # Change debounce algorithm -# NOTE: The following requires a lot of memory to include -TERMINAL_ENABLE = yes # Enables a command-line-like interface designed to communicate through a text editor with keystrokes - # NOTE: The following is not yet available in main qmk branch KEY_OVERRIDE_ENABLE = yes # Allows overiding modifier combos (change Shift+1 without affecting 1 or Shift's normal operation) diff --git a/keyboards/planck/keymaps/synth_sample/keymap.c b/keyboards/planck/keymaps/synth_sample/keymap.c index 0a57b7ce9a..124c01cb05 100644 --- a/keyboards/planck/keymaps/synth_sample/keymap.c +++ b/keyboards/planck/keymaps/synth_sample/keymap.c @@ -160,10 +160,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/planck/keymaps/synth_wavetable/keymap.c b/keyboards/planck/keymaps/synth_wavetable/keymap.c index d413d63896..a5c5491ebd 100644 --- a/keyboards/planck/keymaps/synth_wavetable/keymap.c +++ b/keyboards/planck/keymaps/synth_wavetable/keymap.c @@ -160,10 +160,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index 66beaf33b7..d888fb7b05 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -228,7 +228,7 @@ bool music_mask_user(uint16_t keycode) { void rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _RAISE: for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c index 5cbc47b2fb..b4c0f9af52 100644 --- a/keyboards/planck/keymaps/tylerwince/keymap.c +++ b/keyboards/planck/keymaps/tylerwince/keymap.c @@ -168,7 +168,7 @@ void set_layer_color(int layer) { void rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color) { return; } - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case 0: set_layer_color(0); break; @@ -276,7 +276,7 @@ bool music_mask_user(uint16_t keycode) { layer_state_t layer_state_set_user(layer_state_t state) { palClearPad(GPIOB, 8); palClearPad(GPIOB, 9); - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); switch (layer) { case _LOWER: palSetPad(GPIOB, 9); diff --git a/keyboards/planck/keymaps/zrichard/config.h b/keyboards/planck/keymaps/zrichard/config.h index d12c19065c..eaedf65575 100755 --- a/keyboards/planck/keymaps/zrichard/config.h +++ b/keyboards/planck/keymaps/zrichard/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #endif /* enable basic MIDI features: diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 778fa12fcc..65d613048a 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -44,7 +44,6 @@ #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/planck/rev6_drop/config.h b/keyboards/planck/rev6_drop/config.h index f41d46b889..6869997ae2 100644 --- a/keyboards/planck/rev6_drop/config.h +++ b/keyboards/planck/rev6_drop/config.h @@ -48,7 +48,6 @@ #define MATRIX_COL_PINS \ { B11, B10, B2, B1, A7, B0 } -#define UNUSED_PINS #define ENCODERS_PAD_A \ { B12 } diff --git a/keyboards/planck/rev6_drop/matrix.c b/keyboards/planck/rev6_drop/matrix.c index 49e115d029..d10d94dcf8 100644 --- a/keyboards/planck/rev6_drop/matrix.c +++ b/keyboards/planck/rev6_drop/matrix.c @@ -15,14 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdint.h> -#include <stdbool.h> -#include <string.h> -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "debug.h" -#include "matrix.h" +#include "quantum.h" /* * col: { B11, B10, B2, B1, A7, B0 } @@ -38,9 +31,13 @@ __attribute__((weak)) void matrix_init_user(void) {} __attribute__((weak)) void matrix_scan_user(void) {} -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); +} -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); +} void matrix_init(void) { dprintf("matrix init\n"); @@ -146,9 +143,13 @@ uint8_t matrix_scan(void) { return 1; } -bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); } +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1 << col)); +} -matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} void matrix_print(void) { dprintf("\nr/c 01234567\n"); diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index 80dc8f1249..af3f2b2dbb 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h @@ -9,7 +9,6 @@ /* key matrix pins 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 } #define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index ae5735508a..d3aaa893e0 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h index 1614f09f84..6a6713557b 100644 --- a/keyboards/ploopyco/mouse/config.h +++ b/keyboards/ploopyco/mouse/config.h @@ -41,7 +41,7 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { B4, D6, F1, F5, F6, F7 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ @@ -70,5 +70,5 @@ // #define DEBUG_LED_PIN F7 -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B0 +/* PMW33XX Settings */ +#define PMW33XX_CS_PIN B0 diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/config.h b/keyboards/ploopyco/mouse/keymaps/drashna/config.h index 9aa9a40769..1dc1b7695f 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/config.h +++ b/keyboards/ploopyco/mouse/keymaps/drashna/config.h @@ -28,4 +28,4 @@ #define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_SLEEP -#define MOUSE_EXT_REPORT +#define MOUSE_EXTENDED_REPORT diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index 25ebd1ee2d..7caba1e1bb 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -199,8 +199,8 @@ void keyboard_pre_init_kb(void) { * pathways to ground. If you're messing with this, know this: driving ANY * of these pins high will cause a short. On the MCU. Ka-blooey. */ -#ifdef UNUSED_PINS - const pin_t unused_pins[] = UNUSED_PINS; +#ifdef UNUSABLE_PINS + const pin_t unused_pins[] = UNUSABLE_PINS; for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { setPinOutput(unused_pins[i]); diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h index 0b2e96155f..54a301b0d2 100644 --- a/keyboards/ploopyco/trackball/config.h +++ b/keyboards/ploopyco/trackball/config.h @@ -47,6 +47,6 @@ // If board has a debug LED, you can enable it by defining this // #define DEBUG_LED_PIN F7 -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B0 +/* PMW33XX Settings */ +#define PMW33XX_CS_PIN B0 #define POINTING_DEVICE_INVERT_Y diff --git a/keyboards/ploopyco/trackball/rev1/config.h b/keyboards/ploopyco/trackball/rev1/config.h index 2908f09602..3db085baf2 100644 --- a/keyboards/ploopyco/trackball/rev1/config.h +++ b/keyboards/ploopyco/trackball/rev1/config.h @@ -35,7 +35,7 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { D1, D3, B4, B6, B7, D6, C7, F6, F5, F3, F7 } // If board has a debug LED, you can enable it by defining this diff --git a/keyboards/ploopyco/trackball/rev1_005/config.h b/keyboards/ploopyco/trackball/rev1_005/config.h index 83e70181de..321e3004d1 100644 --- a/keyboards/ploopyco/trackball/rev1_005/config.h +++ b/keyboards/ploopyco/trackball/rev1_005/config.h @@ -35,7 +35,7 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { D1, D3, B4, B7, D6, C7, F6, F5, F3, F7 } // If board has a debug LED, you can enable it by defining this diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index bda21b5c88..7a576a586d 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c @@ -204,8 +204,8 @@ void keyboard_pre_init_kb(void) { * pathways to ground. If you're messing with this, know this: driving ANY * of these pins high will cause a short. On the MCU. Ka-blooey. */ -#ifdef UNUSED_PINS - const pin_t unused_pins[] = UNUSED_PINS; +#ifdef UNUSABLE_PINS + const pin_t unused_pins[] = UNUSABLE_PINS; for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { setPinOutput(unused_pins[i]); diff --git a/keyboards/ploopyco/trackball_mini/rev1_001/config.h b/keyboards/ploopyco/trackball_mini/rev1_001/config.h index 06720b8fdf..d4c9d23bec 100644 --- a/keyboards/ploopyco/trackball_mini/rev1_001/config.h +++ b/keyboards/ploopyco/trackball_mini/rev1_001/config.h @@ -36,5 +36,5 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { B5, C7, D0, D1, D3, D5, D6, F1, F3, F5, F6, F7 } diff --git a/keyboards/ploopyco/trackball_mini/rev1_002/config.h b/keyboards/ploopyco/trackball_mini/rev1_002/config.h index 06720b8fdf..d4c9d23bec 100644 --- a/keyboards/ploopyco/trackball_mini/rev1_002/config.h +++ b/keyboards/ploopyco/trackball_mini/rev1_002/config.h @@ -36,5 +36,5 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { B5, C7, D0, D1, D3, D5, D6, F1, F3, F5, F6, F7 } diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.c b/keyboards/ploopyco/trackball_mini/trackball_mini.c index e4b4a47c2b..03cba2200e 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.c +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.c @@ -200,8 +200,8 @@ void keyboard_pre_init_kb(void) { * pathways to ground. If you're messing with this, know this: driving ANY * of these pins high will cause a short. On the MCU. Ka-blooey. */ -#ifdef UNUSED_PINS - const pin_t unused_pins[] = UNUSED_PINS; +#ifdef UNUSABLE_PINS + const pin_t unused_pins[] = UNUSABLE_PINS; for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { setPinOutput(unused_pins[i]); diff --git a/keyboards/ploopyco/trackball_nano/rev1_001/config.h b/keyboards/ploopyco/trackball_nano/rev1_001/config.h index 6d265d7233..3bde88487a 100644 --- a/keyboards/ploopyco/trackball_nano/rev1_001/config.h +++ b/keyboards/ploopyco/trackball_nano/rev1_001/config.h @@ -33,5 +33,5 @@ // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default -#define UNUSED_PINS \ +#define UNUSABLE_PINS \ { B5, B6, C7, D0, D1, D2, D3, D4, D5, D6, D7, E6, F1, F3, F5, F6, F7 } diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c index 0f2fbe2f72..eb1d8e10b0 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.c +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c @@ -86,8 +86,8 @@ void keyboard_pre_init_kb(void) { * pathways to ground. If you're messing with this, know this: driving ANY * of these pins high will cause a short. On the MCU. Ka-blooey. */ -#ifdef UNUSED_PINS - const pin_t unused_pins[] = UNUSED_PINS; +#ifdef UNUSABLE_PINS + const pin_t unused_pins[] = UNUSABLE_PINS; for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { setPinOutput(unused_pins[i]); diff --git a/keyboards/pluckey/config.h b/keyboards/pluckey/config.h index 56663e1d3e..152b8c3169 100644 --- a/keyboards/pluckey/config.h +++ b/keyboards/pluckey/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, F5, F6, B6, B5 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, F7 } -#define UNUSED_PINS { F4, B1 } #define DIODE_DIRECTION COL2ROW /* encoder support */ diff --git a/keyboards/plume/plume65/config.h b/keyboards/plume/plume65/config.h index 31b6d64a23..0a9cf3ceca 100644 --- a/keyboards/plume/plume65/config.h +++ b/keyboards/plume/plume65/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { D2, D5, E6, D0, D1 } #define MATRIX_COL_PINS { B7, F7, C7, C6, B6, F0, B5, F1, B4, F4, D7, F5, D6, F6, D4 } -#define UNUSED_PINS { } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/plut0nium/0x3e/config.h b/keyboards/plut0nium/0x3e/config.h index 6e72462c45..86ec6d2f15 100644 --- a/keyboards/plut0nium/0x3e/config.h +++ b/keyboards/plut0nium/0x3e/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D5, D4, D6, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/plywrks/ahgase/config.h b/keyboards/plywrks/ahgase/config.h index f38aeba740..c1a90de131 100644 --- a/keyboards/plywrks/ahgase/config.h +++ b/keyboards/plywrks/ahgase/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B3, B7, D6, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D4, D5, B0, B1, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pohjolaworks/louhi/config.h b/keyboards/pohjolaworks/louhi/config.h index c0f52dd312..e2ff5a06ac 100644 --- a/keyboards/pohjolaworks/louhi/config.h +++ b/keyboards/pohjolaworks/louhi/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, D1, D0, D7, C6, B4, E6 } #define MATRIX_COL_PINS { D4, B6, F4, F5, F6, F7, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/polilla/rev1/config.h b/keyboards/polilla/rev1/config.h index b48e99e6d5..8baa3b3162 100644 --- a/keyboards/polilla/rev1/config.h +++ b/keyboards/polilla/rev1/config.h @@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B0, A7, F1, A0 } #define MATRIX_COL_PINS { A6, A5, A4, A3, A2, A1, F0, B7, B6, B5, B4, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/polycarbdiet/s20/config.h b/keyboards/polycarbdiet/s20/config.h index 60016869f5..350f7dfff3 100644 --- a/keyboards/polycarbdiet/s20/config.h +++ b/keyboards/polycarbdiet/s20/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 1 2 3 4 5 #define MATRIX_ROW_PINS { B7, E6, D0, D1, D5 } #define MATRIX_COL_PINS { C6, C7, D4, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/pom_keyboards/tnln95/config.h b/keyboards/pom_keyboards/tnln95/config.h index 503ec1a900..e958aebd30 100644 --- a/keyboards/pom_keyboards/tnln95/config.h +++ b/keyboards/pom_keyboards/tnln95/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B4, B0, D7, E6, D4, F5, D6, C6, B5 } #define MATRIX_COL_PINS { F4, F1, F0, F6, F7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/portal_66/hotswap/config.h b/keyboards/portal_66/hotswap/config.h index c953d92e64..6abeea3bc8 100644 --- a/keyboards/portal_66/hotswap/config.h +++ b/keyboards/portal_66/hotswap/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/portal_66/soldered/config.h b/keyboards/portal_66/soldered/config.h index c953d92e64..6abeea3bc8 100644 --- a/keyboards/portal_66/soldered/config.h +++ b/keyboards/portal_66/soldered/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B7, F7, F4, F5 } #define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pos78/config.h b/keyboards/pos78/config.h index afe6aa7dd1..b0136fb812 100644 --- a/keyboards/pos78/config.h +++ b/keyboards/pos78/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { B2, B1, D2, D3, D1, D0, C6, E6, B5, B6, B7, D6, C7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index 6bcfa26380..63fa2d7433 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #define QMK_ESC_OUTPUT F1 #define QMK_ESC_INPUT B5 diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index ef7614393d..c1faf464d6 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_preonic_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/preonic/keymaps/dudeofawesome/keymap.c b/keyboards/preonic/keymaps/dudeofawesome/keymap.c index 2d2a252b23..812bf35a20 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/keymap.c +++ b/keyboards/preonic/keymaps/dudeofawesome/keymap.c @@ -275,7 +275,7 @@ bool numpadActive = false; float tone_numpad_on[][2] = SONG(NUMPAD_ON_SOUND); void matrix_scan_user (void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _NUMPAD: diff --git a/keyboards/preonic/keymaps/kinesis/config.h b/keyboards/preonic/keymaps/kinesis/config.h index f85be752e4..eabce5e790 100644 --- a/keyboards/preonic/keymaps/kinesis/config.h +++ b/keyboards/preonic/keymaps/kinesis/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c index e152507835..0f896700e6 100644 --- a/keyboards/preonic/keymaps/senseored/keymap.c +++ b/keyboards/preonic/keymaps/senseored/keymap.c @@ -367,7 +367,7 @@ bool dip_switch_update_user(uint8_t index, bool active) { layer_state_t layer_state_set_user(layer_state_t state) { // if(rgblight_get_mode() == 1) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _QWERTY: if(bnumlock) { tap_code(KC_NLCK); diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index d69952fa88..37e85bf512 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index efa32d5916..700be3ae5f 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -31,7 +31,6 @@ #undef MATRIX_COL_PINS #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/preonic/rev3_drop/config.h b/keyboards/preonic/rev3_drop/config.h index 813675eb84..5475108dad 100644 --- a/keyboards/preonic/rev3_drop/config.h +++ b/keyboards/preonic/rev3_drop/config.h @@ -33,7 +33,6 @@ #undef MATRIX_COL_PINS #define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 } #define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B12 } #define ENCODERS_PAD_B { B13 } diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c index 07171a39e9..82214e03d9 100644 --- a/keyboards/preonic/rev3_drop/matrix.c +++ b/keyboards/preonic/rev3_drop/matrix.c @@ -15,14 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdint.h> -#include <stdbool.h> -#include <string.h> -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "debug.h" -#include "matrix.h" +#include "quantum.h" typedef uint16_t matrix_col_t; @@ -40,9 +33,13 @@ __attribute__((weak)) void matrix_init_user(void) {} __attribute__((weak)) void matrix_scan_user(void) {} -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_init_kb(void) { + matrix_init_user(); +} -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { + matrix_scan_user(); +} void matrix_init(void) { dprintf("matrix init\n"); @@ -150,9 +147,13 @@ uint8_t matrix_scan(void) { return 1; } -bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); } +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1 << col)); +} -matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} void matrix_print(void) { dprintf("\nr/c 01234567\n"); diff --git a/keyboards/primekb/prime_e/keymaps/milestogo/config.h b/keyboards/primekb/prime_e/keymaps/milestogo/config.h index 24a42bb185..c3f9e43415 100644 --- a/keyboards/primekb/prime_e/keymaps/milestogo/config.h +++ b/keyboards/primekb/prime_e/keymaps/milestogo/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, C7, B5, B4, C6 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4, D5, D3, D2, D1, D0, B6, D7} -#define UNUSED_PINS // Babble config #define USE_BABBLEPASTE diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c index 195f845cc2..2d1d003d51 100644 --- a/keyboards/primekb/prime_e/keymaps/via/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -108,7 +108,7 @@ void led_set_user(uint8_t usb_led) { //function for layer indicator LED layer_state_t layer_state_set_user(layer_state_t state) { - if (biton32(state) == 1) { + if (get_highest_layer(state) == 1) { writePinHigh(B3); } else { writePinLow(B3); diff --git a/keyboards/primekb/prime_l/v1/config.h b/keyboards/primekb/prime_l/v1/config.h index afa8c62460..73f5cf8f30 100644 --- a/keyboards/primekb/prime_l/v1/config.h +++ b/keyboards/primekb/prime_l/v1/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D1, D0, B7, B3, B2 } #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS #define BACKLIGHT_PIN B6 /*#define BACKLIGHT_BREATHING*/ diff --git a/keyboards/primekb/prime_l/v2/config.h b/keyboards/primekb/prime_l/v2/config.h index 1386a127fe..09d765ce26 100644 --- a/keyboards/primekb/prime_l/v2/config.h +++ b/keyboards/primekb/prime_l/v2/config.h @@ -31,4 +31,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { E6, B2, B1, B0, B6 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D4, D0, D1, D2, D3, D5, B7, B3 } -#define UNUSED_PINS
\ No newline at end of file diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index c9a415feb8..3468ea975e 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { C5, B5, B2, D5, D3 } #define MATRIX_COL_PINS { B3, C7, C6, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index ba3976cc0e..60edde57e7 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D4, D6, B1, C5, B4, B3, C4, B2, B0, D5 } #define MATRIX_COL_PINS { B6, B5, C7, C6, D2, D1, D0, C2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index d6d35e4ae3..a75d608e3c 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D1, D0, B7, B3, B2 } #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/program_yoink/config.h b/keyboards/program_yoink/config.h index 156044d24a..c9ce4a9ac6 100644 --- a/keyboards/program_yoink/config.h +++ b/keyboards/program_yoink/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D3, B1, B0 } #define MATRIX_COL_PINS { C4, C5, C6, C7, B7, B6, B5, B4, B3, B2, D6, C2, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/projectcain/relic/config.h b/keyboards/projectcain/relic/config.h index 75bcd815d3..026e139fd1 100644 --- a/keyboards/projectcain/relic/config.h +++ b/keyboards/projectcain/relic/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, B2, B6, B5 } #define MATRIX_COL_PINS { D3, D5, B0, F0, F1, F4, F5, F6, C7, C6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/projectcain/vault35/config.h b/keyboards/projectcain/vault35/config.h index a7edf78c23..f7fe8b17c7 100644 --- a/keyboards/projectcain/vault35/config.h +++ b/keyboards/projectcain/vault35/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, D4, B0, C7 } #define MATRIX_COL_PINS { B1, D3, F0, F1, F4, F5, F6, F7, C6, B6, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/projectcain/vault45/config.h b/keyboards/projectcain/vault45/config.h index a6d9edcb3c..2ac39d277c 100644 --- a/keyboards/projectcain/vault45/config.h +++ b/keyboards/projectcain/vault45/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, B6, B5, C7 } #define MATRIX_COL_PINS { B0, D5, D4, D6, D7, B4, D3, F0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/prototypist/allison/config.h b/keyboards/prototypist/allison/config.h index ef3fffb3a3..14124f7c99 100644 --- a/keyboards/prototypist/allison/config.h +++ b/keyboards/prototypist/allison/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D2, D1, D0, B1, B2, D3} #define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/prototypist/allison_numpad/config.h b/keyboards/prototypist/allison_numpad/config.h index 312049ff01..6a442689d1 100644 --- a/keyboards/prototypist/allison_numpad/config.h +++ b/keyboards/prototypist/allison_numpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS { F6, F5, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/prototypist/j01/config.h b/keyboards/prototypist/j01/config.h index d1e861aaad..36858a6534 100644 --- a/keyboards/prototypist/j01/config.h +++ b/keyboards/prototypist/j01/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { B3, B2, B0, F6, F5 } #define MATRIX_COL_PINS { B1, F0, F7, F1, F4, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/psuieee/pluto12/config.h b/keyboards/psuieee/pluto12/config.h index baab1e89e8..907ed283cc 100644 --- a/keyboards/psuieee/pluto12/config.h +++ b/keyboards/psuieee/pluto12/config.h @@ -12,7 +12,6 @@ /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS /* Encoder Assignments */ #define ENCODERS_PAD_A { B6 } diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h index 976bc11f6f..96b5b42f86 100644 --- a/keyboards/pteron36/config.h +++ b/keyboards/pteron36/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, D7, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/puck/config.h b/keyboards/puck/config.h index a3d875b65a..71cea5ac64 100644 --- a/keyboards/puck/config.h +++ b/keyboards/puck/config.h @@ -8,7 +8,6 @@ #define MATRIX_ROW_PINS { D2, D3, C6, C7 } #define MATRIX_COL_PINS { B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h index de13a09e6d..fa87d13433 100644 --- a/keyboards/punk75/config.h +++ b/keyboards/punk75/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_A { D0, B1} #define ENCODERS_PAD_B { D1, B0 } -#define UNUSED_PINS { C7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/q4z/config.h b/keyboards/q4z/config.h index 19d618a025..64608f4879 100644 --- a/keyboards/q4z/config.h +++ b/keyboards/q4z/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { D1, D0, D4, B6, B2, B3, B1, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qpockets/eggman/config.h b/keyboards/qpockets/eggman/config.h index 50f05a0147..0faaeae1f5 100644 --- a/keyboards/qpockets/eggman/config.h +++ b/keyboards/qpockets/eggman/config.h @@ -25,7 +25,6 @@ #define MATRIX_ROW_PINS { C4, C5, C2, D0, B5, B6, D6 } #define MATRIX_COL_PINS { B7, B4, B3, B2, D3, D2, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qpockets/space_space/rev1/config.h b/keyboards/qpockets/space_space/rev1/config.h index 50ef5b3a20..0b87d47767 100644 --- a/keyboards/qpockets/space_space/rev1/config.h +++ b/keyboards/qpockets/space_space/rev1/config.h @@ -27,7 +27,6 @@ #define MATRIX_COL_PINS \ { D4, B4, B5, B6, C6, F7, F6, F0, B0, E6, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qpockets/space_space/rev2/config.h b/keyboards/qpockets/space_space/rev2/config.h index 5be679fa50..b762783d7e 100644 --- a/keyboards/qpockets/space_space/rev2/config.h +++ b/keyboards/qpockets/space_space/rev2/config.h @@ -27,7 +27,6 @@ #define MATRIX_COL_PINS \ { C6, F6, F1, F4, F5, E6, D6, B2, B5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qpockets/wanten/config.h b/keyboards/qpockets/wanten/config.h index f2723ef51c..feba6e742a 100644 --- a/keyboards/qpockets/wanten/config.h +++ b/keyboards/qpockets/wanten/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F7, B3, D5 } #define MATRIX_COL_PINS { F4, F1, B5, B6, C6, C7, D4, E6, D2, B1, B2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/quad_h/lb75/config.h b/keyboards/quad_h/lb75/config.h index e5e9af0d7a..15041b1a8a 100644 --- a/keyboards/quad_h/lb75/config.h +++ b/keyboards/quad_h/lb75/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, D6, D7, B4, B5, B6, C6, C7, D3, D5, F0, E6 } #define MATRIX_COL_PINS { D2, D1, D0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h index e0e30baa63..f8da7ab014 100644 --- a/keyboards/quantrik/kyuu/config.h +++ b/keyboards/quantrik/kyuu/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 } #define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, F0, B7, D0, D5, D3, D2, D1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h index e3c38406db..31e0d8ded3 100644 --- a/keyboards/qvex/lynepad/config.h +++ b/keyboards/qvex/lynepad/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Basic matrix config */ #define MATRIX_ROW_PINS { C7, F7, F6} #define MATRIX_COL_PINS { F0, F1, F4, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rabbit/rabbit68/config.h b/keyboards/rabbit/rabbit68/config.h index 548ab2bb44..9a5e4781a3 100644 --- a/keyboards/rabbit/rabbit68/config.h +++ b/keyboards/rabbit/rabbit68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, D7, D0, B3, B7 } #define MATRIX_COL_PINS { D6, D1, B4, D2, B5, F7, F6, F5, F4, F1, F0, B0, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/rad/config.h b/keyboards/rad/config.h index 47048722b1..04ea4f9cb9 100644 --- a/keyboards/rad/config.h +++ b/keyboards/rad/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D7, C6, B6, D0 } #define MATRIX_COL_PINS { B5, B4, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rainkeebs/delilah/config.h b/keyboards/rainkeebs/delilah/config.h index b0ca5cb44d..498596eccd 100644 --- a/keyboards/rainkeebs/delilah/config.h +++ b/keyboards/rainkeebs/delilah/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B6, C6, C7 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F0, E6, D5, D3, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rainkeebs/rainkeeb/config.h b/keyboards/rainkeebs/rainkeeb/config.h index f1f6ea5c14..a2049a87a4 100644 --- a/keyboards/rainkeebs/rainkeeb/config.h +++ b/keyboards/rainkeebs/rainkeeb/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rainkeebs/yasui/config.h b/keyboards/rainkeebs/yasui/config.h index 438a925096..d595f6cbf0 100644 --- a/keyboards/rainkeebs/yasui/config.h +++ b/keyboards/rainkeebs/yasui/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, C6, B5, E6 } #define MATRIX_COL_PINS { D7, B4, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/aelith/config.h b/keyboards/ramonimbao/aelith/config.h index 907acb8ff3..285a9b5e6a 100644 --- a/keyboards/ramonimbao/aelith/config.h +++ b/keyboards/ramonimbao/aelith/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D1, D0, D6, A7 } #define MATRIX_COL_PINS { D7, C0, C1, C2, C3, C4, C5, C6, C7, A6, A5, A0, A1, A2, A3, A4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/chevron/config.h b/keyboards/ramonimbao/chevron/config.h index 454feec40f..4a2f1fe008 100644 --- a/keyboards/ramonimbao/chevron/config.h +++ b/keyboards/ramonimbao/chevron/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D6, C0, D7, NO_PIN } #define MATRIX_COL_PINS { A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, A4, A3, A2, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/herringbone/pro/config.h b/keyboards/ramonimbao/herringbone/pro/config.h index 885940b17f..298f8cff56 100644 --- a/keyboards/ramonimbao/herringbone/pro/config.h +++ b/keyboards/ramonimbao/herringbone/pro/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C4, C5, C6, C7, A7, A6, NO_PIN } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, D6, D5, D1, B0, B1, B2, B3, B4, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/herringbone/v1/config.h b/keyboards/ramonimbao/herringbone/v1/config.h index 04b017f470..cbe83f71fc 100644 --- a/keyboards/ramonimbao/herringbone/v1/config.h +++ b/keyboards/ramonimbao/herringbone/v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C4, C5, C6, C7, A7, A6 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, D6, D5, D1, B0, B1, B2, B3, B4, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/mona/v1/config.h b/keyboards/ramonimbao/mona/v1/config.h index d2bacf04cd..bbe396b2f8 100644 --- a/keyboards/ramonimbao/mona/v1/config.h +++ b/keyboards/ramonimbao/mona/v1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D5, B7, F0, F1 } #define MATRIX_COL_PINS { D0, D3, D2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/mona/v1_1/config.h b/keyboards/ramonimbao/mona/v1_1/config.h index 326c661a81..ff99b86a06 100644 --- a/keyboards/ramonimbao/mona/v1_1/config.h +++ b/keyboards/ramonimbao/mona/v1_1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D5, B7, F0, F1 } #define MATRIX_COL_PINS { D0, D3, D2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/mona/v32a/config.h b/keyboards/ramonimbao/mona/v32a/config.h index e71c5d80e4..dce6c80d1f 100644 --- a/keyboards/ramonimbao/mona/v32a/config.h +++ b/keyboards/ramonimbao/mona/v32a/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C2, C3, D6, D1, A6 } #define MATRIX_COL_PINS { B4, B3, B2, B1, B0, A0, A1, A2, A5, A4, A3, A7, D5, C7, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/squishyfrl/config.h b/keyboards/ramonimbao/squishyfrl/config.h index cc7f422723..04e9a6039d 100644 --- a/keyboards/ramonimbao/squishyfrl/config.h +++ b/keyboards/ramonimbao/squishyfrl/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B9, B8, A0, A1, A9, A8, B11, A6, A5} #define MATRIX_COL_PINS { A7, C4, C5, B0, B1, B2, B10, B12, B13, B14, B15, C6, C9, C7, C8, A10, A4, C14, A3, A2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/squishytkl/config.h b/keyboards/ramonimbao/squishytkl/config.h index b9a3ce8016..c5843a2277 100644 --- a/keyboards/ramonimbao/squishytkl/config.h +++ b/keyboards/ramonimbao/squishytkl/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B4, B5, C13, B9, B8, A0, A1, A9, A8, B11, A6, A5, C0 } #define MATRIX_COL_PINS { A15, C10, C11, C12, D2, A7, C4, C5, B0, B1, B2, B10, B12, B13, B14, B15, C6, C9, C7, C8, A10, A4, C14, A3, A2, C3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/tkl_ff/config.h b/keyboards/ramonimbao/tkl_ff/config.h index d0b3ee75ff..486956989d 100644 --- a/keyboards/ramonimbao/tkl_ff/config.h +++ b/keyboards/ramonimbao/tkl_ff/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B3, B7, D6, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D4, D5, B0, B1, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ramonimbao/wete/v2/config.h b/keyboards/ramonimbao/wete/v2/config.h index 3d6ceb080b..8aec9abb3c 100644 --- a/keyboards/ramonimbao/wete/v2/config.h +++ b/keyboards/ramonimbao/wete/v2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B6, C6, C7, E6, F7, F6, F5, F4, F1, F0, NO_PIN } #define MATRIX_COL_PINS { B1, B0, B7, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart45/config.h b/keyboards/rart/rart45/config.h index 20339c1fe9..0b8f0b7102 100644 --- a/keyboards/rart/rart45/config.h +++ b/keyboards/rart/rart45/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { D1, C2, C1, B1, D0, C3, C0, D7, B0 } #define MATRIX_COL_PINS { D6, D4, B2, B5, B4, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart4x4/config.h b/keyboards/rart/rart4x4/config.h index 29fe515367..b859a2f552 100644 --- a/keyboards/rart/rart4x4/config.h +++ b/keyboards/rart/rart4x4/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F4, B6, B3, B1 } #define MATRIX_COL_PINS { F7, B2, B5, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart67/config.h b/keyboards/rart/rart67/config.h index 43ece277d9..a303b42cd2 100644 --- a/keyboards/rart/rart67/config.h +++ b/keyboards/rart/rart67/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D0, D1, D2, D3, B0 } #define MATRIX_COL_PINS { B3, B2, B1, D5, D4, D6, D7, B4, B5, F0, F7, F6, F5, F4, F1, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart67m/config.h b/keyboards/rart/rart67m/config.h index d0153e5a25..796b17d5b7 100644 --- a/keyboards/rart/rart67m/config.h +++ b/keyboards/rart/rart67m/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { D3, D2, D4, F6, B3, B4, B2, B5 } #define MATRIX_COL_PINS { F4, F5, C6, F7, D7, B1, E6, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart75/config.h b/keyboards/rart/rart75/config.h index 91f263fc40..dcc2dff902 100644 --- a/keyboards/rart/rart75/config.h +++ b/keyboards/rart/rart75/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F1, F4, F6, C7, D4, D0 } #define MATRIX_COL_PINS { D5, D3, D2, D1, C6, B6, B5, B4, D7, D6, B3, B1, F7, F5, B2, B7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart75hs/config.h b/keyboards/rart/rart75hs/config.h index e1581ac2a1..7c797b19b2 100644 --- a/keyboards/rart/rart75hs/config.h +++ b/keyboards/rart/rart75hs/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D5, D6, D7, D0, C5, C4 } #define MATRIX_COL_PINS { B4, B3, B2, B1, B0, A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rart75m/config.h b/keyboards/rart/rart75m/config.h index 2eb109e1ed..61173b183b 100644 --- a/keyboards/rart/rart75m/config.h +++ b/keyboards/rart/rart75m/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { C7, B3, B1, B0, D3, D2 } #define MATRIX_COL_PINS { B2, D4, F0, C6, F1, D7, F4, E6, F5, B4, F6, B5, F7, B6 } -#define UNUSED_PINS #define ENCODERS_PAD_B { B7 } #define ENCODERS_PAD_A { D6 } diff --git a/keyboards/rart/rartand/config.h b/keyboards/rart/rartand/config.h index bb3a6aefb6..adf7a9ed86 100644 --- a/keyboards/rart/rartand/config.h +++ b/keyboards/rart/rartand/config.h @@ -23,7 +23,6 @@ #define MATRIX_ROW_PINS { C3, B2, C2, B1, C1, D7, C0, B0 } #define MATRIX_COL_PINS { D0, D1, B4, B5, B3, D4, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rartland/config.h b/keyboards/rart/rartland/config.h index 446e0aa65c..5994219592 100644 --- a/keyboards/rart/rartland/config.h +++ b/keyboards/rart/rartland/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_ROW_PINS { B4, A7, A5, A6, C3 } #define MATRIX_COL_PINS { B0, A1, B1, A2, B2, A3, B3, A4, C7, C6, D0, C5, D1, C4 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN A0 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/rart/rartlite/config.h b/keyboards/rart/rartlite/config.h index 8c8897be54..b73269195a 100644 --- a/keyboards/rart/rartlite/config.h +++ b/keyboards/rart/rartlite/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F4, D2, B2, B4, B6, B5, D0, D1 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B3, F7, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rart/rartpad/config.h b/keyboards/rart/rartpad/config.h index d35681aaa0..495f6f99ba 100644 --- a/keyboards/rart/rartpad/config.h +++ b/keyboards/rart/rartpad/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B6, F6, D0, D4, C6 } #define MATRIX_COL_PINS { B2, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rate/pistachio/rev1/config.h b/keyboards/rate/pistachio/rev1/config.h index efffd3c9e2..3859a34ca1 100644 --- a/keyboards/rate/pistachio/rev1/config.h +++ b/keyboards/rate/pistachio/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D3} -#define UNUSED_PINS #define USE_I2C diff --git a/keyboards/rate/pistachio/rev2/config.h b/keyboards/rate/pistachio/rev2/config.h index 5363f76df4..bd682d1a90 100644 --- a/keyboards/rate/pistachio/rev2/config.h +++ b/keyboards/rate/pistachio/rev2/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, B4, E6, D7, C6, D4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D3} -#define UNUSED_PINS #define USE_I2C diff --git a/keyboards/rate/pistachio_mp/config.h b/keyboards/rate/pistachio_mp/config.h index 06db2459d2..55f6456874 100644 --- a/keyboards/rate/pistachio_mp/config.h +++ b/keyboards/rate/pistachio_mp/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, E6, D7, C6, D4 } #define MATRIX_COL_PINS { B3, B1, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/rate/pistachio_pro/config.h b/keyboards/rate/pistachio_pro/config.h index 40325c35eb..464a68af72 100644 --- a/keyboards/rate/pistachio_pro/config.h +++ b/keyboards/rate/pistachio_pro/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, B3, B4, B5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B6, D6 } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/recompile_keys/choco60/rev1/config.h b/keyboards/recompile_keys/choco60/rev1/config.h index c5efc6f5f0..d8b3d2904d 100644 --- a/keyboards/recompile_keys/choco60/rev1/config.h +++ b/keyboards/recompile_keys/choco60/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/recompile_keys/choco60/rev2/config.h b/keyboards/recompile_keys/choco60/rev2/config.h index 46aef108d8..5db3a06352 100644 --- a/keyboards/recompile_keys/choco60/rev2/config.h +++ b/keyboards/recompile_keys/choco60/rev2/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* The last three NO_PIN are dummies to make the same size as MATRIX_ROW_PINS_RIGHT. */ #define MATRIX_COL_PINS { C6, B4, B3, B2, B1, B0, NO_PIN, NO_PIN, NO_PIN } #define MATRIX_COL_PINS_RIGHT { C7, B7, B6, B5, B4, B3, B2, C6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/recompile_keys/cocoa40/config.h b/keyboards/recompile_keys/cocoa40/config.h index e85bed8b14..caf109a72f 100644 --- a/keyboards/recompile_keys/cocoa40/config.h +++ b/keyboards/recompile_keys/cocoa40/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/recompile_keys/mio/config.h b/keyboards/recompile_keys/mio/config.h index 2a7668d3f5..155228fef6 100644 --- a/keyboards/recompile_keys/mio/config.h +++ b/keyboards/recompile_keys/mio/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, F0, F4, F7, F6, F5 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/recompile_keys/nomu30/rev1/config.h b/keyboards/recompile_keys/nomu30/rev1/config.h index 718c840bd6..e9ef483924 100644 --- a/keyboards/recompile_keys/nomu30/rev1/config.h +++ b/keyboards/recompile_keys/nomu30/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { C6, D7, E6, B4, F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/recompile_keys/nomu30/rev2/config.h b/keyboards/recompile_keys/nomu30/rev2/config.h index 49d80a7162..f69bae591a 100644 --- a/keyboards/recompile_keys/nomu30/rev2/config.h +++ b/keyboards/recompile_keys/nomu30/rev2/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, B1, B0 } #define MATRIX_COL_PINS { C4, C5, C6, C7, B7, B6, B5, B4, B3, D5, D4, D3 } -#define UNUSED_PINS { C2, D0, D1, D2, D6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/redox_w/keymaps/italian/keymap.c b/keyboards/redox_w/keymaps/italian/keymap.c index e67742c6a1..b4c815e4f5 100644 --- a/keyboards/redox_w/keymaps/italian/keymap.c +++ b/keyboards/redox_w/keymaps/italian/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UGRV ,IT_SHSL , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______ ,IT_PERC ,IT_CIRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -95,14 +95,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┠┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _QWERTY: @@ -121,5 +121,3 @@ void matrix_scan_user(void) { break; } }; - - diff --git a/keyboards/redscarf_i/config.h b/keyboards/redscarf_i/config.h index 218874010d..494afb5e2b 100644 --- a/keyboards/redscarf_i/config.h +++ b/keyboards/redscarf_i/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 4 #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Backlight */ diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c index a8a685b13b..039e20664d 100644 --- a/keyboards/redscarf_i/redscarf_i.c +++ b/keyboards/redscarf_i/redscarf_i.c @@ -36,7 +36,7 @@ bool led_update_kb(led_t led_state) { } layer_state_t layer_state_set_kb(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case 1: writePinHigh(F6); writePinLow(F5); diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 34a7dba6ac..07d3979bef 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { } #define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/redscarf_iiplus/verc/config.h b/keyboards/redscarf_iiplus/verc/config.h index 34a7dba6ac..07d3979bef 100755 --- a/keyboards/redscarf_iiplus/verc/config.h +++ b/keyboards/redscarf_iiplus/verc/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { } #define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/redscarf_iiplus/verd/config.h b/keyboards/redscarf_iiplus/verd/config.h index 281a6efb6c..44b08645b4 100644 --- a/keyboards/redscarf_iiplus/verd/config.h +++ b/keyboards/redscarf_iiplus/verd/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { } #define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6, B5, B4, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/retro_75/config.h b/keyboards/retro_75/config.h index fb695474f5..f2621902bf 100644 --- a/keyboards/retro_75/config.h +++ b/keyboards/retro_75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { A8, B15, B14, B13, B12, B8 } #define MATRIX_COL_PINS { A5, A4, A3, F0, C15, C14, C13, A6, B11, B10, B2, B1, B0, A7, A14, A15 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reversestudio/decadepad/config.h b/keyboards/reversestudio/decadepad/config.h index 9d498b0542..aa3e5b930b 100644 --- a/keyboards/reversestudio/decadepad/config.h +++ b/keyboards/reversestudio/decadepad/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NIU Mini PCB default pin-out */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung33/config.h b/keyboards/reviung/reviung33/config.h index baf56d8035..4a009b053c 100644 --- a/keyboards/reviung/reviung33/config.h +++ b/keyboards/reviung/reviung33/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7} #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung34/config.h b/keyboards/reviung/reviung34/config.h index a59e82be54..5bc0cf98fc 100755 --- a/keyboards/reviung/reviung34/config.h +++ b/keyboards/reviung/reviung34/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7} #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung39/config.h b/keyboards/reviung/reviung39/config.h index 88b229e684..f6b6403ffd 100644 --- a/keyboards/reviung/reviung39/config.h +++ b/keyboards/reviung/reviung39/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung41/config.h b/keyboards/reviung/reviung41/config.h index 45e29b7baa..0ef09997bf 100644 --- a/keyboards/reviung/reviung41/config.h +++ b/keyboards/reviung/reviung41/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F4, F5, F6, F7, B1, B3, B2 } #define MATRIX_COL_PINS \ { D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung5/config.h b/keyboards/reviung/reviung5/config.h index a3413cfe45..2e28af7a65 100644 --- a/keyboards/reviung/reviung5/config.h +++ b/keyboards/reviung/reviung5/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F4 } #define MATRIX_COL_PINS \ { D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung53/config.h b/keyboards/reviung/reviung53/config.h index 7baa0f910f..fcfbe8194d 100644 --- a/keyboards/reviung/reviung53/config.h +++ b/keyboards/reviung/reviung53/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { D0, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/reviung/reviung61/config.h b/keyboards/reviung/reviung61/config.h index 82293a2e86..cc3039ab59 100644 --- a/keyboards/reviung/reviung61/config.h +++ b/keyboards/reviung/reviung61/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c index dbc127616a..dcafeec765 100644 --- a/keyboards/rgbkb/pan/keymaps/default/keymap.c +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -75,7 +75,7 @@ bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("RGBKB Pan\n"), false); oled_write_P(PSTR("Layer: "), false); - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + uint8_t layer = get_highest_layer(layer_state|default_layer_state); switch (layer) { case _QWERTY: oled_write_P(PSTR("Default\n"), false); diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index c82259f5ee..1ce18bc1ab 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -233,7 +233,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else #endif { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); uint16_t keycode = pgm_read_word(&encoders[layer][index][clockwise]); while (keycode == KC_TRANSPARENT && layer > 0) { @@ -325,7 +325,7 @@ static void render_status(void) { // Define layers here oled_write_P(PSTR("Layer"), false); - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + uint8_t layer = get_highest_layer(layer_state|default_layer_state); switch (layer) { case _QWERTY: oled_write_P(PSTR("BASE "), false); diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index bdcfbb1b93..bc0884c8e4 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -263,7 +263,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else #endif { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); uint16_t keycode = encoders[layer][index][clockwise]; while (keycode == KC_TRANSPARENT && layer > 0) { @@ -306,7 +306,7 @@ static void render_status(void) { // Define layers here oled_write_P(PSTR(" Layer-----"), false); - uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + uint8_t layer = layer_state ? get_highest_layer(layer_state) : get_highest_layer(default_layer_state); switch (layer) { case _DVORAK: oled_write_P(PSTR("DVRAK"), false); diff --git a/keyboards/rgbkb/sol3/rules.mk b/keyboards/rgbkb/sol3/rules.mk index 6aa372181e..de9f7185cf 100644 --- a/keyboards/rgbkb/sol3/rules.mk +++ b/keyboards/rgbkb/sol3/rules.mk @@ -14,7 +14,7 @@ QUANTUM_LIB_SRC += i2c_master.c # change yes to no to disable # BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys +MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h index 211e3517ec..cdffe6fd50 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h @@ -29,6 +29,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define COMBO_COUNT 2 #endif -#define QMK_KEYS_PER_SCAN 4 - #define EE_HANDS diff --git a/keyboards/rgbkb/zen/rev2/rev2.c b/keyboards/rgbkb/zen/rev2/rev2.c index 5461890272..70e5531673 100644 --- a/keyboards/rgbkb/zen/rev2/rev2.c +++ b/keyboards/rgbkb/zen/rev2/rev2.c @@ -37,7 +37,7 @@ void render_status(void) { // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below oled_set_cursor(0, 3); // Line 3 oled_write_P(PSTR("Layer"), false); // Line 4 - oled_write_P(layer_name_user(biton32(layer_state)), false); + oled_write_P(layer_name_user(get_highest_layer(layer_state)), false); // Host Keyboard LED Status uint8_t led_usb_state = host_keyboard_leds(); diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c index 48bd1a33f7..f4d5c82a71 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c @@ -198,7 +198,7 @@ static void render_status(void) { // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _QWERTY: oled_write_ln_P(PSTR("QWERTY"), false); break; diff --git a/keyboards/rmkeebs/rm_numpad/config.h b/keyboards/rmkeebs/rm_numpad/config.h index 3d7a6a7efa..1c3a48cba5 100644 --- a/keyboards/rmkeebs/rm_numpad/config.h +++ b/keyboards/rmkeebs/rm_numpad/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B4, F7, C7, C6, F1, F0 } #define MATRIX_COL_PINS { F4, F5, F6, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c index ce26a834d0..dc83cbd62b 100644 --- a/keyboards/rocketboard_16/keymaps/default/keymap.c +++ b/keyboards/rocketboard_16/keymaps/default/keymap.c @@ -107,10 +107,10 @@ static void oled_write_ln_centered(const char * data, bool inverted) char line_buf[21]; // Amount to offset string from left side - uint8_t offset = (21 - strlen(data))/2; + uint8_t offset = (22 - strlen(data)) / 2; // Formatted string centering... look, it works, don't ask how... - snprintf(line_buf, 21, "%*s%s%*s\0", offset, "", data, offset, ""); // Centers data within 21 character buffer with null termination + snprintf(line_buf, 21, "%*s%s%*s", offset, "", data, offset, ""); // Centers data within 21 character buffer oled_write_ln(line_buf, inverted); } diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c index ce26a834d0..08b8e65b4f 100644 --- a/keyboards/rocketboard_16/keymaps/via/keymap.c +++ b/keyboards/rocketboard_16/keymaps/via/keymap.c @@ -107,10 +107,10 @@ static void oled_write_ln_centered(const char * data, bool inverted) char line_buf[21]; // Amount to offset string from left side - uint8_t offset = (21 - strlen(data))/2; + uint8_t offset = (22 - strlen(data))/2; // Formatted string centering... look, it works, don't ask how... - snprintf(line_buf, 21, "%*s%s%*s\0", offset, "", data, offset, ""); // Centers data within 21 character buffer with null termination + snprintf(line_buf, 21, "%*s%s%*s", offset, "", data, offset, ""); // Centers data within 21 character buffer oled_write_ln(line_buf, inverted); } diff --git a/keyboards/rominronin/katana60/rev1/config.h b/keyboards/rominronin/katana60/rev1/config.h index e7f7d92016..97a18443a1 100644 --- a/keyboards/rominronin/katana60/rev1/config.h +++ b/keyboards/rominronin/katana60/rev1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F5, F6, F4, F1, D0 } #define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/rominronin/katana60/rev2/config.h b/keyboards/rominronin/katana60/rev2/config.h index e1441acdfc..0671c86044 100644 --- a/keyboards/rominronin/katana60/rev2/config.h +++ b/keyboards/rominronin/katana60/rev2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, E6, D5, B4, B5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, D6, D4, D3, D2, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/roseslite/config.h b/keyboards/roseslite/config.h index c323bbbfed..f499c29de3 100644 --- a/keyboards/roseslite/config.h +++ b/keyboards/roseslite/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rotr/config.h b/keyboards/rotr/config.h index c16d420910..d8cd526654 100644 --- a/keyboards/rotr/config.h +++ b/keyboards/rotr/config.h @@ -17,7 +17,6 @@ /*Sets the number of pulses per increment*/ #define ENCODER_RESOLUTION 2 -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rpiguy9907/southpaw66/config.h b/keyboards/rpiguy9907/southpaw66/config.h index fb5c072fff..13c6694b05 100644 --- a/keyboards/rpiguy9907/southpaw66/config.h +++ b/keyboards/rpiguy9907/southpaw66/config.h @@ -28,7 +28,6 @@ #define MATRIX_ROW_PINS { D7, C6, D4, D0, D1, D2, D3 } #define MATRIX_COL_PINS { E6, B4, B5, F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rubi/config.h b/keyboards/rubi/config.h index 6e773bf055..b4efca2997 100644 --- a/keyboards/rubi/config.h +++ b/keyboards/rubi/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B3, B2, B1, F7 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D7 } #define ENCODERS_PAD_B { D6 } diff --git a/keyboards/runes/skjoldr/config.h b/keyboards/runes/skjoldr/config.h index b74eed3904..bc4d4c0fe9 100644 --- a/keyboards/runes/skjoldr/config.h +++ b/keyboards/runes/skjoldr/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D6, D7, B4, B5, B0 } #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, B3, E6, D5, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/runes/vaengr/config.h b/keyboards/runes/vaengr/config.h index 1a2f1a202e..060d6843ef 100644 --- a/keyboards/runes/vaengr/config.h +++ b/keyboards/runes/vaengr/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B7, B0, F7, C6 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, D0, D1, D6, D4, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ryanbaekr/rb18/config.h b/keyboards/ryanbaekr/rb18/config.h index e7b1fd5b87..1df607db43 100644 --- a/keyboards/ryanbaekr/rb18/config.h +++ b/keyboards/ryanbaekr/rb18/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, F7, F6, F5, F4 } #define MATRIX_COL_PINS { B2, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ryanbaekr/rb69/config.h b/keyboards/ryanbaekr/rb69/config.h index 7fe0e39988..447d2ca05a 100644 --- a/keyboards/ryanbaekr/rb69/config.h +++ b/keyboards/ryanbaekr/rb69/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, C6, D4, D0, D1 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, F0, F1, B4, B5, B7, D5, C7, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ryanbaekr/rb86/config.h b/keyboards/ryanbaekr/rb86/config.h index af10504520..e2541efe2b 100644 --- a/keyboards/ryanbaekr/rb86/config.h +++ b/keyboards/ryanbaekr/rb86/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, D7 } #define MATRIX_COL_PINS { B6, B5, D5, C7, F1, F0, D3, D2, D1, D0, D4, E6, B7, C6, F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ryloo_studio/m0110/config.h b/keyboards/ryloo_studio/m0110/config.h index 4fea945a5c..92a35f9fdd 100755 --- a/keyboards/ryloo_studio/m0110/config.h +++ b/keyboards/ryloo_studio/m0110/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/salicylic_acid3/7skb/keymaps/salicylic/keymap.c b/keyboards/salicylic_acid3/7skb/keymaps/salicylic/keymap.c index 4e1f2acd05..7221f8c612 100644 --- a/keyboards/salicylic_acid3/7skb/keymaps/salicylic/keymap.c +++ b/keyboards/salicylic_acid3/7skb/keymaps/salicylic/keymap.c @@ -32,8 +32,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/7splus/keymaps/salicylic/keymap.c b/keyboards/salicylic_acid3/7splus/keymaps/salicylic/keymap.c index 06d7972a2e..bea5978c50 100644 --- a/keyboards/salicylic_acid3/7splus/keymaps/salicylic/keymap.c +++ b/keyboards/salicylic_acid3/7splus/keymaps/salicylic/keymap.c @@ -39,8 +39,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _MOUSE), - [TD_ESAR] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESMS] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _MOUSE), + [TD_ESAR] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/jisplit89/keymaps/salicylic/keymap.c b/keyboards/salicylic_acid3/jisplit89/keymaps/salicylic/keymap.c index 4e8addf6b7..eba01d4d65 100644 --- a/keyboards/salicylic_acid3/jisplit89/keymaps/salicylic/keymap.c +++ b/keyboards/salicylic_acid3/jisplit89/keymaps/salicylic/keymap.c @@ -39,8 +39,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _MOUSE), - [TD_ESAR] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESMS] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _MOUSE), + [TD_ESAR] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/naked60/keymaps/salicylic/keymap.c b/keyboards/salicylic_acid3/naked60/keymaps/salicylic/keymap.c index 8a2dbf051f..b70e68da54 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/salicylic/keymap.c +++ b/keyboards/salicylic_acid3/naked60/keymaps/salicylic/keymap.c @@ -23,8 +23,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/keymap.c index 4201d79a2e..c43803be35 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/keymap.c @@ -34,8 +34,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/keymap.c index 23786da915..6dd2ef8863 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/keymap.c @@ -32,8 +32,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/naked64/keymaps/salicylic/keymap.c b/keyboards/salicylic_acid3/naked64/keymaps/salicylic/keymap.c index db46075c8f..ae7843341a 100644 --- a/keyboards/salicylic_acid3/naked64/keymaps/salicylic/keymap.c +++ b/keyboards/salicylic_acid3/naked64/keymaps/salicylic/keymap.c @@ -33,8 +33,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/keymap.c b/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/keymap.c index c91716cdd4..6e2dd0886f 100644 --- a/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/keymap.c @@ -38,8 +38,8 @@ enum tapdances{ }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK), - [TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY), + [TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK), + [TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY), }; #define LOWER MO(_LOWER) diff --git a/keyboards/sanctified/dystopia/config.h b/keyboards/sanctified/dystopia/config.h index a818d3e84f..cf9d91d551 100644 --- a/keyboards/sanctified/dystopia/config.h +++ b/keyboards/sanctified/dystopia/config.h @@ -27,5 +27,3 @@ #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, D4, D6, D7, B4 } #define DIODE_DIRECTION COL2ROW - -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/sandwich/keeb68/config.h b/keyboards/sandwich/keeb68/config.h index 4a3b14a496..2c506e8bc2 100644 --- a/keyboards/sandwich/keeb68/config.h +++ b/keyboards/sandwich/keeb68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { B6, C6, F7, E6, B7, D0, D1, D2, D3, D4, D6, D7, B4, B5 } -#define UNUSED_PINS { D5, B0 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/satt/comet46/i2c.c b/keyboards/satt/comet46/i2c.c deleted file mode 100644 index 4bee5c6398..0000000000 --- a/keyboards/satt/comet46/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} -#endif diff --git a/keyboards/satt/comet46/i2c.h b/keyboards/satt/comet46/i2c.h deleted file mode 100644 index 710662c7ab..0000000000 --- a/keyboards/satt/comet46/i2c.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c b/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c index 6c88b70bfe..1e96bd7fbc 100644 --- a/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c +++ b/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c @@ -173,7 +173,7 @@ void matrix_init_user(void) { } void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); uint8_t default_layer = biton32(eeconfig_read_default_layer()); switch (layer) { case _LOWER: diff --git a/keyboards/satt/comet46/keymaps/default/config.h b/keyboards/satt/comet46/keymaps/default/config.h deleted file mode 100644 index ee02a94b7e..0000000000 --- a/keyboards/satt/comet46/keymaps/default/config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -// place overrides here - - -/* Use I2C or Serial */ - -#define USE_I2C -#define SSD1306OLED diff --git a/keyboards/satt/comet46/keymaps/default/keymap.c b/keyboards/satt/comet46/keymaps/default/keymap.c index cf2c911d4c..3e6f9045ff 100644 --- a/keyboards/satt/comet46/keymaps/default/keymap.c +++ b/keyboards/satt/comet46/keymaps/default/keymap.c @@ -2,9 +2,6 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -148,8 +145,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // You need to add source files to SRC in rules.mk when using OLED display functions void set_keylog(uint16_t keycode); @@ -157,27 +153,12 @@ const char *read_keylog(void); const char *read_modifier_state(void); const char *read_host_led_state(void); -void matrix_init_user(void) { - iota_gfx_init(false); // turns on the display -} - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void render_status(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { // Layer state char layer_str[22]; - matrix_write(matrix, "Layer: "); - uint8_t layer = biton32(layer_state); - uint8_t default_layer = biton32(eeconfig_read_default_layer()); + oled_write_P(PSTR("Layer: "), false); + uint8_t layer = get_highest_layer(layer_state); + uint8_t default_layer = get_highest_layer(eeconfig_read_default_layer()); switch (layer) { case _QWERTY: switch (default_layer) { @@ -207,27 +188,21 @@ void render_status(struct CharacterMatrix *matrix) { default: snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); } - matrix_write_ln(matrix, layer_str); + oled_write_ln(layer_str, false); // Last entered keycode - matrix_write_ln(matrix, read_keylog()); + oled_write_ln(read_keylog(), false); // Modifier state - matrix_write_ln(matrix, read_modifier_state()); + oled_write_ln(read_modifier_state(), false); // Host Keyboard LED Status - matrix_write(matrix, read_host_led_state()); -} + oled_write(read_host_led_state(), false); - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - render_status(&matrix); - matrix_update(&display, &matrix); + return false; } -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef SSD1306OLED + #ifdef OLED_ENABLE if (record->event.pressed) { set_keylog(keycode); } diff --git a/keyboards/satt/comet46/keymaps/default/rules.mk b/keyboards/satt/comet46/keymaps/default/rules.mk index 3fa01f96af..3ceffe90ec 100644 --- a/keyboards/satt/comet46/keymaps/default/rules.mk +++ b/keyboards/satt/comet46/keymaps/default/rules.mk @@ -1,5 +1,6 @@ # If you want to change display settings of the OLED, you need to change the following lines -SRC += ./lib/glcdfont.c \ - ./lib/keylogger.c \ +SRC += ./lib/keylogger.c \ ./lib/modifier_state_reader.c \ ./lib/host_led_state_reader.c + +OLED_ENABLE = yes diff --git a/keyboards/satt/comet46/keymaps/satt/config.h b/keyboards/satt/comet46/keymaps/satt/config.h deleted file mode 100644 index a3ca2ebfef..0000000000 --- a/keyboards/satt/comet46/keymaps/satt/config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -/* Use I2C or Serial */ - -#define USE_I2C -#define SSD1306OLED - -#endif diff --git a/keyboards/satt/comet46/keymaps/satt/keymap.c b/keyboards/satt/comet46/keymaps/satt/keymap.c index cdd094f747..505b7eaf0a 100644 --- a/keyboards/satt/comet46/keymaps/satt/keymap.c +++ b/keyboards/satt/comet46/keymaps/satt/keymap.c @@ -5,9 +5,6 @@ #include "keymap_jis2us.h" #include "action_pseudo_lut.h" #include "keymap_japanese.h" -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -165,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; layer_state_t layer_state_set_user(layer_state_t state) { - switch (biton32(state)) { + switch (get_highest_layer(state)) { case _PSEUDO_US_LOWER: case _PSEUDO_US_RAISE: return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); @@ -176,8 +173,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE // You need to add source files to SRC in rules.mk when using OLED display functions void set_keylog(uint16_t keycode); @@ -185,86 +181,59 @@ const char *read_keylog(void); const char *read_modifier_state(void); const char *read_host_led_state(void); -void matrix_init_user(void) { - iota_gfx_init(false); // turns on the display -} - -void matrix_scan_user(void) { - iota_gfx_task(); // this is what updates the display continuously -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void render_status(struct CharacterMatrix *matrix) { +bool oled_task_user(void) { // Layer state char layer_str[22]; - matrix_write(matrix, "Layer: "); - uint8_t layer = biton32(layer_state); - uint8_t default_layer = biton32(eeconfig_read_default_layer()); - switch (layer) { - case _QWERTY: - switch (default_layer) { - case _QWERTY: - snprintf(layer_str, sizeof(layer_str), "Qwerty"); - break; - case _PSEUDO_US: - snprintf(layer_str, sizeof(layer_str), "Psuedo_US"); - break; - default: - snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); - break; - } - break; - case _RAISE: - snprintf(layer_str, sizeof(layer_str), "Raise"); - break; - case _LOWER: - snprintf(layer_str, sizeof(layer_str), "Lower"); - break; + oled_write_P(PSTR("Layer: "), false); + uint8_t layer = get_highest_layer(layer_state); + uint8_t default_layer = get_highest_layer(eeconfig_read_default_layer()); + switch (layer) { + case _QWERTY: + switch (default_layer) { + case _QWERTY: + snprintf(layer_str, sizeof(layer_str), "Qwerty"); + break; + case _PSEUDO_US: + snprintf(layer_str, sizeof(layer_str), "Psuedo_US"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); + break; + } + break; + case _RAISE: + snprintf(layer_str, sizeof(layer_str), "Raise"); + break; + case _LOWER: + snprintf(layer_str, sizeof(layer_str), "Lower"); + break; case _PSEUDO_US_RAISE: snprintf(layer_str, sizeof(layer_str), "P_US_Raise"); break; case _PSEUDO_US_LOWER: snprintf(layer_str, sizeof(layer_str), "P_US_Lower"); break; - case _ADJUST: - snprintf(layer_str, sizeof(layer_str), "Adjust"); - break; - default: - snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); - } - matrix_write_ln(matrix, layer_str); + case _ADJUST: + snprintf(layer_str, sizeof(layer_str), "Adjust"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); + } + oled_write_ln(layer_str, false); // Last entered keycode - matrix_write_ln(matrix, read_keylog()); + oled_write_ln(read_keylog(), false); // Modifier state - matrix_write_ln(matrix, read_modifier_state()); + oled_write_ln(read_modifier_state(), false); // Host Keyboard LED Status - matrix_write(matrix, read_host_led_state()); -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + oled_write(read_host_led_state(), false); - matrix_clear(&matrix); - render_status(&matrix); - matrix_update(&display, &matrix); + return false; } -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef SSD1306OLED + #ifdef OLED_ENABLE if (record->event.pressed) { set_keylog(keycode); } diff --git a/keyboards/satt/comet46/keymaps/satt/rules.mk b/keyboards/satt/comet46/keymaps/satt/rules.mk index 91609dd4fd..9c07b12fcb 100644 --- a/keyboards/satt/comet46/keymaps/satt/rules.mk +++ b/keyboards/satt/comet46/keymaps/satt/rules.mk @@ -1,8 +1,8 @@ SRC += action_pseudo_lut.c # If you want to change display settings of the OLED, you need to change the following lines -SRC += ./lib/glcdfont.c \ - ./lib/keylogger.c \ +SRC += ./lib/keylogger.c \ ./lib/modifier_state_reader.c \ ./lib/host_led_state_reader.c +OLED_ENABLE = yes diff --git a/keyboards/satt/comet46/lib/glcdfont.c b/keyboards/satt/comet46/lib/glcdfont.c deleted file mode 100644 index 361d0c3dc6..0000000000 --- a/keyboards/satt/comet46/lib/glcdfont.c +++ /dev/null @@ -1,137 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font - -const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00 -}; diff --git a/keyboards/satt/comet46/rules.mk b/keyboards/satt/comet46/rules.mk index e177fc6441..83f7d905e9 100644 --- a/keyboards/satt/comet46/rules.mk +++ b/keyboards/satt/comet46/rules.mk @@ -17,9 +17,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = lite +OLED_DRIVER = SSD1306 # project specific files -SRC += matrix.c \ - i2c.c \ - ssd1306.c +SRC += matrix.c QUANTUM_LIB_SRC += uart.c diff --git a/keyboards/satt/comet46/ssd1306.c b/keyboards/satt/comet46/ssd1306.c deleted file mode 100644 index 4bd2d80bc4..0000000000 --- a/keyboards/satt/comet46/ssd1306.c +++ /dev/null @@ -1,343 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include <string.h> -#include "print.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -extern const unsigned char font[] PROGMEM; - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 60000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/satt/comet46/ssd1306.h b/keyboards/satt/comet46/ssd1306.h deleted file mode 100644 index 11a3cc67f4..0000000000 --- a/keyboards/satt/comet46/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include <stdbool.h> -#include <stdio.h> -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -extern struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/sauce/mild/config.h b/keyboards/sauce/mild/config.h index 99c89fdd16..989980b79e 100644 --- a/keyboards/sauce/mild/config.h +++ b/keyboards/sauce/mild/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { C13, C14, C15, A15, F0, F1 } #define MATRIX_COL_PINS { A10, A9, A8, B11, B10, B2, B1, B0, A7, A5, A4, A3, A2, A1, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sawnsprojects/amber80/solder/config.h b/keyboards/sawnsprojects/amber80/solder/config.h index 2452804ff0..6643409761 100644 --- a/keyboards/sawnsprojects/amber80/solder/config.h +++ b/keyboards/sawnsprojects/amber80/solder/config.h @@ -38,7 +38,6 @@ */ #define MATRIX_ROW_PINS { B1, B2, B3, B7, D0, D1, F1, F0, D7, B4, D5, D3 } #define MATRIX_COL_PINS { F4, F6, F7, C7, C6, B6, B5, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sawnsprojects/krush/krush60/solder/config.h b/keyboards/sawnsprojects/krush/krush60/solder/config.h index 66283bff69..5e0614f58e 100644 --- a/keyboards/sawnsprojects/krush/krush60/solder/config.h +++ b/keyboards/sawnsprojects/krush/krush60/solder/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B2, D1, D2, D4, D6, F6, F7, F5, F4 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D5, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h index c48080d59f..d545886dc0 100644 --- a/keyboards/sawnsprojects/krush/krush65/hotswap/config.h +++ b/keyboards/sawnsprojects/krush/krush65/hotswap/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B2, D4, F1, F0 } #define MATRIX_COL_PINS { B7, B3, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D0, D5, D6, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sawnsprojects/krush/krush65/solder/config.h b/keyboards/sawnsprojects/krush/krush65/solder/config.h index 1638e35ac6..54318a485b 100644 --- a/keyboards/sawnsprojects/krush/krush65/solder/config.h +++ b/keyboards/sawnsprojects/krush/krush65/solder/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B2, D1, D2, D4, D6, F6, F7, F5, F4 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D5, D3 } -#define UNUSED_PINS /* indicator */ // #define LED_CAPS_LOCK_PIN F0 diff --git a/keyboards/sawnsprojects/vcl65/solder/config.h b/keyboards/sawnsprojects/vcl65/solder/config.h index cec49e65ae..b536e66c1f 100644 --- a/keyboards/sawnsprojects/vcl65/solder/config.h +++ b/keyboards/sawnsprojects/vcl65/solder/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F6, F7, F0, F4, B1 } #define MATRIX_COL_PINS { B2, B5, F5, C7, B4, C6, D7, D6, D4, D5, D3, D2, B6, D1, D0 } -#define UNUSED_PINS /* indicator */ // #define LED_CAPS_LOCK_PIN F0 diff --git a/keyboards/scatter42/config.h b/keyboards/scatter42/config.h index c72b7be68e..e271984760 100644 --- a/keyboards/scatter42/config.h +++ b/keyboards/scatter42/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sck/gtm/config.h b/keyboards/sck/gtm/config.h index 2f656805ea..fb0f5d3b4a 100644 --- a/keyboards/sck/gtm/config.h +++ b/keyboards/sck/gtm/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C4, C5, D1 } #define MATRIX_COL_PINS { B4, B5, B6, B7, C7, D0 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D2 } diff --git a/keyboards/sck/m0116b/config.h b/keyboards/sck/m0116b/config.h index 97a8cf476f..95d9f66318 100644 --- a/keyboards/sck/m0116b/config.h +++ b/keyboards/sck/m0116b/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { D5, D3, D2, D0, B3, B2, B1, B0, E6, B5, B6, C6, C7, F7, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sck/neiso/config.h b/keyboards/sck/neiso/config.h index 2b0d3ec458..254e0a6d11 100644 --- a/keyboards/sck/neiso/config.h +++ b/keyboards/sck/neiso/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F4 } #define MATRIX_COL_PINS \ { B3, D2, F5, F7, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 986047c35b..b83eee8dd5 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { B4, D7, D5, D3, D2, D0, D1, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sekigon/grs_70ec/config.h b/keyboards/sekigon/grs_70ec/config.h index 422d7e2fac..b2e1882574 100644 --- a/keyboards/sekigon/grs_70ec/config.h +++ b/keyboards/sekigon/grs_70ec/config.h @@ -39,7 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_CHANNELS { 2, 1, 0, 3, 5, 7, 6, 4 } -#define UNUSED_PINS #define DISCHARGE_PIN B1 #define ANALOG_PORT F6 #define MUX_SEL_PINS { D1, D0, D4 } diff --git a/keyboards/senselessclay/ck65/config.h b/keyboards/senselessclay/ck65/config.h index 2038c58f44..68571b63c7 100644 --- a/keyboards/senselessclay/ck65/config.h +++ b/keyboards/senselessclay/ck65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B2, F1, F4, F5 } #define MATRIX_COL_PINS { F0, D5, D3, D2, D1, D0, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -//#define UNUSED_PINS { B0, B7, E6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/senselessclay/gos65/config.h b/keyboards/senselessclay/gos65/config.h index 972befc147..724e47e797 100644 --- a/keyboards/senselessclay/gos65/config.h +++ b/keyboards/senselessclay/gos65/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B2, F1, F6, F5 } #define MATRIX_COL_PINS { F4, D5, D3, D2, D1, D0, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -//#define UNUSED_PINS { B0, B7, E6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/senselessclay/had60/config.h b/keyboards/senselessclay/had60/config.h index ba4619b956..9ec21ffa84 100644 --- a/keyboards/senselessclay/had60/config.h +++ b/keyboards/senselessclay/had60/config.h @@ -40,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F1, F0, F7, F6, F5 } #define MATRIX_COL_PINS { F4, D5, D3, D2, D1, D0, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS { B0, B7, E6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h index 341bad6b67..a3b13ac2f7 100644 --- a/keyboards/sentraq/number_pad/config.h +++ b/keyboards/sentraq/number_pad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F5, F0, B5, D6, D4 } #define MATRIX_COL_PINS { C7, D5, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sentraq/s60_x/default/config.h b/keyboards/sentraq/s60_x/default/config.h index 3f08499531..07fe864df3 100644 --- a/keyboards/sentraq/s60_x/default/config.h +++ b/keyboards/sentraq/s60_x/default/config.h @@ -16,7 +16,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, E6, F1 } -#define UNUSED_PINS { F0 } /* number of backlight levels */ #define BACKLIGHT_PIN B7 diff --git a/keyboards/sentraq/s60_x/rgb/config.h b/keyboards/sentraq/s60_x/rgb/config.h index 63abf8cc21..ad44cb80fc 100644 --- a/keyboards/sentraq/s60_x/rgb/config.h +++ b/keyboards/sentraq/s60_x/rgb/config.h @@ -16,7 +16,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 } -#define UNUSED_PINS /* number of backlight levels */ #define BACKLIGHT_PIN B7 diff --git a/keyboards/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index e1e829b3ae..cc7fd7e753 100644 --- a/keyboards/sentraq/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN B7 #define LED_PIN_ON_STATE 0 diff --git a/keyboards/sentraq/s65_x/config.h b/keyboards/sentraq/s65_x/config.h index 61a468a33c..2381a7c7d1 100644 --- a/keyboards/sentraq/s65_x/config.h +++ b/keyboards/sentraq/s65_x/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } #define MATRIX_COL_PINS { F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } -#define UNUSED_PINS /* number of backlight levels */ #define BACKLIGHT_PIN B7 diff --git a/keyboards/sergiopoverony/creator_pro/config.h b/keyboards/sergiopoverony/creator_pro/config.h index 9181a49be1..d83cc7c635 100644 --- a/keyboards/sergiopoverony/creator_pro/config.h +++ b/keyboards/sergiopoverony/creator_pro/config.h @@ -37,5 +37,4 @@ #define ENCODERS_PAD_B { D3 } #define ENCODER_RESOLUTION 1 -#define UNUSED_PINS diff --git a/keyboards/sets3n/kk980/config.h b/keyboards/sets3n/kk980/config.h index f3828b023c..e24468054e 100644 --- a/keyboards/sets3n/kk980/config.h +++ b/keyboards/sets3n/kk980/config.h @@ -36,7 +36,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B2, B3, D3, D4, D5, D6 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, B1, B0, D0, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/shambles/config.h b/keyboards/shambles/config.h index 063c883381..52dc73121e 100644 --- a/keyboards/shambles/config.h +++ b/keyboards/shambles/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F5, B3, B1, F7 } #define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5, B6, B2, F4, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/shapeshifter4060/config.h b/keyboards/shapeshifter4060/config.h index 2873ae72c9..0846a73e0a 100644 --- a/keyboards/shapeshifter4060/config.h +++ b/keyboards/shapeshifter4060/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, B1, B3, B2, B6, B5, B4, E6, D7, C6, D4 } -#define UNUSED_PINS { D2, D3 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/shiro/config.h b/keyboards/shiro/config.h index 1fd31866d2..c2bb97a1cc 100644 --- a/keyboards/shiro/config.h +++ b/keyboards/shiro/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/shk9/config.h b/keyboards/shk9/config.h index 589fad2c8d..a23a37cb53 100644 --- a/keyboards/shk9/config.h +++ b/keyboards/shk9/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B0, B1, B2 } #define MATRIX_COL_PINS { B3, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index fdbfac3c93..0c8ad2e414 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -5,4 +5,3 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, D1, F5, B5 } #define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 } -#define UNUSED_PINS diff --git a/keyboards/signum/3_0/keymaps/sgurenkov/config.h b/keyboards/signum/3_0/keymaps/sgurenkov/config.h index 5f8d0d02b8..7d164aa3a9 100644 --- a/keyboards/signum/3_0/keymaps/sgurenkov/config.h +++ b/keyboards/signum/3_0/keymaps/sgurenkov/config.h @@ -29,9 +29,6 @@ // Auto Shift and Retro Shift (Auto Shift for Tap Hold). #define AUTO_SHIFT_TIMEOUT TAPPING_TERM -// Recommended for heavy chording. -#define QMK_KEYS_PER_SCAN 4 - // Mouse key speed and acceleration. #undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 0 diff --git a/keyboards/signum/3_0/teensy/config.h b/keyboards/signum/3_0/teensy/config.h index 343131fce0..2a81c0f565 100644 --- a/keyboards/signum/3_0/teensy/config.h +++ b/keyboards/signum/3_0/teensy/config.h @@ -19,5 +19,4 @@ // clang-format off #define MATRIX_ROW_PINS { B0, B3, F6, C7 } #define MATRIX_COL_PINS { C6, D2, B7, D3, D0, F7, F5, B6, B5, B4, D1, D7 } -#define UNUSED_PINS // clang-format on diff --git a/keyboards/silverbullet44/config.h b/keyboards/silverbullet44/config.h index 185b3ef067..28339ff431 100644 --- a/keyboards/silverbullet44/config.h +++ b/keyboards/silverbullet44/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index 82e3ed00f1..e612ba93b2 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/skeletn87/hotswap/config.h b/keyboards/skeletn87/hotswap/config.h index 781eb23a7e..de3df5afbf 100644 --- a/keyboards/skeletn87/hotswap/config.h +++ b/keyboards/skeletn87/hotswap/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skeletn87/soldered/config.h b/keyboards/skeletn87/soldered/config.h index 3b5ce9692a..db7c1ab7a4 100644 --- a/keyboards/skeletn87/soldered/config.h +++ b/keyboards/skeletn87/soldered/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skeletonkbd/skeletonnumpad/config.h b/keyboards/skeletonkbd/skeletonnumpad/config.h index 164bce68bf..b9ea8fdb77 100644 --- a/keyboards/skeletonkbd/skeletonnumpad/config.h +++ b/keyboards/skeletonkbd/skeletonnumpad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, C6, C7, F7, F6 } #define MATRIX_COL_PINS { D6, D7, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skergo/config.h b/keyboards/skergo/config.h index 9668da656f..54c83eb469 100644 --- a/keyboards/skergo/config.h +++ b/keyboards/skergo/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B4, B3, B2, B1 } #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C2, C1, C0, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skippys_custom_pcs/rooboard65/config.h b/keyboards/skippys_custom_pcs/rooboard65/config.h index 69aac0b560..ee624d5380 100644 --- a/keyboards/skippys_custom_pcs/rooboard65/config.h +++ b/keyboards/skippys_custom_pcs/rooboard65/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skippys_custom_pcs/roopad/config.h b/keyboards/skippys_custom_pcs/roopad/config.h index 7d8fe627e9..493de6ee32 100644 --- a/keyboards/skippys_custom_pcs/roopad/config.h +++ b/keyboards/skippys_custom_pcs/roopad/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B5, F6, F5, F4, F1 } #define MATRIX_COL_PINS { F0, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/skme/zeno/config.h b/keyboards/skme/zeno/config.h index a6404a8ff4..53aa1cd621 100644 --- a/keyboards/skme/zeno/config.h +++ b/keyboards/skme/zeno/config.h @@ -34,6 +34,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/*Enable 1khz polling by default*/ -#define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/slz40/config.h b/keyboards/slz40/config.h index 6aa113dcb6..7b20cd14bb 100644 --- a/keyboards/slz40/config.h +++ b/keyboards/slz40/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, B5, B3, B2, B6 } #define MATRIX_COL_PINS { F4, D2, F5, D1, F6, D0, F7, D4, B1, C6, E6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h index 5d934dd937..20a9f2d88a 100644 --- a/keyboards/smallkeyboard/config.h +++ b/keyboards/smallkeyboard/config.h @@ -35,7 +35,6 @@ */ #define MATRIX_ROW_PINS {C7, C6 } #define MATRIX_COL_PINS {F7, F6, F5} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/smk60/config.h b/keyboards/smk60/config.h index fdb3b9a909..7b764cb5a4 100644 --- a/keyboards/smk60/config.h +++ b/keyboards/smk60/config.h @@ -12,7 +12,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F0, F1, F5, B2 } #define MATRIX_COL_PINS { B4, B5, B6, C6, C7, F6, F7, F4, B1, B3, D0, D1, D2, D3, D5} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/snampad/config.h b/keyboards/snampad/config.h index 816a0449be..5e776fe52c 100644 --- a/keyboards/snampad/config.h +++ b/keyboards/snampad/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } #define MATRIX_COL_PINS { D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/sneakbox/aliceclone/config.h b/keyboards/sneakbox/aliceclone/config.h index 6d56aece7c..4f2ecec285 100644 --- a/keyboards/sneakbox/aliceclone/config.h +++ b/keyboards/sneakbox/aliceclone/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sneakbox/aliceclonergb/config.h b/keyboards/sneakbox/aliceclonergb/config.h index 0218fc0675..87ce572c4e 100644 --- a/keyboards/sneakbox/aliceclonergb/config.h +++ b/keyboards/sneakbox/aliceclonergb/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sneakbox/ava/config.h b/keyboards/sneakbox/ava/config.h index 7c7f3b0ad9..90112a26c1 100644 --- a/keyboards/sneakbox/ava/config.h +++ b/keyboards/sneakbox/ava/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, B7 } #define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sneakbox/disarray/ortho/config.h b/keyboards/sneakbox/disarray/ortho/config.h index 1e02d62d76..90dc75d195 100644 --- a/keyboards/sneakbox/disarray/ortho/config.h +++ b/keyboards/sneakbox/disarray/ortho/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, B0} #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0, E6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sneakbox/disarray/staggered/config.h b/keyboards/sneakbox/disarray/staggered/config.h index 140cb58bf1..32c567f910 100644 --- a/keyboards/sneakbox/disarray/staggered/config.h +++ b/keyboards/sneakbox/disarray/staggered/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3} #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sofle/keymaps/killmaster/config.h b/keyboards/sofle/keymaps/killmaster/config.h index 2e6abe84e3..9d1de12d5a 100644 --- a/keyboards/sofle/keymaps/killmaster/config.h +++ b/keyboards/sofle/keymaps/killmaster/config.h @@ -61,4 +61,3 @@ for more options. #define MEDIA_KEY_DELAY 2 #define USB_POLLING_INTERVAL_MS 1 -#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/soup10/config.h b/keyboards/soup10/config.h index f4810d0fa8..10f30a7283 100644 --- a/keyboards/soup10/config.h +++ b/keyboards/soup10/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 #define MATRIX_ROW_PINS { D1, D0, D4, C6 } #define MATRIX_COL_PINS { D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sowbug/68keys/config.h b/keyboards/sowbug/68keys/config.h index 444ac403bb..44d75e670a 100644 --- a/keyboards/sowbug/68keys/config.h +++ b/keyboards/sowbug/68keys/config.h @@ -27,7 +27,6 @@ // key matrix pins #define MATRIX_ROW_PINS { C14, C15, A0, A1, A2 } #define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B10, B11, B12, B13, B14, B15, A8, A9, A10 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sowbug/ansi_tkl/config.h b/keyboards/sowbug/ansi_tkl/config.h index 9523e02e9d..e4752f9425 100644 --- a/keyboards/sowbug/ansi_tkl/config.h +++ b/keyboards/sowbug/ansi_tkl/config.h @@ -29,7 +29,6 @@ { C14, C15, A0, A1, A2, A3 } #define MATRIX_COL_PINS \ { A4, A5, A6, A7, B0, B1, B10, B11, B12, B13, B14, B15, A8, A9, A10, A15, B3 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/soy20/config.h b/keyboards/soy20/config.h index 6d8d5554c4..9800b3f13e 100644 --- a/keyboards/soy20/config.h +++ b/keyboards/soy20/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, B6, B7, C7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/spaceman/2_milk/config.h b/keyboards/spaceman/2_milk/config.h index 01786911ce..2a4b2889d0 100644 --- a/keyboards/spaceman/2_milk/config.h +++ b/keyboards/spaceman/2_milk/config.h @@ -25,7 +25,6 @@ {D4}, \ {C6} \ } -#define UNUSED_PINS #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B6 diff --git a/keyboards/spaceman/pancake/rev1/feather/config.h b/keyboards/spaceman/pancake/rev1/feather/config.h index cb80721e46..c593147151 100644 --- a/keyboards/spaceman/pancake/rev1/feather/config.h +++ b/keyboards/spaceman/pancake/rev1/feather/config.h @@ -19,6 +19,5 @@ /* Pancake default pinout */ #define MATRIX_ROW_PINS { B5, D7, C6, D0 } #define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } -#define UNUSED_PINS #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/spaceman/pancake/rev1/promicro/config.h b/keyboards/spaceman/pancake/rev1/promicro/config.h index ee02bff2b8..e96d9f152c 100644 --- a/keyboards/spaceman/pancake/rev1/promicro/config.h +++ b/keyboards/spaceman/pancake/rev1/promicro/config.h @@ -19,4 +19,3 @@ /* Pancake default pinout */ #define MATRIX_ROW_PINS { B1, B3, B2, B6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, E6, B4, B5, D7, C6, D4, D0, D1 } -#define UNUSED_PINS
\ No newline at end of file diff --git a/keyboards/spaceman/pancake/rev2/config.h b/keyboards/spaceman/pancake/rev2/config.h index f63b136140..15d483a82e 100644 --- a/keyboards/spaceman/pancake/rev2/config.h +++ b/keyboards/spaceman/pancake/rev2/config.h @@ -24,4 +24,3 @@ #define MATRIX_ROW_PINS { C7, C6, B6, B5 } #define MATRIX_COL_PINS { B7, B3, B2, B1 ,B0, E6, F0, F1, F4, F5, F6, F7 } -#define UNUSED_PINS diff --git a/keyboards/spaceman/yun65/config.h b/keyboards/spaceman/yun65/config.h index 05fce09fb0..6f4c4e4050 100644 --- a/keyboards/spaceman/yun65/config.h +++ b/keyboards/spaceman/yun65/config.h @@ -24,4 +24,3 @@ #define MATRIX_ROW_PINS { E6, D3, D2, D1, D0 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D4, D6, D7, B4, B5, B6, C6, C7, D5, B3 } -#define UNUSED_PINS diff --git a/keyboards/spacetime/config.h b/keyboards/spacetime/config.h index 7b0f43efcd..b331c8bcab 100644 --- a/keyboards/spacetime/config.h +++ b/keyboards/spacetime/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/specskeys/config.h b/keyboards/specskeys/config.h index 0bf33d8afa..7d10b50460 100644 --- a/keyboards/specskeys/config.h +++ b/keyboards/specskeys/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { E6, B0, B1, B2, B3, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/splitish/config.h b/keyboards/splitish/config.h index a6988896af..5f97aa585d 100644 --- a/keyboards/splitish/config.h +++ b/keyboards/splitish/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4 , F5 , F6 , F7 , B1 , B3 , C6 , D4 , D0 , D1 , D2 , D3 } #define MATRIX_ROW_PINS { B4 , B5 , B2 , B6 } #define DIODE_DIRECTION COL2ROW -#define UNUSED_PINS #define DEBOUNCE 5 diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/config.h b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h index 9a58f7751a..59994e01fa 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/config.h +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h @@ -47,8 +47,6 @@ #define COMBO_COUNT 5 #endif -#define QMK_KEYS_PER_SCAN 4 - #define EE_HANDS //#define DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c index af583a607f..f193c6e00c 100644 --- a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c @@ -341,7 +341,7 @@ bool oled_task_user(void) { #ifdef ENCODER_ENABLE bool encoder_update_user(uint8_t index, bool clockwise) { - switch(biton32(layer_state)){ + switch(get_highest_layer(layer_state)){ case 1: if (clockwise) { tap_code16(C(KC_TAB)); diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk b/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk index 000c995025..ee07f52ff1 100644 --- a/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk @@ -9,7 +9,6 @@ MOUSEKEY_ENABLE = no TAP_DANCE_ENABLE = no STENO_ENABLE = no BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -TERMINAL_ENABLE = no GRAVE_ESC_ENABLE = no MAGIC_ENABLE = no SPACE_CADET_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c index 813328aa0c..d0f2a1b6cd 100644 --- a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c @@ -111,7 +111,7 @@ void oled_slash_separator(void){ void render_layout_state(void) { oled_write_P(PSTR("Layout: "), false); - switch (biton32(default_layer_state)) { + switch (get_highest_layer(default_layer_state)) { case _COLEMAK: oled_write_P(PSTR("Colemak"), false); break; diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c index 0a4f1887c3..3cd9df27fb 100644 --- a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c @@ -311,7 +311,7 @@ bool oled_task_user(void) { #ifdef ENCODER_ENABLE bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case QWERTY: // History scrubbing. For Adobe products, hold shift while moving // backward to go forward instead. @@ -336,7 +336,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { break; } } else if (index == 1) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case QWERTY: // Scrolling with PageUp and PgDn. if (clockwise) { diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index 2fc34070f4..87ec1021bf 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B4, E6, D7, D4 } #define MATRIX_COL_PINS \ { B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS #define ENCODERS_PAD_A \ { C6 } diff --git a/keyboards/splitkb/kyria/rev2/config.h b/keyboards/splitkb/kyria/rev2/config.h index 8ff3813964..15e4e7bd3b 100644 --- a/keyboards/splitkb/kyria/rev2/config.h +++ b/keyboards/splitkb/kyria/rev2/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { D4, C6, D7, E6 } #define MATRIX_COL_PINS_RIGHT \ { B4, B5, B6, B2, B3, B1, F7, F6 } -#define UNUSED_PINS #define ENCODERS_PAD_A \ { F4 } diff --git a/keyboards/splitkb/zima/config.h b/keyboards/splitkb/zima/config.h index 9e3fff8cd0..35782781c1 100644 --- a/keyboards/splitkb/zima/config.h +++ b/keyboards/splitkb/zima/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { E6, F5, F6 }, \ { F0, F1, F4 }, \ } -#define UNUSED_PINS #define ENCODERS_PAD_A { B4 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/splitography/keymaps/jeandeaual/keymap.c b/keyboards/splitography/keymaps/jeandeaual/keymap.c index 6679d835f2..87c4159443 100644 --- a/keyboards/splitography/keymaps/jeandeaual/keymap.c +++ b/keyboards/splitography/keymaps/jeandeaual/keymap.c @@ -225,7 +225,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } return false; case KC_QUOT: - if ((base_layer != dvorak) || (biton32(layer_state) != _BLUE)) { + if ((base_layer != dvorak) || (get_highest_layer(layer_state) != _BLUE)) { break; } if (record->event.pressed) { diff --git a/keyboards/splitography/keymaps/multi/keymap.c b/keyboards/splitography/keymaps/multi/keymap.c index af1cc1a801..7d847e40b6 100644 --- a/keyboards/splitography/keymaps/multi/keymap.c +++ b/keyboards/splitography/keymaps/multi/keymap.c @@ -331,7 +331,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; case KC_QUOT: - if ((base_layer != dvorak) || (biton32(layer_state) != _BLUE)) { + if ((base_layer != dvorak) || (get_highest_layer(layer_state) != _BLUE)) { break; } if (record->event.pressed) { diff --git a/keyboards/sporewoh/banime40/config.h b/keyboards/sporewoh/banime40/config.h index 55b93ce1f5..0f292315f1 100644 --- a/keyboards/sporewoh/banime40/config.h +++ b/keyboards/sporewoh/banime40/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E6, D7, C6, D4 } #define MATRIX_COL_PINS { B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/star75/config.h b/keyboards/star75/config.h index 7f90993265..7efe58f50f 100644 --- a/keyboards/star75/config.h +++ b/keyboards/star75/config.h @@ -12,7 +12,6 @@ SPDX-License-Identifier: GPL-2.0-or-later */ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/stello65/beta/config.h b/keyboards/stello65/beta/config.h index e60b7d598b..555975b02d 100644 --- a/keyboards/stello65/beta/config.h +++ b/keyboards/stello65/beta/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, D0, D1, C6, F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { C7, B6, B5, B4, D7, D6, D4, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/stello65/hs_rev1/config.h b/keyboards/stello65/hs_rev1/config.h index dbc5bf732c..3da4275402 100644 --- a/keyboards/stello65/hs_rev1/config.h +++ b/keyboards/stello65/hs_rev1/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, D1, D2, B6, C6, C7, F7, F6, F5 } #define MATRIX_COL_PINS { E6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/stello65/sl_rev1/config.h b/keyboards/stello65/sl_rev1/config.h index 1d98f23a17..f7096308a6 100644 --- a/keyboards/stello65/sl_rev1/config.h +++ b/keyboards/stello65/sl_rev1/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, D0, D1, C6, F7, F6, F5, F4, F1 } #define MATRIX_COL_PINS { C7, B4, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/stratos/config.h b/keyboards/stratos/config.h index ae95db5162..13e54db7bc 100644 --- a/keyboards/stratos/config.h +++ b/keyboards/stratos/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } #define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h index 219b2792bf..f1bf9769be 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, C6, C5 } -#define UNUSED_PINS // #define AUDIO_VOICES // #define AUDIO_PIN C6 diff --git a/keyboards/subrezon/la_nc/config.h b/keyboards/subrezon/la_nc/config.h index 3770bdc26e..3cd6391e16 100644 --- a/keyboards/subrezon/la_nc/config.h +++ b/keyboards/subrezon/la_nc/config.h @@ -12,7 +12,6 @@ #define MATRIX_COLS 10 #define MATRIX_COL_PINS {B3, B1, F7, F6, F5, D4, C6, D7, E6, B4} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/superuser/ext/config.h b/keyboards/superuser/ext/config.h index b377e8735b..84c71b0195 100644 --- a/keyboards/superuser/ext/config.h +++ b/keyboards/superuser/ext/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { B2, B1, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, B0, B3} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/superuser/frl/config.h b/keyboards/superuser/frl/config.h index f025de6dc0..021cb0f57d 100644 --- a/keyboards/superuser/frl/config.h +++ b/keyboards/superuser/frl/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, B0, B3} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/superuser/tkl/config.h b/keyboards/superuser/tkl/config.h index 9877485101..768cd26fa6 100644 --- a/keyboards/superuser/tkl/config.h +++ b/keyboards/superuser/tkl/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2, D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, B0, B3} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/switchplate/southpaw_65/config.h b/keyboards/switchplate/southpaw_65/config.h index af6c447091..5e3724c330 100644 --- a/keyboards/switchplate/southpaw_65/config.h +++ b/keyboards/switchplate/southpaw_65/config.h @@ -34,7 +34,6 @@ */ //#define MATRIX_ROW_PINS { D0, D5 } //#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/switchplate/southpaw_fullsize/config.h b/keyboards/switchplate/southpaw_fullsize/config.h index f5ab736f40..7b159eb5d6 100644 --- a/keyboards/switchplate/southpaw_fullsize/config.h +++ b/keyboards/switchplate/southpaw_fullsize/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E1, C0, C1, C2, C3, C4 } #define MATRIX_COL_PINS { A7, C7, C6, C5, F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, E0, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/switchplate/switchplate910/config.h b/keyboards/switchplate/switchplate910/config.h index d0fb70988d..4e63d15919 100644 --- a/keyboards/switchplate/switchplate910/config.h +++ b/keyboards/switchplate/switchplate910/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7, D1 } #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, B3, B2, B0, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h index b24710f78c..9ec51b0b58 100755 --- a/keyboards/sx60/config.h +++ b/keyboards/sx60/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // MCP23018 pinout: // Rows: B4, B3, B2, B1, B0 // Cols: A0, A1, A2, A3, A4, A5, A6, A7 -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/synapse/config.h b/keyboards/synapse/config.h index a06269b437..b4311c1402 100644 --- a/keyboards/synapse/config.h +++ b/keyboards/synapse/config.h @@ -27,7 +27,6 @@ #define MATRIX_COL_PINS \ { F0, D4, F5, B1, B2, B3, B7, D0, D1, D2, D3, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/synthlabs/solo/config.h b/keyboards/synthlabs/solo/config.h index affb70befc..112d12d1ee 100644 --- a/keyboards/synthlabs/solo/config.h +++ b/keyboards/synthlabs/solo/config.h @@ -16,8 +16,6 @@ #define MATRIX_ROWS 3 #define MATRIX_COLS 7 -#define QMK_KEYS_PER_SCAN 17 - /* * Force NKRO * diff --git a/keyboards/system76/launch_1/config.h b/keyboards/system76/launch_1/config.h index 4a50e4d64c..50a6e6f9d7 100644 --- a/keyboards/system76/launch_1/config.h +++ b/keyboards/system76/launch_1/config.h @@ -30,7 +30,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D7, C7, C6, B6, B5, B4, D6, D4, E6, D5, D3, D2, B7, B0 } -#define UNUSED_PINS /* * Diode Direction diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index e6dfb6383b..2aac9d3174 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {D0,D1,F6,F7,D5} #define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/center_enter/config.h b/keyboards/takashicompany/center_enter/config.h index 0806c1068d..aa675c32ad 100644 --- a/keyboards/takashicompany/center_enter/config.h +++ b/keyboards/takashicompany/center_enter/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D7, B2, B6, D0, D4, C6} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/compacx/config.h b/keyboards/takashicompany/compacx/config.h index 3d769ab896..10c70e472b 100644 --- a/keyboards/takashicompany/compacx/config.h +++ b/keyboards/takashicompany/compacx/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/dogtag/config.h b/keyboards/takashicompany/dogtag/config.h index ebb5d696c4..adcf8d7321 100644 --- a/keyboards/takashicompany/dogtag/config.h +++ b/keyboards/takashicompany/dogtag/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS_RIGHT { B2, B6, B3 } #define MATRIX_COL_PINS_RIGHT { B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/endzone34/config.h b/keyboards/takashicompany/endzone34/config.h index 5c8236c700..f74b828516 100644 --- a/keyboards/takashicompany/endzone34/config.h +++ b/keyboards/takashicompany/endzone34/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B3, B2, B6, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/heavy_left/config.h b/keyboards/takashicompany/heavy_left/config.h index 4ca06fab2b..fa31dccb90 100644 --- a/keyboards/takashicompany/heavy_left/config.h +++ b/keyboards/takashicompany/heavy_left/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/minizone/config.h b/keyboards/takashicompany/minizone/config.h index 25a74dc4d7..0c8def659f 100644 --- a/keyboards/takashicompany/minizone/config.h +++ b/keyboards/takashicompany/minizone/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/qoolee/config.h b/keyboards/takashicompany/qoolee/config.h index 24d5aa11fe..f71e3de280 100644 --- a/keyboards/takashicompany/qoolee/config.h +++ b/keyboards/takashicompany/qoolee/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D0, D4, C6, D7} -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashicompany/radialex/config.h b/keyboards/takashicompany/radialex/config.h index 49cb1f7e09..468a850f4b 100644 --- a/keyboards/takashicompany/radialex/config.h +++ b/keyboards/takashicompany/radialex/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashiski/hecomi/alpha/config.h b/keyboards/takashiski/hecomi/alpha/config.h index 610ca4de66..05f1d35c83 100644 --- a/keyboards/takashiski/hecomi/alpha/config.h +++ b/keyboards/takashiski/hecomi/alpha/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } #define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } -#define UNUSED_PINS #define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 //#define USE_I2C diff --git a/keyboards/takashiski/namecard2x4/rev1/config.h b/keyboards/takashiski/namecard2x4/rev1/config.h index a91df15b08..74373a5752 100644 --- a/keyboards/takashiski/namecard2x4/rev1/config.h +++ b/keyboards/takashiski/namecard2x4/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4,B5 } #define MATRIX_COL_PINS { E6,D7,C6,D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashiski/namecard2x4/rev2/config.h b/keyboards/takashiski/namecard2x4/rev2/config.h index 402737dc71..4bb4a1fcde 100644 --- a/keyboards/takashiski/namecard2x4/rev2/config.h +++ b/keyboards/takashiski/namecard2x4/rev2/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B2,B6 } #define MATRIX_COL_PINS { D7,E6,B4,B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashiski/otaku_split/rev0/config.h b/keyboards/takashiski/otaku_split/rev0/config.h index a2ad901198..3eb84cc6b3 100644 --- a/keyboards/takashiski/otaku_split/rev0/config.h +++ b/keyboards/takashiski/otaku_split/rev0/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5,B4,E6,D7,C6 } #define MATRIX_COL_PINS { B6,B2,B3,B1,F7,F6,F5,F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/takashiski/otaku_split/rev1/config.h b/keyboards/takashiski/otaku_split/rev1/config.h index 1fc9d4f16c..099f20f5d0 100644 --- a/keyboards/takashiski/otaku_split/rev1/config.h +++ b/keyboards/takashiski/otaku_split/rev1/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } #define MATRIX_ROW_PINS_RIGHT { B5,B4,E6,D7,C6 } #define MATRIX_COL_PINS_RIGHT { B6,B2,B3,B1,F7,F6,F5,F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/taleguers/taleguers75/config.h b/keyboards/taleguers/taleguers75/config.h index f29c1384dd..c3d229bfc7 100644 --- a/keyboards/taleguers/taleguers75/config.h +++ b/keyboards/taleguers/taleguers75/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 164eac346f..52ecb78365 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { B3 , B2 , B6 , B5 , B4 , E6 , D7 , C6 , F4 , F5 , F6 } #define MATRIX_ROW_PINS { F7 , B1 , D4 , D0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tau4/config.h b/keyboards/tau4/config.h index d7e6ffe1bb..f926f644e3 100755 --- a/keyboards/tau4/config.h +++ b/keyboards/tau4/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, C6, C7, F1, F0, B0, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/team0110/p1800fl/config.h b/keyboards/team0110/p1800fl/config.h index 11c4c71878..d021cdb21b 100644 --- a/keyboards/team0110/p1800fl/config.h +++ b/keyboards/team0110/p1800fl/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2} -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/teleport/numpad/config.h b/keyboards/teleport/numpad/config.h index e3a2f17898..6294ac7e5f 100644 --- a/keyboards/teleport/numpad/config.h +++ b/keyboards/teleport/numpad/config.h @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { D7, D4, D6, B4, B5 } #define MATRIX_COL_PINS { F6, F5, F7, F4 } -#define UNUSED_PINS { B0, B1, B2, B3, B6, B7, D0, D1, D2, D3, D5, F0, F1, E6, C6, C7 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tender/macrowo_pad/config.h b/keyboards/tender/macrowo_pad/config.h index 17f5597ec8..bdfe120bf0 100644 --- a/keyboards/tender/macrowo_pad/config.h +++ b/keyboards/tender/macrowo_pad/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, D7 } #define MATRIX_COL_PINS { E6, B4, B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tenki/config.h b/keyboards/tenki/config.h index 7f810e7666..3be9c91d2e 100644 --- a/keyboards/tenki/config.h +++ b/keyboards/tenki/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B4, F6, B6, B2 } #define MATRIX_COL_PINS { F4, F5, D4, D0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 911a4f3be9..ec4ded7eb9 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -31,7 +31,6 @@ #define MATRIX_ROW_PINS { D2, D7, E6, B4, B5, B6, B2, B3, F0 } #define MATRIX_COL_PINS { D3, F4, F5, F6, F7, B1 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW /* ROTARY ENCODERS */ diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index fe80aefa37..a9e539fb00 100755 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B2, B1, B0, E6 } #define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c index 1b53ea80b9..9e2a96ffc3 100755 --- a/keyboards/tetris/keymaps/default/keymap.c +++ b/keyboards/tetris/keymaps/default/keymap.c @@ -37,7 +37,7 @@ void matrix_init_user(void) { } void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (RGB_encoder_dir != 0) { if (timer_elapsed(RGB_encoder_timer) > 1400) { @@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t * record) { bool encoder_update_user(uint8_t index, bool clockwise) { RGB_encoder_timer = timer_read(); RGB_encoder_timer2 = timer_read(); - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); if (clockwise) { RGB_encoder_dir = 1; } else { diff --git a/keyboards/tg4x/config.h b/keyboards/tg4x/config.h index 918eab800c..4fc734fb0f 100644 --- a/keyboards/tg4x/config.h +++ b/keyboards/tg4x/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 #define MATRIX_ROW_PINS { B5, B4, E6, D7, C6, D4, D0, D1 } #define MATRIX_COL_PINS { D3, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tgr/910/config.h b/keyboards/tgr/910/config.h index e2efccb633..9a12407b35 100644 --- a/keyboards/tgr/910/config.h +++ b/keyboards/tgr/910/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } #define MATRIX_COL_PINS { D7, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A1, A0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/tgr/910ce/config.h b/keyboards/tgr/910ce/config.h index f69f48a121..a7b88609c3 100644 --- a/keyboards/tgr/910ce/config.h +++ b/keyboards/tgr/910ce/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B1, B2, B3, B4, B5, B6 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/tgr/jane/v2/config.h b/keyboards/tgr/jane/v2/config.h index 4618c99ce0..415455c929 100644 --- a/keyboards/tgr/jane/v2/config.h +++ b/keyboards/tgr/jane/v2/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/tgr/jane/v2ce/config.h b/keyboards/tgr/jane/v2ce/config.h index e0f8a7c861..37c3e962a6 100644 --- a/keyboards/tgr/jane/v2ce/config.h +++ b/keyboards/tgr/jane/v2ce/config.h @@ -24,7 +24,6 @@ // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/the_royal/liminal/config.h b/keyboards/the_royal/liminal/config.h index f24759f4db..2066eefefb 100644 --- a/keyboards/the_royal/liminal/config.h +++ b/keyboards/the_royal/liminal/config.h @@ -8,7 +8,6 @@ #define MATRIX_ROW_PINS { C6, B6, B7, C7 } #define MATRIX_COL_PINS { D6, C4, D3, D2, D1, D0, C2, B0, B1, B2, B3, B4, D5, C5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/the_royal/schwann/config.h b/keyboards/the_royal/schwann/config.h index 5ea20a5e00..20fbae923f 100644 --- a/keyboards/the_royal/schwann/config.h +++ b/keyboards/the_royal/schwann/config.h @@ -8,7 +8,6 @@ #define MATRIX_ROW_PINS { F0, F1, F6, C7 } #define MATRIX_COL_PINS { F4, F5, D5, D3, D2, C6, B6, B5, B4, D7, D6, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/the_uni/pro_micro/config.h b/keyboards/the_uni/pro_micro/config.h index ff965d7744..61a866d8db 100644 --- a/keyboards/the_uni/pro_micro/config.h +++ b/keyboards/the_uni/pro_micro/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F4, B2, B6 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B5, B4, E6, D7, C6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/the_uni/usb_c/config.h b/keyboards/the_uni/usb_c/config.h index 3110c0d821..c45b450838 100644 --- a/keyboards/the_uni/usb_c/config.h +++ b/keyboards/the_uni/usb_c/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D6, C7 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, D5, D3, D2, D1, D0, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/themadnoodle/ncc1701kb/v2/config.h b/keyboards/themadnoodle/ncc1701kb/v2/config.h index 042fd276d9..572d332a54 100644 --- a/keyboards/themadnoodle/ncc1701kb/v2/config.h +++ b/keyboards/themadnoodle/ncc1701kb/v2/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NCC-1701-KB PCB default pin-out */ #define MATRIX_ROW_PINS { D4, D6, D7 } #define MATRIX_COL_PINS { B4, B5, B6 } -#define UNUSED_PINS /* RGB BackLight */ #define RGB_DI_PIN B7 diff --git a/keyboards/themadnoodle/noodlepad/config.h b/keyboards/themadnoodle/noodlepad/config.h index 042fd276d9..572d332a54 100644 --- a/keyboards/themadnoodle/noodlepad/config.h +++ b/keyboards/themadnoodle/noodlepad/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NCC-1701-KB PCB default pin-out */ #define MATRIX_ROW_PINS { D4, D6, D7 } #define MATRIX_COL_PINS { B4, B5, B6 } -#define UNUSED_PINS /* RGB BackLight */ #define RGB_DI_PIN B7 diff --git a/keyboards/thevankeyboards/bananasplit/config.h b/keyboards/thevankeyboards/bananasplit/config.h index b0acc5b039..2fd0f470ad 100644 --- a/keyboards/thevankeyboards/bananasplit/config.h +++ b/keyboards/thevankeyboards/bananasplit/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } #define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } -#define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/thevankeyboards/caravan/config.h b/keyboards/thevankeyboards/caravan/config.h index ec35e9e48e..51a98aa181 100644 --- a/keyboards/thevankeyboards/caravan/config.h +++ b/keyboards/thevankeyboards/caravan/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3 } #define MATRIX_COL_PINS { F1, F4, F5, B4, B5, B6, B7, D2, D3, D5, D4, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/thevankeyboards/jetvan/config.h b/keyboards/thevankeyboards/jetvan/config.h index 74094a183a..143cf4e6ba 100644 --- a/keyboards/thevankeyboards/jetvan/config.h +++ b/keyboards/thevankeyboards/jetvan/config.h @@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D7, B5, F7, D4 } #define MATRIX_COL_PINS { D2, D3, D5, D6, B4, B6, F6, F5, F4, F1, F0, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index b3ba58985b..69e2bd07af 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D7, B5, F7, D4 } #define MATRIX_COL_PINS { D2, D3, D5, D6, B4, B6, F6, F5, F4, F1, F0, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/config.h b/keyboards/thevankeyboards/minivan/keymaps/belak/config.h index 47d96a29d8..488ffa5418 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/config.h @@ -4,5 +4,6 @@ #include "../../config.h" #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD #endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c index 437b1881a4..0ed709747a 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c @@ -22,6 +22,9 @@ #define TD_LCTL TD(BE_TD_CTL) #define TD_LALT TD(BE_TD_ALT) +#define ACTION_TAP_DANCE_MOD_TAP(mod) \ + { .fn = {mod_tap_fn, NULL, mod_reset_fn}, .user_data = (void *)&((uint8_t){mod}), } + enum belak_td { BE_TD_GUI = 0, BE_TD_CTL, @@ -32,15 +35,9 @@ void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data); void mod_reset_fn(qk_tap_dance_state_t *state, void *user_data); qk_tap_dance_action_t tap_dance_actions[] = { - [BE_TD_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn), - [BE_TD_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn), - [BE_TD_ALT] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn), -}; - -uint16_t tap_dance_keys[] = { - [BE_TD_GUI] = KC_LGUI, - [BE_TD_CTL] = KC_LCTL, - [BE_TD_ALT] = KC_LALT, + [BE_TD_GUI] = ACTION_TAP_DANCE_MOD_TAP(KC_LGUI), + [BE_TD_CTL] = ACTION_TAP_DANCE_MOD_TAP(KC_LCTL), + [BE_TD_ALT] = ACTION_TAP_DANCE_MOD_TAP(KC_LALT), }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -74,7 +71,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data) { switch (state->count) { case 1: - register_mods(MOD_BIT(tap_dance_keys[state->keycode - QK_TAP_DANCE])); + uint8_t *mod = (uint8_t *)user_data; + register_mods(MOD_BIT(*mod)); send_keyboard_report(); break; case 2: @@ -90,8 +88,9 @@ void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data) { } void mod_reset_fn(qk_tap_dance_state_t *state, void *user_data) { + uint8_t *mod = (uint8_t *)user_data; layer_off(_L1); layer_off(_L2); - unregister_mods(MOD_BIT(tap_dance_keys[state->keycode - QK_TAP_DANCE])); + unregister_mods(MOD_BIT(*mod)); send_keyboard_report(); } diff --git a/keyboards/thevankeyboards/minivan/keymaps/halvves/config.h b/keyboards/thevankeyboards/minivan/keymaps/halvves/config.h index 6be8d217bd..c6404f8ce5 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/halvves/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/halvves/config.h @@ -1,6 +1,7 @@ #pragma once #define TAPPING_TERM 505 +#define PERMISSIVE_HOLD #define RETRO_TAPPING // smooth mousekeys (copied from the ergo ez config) diff --git a/keyboards/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index 15414ab797..6fd9df7b52 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F5, D7, B4 } #define MATRIX_COL_PINS { F1, F4, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c index b00cf80f5c..a6fa5ed722 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c @@ -147,7 +147,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } uint8_t layer; - layer = biton32(layer_state); + layer = get_highest_layer(layer_state); switch (keycode) { case FPH_1 ... FPH_9: diff --git a/keyboards/tkc/california/config.h b/keyboards/tkc/california/config.h index 17c7c7698b..3f8d4b58e7 100644 --- a/keyboards/tkc/california/config.h +++ b/keyboards/tkc/california/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C7, C6, B6, D4, D3, D0, E6, B0, B1, B2, D2, B3 } #define MATRIX_COL_PINS { B5, B4, D7, D6, F7, F6, F5, D5, D1, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/tkc/m0lly/config.h b/keyboards/tkc/m0lly/config.h index 961c254a40..b8a60d8693 100644 --- a/keyboards/tkc/m0lly/config.h +++ b/keyboards/tkc/m0lly/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkc/osav2/config.h b/keyboards/tkc/osav2/config.h index 45269b5cc4..199954527b 100644 --- a/keyboards/tkc/osav2/config.h +++ b/keyboards/tkc/osav2/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { B4, D7, D5, D3, D2, D0, D1, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkc/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h index eb33e2f2ad..d88d390b8f 100644 --- a/keyboards/tkc/tkc1800/config.h +++ b/keyboards/tkc/tkc1800/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Column pin configuration */ #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkc/tkl_ab87/config.h b/keyboards/tkc/tkl_ab87/config.h index 597839326f..5d34276336 100644 --- a/keyboards/tkc/tkl_ab87/config.h +++ b/keyboards/tkc/tkl_ab87/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B1, F5, F7, B0, B2, B3 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, E6, F6, F4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tkw/stoutgat/v1/config.h b/keyboards/tkw/stoutgat/v1/config.h index 69de5208c6..787c927039 100644 --- a/keyboards/tkw/stoutgat/v1/config.h +++ b/keyboards/tkw/stoutgat/v1/config.h @@ -28,6 +28,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_A { B4, B0 } #define ENCODERS_PAD_B { B3, B1 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index be448dba71..115a652ac8 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D5, D3, D2, D0 } #define MATRIX_COL_PINS { D1, D4, F0, F1, F4, F5, F6, F7, D6, D7, B4, B5, B6, C6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index c9d44db707..98669c3d99 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tokyokeyboard/alix40/config.h b/keyboards/tokyokeyboard/alix40/config.h index 8f2d1b7865..9557f130c9 100644 --- a/keyboards/tokyokeyboard/alix40/config.h +++ b/keyboards/tokyokeyboard/alix40/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D7, C6, C7, B5 } #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D0, D1, D2, D3, D5, D6 } -#define UNUSED_PINS /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tokyokeyboard/tokyo60/config.h b/keyboards/tokyokeyboard/tokyo60/config.h index 60ed4d8f86..ab36ab7354 100644 --- a/keyboards/tokyokeyboard/tokyo60/config.h +++ b/keyboards/tokyokeyboard/tokyo60/config.h @@ -24,7 +24,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tominabox1/adalyn/config.h b/keyboards/tominabox1/adalyn/config.h index 10bcb0e4d5..136a8ae6df 100644 --- a/keyboards/tominabox1/adalyn/config.h +++ b/keyboards/tominabox1/adalyn/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { C7, D6, B7, B3 } #define MATRIX_COL_PINS { D7, B4, B5, B6, C6, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tominabox1/bigboy/config.h b/keyboards/tominabox1/bigboy/config.h index 27142b431c..9e95f1f5c7 100755 --- a/keyboards/tominabox1/bigboy/config.h +++ b/keyboards/tominabox1/bigboy/config.h @@ -24,7 +24,6 @@ { B7, B2, B3 } \ } -#define UNUSED_PINS #define ENCODERS_PAD_A { C6 } #define ENCODERS_PAD_B { B6 } diff --git a/keyboards/tominabox1/le_chiffre/he/config.h b/keyboards/tominabox1/le_chiffre/he/config.h index bfba9b96be..495cdbbd99 100644 --- a/keyboards/tominabox1/le_chiffre/he/config.h +++ b/keyboards/tominabox1/le_chiffre/he/config.h @@ -27,7 +27,6 @@ #define MATRIX_ROW_PINS { B3, D4, F1, C6 } #define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } -#define UNUSED_PINS /* Define encoder pads */ #define ENCODERS_PAD_A { D5 } diff --git a/keyboards/tominabox1/le_chiffre/rev1/config.h b/keyboards/tominabox1/le_chiffre/rev1/config.h index 0e5b6887cd..220d5b27e0 100644 --- a/keyboards/tominabox1/le_chiffre/rev1/config.h +++ b/keyboards/tominabox1/le_chiffre/rev1/config.h @@ -32,7 +32,6 @@ */ #define MATRIX_ROW_PINS { B3, D4, F1, C6 } #define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } -#define UNUSED_PINS /* Define encoder pads */ #define ENCODERS_PAD_A { D5 } diff --git a/keyboards/tominabox1/le_chiffre/rev2/config.h b/keyboards/tominabox1/le_chiffre/rev2/config.h index c37f4775aa..29a4c0bcc3 100644 --- a/keyboards/tominabox1/le_chiffre/rev2/config.h +++ b/keyboards/tominabox1/le_chiffre/rev2/config.h @@ -31,7 +31,6 @@ */ #define MATRIX_ROW_PINS { B3, F6, F7, C7 } #define MATRIX_COL_PINS { B2, F0, F1, F4, F5, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* Define encoder pads */ #define ENCODERS_PAD_A { B6 } diff --git a/keyboards/tominabox1/littlefoot_lx/rev1/config.h b/keyboards/tominabox1/littlefoot_lx/rev1/config.h index 2344c8d284..cdfa3ccef2 100644 --- a/keyboards/tominabox1/littlefoot_lx/rev1/config.h +++ b/keyboards/tominabox1/littlefoot_lx/rev1/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D5, F4, D3, F1, F0 } #define MATRIX_COL_PINS { D7, D6, D4, E2, F5, F6, F7, B6, B5, B4 } // uncomment for original groupbuy -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tominabox1/littlefoot_lx/rev2/config.h b/keyboards/tominabox1/littlefoot_lx/rev2/config.h index d498ca7ab7..15e8583f37 100644 --- a/keyboards/tominabox1/littlefoot_lx/rev2/config.h +++ b/keyboards/tominabox1/littlefoot_lx/rev2/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { D5, F4, D3, F1, F0 } #define MATRIX_COL_PINS { D7, D6, D4, C7, F5, F6, F7, B6, B5, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tominabox1/qaz/config.h b/keyboards/tominabox1/qaz/config.h index 2181419594..9dc105c867 100644 --- a/keyboards/tominabox1/qaz/config.h +++ b/keyboards/tominabox1/qaz/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { F4, D4, C6, E6, D1, D0 } #define MATRIX_COL_PINS { B4, D3, D2, F5, B5, F6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tominabox1/underscore33/rev1/config.h b/keyboards/tominabox1/underscore33/rev1/config.h index e05b66e8a5..787924cae1 100644 --- a/keyboards/tominabox1/underscore33/rev1/config.h +++ b/keyboards/tominabox1/underscore33/rev1/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F5, F6, C6, D0 } #define MATRIX_COL_PINS { B4, B5, D5, F7, B1, F4, B3, D7, B0, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/tominabox1/underscore33/rev2/config.h b/keyboards/tominabox1/underscore33/rev2/config.h index 9056a25467..c6031c86d4 100644 --- a/keyboards/tominabox1/underscore33/rev2/config.h +++ b/keyboards/tominabox1/underscore33/rev2/config.h @@ -34,7 +34,6 @@ #define MATRIX_ROW_PINS { C4, B0, B1, B2 } #define MATRIX_COL_PINS { C5, C6, C7, B7, B6, B5, B4, B3, C2, D0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/torn/config.h b/keyboards/torn/config.h index a7043112e7..b36ad9b1d9 100644 --- a/keyboards/torn/config.h +++ b/keyboards/torn/config.h @@ -37,7 +37,6 @@ { D4, D1, D0, D5 } #define MATRIX_COL_PINS \ { B3, B4, B5, B0, D7, D6 } -#define UNUSED_PINS #define SECONDARY_ROW_PINS \ { (1 << 5), (1 << 6), (1 << 7), (1 << 4) } diff --git a/keyboards/tr60w/config.h b/keyboards/tr60w/config.h index 80a641c6eb..d252e799a3 100644 --- a/keyboards/tr60w/config.h +++ b/keyboards/tr60w/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, B1, B2, E6, B3 } #define MATRIX_COL_PINS { F5, F4, F1, F0, B0, D5, D3, D6, D7, B4, B5, B6, C6, D2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 99e0148114..31a5602c71 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, D7, C6 } #define MATRIX_COL_PINS { D1, D0, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/treasure/type9s2/config.h b/keyboards/treasure/type9s2/config.h index ae68a415ea..a231e4523b 100644 --- a/keyboards/treasure/type9s2/config.h +++ b/keyboards/treasure/type9s2/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments*/ #define MATRIX_ROW_PINS { B4, B5, D2 } #define MATRIX_COL_PINS { B2, B3, C5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tszaboo/ortho4exent/config.h b/keyboards/tszaboo/ortho4exent/config.h index c839cad67b..ba3d30a6bb 100644 --- a/keyboards/tszaboo/ortho4exent/config.h +++ b/keyboards/tszaboo/ortho4exent/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, D4, D7, B4 } /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, D6, D5, D3, D2, D1, B7, B3, B2 } -#define UNUSED_PINS #define LED_CAPS_LOCK_PIN E6 /* COL2ROW, ROW2COL*/ diff --git a/keyboards/tw40/config.h b/keyboards/tw40/config.h index 57307e218c..c813f740d3 100644 --- a/keyboards/tw40/config.h +++ b/keyboards/tw40/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, D5, D3, D2 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/tzarc/djinn/djinn.c b/keyboards/tzarc/djinn/djinn.c index 23f59991a9..5e5fe44c67 100644 --- a/keyboards/tzarc/djinn/djinn.c +++ b/keyboards/tzarc/djinn/djinn.c @@ -70,7 +70,7 @@ void keyboard_post_init_kb(void) { wait_ms(150); // Initialise the LCD - lcd = qp_ili9341_make_spi_device(320, 240, LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN, 4, 3); + lcd = qp_ili9341_make_spi_device(320, 240, LCD_CS_PIN, LCD_DC_PIN, LCD_RST_PIN, 4, 0); qp_init(lcd, QP_ROTATION_0); // Turn on the LCD and clear the display diff --git a/keyboards/tzarc/djinn/graphics/theme_djinn_default.c b/keyboards/tzarc/djinn/graphics/theme_djinn_default.c index 616a3c2430..a4e87bd341 100644 --- a/keyboards/tzarc/djinn/graphics/theme_djinn_default.c +++ b/keyboards/tzarc/djinn/graphics/theme_djinn_default.c @@ -158,7 +158,7 @@ void draw_ui_user(void) { if (hue_redraw || rgb_effect_redraw) { static int max_rgb_xpos = 0; xpos = 16; - snprintf_(buf, sizeof(buf), "rgb: %s", rgb_matrix_name(curr_effect)); + snprintf(buf, sizeof(buf), "rgb: %s", rgb_matrix_name(curr_effect)); for (int i = 5; i < sizeof(buf); ++i) { if (buf[i] == 0) @@ -187,7 +187,7 @@ void draw_ui_user(void) { static int max_layer_xpos = 0; xpos = 16; - snprintf_(buf, sizeof(buf), "layer: %s", layer_name); + snprintf(buf, sizeof(buf), "layer: %s", layer_name); xpos += qp_drawtext_recolor(lcd, xpos, ypos, thintel, buf, curr_hue, 255, 255, curr_hue, 255, 0); if (max_layer_xpos < xpos) { max_layer_xpos = xpos; @@ -200,7 +200,7 @@ void draw_ui_user(void) { if (hue_redraw || power_state_redraw) { static int max_power_xpos = 0; xpos = 16; - snprintf_(buf, sizeof(buf), "power: %s", usbpd_str(kb_state.current_setting)); + snprintf(buf, sizeof(buf), "power: %s", usbpd_str(kb_state.current_setting)); xpos += qp_drawtext_recolor(lcd, xpos, ypos, thintel, buf, curr_hue, 255, 255, curr_hue, 255, 0); if (max_power_xpos < xpos) { max_power_xpos = xpos; @@ -213,7 +213,7 @@ void draw_ui_user(void) { if (hue_redraw || scan_redraw) { static int max_scans_xpos = 0; xpos = 16; - snprintf_(buf, sizeof(buf), "scans: %d", (int)theme_state.scan_rate); + snprintf(buf, sizeof(buf), "scans: %d", (int)theme_state.scan_rate); xpos += qp_drawtext_recolor(lcd, xpos, ypos, thintel, buf, curr_hue, 255, 255, curr_hue, 255, 0); if (max_scans_xpos < xpos) { max_scans_xpos = xpos; @@ -226,7 +226,7 @@ void draw_ui_user(void) { if (hue_redraw || wpm_redraw) { static int max_wpm_xpos = 0; xpos = 16; - snprintf_(buf, sizeof(buf), "wpm: %d", (int)get_current_wpm()); + snprintf(buf, sizeof(buf), "wpm: %d", (int)get_current_wpm()); xpos += qp_drawtext_recolor(lcd, xpos, ypos, thintel, buf, curr_hue, 255, 255, curr_hue, 255, 0); if (max_wpm_xpos < xpos) { max_wpm_xpos = xpos; diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 9413f09528..7ff07ad42f 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { F3, F2, F1, F0, A0 } #define MATRIX_COL_PINS { A2, A1, F5, F4, E6, E7, E5, E4, B7, D0, D1, D2, D3, D4, D5, D6, D7, B5, E0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ungodly/nines/config.h b/keyboards/ungodly/nines/config.h index 221ee0cf0a..127d462e26 100644 --- a/keyboards/ungodly/nines/config.h +++ b/keyboards/ungodly/nines/config.h @@ -27,7 +27,6 @@ { F7, B1, B3 }, \ { B2, B6, B5 } \ } -#define UNUSED_PINS /* Rotary Encoder Assignments */ #define ENCODERS_PAD_A { C6, E6 } diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h index feb2e32d57..d5fa9cf2f3 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h @@ -49,7 +49,6 @@ #define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13 } #define MATRIX_ROW_PINS { B14, B15, C6, C7, C8, C9, A8, A9 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h index feb2e32d57..d5fa9cf2f3 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h @@ -49,7 +49,6 @@ #define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13 } #define MATRIX_ROW_PINS { B14, B15, C6, C7, C8, C9, A8, A9 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h index 597d287b07..cf78172d43 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h @@ -49,7 +49,6 @@ #define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13 } #define MATRIX_ROW_PINS { B14, B15, C6, C7, C8, C9, A8, A9 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h index 597d287b07..cf78172d43 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h @@ -49,7 +49,6 @@ #define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13 } #define MATRIX_ROW_PINS { B14, B15, C6, C7, C8, C9, A8, A9 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unikeyboard/diverge3/config.h b/keyboards/unikeyboard/diverge3/config.h index 72544405c2..141fce0280 100644 --- a/keyboards/unikeyboard/diverge3/config.h +++ b/keyboards/unikeyboard/diverge3/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unikeyboard/divergetm2/config.h b/keyboards/unikeyboard/divergetm2/config.h index bfebd4563a..e10c1abc6e 100644 --- a/keyboards/unikeyboard/divergetm2/config.h +++ b/keyboards/unikeyboard/divergetm2/config.h @@ -35,7 +35,6 @@ */ #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unikeyboard/felix/config.h b/keyboards/unikeyboard/felix/config.h index e199d0792c..1e59a0dcc3 100644 --- a/keyboards/unikeyboard/felix/config.h +++ b/keyboards/unikeyboard/felix/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { B2, B3, B1, F7, F6 } #define MATRIX_COL_PINS { B5, B4, E6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h index 0c6e5a9457..8108713e11 100644 --- a/keyboards/unikorn/config.h +++ b/keyboards/unikorn/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B1, B2, B3, B4, B5 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 diff --git a/keyboards/unison/v04/config.h b/keyboards/unison/v04/config.h index 49cbbd9ce5..bd9bba276d 100644 --- a/keyboards/unison/v04/config.h +++ b/keyboards/unison/v04/config.h @@ -28,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* NOTE: With Round-Robin matrix, set same pins for both. */ #define MATRIX_ROW_PINS { B3, E6, F1, F5, F7, B2, F0, F4, F6, C7 } #define MATRIX_COL_PINS { B3, E6, F1, F5, F7, B2, F0, F4, F6, C7 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/uranuma/config.h b/keyboards/uranuma/config.h index a8a9d4ab7f..f7a1ad9f03 100644 --- a/keyboards/uranuma/config.h +++ b/keyboards/uranuma/config.h @@ -18,7 +18,6 @@ */ #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D2, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/utd80/config.h b/keyboards/utd80/config.h index 9379432dab..7e97b8542c 100644 --- a/keyboards/utd80/config.h +++ b/keyboards/utd80/config.h @@ -25,7 +25,6 @@ #define MATRIX_ROW_PINS { B4, D5, D0, B2, B3, B0 } #define MATRIX_COL_PINS { B1, F0, F1, F4, F5, F6, F7, C7, C6, D3, E6, D7, D6, D4, D2, D1 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c b/keyboards/uzu42/glcdfont.c index 5c3fa80d70..5c3fa80d70 100644 --- a/keyboards/uzu42/keymaps/default/glcdfont_uzu42.c +++ b/keyboards/uzu42/glcdfont.c diff --git a/keyboards/uzu42/keymaps/default/config.h b/keyboards/uzu42/keymaps/default/config.h deleted file mode 100644 index bc7897f501..0000000000 --- a/keyboards/uzu42/keymaps/default/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#define SSD1306OLED - -#define USE_SERIAL_PD2 - -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 200 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 54 -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -// Use the lily version to get the uzu42 logo instead of the qmk logo -#define OLED_FONT_H "keymaps/default/glcdfont_uzu42.c" diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c index 01e31ceb39..4334400c86 100644 --- a/keyboards/uzu42/keymaps/default/keymap.c +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -1,42 +1,28 @@ -#include QMK_KEYBOARD_H -#include "uzu42.h" -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later - -#ifdef RGBLIGHT_ENABLE -#include <stdio.h> -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. enum layer_number { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST, + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - RGBRST + RGBRST = SAFE_RANGE, }; -#define KC_CTES CTL_T(KC_ESC) -#define KC_SFSP SFT_T(KC_SPC) -#define KC_ALBS ALT_T(KC_BSPC) +#define KC_CTES CTL_T(KC_ESC) +#define KC_SFSP SFT_T(KC_SPC) +#define KC_ALBS ALT_T(KC_BSPC) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -88,205 +74,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -int RGB_current_mode; - -// Setting ADJUST layer RGB back to default -void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { - if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { - layer_on(layer3); - } else { - layer_off(layer3); - } -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif -} - -//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk -#ifdef OLED_ENABLE - -#define L_BASE 0 -#define L_LOWER (1 << 1) -#define L_RAISE (1 << 2) -#define L_ADJUST (1 << 3) -#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) - -char layer_state_str[24]; - -const char *read_layer_state(void) { - switch (layer_state) - { - case L_BASE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); - break; - case L_RAISE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); - break; - case L_LOWER: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); - break; - case L_ADJUST: - case L_ADJUST_TRI: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); - break; - default: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); - } - - return layer_state_str; +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } -const char *read_logo(void) { - static char logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, - 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, - 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, - 0}; - return logo; -} - -char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; - -const char code_to_name[60] = { - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', - ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; - -void set_keylog(uint16_t keycode, keyrecord_t *record) { - char name = ' '; - if (keycode < 60) { - name = code_to_name[keycode]; - } - - // update keylog - snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", - record->event.key.row, record->event.key.col, - keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; - } - } - - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; -} - -const char *read_keylog(void) { - return keylog_str; -} - -const char *read_keylogs(void) { - return keylogs_str; -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - if (!is_keyboard_master()) - return OLED_ROTATION_180; // flips the display 180 degrees if offhand - return rotation; -} - -bool oled_task_user(void) { - if (is_keyboard_master()) { - // If you want to change the display of OLED, you need to change here - oled_write_ln(read_layer_state(), false); - oled_write_ln(read_keylog(), false); - oled_write_ln(read_keylogs(), false); - //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); - //oled_write_ln(read_host_led_state(), false); - //oled_write_ln(read_timelog(), false); - } else { - oled_write(read_logo(), false); - } - return false; -} -#endif // OLED_ENABLE - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { -#ifdef OLED_ENABLE - set_keylog(keycode, record); -#endif - // set_timelog(); - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - case RGB_MOD: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - rgblight_mode(RGB_current_mode); - rgblight_step(); - RGB_current_mode = rgblight_config.mode; - } - #endif - return false; - break; - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; - } - return true; -} - + switch (keycode) { + case RGBRST: #ifdef RGBLIGHT_ENABLE - -char rbf_info_str[24]; -const char *read_rgb_info(void) { - - snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", - rgblight_config.enable ? "on" : "- ", rgblight_config.mode, - rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - return rbf_info_str; -} + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } #endif + break; + } + return true; +} diff --git a/keyboards/uzu42/post_config.h b/keyboards/uzu42/post_config.h new file mode 100644 index 0000000000..69a18bf962 --- /dev/null +++ b/keyboards/uzu42/post_config.h @@ -0,0 +1,8 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifndef OLED_FONT_H +# define OLED_FONT_H "keyboards/uzu42/glcdfont.c" +#endif diff --git a/keyboards/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h index 815442ed21..4da4f02aa9 100644 --- a/keyboards/uzu42/rev1/config.h +++ b/keyboards/uzu42/rev1/config.h @@ -54,10 +54,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#ifdef RGBLIGHT_ENABLE -# define RGBLED_NUM 54 // Number of LEDs -# define RGBLED_SPLIT { 27, 27 } -#endif +#define RGBLED_NUM 54 // Number of LEDs +#define RGBLED_SPLIT { 27, 27 } + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 /* * Feature disable options diff --git a/keyboards/uzu42/rev1/rev1.c b/keyboards/uzu42/rev1/rev1.c index 0bfac6bd93..e22860d04b 100644 --- a/keyboards/uzu42/rev1/rev1.c +++ b/keyboards/uzu42/rev1/rev1.c @@ -1,2 +1,4 @@ -#include "uzu42.h" +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#include "uzu42.h" diff --git a/keyboards/uzu42/rev1/rev1.h b/keyboards/uzu42/rev1/rev1.h index 7b9c7d5991..e4aba8b79b 100644 --- a/keyboards/uzu42/rev1/rev1.h +++ b/keyboards/uzu42/rev1/rev1.h @@ -1,22 +1,12 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once -#include "../uzu42.h" +#include "uzu42.h" #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include <stddef.h> -#ifdef __AVR__ - #include <avr/io.h> - #include <avr/interrupt.h> -#endif -#endif - #define LAYOUT( \ L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ @@ -33,4 +23,3 @@ { R24, R23, R22, R21, R20 }, \ { R35, R34, R33, R32, R31, R30 } \ } - diff --git a/keyboards/uzu42/rev1/serial_config.h b/keyboards/uzu42/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddf..0000000000 --- a/keyboards/uzu42/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/uzu42/rev1/serial_config_simpleapi.h b/keyboards/uzu42/rev1/serial_config_simpleapi.h deleted file mode 100644 index 0e1dd9e4ac..0000000000 --- a/keyboards/uzu42/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/uzu42/uzu42.c b/keyboards/uzu42/uzu42.c index df71734f7b..6a47ceac38 100644 --- a/keyboards/uzu42/uzu42.c +++ b/keyboards/uzu42/uzu42.c @@ -1 +1,105 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #include "uzu42.h" + +#ifdef OLED_ENABLE +#include <stdio.h> + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + if (!is_keyboard_master()) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("Default"), false); + break; + case 1: + oled_write_ln_P(PSTR("Lower"), false); + break; + case 2: + oled_write_ln_P(PSTR("Raise"), false); + break; + case 3: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + + } +} + +char keylog_str[24] = {}; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, keycode, name); +} + +void oled_render_keylog(void) { + oled_write(keylog_str, false); +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo(void) { + static const char PROGMEM crkbd_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + oled_write_P(crkbd_logo, false); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return true; + } + if (is_keyboard_master()) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + oled_render_logo(); + } + return false; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + return process_record_user(keycode, record); +} + +#endif // OLED_ENABLE diff --git a/keyboards/uzu42/uzu42.h b/keyboards/uzu42/uzu42.h index dd944e3750..c23baac333 100644 --- a/keyboards/uzu42/uzu42.h +++ b/keyboards/uzu42/uzu42.h @@ -1,3 +1,6 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #ifdef KEYBOARD_uzu42_rev1 diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index a076789f2c..7513eed22d 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c index 82a7e52808..8927a8ee0a 100644 --- a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c +++ b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c @@ -104,7 +104,7 @@ void rgbflag(uint8_t r, uint8_t g, uint8_t b) { } void set_state_leds(void) { - switch (biton32(layer_state)) { + switch (get_highest_layer(layer_state)) { case _MOVE: rgbflag(C_BLU); break; @@ -192,4 +192,3 @@ void suspend_wakeup_init_user(void) backlight_set(backlight_config.level); rgblight_set(); } - diff --git a/keyboards/vagrant_10/config.h b/keyboards/vagrant_10/config.h index 18f8e52dd9..1f3b433878 100755 --- a/keyboards/vagrant_10/config.h +++ b/keyboards/vagrant_10/config.h @@ -33,7 +33,6 @@ SOFTWARE. /* key matrix pins */ #define MATRIX_ROW_PINS { F7, B1, B3, B2 } #define MATRIX_COL_PINS { F4, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/viktus/at101_bh/config.h b/keyboards/viktus/at101_bh/config.h index 0f93d225a6..9842d0ca6c 100644 --- a/keyboards/viktus/at101_bh/config.h +++ b/keyboards/viktus/at101_bh/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F0, F1, F4, D4, F6, F5, F7, B6, B5, D5, C7, C6 } #define MATRIX_COL_PINS { D1, D0, B7, B3, B2, B1, B0, E6, D2, D3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/viktus/omnikey_bh/config.h b/keyboards/viktus/omnikey_bh/config.h index 456cd33f1d..ab2e130da8 100644 --- a/keyboards/viktus/omnikey_bh/config.h +++ b/keyboards/viktus/omnikey_bh/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D4 } #define MATRIX_COL_PINS { C2, C3, C4, C7, C1, C0, E1, E0, D7, F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1, B2, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/viktus/smolka/config.h b/keyboards/viktus/smolka/config.h index 5d1a15c5f5..fe081689b3 100644 --- a/keyboards/viktus/smolka/config.h +++ b/keyboards/viktus/smolka/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7, C7, C6 } #define MATRIX_COL_PINS { D6, D7, B4, B5, B6, D4, B1, B2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/viktus/styrka/config.h b/keyboards/viktus/styrka/config.h index a48422a577..118dafb1f7 100644 --- a/keyboards/viktus/styrka/config.h +++ b/keyboards/viktus/styrka/config.h @@ -41,7 +41,6 @@ EncA (B6) because it is not used in the default PCB All Extra pins (A8, B15, B14, B13, B3, B5, B8, B9) , for the same reason; B0, which is unconnected on the PCB */ -//#define UNUSED_PINS { B0, B6, B13, B14, B15, B8, B9, B5, B3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/viktus/z150_bh/config.h b/keyboards/viktus/z150_bh/config.h index 4b9626bc8c..813079bd9f 100644 --- a/keyboards/viktus/z150_bh/config.h +++ b/keyboards/viktus/z150_bh/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C3, C2, C1, C0, E1 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D7, E0, C7, C6, C5, C4, F0, F1, F2, F3, F4, F5, F6, F7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h index e0caba7bf4..965f9d1893 100644 --- a/keyboards/waldo/config.h +++ b/keyboards/waldo/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } #define MATRIX_COL_PINS { F7, D5, D3, D2, B3, B2, C7, C6, B6, B5, B4, D7, D6, D4, B1 } -#define UNUSED_PINS #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/walletburner/cajal/config.h b/keyboards/walletburner/cajal/config.h index db2e459d08..a162ff514c 100644 --- a/keyboards/walletburner/cajal/config.h +++ b/keyboards/walletburner/cajal/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, D5, C7, C6 } #define MATRIX_COL_PINS { F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2, D3, B4, F6 } -#define UNUSED_PINS #define ENCODERS_PAD_A { D6 } #define ENCODERS_PAD_B { D7 } diff --git a/keyboards/walletburner/neuron/config.h b/keyboards/walletburner/neuron/config.h index a2ccf3590e..a28b7c51c9 100644 --- a/keyboards/walletburner/neuron/config.h +++ b/keyboards/walletburner/neuron/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D3, F5 } #define MATRIX_COL_PINS { F0, F7, F6, F4, F1, E6, D6, D2, B4, D7, B6, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wavtype/foundation/config.h b/keyboards/wavtype/foundation/config.h index 6b997ddb8f..ac7a26de9e 100644 --- a/keyboards/wavtype/foundation/config.h +++ b/keyboards/wavtype/foundation/config.h @@ -21,7 +21,6 @@ */ #define MATRIX_ROW_PINS { B3, B2, B1, F0, F1 } #define MATRIX_COL_PINS { F4, F5, F6, F7, D2, D1, D0, D3, D5, D4, B7, D6, D7, B4, B5, B6, C6, C7 } -#define UNUSED_PINS { E6 } /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wavtype/p01_ultra/config.h b/keyboards/wavtype/p01_ultra/config.h index 8d41112e1b..19eaa6f52d 100644 --- a/keyboards/wavtype/p01_ultra/config.h +++ b/keyboards/wavtype/p01_ultra/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B4, D7, D6, B5, B6, D4 } #define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, B3, B2, B1, B0, B7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/weirdo/tiger910/config.h b/keyboards/weirdo/tiger910/config.h index baac392a40..44b1ef434f 100644 --- a/keyboards/weirdo/tiger910/config.h +++ b/keyboards/weirdo/tiger910/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } #define MATRIX_COL_PINS { B5, B6, B7, C0, C1, C2, C3, C4, C5, C6, C7, D0, D1, D2, D3, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wekey/polaris/config.h b/keyboards/wekey/polaris/config.h index 7df6be2684..03e179bb32 100644 --- a/keyboards/wekey/polaris/config.h +++ b/keyboards/wekey/polaris/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F1, F0, B7, F7, D5, C6, C7, F5, F6 } #define MATRIX_COL_PINS { E6, B4, B5, B6, D0, D1, D2, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wekey/we27/config.h b/keyboards/wekey/we27/config.h index 9d7c298863..a02bc1661a 100644 --- a/keyboards/wekey/we27/config.h +++ b/keyboards/wekey/we27/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F1, D7, B4, B5, B6, F6 } #define MATRIX_COL_PINS { F4, F5, C7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index e21556b8be..a10c05a926 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} #define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index 491ab6ad8b..2f12af61a6 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, D7, B4, F0 } #define MATRIX_COL_PINS { D3, D2, D5, D6, B6, B1, B2, B3, C6, C7, F7, F6, F4, F5, F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/westfoxtrot/cypher/rev1/config.h b/keyboards/westfoxtrot/cypher/rev1/config.h index 5c3baeab7f..efb79c1e54 100644 --- a/keyboards/westfoxtrot/cypher/rev1/config.h +++ b/keyboards/westfoxtrot/cypher/rev1/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F6, B6, B7, C6, C7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, E6, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/westfoxtrot/cypher/rev5/config.h b/keyboards/westfoxtrot/cypher/rev5/config.h index cbceb15e26..5041802a23 100644 --- a/keyboards/westfoxtrot/cypher/rev5/config.h +++ b/keyboards/westfoxtrot/cypher/rev5/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, F1, F5, F6, F7, D1, F4, D4, C6, C7 } #define MATRIX_COL_PINS { D6, D7, B4, B5, B6, B7, B3, B2, B1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/westfoxtrot/prophet/config.h b/keyboards/westfoxtrot/prophet/config.h index d729b1097e..1e5e7859ba 100644 --- a/keyboards/westfoxtrot/prophet/config.h +++ b/keyboards/westfoxtrot/prophet/config.h @@ -11,7 +11,6 @@ */ #define MATRIX_ROW_PINS { C13, B2, B1, A4, A3 } #define MATRIX_COL_PINS { A6, A7, B0, A9, A8, A14, A15, B3, B4, B5, B8, B7, B6, B9 } -#define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_kara/config.h b/keyboards/wilba_tech/rama_works_kara/config.h index 2b062912a6..3ce58330ed 100644 --- a/keyboards/wilba_tech/rama_works_kara/config.h +++ b/keyboards/wilba_tech/rama_works_kara/config.h @@ -24,7 +24,6 @@ // M60-A PCB default pin-out #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index 71b0042563..8a02f0bd98 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -24,7 +24,6 @@ // KOYU PCB pin-out #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index 182c20a97e..d7fe10a965 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m10_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h index af1b114932..d42c329b96 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/config.h +++ b/keyboards/wilba_tech/rama_works_m10_c/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h index 7df563cd09..fb6ffd8aba 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/config.h +++ b/keyboards/wilba_tech/rama_works_m50_a/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F5, F6 } #define MATRIX_COL_PINS { F4, B5, C7, C6, B6, B2, B3, B1, B4, D7, D6, D4, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m50_ax/config.h b/keyboards/wilba_tech/rama_works_m50_ax/config.h index d01c35bab8..6910e7a7b0 100644 --- a/keyboards/wilba_tech/rama_works_m50_ax/config.h +++ b/keyboards/wilba_tech/rama_works_m50_ax/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F5, F6 } #define MATRIX_COL_PINS { F4, B5, C7, C6, B6, B2, B3, B1, B4, D7, D6, D4, D3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index e64de23412..55fa484716 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h @@ -24,7 +24,6 @@ // M60-A PCB default pin-out #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/wilba_tech/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h index 805bf3551e..c753a93841 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/config.h +++ b/keyboards/wilba_tech/rama_works_m65_b/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h index 7aa08490a9..f0eb52940c 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/config.h +++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m6_a/config.h b/keyboards/wilba_tech/rama_works_m6_a/config.h index 3cb0222b92..d77613628e 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/config.h +++ b/keyboards/wilba_tech/rama_works_m6_a/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h index 0cdbceb124..d6978c8a16 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/config.h +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 756d43231b..44582ada4f 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index d150fba600..8bd0e08508 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt60_b/config.h b/keyboards/wilba_tech/wt60_b/config.h index e853ea6cac..a68cfa5ec2 100644 --- a/keyboards/wilba_tech/wt60_b/config.h +++ b/keyboards/wilba_tech/wt60_b/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_bx/config.h b/keyboards/wilba_tech/wt60_bx/config.h index b528a2d9fb..cab8276545 100644 --- a/keyboards/wilba_tech/wt60_bx/config.h +++ b/keyboards/wilba_tech/wt60_bx/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_c/config.h b/keyboards/wilba_tech/wt60_c/config.h index f90acc71ad..47636eef4b 100644 --- a/keyboards/wilba_tech/wt60_c/config.h +++ b/keyboards/wilba_tech/wt60_c/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_d/config.h b/keyboards/wilba_tech/wt60_d/config.h index 322357af84..0286015ca0 100644 --- a/keyboards/wilba_tech/wt60_d/config.h +++ b/keyboards/wilba_tech/wt60_d/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { E6, F0, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, D3, D2, B7, B0, B3, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_g/config.h b/keyboards/wilba_tech/wt60_g/config.h index 173255ebff..d0087e9d88 100644 --- a/keyboards/wilba_tech/wt60_g/config.h +++ b/keyboards/wilba_tech/wt60_g/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_g2/config.h b/keyboards/wilba_tech/wt60_g2/config.h index 4bd0d789ed..f28767c441 100644 --- a/keyboards/wilba_tech/wt60_g2/config.h +++ b/keyboards/wilba_tech/wt60_g2/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_h1/config.h b/keyboards/wilba_tech/wt60_h1/config.h index 173255ebff..d0087e9d88 100644 --- a/keyboards/wilba_tech/wt60_h1/config.h +++ b/keyboards/wilba_tech/wt60_h1/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_h2/config.h b/keyboards/wilba_tech/wt60_h2/config.h index 173255ebff..d0087e9d88 100644 --- a/keyboards/wilba_tech/wt60_h2/config.h +++ b/keyboards/wilba_tech/wt60_h2/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_h3/config.h b/keyboards/wilba_tech/wt60_h3/config.h index 173255ebff..d0087e9d88 100644 --- a/keyboards/wilba_tech/wt60_h3/config.h +++ b/keyboards/wilba_tech/wt60_h3/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt60_xt/config.h b/keyboards/wilba_tech/wt60_xt/config.h index 0400af125d..df174cddd1 100644 --- a/keyboards/wilba_tech/wt60_xt/config.h +++ b/keyboards/wilba_tech/wt60_xt/config.h @@ -37,7 +37,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 37f9db0854..5a03ec52c1 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 2193af9b00..426a0b824b 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt65_d/config.h b/keyboards/wilba_tech/wt65_d/config.h index bb707aa191..f0cf1acd52 100644 --- a/keyboards/wilba_tech/wt65_d/config.h +++ b/keyboards/wilba_tech/wt65_d/config.h @@ -11,7 +11,6 @@ // Keyboard Matrix Assignments #define MATRIX_ROW_PINS { E6, F0, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, D3, D2, B7, B0, B3, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW // Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed diff --git a/keyboards/wilba_tech/wt65_f/config.h b/keyboards/wilba_tech/wt65_f/config.h index a3de9e2eab..0380f44d28 100644 --- a/keyboards/wilba_tech/wt65_f/config.h +++ b/keyboards/wilba_tech/wt65_f/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_fx/config.h b/keyboards/wilba_tech/wt65_fx/config.h index a3de9e2eab..0380f44d28 100644 --- a/keyboards/wilba_tech/wt65_fx/config.h +++ b/keyboards/wilba_tech/wt65_fx/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_g/config.h b/keyboards/wilba_tech/wt65_g/config.h index 3955d5b10c..b0f9fc2b54 100644 --- a/keyboards/wilba_tech/wt65_g/config.h +++ b/keyboards/wilba_tech/wt65_g/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_g2/config.h b/keyboards/wilba_tech/wt65_g2/config.h index 3955d5b10c..b0f9fc2b54 100644 --- a/keyboards/wilba_tech/wt65_g2/config.h +++ b/keyboards/wilba_tech/wt65_g2/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_h1/config.h b/keyboards/wilba_tech/wt65_h1/config.h index 3955d5b10c..b0f9fc2b54 100644 --- a/keyboards/wilba_tech/wt65_h1/config.h +++ b/keyboards/wilba_tech/wt65_h1/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_xt/config.h b/keyboards/wilba_tech/wt65_xt/config.h index c4ca70cddf..9cf5524d75 100644 --- a/keyboards/wilba_tech/wt65_xt/config.h +++ b/keyboards/wilba_tech/wt65_xt/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt65_xtx/config.h b/keyboards/wilba_tech/wt65_xtx/config.h index f48762e386..612b273b95 100644 --- a/keyboards/wilba_tech/wt65_xtx/config.h +++ b/keyboards/wilba_tech/wt65_xtx/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 7d3ddfd32f..ff67b45038 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt70_jb/config.h b/keyboards/wilba_tech/wt70_jb/config.h index b321563317..fbcfdc77ba 100644 --- a/keyboards/wilba_tech/wt70_jb/config.h +++ b/keyboards/wilba_tech/wt70_jb/config.h @@ -33,7 +33,6 @@ */ #define MATRIX_ROW_PINS { E6, F0, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, D3, D2, D1, D0, B7, C7, C6, B6, B5, B4, D7, D6, D4, B0, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index b25b50212a..415774aa17 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index 50696248e3..d7abac199e 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B7, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B2, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index ff241d88a8..8562e8e18a 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B7, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 4351e22597..f9708ab33b 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/wilba_tech/wt80_bc/config.h b/keyboards/wilba_tech/wt80_bc/config.h index 4880c8a609..b82cbda0d0 100644 --- a/keyboards/wilba_tech/wt80_bc/config.h +++ b/keyboards/wilba_tech/wt80_bc/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt80_g/config.h b/keyboards/wilba_tech/wt80_g/config.h index 4880c8a609..b82cbda0d0 100644 --- a/keyboards/wilba_tech/wt80_g/config.h +++ b/keyboards/wilba_tech/wt80_g/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index cf674e1a2c..4e7f58bd77 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { E6 } #define MATRIX_COL_PINS { F4, F1, B2, B6, F6, F7, D5, B4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index f6cbbb6a52..b3c0477342 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -24,7 +24,6 @@ // Zeal60 PCB default pin-out #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index 6bcc0bb145..27f4fd4b44 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -24,7 +24,6 @@ // Zeal60 PCB default pin-out #define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 72477e92d9..71c86f0534 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/winkeys/mini_winni/config.h b/keyboards/winkeys/mini_winni/config.h index b3cdc7d58c..7f8a0d6b4c 100644 --- a/keyboards/winkeys/mini_winni/config.h +++ b/keyboards/winkeys/mini_winni/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define DIRECT_PINS { { F4, F5, B4, D7 }, { F6, F7, B6, B5 } } -#define UNUSED_PINS /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/wolf/kuku65/config.h b/keyboards/wolf/kuku65/config.h index e1cd340bd8..3bca2424b9 100644 --- a/keyboards/wolf/kuku65/config.h +++ b/keyboards/wolf/kuku65/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { B3, B2, B1, B0, B7 } #define MATRIX_COL_PINS { D0, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wolf/ryujin/config.h b/keyboards/wolf/ryujin/config.h index 01b8e33009..40ca7cb746 100644 --- a/keyboards/wolf/ryujin/config.h +++ b/keyboards/wolf/ryujin/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D5, D3, D2, D1, D0 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wolf/sabre/config.h b/keyboards/wolf/sabre/config.h index fc46723a06..57319a134d 100644 --- a/keyboards/wolf/sabre/config.h +++ b/keyboards/wolf/sabre/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D0, D1, F1, F0, B5, B6, C7, C6, F6, F7, F4, F5 } #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B2, B1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wolf/ts60/config.h b/keyboards/wolf/ts60/config.h index 6a4ee8e82e..b4d4459bda 100644 --- a/keyboards/wolf/ts60/config.h +++ b/keyboards/wolf/ts60/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Checked with Eagle Schematic #define MATRIX_ROW_PINS { D2, D3, D6, D4, F6, F7, F5, F0, F4, F1 } #define MATRIX_COL_PINS { D1, D5, C7, C6, B6, B5, B4, D7} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/woodkeys/bigseries/1key/config.h b/keyboards/woodkeys/bigseries/1key/config.h index 4effa8de4e..edb6b318b6 100755 --- a/keyboards/woodkeys/bigseries/1key/config.h +++ b/keyboards/woodkeys/bigseries/1key/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0 } #define MATRIX_COL_PINS { B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/woodkeys/bigseries/1key/keymaps/dudeofawesome/config.h b/keyboards/woodkeys/bigseries/1key/keymaps/dudeofawesome/config.h index 30b86224c6..131c755d4a 100644 --- a/keyboards/woodkeys/bigseries/1key/keymaps/dudeofawesome/config.h +++ b/keyboards/woodkeys/bigseries/1key/keymaps/dudeofawesome/config.h @@ -19,5 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define CONFIG_USER_H #define TAPPING_TERM 1000 +#define PERMISSIVE_HOLD #endif diff --git a/keyboards/woodkeys/bigseries/2key/config.h b/keyboards/woodkeys/bigseries/2key/config.h index 35be87ca2c..6cbad09abf 100755 --- a/keyboards/woodkeys/bigseries/2key/config.h +++ b/keyboards/woodkeys/bigseries/2key/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0 } #define MATRIX_COL_PINS { B4, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/woodkeys/bigseries/3key/config.h b/keyboards/woodkeys/bigseries/3key/config.h index a21cd53189..b6d6997a96 100755 --- a/keyboards/woodkeys/bigseries/3key/config.h +++ b/keyboards/woodkeys/bigseries/3key/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0 } #define MATRIX_COL_PINS { B4, B3, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/woodkeys/bigseries/4key/config.h b/keyboards/woodkeys/bigseries/4key/config.h index f657c86901..fa8ff3ff4a 100755 --- a/keyboards/woodkeys/bigseries/4key/config.h +++ b/keyboards/woodkeys/bigseries/4key/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B5 } #define MATRIX_COL_PINS { B4, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/woodkeys/meira/featherble/config.h b/keyboards/woodkeys/meira/featherble/config.h index 44f294a06a..fea16a1308 100644 --- a/keyboards/woodkeys/meira/featherble/config.h +++ b/keyboards/woodkeys/meira/featherble/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { C7, B7, B6, C6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define MATRIX_COL_PINS_SCANNED { C7, B7, B6, C6 } #define LED_EN_PIN D2 -#define UNUSED_PINS #define QMK_SPEAKER B5 #define AUDIO_PIN B5 diff --git a/keyboards/woodkeys/meira/promicro/config.h b/keyboards/woodkeys/meira/promicro/config.h index 1b9b099d1a..c6d79acccc 100644 --- a/keyboards/woodkeys/meira/promicro/config.h +++ b/keyboards/woodkeys/meira/promicro/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS_SCANNED { B1, B3, B2, B6 } #define LED_EN_PIN D2 -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index a2ad6030c8..6d06b88303 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS \ { F5, NO_PIN } #define MATRIX_COL_PINS { B3, B2, B1, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index a7f5e165b1..f6a76fd88c 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F0, F1, F4, F5 } #define MATRIX_COL_PINS \ { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, E6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/work_louder/work_board/keymaps/default/keymap.c b/keyboards/work_louder/work_board/keymaps/default/keymap.c index 59bb437d9d..cae65ff5c2 100644 --- a/keyboards/work_louder/work_board/keymaps/default/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/default/keymap.c @@ -144,9 +144,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( - _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/wren/config.h b/keyboards/wren/config.h index 57d481be50..119233ad9f 100644 --- a/keyboards/wren/config.h +++ b/keyboards/wren/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D3, D2, C6, D4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D7, F0 } -#define UNUSED_PINS // define encoders #define ENCODERS_PAD_A \ diff --git a/keyboards/wsk/alpha9/config.h b/keyboards/wsk/alpha9/config.h index 9ebb234264..8957b1e6b3 100644 --- a/keyboards/wsk/alpha9/config.h +++ b/keyboards/wsk/alpha9/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, B4, B5 } #define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5, D1, D0, D2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/g4m3ralpha/config.h b/keyboards/wsk/g4m3ralpha/config.h index 5dd30538fc..993ddde53d 100644 --- a/keyboards/wsk/g4m3ralpha/config.h +++ b/keyboards/wsk/g4m3ralpha/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D4, B4, B5, D1 } #define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/gothic50/config.h b/keyboards/wsk/gothic50/config.h index 6ecd9189bc..61d2c33f79 100644 --- a/keyboards/wsk/gothic50/config.h +++ b/keyboards/wsk/gothic50/config.h @@ -10,7 +10,6 @@ #define MATRIX_ROW_PINS { B5, B4, D7, D6 } #define MATRIX_COL_PINS { E6, F0, F1, C7, C6, B6, D4, D5, D3, D2, D1, D0, B7, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/gothic70/config.h b/keyboards/wsk/gothic70/config.h index da99ac4ae2..fec6e57d03 100644 --- a/keyboards/wsk/gothic70/config.h +++ b/keyboards/wsk/gothic70/config.h @@ -10,7 +10,6 @@ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/houndstooth/config.h b/keyboards/wsk/houndstooth/config.h index 6713d2ab10..5935d38845 100644 --- a/keyboards/wsk/houndstooth/config.h +++ b/keyboards/wsk/houndstooth/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { C6, F7, D7, B1, B4, B2, B5, B6 } #define MATRIX_COL_PINS { D1, F4, D0, F5, D4, F6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/jerkin/config.h b/keyboards/wsk/jerkin/config.h index 972b135cf2..52f5f57dd2 100644 --- a/keyboards/wsk/jerkin/config.h +++ b/keyboards/wsk/jerkin/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, B4, B5 } #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, B1, F7, F6, F5, F4, E6, D7 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/kodachi50/config.h b/keyboards/wsk/kodachi50/config.h index 5b93bd11e1..c67c3424f9 100644 --- a/keyboards/wsk/kodachi50/config.h +++ b/keyboards/wsk/kodachi50/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, B5, B6, B2, B3, B1, F7, F6 } #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/pain27/config.h b/keyboards/wsk/pain27/config.h index 065eae17d8..be0f58a7dc 100644 --- a/keyboards/wsk/pain27/config.h +++ b/keyboards/wsk/pain27/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, D0 } #define MATRIX_COL_PINS { D2, B3, F6, B1, B2, B6, D4, C6, D7, E6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/sl40/config.h b/keyboards/wsk/sl40/config.h index 7cc2cb566d..6377ebb3f7 100644 --- a/keyboards/wsk/sl40/config.h +++ b/keyboards/wsk/sl40/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F4, F5, D2, D0 } #define MATRIX_COL_PINS { D3, D1, F6, F7, B6, B2, B3, B1, D4, C6, D7, E6, B4, B5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/wsk/tkl30/config.h b/keyboards/wsk/tkl30/config.h index c36e2ac105..e75b49ce4d 100644 --- a/keyboards/wsk/tkl30/config.h +++ b/keyboards/wsk/tkl30/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D2, B5, F4 } #define MATRIX_COL_PINS { D3, D1, D0, D4, F7, C6, B1, D7, B3, E6, B2, B4, B6, F6, E5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/x16/config.h b/keyboards/x16/config.h index c46a035718..d1545ced61 100644 --- a/keyboards/x16/config.h +++ b/keyboards/x16/config.h @@ -34,7 +34,6 @@ */ #define MATRIX_ROW_PINS { E6, F7, D6, B6 } #define MATRIX_COL_PINS { C7, C6, B4, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/akis/config.h b/keyboards/xelus/akis/config.h index 8432076307..9a1eddcd28 100644 --- a/keyboards/xelus/akis/config.h +++ b/keyboards/xelus/akis/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { F5, F4, F1, F0, E6 } #define MATRIX_COL_PINS { B4, D7, D6, D4, D5, D3, D2, D1, D0, F6, F7, C7, C6, B6, B5 } -#define UNUSED_PINS /* RGB Lighting */ #define RGB_DI_PIN B0 diff --git a/keyboards/xelus/dawn60/rev1/config.h b/keyboards/xelus/dawn60/rev1/config.h index 52dab44f48..1db0af867e 100644 --- a/keyboards/xelus/dawn60/rev1/config.h +++ b/keyboards/xelus/dawn60/rev1/config.h @@ -30,12 +30,10 @@ //no underglow - prototype //#define MATRIX_ROW_PINS { B1, B3, B7, F6, F7 } //#define MATRIX_COL_PINS { B0, D5, B2, F5, D2, D3, D4, D6, D7, B4, B5, B6, C6, C7 } -//#define UNUSED_PINS //underglow #define MATRIX_ROW_PINS { B1, B3, F1, F6, F7 } #define MATRIX_COL_PINS { B0, D5, B2, F5, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS // IS31FL3731 driver #define DRIVER_COUNT 2 diff --git a/keyboards/xelus/dawn60/rev1_qmk/config.h b/keyboards/xelus/dawn60/rev1_qmk/config.h index 67c88efb4c..08fef5d7f3 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/config.h +++ b/keyboards/xelus/dawn60/rev1_qmk/config.h @@ -31,7 +31,6 @@ //underglow #define MATRIX_ROW_PINS { B1, B3, F1, F6, F7 } #define MATRIX_COL_PINS { B0, D5, B2, F5, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/dharma/config.h b/keyboards/xelus/dharma/config.h index 7f02bf3e61..08fd8fb8f8 100644 --- a/keyboards/xelus/dharma/config.h +++ b/keyboards/xelus/dharma/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, B0 } #define MATRIX_COL_PINS { B3, B2, B1, D5, D4, E6, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/kangaroo/keymaps/default/config.h b/keyboards/xelus/kangaroo/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/kangaroo/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/kangaroo/keymaps/via/config.h b/keyboards/xelus/kangaroo/keymaps/via/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/kangaroo/keymaps/via/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/la_plus/config.h b/keyboards/xelus/la_plus/config.h index 4b4105af42..40d53adb06 100755 --- a/keyboards/xelus/la_plus/config.h +++ b/keyboards/xelus/la_plus/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, F0, F4, F5 } #define MATRIX_COL_PINS { E6, D5, B2, B3, D3, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/la_plus/keymaps/via/config.h b/keyboards/xelus/la_plus/keymaps/via/config.h index 58c086282c..43760bd281 100644 --- a/keyboards/xelus/la_plus/keymaps/via/config.h +++ b/keyboards/xelus/la_plus/keymaps/via/config.h @@ -18,5 +18,3 @@ // Enable RGB Matrix #define VIA_QMK_RGBLIGHT_ENABLE - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/mini_32u4/keymaps/default/config.h b/keyboards/xelus/pachi/mini_32u4/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/pachi/mini_32u4/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/mini_32u4/keymaps/via/config.h b/keyboards/xelus/pachi/mini_32u4/keymaps/via/config.h index fc3a2bd0b2..47bbf2bf81 100644 --- a/keyboards/xelus/pachi/mini_32u4/keymaps/via/config.h +++ b/keyboards/xelus/pachi/mini_32u4/keymaps/via/config.h @@ -18,5 +18,3 @@ // 3 layers or else it will not fit in EEPROM #define DYNAMIC_KEYMAP_LAYER_COUNT 3 - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/rev1/keymaps/default/config.h b/keyboards/xelus/pachi/rev1/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/pachi/rev1/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/rev1/keymaps/via/config.h b/keyboards/xelus/pachi/rev1/keymaps/via/config.h index fc3a2bd0b2..47bbf2bf81 100644 --- a/keyboards/xelus/pachi/rev1/keymaps/via/config.h +++ b/keyboards/xelus/pachi/rev1/keymaps/via/config.h @@ -18,5 +18,3 @@ // 3 layers or else it will not fit in EEPROM #define DYNAMIC_KEYMAP_LAYER_COUNT 3 - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/rgb/keymaps/default/config.h b/keyboards/xelus/pachi/rgb/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/pachi/rgb/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/rgb/keymaps/via/config.h b/keyboards/xelus/pachi/rgb/keymaps/via/config.h index 1213e7a8f2..0e34ad2c1a 100644 --- a/keyboards/xelus/pachi/rgb/keymaps/via/config.h +++ b/keyboards/xelus/pachi/rgb/keymaps/via/config.h @@ -21,5 +21,3 @@ // Enable RGB Matrix #define VIA_QMK_RGBLIGHT_ENABLE - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h index 6f4dfa24d1..9eda99ed32 100644 --- a/keyboards/xelus/pachi/rgb/rev1/config.h +++ b/keyboards/xelus/pachi/rgb/rev1/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B14, B13, B12, B2, A8, B15 } #define MATRIX_COL_PINS { C13, C14, C15, H0, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, H1, B10, B11 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h index b5c85deb78..6295228c31 100644 --- a/keyboards/xelus/pachi/rgb/rev2/config.h +++ b/keyboards/xelus/pachi/rgb/rev2/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { A5, A6, B0, A7, A8, B1, B4, B5, A15, B3, A13, A14 } #define MATRIX_COL_PINS { C14, C15, A0, A1, A2, A3, A4, A10, A9} -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/rs108/config.h b/keyboards/xelus/rs108/config.h index 4cc11eb20b..990c0aca55 100644 --- a/keyboards/xelus/rs108/config.h +++ b/keyboards/xelus/rs108/config.h @@ -21,7 +21,6 @@ #define MATRIX_ROW_PINS { B5, B6, B7, A1, A0, C13, B0, A7, A5, A4, A3, A2 } #define MATRIX_COL_PINS { A10, A8, B15, B14, B13, B12, B1, B10, B4, B3, A15 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/rs60/keymaps/default/config.h b/keyboards/xelus/rs60/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/rs60/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/rs60/keymaps/via/config.h b/keyboards/xelus/rs60/keymaps/via/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/rs60/keymaps/via/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/rs60/rev1/config.h b/keyboards/xelus/rs60/rev1/config.h index ce0c2e1d02..23372d72eb 100644 --- a/keyboards/xelus/rs60/rev1/config.h +++ b/keyboards/xelus/rs60/rev1/config.h @@ -28,7 +28,6 @@ #define MATRIX_ROW_PINS { B3, B7, F0, F4, F1 } #define MATRIX_COL_PINS { E6, D5, D3, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4} -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/rs60/rev2/config.h b/keyboards/xelus/rs60/rev2/config.h index 74258b1289..65ac383189 100644 --- a/keyboards/xelus/rs60/rev2/config.h +++ b/keyboards/xelus/rs60/rev2/config.h @@ -28,7 +28,6 @@ #define MATRIX_ROW_PINS { B15, B14, B12, B1, B0 } #define MATRIX_COL_PINS { B13, A7, A6, A5, A4, A3, A2, B7, B6, B5, B4, B3, A15, A14 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/snap96/config.h b/keyboards/xelus/snap96/config.h index 736cbe81ed..a42ecb1931 100644 --- a/keyboards/xelus/snap96/config.h +++ b/keyboards/xelus/snap96/config.h @@ -9,7 +9,6 @@ // key matrix pins #define MATRIX_ROW_PINS { B2, B1, B0, C7, F6, F7, B3, D1, D2, D7, B6, C6 } #define MATRIX_COL_PINS { E6, D5, B7, D0, F5, D3, B4, B5, D4, D6 } -#define UNUSED_PINS // COL2ROW or ROW2COL #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/valor/rev1/config.h b/keyboards/xelus/valor/rev1/config.h index a61645d74c..96e4835996 100644 --- a/keyboards/xelus/valor/rev1/config.h +++ b/keyboards/xelus/valor/rev1/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B1, B2, C7, C6, B6 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B4, D7, D6, D4, D5, D3, D2 } -#define UNUSED_PINS /* RGB Underglow */ #define RGB_DI_PIN B0 diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h index edc1be8d6d..44a16e9b7e 100644 --- a/keyboards/xelus/valor/rev2/config.h +++ b/keyboards/xelus/valor/rev2/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B11, B10, A3, A1, A2 } #define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, A13, B7, B6, B5, B4, B3, A15, A14 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/valor/rev2/keymaps/default/config.h b/keyboards/xelus/valor/rev2/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/valor/rev2/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/valor/rev2/keymaps/via/config.h b/keyboards/xelus/valor/rev2/keymaps/via/config.h index 490964f272..e7fb31cb23 100644 --- a/keyboards/xelus/valor/rev2/keymaps/via/config.h +++ b/keyboards/xelus/valor/rev2/keymaps/via/config.h @@ -20,5 +20,3 @@ // More layers #define DYNAMIC_KEYMAP_LAYER_COUNT 8 - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/valor_frl_tkl/config.h b/keyboards/xelus/valor_frl_tkl/config.h index 253ff17687..46c598c637 100644 --- a/keyboards/xelus/valor_frl_tkl/config.h +++ b/keyboards/xelus/valor_frl_tkl/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { A15, A14, A1, B3, B4 } #define MATRIX_COL_PINS { A9, A8, B15, B14, B13, B12, A0, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/valor_frl_tkl/keymaps/default/config.h b/keyboards/xelus/valor_frl_tkl/keymaps/default/config.h deleted file mode 100644 index 7b8de5510e..0000000000 --- a/keyboards/xelus/valor_frl_tkl/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2020 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/valor_frl_tkl/keymaps/via/config.h b/keyboards/xelus/valor_frl_tkl/keymaps/via/config.h deleted file mode 100644 index 7b8de5510e..0000000000 --- a/keyboards/xelus/valor_frl_tkl/keymaps/via/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2020 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/xs60/config.h b/keyboards/xelus/xs60/config.h index 097a833e98..a61cd22e53 100644 --- a/keyboards/xelus/xs60/config.h +++ b/keyboards/xelus/xs60/config.h @@ -23,7 +23,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B4, B3, A15, A14, A7 } #define MATRIX_COL_PINS { B0, B1, A8, A9, B5, A6, C14, C15, A0, A5, A4, A3, A2, A1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xelus/xs60/keymaps/default/config.h b/keyboards/xelus/xs60/keymaps/default/config.h deleted file mode 100644 index 5d972dd48c..0000000000 --- a/keyboards/xelus/xs60/keymaps/default/config.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2021 Harrison Chan (Xelus) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/xs60/keymaps/via/config.h b/keyboards/xelus/xs60/keymaps/via/config.h index b608adcfc4..8c0ed0c6e3 100644 --- a/keyboards/xelus/xs60/keymaps/via/config.h +++ b/keyboards/xelus/xs60/keymaps/via/config.h @@ -17,5 +17,3 @@ // More layers #define DYNAMIC_KEYMAP_LAYER_COUNT 8 - -#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xiudi/xd002/keymaps/tap_dance/config.h b/keyboards/xiudi/xd002/keymaps/tap_dance/config.h index b86e862d30..1fd93f875f 100644 --- a/keyboards/xiudi/xd002/keymaps/tap_dance/config.h +++ b/keyboards/xiudi/xd002/keymaps/tap_dance/config.h @@ -1,3 +1,4 @@ #pragma once #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD diff --git a/keyboards/xiudi/xd004/v1/config.h b/keyboards/xiudi/xd004/v1/config.h index 826540de4c..559699e159 100644 --- a/keyboards/xiudi/xd004/v1/config.h +++ b/keyboards/xiudi/xd004/v1/config.h @@ -46,7 +46,6 @@ where some things are disabled to save space as well. { \ { D3, D0, C4, B4 } \ } -#define UNUSED_PINS /* Backlight Setup */ // Looks like each backlight LED is connected to a single output, D5 is the one furtherst away from USB port diff --git a/keyboards/xiudi/xd60/keymaps/birkir/keymap.c b/keyboards/xiudi/xd60/keymaps/birkir/keymap.c index fe7cd60662..ab129332c9 100644 --- a/keyboards/xiudi/xd60/keymaps/birkir/keymap.c +++ b/keyboards/xiudi/xd60/keymaps/birkir/keymap.c @@ -47,7 +47,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { edit = false; } - switch (biton32(state)) { + switch (get_highest_layer(state)) { case 1: rgblight_mode(1); rgblight_setrgb(0xD3, 0x7F, 0xED); diff --git a/keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c b/keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c index 8e081c6731..d17fc2f35d 100644 --- a/keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c +++ b/keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Loop void matrix_scan_user(void) { static uint8_t old_layer = 255; - uint8_t new_layer = biton32(layer_state); + uint8_t new_layer = get_highest_layer(layer_state); if (old_layer != new_layer) { switch (new_layer) { diff --git a/keyboards/xiudi/xd60/rev2/config.h b/keyboards/xiudi/xd60/rev2/config.h index 38cfa415ff..d5bfc89a2d 100644 --- a/keyboards/xiudi/xd60/rev2/config.h +++ b/keyboards/xiudi/xd60/rev2/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* Backlight Setup */ #define BACKLIGHT_PIN F5 diff --git a/keyboards/xiudi/xd60/rev3/config.h b/keyboards/xiudi/xd60/rev3/config.h index 8af56851ff..189b0222b0 100644 --- a/keyboards/xiudi/xd60/rev3/config.h +++ b/keyboards/xiudi/xd60/rev3/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* Backlight Setup */ #define BACKLIGHT_PIN F5 diff --git a/keyboards/xiudi/xd68/config.h b/keyboards/xiudi/xd68/config.h index ac6989b9fe..ef3cae310b 100644 --- a/keyboards/xiudi/xd68/config.h +++ b/keyboards/xiudi/xd68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xiudi/xd75/config.h b/keyboards/xiudi/xd75/config.h index 604e9aec20..7080a2ca8b 100644 --- a/keyboards/xiudi/xd75/config.h +++ b/keyboards/xiudi/xd75/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c b/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c index 5f7337d68b..c278df1b21 100644 --- a/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c @@ -100,7 +100,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs whenever there is a layer state change. layer_state_t layer_state_set_user(layer_state_t state) { - uint8_t layer = biton32(state); + uint8_t layer = get_highest_layer(state); gp100_led_off(); gp103_led_off(); diff --git a/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c index 1b29686cff..a0295f2f45 100644 --- a/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c @@ -286,7 +286,7 @@ void matrix_init_user(void) { } layer_state_t layer_state_set_user(layer_state_t state) { - switch(biton32(state)) { + switch(get_highest_layer(state)) { case _QWERTY: rgblight_sethsv_white(); break; diff --git a/keyboards/xiudi/xd75/keymaps/kloki/keymap.c b/keyboards/xiudi/xd75/keymaps/kloki/keymap.c index a630019347..d25a16fbb6 100644 --- a/keyboards/xiudi/xd75/keymaps/kloki/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/kloki/keymap.c @@ -70,7 +70,7 @@ bool WINDOWN = false; bool SHIFTDOWN = false; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case 0: diff --git a/keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h b/keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h index 596aaff665..210c4441c3 100644 --- a/keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h +++ b/keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h @@ -24,7 +24,6 @@ //#define TAPPING_TERM 200 #define TAPPING_TOGGLE 2 //#define PERMISSIVE_HOLD -//#define QMK_KEYS_PER_SCAN 4 #define FORCE_NKRO #define MOUSEKEY_INTERVAL 16 diff --git a/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c index b7b98cd4c5..f48eb94214 100644 --- a/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c +++ b/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c @@ -180,7 +180,7 @@ void matrix_init_user(void) { //Set a color based on the layer layer_state_t layer_state_set_user(layer_state_t state) { - switch(biton32(state)) { + switch(get_highest_layer(state)) { case _LYFK: rgblight_setrgb_user_LYFK(); break; diff --git a/keyboards/xiudi/xd84/config.h b/keyboards/xiudi/xd84/config.h index 742b7fce0b..0131e0dfa3 100644 --- a/keyboards/xiudi/xd84/config.h +++ b/keyboards/xiudi/xd84/config.h @@ -34,7 +34,6 @@ */ //#define MATRIX_ROW_PINS { D0, D5 } //#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xiudi/xd84pro/config.h b/keyboards/xiudi/xd84pro/config.h index abd2e0d8f1..3c43fb79ff 100644 --- a/keyboards/xiudi/xd84pro/config.h +++ b/keyboards/xiudi/xd84pro/config.h @@ -24,7 +24,6 @@ #define MATRIX_ROW_PINS { F4, D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F7 } -#define UNUSED_PINS { B0, E2 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xiudi/xd87/config.h b/keyboards/xiudi/xd87/config.h index 52fcb09f84..c6b4a0a682 100644 --- a/keyboards/xiudi/xd87/config.h +++ b/keyboards/xiudi/xd87/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, B0, B1, C7, D3, D5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xiudi/xd96/config.h b/keyboards/xiudi/xd96/config.h index 2291ca439e..8665cc5776 100644 --- a/keyboards/xiudi/xd96/config.h +++ b/keyboards/xiudi/xd96/config.h @@ -34,7 +34,6 @@ */ //#define MATRIX_ROW_PINS { D0, D5 } //#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index 37b977a0fe..1e9f2c9398 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/xw60/config.h b/keyboards/xw60/config.h index 2277a52a4c..4dd64632f3 100644 --- a/keyboards/xw60/config.h +++ b/keyboards/xw60/config.h @@ -8,7 +8,6 @@ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yatara/drink_me/config.h b/keyboards/yatara/drink_me/config.h index 73fafe3a88..51d03c58e2 100644 --- a/keyboards/yatara/drink_me/config.h +++ b/keyboards/yatara/drink_me/config.h @@ -26,4 +26,3 @@ #define DIRECT_PINS { \ {B4, B5, B6, B7} \ } -#define UNUSED_PINS diff --git a/keyboards/ydkb/chili/config.h b/keyboards/ydkb/chili/config.h index 77eeff30ed..bb54f28e6e 100644 --- a/keyboards/ydkb/chili/config.h +++ b/keyboards/ydkb/chili/config.h @@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Column pin configuration */ #define MATRIX_COL_PINS { D4, F6, F7, C7, C6, B6, B5, B4, D7, D6 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ydkb/just60/config.h b/keyboards/ydkb/just60/config.h index fc9fa4bdc2..16b205105d 100644 --- a/keyboards/ydkb/just60/config.h +++ b/keyboards/ydkb/just60/config.h @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E2, C7, B3, B2, B1 } #define MATRIX_COL_PINS { D6, D7, B4, B6, B5, B7, F7, F6, F5, F4, F1, F0, E6, B0 } -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define QMK_ESC_OUTPUT D6 // usually COL diff --git a/keyboards/ydkb/yd68/config.h b/keyboards/ydkb/yd68/config.h index ed6681cdf6..d1bd8bb1ca 100644 --- a/keyboards/ydkb/yd68/config.h +++ b/keyboards/ydkb/yd68/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B5, C6, C7, D7, B4 } #define MATRIX_COL_PINS { B6, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3, D5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yiancardesigns/barleycorn/config.h b/keyboards/yiancardesigns/barleycorn/config.h index 4b662525ac..2780cfccda 100644 --- a/keyboards/yiancardesigns/barleycorn/config.h +++ b/keyboards/yiancardesigns/barleycorn/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { B4, B3, B2, B1, C1 } #define MATRIX_COL_PINS { B0, D7, D6, D4, D1, D0, C3, C2, D5, D5, D5, D5, D5, D5, D5, D5, D5, D5 } -#define UNUSED_PINS #define PORT_EXPANDER_ADDRESS 0x20 /* COL2ROW, ROW2COL*/ diff --git a/keyboards/yiancardesigns/gingham/config.h b/keyboards/yiancardesigns/gingham/config.h index de3bdc0320..34f8cb600e 100644 --- a/keyboards/yiancardesigns/gingham/config.h +++ b/keyboards/yiancardesigns/gingham/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { D0, C3, D1, C1, C2 } #define MATRIX_COL_PINS { D4, D4, C0, B5, D5, B4, D6, B1, B0, B2, D7, B3, D4, D4 } -#define UNUSED_PINS #define PORT_EXPANDER_ADDRESS 0x20 /* COL2ROW, ROW2COL*/ diff --git a/keyboards/yiancardesigns/seigaiha/config.h b/keyboards/yiancardesigns/seigaiha/config.h index d6b071e9b3..3a5f5fe390 100644 --- a/keyboards/yiancardesigns/seigaiha/config.h +++ b/keyboards/yiancardesigns/seigaiha/config.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* A Custom matrix.c is used to poll the port expander D5 shows that the pins are hardwired there */ #define MATRIX_ROW_PINS { C0, B4, B3, B2, B5 } #define MATRIX_COL_PINS { B0, D7, D6, D4, B1, C1, C2, D1, C3, D0, D5, D5, D5, D5, D5 } -#define UNUSED_PINS #define PORT_EXPANDER_ADDRESS 0x20 /* COL2ROW, ROW2COL*/ diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 0a4eff72b7..f43f5b5dc1 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 0 1 2 3 4 5 6 7 8 9 A B C D E #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3} #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} -#define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk/melody96/config.h b/keyboards/ymdk/melody96/config.h index b5a62453ce..627a4850eb 100644 --- a/keyboards/ymdk/melody96/config.h +++ b/keyboards/ymdk/melody96/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ymdk/wings/config.h b/keyboards/ymdk/wings/config.h index 278e8f5b8a..8c959b062e 100644 --- a/keyboards/ymdk/wings/config.h +++ b/keyboards/ymdk/wings/config.h @@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ymdk/wingshs/config.h b/keyboards/ymdk/wingshs/config.h index a85e0d7a29..d99f31a9f4 100644 --- a/keyboards/ymdk/wingshs/config.h +++ b/keyboards/ymdk/wingshs/config.h @@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ymdk/yd60mq/config.h b/keyboards/ymdk/yd60mq/config.h index df82e6e375..3aa5415bd2 100644 --- a/keyboards/ymdk/yd60mq/config.h +++ b/keyboards/ymdk/yd60mq/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk/ymd09/config.h b/keyboards/ymdk/ymd09/config.h index ab0b32fe00..383a070c54 100644 --- a/keyboards/ymdk/ymd09/config.h +++ b/keyboards/ymdk/ymd09/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F5, F4, F1 } #define MATRIX_COL_PINS { D6, D2, D1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/ymdk/ymd67/config.h b/keyboards/ymdk/ymd67/config.h index 9f282bc208..5b1aa59e27 100644 --- a/keyboards/ymdk/ymd67/config.h +++ b/keyboards/ymdk/ymd67/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yoichiro/lunakey_macro/config.h b/keyboards/yoichiro/lunakey_macro/config.h index f493155182..070327773d 100644 --- a/keyboards/yoichiro/lunakey_macro/config.h +++ b/keyboards/yoichiro/lunakey_macro/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yoichiro/lunakey_mini/config.h b/keyboards/yoichiro/lunakey_mini/config.h index 54cab3a657..85217bdb2b 100644 --- a/keyboards/yoichiro/lunakey_mini/config.h +++ b/keyboards/yoichiro/lunakey_mini/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yosino58/.noci b/keyboards/yosino58/.noci deleted file mode 100644 index e69de29bb2..0000000000 --- a/keyboards/yosino58/.noci +++ /dev/null diff --git a/keyboards/yosino58/config.h b/keyboards/yosino58/config.h deleted file mode 100644 index 24831ee5b2..0000000000 --- a/keyboards/yosino58/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" -#include "serial_config.h" - -#define USE_I2C -#define USE_SERIAL diff --git a/keyboards/yosino58/i2c.c b/keyboards/yosino58/i2c.c deleted file mode 100644 index 4bee5c6398..0000000000 --- a/keyboards/yosino58/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} -#endif diff --git a/keyboards/yosino58/i2c.h b/keyboards/yosino58/i2c.h deleted file mode 100644 index 710662c7ab..0000000000 --- a/keyboards/yosino58/i2c.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/yosino58/keymaps/default/config.h b/keyboards/yosino58/keymaps/default/config.h index 21fc2d3b54..aa3caa3d06 100644 --- a/keyboards/yosino58/keymaps/default/config.h +++ b/keyboards/yosino58/keymaps/default/config.h @@ -20,17 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_MATRIX_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -// #define SSD1306_128X64 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -40,4 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17
\ No newline at end of file +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c index 3200d14708..00a6c8e83f 100644 --- a/keyboards/yosino58/keymaps/default/keymap.c +++ b/keyboards/yosino58/keymaps/default/keymap.c @@ -1,20 +1,10 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; #endif -extern uint8_t is_master; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -25,8 +15,7 @@ extern uint8_t is_master; #define _ADJUST 3 enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, ADJUST, RGBRST @@ -126,11 +115,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { int RGB_current_mode; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { @@ -144,18 +128,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - #ifdef SSD1306_128X64 - iota_gfx_init(false); // turns on the display - #else - iota_gfx_init(!has_usb()); // turns on the display - #endif - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE //assign the right code to your layers for OLED display #define L_QWERTY 0 @@ -166,12 +141,8 @@ void matrix_init_user(void) { // When add source files to SRC in rules.mk, you can use functions. const char *read_logo(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +bool oled_task_user(void) { + if (is_keyboard_master()) { static char indctr[2][20][5]= { // white icon @@ -235,58 +206,40 @@ void matrix_render_user(struct CharacterMatrix *matrix) { if (layer_state == L_RAISE) { rowr = 1; } if (layer_state == L_ADJUST) { rowa = 1; } - matrix_write(matrix, indctr[rowl] [0]); - matrix_write(matrix, indctr[rowr] [1]); - matrix_write(matrix, indctr[rowa] [2]); - matrix_write(matrix, indctr[rowc] [3]); - matrix_write(matrix, indctr[rown] [4]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [5]); - matrix_write(matrix, indctr[rowr] [6]); - matrix_write(matrix, indctr[rowa] [7]); - matrix_write(matrix, indctr[rowc] [8]); - matrix_write(matrix, indctr[rown] [9]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [10]); - matrix_write(matrix, indctr[rowr] [11]); - matrix_write(matrix, indctr[rowa] [12]); - matrix_write(matrix, indctr[rowc] [13]); - matrix_write(matrix, indctr[rown] [14]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [15]); - matrix_write(matrix, indctr[rowr] [16]); - matrix_write(matrix, indctr[rowa] [17]); - matrix_write(matrix, indctr[rowc] [18]); - matrix_write(matrix, indctr[rown] [19]); + oled_write(indctr[rowl] [0], false); + oled_write(indctr[rowr] [1], false); + oled_write(indctr[rowa] [2], false); + oled_write(indctr[rowc] [3], false); + oled_write(indctr[rown] [4], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [5], false); + oled_write(indctr[rowr] [6], false); + oled_write(indctr[rowa] [7], false); + oled_write(indctr[rowc] [8], false); + oled_write(indctr[rown] [9], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [10], false); + oled_write(indctr[rowr] [11], false); + oled_write(indctr[rowa] [12], false); + oled_write(indctr[rowc] [13], false); + oled_write(indctr[rown] [14], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [15], false); + oled_write(indctr[rowr] [16], false); + oled_write(indctr[rowa] [17], false); + oled_write(indctr[rowc] [18], false); + oled_write(indctr[rown] [19], false); }else{ - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); diff --git a/keyboards/yosino58/keymaps/default/rules.mk b/keyboards/yosino58/keymaps/default/rules.mk index 88c202edb0..191140d278 100644 --- a/keyboards/yosino58/keymaps/default/rules.mk +++ b/keyboards/yosino58/keymaps/default/rules.mk @@ -1,5 +1,6 @@ EXTRAKEY_ENABLE = yes RGBLIGHT_ENABLE = yes +OLED_ENABLE = yes # If you want to change the display of OLED, you need to change here SRC += ./lib/glcdfont.c \ diff --git a/keyboards/yosino58/keymaps/sakura/config.h b/keyboards/yosino58/keymaps/sakura/config.h index 64962b0d20..b80d37d457 100644 --- a/keyboards/yosino58/keymaps/sakura/config.h +++ b/keyboards/yosino58/keymaps/sakura/config.h @@ -20,16 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_MATRIX_I2C - /* Select hand configuration */ // #define MASTER_LEFT #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED -#define SSD1306_128X64 +#define OLED_DISPLAY_128X64 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/yosino58/keymaps/sakura/keymap.c b/keyboards/yosino58/keymaps/sakura/keymap.c index 0996f0e4e7..2ed734292a 100644 --- a/keyboards/yosino58/keymaps/sakura/keymap.c +++ b/keyboards/yosino58/keymaps/sakura/keymap.c @@ -1,21 +1,10 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; #endif -extern uint8_t is_master; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -26,8 +15,7 @@ extern uint8_t is_master; #define _ADJUST 3 enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, ADJUST, RGBRST @@ -60,11 +48,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | / | - | 7 | 8 | 9 | | PSCR | SLCK | Pause| | ª | | + * | Tab | / | - | 7 | 8 | 9 | | PSCR | SLCK | Pause| | �� | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |LShift| * | + | 4 | 5 | 6 | |Insert| Home |PageUP| | « | ¨ | + * |LShift| * | + | 4 | 5 | 6 | |Insert| Home |PageUP| | �� | �� | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| Del | End |PageDN| © | Num | Caps | + * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| Del | End |PageDN| �� | Num | Caps | * `-----------------------------------------/ F11 / / \ \ F12 \----------------------------------------' * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | | | * | | |/ LOWER / / \ \ \ | | | @@ -127,11 +115,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { int RGB_current_mode; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { @@ -145,18 +128,9 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - #ifdef SSD1306_128X64 - iota_gfx_init(false); // turns on the display - #else - iota_gfx_init(!has_usb()); // turns on the display - #endif - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +#ifdef OLED_ENABLE //assign the right code to your layers for OLED display #define L_QWERTY 0 @@ -167,12 +141,8 @@ void matrix_init_user(void) { // When add source files to SRC in rules.mk, you can use functions. const char *read_logo(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +bool oled_task_user(void) { + if (is_keyboard_master()) { static char indctr[2][20][5]= { // white icon @@ -236,58 +206,40 @@ void matrix_render_user(struct CharacterMatrix *matrix) { if (layer_state == L_RAISE) { rowr = 1; } if (layer_state == L_ADJUST) { rowa = 1; } - matrix_write(matrix, indctr[rowl] [0]); - matrix_write(matrix, indctr[rowr] [1]); - matrix_write(matrix, indctr[rowa] [2]); - matrix_write(matrix, indctr[rowc] [3]); - matrix_write(matrix, indctr[rown] [4]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [5]); - matrix_write(matrix, indctr[rowr] [6]); - matrix_write(matrix, indctr[rowa] [7]); - matrix_write(matrix, indctr[rowc] [8]); - matrix_write(matrix, indctr[rown] [9]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [10]); - matrix_write(matrix, indctr[rowr] [11]); - matrix_write(matrix, indctr[rowa] [12]); - matrix_write(matrix, indctr[rowc] [13]); - matrix_write(matrix, indctr[rown] [14]); - matrix_write_char(matrix, 0x13); - matrix_write(matrix, indctr[rowl] [15]); - matrix_write(matrix, indctr[rowr] [16]); - matrix_write(matrix, indctr[rowa] [17]); - matrix_write(matrix, indctr[rowc] [18]); - matrix_write(matrix, indctr[rown] [19]); + oled_write(indctr[rowl] [0], false); + oled_write(indctr[rowr] [1], false); + oled_write(indctr[rowa] [2], false); + oled_write(indctr[rowc] [3], false); + oled_write(indctr[rown] [4], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [5], false); + oled_write(indctr[rowr] [6], false); + oled_write(indctr[rowa] [7], false); + oled_write(indctr[rowc] [8], false); + oled_write(indctr[rown] [9], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [10], false); + oled_write(indctr[rowr] [11], false); + oled_write(indctr[rowa] [12], false); + oled_write(indctr[rowc] [13], false); + oled_write(indctr[rown] [14], false); + oled_write_char(0x13, false); + oled_write(indctr[rowl] [15], false); + oled_write(indctr[rowr] [16], false); + oled_write(indctr[rowa] [17], false); + oled_write(indctr[rowc] [18], false); + oled_write(indctr[rown] [19], false); }else{ - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } + return false; } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); diff --git a/keyboards/yosino58/keymaps/sakura/rules.mk b/keyboards/yosino58/keymaps/sakura/rules.mk index 0b2ca1ba59..679c8c155d 100644 --- a/keyboards/yosino58/keymaps/sakura/rules.mk +++ b/keyboards/yosino58/keymaps/sakura/rules.mk @@ -15,6 +15,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/yosino58/rev1/.noci b/keyboards/yosino58/rev1/.noci deleted file mode 100644 index e69de29bb2..0000000000 --- a/keyboards/yosino58/rev1/.noci +++ /dev/null diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h index b7bbace5d9..6969aca480 100644 --- a/keyboards/yosino58/rev1/config.h +++ b/keyboards/yosino58/rev1/config.h @@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once +#include "config_common.h" + /* USB Device descriptor parameter */ #define VENDOR_ID 0x0F6A #define PRODUCT_ID 0x01B8 @@ -33,6 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define DIODE_DIRECTION COL2ROW /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -43,6 +46,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/yosino58/rev1/matrix.c b/keyboards/yosino58/rev1/matrix.c deleted file mode 100644 index 802ce00cc6..0000000000 --- a/keyboards/yosino58/rev1/matrix.c +++ /dev/null @@ -1,343 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <string.h> -#include <avr/io.h> -#include <avr/wdt.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(D5); - writePinHigh(B0); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) writePinLow(B0); - return 1; - } - writePinHigh(B0); - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C -// for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ -// i2c_slave_buffer[i] = matrix[offset+i]; -// } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - writePinLow(D5); - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - writePinHigh(D5); - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); - print_bin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -static void init_cols(void) -{ - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/yosino58/rev1/rev1.h b/keyboards/yosino58/rev1/rev1.h index bc68892e88..c643c9d729 100644 --- a/keyboards/yosino58/rev1/rev1.h +++ b/keyboards/yosino58/rev1/rev1.h @@ -1,22 +1,7 @@ #pragma once -#include "../yosino58.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include <stddef.h> -#ifdef __AVR__ - #include <avr/io.h> - #include <avr/interrupt.h> -#endif -#endif - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ diff --git a/keyboards/yosino58/rev1/rules.mk b/keyboards/yosino58/rev1/rules.mk index 6028b5a5b9..cf39e83a4f 100644 --- a/keyboards/yosino58/rev1/rules.mk +++ b/keyboards/yosino58/rev1/rules.mk @@ -1,3 +1,20 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SPLIT_KEYBOARD = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/yosino58/rev1/serial_config.h b/keyboards/yosino58/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddf..0000000000 --- a/keyboards/yosino58/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/yosino58/rev1/serial_config_simpleapi.h b/keyboards/yosino58/rev1/serial_config_simpleapi.h deleted file mode 100644 index 0e1dd9e4ac..0000000000 --- a/keyboards/yosino58/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/yosino58/rev1/split_scomm.c b/keyboards/yosino58/rev1/split_scomm.c deleted file mode 100644 index 82b53d7e7f..0000000000 --- a/keyboards/yosino58/rev1/split_scomm.c +++ /dev/null @@ -1,91 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include <stdbool.h> -#include <stdint.h> -#include <stddef.h> -#include "split_scomm.h" -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include "print.h" -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3]); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/yosino58/rev1/split_scomm.h b/keyboards/yosino58/rev1/split_scomm.h deleted file mode 100644 index 16887eb74f..0000000000 --- a/keyboards/yosino58/rev1/split_scomm.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif diff --git a/keyboards/yosino58/rev1/split_util.c b/keyboards/yosino58/rev1/split_util.c deleted file mode 100644 index e1ff8b4379..0000000000 --- a/keyboards/yosino58/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include <avr/io.h> -#include <avr/wdt.h> -#include <avr/power.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include <avr/eeprom.h> -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1<<VBUS)); //checks state of VBUS -} - -void split_keyboard_setup(void) { - setup_handedness(); - - if (has_usb()) { - keyboard_master_setup(); - } else { - keyboard_slave_setup(); - } - sei(); -} - -// this code runs before the usb and keyboard is initialized -void matrix_setup(void) { - split_keyboard_setup(); -} diff --git a/keyboards/yosino58/rev1/split_util.h b/keyboards/yosino58/rev1/split_util.h deleted file mode 100644 index f593047560..0000000000 --- a/keyboards/yosino58/rev1/split_util.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include <stdbool.h> -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk index 3d0f6b19e5..c700b6f5b5 100644 --- a/keyboards/yosino58/rules.mk +++ b/keyboards/yosino58/rules.mk @@ -1,28 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = yes - -CUSTOM_MATRIX = yes - DEFAULT_FOLDER = yosino58/rev1 - -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c diff --git a/keyboards/yosino58/serial.c b/keyboards/yosino58/serial.c deleted file mode 100644 index f6293c3dc2..0000000000 --- a/keyboards/yosino58/serial.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include <avr/io.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include <stddef.h> -#include <stdbool.h> -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of Simple API (OLD API, compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/yosino58/serial.h b/keyboards/yosino58/serial.h deleted file mode 100644 index ac3459c876..0000000000 --- a/keyboards/yosino58/serial.h +++ /dev/null @@ -1,81 +0,0 @@ -#pragma once - -#include <stdbool.h> - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE Simple API (OLD API, compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ -#if SERIAL_SLAVE_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -#endif -#if SERIAL_MASTER_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -#endif - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); - -#endif // USE Simple API - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c deleted file mode 100644 index abd9de2f7a..0000000000 --- a/keyboards/yosino58/ssd1306.c +++ /dev/null @@ -1,347 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include <string.h> -#include "print.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -extern const unsigned char font[] PROGMEM; - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 30000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - -#ifdef SSD1306_128X64 - send_cmd2(SetComPins, 0x12); -#else - send_cmd2(SetComPins, 0x2); -#endif - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/yosino58/ssd1306.h b/keyboards/yosino58/ssd1306.h deleted file mode 100644 index 35e4c144cc..0000000000 --- a/keyboards/yosino58/ssd1306.h +++ /dev/null @@ -1,95 +0,0 @@ -#pragma once - -#include <stdbool.h> -#include <stdio.h> -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#ifdef SSD1306_128X64 -#define DisplayHeight 64 -#else -#define DisplayHeight 32 -#endif -#define DisplayWidth 128 - - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -extern struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/yosino58/yosino58.c b/keyboards/yosino58/yosino58.c index ff3ec10e5a..85545f3f44 100644 --- a/keyboards/yosino58/yosino58.c +++ b/keyboards/yosino58/yosino58.c @@ -1,10 +1 @@ -#include "yosino58.h" -#include "ssd1306.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else - return process_record_user(keycode, record); -#endif -} +#include "yosino58.h"
\ No newline at end of file diff --git a/keyboards/yugo_m/model_m_101/config.h b/keyboards/yugo_m/model_m_101/config.h index 283919c50f..c22bc610c3 100644 --- a/keyboards/yugo_m/model_m_101/config.h +++ b/keyboards/yugo_m/model_m_101/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { B8, B7, B6, B5, B4, B3, A15, A14 } #define MATRIX_COL_PINS { A9, A8, B15, B14, B13, B12, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3 } -#define UNUSED_PINS { A0, A1, A2, A10, A13, B9, C13, C14, C15 } diff --git a/keyboards/yushakobo/quick17/config.h b/keyboards/yushakobo/quick17/config.h index 92ed6a5397..3595bf20c6 100644 --- a/keyboards/yushakobo/quick17/config.h +++ b/keyboards/yushakobo/quick17/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, B3, B6 } #define MATRIX_COL_PINS { F5, D4, E6, F7, C6, D7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h index e9897a330a..8b801b1cc4 100644 --- a/keyboards/yushakobo/quick7/config.h +++ b/keyboards/yushakobo/quick7/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODERS_PAD_A { D1, F5 } #define ENCODERS_PAD_B { D0, F6 } -#define UNUSED_PINS diff --git a/keyboards/yynmt/dozen0/config.h b/keyboards/yynmt/dozen0/config.h index e64eba2f06..5a72cf2a54 100644 --- a/keyboards/yynmt/dozen0/config.h +++ b/keyboards/yynmt/dozen0/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/yynmt/kagamidget/config.h b/keyboards/yynmt/kagamidget/config.h index 59dbe82558..0aa38ad350 100644 --- a/keyboards/yynmt/kagamidget/config.h +++ b/keyboards/yynmt/kagamidget/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D1, D0, F4, F5 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/z12/config.h b/keyboards/z12/config.h index 33ba6e7467..57b31e7c8b 100644 --- a/keyboards/z12/config.h +++ b/keyboards/z12/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { F6, F5, F4, NO_PIN } \ } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/z34/config.h b/keyboards/z34/config.h index 2b8d37bd0e..f63b2771fc 100644 --- a/keyboards/z34/config.h +++ b/keyboards/z34/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { B5, B4, NO_PIN, NO_PIN, NO_PIN } \ } -#define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/zfrontier/big_switch/config.h b/keyboards/zfrontier/big_switch/config.h index e92ad17eb8..fc3e39664d 100644 --- a/keyboards/zfrontier/big_switch/config.h +++ b/keyboards/zfrontier/big_switch/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F0 } #define MATRIX_COL_PINS { F1 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW @@ -44,3 +43,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* long tapping config */ #define TAPPING_TERM 500 +#define PERMISSIVE_HOLD diff --git a/keyboards/ziggurat/config.h b/keyboards/ziggurat/config.h index 757d46b120..f814b53023 100644 --- a/keyboards/ziggurat/config.h +++ b/keyboards/ziggurat/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { A2, A1, A0, F7, A3 } #define MATRIX_COL_PINS { F6, F5, F4, F3, F2, F1, B5, B6, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/zj68/config.h b/keyboards/zj68/config.h index 355ad73aeb..91ffe6dfb4 100644 --- a/keyboards/zj68/config.h +++ b/keyboards/zj68/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index 241f4a51c4..3d581266b9 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -9,7 +9,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B0, B1, D4, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B7, D1, D2, D3, B3, B2 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/zoo/wampus/config.h b/keyboards/zoo/wampus/config.h index de2bf34b17..fea1dbc212 100644 --- a/keyboards/zoo/wampus/config.h +++ b/keyboards/zoo/wampus/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { C13, C14, A5, A4, A3 } #define MATRIX_COL_PINS { A10, A9, A8, B12, A15, A13, A7, A2, A1, A0, F1, F0, B3, B4, B5 } -#define UNUSED_PINS /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ztboards/after/config.h b/keyboards/ztboards/after/config.h index 9cce817512..c314752055 100644 --- a/keyboards/ztboards/after/config.h +++ b/keyboards/ztboards/after/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B3, F6, F5, D5, B2 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D7, D6, D4, C7, C6, B6, B5, B4, F7, F0, F4, F1 } -#define UNUSED_PINS #define ENCODERS_PAD_A { B1 } #define ENCODERS_PAD_B { B0 } diff --git a/keyboards/ztboards/noon/config.h b/keyboards/ztboards/noon/config.h index ead53b1c04..4d9695aa11 100644 --- a/keyboards/ztboards/noon/config.h +++ b/keyboards/ztboards/noon/config.h @@ -25,7 +25,6 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, D5, D3, B1, F0 } #define MATRIX_COL_PINS { D2, D1, D0, D4, D6, B2, D7, B4, B6, C6, C7, F7, F6, F5, F4, F1 } -#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW |