From a3cbc8a004f6ec5b0e1df326353a2a2fc8221129 Mon Sep 17 00:00:00 2001
From: Joel Challis
Date: Sun, 28 Feb 2021 15:50:15 +0000
Subject: Overhaul bootmagic logic to have single entrypoint (#8532)
* Relocate bootmagic logic to have single entrypoint
* Align init of layer state---
quantum/bootmagic/bootmagic.h | 24 ++++++
quantum/bootmagic/bootmagic_full.c | 155 +++++++++++++++++++++++++++++++++++++
quantum/bootmagic/bootmagic_full.h | 115 +++++++++++++++++++++++++++
quantum/bootmagic/bootmagic_lite.c | 66 ++++++++++++++++
quantum/bootmagic/bootmagic_lite.h | 25 ++++++
quantum/bootmagic/magic.c | 54 +++++++++++++
quantum/bootmagic/magic.h | 18 +++++
quantum/quantum.c | 8 +-
quantum/quantum.h | 10 +--
9 files changed, 460 insertions(+), 15 deletions(-)
create mode 100644 quantum/bootmagic/bootmagic.h
create mode 100644 quantum/bootmagic/bootmagic_full.c
create mode 100644 quantum/bootmagic/bootmagic_full.h
create mode 100644 quantum/bootmagic/bootmagic_lite.c
create mode 100644 quantum/bootmagic/bootmagic_lite.h
create mode 100644 quantum/bootmagic/magic.c
create mode 100644 quantum/bootmagic/magic.h
(limited to 'quantum')
diff --git a/quantum/bootmagic/bootmagic.h b/quantum/bootmagic/bootmagic.h
new file mode 100644
index 0000000000..959750178d
--- /dev/null
+++ b/quantum/bootmagic/bootmagic.h
@@ -0,0 +1,24 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#if defined(BOOTMAGIC_ENABLE)
+# include "bootmagic_full.h"
+#elif defined(BOOTMAGIC_LITE)
+# include "bootmagic_lite.h"
+#endif
+
+void bootmagic(void);
diff --git a/quantum/bootmagic/bootmagic_full.c b/quantum/bootmagic/bootmagic_full.c
new file mode 100644
index 0000000000..18c28cde8a
--- /dev/null
+++ b/quantum/bootmagic/bootmagic_full.c
@@ -0,0 +1,155 @@
+/* Copyright 2021 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 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 .
+ */
+#include
+#include
+#include "wait.h"
+#include "matrix.h"
+#include "bootloader.h"
+#include "debug.h"
+#include "keymap.h"
+#include "host.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#include "bootmagic.h"
+
+/** \brief Scan Keycode
+ *
+ * FIXME: needs doc
+ */
+static bool scan_keycode(uint8_t keycode) {
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
+ matrix_row_t matrix_row = matrix_get_row(r);
+ for (uint8_t c = 0; c < MATRIX_COLS; c++) {
+ if (matrix_row & ((matrix_row_t)1 << c)) {
+ if (keycode == keymap_key_to_keycode(0, (keypos_t){.row = r, .col = c})) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+/** \brief Bootmagic Scan Keycode
+ *
+ * FIXME: needs doc
+ */
+static bool bootmagic_scan_keycode(uint8_t keycode) {
+ if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false;
+
+ return scan_keycode(keycode);
+}
+
+void bootmagic(void) {
+ /* do scans in case of bounce */
+ print("bootmagic scan: ... ");
+ uint8_t scan = 100;
+ while (scan--) {
+ matrix_scan();
+ wait_ms(10);
+ }
+ print("done.\n");
+
+ /* bootmagic skip */
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SKIP)) {
+ return;
+ }
+
+ /* eeconfig clear */
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EEPROM_CLEAR)) {
+ eeconfig_init();
+ }
+
+ /* bootloader */
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_BOOTLOADER)) {
+ bootloader_jump();
+ }
+
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_ENABLE)) {
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_MATRIX)) {
+ debug_config.matrix = !debug_config.matrix;
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_KEYBOARD)) {
+ debug_config.keyboard = !debug_config.keyboard;
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_MOUSE)) {
+ debug_config.mouse = !debug_config.mouse;
+ } else {
+ debug_config.enable = !debug_config.enable;
+ }
+ }
+ eeconfig_update_debug(debug_config.raw);
+
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK)) {
+ keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL)) {
+ keymap_config.capslock_to_control = !keymap_config.capslock_to_control;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_LALT_LGUI)) {
+ keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_RALT_RGUI)) {
+ keymap_config.swap_ralt_rgui = !keymap_config.swap_ralt_rgui;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_NO_GUI)) {
+ keymap_config.no_gui = !keymap_config.no_gui;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_GRAVE_ESC)) {
+ keymap_config.swap_grave_esc = !keymap_config.swap_grave_esc;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE)) {
+ keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace;
+ }
+ if (bootmagic_scan_keycode(BOOTMAGIC_HOST_NKRO)) {
+ keymap_config.nkro = !keymap_config.nkro;
+ }
+ eeconfig_update_keymap(keymap_config.raw);
+
+ /* default layer */
+ uint8_t default_layer = 0;
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_0)) {
+ default_layer |= (1 << 0);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_1)) {
+ default_layer |= (1 << 1);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_2)) {
+ default_layer |= (1 << 2);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_3)) {
+ default_layer |= (1 << 3);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_4)) {
+ default_layer |= (1 << 4);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_5)) {
+ default_layer |= (1 << 5);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_6)) {
+ default_layer |= (1 << 6);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) {
+ default_layer |= (1 << 7);
+ }
+ eeconfig_update_default_layer(default_layer);
+
+ /* EE_HANDS handedness */
+ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_LEFT)) {
+ eeconfig_update_handedness(true);
+ }
+ else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_RIGHT)) {
+ eeconfig_update_handedness(false);
+ }
+}
diff --git a/quantum/bootmagic/bootmagic_full.h b/quantum/bootmagic/bootmagic_full.h
new file mode 100644
index 0000000000..28f914c1b6
--- /dev/null
+++ b/quantum/bootmagic/bootmagic_full.h
@@ -0,0 +1,115 @@
+/* Copyright 2021 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 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 .
+ */
+
+#pragma once
+
+/* FIXME: Add special doxygen comments for defines here. */
+
+/* bootmagic salt key */
+#ifndef BOOTMAGIC_KEY_SALT
+# define BOOTMAGIC_KEY_SALT KC_SPACE
+#endif
+
+/* skip bootmagic and eeconfig */
+#ifndef BOOTMAGIC_KEY_SKIP
+# define BOOTMAGIC_KEY_SKIP KC_ESC
+#endif
+
+/* eeprom clear */
+#ifndef BOOTMAGIC_KEY_EEPROM_CLEAR
+# define BOOTMAGIC_KEY_EEPROM_CLEAR KC_BSPACE
+#endif
+
+/* kick up bootloader */
+#ifndef BOOTMAGIC_KEY_BOOTLOADER
+# define BOOTMAGIC_KEY_BOOTLOADER KC_B
+#endif
+
+/* debug enable */
+#ifndef BOOTMAGIC_KEY_DEBUG_ENABLE
+# define BOOTMAGIC_KEY_DEBUG_ENABLE KC_D
+#endif
+#ifndef BOOTMAGIC_KEY_DEBUG_MATRIX
+# define BOOTMAGIC_KEY_DEBUG_MATRIX KC_X
+#endif
+#ifndef BOOTMAGIC_KEY_DEBUG_KEYBOARD
+# define BOOTMAGIC_KEY_DEBUG_KEYBOARD KC_K
+#endif
+#ifndef BOOTMAGIC_KEY_DEBUG_MOUSE
+# define BOOTMAGIC_KEY_DEBUG_MOUSE KC_M
+#endif
+#ifndef BOOTMAGIC_KEY_EE_HANDS_LEFT
+# define BOOTMAGIC_KEY_EE_HANDS_LEFT KC_L
+#endif
+#ifndef BOOTMAGIC_KEY_EE_HANDS_RIGHT
+# define BOOTMAGIC_KEY_EE_HANDS_RIGHT KC_R
+#endif
+
+/*
+ * keymap config
+ */
+#ifndef BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK
+# define BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK KC_LCTRL
+#endif
+#ifndef BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL
+# define BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL KC_CAPSLOCK
+#endif
+#ifndef BOOTMAGIC_KEY_SWAP_LALT_LGUI
+# define BOOTMAGIC_KEY_SWAP_LALT_LGUI KC_LALT
+#endif
+#ifndef BOOTMAGIC_KEY_SWAP_RALT_RGUI
+# define BOOTMAGIC_KEY_SWAP_RALT_RGUI KC_RALT
+#endif
+#ifndef BOOTMAGIC_KEY_NO_GUI
+# define BOOTMAGIC_KEY_NO_GUI KC_LGUI
+#endif
+#ifndef BOOTMAGIC_KEY_SWAP_GRAVE_ESC
+# define BOOTMAGIC_KEY_SWAP_GRAVE_ESC KC_GRAVE
+#endif
+#ifndef BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE
+# define BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE KC_BSLASH
+#endif
+#ifndef BOOTMAGIC_HOST_NKRO
+# define BOOTMAGIC_HOST_NKRO KC_N
+#endif
+
+/*
+ * change default layer
+ */
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_0
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_0
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_1
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_1
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_2
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_2
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_3
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_3 KC_3
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_4
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_4 KC_4
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_5
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_5 KC_5
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_6
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_6 KC_6
+#endif
+#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_7
+# define BOOTMAGIC_KEY_DEFAULT_LAYER_7 KC_7
+#endif
\ No newline at end of file
diff --git a/quantum/bootmagic/bootmagic_lite.c b/quantum/bootmagic/bootmagic_lite.c
new file mode 100644
index 0000000000..9cbdcb0bbd
--- /dev/null
+++ b/quantum/bootmagic/bootmagic_lite.c
@@ -0,0 +1,66 @@
+/* Copyright 2021 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 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 .
+ */
+#include "quantum.h"
+
+/** \brief Reset eeprom
+ *
+ * ...just incase someone wants to only change the eeprom behaviour
+ */
+__attribute__((weak)) void bootmagic_lite_reset_eeprom(void) {
+#if defined(VIA_ENABLE)
+ via_eeprom_reset();
+#else
+ eeconfig_disable();
+#endif
+}
+
+/** \brief The lite version of TMK's bootmagic based on Wilba.
+ *
+ * 100% less potential for accidentally making the keyboard do stupid things.
+ */
+__attribute__((weak)) void bootmagic_lite(void) {
+ // We need multiple scans because debouncing can't be turned off.
+ matrix_scan();
+#if defined(DEBOUNCE) && DEBOUNCE > 0
+ wait_ms(DEBOUNCE * 2);
+#else
+ wait_ms(30);
+#endif
+ matrix_scan();
+
+ // If the configured key (commonly Esc) is held down on power up,
+ // reset the EEPROM valid state and jump to bootloader.
+ // This isn't very generalized, but we need something that doesn't
+ // rely on user's keymaps in firmware or EEPROM.
+ uint8_t row = BOOTMAGIC_LITE_ROW;
+ uint8_t col = BOOTMAGIC_LITE_COLUMN;
+
+#if defined(SPLIT_KEYBOARD) && defined(BOOTMAGIC_LITE_ROW_RIGHT) && defined(BOOTMAGIC_LITE_COLUMN_RIGHT)
+ if (!is_keyboard_left()) {
+ row = BOOTMAGIC_LITE_ROW_RIGHT;
+ col = BOOTMAGIC_LITE_COLUMN_RIGHT;
+ }
+#endif
+
+ if (matrix_get_row(row) & (1 << col)) {
+ bootmagic_lite_reset_eeprom();
+
+ // Jump to bootloader.
+ bootloader_jump();
+ }
+}
+
+void bootmagic(void) { bootmagic_lite(); }
diff --git a/quantum/bootmagic/bootmagic_lite.h b/quantum/bootmagic/bootmagic_lite.h
new file mode 100644
index 0000000000..17777e6b4a
--- /dev/null
+++ b/quantum/bootmagic/bootmagic_lite.h
@@ -0,0 +1,25 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#ifndef BOOTMAGIC_LITE_COLUMN
+# define BOOTMAGIC_LITE_COLUMN 0
+#endif
+#ifndef BOOTMAGIC_LITE_ROW
+# define BOOTMAGIC_LITE_ROW 0
+#endif
+
+void bootmagic_lite(void);
diff --git a/quantum/bootmagic/magic.c b/quantum/bootmagic/magic.c
new file mode 100644
index 0000000000..f1cb11c395
--- /dev/null
+++ b/quantum/bootmagic/magic.c
@@ -0,0 +1,54 @@
+/* Copyright 2021 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 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 .
+ */
+#include
+#include
+#include "wait.h"
+#include "matrix.h"
+#include "bootloader.h"
+#include "debug.h"
+#include "keymap.h"
+#include "host.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+#include "bootmagic.h"
+
+keymap_config_t keymap_config;
+
+__attribute__((weak)) void bootmagic(void) {}
+
+/** \brief Magic
+ *
+ * FIXME: Needs doc
+ */
+void magic(void) {
+ /* check signature */
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+
+ /* init globals */
+ debug_config.raw = eeconfig_read_debug();
+ keymap_config.raw = eeconfig_read_keymap();
+
+ bootmagic();
+
+ /* read here just incase bootmagic process changed its value */
+ layer_state_t default_layer = (layer_state_t)eeconfig_read_default_layer();
+ default_layer_set(default_layer);
+
+ /* Also initialize layer state to trigger callback functions for layer_state */
+ layer_state_set_kb((layer_state_t)layer_state);
+}
diff --git a/quantum/bootmagic/magic.h b/quantum/bootmagic/magic.h
new file mode 100644
index 0000000000..2c3969b85c
--- /dev/null
+++ b/quantum/bootmagic/magic.h
@@ -0,0 +1,18 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+void magic(void);
diff --git a/quantum/quantum.c b/quantum/quantum.c
index db99e80fa0..7345ab0d5a 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -16,6 +16,7 @@
#include
#include "quantum.h"
+#include "magic.h"
#ifdef BLUETOOTH_ENABLE
# include "outputselect.h"
@@ -601,12 +602,7 @@ void tap_random_base64(void) {
}
void matrix_init_quantum() {
-#ifdef BOOTMAGIC_LITE
- bootmagic_lite();
-#endif
- if (!eeconfig_is_enabled()) {
- eeconfig_init();
- }
+ magic();
#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN)
// TODO: remove calls to led_init_ports from keyboards and remove ifdef
led_init_ports();
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 36a983d575..7bb6e796e8 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -52,6 +52,7 @@
#include "action_layer.h"
#include "eeconfig.h"
#include "bootloader.h"
+#include "bootmagic.h"
#include "timer.h"
#include "sync_timer.h"
#include "config_common.h"
@@ -283,15 +284,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record);
void post_process_record_kb(uint16_t keycode, keyrecord_t *record);
void post_process_record_user(uint16_t keycode, keyrecord_t *record);
-#ifndef BOOTMAGIC_LITE_COLUMN
-# define BOOTMAGIC_LITE_COLUMN 0
-#endif
-#ifndef BOOTMAGIC_LITE_ROW
-# define BOOTMAGIC_LITE_ROW 0
-#endif
-
-void bootmagic_lite(void);
-
void reset_keyboard(void);
void startup_user(void);
--
cgit v1.2.3
From 5ba4391cf29ce624f17593417212b3dbca1609ad Mon Sep 17 00:00:00 2001
From: Joel Challis
Date: Sun, 28 Feb 2021 15:52:58 +0000
Subject: Refactor of USB code within split_common (#11890)
* Initial refactor of usb code within split_common
* Add headers
* Correct disable condition
* Format
* Align func name---
quantum/split_common/split_util.c | 70 +++++++++++---------------------
tmk_core/common.mk | 1 +
tmk_core/common/chibios/chibios_config.h | 2 +
tmk_core/common/usb_util.c | 29 +++++++++++++
tmk_core/common/usb_util.h | 22 ++++++++++
tmk_core/protocol/chibios.mk | 1 +
tmk_core/protocol/chibios/usb_util.c | 21 ++++++++++
tmk_core/protocol/lufa.mk | 1 +
tmk_core/protocol/lufa/usb_util.c | 34 ++++++++++++++++
tmk_core/protocol/vusb.mk | 1 +
tmk_core/protocol/vusb/usb_util.c | 24 +++++++++++
11 files changed, 160 insertions(+), 46 deletions(-)
create mode 100644 tmk_core/common/usb_util.c
create mode 100644 tmk_core/common/usb_util.h
create mode 100644 tmk_core/protocol/chibios/usb_util.c
create mode 100644 tmk_core/protocol/lufa/usb_util.c
create mode 100644 tmk_core/protocol/vusb/usb_util.c
(limited to 'quantum')
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 2ae44e6e15..9e75e19ce0 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -1,3 +1,18 @@
+/* Copyright 2021 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 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 .
+ */
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
@@ -6,14 +21,7 @@
#include "transport.h"
#include "quantum.h"
#include "wait.h"
-
-#ifdef PROTOCOL_LUFA
-# include
-#endif
-
-#ifdef PROTOCOL_VUSB
-# include
-#endif
+#include "usb_util.h"
#ifdef EE_HANDS
# include "eeconfig.h"
@@ -31,56 +39,21 @@
# define SPLIT_USB_TIMEOUT_POLL 10
#endif
-#ifdef PROTOCOL_CHIBIOS
-# define SPLIT_USB_DETECT // Force this on for now
-#endif
-
volatile bool isLeftHand = true;
#if defined(SPLIT_USB_DETECT)
-# if defined(PROTOCOL_LUFA)
-static inline bool usbHasActiveConnection(void) { return USB_Device_IsAddressSet(); }
-static inline void usbDisable(void) {
- USB_Disable();
- USB_DeviceState = DEVICE_STATE_Unattached;
-}
-# elif defined(PROTOCOL_CHIBIOS)
-static inline bool usbHasActiveConnection(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; }
-static inline void usbDisable(void) { usbStop(&USBD1); }
-# elif defined(PROTOCOL_VUSB)
-static inline bool usbHasActiveConnection(void) {
- usbPoll();
- return usbConfiguration;
-}
-static inline void usbDisable(void) { usbDeviceDisconnect(); }
-# else
-static inline bool usbHasActiveConnection(void) { return true; }
-static inline void usbDisable(void) {}
-# endif
-
-bool usbIsActive(void) {
+static bool usbIsActive(void) {
for (uint8_t i = 0; i < (SPLIT_USB_TIMEOUT / SPLIT_USB_TIMEOUT_POLL); i++) {
// This will return true if a USB connection has been established
- if (usbHasActiveConnection()) {
+ if (usb_connected_state()) {
return true;
}
wait_ms(SPLIT_USB_TIMEOUT_POLL);
}
-
- // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
- usbDisable();
-
return false;
}
-#elif defined(PROTOCOL_LUFA) && defined(OTGPADE)
-static inline bool usbIsActive(void) {
- USB_OTGPAD_On(); // enables VBUS pad
- wait_us(5);
-
- return USB_VBUS_GetStatus(); // checks state of VBUS
-}
#else
-static inline bool usbIsActive(void) { return true; }
+static inline bool usbIsActive(void) { return usb_vbus_state(); }
#endif
#ifdef SPLIT_HAND_MATRIX_GRID
@@ -126,6 +99,11 @@ __attribute__((weak)) bool is_keyboard_master(void) {
// only check once, as this is called often
if (usbstate == UNKNOWN) {
usbstate = usbIsActive() ? MASTER : SLAVE;
+
+ // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow
+ if (usbstate == SLAVE) {
+ usb_disable();
+ }
}
return (usbstate == MASTER);
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index c2fc522cea..2f8f81126a 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -12,6 +12,7 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/sendchar_null.c \
$(COMMON_DIR)/eeconfig.c \
$(COMMON_DIR)/report.c \
+ $(COMMON_DIR)/usb_util.c \
$(PLATFORM_COMMON_DIR)/suspend.c \
$(PLATFORM_COMMON_DIR)/timer.c \
$(COMMON_DIR)/sync_timer.c \
diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h
index b4d96465d1..bebf026de7 100644
--- a/tmk_core/common/chibios/chibios_config.h
+++ b/tmk_core/common/chibios/chibios_config.h
@@ -15,6 +15,8 @@
*/
#pragma once
+#define SPLIT_USB_DETECT // Force this on for now
+
#if defined(STM32F1XX)
# define USE_GPIOV1
#endif
diff --git a/tmk_core/common/usb_util.c b/tmk_core/common/usb_util.c
new file mode 100644
index 0000000000..e4c50fcb10
--- /dev/null
+++ b/tmk_core/common/usb_util.c
@@ -0,0 +1,29 @@
+/* Copyright 2021 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 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 .
+ */
+#include "usb_util.h"
+#include "wait.h"
+
+__attribute__((weak)) void usb_disable(void) {}
+__attribute__((weak)) bool usb_connected_state(void) { return true; }
+__attribute__((weak)) bool usb_vbus_state(void) {
+#ifdef USB_VBUS_PIN
+ setPinInput(USB_VBUS_PIN);
+ wait_us(5);
+ return readPin(USB_VBUS_PIN);
+#else
+ return true;
+#endif
+}
diff --git a/tmk_core/common/usb_util.h b/tmk_core/common/usb_util.h
new file mode 100644
index 0000000000..4ebedb1e71
--- /dev/null
+++ b/tmk_core/common/usb_util.h
@@ -0,0 +1,22 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include
+
+void usb_disable(void);
+bool usb_connected_state(void);
+bool usb_vbus_state(void);
diff --git a/tmk_core/protocol/chibios.mk b/tmk_core/protocol/chibios.mk
index 80554abb32..d01697835b 100644
--- a/tmk_core/protocol/chibios.mk
+++ b/tmk_core/protocol/chibios.mk
@@ -6,6 +6,7 @@ SRC += $(CHIBIOS_DIR)/usb_main.c
SRC += $(CHIBIOS_DIR)/main.c
SRC += usb_descriptor.c
SRC += $(CHIBIOS_DIR)/usb_driver.c
+SRC += $(CHIBIOS_DIR)/usb_util.c
SRC += $(LIBSRC)
VPATH += $(TMK_PATH)/$(PROTOCOL_DIR)
diff --git a/tmk_core/protocol/chibios/usb_util.c b/tmk_core/protocol/chibios/usb_util.c
new file mode 100644
index 0000000000..5945e8a8de
--- /dev/null
+++ b/tmk_core/protocol/chibios/usb_util.c
@@ -0,0 +1,21 @@
+/* Copyright 2021 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 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 .
+ */
+#include
+#include "usb_util.h"
+
+void usb_disable(void) { usbStop(&USBD1); }
+
+bool usb_connected_state(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; }
diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk
index 1cc1fa04e5..9d9fb728b1 100644
--- a/tmk_core/protocol/lufa.mk
+++ b/tmk_core/protocol/lufa.mk
@@ -44,6 +44,7 @@ ifeq ($(strip $(VIRTSER_ENABLE)), yes)
endif
SRC += $(LUFA_SRC)
+SRC += $(LUFA_DIR)/usb_util.c
# Search Path
VPATH += $(TMK_PATH)/$(LUFA_DIR)
diff --git a/tmk_core/protocol/lufa/usb_util.c b/tmk_core/protocol/lufa/usb_util.c
new file mode 100644
index 0000000000..9e943a21b9
--- /dev/null
+++ b/tmk_core/protocol/lufa/usb_util.c
@@ -0,0 +1,34 @@
+/* Copyright 2021 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 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 .
+ */
+#include
+#include "usb_util.h"
+#include "wait.h"
+
+void usb_disable(void) {
+ USB_Disable();
+ USB_DeviceState = DEVICE_STATE_Unattached;
+}
+
+bool usb_connected_state(void) { return USB_Device_IsAddressSet(); }
+
+#if defined(OTGPADE)
+bool usb_vbus_state(void) {
+ USB_OTGPAD_On(); // enables VBUS pad
+ wait_us(5);
+
+ return USB_VBUS_GetStatus(); // checks state of VBUS
+}
+#endif
diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk
index 1de6003089..e4d013b38d 100644
--- a/tmk_core/protocol/vusb.mk
+++ b/tmk_core/protocol/vusb.mk
@@ -5,6 +5,7 @@ VUSB_PATH = $(LIB_PATH)/vusb
SRC += $(VUSB_DIR)/main.c \
$(VUSB_DIR)/vusb.c \
+ $(VUSB_DIR)/usb_util.c \
$(VUSB_PATH)/usbdrv/usbdrv.c \
$(VUSB_PATH)/usbdrv/usbdrvasm.S \
$(VUSB_PATH)/usbdrv/oddebug.c
diff --git a/tmk_core/protocol/vusb/usb_util.c b/tmk_core/protocol/vusb/usb_util.c
new file mode 100644
index 0000000000..602854dbe6
--- /dev/null
+++ b/tmk_core/protocol/vusb/usb_util.c
@@ -0,0 +1,24 @@
+/* Copyright 2021 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 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 .
+ */
+#include
+#include "usb_util.h"
+
+void usb_disable(void) { usbDeviceDisconnect(); }
+
+bool usb_connected_state(void) {
+ usbPoll();
+ return usbConfiguration;
+}
--
cgit v1.2.3
From b2f5bd7c60282ab8abc04d480f6348e0b8482436 Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Sun, 28 Feb 2021 15:53:54 +0000
Subject: Format code according to conventions (#12056)
Co-authored-by: QMK Bot ---
quantum/bootmagic/bootmagic_full.c | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
(limited to 'quantum')
diff --git a/quantum/bootmagic/bootmagic_full.c b/quantum/bootmagic/bootmagic_full.c
index 18c28cde8a..a7a0dcfcb2 100644
--- a/quantum/bootmagic/bootmagic_full.c
+++ b/quantum/bootmagic/bootmagic_full.c
@@ -121,26 +121,19 @@ void bootmagic(void) {
uint8_t default_layer = 0;
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_0)) {
default_layer |= (1 << 0);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_1)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_1)) {
default_layer |= (1 << 1);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_2)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_2)) {
default_layer |= (1 << 2);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_3)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_3)) {
default_layer |= (1 << 3);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_4)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_4)) {
default_layer |= (1 << 4);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_5)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_5)) {
default_layer |= (1 << 5);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_6)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_6)) {
default_layer |= (1 << 6);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) {
default_layer |= (1 << 7);
}
eeconfig_update_default_layer(default_layer);
@@ -148,8 +141,7 @@ void bootmagic(void) {
/* EE_HANDS handedness */
if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_LEFT)) {
eeconfig_update_handedness(true);
- }
- else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_RIGHT)) {
+ } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_RIGHT)) {
eeconfig_update_handedness(false);
}
}
--
cgit v1.2.3
From 0e984b6e7e216a62df0b5d53f6a8f0d4bc13dca3 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Mon, 1 Mar 2021 08:57:02 -0800
Subject: Add ability to toggle One Shot functionality (#4198)
Co-authored-by: Nick Brassel
Co-authored-by: Ryan ---
docs/keycodes.md | 3 +++
docs/one_shot_keys.md | 3 +++
quantum/keycode_config.h | 1 +
quantum/quantum.c | 11 ++++++++
quantum/quantum_keycodes.h | 9 +++++++
tmk_core/common/action_util.c | 58 ++++++++++++++++++++++++++++++++++++-------
tmk_core/common/action_util.h | 5 ++++
7 files changed, 81 insertions(+), 9 deletions(-)
(limited to 'quantum')
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 9acf8b6839..f3c519b130 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -516,6 +516,9 @@ See also: [One Shot Keys](one_shot_keys.md)
|------------|----------------------------------|
|`OSM(mod)` |Hold `mod` for one keypress |
|`OSL(layer)`|Switch to `layer` for one keypress|
+|`OS_ON` |Turns One Shot keys on |
+|`OS_OFF` |Turns One Shot keys off |
+|`OS_TOGG` |Toggles One Shot keys status |
## Space Cadet :id=space-cadet
diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md
index 9a082d7d6d..9fc5486299 100644
--- a/docs/one_shot_keys.md
+++ b/docs/one_shot_keys.md
@@ -17,6 +17,9 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*.
+* `OS_ON` - Turns on One Shot keys.
+* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
+* `ON_TOGG` - Toggles the one shot key status.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
diff --git a/quantum/keycode_config.h b/quantum/keycode_config.h
index f878168c5f..d7e334fdc8 100644
--- a/quantum/keycode_config.h
+++ b/quantum/keycode_config.h
@@ -37,6 +37,7 @@ typedef union {
bool nkro : 1;
bool swap_lctl_lgui : 1;
bool swap_rctl_rgui : 1;
+ bool oneshot_disable : 1;
};
} keymap_config_t;
diff --git a/quantum/quantum.c b/quantum/quantum.c
index ef751a2331..78601ce6bf 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -318,6 +318,17 @@ bool process_record_quantum(keyrecord_t *record) {
case OUT_BT:
set_output(OUTPUT_BLUETOOTH);
return false;
+#endif
+#ifndef NO_ACTION_ONESHOT
+ case ONESHOT_TOGGLE:
+ oneshot_toggle();
+ break;
+ case ONESHOT_ENABLE:
+ oneshot_enable();
+ break;
+ case ONESHOT_DISABLE:
+ oneshot_disable();
+ break;
#endif
}
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index e0f5dbc61e..63945a17ca 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -578,6 +578,10 @@ enum quantum_keycodes {
#endif
+ ONESHOT_ENABLE,
+ ONESHOT_DISABLE,
+ ONESHOT_TOGGLE,
+
// always leave at the end
SAFE_RANGE
};
@@ -885,3 +889,8 @@ enum quantum_keycodes {
#define DM_RSTP DYN_REC_STOP
#define DM_PLY1 DYN_MACRO_PLAY1
#define DM_PLY2 DYN_MACRO_PLAY2
+
+// One Shot toggle
+#define OS_TOGG ONESHOT_TOGGLE
+#define OS_ON ONESHOT_ENABLE
+#define OS_OFF ONESHOT_DISABLE
diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c
index 000503b082..a57c8bf66a 100644
--- a/tmk_core/common/action_util.c
+++ b/tmk_core/common/action_util.c
@@ -147,12 +147,16 @@ void clear_oneshot_swaphands(void) {
* FIXME: needs doc
*/
void set_oneshot_layer(uint8_t layer, uint8_t state) {
- oneshot_layer_data = layer << 3 | state;
- layer_on(layer);
+ if (!keymap_config.oneshot_disable) {
+ oneshot_layer_data = layer << 3 | state;
+ layer_on(layer);
# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
- oneshot_layer_time = timer_read();
+ oneshot_layer_time = timer_read();
# endif
- oneshot_layer_changed_kb(get_oneshot_layer());
+ oneshot_layer_changed_kb(get_oneshot_layer());
+ } else {
+ layer_on(layer);
+ }
}
/** \brief Reset oneshot layer
*
@@ -172,7 +176,7 @@ void reset_oneshot_layer(void) {
void clear_oneshot_layer_state(oneshot_fullfillment_t state) {
uint8_t start_state = oneshot_layer_data;
oneshot_layer_data &= ~state;
- if (!get_oneshot_layer_state() && start_state != oneshot_layer_data) {
+ if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) || keymap_config.oneshot_disable) {
layer_off(get_oneshot_layer());
reset_oneshot_layer();
}
@@ -182,6 +186,39 @@ void clear_oneshot_layer_state(oneshot_fullfillment_t state) {
* FIXME: needs doc
*/
bool is_oneshot_layer_active(void) { return get_oneshot_layer_state(); }
+
+/** \brief set oneshot
+ *
+ * FIXME: needs doc
+ */
+void oneshot_set(bool active) {
+ if (keymap_config.oneshot_disable != active) {
+ keymap_config.oneshot_disable = active;
+ eeconfig_update_keymap(keymap_config.raw);
+ dprintf("Oneshot: active: %d\n", active);
+ }
+}
+
+/** \brief toggle oneshot
+ *
+ * FIXME: needs doc
+ */
+void oneshot_toggle(void) { oneshot_set(!keymap_config.oneshot_disable); }
+
+/** \brief enable oneshot
+ *
+ * FIXME: needs doc
+ */
+void oneshot_enable(void) { oneshot_set(true); }
+
+/** \brief disable oneshot
+ *
+ * FIXME: needs doc
+ */
+void oneshot_disable(void) { oneshot_set(false); }
+
+bool is_oneshot_enabled(void) { return keymap_config.oneshot_disable; }
+
#endif
/** \brief Send keyboard report
@@ -321,14 +358,17 @@ void del_oneshot_mods(uint8_t mods) {
* FIXME: needs doc
*/
void set_oneshot_mods(uint8_t mods) {
- if (oneshot_mods != mods) {
+ if (!keymap_config.oneshot_disable) {
+ if (oneshot_mods != mods) {
# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
- oneshot_time = timer_read();
+ oneshot_time = timer_read();
# endif
- oneshot_mods = mods;
- oneshot_mods_changed_kb(mods);
+ oneshot_mods = mods;
+ oneshot_mods_changed_kb(mods);
+ }
}
}
+
/** \brief clear oneshot mods
*
* FIXME: needs doc
diff --git a/tmk_core/common/action_util.h b/tmk_core/common/action_util.h
index ff29f79b09..f2b3897ae5 100644
--- a/tmk_core/common/action_util.h
+++ b/tmk_core/common/action_util.h
@@ -85,6 +85,11 @@ void oneshot_mods_changed_kb(uint8_t mods);
void oneshot_layer_changed_user(uint8_t layer);
void oneshot_layer_changed_kb(uint8_t layer);
+void oneshot_toggle(void);
+void oneshot_enable(void);
+void oneshot_disable(void);
+bool is_oneshot_enabled(void);
+
/* inspect */
uint8_t has_anymod(void);
--
cgit v1.2.3
From 50290c78b6b904b9d2f1dbcfea4495966a755eda Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Mon, 1 Mar 2021 18:08:18 +0000
Subject: Format code according to conventions (#12076)
Co-authored-by: QMK Bot ---
quantum/quantum_keycodes.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'quantum')
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 63945a17ca..5eba218c9f 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -892,5 +892,5 @@ enum quantum_keycodes {
// One Shot toggle
#define OS_TOGG ONESHOT_TOGGLE
-#define OS_ON ONESHOT_ENABLE
-#define OS_OFF ONESHOT_DISABLE
+#define OS_ON ONESHOT_ENABLE
+#define OS_OFF ONESHOT_DISABLE
--
cgit v1.2.3
From cde2859a6591b1274da20978bd158f20229faa88 Mon Sep 17 00:00:00 2001
From: XScorpion2
Date: Tue, 2 Mar 2021 14:32:15 -0600
Subject: Split RGB Matrix (#11055)
* Split RGB Matrix
* Suspend State sync for rgb matrix---
docs/feature_rgb_matrix.md | 2 ++
quantum/rgb_matrix.c | 35 ++++++++++++++++++++++++++++++-----
quantum/rgb_matrix_types.h | 1 +
quantum/split_common/transport.c | 35 +++++++++++++++++++++++++++++++++++
tmk_core/common/avr/suspend.c | 4 ++++
tmk_core/common/chibios/suspend.c | 8 ++++++++
tmk_core/common/eeconfig.c | 2 +-
tmk_core/common/eeconfig.h | 9 +++++----
8 files changed, 86 insertions(+), 10 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index fd866bd571..878acaf8b3 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -439,6 +439,8 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
+#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
+ // If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
```
## EEPROM storage :id=eeprom-storage
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index ec17b4d72c..69d4c02093 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -131,7 +131,7 @@ last_hit_t g_last_hit_tracker;
// internals
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
-static effect_params_t rgb_effect_params = {0, 0xFF};
+static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
static rgb_task_states rgb_task_state = SYNCING;
#if RGB_DISABLE_TIMEOUT > 0
static uint32_t rgb_anykey_timer;
@@ -143,6 +143,11 @@ static uint32_t rgb_timer_buffer;
static last_hit_t last_hit_buffer;
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+// split rgb matrix
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
+#endif
+
void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
@@ -153,6 +158,7 @@ void eeconfig_update_rgb_matrix_default(void) {
rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
+ rgb_matrix_config.flags = LED_FLAG_ALL;
eeconfig_update_rgb_matrix();
}
@@ -164,6 +170,7 @@ void eeconfig_debug_rgb_matrix(void) {
dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s);
dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v);
dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
+ dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags);
}
__attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
@@ -180,9 +187,23 @@ uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l
void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); }
-void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color(index, red, green, blue); }
+void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ if (!is_keyboard_left() && index >= k_rgb_matrix_split[0])
+ rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue);
+ else if (is_keyboard_left() && index < k_rgb_matrix_split[0])
+#endif
+ rgb_matrix_driver.set_color(index, red, green, blue);
+}
-void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color_all(red, green, blue); }
+void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++)
+ rgb_matrix_set_color(i, red, green, blue);
+#else
+ rgb_matrix_driver.set_color_all(red, green, blue);
+#endif
+}
void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) {
#ifndef RGB_MATRIX_SPLIT
@@ -315,6 +336,10 @@ static void rgb_task_start(void) {
static void rgb_task_render(uint8_t effect) {
bool rendering = false;
rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable);
+ if (rgb_effect_params.flags != rgb_matrix_config.flags) {
+ rgb_effect_params.flags = rgb_matrix_config.flags;
+ rgb_matrix_set_color_all(0, 0, 0);
+ }
// each effect can opt to do calculations
// and/or request PWM buffer updates.
@@ -618,6 +643,6 @@ void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_spe
void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); }
void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); }
-led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; }
+led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; }
-void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; }
+void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; }
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
index 7b8171fb23..8cd5b17a77 100644
--- a/quantum/rgb_matrix_types.h
+++ b/quantum/rgb_matrix_types.h
@@ -89,6 +89,7 @@ typedef union {
uint8_t mode : 6;
HSV hsv;
uint8_t speed; // EECONFIG needs to be increased to support this
+ led_flags_t flags;
};
} rgb_config_t;
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 61b61ea08c..daa60bb734 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -22,6 +22,10 @@ static pin_t encoders_pad[] = ENCODERS_PAD_A;
# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
#endif
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+# include "rgb_matrix.h"
+#endif
+
#if defined(USE_I2C)
# include "i2c_master.h"
@@ -54,6 +58,10 @@ typedef struct _I2C_slave_buffer_t {
# ifdef WPM_ENABLE
uint8_t current_wpm;
# endif
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
+# endif
} I2C_slave_buffer_t;
static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
@@ -68,6 +76,8 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
+# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
+# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
# define TIMEOUT 100
@@ -141,6 +151,11 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# endif
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
+# endif
+
# ifndef DISABLE_SYNC_TIMER
i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
@@ -186,6 +201,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
set_oneshot_mods(i2c_buffer->oneshot_mods);
# endif
# endif
+
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ memcpy((void*)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
+ memcpy((void*)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state));
+# endif
}
void transport_master_init(void) { i2c_init(); }
@@ -226,6 +246,10 @@ typedef struct _Serial_m2s_buffer_t {
# ifdef WPM_ENABLE
uint8_t current_wpm;
# endif
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
+# endif
} Serial_m2s_buffer_t;
# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
@@ -343,6 +367,12 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
# endif
# endif
+
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
+ serial_m2s_buffer.rgb_suspend_state = g_suspend_state;
+# endif
+
# ifndef DISABLE_SYNC_TIMER
serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
# endif
@@ -381,6 +411,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
# endif
# endif
+
+# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
+ g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
+# endif
}
#endif
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 47a82a2eec..d52c8ac410 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -28,6 +28,10 @@
# include "rgblight.h"
#endif
+#ifdef RGB_MATRIX_ENABLE
+# include "rgb_matrix.h"
+#endif
+
/** \brief Suspend idle
*
* FIXME: needs doc
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index 49e20641fb..17f024caba 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -24,6 +24,10 @@
# include "rgblight.h"
#endif
+#ifdef RGB_MATRIX_ENABLE
+# include "rgb_matrix.h"
+#endif
+
/** \brief suspend idle
*
* FIXME: needs doc
@@ -53,6 +57,10 @@ void suspend_power_down(void) {
backlight_set(0);
#endif
+#ifdef RGB_MATRIX_ENABLE
+ rgb_matrix_task();
+#endif
+
// Turn off LED indicators
uint8_t leds_off = 0;
#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c
index 5e3ebe6ee6..92a5092176 100644
--- a/tmk_core/common/eeconfig.c
+++ b/tmk_core/common/eeconfig.c
@@ -57,7 +57,7 @@ void eeconfig_init_quantum(void) {
eeprom_update_dword(EECONFIG_HAPTIC, 0);
eeprom_update_byte(EECONFIG_VELOCIKEY, 0);
eeprom_update_dword(EECONFIG_RGB_MATRIX, 0);
- eeprom_update_byte(EECONFIG_RGB_MATRIX_SPEED, 0);
+ eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0);
// TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS
// within the emulated eeprom via dfu-util or another tool
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index 86b9e6f99b..39bc51d5db 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -21,7 +21,7 @@ along with this program. If not, see .
#include
#ifndef EECONFIG_MAGIC_NUMBER
-# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEB // When changing, decrement this value to avoid future re-init issues
+# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEA // When changing, decrement this value to avoid future re-init issues
#endif
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
@@ -44,11 +44,12 @@ along with this program. If not, see .
#define EECONFIG_HAPTIC (uint32_t *)24
#define EECONFIG_RGB_MATRIX (uint32_t *)28
-#define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32
+// Speed & Flags
+#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32
// TODO: Combine these into a single word and single block of EEPROM
-#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33
+#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34
// Size of EEPROM being used, other code can refer to this for available EEPROM
-#define EECONFIG_SIZE 34
+#define EECONFIG_SIZE 35
/* debug bit */
#define EECONFIG_DEBUG_ENABLE (1 << 0)
#define EECONFIG_DEBUG_MATRIX (1 << 1)
--
cgit v1.2.3
From d950b97115269a4e7e149bf1eb9b4c6ead13cf7b Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Wed, 3 Mar 2021 07:54:11 +1100
Subject: Format code according to conventions (#12088)
Co-authored-by: QMK Bot ---
quantum/rgb_matrix.c | 7 +++----
quantum/rgb_matrix_types.h | 8 ++++----
quantum/split_common/transport.c | 18 +++++++++---------
3 files changed, 16 insertions(+), 17 deletions(-)
(limited to 'quantum')
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 69d4c02093..8aae486034 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -158,7 +158,7 @@ void eeconfig_update_rgb_matrix_default(void) {
rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
- rgb_matrix_config.flags = LED_FLAG_ALL;
+ rgb_matrix_config.flags = LED_FLAG_ALL;
eeconfig_update_rgb_matrix();
}
@@ -193,13 +193,12 @@ void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue);
else if (is_keyboard_left() && index < k_rgb_matrix_split[0])
#endif
- rgb_matrix_driver.set_color(index, red, green, blue);
+ rgb_matrix_driver.set_color(index, red, green, blue);
}
void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++)
- rgb_matrix_set_color(i, red, green, blue);
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) rgb_matrix_set_color(i, red, green, blue);
#else
rgb_matrix_driver.set_color_all(red, green, blue);
#endif
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
index 8cd5b17a77..1a37922af9 100644
--- a/quantum/rgb_matrix_types.h
+++ b/quantum/rgb_matrix_types.h
@@ -85,10 +85,10 @@ typedef struct PACKED {
typedef union {
uint32_t raw;
struct PACKED {
- uint8_t enable : 2;
- uint8_t mode : 6;
- HSV hsv;
- uint8_t speed; // EECONFIG needs to be increased to support this
+ uint8_t enable : 2;
+ uint8_t mode : 6;
+ HSV hsv;
+ uint8_t speed; // EECONFIG needs to be increased to support this
led_flags_t flags;
};
} rgb_config_t;
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index daa60bb734..27a1c0d3a4 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -203,8 +203,8 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- memcpy((void*)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- memcpy((void*)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state));
+ memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
+ memcpy((void *)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state));
# endif
}
@@ -357,24 +357,24 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# ifdef WPM_ENABLE
// Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
+ serial_m2s_buffer.current_wpm = get_current_wpm();
# endif
# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
+ serial_m2s_buffer.real_mods = get_mods();
+ serial_m2s_buffer.weak_mods = get_weak_mods();
# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
+ serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
# endif
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
+ serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
serial_m2s_buffer.rgb_suspend_state = g_suspend_state;
# endif
# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
# endif
return true;
}
@@ -414,7 +414,7 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
+ g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
# endif
}
--
cgit v1.2.3
From 9155b59e1a496b64f7aa576e6e4cb84fd0a9607b Mon Sep 17 00:00:00 2001
From: Ryan
Date: Mon, 8 Mar 2021 16:55:00 +1100
Subject: LED Matrix: decouple from Backlight (#12054)
---
common_features.mk | 5 ++---
quantum/led_matrix.c | 8 +-------
quantum/led_matrix.h | 4 ----
quantum/process_keycode/process_backlight.c | 29 +++++++++++++++++++++++++++--
quantum/quantum.c | 9 ++++-----
quantum/quantum.h | 12 ++++++------
tmk_core/common/eeconfig.h | 5 +++++
7 files changed, 45 insertions(+), 27 deletions(-)
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index bdde278b98..fdc481fd2a 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -223,11 +223,10 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
- $(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
+ $(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
else
- BACKLIGHT_ENABLE = yes
- BACKLIGHT_DRIVER = custom
OPT_DEFS += -DLED_MATRIX_ENABLE
+ SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
endif
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 4f1f06c7ac..39bccdd580 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -45,10 +45,6 @@ led_eeconfig_t led_matrix_eeconfig;
# define LED_DISABLE_WHEN_USB_SUSPENDED false
#endif
-#ifndef EECONFIG_LED_MATRIX
-# define EECONFIG_LED_MATRIX EECONFIG_RGBLIGHT
-#endif
-
#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > 255
# define LED_MATRIX_MAXIMUM_BRIGHTNESS 255
#endif
@@ -135,7 +131,7 @@ void led_matrix_set_suspend_state(bool state) { g_suspend_state = state; }
void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); }
// Uniform brightness
-void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_eeconfig.val); }
+void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(led_matrix_eeconfig.val); }
void led_matrix_custom(void) {}
@@ -344,5 +340,3 @@ void led_matrix_set_value(uint8_t val) {
led_matrix_set_value_noeeprom(val);
eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
}
-
-void backlight_set(uint8_t val) { led_matrix_set_value(val); }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index 85bae43c15..0817d13573 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -21,10 +21,6 @@
#include "led_matrix_types.h"
-#ifndef BACKLIGHT_ENABLE
-# error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE
-#endif
-
enum led_matrix_effects {
LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
// All new effects go above this line
diff --git a/quantum/process_keycode/process_backlight.c b/quantum/process_keycode/process_backlight.c
index 4d12f6813a..8b70339a55 100644
--- a/quantum/process_keycode/process_backlight.c
+++ b/quantum/process_keycode/process_backlight.c
@@ -16,11 +16,35 @@
#include "process_backlight.h"
-#include "backlight.h"
+#ifdef LED_MATRIX_ENABLE
+# include "led_matrix.h"
+#else
+# include "backlight.h"
+#endif
bool process_backlight(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
+#ifdef LED_MATRIX_ENABLE
+ case BL_ON:
+ led_matrix_enable();
+ return false;
+ case BL_OFF:
+ led_matrix_disable();
+ return false;
+ case BL_DEC:
+ led_matrix_decrease_val();
+ return false;
+ case BL_INC:
+ led_matrix_increase_val();
+ return false;
+ case BL_TOGG:
+ led_matrix_toggle();
+ return false;
+ case BL_STEP:
+ led_matrix_step();
+ return false;
+#else
case BL_ON:
backlight_level(BACKLIGHT_LEVELS);
return false;
@@ -39,10 +63,11 @@ bool process_backlight(uint16_t keycode, keyrecord_t *record) {
case BL_STEP:
backlight_step();
return false;
-#ifdef BACKLIGHT_BREATHING
+# ifdef BACKLIGHT_BREATHING
case BL_BRTG:
backlight_toggle_breathing();
return false;
+# endif
#endif
}
}
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 78601ce6bf..59d95f2f54 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -234,7 +234,7 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef AUDIO_ENABLE
process_audio(keycode, record) &&
#endif
-#ifdef BACKLIGHT_ENABLE
+#if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE)
process_backlight(keycode, record) &&
#endif
#ifdef STENO_ENABLE
@@ -387,15 +387,14 @@ void matrix_init_quantum() {
led_init_ports();
#endif
#ifdef BACKLIGHT_ENABLE
-# ifdef LED_MATRIX_ENABLE
- led_matrix_init();
-# else
backlight_init_ports();
-# endif
#endif
#ifdef AUDIO_ENABLE
audio_init();
#endif
+#ifdef LED_MATRIX_ENABLE
+ led_matrix_init();
+#endif
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_init();
#endif
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 070bd01317..7c2dcaa829 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -30,11 +30,11 @@
#include "keymap.h"
#ifdef BACKLIGHT_ENABLE
-# ifdef LED_MATRIX_ENABLE
-# include "led_matrix.h"
-# else
-# include "backlight.h"
-# endif
+# include "backlight.h"
+#endif
+
+#ifdef LED_MATRIX_ENABLE
+# include "led_matrix.h"
#endif
#if defined(RGBLIGHT_ENABLE)
@@ -98,7 +98,7 @@ extern layer_state_t layer_state;
# include "process_music.h"
#endif
-#ifdef BACKLIGHT_ENABLE
+#if defined(BACKLIGHT_ENABLE) || defined(LED_MATRIX_ENABLE)
# include "process_backlight.h"
#endif
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index 39bc51d5db..9e18fd4e15 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -43,9 +43,14 @@ along with this program. If not, see .
#define EECONFIG_VELOCIKEY (uint8_t *)23
#define EECONFIG_HAPTIC (uint32_t *)24
+
+// Mutually exclusive
+#define EECONFIG_LED_MATRIX (uint32_t *)28
#define EECONFIG_RGB_MATRIX (uint32_t *)28
// Speed & Flags
+#define EECONFIG_LED_MATRIX_EXTENDED (uint16_t *)32
#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32
+
// TODO: Combine these into a single word and single block of EEPROM
#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34
// Size of EEPROM being used, other code can refer to this for available EEPROM
--
cgit v1.2.3
From 2e24cfadb75b00156acf2827d5643d6c2d55a60c Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 11 Mar 2021 05:21:28 +1100
Subject: Remove `FUNC()` (#12161)
---
quantum/quantum_keycodes.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
(limited to 'quantum')
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index e697b71ba5..dab9ba3d71 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -680,16 +680,13 @@ enum quantum_keycodes {
#define KC_DELT KC_DELETE // Del key (four letter code)
-// Alias for function layers than expand past FN31
-#define FUNC(kc) (QK_FUNCTION | (kc))
-
// Aliases
#define C(kc) LCTL(kc)
#define S(kc) LSFT(kc)
#define A(kc) LALT(kc)
#define G(kc) LGUI(kc)
-#define F(kc) FUNC(kc)
+#define F(kc) (QK_FUNCTION | (kc))
#define M(kc) (QK_MACRO | (kc))
#define MACROTAP(kc) (QK_MACRO | (FUNC_TAP << 8) | (kc))
--
cgit v1.2.3
From 40c7ecfdeaf50ab76e10854a84aebfcb82ddb092 Mon Sep 17 00:00:00 2001
From: Joel Challis
Date: Wed, 10 Mar 2021 22:47:36 +0000
Subject: Move gpio wait logic to wait.h (#12067)
---
quantum/quantum.h | 33 --------
tmk_core/common/arm_atsam/_wait.h | 22 ++++++
tmk_core/common/avr/_wait.h | 29 +++++++
tmk_core/common/chibios/_wait.h | 55 ++++++++++++++
tmk_core/common/chibios/chibios_config.h | 1 +
tmk_core/common/chibios/wait.c | 89 ++++++++++++++++++++++
tmk_core/common/test/_wait.h | 22 ++++++
tmk_core/common/wait.h | 125 +++++--------------------------
8 files changed, 235 insertions(+), 141 deletions(-)
create mode 100644 tmk_core/common/arm_atsam/_wait.h
create mode 100644 tmk_core/common/avr/_wait.h
create mode 100644 tmk_core/common/chibios/_wait.h
create mode 100644 tmk_core/common/chibios/wait.c
create mode 100644 tmk_core/common/test/_wait.h
(limited to 'quantum')
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 7c2dcaa829..7c546b5152 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -200,39 +200,6 @@ extern layer_state_t layer_state;
# include "usbpd.h"
#endif
-// Function substitutions to ease GPIO manipulation
-#if defined(__AVR__)
-
-/* The AVR series GPIOs have a one clock read delay for changes in the digital input signal.
- * But here's more margin to make it two clocks. */
-# if !defined(GPIO_INPUT_PIN_DELAY)
-# define GPIO_INPUT_PIN_DELAY 2
-# endif
-# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
-
-#elif defined(__ARMEL__) || defined(__ARMEB__)
-
-/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus
- * to which the GPIO is connected.
- * The connected buses differ depending on the various series of MCUs.
- * And since the instruction execution clock of the CPU and the bus clock of GPIO are different,
- * there is a delay of several clocks to read the change of the input signal.
- *
- * Define this delay with the GPIO_INPUT_PIN_DELAY macro.
- * If the GPIO_INPUT_PIN_DELAY macro is not defined, the following default values will be used.
- * (A fairly large value of 0.25 microseconds is set.)
- */
-# if !defined(GPIO_INPUT_PIN_DELAY)
-# if defined(STM32_SYSCLK)
-# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK / 1000000L / 4)
-# elif defined(KINETIS_SYSCLK_FREQUENCY)
-# define GPIO_INPUT_PIN_DELAY (KINETIS_SYSCLK_FREQUENCY / 1000000L / 4)
-# endif
-# endif
-# define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
-
-#endif
-
// For tri-layer
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3);
layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3);
diff --git a/tmk_core/common/arm_atsam/_wait.h b/tmk_core/common/arm_atsam/_wait.h
new file mode 100644
index 0000000000..41b686b56c
--- /dev/null
+++ b/tmk_core/common/arm_atsam/_wait.h
@@ -0,0 +1,22 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include "clks.h"
+
+#define wait_ms(ms) CLK_delay_ms(ms)
+#define wait_us(us) CLK_delay_us(us)
+#define waitInputPinDelay()
diff --git a/tmk_core/common/avr/_wait.h b/tmk_core/common/avr/_wait.h
new file mode 100644
index 0000000000..56eb316faf
--- /dev/null
+++ b/tmk_core/common/avr/_wait.h
@@ -0,0 +1,29 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include
+
+#define wait_ms(ms) _delay_ms(ms)
+#define wait_us(us) _delay_us(us)
+
+/* The AVR series GPIOs have a one clock read delay for changes in the digital input signal.
+ * But here's more margin to make it two clocks. */
+#ifndef GPIO_INPUT_PIN_DELAY
+# define GPIO_INPUT_PIN_DELAY 2
+#endif
+
+#define waitInputPinDelay() __builtin_avr_delay_cycles(GPIO_INPUT_PIN_DELAY)
diff --git a/tmk_core/common/chibios/_wait.h b/tmk_core/common/chibios/_wait.h
new file mode 100644
index 0000000000..5bface53e1
--- /dev/null
+++ b/tmk_core/common/chibios/_wait.h
@@ -0,0 +1,55 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include
+
+/* chThdSleepX of zero maps to infinite - so we map to a tiny delay to still yield */
+#define wait_ms(ms) \
+ do { \
+ if (ms != 0) { \
+ chThdSleepMilliseconds(ms); \
+ } else { \
+ chThdSleepMicroseconds(1); \
+ } \
+ } while (0)
+#define wait_us(us) \
+ do { \
+ if (us != 0) { \
+ chThdSleepMicroseconds(us); \
+ } else { \
+ chThdSleepMicroseconds(1); \
+ } \
+ } while (0)
+
+/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus
+ * to which the GPIO is connected.
+ * The connected buses differ depending on the various series of MCUs.
+ * And since the instruction execution clock of the CPU and the bus clock of GPIO are different,
+ * there is a delay of several clocks to read the change of the input signal.
+ *
+ * Define this delay with the GPIO_INPUT_PIN_DELAY macro.
+ * If the GPIO_INPUT_PIN_DELAY macro is not defined, the following default values will be used.
+ * (A fairly large value of 0.25 microseconds is set.)
+ */
+
+#include "wait.c"
+
+#ifndef GPIO_INPUT_PIN_DELAY
+# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK / 1000000L / 4)
+#endif
+
+#define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY)
diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h
index bebf026de7..9a66ac3174 100644
--- a/tmk_core/common/chibios/chibios_config.h
+++ b/tmk_core/common/chibios/chibios_config.h
@@ -30,4 +30,5 @@
# define USE_I2CV1
# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed
# define USE_GPIOV1
+# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY
#endif
diff --git a/tmk_core/common/chibios/wait.c b/tmk_core/common/chibios/wait.c
new file mode 100644
index 0000000000..c6270fd95e
--- /dev/null
+++ b/tmk_core/common/chibios/wait.c
@@ -0,0 +1,89 @@
+/* Copyright 2021 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 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 .
+ */
+
+#ifndef __OPTIMIZE__
+# pragma message "Compiler optimizations disabled; wait_cpuclock() won't work as designed"
+#endif
+
+#define CLOCK_DELAY_NOP8 "nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t"
+
+__attribute__((always_inline)) static inline void wait_cpuclock(unsigned int n) { /* n: 1..135 */
+ /* The argument n must be a constant expression.
+ * That way, compiler optimization will remove unnecessary code. */
+ if (n < 1) {
+ return;
+ }
+ if (n > 8) {
+ unsigned int n8 = n / 8;
+ n = n - n8 * 8;
+ switch (n8) {
+ case 16:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 15:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 14:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 13:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 12:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 11:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 10:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 9:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 8:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 7:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 6:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 5:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 4:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 3:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 2:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 1:
+ asm volatile(CLOCK_DELAY_NOP8::: "memory");
+ case 0:
+ break;
+ }
+ }
+ switch (n) {
+ case 8:
+ asm volatile("nop" ::: "memory");
+ case 7:
+ asm volatile("nop" ::: "memory");
+ case 6:
+ asm volatile("nop" ::: "memory");
+ case 5:
+ asm volatile("nop" ::: "memory");
+ case 4:
+ asm volatile("nop" ::: "memory");
+ case 3:
+ asm volatile("nop" ::: "memory");
+ case 2:
+ asm volatile("nop" ::: "memory");
+ case 1:
+ asm volatile("nop" ::: "memory");
+ case 0:
+ break;
+ }
+}
\ No newline at end of file
diff --git a/tmk_core/common/test/_wait.h b/tmk_core/common/test/_wait.h
new file mode 100644
index 0000000000..4e22f593b7
--- /dev/null
+++ b/tmk_core/common/test/_wait.h
@@ -0,0 +1,22 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include
+
+void wait_ms(uint32_t ms);
+#define wait_us(us) wait_ms(us / 1000)
+#define waitInputPinDelay()
diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h
index 28224fe3aa..cf7180fb07 100644
--- a/tmk_core/common/wait.h
+++ b/tmk_core/common/wait.h
@@ -1,3 +1,18 @@
+/* Copyright 2021 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 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 .
+ */
#pragma once
#include
@@ -6,114 +21,8 @@
extern "C" {
#endif
-#if defined(__ARMEL__) || defined(__ARMEB__)
-# ifndef __OPTIMIZE__
-# pragma message "Compiler optimizations disabled; wait_cpuclock() won't work as designed"
-# endif
-
-# define wait_cpuclock(x) wait_cpuclock_allnop(x)
-
-# define CLOCK_DELAY_NOP8 "nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t"
-
-__attribute__((always_inline)) static inline void wait_cpuclock_allnop(unsigned int n) { /* n: 1..135 */
- /* The argument n must be a constant expression.
- * That way, compiler optimization will remove unnecessary code. */
- if (n < 1) {
- return;
- }
- if (n > 8) {
- unsigned int n8 = n / 8;
- n = n - n8 * 8;
- switch (n8) {
- case 16:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 15:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 14:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 13:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 12:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 11:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 10:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 9:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 8:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 7:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 6:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 5:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 4:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 3:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 2:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 1:
- asm volatile(CLOCK_DELAY_NOP8::: "memory");
- case 0:
- break;
- }
- }
- switch (n) {
- case 8:
- asm volatile("nop" ::: "memory");
- case 7:
- asm volatile("nop" ::: "memory");
- case 6:
- asm volatile("nop" ::: "memory");
- case 5:
- asm volatile("nop" ::: "memory");
- case 4:
- asm volatile("nop" ::: "memory");
- case 3:
- asm volatile("nop" ::: "memory");
- case 2:
- asm volatile("nop" ::: "memory");
- case 1:
- asm volatile("nop" ::: "memory");
- case 0:
- break;
- }
-}
-#endif
-
-#if defined(__AVR__)
-# include
-# define wait_ms(ms) _delay_ms(ms)
-# define wait_us(us) _delay_us(us)
-# define wait_cpuclock(x) __builtin_avr_delay_cycles(x)
-#elif defined PROTOCOL_CHIBIOS
-# include
-# define wait_ms(ms) \
- do { \
- if (ms != 0) { \
- chThdSleepMilliseconds(ms); \
- } else { \
- chThdSleepMicroseconds(1); \
- } \
- } while (0)
-# define wait_us(us) \
- do { \
- if (us != 0) { \
- chThdSleepMicroseconds(us); \
- } else { \
- chThdSleepMicroseconds(1); \
- } \
- } while (0)
-#elif defined PROTOCOL_ARM_ATSAM
-# include "clks.h"
-# define wait_ms(ms) CLK_delay_ms(ms)
-# define wait_us(us) CLK_delay_us(us)
-#else // Unit tests
-void wait_ms(uint32_t ms);
-# define wait_us(us) wait_ms(us / 1000)
+#if __has_include_next("_wait.h")
+# include_next "_wait.h" /* Include the platforms _wait.h */
#endif
#ifdef __cplusplus
--
cgit v1.2.3
From f23639517683378bed12792903e0d9cc6a1a6794 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Sat, 13 Mar 2021 11:38:26 +1100
Subject: LED Matrix: Clean up includes (#12197)
---
keyboards/clueboard/66_hotswap/gen1/gen1.c | 2 --
keyboards/terrazzo/terrazzo.c | 1 -
quantum/led_matrix.c | 3 ---
quantum/led_matrix.h | 7 +++++++
quantum/led_matrix_drivers.c | 7 -------
5 files changed, 7 insertions(+), 13 deletions(-)
(limited to 'quantum')
diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c
index dd399317c1..339bd78d5a 100644
--- a/keyboards/clueboard/66_hotswap/gen1/gen1.c
+++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c
@@ -16,8 +16,6 @@
#include "gen1.h"
#ifdef LED_MATRIX_ENABLE
- #include "is31fl3731-simple.h"
-
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c
index f079ded4d7..2afda085b3 100644
--- a/keyboards/terrazzo/terrazzo.c
+++ b/keyboards/terrazzo/terrazzo.c
@@ -17,7 +17,6 @@
#include "terrazzo.h"
#ifdef LED_MATRIX_ENABLE
- #include "is31fl3731-simple.h"
#include
#include "print.h"
#include "quantum.h"
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 39bccdd580..1cbd908c7a 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -17,9 +17,6 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include "quantum.h"
#include "led_matrix.h"
#include "progmem.h"
#include "config.h"
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index 0817d13573..e4322a1509 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -19,7 +19,14 @@
#pragma once
+#include
+#include
#include "led_matrix_types.h"
+#include "quantum.h"
+
+#ifdef IS31FL3731
+# include "is31fl3731-simple.h"
+#endif
enum led_matrix_effects {
LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c
index eddf3f2863..370c5e6853 100644
--- a/quantum/led_matrix_drivers.c
+++ b/quantum/led_matrix_drivers.c
@@ -15,9 +15,6 @@
* along with this program. If not, see .
*/
-#include
-#include
-#include "quantum.h"
#include "led_matrix.h"
/* Each driver needs to define a struct:
@@ -30,10 +27,6 @@
#if defined(IS31FL3731) || defined(IS31FL3733)
-# if defined(IS31FL3731)
-# include "is31fl3731-simple.h"
-# endif
-
# include "i2c_master.h"
static void init(void) {
--
cgit v1.2.3
From 1d341ffbb0dfbf45139c103123549c3c0fec816e Mon Sep 17 00:00:00 2001
From: Michael Stapelberg
Date: Tue, 16 Mar 2021 20:45:21 +0100
Subject: core: add support for MK66F18 (Teensy 3.6) micro controller (#12258)
This is in preparation for https://github.com/qmk/qmk_firmware/pull/10171---
data/schemas/keyboard.jsonschema | 2 +-
lib/python/qmk/constants.py | 2 +-
quantum/mcu_selection.mk | 27 +++++++++++++++++++++++++++
tmk_core/common/chibios/bootloader.c | 2 +-
tmk_core/common/chibios/chibios_config.h | 4 ++++
5 files changed, 34 insertions(+), 3 deletions(-)
(limited to 'quantum')
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index ec03a8828b..3034242fd9 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -25,7 +25,7 @@
},
"processor": {
"type": "string",
- "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
+ "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"board": {
"type": "string",
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index 3ed69f3bf9..b5cdaf6a60 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -10,7 +10,7 @@ QMK_FIRMWARE = Path.cwd()
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
-CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32G431', 'STM32G474'
+CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32G431', 'STM32G474'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index f7329fc4d9..53e03a8054 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -81,6 +81,33 @@ ifneq ($(findstring MK20DX256, $(MCU)),)
BOARD ?= PJRC_TEENSY_3_1
endif
+ifneq ($(findstring MK66F18, $(MCU)),)
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = KINETIS
+ MCU_SERIES = MK66F18
+
+ # Linker script to use
+ # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or /ld/
+ MCU_LDSCRIPT ?= MK66FX1M0
+
+ # Startup code to use
+ # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= MK66F18
+
+ # Board: it should exist either in /os/hal/boards/,
+ # /boards/, or drivers/boards/
+ BOARD ?= PJRC_TEENSY_3_6
+endif
+
ifneq ($(findstring STM32F042, $(MCU)),)
# Cortex version
MCU = cortex-m0
diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c
index 6cabcc4b81..4a175a6283 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/tmk_core/common/chibios/bootloader.c
@@ -79,7 +79,7 @@ void enter_bootloader_mode_if_requested(void) {
}
}
-#elif defined(KL2x) || defined(K20x) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS
+#elif defined(KL2x) || defined(K20x) || defined(MK66F18) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS
/* Kinetis */
# if defined(BOOTLOADER_KIIBOHD)
diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h
index 9a66ac3174..1d8ace4955 100644
--- a/tmk_core/common/chibios/chibios_config.h
+++ b/tmk_core/common/chibios/chibios_config.h
@@ -32,3 +32,7 @@
# define USE_GPIOV1
# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY
#endif
+
+#if defined(MK66F18)
+# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY
+#endif
--
cgit v1.2.3
From bd18405cf0107e9a0924def75d1fc6448dd3945b Mon Sep 17 00:00:00 2001
From: Ryan
Date: Wed, 24 Mar 2021 13:09:56 +1100
Subject: LED Matrix: Fix up eeconfig code (#12327)
---
quantum/led_matrix.c | 75 ++++++++++++++++++++++++++++++----------------
quantum/led_matrix_types.h | 27 +++++++++++++++++
2 files changed, 76 insertions(+), 26 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 1cbd908c7a..ceb236809f 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -34,16 +34,41 @@ led_eeconfig_t led_matrix_eeconfig;
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
-#ifndef LED_DISABLE_AFTER_TIMEOUT
-# define LED_DISABLE_AFTER_TIMEOUT 0
+#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT)
+# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL)
+#endif
+
+#ifndef LED_DISABLE_TIMEOUT
+# define LED_DISABLE_TIMEOUT 0
#endif
#ifndef LED_DISABLE_WHEN_USB_SUSPENDED
# define LED_DISABLE_WHEN_USB_SUSPENDED false
#endif
-#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > 255
-# define LED_MATRIX_MAXIMUM_BRIGHTNESS 255
+#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
+# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
+# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
+#endif
+
+#if !defined(LED_MATRIX_VAL_STEP)
+# define LED_MATRIX_VAL_STEP 8
+#endif
+
+#if !defined(LED_MATRIX_SPD_STEP)
+# define LED_MATRIX_SPD_STEP 16
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_MODE)
+# define LED_MATRIX_STARTUP_MODE LED_MATRIX_UNIFORM_BRIGHTNESS
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_VAL)
+# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_SPD)
+# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
#endif
bool g_suspend_state = false;
@@ -57,21 +82,21 @@ uint8_t g_key_hit[DRIVER_LED_TOTAL];
// Ticks since any key was last hit.
uint32_t g_any_key_hit = 0;
-uint32_t eeconfig_read_led_matrix(void) { return eeprom_read_dword(EECONFIG_LED_MATRIX); }
+void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
-void eeconfig_update_led_matrix(uint32_t config_value) { eeprom_update_dword(EECONFIG_LED_MATRIX, config_value); }
+void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
void eeconfig_update_led_matrix_default(void) {
dprintf("eeconfig_update_led_matrix_default\n");
led_matrix_eeconfig.enable = 1;
- led_matrix_eeconfig.mode = LED_MATRIX_UNIFORM_BRIGHTNESS;
- led_matrix_eeconfig.val = 128;
- led_matrix_eeconfig.speed = 0;
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE;
+ led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL;
+ led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD;
+ eeconfig_update_led_matrix();
}
void eeconfig_debug_led_matrix(void) {
- dprintf("led_matrix_eeconfig eeprom\n");
+ dprintf("led_matrix_eeconfig EEPROM\n");
dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable);
dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode);
dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val);
@@ -154,7 +179,7 @@ void led_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20));
+ bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_TIMEOUT));
uint8_t effect = suspend_backlight ? 0 : led_matrix_eeconfig.mode;
// this gets ticked at 20 Hz.
@@ -220,12 +245,10 @@ void led_matrix_init(void) {
eeconfig_update_led_matrix_default();
}
- led_matrix_eeconfig.raw = eeconfig_read_led_matrix();
-
+ eeconfig_read_led_matrix();
if (!led_matrix_eeconfig.mode) {
dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
eeconfig_update_led_matrix_default();
- led_matrix_eeconfig.raw = eeconfig_read_led_matrix();
}
eeconfig_debug_led_matrix(); // display current eeprom values
@@ -269,19 +292,19 @@ uint32_t led_matrix_get_tick(void) { return g_tick; }
void led_matrix_toggle(void) {
led_matrix_eeconfig.enable ^= 1;
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_enable(void) {
led_matrix_eeconfig.enable = 1;
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_enable_noeeprom(void) { led_matrix_eeconfig.enable = 1; }
void led_matrix_disable(void) {
led_matrix_eeconfig.enable = 0;
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_disable_noeeprom(void) { led_matrix_eeconfig.enable = 0; }
@@ -291,7 +314,7 @@ void led_matrix_step(void) {
if (led_matrix_eeconfig.mode >= LED_MATRIX_EFFECT_MAX) {
led_matrix_eeconfig.mode = 1;
}
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_step_reverse(void) {
@@ -299,33 +322,33 @@ void led_matrix_step_reverse(void) {
if (led_matrix_eeconfig.mode < 1) {
led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1;
}
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_increase_val(void) {
led_matrix_eeconfig.val = increment(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_decrease_val(void) {
led_matrix_eeconfig.val = decrement(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
void led_matrix_increase_speed(void) {
led_matrix_eeconfig.speed = increment(led_matrix_eeconfig.speed, 1, 0, 3);
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw); // EECONFIG needs to be increased to support this
+ eeconfig_update_led_matrix(); // EECONFIG needs to be increased to support this
}
void led_matrix_decrease_speed(void) {
led_matrix_eeconfig.speed = decrement(led_matrix_eeconfig.speed, 1, 0, 3);
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw); // EECONFIG needs to be increased to support this
+ eeconfig_update_led_matrix(); // EECONFIG needs to be increased to support this
}
void led_matrix_mode(uint8_t mode, bool eeprom_write) {
led_matrix_eeconfig.mode = mode;
if (eeprom_write) {
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
}
@@ -335,5 +358,5 @@ void led_matrix_set_value_noeeprom(uint8_t val) { led_matrix_eeconfig.val = val;
void led_matrix_set_value(uint8_t val) {
led_matrix_set_value_noeeprom(val);
- eeconfig_update_led_matrix(led_matrix_eeconfig.raw);
+ eeconfig_update_led_matrix();
}
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix_types.h
index 669b67042b..be0e10bb9f 100644
--- a/quantum/led_matrix_types.h
+++ b/quantum/led_matrix_types.h
@@ -29,16 +29,43 @@
# pragma pack(push, 1)
#endif
+#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
+# define LED_MATRIX_KEYREACTIVE_ENABLED
+#endif
+
// Last led hit
#ifndef LED_HITS_TO_REMEMBER
# define LED_HITS_TO_REMEMBER 8
#endif // LED_HITS_TO_REMEMBER
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+typedef struct PACKED {
+ uint8_t count;
+ uint8_t x[LED_HITS_TO_REMEMBER];
+ uint8_t y[LED_HITS_TO_REMEMBER];
+ uint8_t index[LED_HITS_TO_REMEMBER];
+ uint16_t tick[LED_HITS_TO_REMEMBER];
+} last_hit_t;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef enum led_task_states { STARTING, RENDERING, FLUSHING, SYNCING } led_task_states;
+
+typedef uint8_t led_flags_t;
+
+typedef struct PACKED {
+ uint8_t iter;
+ led_flags_t flags;
+ bool init;
+} effect_params_t;
+
typedef struct PACKED {
uint8_t x;
uint8_t y;
} point_t;
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
+
#define LED_FLAG_ALL 0xFF
#define LED_FLAG_NONE 0x00
#define LED_FLAG_MODIFIER 0x01
--
cgit v1.2.3
From ff41c22fdccd30cdba44ba840d68261f74f45135 Mon Sep 17 00:00:00 2001
From: XScorpion2
Date: Thu, 25 Mar 2021 06:33:18 -0500
Subject: Adding keyboard level weak function for slave matrix scan (#12317)
---
quantum/matrix.h | 5 +++++
quantum/split_common/matrix.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
(limited to 'quantum')
diff --git a/quantum/matrix.h b/quantum/matrix.h
index ce57010a47..3fe691aaee 100644
--- a/quantum/matrix.h
+++ b/quantum/matrix.h
@@ -74,6 +74,11 @@ void matrix_scan_kb(void);
void matrix_init_user(void);
void matrix_scan_user(void);
+#ifdef SPLIT_KEYBOARD
+void matrix_slave_scan_kb(void);
+void matrix_slave_scan_user(void);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index d6636b886a..f8de17809d 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -43,6 +43,7 @@ extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
uint8_t thisHand, thatHand;
// user-defined overridable functions
+__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
__attribute__((weak)) void matrix_slave_scan_user(void) {}
static inline void setPinOutput_writeLow(pin_t pin) {
@@ -284,7 +285,7 @@ bool matrix_post_scan(void) {
} else {
transport_slave(matrix + thatHand, matrix + thisHand);
- matrix_slave_scan_user();
+ matrix_slave_scan_kb();
}
return changed;
--
cgit v1.2.3
From 2ae38e9c43cc689be65f04ea5c101b9f46a38c5e Mon Sep 17 00:00:00 2001
From: Ryan
Date: Sun, 28 Mar 2021 17:59:44 +1100
Subject: LED Matrix: Config functions (#12361)
---
quantum/led_matrix.c | 160 ++++++++++++++++++++-------------------------
quantum/led_matrix.h | 32 +++++++--
tmk_core/common/keyboard.c | 6 ++
3 files changed, 104 insertions(+), 94 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index ceb236809f..ec8ff852d5 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -24,6 +24,8 @@
#include
#include
+#include
+
led_eeconfig_t led_matrix_eeconfig;
#ifndef MAX
@@ -211,23 +213,6 @@ __attribute__((weak)) void led_matrix_indicators_kb(void) {}
__attribute__((weak)) void led_matrix_indicators_user(void) {}
-// void led_matrix_set_indicator_index(uint8_t *index, uint8_t row, uint8_t column)
-// {
-// if (row >= MATRIX_ROWS)
-// {
-// // Special value, 255=none, 254=all
-// *index = row;
-// }
-// else
-// {
-// // This needs updated to something like
-// // uint8_t led[8];
-// // uint8_t led_count = map_row_column_to_led(row, column, led);
-// // for(uint8_t i = 0; i < led_count; i++)
-// map_row_column_to_led(row, column, index);
-// }
-// }
-
void led_matrix_init(void) {
led_matrix_driver.init();
@@ -254,109 +239,108 @@ void led_matrix_init(void) {
eeconfig_debug_led_matrix(); // display current eeprom values
}
-// Deals with the messy details of incrementing an integer
-static uint8_t increment(uint8_t value, uint8_t step, uint8_t min, uint8_t max) {
- int16_t new_value = value;
- new_value += step;
- return MIN(MAX(new_value, min), max);
-}
-
-static uint8_t decrement(uint8_t value, uint8_t step, uint8_t min, uint8_t max) {
- int16_t new_value = value;
- new_value -= step;
- return MIN(MAX(new_value, min), max);
-}
-
-// void *backlight_get_custom_key_value_eeprom_address(uint8_t led) {
-// // 3 bytes per value
-// return EECONFIG_LED_MATRIX + (led * 3);
-// }
-
-// void backlight_get_key_value(uint8_t led, uint8_t *value) {
-// void *address = backlight_get_custom_key_value_eeprom_address(led);
-// value = eeprom_read_byte(address);
-// }
-
-// void backlight_set_key_value(uint8_t row, uint8_t column, uint8_t value) {
-// uint8_t led[8];
-// uint8_t led_count = map_row_column_to_led(row, column, led);
-// for(uint8_t i = 0; i < led_count; i++) {
-// if (led[i] < DRIVER_LED_TOTAL) {
-// void *address = backlight_get_custom_key_value_eeprom_address(led[i]);
-// eeprom_update_byte(address, value);
-// }
-// }
-// }
-
uint32_t led_matrix_get_tick(void) { return g_tick; }
-void led_matrix_toggle(void) {
+void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
- eeconfig_update_led_matrix();
+ if (write_to_eeprom) {
+ eeconfig_update_led_matrix();
+ }
+ dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable);
}
+void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); }
+void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); }
void led_matrix_enable(void) {
- led_matrix_eeconfig.enable = 1;
+ led_matrix_enable_noeeprom();
eeconfig_update_led_matrix();
}
void led_matrix_enable_noeeprom(void) { led_matrix_eeconfig.enable = 1; }
void led_matrix_disable(void) {
- led_matrix_eeconfig.enable = 0;
+ led_matrix_disable_noeeprom();
eeconfig_update_led_matrix();
}
void led_matrix_disable_noeeprom(void) { led_matrix_eeconfig.enable = 0; }
-void led_matrix_step(void) {
- led_matrix_eeconfig.mode++;
- if (led_matrix_eeconfig.mode >= LED_MATRIX_EFFECT_MAX) {
- led_matrix_eeconfig.mode = 1;
- }
- eeconfig_update_led_matrix();
-}
+uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; }
-void led_matrix_step_reverse(void) {
- led_matrix_eeconfig.mode--;
- if (led_matrix_eeconfig.mode < 1) {
+void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
+ if (!led_matrix_eeconfig.enable) {
+ return;
+ }
+ if (mode < 1) {
+ led_matrix_eeconfig.mode = 1;
+ } else if (mode >= LED_MATRIX_EFFECT_MAX) {
led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1;
+ } else {
+ led_matrix_eeconfig.mode = mode;
}
- eeconfig_update_led_matrix();
+ if (write_to_eeprom) {
+ eeconfig_update_led_matrix();
+ }
+ dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode);
}
+void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); }
+void led_matrix_mode(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, true); }
-void led_matrix_increase_val(void) {
- led_matrix_eeconfig.val = increment(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
- eeconfig_update_led_matrix();
-}
+uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; }
-void led_matrix_decrease_val(void) {
- led_matrix_eeconfig.val = decrement(led_matrix_eeconfig.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS);
- eeconfig_update_led_matrix();
+void led_matrix_step_helper(bool write_to_eeprom) {
+ uint8_t mode = led_matrix_eeconfig.mode + 1;
+ led_matrix_mode_eeprom_helper((mode < LED_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom);
}
+void led_matrix_step_noeeprom(void) { led_matrix_step_helper(false); }
+void led_matrix_step(void) { led_matrix_step_helper(true); }
-void led_matrix_increase_speed(void) {
- led_matrix_eeconfig.speed = increment(led_matrix_eeconfig.speed, 1, 0, 3);
- eeconfig_update_led_matrix(); // EECONFIG needs to be increased to support this
+void led_matrix_step_reverse_helper(bool write_to_eeprom) {
+ uint8_t mode = led_matrix_eeconfig.mode - 1;
+ led_matrix_mode_eeprom_helper((mode < 1) ? LED_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom);
}
+void led_matrix_step_reverse_noeeprom(void) { led_matrix_step_reverse_helper(false); }
+void led_matrix_step_reverse(void) { led_matrix_step_reverse_helper(true); }
-void led_matrix_decrease_speed(void) {
- led_matrix_eeconfig.speed = decrement(led_matrix_eeconfig.speed, 1, 0, 3);
- eeconfig_update_led_matrix(); // EECONFIG needs to be increased to support this
+void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) {
+ if (!led_matrix_eeconfig.enable) {
+ return;
+ }
+ led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val;
+ if (write_to_eeprom) {
+ eeconfig_update_led_matrix();
+ }
+ dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val);
}
+void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); }
+void led_matrix_set_val(uint8_t val) { led_matrix_set_val_eeprom_helper(val, true); }
+
+uint8_t led_matrix_get_val(void) { return led_matrix_eeconfig.val; }
+
+void led_matrix_increase_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qadd8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
+void led_matrix_increase_val_noeeprom(void) { led_matrix_increase_val_helper(false); }
+void led_matrix_increase_val(void) { led_matrix_increase_val_helper(true); }
-void led_matrix_mode(uint8_t mode, bool eeprom_write) {
- led_matrix_eeconfig.mode = mode;
- if (eeprom_write) {
+void led_matrix_decrease_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
+void led_matrix_decrease_val_noeeprom(void) { led_matrix_decrease_val_helper(false); }
+void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); }
+
+void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
+ led_matrix_eeconfig.speed = speed;
+ if (write_to_eeprom) {
eeconfig_update_led_matrix();
}
+ dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed);
}
+void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); }
+void led_matrix_set_speed(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, true); }
-uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; }
+uint8_t led_matrix_get_speed(void) { return led_matrix_eeconfig.speed; }
-void led_matrix_set_value_noeeprom(uint8_t val) { led_matrix_eeconfig.val = val; }
+void led_matrix_increase_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qadd8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
+void led_matrix_increase_speed_noeeprom(void) { led_matrix_increase_speed_helper(false); }
+void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); }
-void led_matrix_set_value(uint8_t val) {
- led_matrix_set_value_noeeprom(val);
- eeconfig_update_led_matrix();
-}
+void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
+void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); }
+void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index e4322a1509..fd7ef7d29e 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -28,6 +28,14 @@
# include "is31fl3731-simple.h"
#endif
+#ifndef LED_MATRIX_LED_FLUSH_LIMIT
+# define LED_MATRIX_LED_FLUSH_LIMIT 16
+#endif
+
+#ifndef LED_MATRIX_LED_PROCESS_LIMIT
+# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
+#endif
+
enum led_matrix_effects {
LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
// All new effects go above this line
@@ -38,7 +46,7 @@ void led_matrix_set_index_value(int index, uint8_t value);
void led_matrix_set_index_value_all(uint8_t value);
// This runs after another backlight effect and replaces
-// colors already set
+// values already set
void led_matrix_indicators(void);
void led_matrix_indicators_kb(void);
void led_matrix_indicators_user(void);
@@ -62,21 +70,33 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record);
uint32_t led_matrix_get_tick(void);
void led_matrix_toggle(void);
+void led_matrix_toggle_noeeprom(void);
void led_matrix_enable(void);
void led_matrix_enable_noeeprom(void);
void led_matrix_disable(void);
void led_matrix_disable_noeeprom(void);
+uint8_t led_matrix_is_enabled(void);
+void led_matrix_mode(uint8_t mode);
+void led_matrix_mode_noeeprom(uint8_t mode);
+uint8_t led_matrix_get_mode(void);
void led_matrix_step(void);
+void led_matrix_step_noeeprom(void);
void led_matrix_step_reverse(void);
+void led_matrix_step_reverse_noeeprom(void);
+void led_matrix_set_val(uint8_t val);
+void led_matrix_set_val_noeeprom(uint8_t val);
+uint8_t led_matrix_get_val(void);
void led_matrix_increase_val(void);
+void led_matrix_increase_val_noeeprom(void);
void led_matrix_decrease_val(void);
+void led_matrix_decrease_val_noeeprom(void);
+void led_matrix_set_speed(uint8_t speed);
+void led_matrix_set_speed_noeeprom(uint8_t speed);
+uint8_t led_matrix_get_speed(void);
void led_matrix_increase_speed(void);
+void led_matrix_increase_speed_noeeprom(void);
void led_matrix_decrease_speed(void);
-void led_matrix_mode(uint8_t mode, bool eeprom_write);
-void led_matrix_mode_noeeprom(uint8_t mode);
-uint8_t led_matrix_get_mode(void);
-void led_matrix_set_value(uint8_t mode);
-void led_matrix_set_value_noeeprom(uint8_t mode);
+void led_matrix_decrease_speed_noeeprom(void);
typedef struct {
/* Perform any initialisation required for the other driver functions to work. */
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 65d9e00c7a..e473806b21 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -49,6 +49,9 @@ along with this program. If not, see .
#ifdef RGBLIGHT_ENABLE
# include "rgblight.h"
#endif
+#ifdef LED_MATRIX_ENABLE
+# include "led_matrix.h"
+#endif
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
#endif
@@ -412,6 +415,9 @@ MATRIX_LOOP_END:
rgblight_task();
#endif
+#ifdef LED_MATRIX_ENABLE
+ led_matrix_task();
+#endif
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_task();
#endif
--
cgit v1.2.3
From 8880e89bcd3e40cee7772cd8cb07c3021586e853 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Sat, 3 Apr 2021 11:45:56 +1100
Subject: Big quantum_keycodes cleanup (#12249)
---
quantum/quantum_keycodes.h | 883 +++++++++++++++++++++------------------------
1 file changed, 417 insertions(+), 466 deletions(-)
(limited to 'quantum')
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 0361e4cf9c..5e1b16d944 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -16,19 +16,7 @@
#pragma once
-#if defined(SEQUENCER_ENABLE)
-# include "sequencer.h"
-#endif
-
-#ifndef MIDI_ENABLE_STRICT
-# define MIDI_ENABLE_STRICT 0
-#endif
-
-#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
-# ifndef MIDI_TONE_KEYCODE_OCTAVES
-# define MIDI_TONE_KEYCODE_OCTAVES 3
-# endif
-#endif
+#include "sequencer.h"
// Fillers to make layering more clear
#define _______ KC_TRNS
@@ -67,6 +55,8 @@ enum quantum_keycodes {
QK_ONE_SHOT_LAYER_MAX = 0x54FF,
QK_ONE_SHOT_MOD = 0x5500,
QK_ONE_SHOT_MOD_MAX = 0x55FF,
+ QK_SWAP_HANDS = 0x5600,
+ QK_SWAP_HANDS_MAX = 0x56FF,
QK_TAP_DANCE = 0x5700,
QK_TAP_DANCE_MAX = 0x57FF,
QK_LAYER_TAP_TOGGLE = 0x5800,
@@ -77,8 +67,7 @@ enum quantum_keycodes {
QK_STENO_BOLT = 0x5A30,
QK_STENO_GEMINI = 0x5A31,
QK_STENO_MAX = 0x5A3F,
- QK_SWAP_HANDS = 0x5B00,
- QK_SWAP_HANDS_MAX = 0x5BFF,
+ // 0x5C00 - 0x5FFF are reserved, see below
QK_MOD_TAP = 0x6000,
QK_MOD_TAP_MAX = 0x7FFF,
QK_UNICODE = 0x8000,
@@ -90,498 +79,443 @@ enum quantum_keycodes {
// Loose keycodes - to be used directly
RESET = 0x5C00,
- DEBUG,
- MAGIC_SWAP_CONTROL_CAPSLOCK,
- MAGIC_CAPSLOCK_TO_CONTROL,
- MAGIC_SWAP_LALT_LGUI,
- MAGIC_SWAP_RALT_RGUI,
- MAGIC_NO_GUI,
- MAGIC_SWAP_GRAVE_ESC,
- MAGIC_SWAP_BACKSLASH_BACKSPACE,
- MAGIC_HOST_NKRO,
- MAGIC_SWAP_ALT_GUI,
- MAGIC_UNSWAP_CONTROL_CAPSLOCK,
- MAGIC_UNCAPSLOCK_TO_CONTROL,
- MAGIC_UNSWAP_LALT_LGUI,
- MAGIC_UNSWAP_RALT_RGUI,
- MAGIC_UNNO_GUI,
- MAGIC_UNSWAP_GRAVE_ESC,
- MAGIC_UNSWAP_BACKSLASH_BACKSPACE,
- MAGIC_UNHOST_NKRO,
- MAGIC_UNSWAP_ALT_GUI,
- MAGIC_TOGGLE_NKRO,
- MAGIC_TOGGLE_ALT_GUI,
- GRAVE_ESC,
-
-// Leader key
-#ifdef LEADER_ENABLE
- KC_LEAD,
-#endif
-
-// Auto Shift setup
-#ifndef AUTO_SHIFT_NO_SETUP
- KC_ASUP,
- KC_ASDN,
- KC_ASRP,
-#endif
- KC_ASTG,
- KC_ASON,
- KC_ASOFF,
-
- // Audio on/off/toggle
- AU_ON,
- AU_OFF,
- AU_TOG,
-
- // Faux clicky as part of main audio feature
- CLICKY_TOGGLE,
- CLICKY_ENABLE,
- CLICKY_DISABLE,
- CLICKY_UP,
- CLICKY_DOWN,
- CLICKY_RESET,
-
- // Music mode on/off/toggle
- MU_ON,
- MU_OFF,
- MU_TOG,
-
- // Music mode cycle
- MU_MOD,
-
- // Music voice iterate
- MUV_IN,
- MUV_DE,
-
-// Midi
-#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
- MI_ON,
- MI_OFF,
- MI_TOG,
-#endif
-
-#if !MIDI_ENABLE_STRICT || (defined(MIDI_ENABLE) && defined(MIDI_ADVANCED))
- MIDI_TONE_MIN,
-
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 0
- MI_C = MIDI_TONE_MIN,
- MI_Cs,
+ DEBUG, // 5C01
+
+ // Magic
+ MAGIC_SWAP_CONTROL_CAPSLOCK, // 5C02
+ MAGIC_CAPSLOCK_TO_CONTROL, // 5C03
+ MAGIC_SWAP_LALT_LGUI, // 5C04
+ MAGIC_SWAP_RALT_RGUI, // 5C05
+ MAGIC_NO_GUI, // 5C06
+ MAGIC_SWAP_GRAVE_ESC, // 5C07
+ MAGIC_SWAP_BACKSLASH_BACKSPACE, // 5C08
+ MAGIC_HOST_NKRO, // 5C09
+ MAGIC_SWAP_ALT_GUI, // 5C0A
+ MAGIC_UNSWAP_CONTROL_CAPSLOCK, // 5C0B
+ MAGIC_UNCAPSLOCK_TO_CONTROL, // 5C0C
+ MAGIC_UNSWAP_LALT_LGUI, // 5C0D
+ MAGIC_UNSWAP_RALT_RGUI, // 5C0E
+ MAGIC_UNNO_GUI, // 5C0F
+ MAGIC_UNSWAP_GRAVE_ESC, // 5C10
+ MAGIC_UNSWAP_BACKSLASH_BACKSPACE, // 5C11
+ MAGIC_UNHOST_NKRO, // 5C12
+ MAGIC_UNSWAP_ALT_GUI, // 5C13
+ MAGIC_TOGGLE_NKRO, // 5C14
+ MAGIC_TOGGLE_ALT_GUI, // 5C15
+
+ // Grave Escape
+ GRAVE_ESC, // 5C16
+
+ // Auto Shift
+ KC_ASUP, // 5C17
+ KC_ASDN, // 5C18
+ KC_ASRP, // 5C19
+ KC_ASTG, // 5C1A
+ KC_ASON, // 5C1B
+ KC_ASOFF, // 5C1C
+
+ // Audio
+ AU_ON, // 5C1D
+ AU_OFF, // 5C1E
+ AU_TOG, // 5C1F
+
+ // Audio Clicky
+ CLICKY_TOGGLE, // 5C20
+ CLICKY_ENABLE, // 5C21
+ CLICKY_DISABLE, // 5C22
+ CLICKY_UP, // 5C23
+ CLICKY_DOWN, // 5C24
+ CLICKY_RESET, // 5C25
+
+ // Music mode
+ MU_ON, // 5C26
+ MU_OFF, // 5C27
+ MU_TOG, // 5C28
+ MU_MOD, // 5C29
+ MUV_IN, // 5C2A
+ MUV_DE, // 5C2B
+
+ // MIDI
+ MI_ON, // 5C2C
+ MI_OFF, // 5C2D
+ MI_TOG, // 5C2E
+
+ MI_C, // 5C2F
+ MI_Cs, // 5C30
MI_Db = MI_Cs,
- MI_D,
- MI_Ds,
+ MI_D, // 5C31
+ MI_Ds, // 5C32
MI_Eb = MI_Ds,
- MI_E,
- MI_F,
- MI_Fs,
+ MI_E, // 5C33
+ MI_F, // 5C34
+ MI_Fs, // 5C35
MI_Gb = MI_Fs,
- MI_G,
- MI_Gs,
+ MI_G, // 5C36
+ MI_Gs, // 5C37
MI_Ab = MI_Gs,
- MI_A,
- MI_As,
+ MI_A, // 5C38
+ MI_As, // 5C39
MI_Bb = MI_As,
- MI_B,
-# endif
+ MI_B, // 5C3A
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 1
- MI_C_1,
- MI_Cs_1,
+ MI_C_1, // 5C3B
+ MI_Cs_1, // 5C3C
MI_Db_1 = MI_Cs_1,
- MI_D_1,
- MI_Ds_1,
+ MI_D_1, // 5C3D
+ MI_Ds_1, // 5C3E
MI_Eb_1 = MI_Ds_1,
- MI_E_1,
- MI_F_1,
- MI_Fs_1,
+ MI_E_1, // 5C3F
+ MI_F_1, // 5C40
+ MI_Fs_1, // 5C41
MI_Gb_1 = MI_Fs_1,
- MI_G_1,
- MI_Gs_1,
+ MI_G_1, // 5C42
+ MI_Gs_1, // 5C43
MI_Ab_1 = MI_Gs_1,
- MI_A_1,
- MI_As_1,
+ MI_A_1, // 5C44
+ MI_As_1, // 5C45
MI_Bb_1 = MI_As_1,
- MI_B_1,
-# endif
+ MI_B_1, // 5C46
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 2
- MI_C_2,
- MI_Cs_2,
+ MI_C_2, // 5C47
+ MI_Cs_2, // 5C48
MI_Db_2 = MI_Cs_2,
- MI_D_2,
- MI_Ds_2,
+ MI_D_2, // 5C49
+ MI_Ds_2, // 5C4A
MI_Eb_2 = MI_Ds_2,
- MI_E_2,
- MI_F_2,
- MI_Fs_2,
+ MI_E_2, // 5C4B
+ MI_F_2, // 5C4C
+ MI_Fs_2, // 5C4D
MI_Gb_2 = MI_Fs_2,
- MI_G_2,
- MI_Gs_2,
+ MI_G_2, // 5C4E
+ MI_Gs_2, // 5C4F
MI_Ab_2 = MI_Gs_2,
- MI_A_2,
- MI_As_2,
+ MI_A_2, // 5C50
+ MI_As_2, // 5C51
MI_Bb_2 = MI_As_2,
- MI_B_2,
-# endif
+ MI_B_2, // 5C52
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 3
- MI_C_3,
- MI_Cs_3,
+ MI_C_3, // 5C53
+ MI_Cs_3, // 5C54
MI_Db_3 = MI_Cs_3,
- MI_D_3,
- MI_Ds_3,
+ MI_D_3, // 5C55
+ MI_Ds_3, // 5C56
MI_Eb_3 = MI_Ds_3,
- MI_E_3,
- MI_F_3,
- MI_Fs_3,
+ MI_E_3, // 5C57
+ MI_F_3, // 5C58
+ MI_Fs_3, // 5C59
MI_Gb_3 = MI_Fs_3,
- MI_G_3,
- MI_Gs_3,
+ MI_G_3, // 5C5A
+ MI_Gs_3, // 5C5B
MI_Ab_3 = MI_Gs_3,
- MI_A_3,
- MI_As_3,
+ MI_A_3, // 5C5C
+ MI_As_3, // 5C5D
MI_Bb_3 = MI_As_3,
- MI_B_3,
-# endif
+ MI_B_3, // 5C5E
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 4
- MI_C_4,
- MI_Cs_4,
+ MI_C_4, // 5C5F
+ MI_Cs_4, // 5C60
MI_Db_4 = MI_Cs_4,
- MI_D_4,
- MI_Ds_4,
+ MI_D_4, // 5C61
+ MI_Ds_4, // 5C62
MI_Eb_4 = MI_Ds_4,
- MI_E_4,
- MI_F_4,
- MI_Fs_4,
+ MI_E_4, // 5C63
+ MI_F_4, // 5C64
+ MI_Fs_4, // 5C65
MI_Gb_4 = MI_Fs_4,
- MI_G_4,
- MI_Gs_4,
+ MI_G_4, // 5C66
+ MI_Gs_4, // 5C67
MI_Ab_4 = MI_Gs_4,
- MI_A_4,
- MI_As_4,
+ MI_A_4, // 5C68
+ MI_As_4, // 5C69
MI_Bb_4 = MI_As_4,
- MI_B_4,
-# endif
+ MI_B_4, // 5C6A
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
- MI_C_5,
- MI_Cs_5,
+ MI_C_5, // 5C6B
+ MI_Cs_5, // 5C6C
MI_Db_5 = MI_Cs_5,
- MI_D_5,
- MI_Ds_5,
+ MI_D_5, // 5C6D
+ MI_Ds_5, // 5C6E
MI_Eb_5 = MI_Ds_5,
- MI_E_5,
- MI_F_5,
- MI_Fs_5,
+ MI_E_5, // 5C6F
+ MI_F_5, // 5C70
+ MI_Fs_5, // 5C71
MI_Gb_5 = MI_Fs_5,
- MI_G_5,
- MI_Gs_5,
+ MI_G_5, // 5C72
+ MI_Gs_5, // 5C73
MI_Ab_5 = MI_Gs_5,
- MI_A_5,
- MI_As_5,
+ MI_A_5, // 5C74
+ MI_As_5, // 5C75
MI_Bb_5 = MI_As_5,
- MI_B_5,
-# endif
-
-# if !MIDI_ENABLE_STRICT || MIDI_TONE_KEYCODE_OCTAVES > 5
- MIDI_TONE_MAX = MI_B_5,
-# elif MIDI_TONE_KEYCODE_OCTAVES > 4
- MIDI_TONE_MAX = MI_B_4,
-# elif MIDI_TONE_KEYCODE_OCTAVES > 3
- MIDI_TONE_MAX = MI_B_3,
-# elif MIDI_TONE_KEYCODE_OCTAVES > 2
- MIDI_TONE_MAX = MI_B_2,
-# elif MIDI_TONE_KEYCODE_OCTAVES > 1
- MIDI_TONE_MAX = MI_B_1,
-# elif MIDI_TONE_KEYCODE_OCTAVES > 0
- MIDI_TONE_MAX = MI_B,
-# endif
-
- MIDI_OCTAVE_MIN,
- MI_OCT_N2 = MIDI_OCTAVE_MIN,
- MI_OCT_N1,
- MI_OCT_0,
- MI_OCT_1,
- MI_OCT_2,
- MI_OCT_3,
- MI_OCT_4,
- MI_OCT_5,
- MI_OCT_6,
- MI_OCT_7,
- MIDI_OCTAVE_MAX = MI_OCT_7,
- MI_OCTD, // octave down
- MI_OCTU, // octave up
-
- MIDI_TRANSPOSE_MIN,
- MI_TRNS_N6 = MIDI_TRANSPOSE_MIN,
- MI_TRNS_N5,
- MI_TRNS_N4,
- MI_TRNS_N3,
- MI_TRNS_N2,
- MI_TRNS_N1,
- MI_TRNS_0,
- MI_TRNS_1,
- MI_TRNS_2,
- MI_TRNS_3,
- MI_TRNS_4,
- MI_TRNS_5,
- MI_TRNS_6,
- MIDI_TRANSPOSE_MAX = MI_TRNS_6,
- MI_TRNSD, // transpose down
- MI_TRNSU, // transpose up
-
- MIDI_VELOCITY_MIN,
- MI_VEL_0 = MIDI_VELOCITY_MIN,
-# ifdef VIA_ENABLE
- MI_VEL_1 = MIDI_VELOCITY_MIN,
-# else
- MI_VEL_1,
-# endif
- MI_VEL_2,
- MI_VEL_3,
- MI_VEL_4,
- MI_VEL_5,
- MI_VEL_6,
- MI_VEL_7,
- MI_VEL_8,
- MI_VEL_9,
- MI_VEL_10,
- MIDI_VELOCITY_MAX = MI_VEL_10,
- MI_VELD, // velocity down
- MI_VELU, // velocity up
-
- MIDI_CHANNEL_MIN,
- MI_CH1 = MIDI_CHANNEL_MIN,
- MI_CH2,
- MI_CH3,
- MI_CH4,
- MI_CH5,
- MI_CH6,
- MI_CH7,
- MI_CH8,
- MI_CH9,
- MI_CH10,
- MI_CH11,
- MI_CH12,
- MI_CH13,
- MI_CH14,
- MI_CH15,
- MI_CH16,
- MIDI_CHANNEL_MAX = MI_CH16,
- MI_CHD, // previous channel
- MI_CHU, // next channel
-
- MI_ALLOFF, // all notes off
-
- MI_SUS, // sustain
- MI_PORT, // portamento
- MI_SOST, // sostenuto
- MI_SOFT, // soft pedal
- MI_LEG, // legato
-
- MI_MOD, // modulation
- MI_MODSD, // decrease modulation speed
- MI_MODSU, // increase modulation speed
-
- MI_BENDD, // Bend down
- MI_BENDU, // Bend up
-#endif // MIDI_ADVANCED
-
- // Backlight functionality
- BL_ON,
- BL_OFF,
- BL_DEC,
- BL_INC,
- BL_TOGG,
- BL_STEP,
- BL_BRTG,
-
- // RGB functionality
- RGB_TOG,
- RGB_MODE_FORWARD,
- RGB_MODE_REVERSE,
- RGB_HUI,
- RGB_HUD,
- RGB_SAI,
- RGB_SAD,
- RGB_VAI,
- RGB_VAD,
- RGB_SPI,
- RGB_SPD,
- RGB_MODE_PLAIN,
- RGB_MODE_BREATHE,
- RGB_MODE_RAINBOW,
- RGB_MODE_SWIRL,
- RGB_MODE_SNAKE,
- RGB_MODE_KNIGHT,
- RGB_MODE_XMAS,
- RGB_MODE_GRADIENT,
- RGB_MODE_RGBTEST,
-
- // Momentum matching toggle
- VLK_TOG,
-
- // Left shift, open paren
- KC_LSPO,
-
- // Right shift, close paren
- KC_RSPC,
-
- // Shift, Enter
- KC_SFTENT,
-
- // Printing
- PRINT_ON,
- PRINT_OFF,
-
- // output selection
- OUT_AUTO,
- OUT_USB,
-#ifdef BLUETOOTH_ENABLE
- OUT_BT,
-#endif
-
-#ifdef KEY_LOCK_ENABLE
- KC_LOCK,
-#endif
-
-#ifdef TERMINAL_ENABLE
- TERM_ON,
- TERM_OFF,
+ MI_B_5, // 5C76
+
+ MI_OCT_N2, // 5C77
+ MI_OCT_N1, // 5C78
+ MI_OCT_0, // 5C79
+ MI_OCT_1, // 5C7A
+ MI_OCT_2, // 5C7B
+ MI_OCT_3, // 5C7C
+ MI_OCT_4, // 5C7D
+ MI_OCT_5, // 5C7E
+ MI_OCT_6, // 5C7F
+ MI_OCT_7, // 5C80
+ MI_OCTD, // 5C81
+ MI_OCTU, // 5C82
+
+ MI_TRNS_N6, // 5C83
+ MI_TRNS_N5, // 5C84
+ MI_TRNS_N4, // 5C85
+ MI_TRNS_N3, // 5C86
+ MI_TRNS_N2, // 5C87
+ MI_TRNS_N1, // 5C88
+ MI_TRNS_0, // 5C89
+ MI_TRNS_1, // 5C8A
+ MI_TRNS_2, // 5C8B
+ MI_TRNS_3, // 5C8C
+ MI_TRNS_4, // 5C8D
+ MI_TRNS_5, // 5C8E
+ MI_TRNS_6, // 5C8F
+ MI_TRNSD, // 5C90
+ MI_TRNSU, // 5C91
+
+ MI_VEL_0, // 5C92
+#ifdef VIA_ENABLE
+ MI_VEL_1 = MI_VEL_0,
+#else
+ MI_VEL_1, // 5C93
#endif
-
- EEPROM_RESET,
-
- UNICODE_MODE_FORWARD,
- UNICODE_MODE_REVERSE,
- UNICODE_MODE_MAC,
- UNICODE_MODE_LNX,
- UNICODE_MODE_WIN,
- UNICODE_MODE_BSD,
- UNICODE_MODE_WINC,
-
- HPT_ON,
- HPT_OFF,
- HPT_TOG,
- HPT_RST,
- HPT_FBK,
- HPT_BUZ,
- HPT_MODI,
- HPT_MODD,
- HPT_CONT,
- HPT_CONI,
- HPT_COND,
- HPT_DWLI,
- HPT_DWLD,
-
- // Left control, open paren
- KC_LCPO,
-
- // Right control, close paren
- KC_RCPC,
-
- // Left control, open paren
- KC_LAPO,
-
- // Right control, close paren
- KC_RAPC,
-
- CMB_ON,
- CMB_OFF,
- CMB_TOG,
-
- MAGIC_SWAP_LCTL_LGUI,
- MAGIC_SWAP_RCTL_RGUI,
- MAGIC_UNSWAP_LCTL_LGUI,
- MAGIC_UNSWAP_RCTL_RGUI,
- MAGIC_SWAP_CTL_GUI,
- MAGIC_UNSWAP_CTL_GUI,
- MAGIC_TOGGLE_CTL_GUI,
- MAGIC_EE_HANDS_LEFT,
- MAGIC_EE_HANDS_RIGHT,
+ MI_VEL_2, // 5C94
+ MI_VEL_3, // 5C95
+ MI_VEL_4, // 5C96
+ MI_VEL_5, // 5C97
+ MI_VEL_6, // 5C98
+ MI_VEL_7, // 5C99
+ MI_VEL_8, // 5C9A
+ MI_VEL_9, // 5C9B
+ MI_VEL_10, // 5C9C
+ MI_VELD, // 5C9D
+ MI_VELU, // 5C9E
+
+ MI_CH1, // 5C9F
+ MI_CH2, // 5CA0
+ MI_CH3, // 5CA1
+ MI_CH4, // 5CA2
+ MI_CH5, // 5CA3
+ MI_CH6, // 5CA4
+ MI_CH7, // 5CA5
+ MI_CH8, // 5CA6
+ MI_CH9, // 5CA7
+ MI_CH10, // 5CA8
+ MI_CH11, // 5CA9
+ MI_CH12, // 5CAA
+ MI_CH13, // 5CAB
+ MI_CH14, // 5CAC
+ MI_CH15, // 5CAD
+ MI_CH16, // 5CAE
+ MI_CHD, // 5CAF
+ MI_CHU, // 5CB0
+
+ MI_ALLOFF, // 5CB1
+
+ MI_SUS, // 5CB2
+ MI_PORT, // 5CB3
+ MI_SOST, // 5CB4
+ MI_SOFT, // 5CB5
+ MI_LEG, // 5CB6
+
+ MI_MOD, // 5CB7
+ MI_MODSD, // 5CB8
+ MI_MODSU, // 5CB9
+
+ MI_BENDD, // 5CBA
+ MI_BENDU, // 5CBB
+
+ // Backlight
+ BL_ON, // 5CBC
+ BL_OFF, // 5CBD
+ BL_DEC, // 5CBE
+ BL_INC, // 5CBF
+ BL_TOGG, // 5CC0
+ BL_STEP, // 5CC1
+ BL_BRTG, // 5CC2
+
+ // RGB underglow/matrix
+ RGB_TOG, // 5CC3
+ RGB_MODE_FORWARD, // 5CC4
+ RGB_MODE_REVERSE, // 5CC5
+ RGB_HUI, // 5CC6
+ RGB_HUD, // 5CC7
+ RGB_SAI, // 5CC8
+ RGB_SAD, // 5CC9
+ RGB_VAI, // 5CCA
+ RGB_VAD, // 5CCB
+ RGB_SPI, // 5CCC
+ RGB_SPD, // 5CCD
+ RGB_MODE_PLAIN, // 5CCE
+ RGB_MODE_BREATHE, // 5CCF
+ RGB_MODE_RAINBOW, // 5CD0
+ RGB_MODE_SWIRL, // 5CD1
+ RGB_MODE_SNAKE, // 5CD2
+ RGB_MODE_KNIGHT, // 5CD3
+ RGB_MODE_XMAS, // 5CD4
+ RGB_MODE_GRADIENT, // 5CD5
+ RGB_MODE_RGBTEST, // 5CD6
+
+ // Velocikey
+ VLK_TOG, // 5CD7
+
+ // Space Cadet
+ KC_LSPO, // 5CD8
+ KC_RSPC, // 5CD9
+ KC_SFTENT, // 5CDA
+
+ // Thermal Printer
+ PRINT_ON, // 5CDB
+ PRINT_OFF, // 5CDC
+
+ // Bluetooth: output selection
+ OUT_AUTO, // 5CDD
+ OUT_USB, // 5CDE
+
+ // Clear EEPROM
+ EEPROM_RESET, // 5CDF
+
+ // Unicode
+ UNICODE_MODE_FORWARD, // 5CE0
+ UNICODE_MODE_REVERSE, // 5CE1
+ UNICODE_MODE_MAC, // 5CE2
+ UNICODE_MODE_LNX, // 5CE3
+ UNICODE_MODE_WIN, // 5CE4
+ UNICODE_MODE_BSD, // 5CE5
+ UNICODE_MODE_WINC, // 5CE6
+
+ // Haptic
+ HPT_ON, // 5CE7
+ HPT_OFF, // 5CE8
+ HPT_TOG, // 5CE9
+ HPT_RST, // 5CEA
+ HPT_FBK, // 5CEB
+ HPT_BUZ, // 5CEC
+ HPT_MODI, // 5CED
+ HPT_MODD, // 5CEE
+ HPT_CONT, // 5CEF
+ HPT_CONI, // 5CF0
+ HPT_COND, // 5CF1
+ HPT_DWLI, // 5CF2
+ HPT_DWLD, // 5CF3
+
+ // Space Cadet (continued)
+ KC_LCPO, // 5CF4
+ KC_RCPC, // 5CF5
+ KC_LAPO, // 5CF6
+ KC_RAPC, // 5CF7
+
+ // Combos
+ CMB_ON, // 5CF8
+ CMB_OFF, // 5CF9
+ CMB_TOG, // 5CFA
+
+ // Magic (continued)
+ MAGIC_SWAP_LCTL_LGUI, // 5CFB
+ MAGIC_SWAP_RCTL_RGUI, // 5CFC
+ MAGIC_UNSWAP_LCTL_LGUI, // 5CFD
+ MAGIC_UNSWAP_RCTL_RGUI, // 5CFE
+ MAGIC_SWAP_CTL_GUI, // 5CFF
+ MAGIC_UNSWAP_CTL_GUI, // 5D00
+ MAGIC_TOGGLE_CTL_GUI, // 5D01
+ MAGIC_EE_HANDS_LEFT, // 5D02
+ MAGIC_EE_HANDS_RIGHT, // 5D03
// Dynamic Macros
- DYN_REC_START1,
- DYN_REC_START2,
- DYN_REC_STOP,
- DYN_MACRO_PLAY1,
- DYN_MACRO_PLAY2,
-
- JS_BUTTON0,
- JS_BUTTON_MIN = JS_BUTTON0,
- JS_BUTTON1,
- JS_BUTTON2,
- JS_BUTTON3,
- JS_BUTTON4,
- JS_BUTTON5,
- JS_BUTTON6,
- JS_BUTTON7,
- JS_BUTTON8,
- JS_BUTTON9,
- JS_BUTTON10,
- JS_BUTTON11,
- JS_BUTTON12,
- JS_BUTTON13,
- JS_BUTTON14,
- JS_BUTTON15,
- JS_BUTTON16,
- JS_BUTTON17,
- JS_BUTTON18,
- JS_BUTTON19,
- JS_BUTTON20,
- JS_BUTTON21,
- JS_BUTTON22,
- JS_BUTTON23,
- JS_BUTTON24,
- JS_BUTTON25,
- JS_BUTTON26,
- JS_BUTTON27,
- JS_BUTTON28,
- JS_BUTTON29,
- JS_BUTTON30,
- JS_BUTTON31,
- JS_BUTTON_MAX = JS_BUTTON31,
-
-#if defined(SEQUENCER_ENABLE)
- SQ_ON,
- SQ_OFF,
- SQ_TOG,
-
- SQ_TMPD, // Decrease tempo
- SQ_TMPU, // Increase tempo
+ DYN_REC_START1, // 5D04
+ DYN_REC_START2, // 5D05
+ DYN_REC_STOP, // 5D06
+ DYN_MACRO_PLAY1, // 5D07
+ DYN_MACRO_PLAY2, // 5D08
+
+ // Joystick
+ JS_BUTTON0, // 5D09
+ JS_BUTTON1, // 5D0A
+ JS_BUTTON2, // 5D0B
+ JS_BUTTON3, // 5D0C
+ JS_BUTTON4, // 5D0D
+ JS_BUTTON5, // 5D0E
+ JS_BUTTON6, // 5D0F
+ JS_BUTTON7, // 5D10
+ JS_BUTTON8, // 5D11
+ JS_BUTTON9, // 5D12
+ JS_BUTTON10, // 5D13
+ JS_BUTTON11, // 5D14
+ JS_BUTTON12, // 5D15
+ JS_BUTTON13, // 5D16
+ JS_BUTTON14, // 5D17
+ JS_BUTTON15, // 5D18
+ JS_BUTTON16, // 5D19
+ JS_BUTTON17, // 5D1A
+ JS_BUTTON18, // 5D1B
+ JS_BUTTON19, // 5D1C
+ JS_BUTTON20, // 5D1D
+ JS_BUTTON21, // 5D1E
+ JS_BUTTON22, // 5D1F
+ JS_BUTTON23, // 5D20
+ JS_BUTTON24, // 5D21
+ JS_BUTTON25, // 5D22
+ JS_BUTTON26, // 5D23
+ JS_BUTTON27, // 5D24
+ JS_BUTTON28, // 5D25
+ JS_BUTTON29, // 5D26
+ JS_BUTTON30, // 5D27
+ JS_BUTTON31, // 5D28
+
+ // Leader Key
+ KC_LEAD, // 5D29
+
+ // Bluetooth: output selection (continued)
+ OUT_BT, // 5D2A
+
+ // Lock Key
+ KC_LOCK, // 5D2B
+
+ // Terminal
+ TERM_ON, // 5D2C
+ TERM_OFF, // 5D2D
+
+ // Sequencer
+ SQ_ON, // 5D2E
+ SQ_OFF, // 5D2F
+ SQ_TOG, // 5D30
+
+ SQ_TMPD, // 5D31
+ SQ_TMPU, // 5D32
+
+ SQ_RESD, // 5D33
+ SQ_RESU, // 5D34
+
+ SQ_SALL, // 5D35
+ SQ_SCLR, // 5D36
+
+ SEQUENCER_STEP_MIN, // 5D37
+ SEQUENCER_STEP_MAX = SEQUENCER_STEP_MIN + SEQUENCER_STEPS,
SEQUENCER_RESOLUTION_MIN,
SEQUENCER_RESOLUTION_MAX = SEQUENCER_RESOLUTION_MIN + SEQUENCER_RESOLUTIONS,
- SQ_RESD, // Decrease resolution
- SQ_RESU, // Increase resolution
-
- SQ_SALL, // All steps on
- SQ_SCLR, // All steps off
- SEQUENCER_STEP_MIN,
- SEQUENCER_STEP_MAX = SEQUENCER_STEP_MIN + SEQUENCER_STEPS,
SEQUENCER_TRACK_MIN,
SEQUENCER_TRACK_MAX = SEQUENCER_TRACK_MIN + SEQUENCER_TRACKS,
-/**
- * Helpers to assign a keycode to a step, a resolution, or a track.
- * Falls back to NOOP if n is out of range.
- */
-# define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : XXXXXXX)
-# define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : XXXXXXX)
-# define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : XXXXXXX)
-
-#endif
+#define SQ_S(n) (n < SEQUENCER_STEPS ? SEQUENCER_STEP_MIN + n : KC_NO)
+#define SQ_R(n) (n < SEQUENCER_RESOLUTIONS ? SEQUENCER_RESOLUTION_MIN + n : KC_NO)
+#define SQ_T(n) (n < SEQUENCER_TRACKS ? SEQUENCER_TRACK_MIN + n : KC_NO)
+ // One Shot
ONESHOT_ENABLE,
ONESHOT_DISABLE,
ONESHOT_TOGGLE,
- // always leave at the end
+ // Start of custom keycode range for keyboards and keymaps - always leave at the end
SAFE_RANGE
};
-// Ability to use mods in layouts
+// Keycode modifiers & aliases
#define LCTL(kc) (QK_LCTL | (kc))
#define LSFT(kc) (QK_LSFT | (kc))
#define LALT(kc) (QK_LALT | (kc))
@@ -613,11 +547,7 @@ enum quantum_keycodes {
#define MOD_HYPR 0xF
#define MOD_MEH 0x7
-// Aliases for shifted symbols
-// Each key has a 4-letter code, and some have longer aliases too.
-// While the long aliases are descriptive, the 4-letter codes
-// make for nicer grid layouts (everything lines up), and are
-// the preferred style for Quantum.
+// US ANSI shifted keycode aliases
#define KC_TILD LSFT(KC_GRV) // ~
#define KC_TILDE KC_TILD
@@ -684,15 +614,15 @@ enum quantum_keycodes {
#define KC_DELT KC_DELETE // Del key (four letter code)
-// Aliases
+// Modified keycode aliases
#define C(kc) LCTL(kc)
#define S(kc) LSFT(kc)
#define A(kc) LALT(kc)
#define G(kc) LGUI(kc)
+// Deprecated - do not use
#define F(kc) (QK_FUNCTION | (kc))
#define M(kc) (QK_MACRO | (kc))
-
#define MACROTAP(kc) (QK_MACRO | (FUNC_TAP << 8) | (kc))
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
@@ -700,19 +630,21 @@ enum quantum_keycodes {
#define EEP_RST EEPROM_RESET
+// Audio Clicky aliases
#define CK_TOGG CLICKY_TOGGLE
#define CK_RST CLICKY_RESET
#define CK_UP CLICKY_UP
#define CK_DOWN CLICKY_DOWN
#define CK_ON CLICKY_ENABLE
#define CK_OFF CLICKY_DISABLE
+// Fauxclicky (deprecated) redirects to Audio Clicky
#define FC_ON CLICKY_ENABLE
#define FC_OFF CLICKY_DISABLE
#define FC_TOGG CLICKY_TOGGLE
+// RGB aliases
#define RGB_MOD RGB_MODE_FORWARD
#define RGB_RMOD RGB_MODE_REVERSE
-
#define RGB_M_P RGB_MODE_PLAIN
#define RGB_M_B RGB_MODE_BREATHE
#define RGB_M_R RGB_MODE_RAINBOW
@@ -723,9 +655,7 @@ enum quantum_keycodes {
#define RGB_M_G RGB_MODE_GRADIENT
#define RGB_M_T RGB_MODE_RGBTEST
-// L-ayer, T-ap - 256 keycode max, 16 layer max
-#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF))
-
+// Magic aliases
#define CL_SWAP MAGIC_SWAP_CONTROL_CAPSLOCK
#define CL_NORM MAGIC_UNSWAP_CONTROL_CAPSLOCK
#define CL_CTRL MAGIC_CAPSLOCK_TO_CONTROL
@@ -794,6 +724,9 @@ enum quantum_keycodes {
// Layer tap-toggle
#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer)&0xFF))
+// L-ayer, T-ap - 256 keycode max, 16 layer max
+#define LT(layer, kc) (QK_LAYER_TAP | (((layer)&0xF) << 8) | ((kc)&0xFF))
+
// M-od, T-ap - 256 keycode max
#define MT(mod, kc) (QK_MOD_TAP | (((mod)&0x1F) << 8) | ((kc)&0xFF))
@@ -843,6 +776,7 @@ enum quantum_keycodes {
#define KC_HYPR HYPR(KC_NO)
#define KC_MEH MEH(KC_NO)
+// Unicode aliases
// UNICODE_ENABLE - Allows Unicode input up to 0x7FFF
#define UC(c) (QK_UNICODE | (c))
// UNICODEMAP_ENABLE - Allows Unicode input up to 0x10FFFF, requires unicode_map
@@ -860,6 +794,7 @@ enum quantum_keycodes {
#define UC_M_BS UNICODE_MODE_BSD
#define UC_M_WC UNICODE_MODE_WINC
+// Swap Hands
#define SH_T(kc) (QK_SWAP_HANDS | (kc))
#define SH_TG (QK_SWAP_HANDS | OP_SH_TOGGLE)
#define SH_TT (QK_SWAP_HANDS | OP_SH_TAP_TOGGLE)
@@ -869,6 +804,18 @@ enum quantum_keycodes {
#define SH_ON (QK_SWAP_HANDS | OP_SH_ON)
#define SH_OFF (QK_SWAP_HANDS | OP_SH_OFF)
+// MIDI aliases
+#define MIDI_TONE_MIN MI_C
+#define MIDI_TONE_MAX MI_B_5
+#define MIDI_OCTAVE_MIN MI_OCT_N2
+#define MIDI_OCTAVE_MAX MI_OCT_7
+#define MIDI_TRANSPOSE_MIN MI_TRNS_N6
+#define MIDI_TRANSPOSE_MAX MI_TRNS_6
+#define MIDI_VELOCITY_MIN MI_VEL_0
+#define MIDI_VELOCITY_MAX MI_VEL_10
+#define MIDI_CHANNEL_MIN MI_CH1
+#define MIDI_CHANNEL_MAX MI_CH16
+
// Dynamic Macros aliases
#define DM_REC1 DYN_REC_START1
#define DM_REC2 DYN_REC_START2
@@ -876,7 +823,11 @@ enum quantum_keycodes {
#define DM_PLY1 DYN_MACRO_PLAY1
#define DM_PLY2 DYN_MACRO_PLAY2
-// One Shot toggle
+// Joystick aliases
+#define JS_BUTTON_MIN JS_BUTTON0
+#define JS_BUTTON_MAX JS_BUTTON31
+
+// One Shot aliases
#define OS_TOGG ONESHOT_TOGGLE
#define OS_ON ONESHOT_ENABLE
#define OS_OFF ONESHOT_DISABLE
--
cgit v1.2.3
From 733c8610520884d44bae9b7f2202dd8391d32cf8 Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Sat, 3 Apr 2021 08:35:26 -0700
Subject: Format code according to conventions (#12467)
Co-authored-by: QMK Bot ---
quantum/quantum_keycodes.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
(limited to 'quantum')
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 5e1b16d944..b6353081c1 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -68,14 +68,14 @@ enum quantum_keycodes {
QK_STENO_GEMINI = 0x5A31,
QK_STENO_MAX = 0x5A3F,
// 0x5C00 - 0x5FFF are reserved, see below
- QK_MOD_TAP = 0x6000,
- QK_MOD_TAP_MAX = 0x7FFF,
- QK_UNICODE = 0x8000,
- QK_UNICODE_MAX = 0xFFFF,
- QK_UNICODEMAP = 0x8000,
- QK_UNICODEMAP_MAX = 0xBFFF,
- QK_UNICODEMAP_PAIR = 0xC000,
- QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
+ QK_MOD_TAP = 0x6000,
+ QK_MOD_TAP_MAX = 0x7FFF,
+ QK_UNICODE = 0x8000,
+ QK_UNICODE_MAX = 0xFFFF,
+ QK_UNICODEMAP = 0x8000,
+ QK_UNICODEMAP_MAX = 0xBFFF,
+ QK_UNICODEMAP_PAIR = 0xC000,
+ QK_UNICODEMAP_PAIR_MAX = 0xFFFF,
// Loose keycodes - to be used directly
RESET = 0x5C00,
@@ -277,11 +277,11 @@ enum quantum_keycodes {
MI_TRNSD, // 5C90
MI_TRNSU, // 5C91
- MI_VEL_0, // 5C92
+ MI_VEL_0, // 5C92
#ifdef VIA_ENABLE
MI_VEL_1 = MI_VEL_0,
#else
- MI_VEL_1, // 5C93
+ MI_VEL_1, // 5C93
#endif
MI_VEL_2, // 5C94
MI_VEL_3, // 5C95
@@ -480,7 +480,7 @@ enum quantum_keycodes {
TERM_OFF, // 5D2D
// Sequencer
- SQ_ON, // 5D2E
+ SQ_ON, // 5D2E
SQ_OFF, // 5D2F
SQ_TOG, // 5D30
--
cgit v1.2.3
From 64a0f5a659190518a9361e0bd2e8caff0b3354f1 Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Tue, 6 Apr 2021 16:39:15 +1000
Subject: Add support for producing UF2-format binaries. (#12435)
* First stab at enabling builds of UF2-format binaries.
* Add description on producing a UF2 file.---
.gitignore | 1 +
Makefile | 4 +-
message.mk | 2 +
quantum/mcu_selection.mk | 24 ++++
tmk_core/rules.mk | 31 ++++-
util/uf2conv.py | 319 +++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 373 insertions(+), 8 deletions(-)
create mode 100755 util/uf2conv.py
(limited to 'quantum')
diff --git a/.gitignore b/.gitignore
index d6846cf63b..518b2df83a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@
*.eep
*.elf
*.hex
+*.uf2
*.qmk
!util/bootloader.hex
!quantum/tools/eeprom_reset.hex
diff --git a/Makefile b/Makefile
index 80e1a90a19..e007ae3679 100644
--- a/Makefile
+++ b/Makefile
@@ -93,8 +93,8 @@ clean:
.PHONY: distclean
distclean: clean
- echo -n 'Deleting *.bin and *.hex ... '
- rm -f *.bin *.hex
+ echo -n 'Deleting *.bin, *.hex, and *.uf2 ... '
+ rm -f *.bin *.hex *.uf2
echo 'done.'
#Compatibility with the old make variables, anything you specify directly on the command line
diff --git a/message.mk b/message.mk
index 3240c041b9..c3f3919198 100644
--- a/message.mk
+++ b/message.mk
@@ -47,10 +47,12 @@ MSG_SIZE_AFTER = Size after:
MSG_COFF = Converting to AVR COFF:
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
MSG_FLASH = Creating load file for flashing:
+MSG_UF2 = Creating UF2 file for deployment:
MSG_EEPROM = Creating load file for EEPROM:
MSG_BIN = Creating binary load file for flashing:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_EXECUTING = Executing:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling:
MSG_COMPILING_CXX = Compiling:
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 53e03a8054..2e4d250089 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -139,6 +139,9 @@ ifneq ($(findstring STM32F042, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F0
endif
ifneq ($(findstring STM32F072, $(MCU)),)
@@ -172,6 +175,9 @@ ifneq ($(findstring STM32F072, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F0
endif
ifneq ($(findstring STM32F103, $(MCU)),)
@@ -205,6 +211,9 @@ ifneq ($(findstring STM32F103, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F1
endif
ifneq ($(findstring STM32F303, $(MCU)),)
@@ -238,6 +247,9 @@ ifneq ($(findstring STM32F303, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F3
endif
ifneq ($(findstring STM32F401, $(MCU)),)
@@ -271,6 +283,9 @@ ifneq ($(findstring STM32F401, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F4
endif
ifneq ($(findstring STM32F411, $(MCU)),)
@@ -304,6 +319,9 @@ ifneq ($(findstring STM32F411, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32F4
endif
ifneq ($(findstring STM32G431, $(MCU)),)
@@ -337,6 +355,9 @@ ifneq ($(findstring STM32G431, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32G4
endif
ifneq ($(findstring STM32G474, $(MCU)),)
@@ -370,6 +391,9 @@ ifneq ($(findstring STM32G474, $(MCU)),)
# Options to pass to dfu-util when flashing
DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32G4
endif
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index bbcfc1e4d1..8dbed35fb5 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -223,6 +223,12 @@ ifneq ($(filter Darwin FreeBSD,$(shell uname -s)),)
MD5SUM = md5
endif
+# UF2 format settings
+# To produce a UF2 file in your build, add to your keyboard's rules.mk:
+# FIRMWARE_FORMAT = uf2
+UF2CONV = $(TOP_DIR)/util/uf2conv.py
+UF2_FAMILY ?= 0x0
+
# Compiler flags to generate dependency files.
#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
GENDEPFLAGS = -MMD -MP -MF $(patsubst %.o,%.td,$@)
@@ -255,6 +261,7 @@ DFU_SUFFIX_ARGS ?=
elf: $(BUILD_DIR)/$(TARGET).elf
hex: $(BUILD_DIR)/$(TARGET).hex
+uf2: $(BUILD_DIR)/$(TARGET).uf2
cpfirmware: $(FIRMWARE_FORMAT)
$(SILENT) || printf "Copying $(TARGET).$(FIRMWARE_FORMAT) to qmk_firmware folder" | $(AWK_CMD)
$(COPY) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT) $(TARGET).$(FIRMWARE_FORMAT) && $(PRINT_OK)
@@ -283,32 +290,44 @@ gccversion :
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
- @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD)
$(eval CMD=$(HEX) $< $@)
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD)
+ @$(BUILD_CMD)
+
+%.uf2: %.hex
+ $(eval CMD=$(UF2CONV) $(BUILD_DIR)/$(TARGET).hex -o $(BUILD_DIR)/$(TARGET).uf2 -c -f $(UF2_FAMILY) >/dev/null 2>&1)
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_UF2) $@" | $(AWK_CMD)
@$(BUILD_CMD)
%.eep: %.elf
- @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD)
$(eval CMD=$(EEP) $< $@ || exit 0)
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD)
@$(BUILD_CMD)
# Create extended listing file from ELF output file.
%.lss: %.elf
- @$(SILENT) || printf "$(MSG_EXTENDED_LISTING) $@" | $(AWK_CMD)
$(eval CMD=$(OBJDUMP) -h -S -z $< > $@)
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_EXTENDED_LISTING) $@" | $(AWK_CMD)
@$(BUILD_CMD)
# Create a symbol table from ELF output file.
%.sym: %.elf
- @$(SILENT) || printf "$(MSG_SYMBOL_TABLE) $@" | $(AWK_CMD)
$(eval CMD=$(NM) -n $< > $@ )
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_SYMBOL_TABLE) $@" | $(AWK_CMD)
@$(BUILD_CMD)
%.bin: %.elf
- @$(SILENT) || printf "$(MSG_BIN) $@" | $(AWK_CMD)
$(eval CMD=$(BIN) $< $@ || exit 0)
+ #@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
+ @$(SILENT) || printf "$(MSG_BIN) $@" | $(AWK_CMD)
@$(BUILD_CMD)
if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \
+ #$(SILENT) || printf "$(MSG_EXECUTING) '$(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null':\n" ;\
$(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\
fi
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;
@@ -476,7 +495,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null)))
# Listing of phony targets.
.PHONY : all dump_vars finish sizebefore sizeafter qmkversion \
-gccversion build elf hex eep lss sym coff extcoff \
+gccversion build elf hex uf2 eep lss sym coff extcoff \
clean clean_list debug gdb-config show_path \
program teensy dfu dfu-ee dfu-start \
flash dfu-split-left dfu-split-right \
diff --git a/util/uf2conv.py b/util/uf2conv.py
new file mode 100755
index 0000000000..044a7f2318
--- /dev/null
+++ b/util/uf2conv.py
@@ -0,0 +1,319 @@
+#!/usr/bin/env python3
+import sys
+import struct
+import subprocess
+import re
+import os
+import os.path
+import argparse
+
+
+UF2_MAGIC_START0 = 0x0A324655 # "UF2\n"
+UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected
+UF2_MAGIC_END = 0x0AB16F30 # Ditto
+
+families = {
+ 'SAMD21': 0x68ed2b88,
+ 'SAML21': 0x1851780a,
+ 'SAMD51': 0x55114460,
+ 'NRF52': 0x1b57745f,
+ 'STM32F0': 0x647824b6,
+ 'STM32F1': 0x5ee21072,
+ 'STM32F2': 0x5d1a0a2e,
+ 'STM32F3': 0x6b846188,
+ 'STM32F4': 0x57755a57,
+ 'STM32F7': 0x53b80f00,
+ 'STM32G0': 0x300f5633,
+ 'STM32G4': 0x4c71240a,
+ 'STM32H7': 0x6db66082,
+ 'STM32L0': 0x202e3a91,
+ 'STM32L1': 0x1e1f432d,
+ 'STM32L4': 0x00ff6919,
+ 'STM32L5': 0x04240bdf,
+ 'STM32WB': 0x70d16653,
+ 'STM32WL': 0x21460ff0,
+ 'ATMEGA32': 0x16573617,
+ 'MIMXRT10XX': 0x4FB2D5BD,
+ 'LPC55': 0x2abc77ec,
+ 'GD32F350': 0x31D228C6,
+ 'ESP32S2': 0xbfdd4eee,
+ 'RP2040': 0xe48bff56
+}
+
+INFO_FILE = "/INFO_UF2.TXT"
+
+appstartaddr = 0x2000
+familyid = 0x0
+
+
+def is_uf2(buf):
+ w = struct.unpack(" 476:
+ assert False, "Invalid UF2 data size at " + ptr
+ newaddr = hd[3]
+ if curraddr == None:
+ appstartaddr = newaddr
+ curraddr = newaddr
+ padding = newaddr - curraddr
+ if padding < 0:
+ assert False, "Block out of order at " + ptr
+ if padding > 10*1024*1024:
+ assert False, "More than 10M of padding needed at " + ptr
+ if padding % 4 != 0:
+ assert False, "Non-word padding size at " + ptr
+ while padding > 0:
+ padding -= 4
+ outp += b"\x00\x00\x00\x00"
+ outp.append(block[32 : 32 + datalen])
+ curraddr = newaddr + datalen
+ return b"".join(outp)
+
+def convert_to_carray(file_content):
+ outp = "const unsigned long bindata_len = %d;\n" % len(file_content)
+ outp += "const unsigned char bindata[] __attribute__((aligned(16))) = {"
+ for i in range(len(file_content)):
+ if i % 16 == 0:
+ outp += "\n"
+ outp += "0x%02x, " % file_content[i]
+ outp += "\n};\n"
+ return bytes(outp, "utf-8")
+
+def convert_to_uf2(file_content):
+ global familyid
+ datapadding = b""
+ while len(datapadding) < 512 - 256 - 32 - 4:
+ datapadding += b"\x00\x00\x00\x00"
+ numblocks = (len(file_content) + 255) // 256
+ outp = []
+ for blockno in range(numblocks):
+ ptr = 256 * blockno
+ chunk = file_content[ptr:ptr + 256]
+ flags = 0x0
+ if familyid:
+ flags |= 0x2000
+ hd = struct.pack(b"= 3 and words[1] == "2" and words[2] == "FAT":
+ drives.append(words[0])
+ else:
+ rootpath = "/media"
+ if sys.platform == "darwin":
+ rootpath = "/Volumes"
+ elif sys.platform == "linux":
+ tmp = rootpath + "/" + os.environ["USER"]
+ if os.path.isdir(tmp):
+ rootpath = tmp
+ for d in os.listdir(rootpath):
+ drives.append(os.path.join(rootpath, d))
+
+
+ def has_info(d):
+ try:
+ return os.path.isfile(d + INFO_FILE)
+ except:
+ return False
+
+ return list(filter(has_info, drives))
+
+
+def board_id(path):
+ with open(path + INFO_FILE, mode='r') as file:
+ file_content = file.read()
+ return re.search("Board-ID: ([^\r\n]*)", file_content).group(1)
+
+
+def list_drives():
+ for d in get_drives():
+ print(d, board_id(d))
+
+
+def write_file(name, buf):
+ with open(name, "wb") as f:
+ f.write(buf)
+ print("Wrote %d bytes to %s" % (len(buf), name))
+
+
+def main():
+ global appstartaddr, familyid
+ def error(msg):
+ print(msg)
+ sys.exit(1)
+ parser = argparse.ArgumentParser(description='Convert to UF2 or flash directly.')
+ parser.add_argument('input', metavar='INPUT', type=str, nargs='?',
+ help='input file (HEX, BIN or UF2)')
+ parser.add_argument('-b' , '--base', dest='base', type=str,
+ default="0x2000",
+ help='set base address of application for BIN format (default: 0x2000)')
+ parser.add_argument('-o' , '--output', metavar="FILE", dest='output', type=str,
+ help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible')
+ parser.add_argument('-d' , '--device', dest="device_path",
+ help='select a device path to flash')
+ parser.add_argument('-l' , '--list', action='store_true',
+ help='list connected devices')
+ parser.add_argument('-c' , '--convert', action='store_true',
+ help='do not flash, just convert')
+ parser.add_argument('-D' , '--deploy', action='store_true',
+ help='just flash, do not convert')
+ parser.add_argument('-f' , '--family', dest='family', type=str,
+ default="0x0",
+ help='specify familyID - number or name (default: 0x0)')
+ parser.add_argument('-C' , '--carray', action='store_true',
+ help='convert binary file to a C array, not UF2')
+ args = parser.parse_args()
+ appstartaddr = int(args.base, 0)
+
+ if args.family.upper() in families:
+ familyid = families[args.family.upper()]
+ else:
+ try:
+ familyid = int(args.family, 0)
+ except ValueError:
+ error("Family ID needs to be a number or one of: " + ", ".join(families.keys()))
+
+ if args.list:
+ list_drives()
+ else:
+ if not args.input:
+ error("Need input file")
+ with open(args.input, mode='rb') as f:
+ inpbuf = f.read()
+ from_uf2 = is_uf2(inpbuf)
+ ext = "uf2"
+ if args.deploy:
+ outbuf = inpbuf
+ elif from_uf2:
+ outbuf = convert_from_uf2(inpbuf)
+ ext = "bin"
+ elif is_hex(inpbuf):
+ outbuf = convert_from_hex_to_uf2(inpbuf.decode("utf-8"))
+ elif args.carray:
+ outbuf = convert_to_carray(inpbuf)
+ ext = "h"
+ else:
+ outbuf = convert_to_uf2(inpbuf)
+ print("Converting to %s, output size: %d, start address: 0x%x" %
+ (ext, len(outbuf), appstartaddr))
+ if args.convert or ext != "uf2":
+ drives = []
+ if args.output == None:
+ args.output = "flash." + ext
+ else:
+ drives = get_drives()
+
+ if args.output:
+ write_file(args.output, outbuf)
+ else:
+ if len(drives) == 0:
+ error("No drive to deploy.")
+ for d in drives:
+ print("Flashing %s (%s)" % (d, board_id(d)))
+ write_file(d + "/NEW.UF2", outbuf)
+
+
+if __name__ == "__main__":
+ main()
--
cgit v1.2.3
From 40c314fe5c99d6d85039e6155723d2c2506d0d7f Mon Sep 17 00:00:00 2001
From: Ryan
Date: Wed, 7 Apr 2021 20:06:11 +1000
Subject: LED Matrix: Implement CIE1931 curve (#12417)
---
common_features.mk | 1 +
quantum/led_matrix.c | 38 +++++++++++++++++++++++++++++---------
quantum/led_matrix.h | 45 +++++++++++++++++++++++++++------------------
3 files changed, 57 insertions(+), 27 deletions(-)
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 2e2991c648..eb2ea2811f 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -233,6 +233,7 @@ endif
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
+ CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index ec8ff852d5..e133764556 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -23,6 +23,7 @@
#include "eeprom.h"
#include
#include
+#include "led_tables.h"
#include
@@ -108,8 +109,10 @@ void eeconfig_debug_led_matrix(void) {
uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255};
uint8_t g_last_led_count = 0;
-uint8_t map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
- uint8_t led_count = 0;
+__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
+
+uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
+ uint8_t led_count = led_matrix_map_row_column_to_led_kb(row, column, led_i);
uint8_t led_index = g_led_config.matrix_co[row][column];
if (led_index != NO_LED) {
led_i[led_count] = led_index;
@@ -120,14 +123,26 @@ uint8_t map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); }
-void led_matrix_set_index_value(int index, uint8_t value) { led_matrix_driver.set_value(index, value); }
+void led_matrix_set_value(int index, uint8_t value) {
+#ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
+#else
+ led_matrix_driver.set_value(index, value);
+#endif
+}
-void led_matrix_set_index_value_all(uint8_t value) { led_matrix_driver.set_value_all(value); }
+void led_matrix_set_value_all(uint8_t value) {
+#ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value]));
+#else
+ led_matrix_driver.set_value_all(value);
+#endif
+}
bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
uint8_t led[8];
- uint8_t led_count = map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ uint8_t led_count = led_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
if (led_count > 0) {
for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) {
g_last_led_hit[i - 1] = g_last_led_hit[i - 2];
@@ -140,7 +155,7 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
} else {
#ifdef LED_MATRIX_KEYRELEASES
uint8_t led[8];
- uint8_t led_count = map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ uint8_t led_count = led_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 255;
g_any_key_hit = 255;
@@ -149,7 +164,14 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void led_matrix_set_suspend_state(bool state) { g_suspend_state = state; }
+void led_matrix_set_suspend_state(bool state) {
+ if (LED_DISABLE_WHEN_USB_SUSPENDED && state) {
+ led_matrix_set_value_all(0); // turn off all LEDs when suspending
+ }
+ g_suspend_state = state;
+}
+
+bool led_matrix_get_suspend_state(void) { return g_suspend_state; }
// All LEDs off
void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); }
@@ -239,8 +261,6 @@ void led_matrix_init(void) {
eeconfig_debug_led_matrix(); // display current eeprom values
}
-uint32_t led_matrix_get_tick(void) { return g_tick; }
-
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
if (write_to_eeprom) {
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index fd7ef7d29e..ba8f0279a6 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -36,14 +36,36 @@
# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
#endif
+#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+# define LED_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \
+ uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+# define LED_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = 0; \
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+
enum led_matrix_effects {
LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
// All new effects go above this line
LED_MATRIX_EFFECT_MAX
};
-void led_matrix_set_index_value(int index, uint8_t value);
-void led_matrix_set_index_value_all(uint8_t value);
+void eeconfig_update_led_matrix_default(void);
+void eeconfig_update_led_matrix(void);
+void eeconfig_debug_led_matrix(void);
+
+uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i);
+uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i);
+
+void led_matrix_set_value(int index, uint8_t value);
+void led_matrix_set_value_all(uint8_t value);
+
+bool process_led_matrix(uint16_t keycode, keyrecord_t *record);
+
+void led_matrix_task(void);
// This runs after another backlight effect and replaces
// values already set
@@ -52,23 +74,9 @@ void led_matrix_indicators_kb(void);
void led_matrix_indicators_user(void);
void led_matrix_init(void);
-void led_matrix_setup_drivers(void);
-
-void led_matrix_set_suspend_state(bool state);
-void led_matrix_set_indicator_state(uint8_t state);
-
-void led_matrix_task(void);
-
-// This should not be called from an interrupt
-// (eg. from a timer interrupt).
-// Call this while idle (in between matrix scans).
-// If the buffer is dirty, it will update the driver with the buffer.
-void led_matrix_update_pwm_buffers(void);
-
-bool process_led_matrix(uint16_t keycode, keyrecord_t *record);
-
-uint32_t led_matrix_get_tick(void);
+void led_matrix_set_suspend_state(bool state);
+bool led_matrix_get_suspend_state(void);
void led_matrix_toggle(void);
void led_matrix_toggle_noeeprom(void);
void led_matrix_enable(void);
@@ -114,4 +122,5 @@ extern const led_matrix_driver_t led_matrix_driver;
extern led_eeconfig_t led_matrix_eeconfig;
+extern bool g_suspend_state;
extern led_config_t g_led_config;
--
cgit v1.2.3
From ce99f98bb5217ede628cfbf7e20924346b4279da Mon Sep 17 00:00:00 2001
From: Ryan
Date: Tue, 13 Apr 2021 19:51:03 +1000
Subject: LED Matrix: suspend code (#12509)
---
quantum/led_matrix.c | 57 ++++++++++++++++++++++-----------------
quantum/led_matrix.h | 7 +++--
tmk_core/common/avr/suspend.c | 3 +++
tmk_core/common/chibios/suspend.c | 6 +++++
tmk_core/common/keyboard.c | 3 +++
5 files changed, 49 insertions(+), 27 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index e133764556..5258b3acfd 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -27,8 +27,6 @@
#include
-led_eeconfig_t led_matrix_eeconfig;
-
#ifndef MAX
# define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
#endif
@@ -74,7 +72,9 @@ led_eeconfig_t led_matrix_eeconfig;
# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
#endif
-bool g_suspend_state = false;
+// globals
+bool g_suspend_state = false;
+led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
// Global tick at 20 Hz
uint32_t g_tick = 0;
@@ -139,10 +139,10 @@ void led_matrix_set_value_all(uint8_t value) {
#endif
}
-bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
+void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
+ if (pressed) {
uint8_t led[8];
- uint8_t led_count = led_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ uint8_t led_count = led_matrix_map_row_column_to_led(row, col, led);
if (led_count > 0) {
for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) {
g_last_led_hit[i - 1] = g_last_led_hit[i - 2];
@@ -155,35 +155,24 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record) {
} else {
#ifdef LED_MATRIX_KEYRELEASES
uint8_t led[8];
- uint8_t led_count = led_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led);
+ uint8_t led_count = led_matrix_map_row_column_to_led(row, .col, led);
for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 255;
g_any_key_hit = 255;
#endif
}
- return true;
}
-void led_matrix_set_suspend_state(bool state) {
- if (LED_DISABLE_WHEN_USB_SUSPENDED && state) {
- led_matrix_set_value_all(0); // turn off all LEDs when suspending
- }
- g_suspend_state = state;
-}
-
-bool led_matrix_get_suspend_state(void) { return g_suspend_state; }
-
-// All LEDs off
-void led_matrix_all_off(void) { led_matrix_set_index_value_all(0); }
+static void led_matrix_none(void) { led_matrix_set_value_all(0); }
// Uniform brightness
-void led_matrix_uniform_brightness(void) { led_matrix_set_index_value_all(led_matrix_eeconfig.val); }
+void led_matrix_uniform_brightness(void) { led_matrix_set_value_all(led_matrix_eeconfig.val); }
void led_matrix_custom(void) {}
void led_matrix_task(void) {
if (!led_matrix_eeconfig.enable) {
- led_matrix_all_off();
+ led_matrix_none();
led_matrix_indicators();
return;
}
@@ -203,13 +192,23 @@ void led_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || (LED_DISABLE_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_TIMEOUT));
- uint8_t effect = suspend_backlight ? 0 : led_matrix_eeconfig.mode;
+ bool suspend_backlight =
+#if LED_DISABLE_WHEN_USB_SUSPENDED == true
+ g_suspend_state ||
+#endif // LED_DISABLE_WHEN_USB_SUSPENDED == true
+#if LED_DISABLE_TIMEOUT > 0
+ (g_any_key_hit > (uint32_t)LED_DISABLE_TIMEOUT) ||
+#endif // LED_DISABLE_TIMEOUT > 0
+ false;
+
+ uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;
// this gets ticked at 20 Hz.
// each effect can opt to do calculations
// and/or request PWM buffer updates.
switch (effect) {
+ case LED_MATRIX_NONE:
+ led_matrix_none();
case LED_MATRIX_UNIFORM_BRIGHTNESS:
led_matrix_uniform_brightness();
break;
@@ -218,7 +217,7 @@ void led_matrix_task(void) {
break;
}
- if (!suspend_backlight) {
+ if (effect) {
led_matrix_indicators();
}
@@ -257,10 +256,18 @@ void led_matrix_init(void) {
dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
eeconfig_update_led_matrix_default();
}
-
eeconfig_debug_led_matrix(); // display current eeprom values
}
+void led_matrix_set_suspend_state(bool state) {
+ if (LED_DISABLE_WHEN_USB_SUSPENDED && state) {
+ led_matrix_set_value_all(0); // turn off all LEDs when suspending
+ }
+ g_suspend_state = state;
+}
+
+bool led_matrix_get_suspend_state(void) { return g_suspend_state; }
+
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
if (write_to_eeprom) {
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index ba8f0279a6..48c9483b2d 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -48,8 +48,11 @@
#endif
enum led_matrix_effects {
- LED_MATRIX_UNIFORM_BRIGHTNESS = 1,
+ LED_MATRIX_NONE = 0,
+
+ LED_MATRIX_UNIFORM_BRIGHTNESS,
// All new effects go above this line
+
LED_MATRIX_EFFECT_MAX
};
@@ -63,7 +66,7 @@ uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l
void led_matrix_set_value(int index, uint8_t value);
void led_matrix_set_value_all(uint8_t value);
-bool process_led_matrix(uint16_t keycode, keyrecord_t *record);
+void process_led_matrix(uint8_t row, uint8_t col, bool pressed);
void led_matrix_task(void);
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index d52c8ac410..96b19a77fd 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -28,6 +28,9 @@
# include "rgblight.h"
#endif
+#ifdef LED_MATRIX_ENABLE
+# include "led_matrix.h"
+#endif
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
#endif
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index 17f024caba..b3949185e9 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -24,6 +24,9 @@
# include "rgblight.h"
#endif
+#ifdef LED_MATRIX_ENABLE
+# include "led_matrix.h"
+#endif
#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"
#endif
@@ -57,6 +60,9 @@ void suspend_power_down(void) {
backlight_set(0);
#endif
+#ifdef LED_MATRIX_ENABLE
+ led_matrix_task();
+#endif
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_task();
#endif
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index e473806b21..132affe7a8 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -330,6 +330,9 @@ void keyboard_init(void) {
* This is differnet than keycode events as no layer processing, or filtering occurs.
*/
void switch_events(uint8_t row, uint8_t col, bool pressed) {
+#if defined(LED_MATRIX_ENABLE)
+ process_led_matrix(row, col, pressed);
+#endif
#if defined(RGB_MATRIX_ENABLE)
process_rgb_matrix(row, col, pressed);
#endif
--
cgit v1.2.3
From 333cd4ec9b31eddaceeaa719acbe56b23a507417 Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Tue, 13 Apr 2021 19:58:34 +1000
Subject: [CI] Format code according to conventions (#12570)
Co-authored-by: QMK Bot ---
quantum/led_matrix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 5258b3acfd..4f05109b1a 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -192,7 +192,7 @@ void led_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight =
+ bool suspend_backlight =
#if LED_DISABLE_WHEN_USB_SUSPENDED == true
g_suspend_state ||
#endif // LED_DISABLE_WHEN_USB_SUSPENDED == true
--
cgit v1.2.3
From 53eb35b6cfb6cd1129a8d225aeb8a8a326851a2d Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 15 Apr 2021 12:08:52 +1000
Subject: LED Matrix: Task system (#12580)
---
quantum/led_matrix.c | 190 ++++++++++++++++++++++++++++++++-------------
quantum/led_matrix.h | 66 +++++++++-------
quantum/led_matrix_types.h | 11 +--
3 files changed, 176 insertions(+), 91 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 4f05109b1a..c40e5bd7d9 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -75,15 +75,19 @@
// globals
bool g_suspend_state = false;
led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
+uint32_t g_led_timer;
-// Global tick at 20 Hz
-uint32_t g_tick = 0;
-
-// Ticks since this key was last hit.
-uint8_t g_key_hit[DRIVER_LED_TOTAL];
+// internals
+static uint8_t led_last_enable = UINT8_MAX;
+static uint8_t led_last_effect = UINT8_MAX;
+static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
+static led_task_states led_task_state = SYNCING;
+#if LED_DISABLE_TIMEOUT > 0
+static uint32_t led_anykey_timer;
+#endif // LED_DISABLE_TIMEOUT > 0
-// Ticks since any key was last hit.
-uint32_t g_any_key_hit = 0;
+// double buffers
+static uint32_t led_timer_buffer;
void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
@@ -95,6 +99,7 @@ void eeconfig_update_led_matrix_default(void) {
led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE;
led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL;
led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD;
+ led_matrix_eeconfig.flags = LED_FLAG_ALL;
eeconfig_update_led_matrix();
}
@@ -104,6 +109,7 @@ void eeconfig_debug_led_matrix(void) {
dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode);
dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val);
dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed);
+ dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
}
uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255};
@@ -140,6 +146,10 @@ void led_matrix_set_value_all(uint8_t value) {
}
void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
+#if LED_DISABLE_TIMEOUT > 0
+ led_anykey_timer = 0;
+#endif // LED_DISABLE_TIMEOUT > 0
+
if (pressed) {
uint8_t led[8];
uint8_t led_count = led_matrix_map_row_column_to_led(row, col, led);
@@ -150,45 +160,112 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
g_last_led_hit[0] = led[0];
g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1);
}
- for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 0;
- g_any_key_hit = 0;
} else {
#ifdef LED_MATRIX_KEYRELEASES
uint8_t led[8];
uint8_t led_count = led_matrix_map_row_column_to_led(row, .col, led);
- for (uint8_t i = 0; i < led_count; i++) g_key_hit[led[i]] = 255;
-
- g_any_key_hit = 255;
#endif
}
}
-static void led_matrix_none(void) { led_matrix_set_value_all(0); }
+static bool led_matrix_none(effect_params_t *params) {
+ if (!params->init) {
+ return false;
+ }
-// Uniform brightness
-void led_matrix_uniform_brightness(void) { led_matrix_set_value_all(led_matrix_eeconfig.val); }
+ led_matrix_set_value_all(0);
+ return false;
+}
-void led_matrix_custom(void) {}
+static bool led_matrix_uniform_brightness(effect_params_t *params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
-void led_matrix_task(void) {
- if (!led_matrix_eeconfig.enable) {
- led_matrix_none();
- led_matrix_indicators();
- return;
+ uint8_t val = led_matrix_eeconfig.val;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, val);
}
+ return led_max < DRIVER_LED_TOTAL;
+}
- g_tick++;
+static void led_task_timers(void) {
+#if LED_DISABLE_TIMEOUT > 0
+ uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer);
+#endif // LED_DISABLE_TIMEOUT > 0
+ led_timer_buffer = sync_timer_read32();
- if (g_any_key_hit < 0xFFFFFFFF) {
- g_any_key_hit++;
+ // Update double buffer timers
+#if LED_DISABLE_TIMEOUT > 0
+ if (led_anykey_timer < UINT32_MAX) {
+ if (UINT32_MAX - deltaTime < led_anykey_timer) {
+ led_anykey_timer = UINT32_MAX;
+ } else {
+ led_anykey_timer += deltaTime;
+ }
+ }
+#endif // LED_DISABLE_TIMEOUT > 0
+}
+
+static void led_task_sync(void) {
+ // next task
+ if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
+}
+
+static void led_task_start(void) {
+ // reset iter
+ led_effect_params.iter = 0;
+
+ // update double buffers
+ g_led_timer = led_timer_buffer;
+
+ // next task
+ led_task_state = RENDERING;
+}
+
+static void led_task_render(uint8_t effect) {
+ bool rendering = false;
+ led_effect_params.init = (effect != led_last_effect) || (led_matrix_eeconfig.enable != led_last_enable);
+ if (led_effect_params.flags != led_matrix_eeconfig.flags) {
+ led_effect_params.flags = led_matrix_eeconfig.flags;
+ led_matrix_set_value_all(0);
+ }
+
+ // each effect can opt to do calculations
+ // and/or request PWM buffer updates.
+ switch (effect) {
+ case LED_MATRIX_NONE:
+ rendering = led_matrix_none(&led_effect_params);
+ case LED_MATRIX_UNIFORM_BRIGHTNESS:
+ rendering = led_matrix_uniform_brightness(&led_effect_params);
+ break;
}
- for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
- if (g_key_hit[led] < 255) {
- if (g_key_hit[led] == 254) g_last_led_count = MAX(g_last_led_count - 1, 0);
- g_key_hit[led]++;
+ led_effect_params.iter++;
+
+ // next task
+ if (!rendering) {
+ led_task_state = FLUSHING;
+ if (!led_effect_params.init && effect == LED_MATRIX_NONE) {
+ // We only need to flush once if we are LED_MATRIX_NONE
+ led_task_state = SYNCING;
}
}
+}
+
+static void led_task_flush(uint8_t effect) {
+ // update last trackers after the first full render so we can init over several frames
+ led_last_effect = effect;
+ led_last_enable = led_matrix_eeconfig.enable;
+
+ // update pwm buffers
+ led_matrix_update_pwm_buffers();
+
+ // next task
+ led_task_state = SYNCING;
+}
+
+void led_matrix_task(void) {
+ led_task_timers();
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
@@ -197,32 +274,29 @@ void led_matrix_task(void) {
g_suspend_state ||
#endif // LED_DISABLE_WHEN_USB_SUSPENDED == true
#if LED_DISABLE_TIMEOUT > 0
- (g_any_key_hit > (uint32_t)LED_DISABLE_TIMEOUT) ||
+ (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
#endif // LED_DISABLE_TIMEOUT > 0
false;
uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;
- // this gets ticked at 20 Hz.
- // each effect can opt to do calculations
- // and/or request PWM buffer updates.
- switch (effect) {
- case LED_MATRIX_NONE:
- led_matrix_none();
- case LED_MATRIX_UNIFORM_BRIGHTNESS:
- led_matrix_uniform_brightness();
+ switch (led_task_state) {
+ case STARTING:
+ led_task_start();
break;
- default:
- led_matrix_custom();
+ case RENDERING:
+ led_task_render(effect);
+ if (effect) {
+ led_matrix_indicators();
+ }
+ break;
+ case FLUSHING:
+ led_task_flush(effect);
+ break;
+ case SYNCING:
+ led_task_sync();
break;
}
-
- if (effect) {
- led_matrix_indicators();
- }
-
- // Tell the LED driver to update its state
- led_matrix_driver.flush();
}
void led_matrix_indicators(void) {
@@ -237,14 +311,6 @@ __attribute__((weak)) void led_matrix_indicators_user(void) {}
void led_matrix_init(void) {
led_matrix_driver.init();
- // Wait half a second for the driver to finish initializing
- wait_ms(500);
-
- // clear the key hits
- for (int led = 0; led < DRIVER_LED_TOTAL; led++) {
- g_key_hit[led] = 255;
- }
-
if (!eeconfig_is_enabled()) {
dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
eeconfig_init();
@@ -270,6 +336,7 @@ bool led_matrix_get_suspend_state(void) { return g_suspend_state; }
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
+ led_task_state = STARTING;
if (write_to_eeprom) {
eeconfig_update_led_matrix();
}
@@ -283,14 +350,20 @@ void led_matrix_enable(void) {
eeconfig_update_led_matrix();
}
-void led_matrix_enable_noeeprom(void) { led_matrix_eeconfig.enable = 1; }
+void led_matrix_enable_noeeprom(void) {
+ if (!led_matrix_eeconfig.enable) led_task_state = STARTING;
+ led_matrix_eeconfig.enable = 1;
+}
void led_matrix_disable(void) {
led_matrix_disable_noeeprom();
eeconfig_update_led_matrix();
}
-void led_matrix_disable_noeeprom(void) { led_matrix_eeconfig.enable = 0; }
+void led_matrix_disable_noeeprom(void) {
+ if (led_matrix_eeconfig.enable) led_task_state = STARTING;
+ led_matrix_eeconfig.enable = 0;
+}
uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; }
@@ -305,6 +378,7 @@ void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
} else {
led_matrix_eeconfig.mode = mode;
}
+ led_task_state = STARTING;
if (write_to_eeprom) {
eeconfig_update_led_matrix();
}
@@ -371,3 +445,7 @@ void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); }
void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); }
void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); }
+
+led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; }
+
+void led_matrix_set_flags(led_flags_t flags) { led_matrix_eeconfig.flags = flags; }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index 48c9483b2d..7fb1c953a6 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -47,6 +47,9 @@
uint8_t max = DRIVER_LED_TOTAL;
#endif
+#define LED_MATRIX_TEST_LED_FLAGS() \
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
+
enum led_matrix_effects {
LED_MATRIX_NONE = 0,
@@ -78,36 +81,38 @@ void led_matrix_indicators_user(void);
void led_matrix_init(void);
-void led_matrix_set_suspend_state(bool state);
-bool led_matrix_get_suspend_state(void);
-void led_matrix_toggle(void);
-void led_matrix_toggle_noeeprom(void);
-void led_matrix_enable(void);
-void led_matrix_enable_noeeprom(void);
-void led_matrix_disable(void);
-void led_matrix_disable_noeeprom(void);
-uint8_t led_matrix_is_enabled(void);
-void led_matrix_mode(uint8_t mode);
-void led_matrix_mode_noeeprom(uint8_t mode);
-uint8_t led_matrix_get_mode(void);
-void led_matrix_step(void);
-void led_matrix_step_noeeprom(void);
-void led_matrix_step_reverse(void);
-void led_matrix_step_reverse_noeeprom(void);
-void led_matrix_set_val(uint8_t val);
-void led_matrix_set_val_noeeprom(uint8_t val);
-uint8_t led_matrix_get_val(void);
-void led_matrix_increase_val(void);
-void led_matrix_increase_val_noeeprom(void);
-void led_matrix_decrease_val(void);
-void led_matrix_decrease_val_noeeprom(void);
-void led_matrix_set_speed(uint8_t speed);
-void led_matrix_set_speed_noeeprom(uint8_t speed);
-uint8_t led_matrix_get_speed(void);
-void led_matrix_increase_speed(void);
-void led_matrix_increase_speed_noeeprom(void);
-void led_matrix_decrease_speed(void);
-void led_matrix_decrease_speed_noeeprom(void);
+void led_matrix_set_suspend_state(bool state);
+bool led_matrix_get_suspend_state(void);
+void led_matrix_toggle(void);
+void led_matrix_toggle_noeeprom(void);
+void led_matrix_enable(void);
+void led_matrix_enable_noeeprom(void);
+void led_matrix_disable(void);
+void led_matrix_disable_noeeprom(void);
+uint8_t led_matrix_is_enabled(void);
+void led_matrix_mode(uint8_t mode);
+void led_matrix_mode_noeeprom(uint8_t mode);
+uint8_t led_matrix_get_mode(void);
+void led_matrix_step(void);
+void led_matrix_step_noeeprom(void);
+void led_matrix_step_reverse(void);
+void led_matrix_step_reverse_noeeprom(void);
+void led_matrix_set_val(uint8_t val);
+void led_matrix_set_val_noeeprom(uint8_t val);
+uint8_t led_matrix_get_val(void);
+void led_matrix_increase_val(void);
+void led_matrix_increase_val_noeeprom(void);
+void led_matrix_decrease_val(void);
+void led_matrix_decrease_val_noeeprom(void);
+void led_matrix_set_speed(uint8_t speed);
+void led_matrix_set_speed_noeeprom(uint8_t speed);
+uint8_t led_matrix_get_speed(void);
+void led_matrix_increase_speed(void);
+void led_matrix_increase_speed_noeeprom(void);
+void led_matrix_decrease_speed(void);
+void led_matrix_decrease_speed_noeeprom(void);
+led_flags_t led_matrix_get_flags(void);
+void led_matrix_set_flags(led_flags_t flags);
typedef struct {
/* Perform any initialisation required for the other driver functions to work. */
@@ -126,4 +131,5 @@ extern const led_matrix_driver_t led_matrix_driver;
extern led_eeconfig_t led_matrix_eeconfig;
extern bool g_suspend_state;
+extern uint32_t g_led_timer;
extern led_config_t g_led_config;
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix_types.h
index be0e10bb9f..13f44b07e9 100644
--- a/quantum/led_matrix_types.h
+++ b/quantum/led_matrix_types.h
@@ -83,11 +83,12 @@ typedef struct PACKED {
typedef union {
uint32_t raw;
struct PACKED {
- uint8_t enable : 2;
- uint8_t mode : 6;
- uint16_t reserved;
- uint8_t val;
- uint8_t speed; // EECONFIG needs to be increased to support this
+ uint8_t enable : 2;
+ uint8_t mode : 6;
+ uint16_t reserved;
+ uint8_t val;
+ uint8_t speed; // EECONFIG needs to be increased to support this
+ led_flags_t flags;
};
} led_eeconfig_t;
--
cgit v1.2.3
From e2289ffac09e86da32a331ce688e9cd3875e1cd6 Mon Sep 17 00:00:00 2001
From: Joshua Diamond
Date: Thu, 15 Apr 2021 19:32:17 -0400
Subject: Add missing RGB_MODE_TWINKLE / RGB_M_TW keycodes (#11935)
* Add missing RGB_MODE_TWINKLE / RGB_M_TW keycodes
* Better comment
Co-authored-by: Ryan
Co-authored-by: Ryan ---
docs/feature_rgblight.md | 1 +
quantum/process_keycode/process_rgb.c | 5 +++++
quantum/quantum_keycodes.h | 4 ++++
3 files changed, 10 insertions(+)
(limited to 'quantum')
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index d2612a6d1b..8e8d6b81c3 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -74,6 +74,7 @@ Changing the **Value** sets the overall brightness.
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
+|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature.
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
index 5dd8e7809d..167c0c03c9 100644
--- a/quantum/process_keycode/process_rgb.c
+++ b/quantum/process_keycode/process_rgb.c
@@ -205,6 +205,11 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
case RGB_MODE_RGBTEST:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RGB_TEST)
rgblight_mode(RGBLIGHT_MODE_RGB_TEST);
+#endif
+ return false;
+ case RGB_MODE_TWINKLE:
+#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_TWINKLE)
+ handleKeycodeRGBMode(RGBLIGHT_MODE_TWINKLE, RGBLIGHT_MODE_TWINKLE_end);
#endif
return false;
}
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index b6353081c1..26021598a1 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -511,6 +511,9 @@ enum quantum_keycodes {
ONESHOT_DISABLE,
ONESHOT_TOGGLE,
+ // RGB underglow/matrix (continued)
+ RGB_MODE_TWINKLE,
+
// Start of custom keycode range for keyboards and keymaps - always leave at the end
SAFE_RANGE
};
@@ -654,6 +657,7 @@ enum quantum_keycodes {
#define RGB_M_X RGB_MODE_XMAS
#define RGB_M_G RGB_MODE_GRADIENT
#define RGB_M_T RGB_MODE_RGBTEST
+#define RGB_M_TW RGB_MODE_TWINKLE
// Magic aliases
#define CL_SWAP MAGIC_SWAP_CONTROL_CAPSLOCK
--
cgit v1.2.3
From 180a32ec59339cf07323412457ec771fba69ea61 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Sun, 18 Apr 2021 23:26:37 -0700
Subject: Enhancement of WPM feature (#11727)
---
docs/feature_wpm.md | 67 +++++++++++++++++++++++++++++++++++++++++------------
quantum/wpm.c | 36 ++++++++++++++++++++++++----
quantum/wpm.h | 12 ++++++++++
3 files changed, 95 insertions(+), 20 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_wpm.md b/docs/feature_wpm.md
index 12dd080579..c8ec3a7f32 100644
--- a/docs/feature_wpm.md
+++ b/docs/feature_wpm.md
@@ -1,25 +1,62 @@
# Word Per Minute (WPM) Calculcation
-The WPM feature uses time between keystrokes to compute a rolling average words
-per minute rate and makes this available for various uses.
+The WPM feature uses time between keystrokes to compute a rolling average words per minute rate and makes this available for various uses.
Enable the WPM system by adding this to your `rules.mk`:
WPM_ENABLE = yes
-For split keyboards using soft serial, the computed WPM
-score will be available on the master AND slave half.
+For split keyboards using soft serial, the computed WPM score will be available on the master AND slave half.
-## Public Functions
-
-`uint8_t get_current_wpm(void);`
-This function returns the current WPM as an unsigned integer.
+## Configuration
+|Define |Default | Description |
+|-----------------------------|--------------|------------------------------------------------------------------------------------------|
+|`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes |
+|`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) |
+|`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace |
+## Public Functions
-## Customized keys for WPM calc
-
-By default, the WPM score only includes letters, numbers, space and some
-punctuation. If you want to change the set of characters considered as part of
-the WPM calculation, you can implement `wpm_keycode_user(uint16_t keycode)`
-and return true for any characters you would like included in the calculation,
-or false to not count that particular keycode.
+|Function |Description |
+|--------------------------|--------------------------------------------------|
+|`get_current_wpm(void)` | Returns the current WPM as a value between 0-255 |
+|`set_current_wpm(x)` | Sets the current WPM to `x` (between 0-255) |
+
+## Callbacks
+
+By default, the WPM score only includes letters, numbers, space and some punctuation. If you want to change the set of characters considered as part of the WPM calculation, you can implement your own `bool wpm_keycode_user(uint16_t keycode)` and return true for any characters you would like included in the calculation, or false to not count that particular keycode.
+
+For instance, the default is:
+
+```c
+bool wpm_keycode_user(uint16_t keycode) {
+ if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
+ keycode = keycode & 0xFF;
+ } else if (keycode > 0xFF) {
+ keycode = 0;
+ }
+ if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) {
+ return true;
+ }
+
+ return false;
+}
+```
+
+Additionally, if `WPM_ALLOW_COUNT_REGRESSION` is defined, there is the `uint8_t wpm_regress_count(uint16_t keycode)` function that allows you to decrease the WPM. This is useful if you want to be able to penalize certain keycodes (or even combinations).
+
+__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
+ bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
+
+ if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
+ keycode = keycode & 0xFF;
+ } else if (keycode > 0xFF) {
+ keycode = 0;
+ }
+ if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL} || weak_modded) && (keycode == KC_DEL || keycode == KC_BSPC)) {
+ return WPM_ESTIMATED_WORD_SIZE;
+ }
+ if (keycode == KC_DEL || keycode == KC_BSPC) {
+ return 1;
+ }
+}
diff --git a/quantum/wpm.c b/quantum/wpm.c
index da30bd252c..c44b1172b5 100644
--- a/quantum/wpm.c
+++ b/quantum/wpm.c
@@ -19,11 +19,10 @@
// WPM Stuff
static uint8_t current_wpm = 0;
-static uint8_t latest_wpm = 0;
static uint16_t wpm_timer = 0;
// This smoothing is 40 keystrokes
-static const float wpm_smoothing = 0.0487;
+static const float wpm_smoothing = WPM_SMOOTHING;
void set_current_wpm(uint8_t new_wpm) { current_wpm = new_wpm; }
@@ -46,19 +45,46 @@ __attribute__((weak)) bool wpm_keycode_user(uint16_t keycode) {
return false;
}
+#ifdef WPM_ALLOW_COUNT_REGRESSION
+__attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) {
+ bool weak_modded = (keycode >= QK_LCTL && keycode < QK_LSFT) || (keycode >= QK_RCTL && keycode < QK_RSFT);
+
+ if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
+ keycode = keycode & 0xFF;
+ } else if (keycode > 0xFF) {
+ keycode = 0;
+ }
+ if (keycode == KC_DEL || keycode == KC_BSPC) {
+ if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) || weak_modded) {
+ return WPM_ESTIMATED_WORD_SIZE;
+ } else {
+ return 1;
+ }
+ } else {
+ return 0;
+ }
+}
+#endif
+
void update_wpm(uint16_t keycode) {
if (wpm_keycode(keycode)) {
if (wpm_timer > 0) {
- latest_wpm = 60000 / timer_elapsed(wpm_timer) / 5;
- current_wpm = (latest_wpm - current_wpm) * wpm_smoothing + current_wpm;
+ current_wpm += ((60000 / timer_elapsed(wpm_timer) / WPM_ESTIMATED_WORD_SIZE) - current_wpm) * wpm_smoothing;
}
wpm_timer = timer_read();
}
+#ifdef WPM_ALLOW_COUNT_REGRESSION
+ uint8_t regress = wpm_regress_count(keycode);
+ if (regress) {
+ current_wpm -= regress;
+ wpm_timer = timer_read();
+ }
+#endif
}
void decay_wpm(void) {
if (timer_elapsed(wpm_timer) > 1000) {
- current_wpm = (0 - current_wpm) * wpm_smoothing + current_wpm;
+ current_wpm += (-current_wpm) * wpm_smoothing;
wpm_timer = timer_read();
}
}
diff --git a/quantum/wpm.h b/quantum/wpm.h
index 15ab4ffcd1..079401eb4d 100644
--- a/quantum/wpm.h
+++ b/quantum/wpm.h
@@ -19,10 +19,22 @@
#include "quantum.h"
+
+#ifndef WPM_ESTIMATED_WORD_SIZE
+# define WPM_ESTIMATED_WORD_SIZE 5
+#endif
+#ifndef WPM_SMOOTHING
+# define WPM_SMOOTHING 0.0487
+#endif
+
bool wpm_keycode(uint16_t keycode);
bool wpm_keycode_kb(uint16_t keycode);
bool wpm_keycode_user(uint16_t keycode);
+#ifdef WPM_ALLOW_COUNT_REGRESSION
+uint8_t wpm_regress_count(uint16_t keycode);
+#endif
+
void set_current_wpm(uint8_t);
uint8_t get_current_wpm(void);
void update_wpm(uint16_t);
--
cgit v1.2.3
From 230f09ca17c62ff1b47350f0232db2c2de4f2765 Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Mon, 19 Apr 2021 20:19:16 +1000
Subject: [CI] Format code according to conventions (#12623)
Co-authored-by: QMK Bot ---
quantum/wpm.c | 2 +-
quantum/wpm.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
(limited to 'quantum')
diff --git a/quantum/wpm.c b/quantum/wpm.c
index c44b1172b5..bec419a48e 100644
--- a/quantum/wpm.c
+++ b/quantum/wpm.c
@@ -85,6 +85,6 @@ void update_wpm(uint16_t keycode) {
void decay_wpm(void) {
if (timer_elapsed(wpm_timer) > 1000) {
current_wpm += (-current_wpm) * wpm_smoothing;
- wpm_timer = timer_read();
+ wpm_timer = timer_read();
}
}
diff --git a/quantum/wpm.h b/quantum/wpm.h
index 079401eb4d..4af52d2b98 100644
--- a/quantum/wpm.h
+++ b/quantum/wpm.h
@@ -19,7 +19,6 @@
#include "quantum.h"
-
#ifndef WPM_ESTIMATED_WORD_SIZE
# define WPM_ESTIMATED_WORD_SIZE 5
#endif
--
cgit v1.2.3
From c02137a0d245a7be8ca44cf46f05a632cc8fc702 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Mon, 19 Apr 2021 20:34:14 -0700
Subject: Add Per Key functionality for AutoShift (#11536)
Co-authored-by: Ryan ---
docs/feature_auto_shift.md | 27 +++++++++++++++++++++++++++
quantum/process_keycode/process_auto_shift.c | 20 +++++++++++++-------
quantum/process_keycode/process_auto_shift.h | 1 +
3 files changed, 41 insertions(+), 7 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
index 8e04d9dd38..ec7eeaaa0c 100644
--- a/docs/feature_auto_shift.md
+++ b/docs/feature_auto_shift.md
@@ -109,6 +109,33 @@ Do not Auto Shift numeric keys, zero through nine.
Do not Auto Shift alpha characters, which include A through Z.
+### Auto Shift Per Key
+
+This is a function that allows you to determine which keys shold be autoshifted, much like the tap-hold keys.
+
+The default function looks like this:
+
+```c
+bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+# ifndef NO_AUTO_SHIFT_ALPHA
+ case KC_A ... KC_Z:
+# endif
+# ifndef NO_AUTO_SHIFT_NUMERIC
+ case KC_1 ... KC_0:
+# endif
+# ifndef NO_AUTO_SHIFT_SPECIAL
+ case KC_TAB:
+ case KC_MINUS ... KC_SLASH:
+ case KC_NONUS_BSLASH:
+# endif
+ return true;
+ }
+ return false;
+}
+```
+This functionality is enabled by default, and does not need a define.
+
### AUTO_SHIFT_REPEAT (simple define)
Enables keyrepeat.
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index bf359e994d..51b0efdb47 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -216,7 +216,18 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
# endif
}
}
+ if (get_auto_shifted_key(keycode, record)) {
+ if (record->event.pressed) {
+ return autoshift_press(keycode, now, record);
+ } else {
+ autoshift_end(keycode, now, false);
+ return false;
+ }
+ }
+ return true;
+}
+__attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
# ifndef NO_AUTO_SHIFT_ALPHA
case KC_A ... KC_Z:
@@ -229,14 +240,9 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) {
case KC_MINUS ... KC_SLASH:
case KC_NONUS_BSLASH:
# endif
- if (record->event.pressed) {
- return autoshift_press(keycode, now, record);
- } else {
- autoshift_end(keycode, now, false);
- return false;
- }
+ return true;
}
- return true;
+ return false;
}
#endif
diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h
index 5b2718f11c..00a9ab036f 100644
--- a/quantum/process_keycode/process_auto_shift.h
+++ b/quantum/process_keycode/process_auto_shift.h
@@ -31,3 +31,4 @@ bool get_autoshift_state(void);
uint16_t get_autoshift_timeout(void);
void set_autoshift_timeout(uint16_t timeout);
void autoshift_matrix_scan(void);
+bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record);
--
cgit v1.2.3
From cb19c0906e215a46a8e9461af3be022f2ebcb263 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Tue, 20 Apr 2021 17:38:44 +1000
Subject: LED Matrix: Reactive effect buffers & advanced indicators (#12588)
---
quantum/led_matrix.c | 125 +++++++++++++++++++++++++++++++++++++++------------
quantum/led_matrix.h | 10 +++++
2 files changed, 107 insertions(+), 28 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index c40e5bd7d9..69600c498a 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -27,14 +27,6 @@
#include
-#ifndef MAX
-# define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
-#endif
-
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT)
# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL)
#endif
@@ -76,6 +68,12 @@
bool g_suspend_state = false;
led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
uint32_t g_led_timer;
+#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
+uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
+#endif // LED_MATRIX_FRAMEBUFFER_EFFECTS
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+last_hit_t g_last_hit_tracker;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
// internals
static uint8_t led_last_enable = UINT8_MAX;
@@ -88,6 +86,9 @@ static uint32_t led_anykey_timer;
// double buffers
static uint32_t led_timer_buffer;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+static last_hit_t last_hit_buffer;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
@@ -112,9 +113,6 @@ void eeconfig_debug_led_matrix(void) {
dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
}
-uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255};
-uint8_t g_last_led_count = 0;
-
__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
@@ -150,22 +148,42 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
led_anykey_timer = 0;
#endif // LED_DISABLE_TIMEOUT > 0
- if (pressed) {
- uint8_t led[8];
- uint8_t led_count = led_matrix_map_row_column_to_led(row, col, led);
- if (led_count > 0) {
- for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) {
- g_last_led_hit[i - 1] = g_last_led_hit[i - 2];
- }
- g_last_led_hit[0] = led[0];
- g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1);
- }
- } else {
-#ifdef LED_MATRIX_KEYRELEASES
- uint8_t led[8];
- uint8_t led_count = led_matrix_map_row_column_to_led(row, .col, led);
-#endif
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = 0;
+
+# if defined(LED_MATRIX_KEYRELEASES)
+ if (!pressed)
+# elif defined(LED_MATRIX_KEYPRESSES)
+ if (pressed)
+# endif // defined(LED_MATRIX_KEYRELEASES)
+ {
+ led_count = led_matrix_map_row_column_to_led(row, col, led);
+ }
+
+ if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
+ memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
+ memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
+ last_hit_buffer.count--;
+ }
+
+ for (uint8_t i = 0; i < led_count; i++) {
+ uint8_t index = last_hit_buffer.count;
+ last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
+ last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
+ last_hit_buffer.index[index] = led[i];
+ last_hit_buffer.tick[index] = 0;
+ last_hit_buffer.count++;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
+ if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) {
+ process_led_matrix_typing_heatmap(row, col);
}
+#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
}
static bool led_matrix_none(effect_params_t *params) {
@@ -189,9 +207,9 @@ static bool led_matrix_uniform_brightness(effect_params_t *params) {
}
static void led_task_timers(void) {
-#if LED_DISABLE_TIMEOUT > 0
+#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer);
-#endif // LED_DISABLE_TIMEOUT > 0
+#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
led_timer_buffer = sync_timer_read32();
// Update double buffer timers
@@ -204,6 +222,18 @@ static void led_task_timers(void) {
}
}
#endif // LED_DISABLE_TIMEOUT > 0
+
+ // Update double buffer last hit timers
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t count = last_hit_buffer.count;
+ for (uint8_t i = 0; i < count; ++i) {
+ if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
+ last_hit_buffer.count--;
+ continue;
+ }
+ last_hit_buffer.tick[i] += deltaTime;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
}
static void led_task_sync(void) {
@@ -217,6 +247,9 @@ static void led_task_start(void) {
// update double buffers
g_led_timer = led_timer_buffer;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker = last_hit_buffer;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
// next task
led_task_state = RENDERING;
@@ -235,6 +268,7 @@ static void led_task_render(uint8_t effect) {
switch (effect) {
case LED_MATRIX_NONE:
rendering = led_matrix_none(&led_effect_params);
+ break;
case LED_MATRIX_UNIFORM_BRIGHTNESS:
rendering = led_matrix_uniform_brightness(&led_effect_params);
break;
@@ -288,6 +322,7 @@ void led_matrix_task(void) {
led_task_render(effect);
if (effect) {
led_matrix_indicators();
+ led_matrix_indicators_advanced(&led_effect_params);
}
break;
case FLUSHING:
@@ -308,9 +343,43 @@ __attribute__((weak)) void led_matrix_indicators_kb(void) {}
__attribute__((weak)) void led_matrix_indicators_user(void) {}
+void led_matrix_indicators_advanced(effect_params_t *params) {
+ /* special handling is needed for "params->iter", since it's already been incremented.
+ * Could move the invocations to led_task_render, but then it's missing a few checks
+ * and not sure which would be better. Otherwise, this should be called from
+ * led_task_render, right before the iter++ line.
+ */
+#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+ uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1);
+ uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT;
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+ uint8_t min = 0;
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+ led_matrix_indicators_advanced_kb(min, max);
+ led_matrix_indicators_advanced_user(min, max);
+}
+
+__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {}
+
+__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {}
+
void led_matrix_init(void) {
led_matrix_driver.init();
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ g_last_hit_tracker.tick[i] = UINT16_MAX;
+ }
+
+ last_hit_buffer.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ last_hit_buffer.tick[i] = UINT16_MAX;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
if (!eeconfig_is_enabled()) {
dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
eeconfig_init();
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index 7fb1c953a6..f35bbe2096 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -79,6 +79,10 @@ void led_matrix_indicators(void);
void led_matrix_indicators_kb(void);
void led_matrix_indicators_user(void);
+void led_matrix_indicators_advanced(effect_params_t *params);
+void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max);
+void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
+
void led_matrix_init(void);
void led_matrix_set_suspend_state(bool state);
@@ -133,3 +137,9 @@ extern led_eeconfig_t led_matrix_eeconfig;
extern bool g_suspend_state;
extern uint32_t g_led_timer;
extern led_config_t g_led_config;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+extern last_hit_t g_last_hit_tracker;
+#endif
+#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
+extern uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
+#endif
--
cgit v1.2.3
From d6ab908272e7f8f391b19aee0c8a9dce9b24f511 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 22 Apr 2021 19:21:13 +1000
Subject: LED Matrix: Split (#12633)
---
quantum/led_matrix.c | 33 +++++++++++++++++++++++++++------
quantum/split_common/transport.c | 29 +++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 6 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 69600c498a..8905730220 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -90,6 +90,11 @@ static uint32_t led_timer_buffer;
static last_hit_t last_hit_buffer;
#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+// split led matrix
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
+#endif
+
void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
@@ -128,22 +133,38 @@ uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l
void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); }
void led_matrix_set_value(int index, uint8_t value) {
-#ifdef USE_CIE1931_CURVE
- led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
-#else
- led_matrix_driver.set_value(index, value);
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ if (!is_keyboard_left() && index >= k_led_matrix_split[0])
+# ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value]));
+# else
+ led_matrix_driver.set_value(index - k_led_matrix_split[0], value);
+# endif
+ else if (is_keyboard_left() && index < k_led_matrix_split[0])
#endif
+# ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
+# else
+ led_matrix_driver.set_value(index, value);
+# endif
}
void led_matrix_set_value_all(uint8_t value) {
-#ifdef USE_CIE1931_CURVE
- led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value]));
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) led_matrix_set_value(i, value);
#else
+# ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value]));
+# else
led_matrix_driver.set_value_all(value);
+# endif
#endif
}
void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
+#ifndef LED_MATRIX_SPLIT
+ if (!is_keyboard_master()) return;
+#endif
#if LED_DISABLE_TIMEOUT > 0
led_anykey_timer = 0;
#endif // LED_DISABLE_TIMEOUT > 0
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 27a1c0d3a4..7ea925b513 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -22,6 +22,9 @@ static pin_t encoders_pad[] = ENCODERS_PAD_A;
# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
#endif
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+# include "led_matrix.h"
+#endif
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
# include "rgb_matrix.h"
#endif
@@ -58,6 +61,10 @@ typedef struct _I2C_slave_buffer_t {
# ifdef WPM_ENABLE
uint8_t current_wpm;
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ led_eeconfig_t led_matrix;
+ bool led_suspend_state;
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
rgb_config_t rgb_matrix;
bool rgb_suspend_state;
@@ -76,6 +83,8 @@ static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_re
# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
+# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
+# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
@@ -151,6 +160,10 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
@@ -202,6 +215,10 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ memcpy((void*)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
+ memcpy((void*)i2c_buffer->led_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state));
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
memcpy((void *)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state));
@@ -246,6 +263,10 @@ typedef struct _Serial_m2s_buffer_t {
# ifdef WPM_ENABLE
uint8_t current_wpm;
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ led_eeconfig_t led_matrix;
+ bool led_suspend_state;
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
rgb_config_t rgb_matrix;
bool rgb_suspend_state;
@@ -368,6 +389,10 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ serial_m2s_buffer.led_matrix = led_matrix_econfig;
+ serial_m2s_buffer.led_suspend_state = g_suspend_state;
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
serial_m2s_buffer.rgb_suspend_state = g_suspend_state;
@@ -412,6 +437,10 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# endif
+# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
+ g_suspend_state = serial_m2s_buffer.led_suspend_state;
+# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
--
cgit v1.2.3
From 15ff1927dbb01542de895cf8c6c91b69591893ca Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Thu, 22 Apr 2021 19:26:17 +1000
Subject: [CI] Format code according to conventions (#12650)
Co-authored-by: QMK Bot ---
quantum/led_matrix.c | 8 ++++----
quantum/split_common/transport.c | 30 +++++++++++++++---------------
2 files changed, 19 insertions(+), 19 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 8905730220..72eb5190b3 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -142,11 +142,11 @@ void led_matrix_set_value(int index, uint8_t value) {
# endif
else if (is_keyboard_left() && index < k_led_matrix_split[0])
#endif
-# ifdef USE_CIE1931_CURVE
+#ifdef USE_CIE1931_CURVE
led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
-# else
- led_matrix_driver.set_value(index, value);
-# endif
+#else
+ led_matrix_driver.set_value(index, value);
+#endif
}
void led_matrix_set_value_all(uint8_t value) {
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 7ea925b513..b67702f150 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -216,8 +216,8 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- memcpy((void*)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- memcpy((void*)i2c_buffer->led_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state));
+ memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
+ memcpy((void *)i2c_buffer->led_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state));
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
@@ -245,31 +245,31 @@ typedef struct _Serial_s2m_buffer_t {
typedef struct _Serial_m2s_buffer_t {
# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
+ uint8_t real_mods;
+ uint8_t weak_mods;
# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
+ uint8_t oneshot_mods;
# endif
# endif
# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
+ uint32_t sync_timer;
# endif
# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
+ matrix_row_t mmatrix[ROWS_PER_HAND];
# endif
# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
+ uint8_t backlight_level;
# endif
# ifdef WPM_ENABLE
- uint8_t current_wpm;
+ uint8_t current_wpm;
# endif
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
led_eeconfig_t led_matrix;
bool led_suspend_state;
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
# endif
} Serial_m2s_buffer_t;
@@ -390,7 +390,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_econfig;
+ serial_m2s_buffer.led_matrix = led_matrix_econfig;
serial_m2s_buffer.led_suspend_state = g_suspend_state;
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
@@ -439,11 +439,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- g_suspend_state = serial_m2s_buffer.led_suspend_state;
+ g_suspend_state = serial_m2s_buffer.led_suspend_state;
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
+ rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
+ g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
# endif
}
--
cgit v1.2.3
From 26b9b3aa2308a24e069f5ae2ab86e3df24492eed Mon Sep 17 00:00:00 2001
From: Daniel RodrÃguez Rivero
Date: Sun, 25 Apr 2021 02:22:47 +0200
Subject: feat: infinite timeout for leader key (#6580)
* feat: implement leader_no_timeout logic
* docs(leader_key): infinite leader timeout docs---
docs/feature_leader_key.md | 13 +++++++++++++
quantum/process_keycode/process_leader.c | 5 ++++-
quantum/process_keycode/process_leader.h | 9 ++++++++-
3 files changed, 25 insertions(+), 2 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md
index 41ff8f1a4e..f10bca7589 100644
--- a/docs/feature_leader_key.md
+++ b/docs/feature_leader_key.md
@@ -72,6 +72,19 @@ SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
}
```
+## Infinite Leader key timeout
+
+Sometimes your leader key is not on a comfortable places as the rest of keys on your sequence. Imagine that your leader key is one of your outer top right keys, you may need to reposition your hand just to reach your leader key.
+This can make typing the entire sequence on time hard even if you are able to type most of the sequence fast. For example, if your sequence is `Leader + asd` typing `asd` fast is very easy once you have your hands in your home row. However starting the sequence in time after moving your hand out of the home row to reach the leader key and back is not.
+To remove the stress this situation produces to your hands you can enable an infinite timeout just for the leader key. This mean that, after you hit the leader key you will have an infinite amount of time to start the rest of the sequence, allowing you to proper position your hands on the best position to type the rest of the sequence comfortably.
+This infinite timeout only affects the leader key, so in our previous example of `Leader + asd` you will have an infinite amount of time between `Leader` and `a`, but once you start the sequence the timeout you have configured (global or per key) will work normally.
+This way you can configure a very short `LEADER_TIMEOUT` but still have plenty of time to position your hands.
+
+In order to enable this, place this in your `config.h`:
+```c
+#define LEADER_NO_TIMEOUT
+```
+
## Strict Key Processing
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](mod_tap.md) and [`Layer Tap`](feature_layers.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c
index 58a615d85a..cf63f25141 100644
--- a/quantum/process_keycode/process_leader.c
+++ b/quantum/process_keycode/process_leader.c
@@ -49,7 +49,10 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) {
// Leader key set-up
if (record->event.pressed) {
if (leading) {
- if (timer_elapsed(leader_time) < LEADER_TIMEOUT) {
+# ifndef LEADER_NO_TIMEOUT
+ if (timer_elapsed(leader_time) < LEADER_TIMEOUT)
+# endif // LEADER_NO_TIMEOUT
+ {
# ifndef LEADER_KEY_STRICT_KEY_PROCESSING
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
keycode = keycode & 0xFF;
diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h
index 9844f27a1b..5865d65a57 100644
--- a/quantum/process_keycode/process_leader.h
+++ b/quantum/process_keycode/process_leader.h
@@ -35,4 +35,11 @@ void qk_leader_start(void);
extern uint16_t leader_time; \
extern uint16_t leader_sequence[5]; \
extern uint8_t leader_sequence_size
-#define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
+
+#ifdef LEADER_NO_TIMEOUT
+ #define LEADER_DICTIONARY() if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT)
+#else
+ #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
+#endif
+
+#endif
--
cgit v1.2.3
From d8f113bf9807ac17a3c3eb19df3481412674069d Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Sun, 25 Apr 2021 10:34:38 +1000
Subject: Format code according to conventions (#12680)
Co-authored-by: QMK Bot ---
quantum/process_keycode/process_leader.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'quantum')
diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h
index 5865d65a57..32ccd42f75 100644
--- a/quantum/process_keycode/process_leader.h
+++ b/quantum/process_keycode/process_leader.h
@@ -37,9 +37,9 @@ void qk_leader_start(void);
extern uint8_t leader_sequence_size
#ifdef LEADER_NO_TIMEOUT
- #define LEADER_DICTIONARY() if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT)
+# define LEADER_DICTIONARY() if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT)
#else
- #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
+# define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
#endif
#endif
--
cgit v1.2.3
From 891d18d3565090abd5f218a8787acc3e25349b73 Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Sun, 25 Apr 2021 13:40:56 +1000
Subject: Add initial support for tinyuf2 bootloader (when hosted on F411
blackpill) (#12600)
* Add support for jumping to tinyuf2 bootloader. Adds blackpill UF2 example.
* Update flashing.md
* Update chconf.h
* Update config.h
* Update halconf.h
* Update mcuconf.h---
bootloader.mk | 3 +
data/schemas/keyboard.jsonschema | 2 +-
docs/flashing.md | 26 +++++++
.../onekey/blackpill_f411_tinyuf2/chconf.h | 21 +++++
.../onekey/blackpill_f411_tinyuf2/config.h | 31 ++++++++
.../onekey/blackpill_f411_tinyuf2/halconf.h | 22 ++++++
.../onekey/blackpill_f411_tinyuf2/mcuconf.h | 24 ++++++
.../onekey/blackpill_f411_tinyuf2/readme.md | 9 +++
.../onekey/blackpill_f411_tinyuf2/rules.mk | 10 +++
.../BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld | 89 ++++++++++++++++++++++
.../BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld | 89 ++++++++++++++++++++++
quantum/mcu_selection.mk | 7 +-
tmk_core/chibios.mk | 2 +
tmk_core/common/chibios/bootloader.c | 17 ++++-
14 files changed, 349 insertions(+), 3 deletions(-)
create mode 100644 keyboards/handwired/onekey/blackpill_f411_tinyuf2/chconf.h
create mode 100755 keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
create mode 100644 keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
create mode 100755 keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
create mode 100755 keyboards/handwired/onekey/blackpill_f411_tinyuf2/readme.md
create mode 100755 keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk
create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld
create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld
(limited to 'quantum')
diff --git a/bootloader.mk b/bootloader.mk
index fd76446e99..ead52cbe3d 100644
--- a/bootloader.mk
+++ b/bootloader.mk
@@ -137,3 +137,6 @@ ifeq ($(strip $(BOOTLOADER)), stm32duino)
DFU_ARGS = -d 1EAF:0003 -a 2 -R
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
endif
+ifeq ($(strip $(BOOTLOADER)), tinyuf2)
+ OPT_DEFS += -DBOOTLOADER_TINYUF2
+endif
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 3034242fd9..276f66413e 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -34,7 +34,7 @@
},
"bootloader": {
"type": "string",
- "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp"]
+ "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"]
},
"diode_direction": {
"type": "string",
diff --git a/docs/flashing.md b/docs/flashing.md
index 7804a6bad8..83c97444e1 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -249,3 +249,29 @@ Flashing sequence:
2. Wait for the OS to detect the device
3. Flash a .bin file
4. Reset the device into application mode (may be done automatically)
+
+## tinyuf2
+
+Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill.
+
+The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.
+
+To ensure compatibility with the tinyuf2 bootloader, make sure this block is present in your `rules.mk`:
+
+```make
+# Bootloader selection
+BOOTLOADER = tinyuf2
+```
+
+Compatible flashers:
+
+* Any application able to copy a file from one place to another, such as _macOS Finder_ or _Windows Explorer_.
+
+Flashing sequence:
+
+1. Enter the bootloader using any of the following methods:
+ * Tap the `RESET` keycode
+ * Double-tap the `nRST` button on the PCB.
+2. Wait for the OS to detect the device
+3. Copy the .uf2 file to the new USB disk
+4. Wait for the keyboard to become available
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/chconf.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/chconf.h
new file mode 100644
index 0000000000..3d9a393638
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/chconf.h
@@ -0,0 +1,21 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#define CH_CFG_ST_FREQUENCY 10000
+
+#include_next
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
new file mode 100755
index 0000000000..95e99aacc1
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
@@ -0,0 +1,31 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+#define MATRIX_COL_PINS { B0 }
+#define MATRIX_ROW_PINS { A7 }
+#define UNUSED_PINS
+
+#define BACKLIGHT_PIN A0
+#define BACKLIGHT_PWM_DRIVER PWMD5
+#define BACKLIGHT_PWM_CHANNEL 1
+
+#define RGB_DI_PIN A1
+
+#define ADC_PIN A0
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
new file mode 100644
index 0000000000..e15870984f
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
@@ -0,0 +1,22 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_PWM TRUE
+
+#include_next
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
new file mode 100755
index 0000000000..ad8aecdb10
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
@@ -0,0 +1,24 @@
+/* Copyright 2021 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 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 .
+ */
+#pragma once
+
+#include_next "mcuconf.h"
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_PWM_USE_TIM5
+#define STM32_PWM_USE_TIM5 TRUE
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/readme.md b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/readme.md
new file mode 100755
index 0000000000..ff43658f4c
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/readme.md
@@ -0,0 +1,9 @@
+# f411 blackpill onekey
+
+Supported Hardware: *STM32F411CEU6 WeAct v1.3*.
+
+To trigger keypress, short together pins *B0* and *A7*.
+
+This variant requires the TinyUF2 bootloader to be installed. This can be downloaded from the [tinyuf2 releases page](https://github.com/adafruit/tinyuf2/releases). The F401 blackpill binary works for both F401- and F411-based blackpill devices.
+
+Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk.
\ No newline at end of file
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk
new file mode 100755
index 0000000000..ec38577b2b
--- /dev/null
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/rules.mk
@@ -0,0 +1,10 @@
+# MCU name
+MCU = STM32F411
+
+# Build Options
+# change yes to no to disable
+#
+KEYBOARD_SHARED_EP = yes
+
+# We want to use the tinyuf2 bootloader...
+BOOTLOADER = tinyuf2
\ No newline at end of file
diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld
new file mode 100644
index 0000000000..82253d3de5
--- /dev/null
+++ b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld
@@ -0,0 +1,89 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 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.
+*/
+
+/*
+ * STM32F411xC memory setup.
+ */
+MEMORY
+{
+ flash0 (rx) : org = 0x08000000 + 64k, len = 256k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */
+ flash1 (rx) : org = 0x00000000, len = 0
+ flash2 (rx) : org = 0x00000000, len = 0
+ flash3 (rx) : org = 0x00000000, len = 0
+ flash4 (rx) : org = 0x00000000, len = 0
+ flash5 (rx) : org = 0x00000000, len = 0
+ flash6 (rx) : org = 0x00000000, len = 0
+ flash7 (rx) : org = 0x00000000, len = 0
+ ram0 (wx) : org = 0x20000000, len = 128k
+ ram1 (wx) : org = 0x00000000, len = 0
+ ram2 (wx) : org = 0x00000000, len = 0
+ ram3 (wx) : org = 0x00000000, len = 0
+ ram4 (wx) : org = 0x00000000, len = 0
+ ram5 (wx) : org = 0x00000000, len = 0
+ ram6 (wx) : org = 0x00000000, len = 0
+ ram7 (wx) : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
+
+/* TinyUF2 bootloader reset support */
+_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */
+
diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld
new file mode 100644
index 0000000000..1656c67bf7
--- /dev/null
+++ b/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld
@@ -0,0 +1,89 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 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.
+*/
+
+/*
+ * STM32F411xE memory setup.
+ */
+MEMORY
+{
+ flash0 (rx) : org = 0x08000000 + 64k, len = 512k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */
+ flash1 (rx) : org = 0x00000000, len = 0
+ flash2 (rx) : org = 0x00000000, len = 0
+ flash3 (rx) : org = 0x00000000, len = 0
+ flash4 (rx) : org = 0x00000000, len = 0
+ flash5 (rx) : org = 0x00000000, len = 0
+ flash6 (rx) : org = 0x00000000, len = 0
+ flash7 (rx) : org = 0x00000000, len = 0
+ ram0 (wx) : org = 0x20000000, len = 128k
+ ram1 (wx) : org = 0x00000000, len = 0
+ ram2 (wx) : org = 0x00000000, len = 0
+ ram3 (wx) : org = 0x00000000, len = 0
+ ram4 (wx) : org = 0x00000000, len = 0
+ ram5 (wx) : org = 0x00000000, len = 0
+ ram6 (wx) : org = 0x00000000, len = 0
+ ram7 (wx) : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
+
+/* TinyUF2 bootloader reset support */
+_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */
+
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 2e4d250089..437d354fbe 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -304,7 +304,12 @@ ifneq ($(findstring STM32F411, $(MCU)),)
# Linker script to use
# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
# or /ld/
- MCU_LDSCRIPT ?= STM32F411xE
+ ifeq ($(strip $(BOOTLOADER)), tinyuf2)
+ MCU_LDSCRIPT ?= STM32F411xE_tinyuf2
+ FIRMWARE_FORMAT ?= uf2
+ else
+ MCU_LDSCRIPT ?= STM32F411xE
+ endif
# Startup code to use
# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index 40595a1e3b..cdf9ba6495 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -190,6 +190,8 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","")
LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld
else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","")
LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld
+else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/ld/$(MCU_LDSCRIPT).ld)","")
+ LDSCRIPT = $(TOP_DIR)/platforms/chibios/$(BOARD)/ld/$(MCU_LDSCRIPT).ld
else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/common/ld/$(MCU_LDSCRIPT).ld)","")
LDSCRIPT = $(TOP_DIR)/platforms/chibios/common/ld/$(MCU_LDSCRIPT).ld
else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","")
diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c
index 4a175a6283..f91ac7d9eb 100644
--- a/tmk_core/common/chibios/bootloader.c
+++ b/tmk_core/common/chibios/bootloader.c
@@ -13,7 +13,22 @@
# define STM32_BOOTLOADER_DUAL_BANK FALSE
#endif
-#if STM32_BOOTLOADER_DUAL_BANK
+#ifdef BOOTLOADER_TINYUF2
+
+# define DBL_TAP_MAGIC 0xf01669ef // From tinyuf2's board_api.h
+
+// defined by linker script
+extern uint32_t _board_dfu_dbl_tap[];
+# define DBL_TAP_REG _board_dfu_dbl_tap[0]
+
+void bootloader_jump(void) {
+ DBL_TAP_REG = DBL_TAP_MAGIC;
+ NVIC_SystemReset();
+}
+
+void enter_bootloader_mode_if_requested(void) { /* not needed, no two-stage reset */ }
+
+#elif STM32_BOOTLOADER_DUAL_BANK
// Need pin definitions
# include "config_common.h"
--
cgit v1.2.3
From 3f7350732c9722b87ea52eee740e587a70b8fb38 Mon Sep 17 00:00:00 2001
From: Purdea Andrei
Date: Sun, 25 Apr 2021 11:59:25 +0300
Subject: Add support for MCU = STM32F446 (#12619)
* Add support for MCU = STM32F446
* Update platforms/chibios/GENERIC_STM32_F446XE/configs/config.h
Co-authored-by: Nick Brassel
* Restore mcuconf.h to the one used by RT-STM32F446RE-NUCLEO64
* stm32f446: update mcuconf.h and board.h for 16MHz operation, with USB enabled, and other peripherals disabled.
Co-authored-by: Nick Brassel ---
data/schemas/keyboard.jsonschema | 2 +-
docs/compatible_microcontrollers.md | 1 +
docs/ja/compatible_microcontrollers.md | 1 +
lib/python/qmk/constants.py | 2 +-
.../chibios/GENERIC_STM32_F446XE/board/board.mk | 9 +
.../chibios/GENERIC_STM32_F446XE/configs/board.h | 24 ++
.../chibios/GENERIC_STM32_F446XE/configs/config.h | 23 ++
.../chibios/GENERIC_STM32_F446XE/configs/mcuconf.h | 361 +++++++++++++++++++++
quantum/mcu_selection.mk | 34 ++
9 files changed, 455 insertions(+), 2 deletions(-)
create mode 100644 platforms/chibios/GENERIC_STM32_F446XE/board/board.mk
create mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/board.h
create mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/config.h
create mode 100644 platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h
(limited to 'quantum')
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 276f66413e..99121d79ec 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -25,7 +25,7 @@
},
"processor": {
"type": "string",
- "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
+ "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"board": {
"type": "string",
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 47a4844e7f..5e16ab2770 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -28,6 +28,7 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
+ * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md
index fdd11f14fa..69da70f2c3 100644
--- a/docs/ja/compatible_microcontrollers.md
+++ b/docs/ja/compatible_microcontrollers.md
@@ -33,6 +33,7 @@ QMK ã¯å分ãªå®¹é‡ã®ãƒ•ラッシュメモリを備ãˆãŸ USB 対応 AVR ã¾
* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html)
* [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)
* [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html)
+* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index b5cdaf6a60..33adb0a13e 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -10,7 +10,7 @@ QMK_FIRMWARE = Path.cwd()
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
-CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32G431', 'STM32G474'
+CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
diff --git a/platforms/chibios/GENERIC_STM32_F446XE/board/board.mk b/platforms/chibios/GENERIC_STM32_F446XE/board/board.mk
new file mode 100644
index 0000000000..57897941ca
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_F446XE/board/board.mk
@@ -0,0 +1,9 @@
+# List of all the board related files.
+BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F446RE/board.c
+
+# Required include directories
+BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F446RE
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/board.h b/platforms/chibios/GENERIC_STM32_F446XE/configs/board.h
new file mode 100644
index 0000000000..80dfcffa99
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_F446XE/configs/board.h
@@ -0,0 +1,24 @@
+/* Copyright 2020 Nick Brassel (tzarc)
+ *
+ * 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 .
+ */
+#pragma once
+
+#define STM32_HSECLK 16000000
+// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix:
+#define BOARD_OTG_NOVBUSSENS
+
+#include_next "board.h"
+
+#undef STM32_HSE_BYPASS
diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/config.h b/platforms/chibios/GENERIC_STM32_F446XE/configs/config.h
new file mode 100644
index 0000000000..cc52a953ed
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_F446XE/configs/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 Andrei Purdea
+ *
+ * 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 .
+ */
+
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606.
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
+#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
+# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
+#endif
diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h
new file mode 100644
index 0000000000..d2de75590e
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h
@@ -0,0 +1,361 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 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
+
+/*
+ * STM32F4xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define STM32F4xx_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_HSI_ENABLED FALSE
+#define STM32_LSI_ENABLED TRUE
+#define STM32_HSE_ENABLED TRUE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_CLOCK48_REQUIRED TRUE
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSE
+#define STM32_PLLM_VALUE 8
+#define STM32_PLLN_VALUE 180
+#define STM32_PLLP_VALUE 2
+#define STM32_PLLQ_VALUE 7
+#define STM32_PLLI2SN_VALUE 192
+#define STM32_PLLI2SM_VALUE 8
+#define STM32_PLLI2SR_VALUE 4
+#define STM32_PLLI2SP_VALUE 4
+#define STM32_PLLI2SQ_VALUE 4
+#define STM32_PLLSAIN_VALUE 192
+#define STM32_PLLSAIM_VALUE 8
+#define STM32_PLLSAIP_VALUE 8
+#define STM32_PLLSAIQ_VALUE 4
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE1 STM32_PPRE1_DIV4
+#define STM32_PPRE2 STM32_PPRE2_DIV2
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+#define STM32_RTCPRE_VALUE 8
+#define STM32_MCO1SEL STM32_MCO1SEL_HSE
+#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
+#define STM32_MCO2SEL STM32_MCO2SEL_PLLI2S
+#define STM32_MCO2PRE STM32_MCO2PRE_DIV1
+#define STM32_I2SSRC STM32_I2SSRC_PLLI2S
+#define STM32_SAI1SEL STM32_SAI2SEL_PLLR
+#define STM32_SAI2SEL STM32_SAI2SEL_PLLR
+#define STM32_CK48MSEL STM32_CK48MSEL_PLLALT
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_BKPRAM_ENABLE FALSE
+
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI16_PRIORITY 6
+#define STM32_IRQ_EXTI17_PRIORITY 15
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_PRIORITY 15
+#define STM32_IRQ_EXTI22_PRIORITY 15
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_USE_ADC2 FALSE
+#define STM32_ADC_USE_ADC3 FALSE
+#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_ADC2_DMA_PRIORITY 2
+#define STM32_ADC_ADC3_DMA_PRIORITY 2
+#define STM32_ADC_IRQ_PRIORITY 6
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
+#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6
+#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_USE_CAN2 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+#define STM32_CAN_CAN2_IRQ_PRIORITY 11
+
+/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 FALSE
+#define STM32_DAC_USE_DAC1_CH2 FALSE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM3 FALSE
+#define STM32_GPT_USE_TIM4 FALSE
+#define STM32_GPT_USE_TIM5 FALSE
+#define STM32_GPT_USE_TIM6 FALSE
+#define STM32_GPT_USE_TIM7 FALSE
+#define STM32_GPT_USE_TIM8 FALSE
+#define STM32_GPT_USE_TIM9 FALSE
+#define STM32_GPT_USE_TIM11 FALSE
+#define STM32_GPT_USE_TIM12 FALSE
+#define STM32_GPT_USE_TIM14 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY 7
+#define STM32_GPT_TIM2_IRQ_PRIORITY 7
+#define STM32_GPT_TIM3_IRQ_PRIORITY 7
+#define STM32_GPT_TIM4_IRQ_PRIORITY 7
+#define STM32_GPT_TIM5_IRQ_PRIORITY 7
+#define STM32_GPT_TIM6_IRQ_PRIORITY 7
+#define STM32_GPT_TIM7_IRQ_PRIORITY 7
+#define STM32_GPT_TIM8_IRQ_PRIORITY 7
+#define STM32_GPT_TIM9_IRQ_PRIORITY 7
+#define STM32_GPT_TIM11_IRQ_PRIORITY 7
+#define STM32_GPT_TIM12_IRQ_PRIORITY 7
+#define STM32_GPT_TIM14_IRQ_PRIORITY 7
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 FALSE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_USE_I2C3 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_I2C_I2C1_IRQ_PRIORITY 5
+#define STM32_I2C_I2C2_IRQ_PRIORITY 5
+#define STM32_I2C_I2C3_IRQ_PRIORITY 5
+#define STM32_I2C_I2C1_DMA_PRIORITY 3
+#define STM32_I2C_I2C2_DMA_PRIORITY 3
+#define STM32_I2C_I2C3_DMA_PRIORITY 3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * I2S driver system settings.
+ */
+#define STM32_I2S_USE_SPI2 FALSE
+#define STM32_I2S_USE_SPI3 FALSE
+#define STM32_I2S_SPI2_IRQ_PRIORITY 10
+#define STM32_I2S_SPI3_IRQ_PRIORITY 10
+#define STM32_I2S_SPI2_DMA_PRIORITY 1
+#define STM32_I2S_SPI3_DMA_PRIORITY 1
+#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
+#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM3 FALSE
+#define STM32_ICU_USE_TIM4 FALSE
+#define STM32_ICU_USE_TIM5 FALSE
+#define STM32_ICU_USE_TIM8 FALSE
+#define STM32_ICU_USE_TIM9 FALSE
+#define STM32_ICU_TIM1_IRQ_PRIORITY 7
+#define STM32_ICU_TIM2_IRQ_PRIORITY 7
+#define STM32_ICU_TIM3_IRQ_PRIORITY 7
+#define STM32_ICU_TIM4_IRQ_PRIORITY 7
+#define STM32_ICU_TIM5_IRQ_PRIORITY 7
+#define STM32_ICU_TIM8_IRQ_PRIORITY 7
+#define STM32_ICU_TIM9_IRQ_PRIORITY 7
+
+/*
+ * MAC driver system settings.
+ */
+#define STM32_MAC_TRANSMIT_BUFFERS 2
+#define STM32_MAC_RECEIVE_BUFFERS 4
+#define STM32_MAC_BUFFERS_SIZE 1522
+#define STM32_MAC_PHY_TIMEOUT 100
+#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE
+#define STM32_MAC_ETH1_IRQ_PRIORITY 13
+#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM3 FALSE
+#define STM32_PWM_USE_TIM4 FALSE
+#define STM32_PWM_USE_TIM5 FALSE
+#define STM32_PWM_USE_TIM8 FALSE
+#define STM32_PWM_USE_TIM9 FALSE
+#define STM32_PWM_TIM1_IRQ_PRIORITY 7
+#define STM32_PWM_TIM2_IRQ_PRIORITY 7
+#define STM32_PWM_TIM3_IRQ_PRIORITY 7
+#define STM32_PWM_TIM4_IRQ_PRIORITY 7
+#define STM32_PWM_TIM5_IRQ_PRIORITY 7
+#define STM32_PWM_TIM8_IRQ_PRIORITY 7
+#define STM32_PWM_TIM9_IRQ_PRIORITY 7
+
+/*
+ * SDC driver system settings.
+ */
+#define STM32_SDC_SDIO_DMA_PRIORITY 3
+#define STM32_SDC_SDIO_IRQ_PRIORITY 9
+#define STM32_SDC_WRITE_TIMEOUT_MS 1000
+#define STM32_SDC_READ_TIMEOUT_MS 1000
+#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10
+#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE
+#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_USART3 FALSE
+#define STM32_SERIAL_USE_UART4 FALSE
+#define STM32_SERIAL_USE_UART5 FALSE
+#define STM32_SERIAL_USE_USART6 FALSE
+#define STM32_SERIAL_USE_UART7 FALSE
+#define STM32_SERIAL_USE_UART8 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 12
+#define STM32_SERIAL_USART2_PRIORITY 12
+#define STM32_SERIAL_USART3_PRIORITY 12
+#define STM32_SERIAL_UART4_PRIORITY 12
+#define STM32_SERIAL_UART5_PRIORITY 12
+#define STM32_SERIAL_USART6_PRIORITY 12
+#define STM32_SERIAL_UART7_PRIORITY 12
+#define STM32_SERIAL_UART8_PRIORITY 12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
+#define STM32_SPI_USE_SPI4 FALSE
+#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
+#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
+#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
+#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
+#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI2_DMA_PRIORITY 1
+#define STM32_SPI_SPI3_DMA_PRIORITY 1
+#define STM32_SPI_SPI4_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 10
+#define STM32_SPI_SPI2_IRQ_PRIORITY 10
+#define STM32_SPI_SPI3_IRQ_PRIORITY 10
+#define STM32_SPI_SPI4_IRQ_PRIORITY 10
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 8
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USE_USART3 FALSE
+#define STM32_UART_USE_UART4 FALSE
+#define STM32_UART_USE_UART5 FALSE
+#define STM32_UART_USE_USART6 FALSE
+#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
+#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
+#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_UART_USART1_IRQ_PRIORITY 12
+#define STM32_UART_USART2_IRQ_PRIORITY 12
+#define STM32_UART_USART3_IRQ_PRIORITY 12
+#define STM32_UART_UART4_IRQ_PRIORITY 12
+#define STM32_UART_UART5_IRQ_PRIORITY 12
+#define STM32_UART_USART6_IRQ_PRIORITY 12
+#define STM32_UART_USART1_DMA_PRIORITY 0
+#define STM32_UART_USART2_DMA_PRIORITY 0
+#define STM32_UART_USART3_DMA_PRIORITY 0
+#define STM32_UART_UART4_DMA_PRIORITY 0
+#define STM32_UART_UART5_DMA_PRIORITY 0
+#define STM32_UART_USART6_DMA_PRIORITY 0
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_OTG1 TRUE
+#define STM32_USB_USE_OTG2 FALSE
+#define STM32_USB_OTG1_IRQ_PRIORITY 14
+#define STM32_USB_OTG2_IRQ_PRIORITY 14
+#define STM32_USB_OTG1_RX_FIFO_SIZE 512
+#define STM32_USB_OTG2_RX_FIFO_SIZE 1024
+#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
+#define STM32_USB_OTG_THREAD_STACK_SIZE 128
+#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
+
+/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+#endif /* MCUCONF_H */
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 437d354fbe..edf44f5dcc 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -329,6 +329,40 @@ ifneq ($(findstring STM32F411, $(MCU)),)
UF2_FAMILY ?= STM32F4
endif
+ifneq ($(findstring STM32F446, $(MCU)),)
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = STM32
+ MCU_SERIES = STM32F4xx
+
+ # Linker script to use
+ # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or /os/common/startup/ARMCMx/compilers/GCC/ld/
+ # or /ld/
+ MCU_LDSCRIPT ?= STM32F446xE
+
+ # Startup code to use
+ # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= stm32f4xx
+
+ # Board: it should exist either in /os/hal/boards/,
+ # /boards/, or drivers/boards/
+ BOARD ?= GENERIC_STM32_F446XE
+
+ USE_FPU ?= yes
+
+ # Options to pass to dfu-util when flashing
+ DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
+ DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+endif
+
ifneq ($(findstring STM32G431, $(MCU)),)
# Cortex version
MCU = cortex-m4
--
cgit v1.2.3
From 9cf82fae9566c68ea2ffcb120375868f27f94ecf Mon Sep 17 00:00:00 2001
From: Xelus22
Date: Mon, 26 Apr 2021 03:07:15 +0000
Subject: Add STM32L433 and L443 support (#12063)
* initial L433 commit
* change to XC
* fix L433
* disable all peripherals
* update system and peripheral clocks
* 433 change
* use its own board files
* revert its own board files
* l433 specific change
* fix stm32l432xx define
* remove duplicate #define
* fix bootloader jump
* move to L443xx and add i2c2, spi2, usart3 to mcuconf.h
* move to L443
* move to L443
* fix sdmmc in mcuconf.h
* include STM32L443
* add L443
* Include L443 in compatible microcontrollers
Co-authored-by: Nick Brassel
* Include L443 in compatible microcontrollers
Co-authored-by: Nick Brassel
* Update config bootloader jump description
Co-authored-by: Nick Brassel
* Update ChibiOS define reasoning
Co-authored-by: Nick Brassel
* Update quantum/mcu_selection.mk
Co-authored-by: Nick Brassel
* fix git conflict
Co-authored-by: Nick Brassel ---
data/schemas/keyboard.jsonschema | 2 +-
docs/compatible_microcontrollers.md | 2 +
docs/ja/compatible_microcontrollers.md | 2 +
lib/python/qmk/constants.py | 2 +-
.../chibios/GENERIC_STM32_L433XC/board/board.mk | 9 +
.../chibios/GENERIC_STM32_L433XC/configs/board.h | 24 ++
.../chibios/GENERIC_STM32_L433XC/configs/config.h | 26 ++
.../chibios/GENERIC_STM32_L433XC/configs/mcuconf.h | 292 +++++++++++++++++++++
quantum/mcu_selection.mk | 38 +++
9 files changed, 395 insertions(+), 2 deletions(-)
create mode 100644 platforms/chibios/GENERIC_STM32_L433XC/board/board.mk
create mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
create mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/config.h
create mode 100644 platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h
(limited to 'quantum')
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 99121d79ec..c335f49d52 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -25,7 +25,7 @@
},
"processor": {
"type": "string",
- "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
+ "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"board": {
"type": "string",
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 5e16ab2770..0f5b140de0 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -31,6 +31,8 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+ * [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
+ * [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
### NXP (Kinetis)
diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md
index 69da70f2c3..b675b038d2 100644
--- a/docs/ja/compatible_microcontrollers.md
+++ b/docs/ja/compatible_microcontrollers.md
@@ -36,6 +36,8 @@ QMK ã¯å分ãªå®¹é‡ã®ãƒ•ラッシュメモリを備ãˆãŸ USB 対応 AVR ã¾
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
+* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
### NXP (Kinetis)
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index 33adb0a13e..49e5e0eb42 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -10,7 +10,7 @@ QMK_FIRMWARE = Path.cwd()
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
-CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474'
+CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L433', 'STM32L443'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/board/board.mk b/platforms/chibios/GENERIC_STM32_L433XC/board/board.mk
new file mode 100644
index 0000000000..1250385eb8
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L433XC/board/board.mk
@@ -0,0 +1,9 @@
+# List of all the board related files.
+BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC/board.c
+
+# Required include directories
+BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
new file mode 100644
index 0000000000..51f9724f94
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
@@ -0,0 +1,24 @@
+/* Copyright 2018-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 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 .
+ */
+#pragma once
+
+#include_next "board.h"
+
+#undef STM32L432xx
+
+// Pretend that we're an L443xx as the ChibiOS definitions for L432/L433 mistakenly don't enable GPIOH, I2C2, or SPI2.
+// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443.
+#define STM32L443xx
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/config.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/config.h
new file mode 100644
index 0000000000..c27c61b19a
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L433XC/configs/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2018-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 .
+ */
+
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606.
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
+
+#define PAL_STM32_OSPEED_HIGHEST PAL_STM32_OSPEED_HIGH
+
+#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
+# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
+#endif
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h
new file mode 100644
index 0000000000..948c740f6e
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h
@@ -0,0 +1,292 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 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.
+*/
+
+/*
+ * STM32L4xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+#define STM32L4xx_MCUCONF
+#define STM32L443_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_VOS STM32_VOS_RANGE1
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI16_ENABLED TRUE
+#define STM32_HSI48_ENABLED TRUE
+#define STM32_LSI_ENABLED TRUE
+#define STM32_HSE_ENABLED FALSE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_MSIPLL_ENABLED FALSE
+#define STM32_MSIRANGE STM32_MSIRANGE_4M
+#define STM32_MSISRANGE STM32_MSISRANGE_4M
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSI16
+#define STM32_PLLM_VALUE 1
+#define STM32_PLLN_VALUE 10
+#define STM32_PLLPDIV_VALUE 0
+#define STM32_PLLP_VALUE 7
+#define STM32_PLLQ_VALUE 2
+#define STM32_PLLR_VALUE 2
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE1 STM32_PPRE1_DIV1
+#define STM32_PPRE2 STM32_PPRE2_DIV1
+#define STM32_STOPWUCK STM32_STOPWUCK_MSI
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_MCOPRE STM32_MCOPRE_DIV1
+#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK
+#define STM32_PLLSAI1N_VALUE 24
+#define STM32_PLLSAI1PDIV_VALUE 0
+#define STM32_PLLSAI1P_VALUE 7
+#define STM32_PLLSAI1Q_VALUE 2
+#define STM32_PLLSAI1R_VALUE 2
+
+/*
+ * Peripherals clock sources.
+ */
+#define STM32_USART1SEL STM32_USART1SEL_SYSCLK
+#define STM32_USART2SEL STM32_USART2SEL_SYSCLK
+#define STM32_USART3SEL STM32_USART3SEL_SYSCLK
+#define STM32_LPUART1SEL STM32_LPUART1SEL_SYSCLK
+#define STM32_I2C1SEL STM32_I2C1SEL_SYSCLK
+#define STM32_I2C2SEL STM32_I2C2SEL_SYSCLK
+#define STM32_I2C3SEL STM32_I2C3SEL_SYSCLK
+#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
+#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK1
+#define STM32_SAI1SEL STM32_SAI1SEL_OFF
+#define STM32_CLK48SEL STM32_CLK48SEL_HSI48
+#define STM32_ADCSEL STM32_ADCSEL_SYSCLK
+#define STM32_SWPMI1SEL STM32_SWPMI1SEL_PCLK1
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI1635_38_PRIORITY 6
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_22_PRIORITY 15
+
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
+#define STM32_IRQ_TIM2_PRIORITY 7
+#define STM32_IRQ_TIM6_PRIORITY 7
+#define STM32_IRQ_TIM7_PRIORITY 7
+
+#define STM32_IRQ_USART1_PRIORITY 12
+#define STM32_IRQ_USART2_PRIORITY 12
+#define STM32_IRQ_USART3_PRIORITY 12
+#define STM32_IRQ_LPUART1_PRIORITY 12
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_COMPACT_SAMPLES FALSE
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_ADC12_IRQ_PRIORITY 5
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
+#define STM32_ADC_ADC123_PRESC ADC_CCR_PRESC_DIV2
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 FALSE
+#define STM32_DAC_USE_DAC1_CH2 FALSE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM6 FALSE
+#define STM32_GPT_USE_TIM7 FALSE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 FALSE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_USE_I2C3 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_I2C_I2C1_IRQ_PRIORITY 5
+#define STM32_I2C_I2C2_IRQ_PRIORITY 5
+#define STM32_I2C_I2C3_IRQ_PRIORITY 5
+#define STM32_I2C_I2C1_DMA_PRIORITY 3
+#define STM32_I2C_I2C2_DMA_PRIORITY 3
+#define STM32_I2C_I2C3_DMA_PRIORITY 3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
+#define STM32_ICU_USE_TIM16 FALSE
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+
+/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
+ * SDMMC drive system settings.
+ */
+#define STM32_SDC_USE_SDMMC1 FALSE
+#define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
+#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000
+#define STM32_SDC_SDMMC_READ_TIMEOUT 1000
+#define STM32_SDC_SDMMC_CLOCK_DELAY 10
+#define STM32_SDC_SDMMC1_DMA_PRIORITY 3
+#define STM32_SDC_SDMMC1_IRQ_PRIORITY 9
+#define STM32_SDC_SDMMC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_USART3 FALSE
+#define STM32_SERIAL_USE_LPUART1 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 12
+#define STM32_SERIAL_USART2_PRIORITY 12
+#define STM32_SERIAL_USART3_PRIORITY 12
+#define STM32_SERIAL_LPUART1_PRIORITY 12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
+#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
+#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI2_DMA_PRIORITY 1
+#define STM32_SPI_SPI3_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 10
+#define STM32_SPI_SPI2_IRQ_PRIORITY 10
+#define STM32_SPI_SPI3_IRQ_PRIORITY 10
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 8
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * TRNG driver system settings.
+ */
+#define STM32_TRNG_USE_RNG1 FALSE
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USE_USART3 FALSE
+#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
+#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+/*
+ * WSPI driver system settings.
+ */
+#define STM32_WSPI_USE_QUADSPI1 FALSE
+#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+
+#endif /* MCUCONF_H */
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index edf44f5dcc..9268c4522e 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -435,6 +435,44 @@ ifneq ($(findstring STM32G474, $(MCU)),)
UF2_FAMILY ?= STM32G4
endif
+ifneq (,$(filter $(MCU),STM32L433 STM32L443))
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = STM32
+ MCU_SERIES = STM32L4xx
+
+ # Linker script to use
+ # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or /ld/
+ MCU_LDSCRIPT ?= STM32L432xC
+
+ # Startup code to use
+ # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= stm32l4xx
+
+ # Board: it should exist either in /os/hal/boards/,
+ # /boards/, or drivers/boards/
+ BOARD ?= GENERIC_STM32_L433XC
+
+ PLATFORM_NAME ?= platform_l432
+
+ USE_FPU ?= yes
+
+ # Options to pass to dfu-util when flashing
+ DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
+ DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32L4
+endif
+
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
PROTOCOL = LUFA
--
cgit v1.2.3
From 0a8e37509b83f317cf8b58b6459fcb25bcbc1e73 Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Wed, 28 Apr 2021 20:42:53 +1000
Subject: Fix bad PR merge for #6580. (#12721)
---
quantum/process_keycode/process_leader.h | 2 --
1 file changed, 2 deletions(-)
(limited to 'quantum')
diff --git a/quantum/process_keycode/process_leader.h b/quantum/process_keycode/process_leader.h
index 32ccd42f75..f3fe14a432 100644
--- a/quantum/process_keycode/process_leader.h
+++ b/quantum/process_keycode/process_leader.h
@@ -41,5 +41,3 @@ void qk_leader_start(void);
#else
# define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)
#endif
-
-#endif
--
cgit v1.2.3
From d8167779cdfb243cb140782210d2cc6a7cb9b123 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Wed, 28 Apr 2021 19:39:54 -0700
Subject: Change RGB/LED Matrix to use a simple define for USB suspend (#12697)
---
docs/feature_rgb_matrix.md | 2 +-
keyboards/mt64rgb/keymaps/default/keymap.c | 32 +++++++++++++++---------------
keyboards/mt84/keymaps/default/keymap.c | 30 +++++++++++++---------------
quantum/led_matrix.c | 18 ++++++++---------
quantum/led_matrix.h | 1 -
quantum/rgb_matrix.c | 18 ++++++++---------
quantum/rgb_matrix.h | 1 -
tmk_core/common/avr/suspend.c | 7 +++++++
tmk_core/common/chibios/suspend.c | 6 ++++++
9 files changed, 62 insertions(+), 53 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 046b1f17fa..63ff7d6ad6 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -437,7 +437,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off
#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/mt64rgb/keymaps/default/keymap.c b/keyboards/mt64rgb/keymaps/default/keymap.c
index c7e027ba73..84f3b1d35e 100644
--- a/keyboards/mt64rgb/keymaps/default/keymap.c
+++ b/keyboards/mt64rgb/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
-/* Copyright 2020 MT
- *
- * 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 .
- */
+/* Copyright 2020 MT
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void rgb_matrix_indicators_user(void) {
- if (!g_suspend_state && layer_state_is(1)) {
+ if (layer_state_is(1)) {
rgb_matrix_set_color(77,0xFF, 0x80, 0x00);
}
if (host_keyboard_led_state().caps_lock) {
diff --git a/keyboards/mt84/keymaps/default/keymap.c b/keyboards/mt84/keymaps/default/keymap.c
index fc8481da9d..bb7d5b447f 100644
--- a/keyboards/mt84/keymaps/default/keymap.c
+++ b/keyboards/mt84/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2020 mt<704340378@qq.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 .
- */
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -44,12 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void rgb_matrix_indicators_user(void) {
led_t led_state = host_keyboard_led_state();
- if (!g_suspend_state) {
switch (get_highest_layer(layer_state)) {
case _FN:
rgb_matrix_set_color(77,0xFF, 0x80, 0x00);
break;
- }
}
if (led_state.caps_lock) {
rgb_matrix_set_color(46, 0xFF, 0xFF, 0xFF);
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 72eb5190b3..5dd37dff14 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -35,8 +35,8 @@
# define LED_DISABLE_TIMEOUT 0
#endif
-#ifndef LED_DISABLE_WHEN_USB_SUSPENDED
-# define LED_DISABLE_WHEN_USB_SUSPENDED false
+#if LED_DISABLE_WHEN_USB_SUSPENDED == false
+# undef LED_DISABLE_WHEN_USB_SUSPENDED
#endif
#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
@@ -65,7 +65,6 @@
#endif
// globals
-bool g_suspend_state = false;
led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
uint32_t g_led_timer;
#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
@@ -76,6 +75,7 @@ last_hit_t g_last_hit_tracker;
#endif // LED_MATRIX_KEYREACTIVE_ENABLED
// internals
+static bool suspend_state = false;
static uint8_t led_last_enable = UINT8_MAX;
static uint8_t led_last_effect = UINT8_MAX;
static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
@@ -325,9 +325,7 @@ void led_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
bool suspend_backlight =
-#if LED_DISABLE_WHEN_USB_SUSPENDED == true
- g_suspend_state ||
-#endif // LED_DISABLE_WHEN_USB_SUSPENDED == true
+ suspend_state ||
#if LED_DISABLE_TIMEOUT > 0
(led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
#endif // LED_DISABLE_TIMEOUT > 0
@@ -416,13 +414,15 @@ void led_matrix_init(void) {
}
void led_matrix_set_suspend_state(bool state) {
- if (LED_DISABLE_WHEN_USB_SUSPENDED && state) {
+#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
+ if (state) {
led_matrix_set_value_all(0); // turn off all LEDs when suspending
}
- g_suspend_state = state;
+ suspend_state = state;
+#endif
}
-bool led_matrix_get_suspend_state(void) { return g_suspend_state; }
+bool led_matrix_get_suspend_state(void) { return suspend_state; }
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index f35bbe2096..a3fa552b0a 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -134,7 +134,6 @@ extern const led_matrix_driver_t led_matrix_driver;
extern led_eeconfig_t led_matrix_eeconfig;
-extern bool g_suspend_state;
extern uint32_t g_led_timer;
extern led_config_t g_led_config;
#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 8aae486034..1f76049430 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -67,8 +67,8 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv
# define RGB_DISABLE_TIMEOUT 0
#endif
-#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED false
+#if RGB_DISABLE_WHEN_USB_SUSPENDED == false
+# undef RGB_DISABLE_WHEN_USB_SUSPENDED
#endif
#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
@@ -118,7 +118,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv
#endif
// globals
-bool g_suspend_state = false;
rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
uint32_t g_rgb_timer;
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
@@ -129,6 +128,7 @@ last_hit_t g_last_hit_tracker;
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
// internals
+static bool suspend_state = false;
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
@@ -410,9 +410,7 @@ void rgb_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
bool suspend_backlight =
-#if RGB_DISABLE_WHEN_USB_SUSPENDED == true
- g_suspend_state ||
-#endif // RGB_DISABLE_WHEN_USB_SUSPENDED == true
+ suspend_state ||
#if RGB_DISABLE_TIMEOUT > 0
(rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
#endif // RGB_DISABLE_TIMEOUT > 0
@@ -501,13 +499,15 @@ void rgb_matrix_init(void) {
}
void rgb_matrix_set_suspend_state(bool state) {
- if (RGB_DISABLE_WHEN_USB_SUSPENDED && state) {
+#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
+ if (state) {
rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending
}
- g_suspend_state = state;
+ suspend_state = state;
+#endif
}
-bool rgb_matrix_get_suspend_state(void) { return g_suspend_state; }
+bool rgb_matrix_get_suspend_state(void) { return suspend_state; }
void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
rgb_matrix_config.enable ^= 1;
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index bb8bcfab68..a615b8422c 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -216,7 +216,6 @@ extern const rgb_matrix_driver_t rgb_matrix_driver;
extern rgb_config_t rgb_matrix_config;
-extern bool g_suspend_state;
extern uint32_t g_rgb_timer;
extern led_config_t g_led_config;
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 96b19a77fd..1c2bf9cb46 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -163,6 +163,10 @@ void suspend_power_down(void) {
rgblight_suspend();
# endif
+# if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_set_suspend_state(true);
+# endif
+
// Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt)
# if defined(WDT_vect)
power_down(WDTO_15MS);
@@ -214,6 +218,9 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
+# if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_set_suspend_state(false);
+# endif
suspend_wakeup_init_kb();
}
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index b3949185e9..1f4f93c455 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -83,6 +83,9 @@ void suspend_power_down(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
#endif
+# if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_set_suspend_state(true);
+# endif
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif /* AUDIO_ENABLE */
@@ -151,5 +154,8 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
+# if defined(RGB_MATRIX_ENABLE)
+ rgb_matrix_set_suspend_state(false);
+# endif
suspend_wakeup_init_kb();
}
--
cgit v1.2.3
From 39bc8163d013b5c7e148b7e95b3883dc0adb95ba Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Thu, 29 Apr 2021 13:36:47 +1000
Subject: [CI] Format code according to conventions (#12731)
Co-authored-by: QMK Bot ---
quantum/led_matrix.c | 9 ++++-----
quantum/rgb_matrix.c | 9 ++++-----
tmk_core/common/avr/suspend.c | 4 ++--
tmk_core/common/chibios/suspend.c | 8 ++++----
4 files changed, 14 insertions(+), 16 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 5dd37dff14..3674c9b97e 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -75,7 +75,7 @@ last_hit_t g_last_hit_tracker;
#endif // LED_MATRIX_KEYREACTIVE_ENABLED
// internals
-static bool suspend_state = false;
+static bool suspend_state = false;
static uint8_t led_last_enable = UINT8_MAX;
static uint8_t led_last_effect = UINT8_MAX;
static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
@@ -324,12 +324,11 @@ void led_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight =
- suspend_state ||
+ bool suspend_backlight = suspend_state ||
#if LED_DISABLE_TIMEOUT > 0
- (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
+ (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
#endif // LED_DISABLE_TIMEOUT > 0
- false;
+ false;
uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 1f76049430..097c5302df 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -128,7 +128,7 @@ last_hit_t g_last_hit_tracker;
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
// internals
-static bool suspend_state = false;
+static bool suspend_state = false;
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
@@ -409,12 +409,11 @@ void rgb_matrix_task(void) {
// Ideally we would also stop sending zeros to the LED driver PWM buffers
// while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight =
- suspend_state ||
+ bool suspend_backlight = suspend_state ||
#if RGB_DISABLE_TIMEOUT > 0
- (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
+ (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
#endif // RGB_DISABLE_TIMEOUT > 0
- false;
+ false;
uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode;
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c
index 1c2bf9cb46..e9ee0aefdd 100644
--- a/tmk_core/common/avr/suspend.c
+++ b/tmk_core/common/avr/suspend.c
@@ -218,9 +218,9 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
-# if defined(RGB_MATRIX_ENABLE)
+#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
-# endif
+#endif
suspend_wakeup_init_kb();
}
diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c
index 1f4f93c455..14a9aecb31 100644
--- a/tmk_core/common/chibios/suspend.c
+++ b/tmk_core/common/chibios/suspend.c
@@ -83,9 +83,9 @@ void suspend_power_down(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_suspend();
#endif
-# if defined(RGB_MATRIX_ENABLE)
+#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(true);
-# endif
+#endif
#ifdef AUDIO_ENABLE
stop_all_notes();
#endif /* AUDIO_ENABLE */
@@ -154,8 +154,8 @@ void suspend_wakeup_init(void) {
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
rgblight_wakeup();
#endif
-# if defined(RGB_MATRIX_ENABLE)
+#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_suspend_state(false);
-# endif
+#endif
suspend_wakeup_init_kb();
}
--
cgit v1.2.3
From 3c2e69af79e09d27cf799370685ee8a89ff45a5d Mon Sep 17 00:00:00 2001
From: XScorpion2
Date: Sat, 1 May 2021 14:14:17 -0500
Subject: Fixing transport's led/rgb matrix suspend state logic (#12770)
---
quantum/split_common/transport.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
(limited to 'quantum')
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index b67702f150..b29e58d589 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -162,11 +162,13 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
+ bool suspend_state = led_matrix_get_suspend_state();
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
+ bool suspend_state = rgb_matrix_get_suspend_state();
+ i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
# endif
# ifndef DISABLE_SYNC_TIMER
@@ -217,11 +219,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- memcpy((void *)i2c_buffer->led_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->led_suspend_state));
+ led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- memcpy((void *)i2c_buffer->rgb_suspend_state, (void *)g_suspend_state, sizeof(i2c_buffer->rgb_suspend_state));
+ rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
# endif
}
@@ -391,11 +393,11 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
serial_m2s_buffer.led_matrix = led_matrix_econfig;
- serial_m2s_buffer.led_suspend_state = g_suspend_state;
+ serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
- serial_m2s_buffer.rgb_suspend_state = g_suspend_state;
+ serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
# endif
# ifndef DISABLE_SYNC_TIMER
@@ -439,11 +441,11 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- g_suspend_state = serial_m2s_buffer.led_suspend_state;
+ led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- g_suspend_state = serial_m2s_buffer.rgb_suspend_state;
+ rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
# endif
}
--
cgit v1.2.3
From f5b6bef4b3db6fcc6b9190411607c4dc198b7152 Mon Sep 17 00:00:00 2001
From: github-actions[bot]
Date: Sun, 2 May 2021 05:15:50 +1000
Subject: [CI] Format code according to conventions (#12772)
Co-authored-by: QMK Bot ---
quantum/split_common/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'quantum')
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index b29e58d589..9b3f70ed06 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -444,7 +444,7 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
+ rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
# endif
}
--
cgit v1.2.3
From 3edc43964d35986a4cc5eb4602e1d79b8be1bf01 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Tue, 11 May 2021 13:41:06 +1000
Subject: LED Matrix: Effects! (#12651)
---
quantum/led_matrix.c | 71 +++++++++++++++++-----
quantum/led_matrix.h | 20 +++++-
quantum/led_matrix_animations/alpha_mods_anim.h | 24 ++++++++
quantum/led_matrix_animations/band_anim.h | 15 +++++
quantum/led_matrix_animations/band_pinwheel_anim.h | 14 +++++
quantum/led_matrix_animations/band_spiral_anim.h | 14 +++++
quantum/led_matrix_animations/breathing_anim.h | 19 ++++++
.../led_matrix_animations/cycle_left_right_anim.h | 14 +++++
quantum/led_matrix_animations/cycle_out_in_anim.h | 14 +++++
quantum/led_matrix_animations/cycle_up_down_anim.h | 14 +++++
quantum/led_matrix_animations/dual_beacon_anim.h | 14 +++++
.../led_matrix_animations/led_matrix_effects.inc | 18 ++++++
quantum/led_matrix_animations/solid_anim.h | 15 +++++
.../led_matrix_animations/solid_reactive_cross.h | 39 ++++++++++++
.../led_matrix_animations/solid_reactive_nexus.h | 36 +++++++++++
.../solid_reactive_simple_anim.h | 16 +++++
.../led_matrix_animations/solid_reactive_wide.h | 34 +++++++++++
quantum/led_matrix_animations/solid_splash_anim.h | 34 +++++++++++
.../led_matrix_animations/wave_left_right_anim.h | 14 +++++
quantum/led_matrix_animations/wave_up_down_anim.h | 14 +++++
quantum/led_matrix_runners/effect_runner_dx_dy.h | 16 +++++
.../led_matrix_runners/effect_runner_dx_dy_dist.h | 17 ++++++
quantum/led_matrix_runners/effect_runner_i.h | 14 +++++
.../led_matrix_runners/effect_runner_reactive.h | 28 +++++++++
.../effect_runner_reactive_splash.h | 26 ++++++++
.../led_matrix_runners/effect_runner_sin_cos_i.h | 16 +++++
26 files changed, 554 insertions(+), 16 deletions(-)
create mode 100644 quantum/led_matrix_animations/alpha_mods_anim.h
create mode 100644 quantum/led_matrix_animations/band_anim.h
create mode 100644 quantum/led_matrix_animations/band_pinwheel_anim.h
create mode 100644 quantum/led_matrix_animations/band_spiral_anim.h
create mode 100644 quantum/led_matrix_animations/breathing_anim.h
create mode 100644 quantum/led_matrix_animations/cycle_left_right_anim.h
create mode 100644 quantum/led_matrix_animations/cycle_out_in_anim.h
create mode 100644 quantum/led_matrix_animations/cycle_up_down_anim.h
create mode 100644 quantum/led_matrix_animations/dual_beacon_anim.h
create mode 100644 quantum/led_matrix_animations/led_matrix_effects.inc
create mode 100644 quantum/led_matrix_animations/solid_anim.h
create mode 100644 quantum/led_matrix_animations/solid_reactive_cross.h
create mode 100644 quantum/led_matrix_animations/solid_reactive_nexus.h
create mode 100644 quantum/led_matrix_animations/solid_reactive_simple_anim.h
create mode 100644 quantum/led_matrix_animations/solid_reactive_wide.h
create mode 100644 quantum/led_matrix_animations/solid_splash_anim.h
create mode 100644 quantum/led_matrix_animations/wave_left_right_anim.h
create mode 100644 quantum/led_matrix_animations/wave_up_down_anim.h
create mode 100644 quantum/led_matrix_runners/effect_runner_dx_dy.h
create mode 100644 quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
create mode 100644 quantum/led_matrix_runners/effect_runner_i.h
create mode 100644 quantum/led_matrix_runners/effect_runner_reactive.h
create mode 100644 quantum/led_matrix_runners/effect_runner_reactive_splash.h
create mode 100644 quantum/led_matrix_runners/effect_runner_sin_cos_i.h
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 3674c9b97e..58cda64130 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -27,6 +27,38 @@
#include
+#ifndef LED_MATRIX_CENTER
+const point_t k_led_matrix_center = {112, 32};
+#else
+const point_t k_led_matrix_center = LED_MATRIX_CENTER;
+#endif
+
+// Generic effect runners
+#include "led_matrix_runners/effect_runner_dx_dy_dist.h"
+#include "led_matrix_runners/effect_runner_dx_dy.h"
+#include "led_matrix_runners/effect_runner_i.h"
+#include "led_matrix_runners/effect_runner_sin_cos_i.h"
+#include "led_matrix_runners/effect_runner_reactive.h"
+#include "led_matrix_runners/effect_runner_reactive_splash.h"
+
+// ------------------------------------------
+// -----Begin led effect includes macros-----
+#define LED_MATRIX_EFFECT(name)
+#define LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+#include "led_matrix_animations/led_matrix_effects.inc"
+#ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+#endif
+#ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+#endif
+
+#undef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#undef LED_MATRIX_EFFECT
+// -----End led effect includes macros-------
+// ------------------------------------------
+
#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT)
# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL)
#endif
@@ -53,7 +85,7 @@
#endif
#if !defined(LED_MATRIX_STARTUP_MODE)
-# define LED_MATRIX_STARTUP_MODE LED_MATRIX_UNIFORM_BRIGHTNESS
+# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID
#endif
#if !defined(LED_MATRIX_STARTUP_VAL)
@@ -216,17 +248,6 @@ static bool led_matrix_none(effect_params_t *params) {
return false;
}
-static bool led_matrix_uniform_brightness(effect_params_t *params) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t val = led_matrix_eeconfig.val;
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- led_matrix_set_value(i, val);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
static void led_task_timers(void) {
#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer);
@@ -290,9 +311,31 @@ static void led_task_render(uint8_t effect) {
case LED_MATRIX_NONE:
rendering = led_matrix_none(&led_effect_params);
break;
- case LED_MATRIX_UNIFORM_BRIGHTNESS:
- rendering = led_matrix_uniform_brightness(&led_effect_params);
+
+// ---------------------------------------------
+// -----Begin led effect switch case macros-----
+#define LED_MATRIX_EFFECT(name, ...) \
+ case LED_MATRIX_##name: \
+ rendering = name(&led_effect_params); \
+ break;
+#include "led_matrix_animations/led_matrix_effects.inc"
+#undef LED_MATRIX_EFFECT
+
+#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
+# define LED_MATRIX_EFFECT(name, ...) \
+ case LED_MATRIX_CUSTOM_##name: \
+ rendering = name(&led_effect_params); \
break;
+# ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+# endif
+# ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+# endif
+# undef LED_MATRIX_EFFECT
+#endif
+ // -----End led effect switch case macros-------
+ // ---------------------------------------------
}
led_effect_params.iter++;
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
index a3fa552b0a..0984de73b3 100644
--- a/quantum/led_matrix.h
+++ b/quantum/led_matrix.h
@@ -53,8 +53,24 @@
enum led_matrix_effects {
LED_MATRIX_NONE = 0,
- LED_MATRIX_UNIFORM_BRIGHTNESS,
- // All new effects go above this line
+// --------------------------------------
+// -----Begin led effect enum macros-----
+#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name,
+#include "led_matrix_animations/led_matrix_effects.inc"
+#undef LED_MATRIX_EFFECT
+
+#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
+# define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_CUSTOM_##name,
+# ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+# endif
+# ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+# endif
+# undef LED_MATRIX_EFFECT
+#endif
+ // --------------------------------------
+ // -----End led effect enum macros-------
LED_MATRIX_EFFECT_MAX
};
diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix_animations/alpha_mods_anim.h
new file mode 100644
index 0000000000..a4638fde69
--- /dev/null
+++ b/quantum/led_matrix_animations/alpha_mods_anim.h
@@ -0,0 +1,24 @@
+#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS
+LED_MATRIX_EFFECT(ALPHAS_MODS)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// alphas = val1, mods = val2
+bool ALPHAS_MODS(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val1 = led_matrix_eeconfig.val;
+ uint8_t val2 = val1 + led_matrix_eeconfig.speed;
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
+ led_matrix_set_value(i, val2);
+ } else {
+ led_matrix_set_value(i, val1);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix_animations/band_anim.h
new file mode 100644
index 0000000000..4a2b746a76
--- /dev/null
+++ b/quantum/led_matrix_animations/band_anim.h
@@ -0,0 +1,15 @@
+#ifndef DISABLE_LED_MATRIX_BAND
+LED_MATRIX_EFFECT(BAND)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) {
+ int16_t v = val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
+ return scale8(v < 0 ? 0 : v, val);
+}
+
+bool BAND(effect_params_t* params) {
+ return effect_runner_i(params, &BAND_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND
diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix_animations/band_pinwheel_anim.h
new file mode 100644
index 0000000000..9836320d2a
--- /dev/null
+++ b/quantum/led_matrix_animations/band_pinwheel_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL
+LED_MATRIX_EFFECT(BAND_PINWHEEL)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) {
+ return scale8(val - time - atan2_8(dy, dx) * 3, val);
+}
+
+bool BAND_PINWHEEL(effect_params_t* params) {
+ return effect_runner_dx_dy(params, &BAND_PINWHEEL_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix_animations/band_spiral_anim.h
new file mode 100644
index 0000000000..be17c03aad
--- /dev/null
+++ b/quantum/led_matrix_animations/band_spiral_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL
+LED_MATRIX_EFFECT(BAND_SPIRAL)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ return scale8(val + dist - time - atan2_8(dy, dx), val);
+}
+
+bool BAND_SPIRAL(effect_params_t* params) {
+ return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix_animations/breathing_anim.h
new file mode 100644
index 0000000000..4f49f50690
--- /dev/null
+++ b/quantum/led_matrix_animations/breathing_anim.h
@@ -0,0 +1,19 @@
+#ifndef DISABLE_LED_MATRIX_BREATHING
+LED_MATRIX_EFFECT(BREATHING)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool BREATHING(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val = led_matrix_eeconfig.val;
+ uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 8);
+ val = scale8(abs8(sin8(time) - 128) * 2, val);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, val);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BREATHING
diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix_animations/cycle_left_right_anim.h
new file mode 100644
index 0000000000..404fda26f5
--- /dev/null
+++ b/quantum/led_matrix_animations/cycle_left_right_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
+LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) {
+ return scale8(g_led_config.point[i].x - time, val);
+}
+
+bool CYCLE_LEFT_RIGHT(effect_params_t* params) {
+ return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h
new file mode 100644
index 0000000000..3f5fc5b187
--- /dev/null
+++ b/quantum/led_matrix_animations/cycle_out_in_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN
+LED_MATRIX_EFFECT(CYCLE_OUT_IN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ return scale8(3 * dist / 2 + time, val);
+}
+
+bool CYCLE_OUT_IN(effect_params_t* params) {
+ return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix_animations/cycle_up_down_anim.h
new file mode 100644
index 0000000000..25fc211b17
--- /dev/null
+++ b/quantum/led_matrix_animations/cycle_up_down_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN
+LED_MATRIX_EFFECT(CYCLE_UP_DOWN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) {
+ return scale8(g_led_config.point[i].y - time, val);
+}
+
+bool CYCLE_UP_DOWN(effect_params_t* params) {
+ return effect_runner_i(params, &CYCLE_UP_DOWN_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix_animations/dual_beacon_anim.h
new file mode 100644
index 0000000000..1fa1df1395
--- /dev/null
+++ b/quantum/led_matrix_animations/dual_beacon_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_DUAL_BEACON
+LED_MATRIX_EFFECT(DUAL_BEACON)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
+ return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val);
+}
+
+bool DUAL_BEACON(effect_params_t* params) {
+ return effect_runner_sin_cos_i(params, &DUAL_BEACON_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_DUAL_BEACON
diff --git a/quantum/led_matrix_animations/led_matrix_effects.inc b/quantum/led_matrix_animations/led_matrix_effects.inc
new file mode 100644
index 0000000000..67237c5683
--- /dev/null
+++ b/quantum/led_matrix_animations/led_matrix_effects.inc
@@ -0,0 +1,18 @@
+// Add your new core led matrix effect here, order determins enum order, requires "led_matrix_animations/ directory
+#include "led_matrix_animations/solid_anim.h"
+#include "led_matrix_animations/alpha_mods_anim.h"
+#include "led_matrix_animations/breathing_anim.h"
+#include "led_matrix_animations/band_anim.h"
+#include "led_matrix_animations/band_pinwheel_anim.h"
+#include "led_matrix_animations/band_spiral_anim.h"
+#include "led_matrix_animations/cycle_left_right_anim.h"
+#include "led_matrix_animations/cycle_up_down_anim.h"
+#include "led_matrix_animations/cycle_out_in_anim.h"
+#include "led_matrix_animations/dual_beacon_anim.h"
+#include "led_matrix_animations/solid_reactive_simple_anim.h"
+#include "led_matrix_animations/solid_reactive_wide.h"
+#include "led_matrix_animations/solid_reactive_cross.h"
+#include "led_matrix_animations/solid_reactive_nexus.h"
+#include "led_matrix_animations/solid_splash_anim.h"
+#include "led_matrix_animations/wave_left_right_anim.h"
+#include "led_matrix_animations/wave_up_down_anim.h"
diff --git a/quantum/led_matrix_animations/solid_anim.h b/quantum/led_matrix_animations/solid_anim.h
new file mode 100644
index 0000000000..4c9e43c581
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_anim.h
@@ -0,0 +1,15 @@
+LED_MATRIX_EFFECT(SOLID)
+#ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool SOLID(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val = led_matrix_eeconfig.val;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, val);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix_animations/solid_reactive_cross.h
new file mode 100644
index 0000000000..a50d1fc629
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_reactive_cross.h
@@ -0,0 +1,39 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist;
+ dx = dx < 0 ? dx * -1 : dx;
+ dy = dy < 0 ? dy * -1 : dy;
+ dx = dx * 16 > 255 ? 255 : dx * 16;
+ dy = dy * 16 > 255 ? 255 : dy * 16;
+ effect += dx > dy ? dy : dx;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
+bool SOLID_REACTIVE_CROSS(effect_params_t* params) {
+ return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math);
+}
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
+bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) {
+ return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math);
+}
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix_animations/solid_reactive_nexus.h
new file mode 100644
index 0000000000..4638aac5a4
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_reactive_nexus.h
@@ -0,0 +1,36 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ if (dist > 72) effect = 255;
+ if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
+bool SOLID_REACTIVE_NEXUS(effect_params_t* params) {
+ return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math);
+}
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
+bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) {
+ return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math);
+}
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix_animations/solid_reactive_simple_anim.h
new file mode 100644
index 0000000000..e1166a4fb6
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_reactive_simple_anim.h
@@ -0,0 +1,16 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) {
+ return scale8(255 - offset, val);
+}
+
+bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) {
+ return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix_animations/solid_reactive_wide.h
new file mode 100644
index 0000000000..4bcaba331e
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_reactive_wide.h
@@ -0,0 +1,34 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist * 5;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
+bool SOLID_REACTIVE_WIDE(effect_params_t* params) {
+ return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math);
+}
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
+bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) {
+ return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math);
+}
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix_animations/solid_splash_anim.h
new file mode 100644
index 0000000000..3e9046640e
--- /dev/null
+++ b/quantum/led_matrix_animations/solid_splash_anim.h
@@ -0,0 +1,34 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
+LED_MATRIX_EFFECT(SOLID_SPLASH)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
+LED_MATRIX_EFFECT(SOLID_MULTISPLASH)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
+bool SOLID_SPLASH(effect_params_t* params) {
+ return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math);
+}
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
+bool SOLID_MULTISPLASH(effect_params_t* params) {
+ return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math);
+}
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix_animations/wave_left_right_anim.h
new file mode 100644
index 0000000000..d547c72cee
--- /dev/null
+++ b/quantum/led_matrix_animations/wave_left_right_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
+LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) {
+ return scale8(sin8(g_led_config.point[i].x - time), val);
+}
+
+bool WAVE_LEFT_RIGHT(effect_params_t* params) {
+ return effect_runner_i(params, &WAVE_LEFT_RIGHT_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix_animations/wave_up_down_anim.h
new file mode 100644
index 0000000000..b68ff9bbc6
--- /dev/null
+++ b/quantum/led_matrix_animations/wave_up_down_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN
+LED_MATRIX_EFFECT(WAVE_UP_DOWN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) {
+ return scale8(sin8(g_led_config.point[i].y - time), val);
+}
+
+bool WAVE_UP_DOWN(effect_params_t* params) {
+ return effect_runner_i(params, &WAVE_UP_DOWN_math);
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy.h b/quantum/led_matrix_runners/effect_runner_dx_dy.h
new file mode 100644
index 0000000000..ef97631b90
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_dx_dy.h
@@ -0,0 +1,16 @@
+#pragma once
+
+typedef uint8_t (*dx_dy_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t time);
+
+bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
new file mode 100644
index 0000000000..5ef5938be0
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef uint8_t (*dx_dy_dist_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
+
+bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, dist, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix_runners/effect_runner_i.h b/quantum/led_matrix_runners/effect_runner_i.h
new file mode 100644
index 0000000000..b3015759be
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_i.h
@@ -0,0 +1,14 @@
+#pragma once
+
+typedef uint8_t (*i_f)(uint8_t val, uint8_t i, uint8_t time);
+
+bool effect_runner_i(effect_params_t* params, i_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, i, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix_runners/effect_runner_reactive.h b/quantum/led_matrix_runners/effect_runner_reactive.h
new file mode 100644
index 0000000000..4369ea8c49
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_reactive.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef uint8_t (*reactive_f)(uint8_t val, uint16_t offset);
+
+bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t max_tick = 65535 / led_matrix_eeconfig.speed;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ uint16_t tick = max_tick;
+ // Reverse search to find most recent key hit
+ for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
+ if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
+ tick = g_last_hit_tracker.tick[j];
+ break;
+ }
+ }
+
+ uint16_t offset = scale16by8(tick, led_matrix_eeconfig.speed);
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, offset));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_runners/effect_runner_reactive_splash.h b/quantum/led_matrix_runners/effect_runner_reactive_splash.h
new file mode 100644
index 0000000000..d6eb9731ee
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_reactive_splash.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef uint8_t (*reactive_splash_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
+
+bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t count = g_last_hit_tracker.count;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ uint8_t val = 0;
+ for (uint8_t j = start; j < count; j++) {
+ int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
+ int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], led_matrix_eeconfig.speed);
+ val = effect_func(val, dx, dy, dist, tick);
+ }
+ led_matrix_set_value(i, scale8(val, led_matrix_eeconfig.val));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h b/quantum/led_matrix_runners/effect_runner_sin_cos_i.h
new file mode 100644
index 0000000000..4a5219abd1
--- /dev/null
+++ b/quantum/led_matrix_runners/effect_runner_sin_cos_i.h
@@ -0,0 +1,16 @@
+#pragma once
+
+typedef uint8_t (*sin_cos_i_f)(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
+
+bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
+ int8_t cos_value = cos8(time) - 128;
+ int8_t sin_value = sin8(time) - 128;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, cos_value, sin_value, i, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
--
cgit v1.2.3
From 38d8d5445ebd60932d602184b1f27a112ac79f71 Mon Sep 17 00:00:00 2001
From: Zach White
Date: Tue, 11 May 2021 10:10:31 -0700
Subject: Remove KEYMAP and LAYOUT_kc (#12160)
* alias KEYMAP to LAYOUT
* remove KEYMAP and LAYOUT_kc---
keyboards/40percentclub/4x4/4x4.h | 13 -
.../40percentclub/mf68/keymaps/delivrance/keymap.c | 26 +-
.../40percentclub/mf68/keymaps/factory/keymap.c | 59 ---
.../40percentclub/mf68/keymaps/mf68_ble/keymap.c | 37 +-
keyboards/40percentclub/mf68/mf68.h | 17 -
keyboards/40percentclub/nori/nori.h | 13 -
keyboards/40percentclub/ut47/ut47.h | 15 -
keyboards/adkb96/adkb96.h | 21 -
keyboards/atreus62/atreus62.h | 21 +-
keyboards/atreus62/keymaps/atreus52/README.md | 10 -
keyboards/atreus62/keymaps/atreus52/config.h | 16 -
keyboards/atreus62/keymaps/atreus52/keymap.c | 88 -----
keyboards/atreus62/keymaps/atreus52/rules.mk | 4 -
keyboards/chimera_ergo/chimera_ergo.h | 15 -
keyboards/chimera_ls/chimera_ls.h | 13 -
keyboards/chimera_ortho/chimera_ortho.h | 14 -
keyboards/chimera_ortho/keymaps/dcompact/config.h | 9 -
keyboards/chimera_ortho/keymaps/dcompact/keymap.c | 119 ------
keyboards/chimera_ortho/keymaps/dcompact/readme.md | 45 ---
keyboards/chimera_ortho/keymaps/dcompact/rules.mk | 1 -
keyboards/chimera_ortho/keymaps/gordon/keymap.c | 363 ------------------
keyboards/claw44/rev1/rev1.h | 13 -
keyboards/comet46/comet46.h | 14 -
keyboards/comet46/keymaps/satt/keymap.c | 74 ++--
keyboards/contra/contra.h | 13 -
keyboards/crkbd/keymaps/like_jis/config.h | 45 ---
keyboards/crkbd/keymaps/like_jis/keymap.c | 291 --------------
keyboards/crkbd/keymaps/like_jis/oled_helper.c | 83 ----
keyboards/crkbd/keymaps/like_jis/oled_helper.h | 35 --
keyboards/crkbd/keymaps/like_jis/rules.mk | 32 --
keyboards/crkbd/keymaps/omgvee/config.h | 51 ---
keyboards/crkbd/keymaps/omgvee/keymap.c | 242 ------------
keyboards/crkbd/keymaps/omgvee/readme.md | 18 -
keyboards/crkbd/keymaps/omgvee/rules.mk | 32 --
keyboards/crkbd/keymaps/rs/keymap.c | 30 +-
keyboards/crkbd/keymaps/thefrey/README.md | 16 -
keyboards/crkbd/keymaps/thefrey/config.h | 45 ---
keyboards/crkbd/keymaps/thefrey/keymap.c | 243 ------------
keyboards/crkbd/keymaps/thefrey/rules.mk | 31 --
keyboards/crkbd/keymaps/thumb_ctrl/keymap.c | 40 +-
.../crkbd/keymaps/vlukash_trackpad_left/keymap.c | 42 +-
.../crkbd/keymaps/vlukash_trackpad_right/keymap.c | 40 +-
keyboards/crkbd/keymaps/vxid/keymap.c | 30 +-
keyboards/crkbd/rev1/rev1.h | 14 -
keyboards/dm9records/plaid/plaid.h | 18 +-
keyboards/eco/eco.h | 14 -
keyboards/eco/keymaps/hexwire/keymap.c | 116 ------
keyboards/eco/keymaps/hexwire/rules.mk | 22 --
keyboards/ergo42/ergo42.h | 16 -
keyboards/ergodash/ergodash.h | 35 +-
keyboards/ergotravel/ergotravel.h | 15 -
keyboards/ergotravel/keymaps/ckofy/config.h | 39 --
keyboards/ergotravel/keymaps/ckofy/keymap.c | 179 ---------
keyboards/ergotravel/keymaps/ckofy/rules.mk | 0
.../ergotravel/keymaps/jpconstantineau/config.h | 38 --
.../ergotravel/keymaps/jpconstantineau/keymap.c | 128 -------
.../ergotravel/keymaps/jpconstantineau/rules.mk | 0
keyboards/ergotravel/keymaps/rs/keymap.c | 32 +-
keyboards/ergotravel/keymaps/viet/config.h | 38 --
keyboards/ergotravel/keymaps/viet/keymap.c | 326 ----------------
keyboards/ergotravel/keymaps/viet/rules.mk | 4 -
keyboards/fortitude60/fortitude60.h | 16 -
keyboards/gh60/revc/keymaps/bluezio/keymap.c | 6 +-
keyboards/handwired/atreus50/atreus50.h | 13 -
.../not_so_minidox/keymaps/mtdjr/config.h | 5 -
.../not_so_minidox/keymaps/mtdjr/keymap.c | 56 ---
.../not_so_minidox/keymaps/mtdjr/rules.mk | 1 -
.../handwired/not_so_minidox/not_so_minidox.h | 18 -
keyboards/handwired/ortho5x13/ortho5x13.h | 15 -
keyboards/handwired/qc60/qc60.h | 16 -
.../handwired/tennie/keymaps/default/readme.md | 68 ----
keyboards/handwired/traveller/traveller.h | 2 +-
keyboards/hecomi/hecomi.h | 20 -
keyboards/helix/pico/pico.h | 12 -
keyboards/helix/rev1/rev1.h | 39 --
keyboards/helix/rev2/rev2.h | 29 --
keyboards/jc65/v32a/v32a.h | 17 -
keyboards/jd40/jd40.h | 14 -
keyboards/jd45/jd45.h | 12 -
keyboards/jd45/keymaps/justin/keymap.c | 80 ----
keyboards/jd45/keymaps/mjt/config.h | 79 ----
keyboards/jd45/keymaps/mjt/keymap.c | 82 ----
keyboards/jd45/keymaps/mjt/readme.md | 12 -
keyboards/jd45/keymaps/mjt/rules.mk | 17 -
keyboards/jj40/jj40.h | 16 -
keyboards/jj40/keymaps/like_jis/config.h | 49 ---
keyboards/jj40/keymaps/like_jis/keymap.c | 200 ----------
keyboards/jj40/keymaps/like_jis/rules.mk | 5 -
keyboards/jm60/jm60.h | 2 -
keyboards/kbdfans/kbd4x/kbd4x.h | 13 -
keyboards/keebio/chocopad/chocopad.h | 14 -
keyboards/keebio/chocopad/keymaps/khord/config.h | 6 -
keyboards/keebio/dilly/dilly.h | 12 -
keyboards/keebio/dilly/keymaps/bakingpy/config.h | 3 -
keyboards/keebio/dilly/keymaps/bakingpy/keymap.c | 106 ------
keyboards/keebio/dilly/keymaps/bakingpy/rules.mk | 1 -
keyboards/keebio/dilly/keymaps/delmo/config.h | 10 -
keyboards/keebio/dilly/keymaps/delmo/keymap.c | 105 -----
keyboards/keebio/dilly/keymaps/delmo/rules.mk | 1 -
keyboards/keebio/dilly/keymaps/pletcher/config.h | 11 -
keyboards/keebio/dilly/keymaps/pletcher/keymap.c | 95 -----
keyboards/keebio/dilly/keymaps/pletcher/rules.mk | 2 -
keyboards/keebio/fourier/fourier.h | 14 -
.../keebio/fourier/keymaps/jennetters/config.h | 28 --
.../keebio/fourier/keymaps/jennetters/keymap.c | 146 -------
.../keebio/fourier/keymaps/jennetters/rules.mk | 1 -
keyboards/keebio/fourier/keymaps/valgrahf/config.h | 31 --
keyboards/keebio/fourier/keymaps/valgrahf/keymap.c | 69 ----
keyboards/keebio/fourier/keymaps/valgrahf/rules.mk | 0
keyboards/keebio/iris/iris.h | 16 -
.../keebio/iris/keymaps/antonlindstrom/keymap.c | 12 +-
keyboards/keebio/iris/keymaps/broswen/config.h | 52 ---
keyboards/keebio/iris/keymaps/broswen/keymap.c | 125 ------
keyboards/keebio/iris/keymaps/broswen/rules.mk | 8 -
keyboards/keebio/iris/keymaps/davidrambo/keymap.c | 74 ++--
keyboards/keebio/iris/keymaps/dbroqua/config.h | 27 --
keyboards/keebio/iris/keymaps/dbroqua/keymap.c | 124 ------
keyboards/keebio/iris/keymaps/dbroqua/rules.mk | 2 -
.../keebio/iris/keymaps/dvp-zjpxshade/config.h | 41 --
.../keebio/iris/keymaps/dvp-zjpxshade/keymap.c | 138 -------
.../keebio/iris/keymaps/dvp-zjpxshade/rules.mk | 3 -
keyboards/keebio/iris/keymaps/fabian/config.h | 39 --
keyboards/keebio/iris/keymaps/fabian/keymap.c | 179 ---------
keyboards/keebio/iris/keymaps/fate/config.h | 40 --
keyboards/keebio/iris/keymaps/fate/keymap.c | 125 ------
keyboards/keebio/iris/keymaps/fate/readme.md | 23 --
keyboards/keebio/iris/keymaps/fate/rules.mk | 7 -
keyboards/keebio/iris/keymaps/gary/keymap.c | 36 +-
keyboards/keebio/iris/keymaps/hag/config.h | 41 --
keyboards/keebio/iris/keymaps/hag/keymap.c | 295 ---------------
keyboards/keebio/iris/keymaps/hag/rules.mk | 3 -
keyboards/keebio/iris/keymaps/hbbisenieks/keymap.c | 1 -
keyboards/keebio/iris/keymaps/hexwire/config.h | 38 --
keyboards/keebio/iris/keymaps/hexwire/keymap.c | 142 -------
keyboards/keebio/iris/keymaps/hexwire/rules.mk | 3 -
.../keebio/iris/keymaps/jasondunsmore/keymap.c | 36 +-
keyboards/keebio/iris/keymaps/jennetters/config.h | 38 --
keyboards/keebio/iris/keymaps/jennetters/keymap.c | 206 ----------
keyboards/keebio/iris/keymaps/jennetters/readme.md | 10 -
keyboards/keebio/iris/keymaps/jennetters/rules.mk | 1 -
keyboards/keebio/iris/keymaps/lewisridden/config.h | 41 --
keyboards/keebio/iris/keymaps/lewisridden/keymap.c | 136 -------
keyboards/keebio/iris/keymaps/lewisridden/rules.mk | 3 -
keyboards/keebio/iris/keymaps/mojitas/keymap.c | 2 -
keyboards/keebio/iris/keymaps/mtdjr/config.h | 51 ---
keyboards/keebio/iris/keymaps/mtdjr/keymap.c | 63 ---
keyboards/keebio/iris/keymaps/mtdjr/rules.mk | 4 -
keyboards/keebio/iris/keymaps/osiris/keymap.c | 50 ++-
keyboards/keebio/iris/keymaps/rdhaene/config.h | 24 --
keyboards/keebio/iris/keymaps/rdhaene/keymap.c | 145 -------
keyboards/keebio/iris/keymaps/rdhaene/rules.mk | 3 -
keyboards/keebio/iris/keymaps/rs/keymap.c | 36 +-
keyboards/keebio/iris/keymaps/s1carii/config.h | 34 --
keyboards/keebio/iris/keymaps/s1carii/keymap.c | 144 -------
keyboards/keebio/iris/keymaps/s1carii/readme.md | 9 -
keyboards/keebio/iris/keymaps/s1carii/rules.mk | 2 -
keyboards/keebio/iris/keymaps/saviof/config.h | 39 --
keyboards/keebio/iris/keymaps/saviof/keymap.c | 107 ------
keyboards/keebio/iris/keymaps/saviof/rules.mk | 3 -
.../keebio/iris/keymaps/sethBarberee/keymap.c | 2 -
keyboards/keebio/iris/keymaps/swedish/config.h | 41 --
keyboards/keebio/iris/keymaps/swedish/keymap.c | 109 ------
keyboards/keebio/iris/keymaps/swedish/rules.mk | 3 -
.../keebio/iris/keymaps/transmogrified/Readme.md | 9 -
.../keebio/iris/keymaps/transmogrified/config.h | 46 ---
.../keebio/iris/keymaps/transmogrified/keymap.c | 421 ---------------------
.../keebio/iris/keymaps/transmogrified/rules.mk | 3 -
keyboards/keebio/iris/keymaps/xyverz/keymap.c | 87 +++--
keyboards/keebio/iris/keymaps/yanfali/config.h | 43 ---
keyboards/keebio/iris/keymaps/yanfali/keymap.c | 144 -------
keyboards/keebio/iris/keymaps/yanfali/readme.md | 17 -
keyboards/keebio/iris/keymaps/yanfali/rules.mk | 3 -
keyboards/keebio/laplace/keymaps/bakingpy/keymap.c | 61 ---
keyboards/keebio/laplace/keymaps/bakingpy/rules.mk | 0
keyboards/keebio/laplace/laplace.h | 14 -
.../keebio/levinson/keymaps/bakingpy2u/config.h | 21 -
.../keebio/levinson/keymaps/bakingpy2u/keymap.c | 203 ----------
.../keebio/levinson/keymaps/bakingpy2u/rules.mk | 2 -
keyboards/keebio/levinson/keymaps/jyh/config.h | 29 --
keyboards/keebio/levinson/keymaps/omgvee/config.h | 26 --
keyboards/keebio/levinson/keymaps/omgvee/keymap.c | 185 ---------
keyboards/keebio/levinson/keymaps/omgvee/readme.md | 21 -
keyboards/keebio/levinson/keymaps/omgvee/rules.mk | 11 -
.../keebio/levinson/keymaps/treadwell/keymap.c | 62 ++-
.../keebio/levinson/keymaps/valgrahf/config.h | 25 --
.../keebio/levinson/keymaps/valgrahf/keymap.c | 63 ---
.../keebio/levinson/keymaps/valgrahf/rules.mk | 3 -
keyboards/keebio/levinson/levinson.h | 16 -
.../keebio/nyquist/keymaps/bakingpy/README.md | 116 ------
.../nyquist/keymaps/bakingpy/Underglow Pinouts.md | 20 -
keyboards/keebio/nyquist/keymaps/bakingpy/config.h | 34 --
keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c | 216 -----------
.../nyquist/keymaps/bakingpy/keymap_converter.py | 39 --
.../nyquist/keymaps/bakingpy/keymap_to_readme.rb | 40 --
keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk | 2 -
keyboards/keebio/nyquist/keymaps/mtdjr/config.h | 36 --
keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c | 64 ----
keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk | 2 -
keyboards/keebio/nyquist/nyquist.h | 18 -
keyboards/keebio/quefrency/quefrency.h | 14 -
keyboards/keebio/rorschach/rorschach.h | 16 -
keyboards/keebio/tragicforce68/tragicforce68.h | 17 -
.../keebio/viterbi/keymaps/bakingpy/README.md | 116 ------
keyboards/keebio/viterbi/keymaps/bakingpy/config.h | 33 --
keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c | 215 -----------
keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk | 1 -
keyboards/keebio/viterbi/keymaps/dwallace/config.h | 43 ---
keyboards/keebio/viterbi/keymaps/dwallace/keymap.c | 223 -----------
keyboards/keebio/viterbi/keymaps/dwallace/rules.mk | 1 -
keyboards/keebio/viterbi/keymaps/fido/config.h | 45 ---
keyboards/keebio/viterbi/keymaps/fido/keymap.c | 73 ----
keyboards/keebio/viterbi/keymaps/fido/rules.mk | 1 -
keyboards/keebio/viterbi/keymaps/mike808/config.h | 38 --
keyboards/keebio/viterbi/keymaps/mike808/keymap.c | 157 --------
keyboards/keebio/viterbi/keymaps/mike808/rules.mk | 1 -
keyboards/keebio/viterbi/viterbi.h | 16 -
keyboards/keebio/wavelet/wavelet.h | 15 -
keyboards/laptreus/laptreus.h | 15 -
keyboards/lets_split/keymaps/bbaserdem/keymap.c | 1 -
keyboards/lets_split/keymaps/mtdjr/config.h | 43 ---
keyboards/lets_split/keymaps/mtdjr/keymap.c | 55 ---
keyboards/lets_split/keymaps/mtdjr/rules.mk | 2 -
keyboards/lets_split/lets_split.h | 17 -
keyboards/lets_split_eh/lets_split_eh.h | 17 -
keyboards/mechmini/v1/v1.h | 2 +-
keyboards/meira/meira.h | 20 +-
keyboards/mt40/mt40.h | 16 -
keyboards/niu_mini/niu_mini.h | 15 -
keyboards/orthodox/orthodox.h | 15 -
keyboards/planck/ez/ez.h | 1 -
keyboards/planck/keymaps/corvec/keymap.c | 66 ++--
keyboards/planck/light/light.h | 20 +-
keyboards/planck/rev1/rev1.h | 18 +-
keyboards/planck/rev2/rev2.h | 18 +-
keyboards/planck/rev3/rev3.h | 18 +-
keyboards/planck/rev4/rev4.h | 18 +-
keyboards/planck/rev5/rev5.h | 18 +-
keyboards/planck/rev6/rev6.h | 18 +-
keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c | 22 +-
keyboards/rgbkb/sol/sol.h | 21 -
keyboards/sentraq/s60_x/default/default.h | 18 -
keyboards/sentraq/s60_x/keymaps/custom/keymap.c | 26 --
keyboards/sentraq/s60_x/keymaps/custom/readme.md | 15 -
keyboards/sentraq/s60_x/keymaps/hasu/keymap.c | 180 ---------
keyboards/sentraq/s60_x/keymaps/hasu/readme.md | 4 -
keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c | 47 ---
keyboards/sentraq/s60_x/keymaps/hhkb/readme.md | 26 --
keyboards/sentraq/s60_x/keymaps/iso/keymap.c | 44 ---
keyboards/sentraq/s60_x/keymaps/iso/readme.md | 28 --
keyboards/sentraq/s60_x/keymaps/jpec/keymap.c | 81 ----
keyboards/sentraq/s60_x/keymaps/jpec/readme.md | 1 -
keyboards/sentraq/s60_x/keymaps/plain/keymap.c | 24 --
keyboards/sentraq/s60_x/keymaps/plain/readme.md | 16 -
keyboards/sentraq/s60_x/keymaps/poker/keymap.c | 181 ---------
keyboards/sentraq/s60_x/keymaps/poker/readme.md | 31 --
keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c | 111 ------
.../sentraq/s60_x/keymaps/poker_bit/readme.md | 31 --
keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c | 178 ---------
.../sentraq/s60_x/keymaps/poker_set/readme.md | 31 --
keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c | 49 ---
keyboards/sentraq/s60_x/keymaps/spacefn/readme.md | 27 --
keyboards/sentraq/s60_x/rgb/rgb.h | 18 -
keyboards/vision_division/keymaps/default/config.h | 12 +-
keyboards/vision_division/matrix_types.h | 80 ++--
keyboards/vitamins_included/vitamins_included.h | 16 -
keyboards/ymd96/keymaps/epx/keymap.c | 8 +-
keyboards/ymd96/keymaps/hgoel89/keymap.c | 6 +-
keyboards/zlant/zlant.h | 12 -
layouts/community/ortho_4x12/rs/keymap.c | 18 +-
quantum/config_common.h | 3 +
users/rs/rs.h | 4 +-
271 files changed, 490 insertions(+), 12337 deletions(-)
delete mode 100644 keyboards/40percentclub/mf68/keymaps/factory/keymap.c
delete mode 100644 keyboards/atreus62/keymaps/atreus52/README.md
delete mode 100644 keyboards/atreus62/keymaps/atreus52/config.h
delete mode 100644 keyboards/atreus62/keymaps/atreus52/keymap.c
delete mode 100644 keyboards/atreus62/keymaps/atreus52/rules.mk
delete mode 100644 keyboards/chimera_ortho/keymaps/dcompact/config.h
delete mode 100644 keyboards/chimera_ortho/keymaps/dcompact/keymap.c
delete mode 100644 keyboards/chimera_ortho/keymaps/dcompact/readme.md
delete mode 100644 keyboards/chimera_ortho/keymaps/dcompact/rules.mk
delete mode 100644 keyboards/chimera_ortho/keymaps/gordon/keymap.c
delete mode 100644 keyboards/crkbd/keymaps/like_jis/config.h
delete mode 100644 keyboards/crkbd/keymaps/like_jis/keymap.c
delete mode 100644 keyboards/crkbd/keymaps/like_jis/oled_helper.c
delete mode 100644 keyboards/crkbd/keymaps/like_jis/oled_helper.h
delete mode 100644 keyboards/crkbd/keymaps/like_jis/rules.mk
delete mode 100644 keyboards/crkbd/keymaps/omgvee/config.h
delete mode 100644 keyboards/crkbd/keymaps/omgvee/keymap.c
delete mode 100644 keyboards/crkbd/keymaps/omgvee/readme.md
delete mode 100644 keyboards/crkbd/keymaps/omgvee/rules.mk
delete mode 100644 keyboards/crkbd/keymaps/thefrey/README.md
delete mode 100644 keyboards/crkbd/keymaps/thefrey/config.h
delete mode 100644 keyboards/crkbd/keymaps/thefrey/keymap.c
delete mode 100644 keyboards/crkbd/keymaps/thefrey/rules.mk
delete mode 100644 keyboards/eco/keymaps/hexwire/keymap.c
delete mode 100644 keyboards/eco/keymaps/hexwire/rules.mk
delete mode 100644 keyboards/ergotravel/keymaps/ckofy/config.h
delete mode 100644 keyboards/ergotravel/keymaps/ckofy/keymap.c
delete mode 100644 keyboards/ergotravel/keymaps/ckofy/rules.mk
delete mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/config.h
delete mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/keymap.c
delete mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/rules.mk
delete mode 100644 keyboards/ergotravel/keymaps/viet/config.h
delete mode 100644 keyboards/ergotravel/keymaps/viet/keymap.c
delete mode 100644 keyboards/ergotravel/keymaps/viet/rules.mk
delete mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h
delete mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c
delete mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk
delete mode 100644 keyboards/handwired/tennie/keymaps/default/readme.md
delete mode 100644 keyboards/jd45/keymaps/justin/keymap.c
delete mode 100644 keyboards/jd45/keymaps/mjt/config.h
delete mode 100644 keyboards/jd45/keymaps/mjt/keymap.c
delete mode 100644 keyboards/jd45/keymaps/mjt/readme.md
delete mode 100644 keyboards/jd45/keymaps/mjt/rules.mk
delete mode 100644 keyboards/jj40/keymaps/like_jis/config.h
delete mode 100644 keyboards/jj40/keymaps/like_jis/keymap.c
delete mode 100644 keyboards/jj40/keymaps/like_jis/rules.mk
delete mode 100644 keyboards/keebio/chocopad/keymaps/khord/config.h
delete mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/config.h
delete mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/keymap.c
delete mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/rules.mk
delete mode 100644 keyboards/keebio/dilly/keymaps/delmo/config.h
delete mode 100644 keyboards/keebio/dilly/keymaps/delmo/keymap.c
delete mode 100644 keyboards/keebio/dilly/keymaps/delmo/rules.mk
delete mode 100644 keyboards/keebio/dilly/keymaps/pletcher/config.h
delete mode 100644 keyboards/keebio/dilly/keymaps/pletcher/keymap.c
delete mode 100644 keyboards/keebio/dilly/keymaps/pletcher/rules.mk
delete mode 100644 keyboards/keebio/fourier/keymaps/jennetters/config.h
delete mode 100644 keyboards/keebio/fourier/keymaps/jennetters/keymap.c
delete mode 100644 keyboards/keebio/fourier/keymaps/jennetters/rules.mk
delete mode 100644 keyboards/keebio/fourier/keymaps/valgrahf/config.h
delete mode 100644 keyboards/keebio/fourier/keymaps/valgrahf/keymap.c
delete mode 100644 keyboards/keebio/fourier/keymaps/valgrahf/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/broswen/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/broswen/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/broswen/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/dbroqua/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/dbroqua/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/dbroqua/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/fabian/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/fabian/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/fate/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/fate/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/fate/readme.md
delete mode 100644 keyboards/keebio/iris/keymaps/fate/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/hag/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/hag/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/hag/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/hexwire/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/hexwire/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/hexwire/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/jennetters/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/jennetters/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/jennetters/readme.md
delete mode 100644 keyboards/keebio/iris/keymaps/jennetters/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/lewisridden/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/lewisridden/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/lewisridden/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/mtdjr/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/mtdjr/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/mtdjr/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/rdhaene/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/rdhaene/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/rdhaene/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/s1carii/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/s1carii/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/s1carii/readme.md
delete mode 100644 keyboards/keebio/iris/keymaps/s1carii/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/saviof/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/saviof/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/saviof/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/swedish/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/swedish/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/swedish/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/transmogrified/Readme.md
delete mode 100644 keyboards/keebio/iris/keymaps/transmogrified/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/transmogrified/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/transmogrified/rules.mk
delete mode 100644 keyboards/keebio/iris/keymaps/yanfali/config.h
delete mode 100644 keyboards/keebio/iris/keymaps/yanfali/keymap.c
delete mode 100644 keyboards/keebio/iris/keymaps/yanfali/readme.md
delete mode 100644 keyboards/keebio/iris/keymaps/yanfali/rules.mk
delete mode 100644 keyboards/keebio/laplace/keymaps/bakingpy/keymap.c
delete mode 100644 keyboards/keebio/laplace/keymaps/bakingpy/rules.mk
delete mode 100644 keyboards/keebio/levinson/keymaps/bakingpy2u/config.h
delete mode 100644 keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c
delete mode 100644 keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk
delete mode 100644 keyboards/keebio/levinson/keymaps/jyh/config.h
delete mode 100644 keyboards/keebio/levinson/keymaps/omgvee/config.h
delete mode 100644 keyboards/keebio/levinson/keymaps/omgvee/keymap.c
delete mode 100644 keyboards/keebio/levinson/keymaps/omgvee/readme.md
delete mode 100644 keyboards/keebio/levinson/keymaps/omgvee/rules.mk
delete mode 100644 keyboards/keebio/levinson/keymaps/valgrahf/config.h
delete mode 100644 keyboards/keebio/levinson/keymaps/valgrahf/keymap.c
delete mode 100644 keyboards/keebio/levinson/keymaps/valgrahf/rules.mk
delete mode 100644 keyboards/keebio/nyquist/keymaps/bakingpy/README.md
delete mode 100644 keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md
delete mode 100644 keyboards/keebio/nyquist/keymaps/bakingpy/config.h
delete mode 100644 keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c
delete mode 100755 keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py
delete mode 100755 keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb
delete mode 100644 keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk
delete mode 100644 keyboards/keebio/nyquist/keymaps/mtdjr/config.h
delete mode 100644 keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c
delete mode 100644 keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk
delete mode 100644 keyboards/keebio/viterbi/keymaps/bakingpy/README.md
delete mode 100644 keyboards/keebio/viterbi/keymaps/bakingpy/config.h
delete mode 100644 keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c
delete mode 100644 keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk
delete mode 100644 keyboards/keebio/viterbi/keymaps/dwallace/config.h
delete mode 100644 keyboards/keebio/viterbi/keymaps/dwallace/keymap.c
delete mode 100644 keyboards/keebio/viterbi/keymaps/dwallace/rules.mk
delete mode 100644 keyboards/keebio/viterbi/keymaps/fido/config.h
delete mode 100644 keyboards/keebio/viterbi/keymaps/fido/keymap.c
delete mode 100644 keyboards/keebio/viterbi/keymaps/fido/rules.mk
delete mode 100644 keyboards/keebio/viterbi/keymaps/mike808/config.h
delete mode 100644 keyboards/keebio/viterbi/keymaps/mike808/keymap.c
delete mode 100644 keyboards/keebio/viterbi/keymaps/mike808/rules.mk
delete mode 100644 keyboards/lets_split/keymaps/mtdjr/config.h
delete mode 100644 keyboards/lets_split/keymaps/mtdjr/keymap.c
delete mode 100644 keyboards/lets_split/keymaps/mtdjr/rules.mk
delete mode 100644 keyboards/sentraq/s60_x/keymaps/custom/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/custom/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/hasu/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/hhkb/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/iso/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/iso/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/jpec/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/plain/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/plain/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/poker_set/readme.md
delete mode 100644 keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
delete mode 100644 keyboards/sentraq/s60_x/keymaps/spacefn/readme.md
(limited to 'quantum')
diff --git a/keyboards/40percentclub/4x4/4x4.h b/keyboards/40percentclub/4x4/4x4.h
index 359cdc80a1..8cc5a150aa 100644
--- a/keyboards/40percentclub/4x4/4x4.h
+++ b/keyboards/40percentclub/4x4/4x4.h
@@ -56,16 +56,3 @@
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, K2f }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e, K3f } \
}
-
-#define LAYOUT_kc_ortho_4x12( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \
-) \
-{ \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, ___, ___, ___, ___}, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, ___, ___, ___, ___}, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, ___, ___, ___, ___}, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b, ___, ___, ___, ___} \
-}
diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
index 6f9179926c..011d03deba 100644
--- a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
@@ -20,8 +20,6 @@
#include QMK_KEYBOARD_H
-#define KC_ KC_TRNS
-
#define KC_FN1 MO(_FN)
#define KC_FN2 LT(_FN, KC_CAPS)
@@ -54,30 +52,30 @@ enum {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QWERTY] = LAYOUT_kc( /* Default layer
+[_QWERTY] = LAYOUT_68_ansi( /* Default layer
â”â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”â”â”â”â”┓ â”â”â”â”â”┳â”â”â”â”┓ */
- GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /*
+ 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_PGUP, /*
┣â”â”â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”â”â”â”┫ ┣â”â”â”â”â•‹â”â”â”â”┫ */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /*
+ 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_PGDN, /*
┣â”â”â”â”â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”â”â”â”â”â”┫ â”—â”â”â”â”â”»â”â”â”â”â”› */
- FN2 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /*
+ KC_FN2 , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, KC_ENTER , /*
┣â”â”â”â”â”â”â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”┳â”â”â”»â”â”â”â”â”â”â”â”â”┫ â”â”â”â”â”┓ */
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /*
+ 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 , /*
┣â”â”â”â”â”┳â”â”â”â”┻┳â”â”â”â”»â”┳â”â”â”»â”â”â”â”â”»â”â”â”â”â”»â”â”â”â”â”»â”â”â”â”â”»â”â”â”â”â”»â”â”â”┳┻â”â”â”â”â•‹â”â”â”â”┻┳â”â”â”â”â”┳â”â”┳â”â”â”»â”â•‹â”â”â”â”â•‹â”â”â”â”┓ */
- LCTL ,LGUI ,LALT , SPACE ,RALT , FN1 ,RCTL , LEFT,DOWN,RGHT /*
+ KC_LCTL ,KC_LGUI ,KC_LALT , KC_SPACE ,KC_RALT , KC_FN1 ,KC_RCTL , KC_LEFT,KC_DOWN,KC_RGHT /*
â”—â”â”â”â”â”â”»â”â”â”â”â”â”»â”â”â”â”â”â”»â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”»â”â”â”â”â”â”»â”â”â”â”â”â”»â”â”â”â”â”â”› â”—â”â”â”â”â”»â”â”â”â”â”»â”â”â”â”â”› */),
-[_FN] = LAYOUT_kc( /* FN & CAPS layer
+[_FN] = LAYOUT_68_ansi( /* FN & CAPS layer
â”â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”┳â”â”â”â”â”â”â”â”┓ â”â”â”â”â”┳â”â”â”â”┓ */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, F12, RSTP , PSCR,HOME, /*
+ 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, KC_RSTP , KC_PSCR,KC_HOME, /*
┣Esc â”» 1! â”» 2@ â”» 3# â”» 4$ â”» 5% â”» 6^ â”» 7& â”» 8* â”» 9( â”» 0) â”» -_ â”» =+ â”»â”┳┠â†â”€ â”┫ ┣Ins â•‹PgUp┫ */
- ,PLY1,PLY2, , , , , , 7 , 8 , 9 ,BLDN,BLUP,BLTOG , ,END , /*
+ _______ ,KC_PLY1,KC_PLY2,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_7 , KC_8 , KC_9 ,KC_BLDN,KC_BLUP,KC_BLTOG ,KC_TRNS ,KC_END , /*
┣ Tab â”â”» Q â”â”» W â”â”» E â”â”» R â”â”» T â”â”» Y â”â”» U â”â”» I â”â”» O â”â”» P â”â”» [{ â”» ]} ┻┠\| â”┫ â”—Del â”»PgDnâ”› */
- , , , , , , , , 4 , 5 , 6 , , TERM , /*
+ _______ ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_4 , KC_5 , KC_6 ,KC_TRNS, KC_TERM , /*
┣┠Caps â”â”» A â”â”» S â”â”» D â”â”» F â”â”» G â”â”» H â”â”» J â”â”» K â”â”» L â”â”» ;: â”» '" ┻┠Enter â”┫ â”â”â”â”â”┓ */
- ,REC1,REC2, , ,MSTP, ,MUTE, 1 , 2 , 3 , , VOLU, /*
+ _______ ,KC_REC1,KC_REC2,KC_TRNS,KC_TRNS,KC_MSTP,KC_TRNS,KC_MUTE, KC_1 , KC_2 , KC_3 ,KC_TRNS , KC_VOLU, /*
┣â”â” Shift â”â”» Z â”â”» X â”â”» C â”â”» V â”â”» B â”â”» N â”â”» M â”â”» ,< â”» .> â•‹ /? ┻┳â”â” Shift â”â”â”»â”â•‹ ↑ â”â•‹â”â”â”â”┓ */
- , , , MPLY , 0 , , , MPRV,VOLD,MNXT /*
+ _______,KC_TRNS ,KC_TRNS , KC_MPLY , KC_0 ,KC_TRNS ,KC_TRNS , KC_MPRV,KC_VOLD,KC_MNXT /*
â”—Ctrl â”» GUI â”» Alt â”»â”â”â”â”â”â”â”â”â”â”â”â” Space â”â”â”â”â”â”â”â”â”â”â”â”â”» Alt â”» Fn â”â”»Ctrl â”› â”— ↠â”â”» ↓ â”â”» → â”â”› */)
};
// clang-format on
diff --git a/keyboards/40percentclub/mf68/keymaps/factory/keymap.c b/keyboards/40percentclub/mf68/keymaps/factory/keymap.c
deleted file mode 100644
index 12032350cd..0000000000
--- a/keyboards/40percentclub/mf68/keymaps/factory/keymap.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _QWERTY 0
-#define _FN1 1
-#define _FN2 2
-#define KC_ KC_TRNS
-#define KC_X0 LT(_FN2, KC_CAPS)
-#define KC_X1 MO(_FN1)
-#define KC_X2 BL_STEP
-#define KC_X3 BL_BRTG
-#define KC_X4 BL_TOGG
-#define KC_X5 BL_INC
-#define KC_X6 BL_DEC
-
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
- /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
- /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
- /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
- /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
- LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
- /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
- ),
-
- [_FN1] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , ,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , UP , , , , , , ,PSCR,SLCK,PAUS, X2 , , ,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- X0 ,LEFT,DOWN,RGHT, , X6 , X5 , X4 , X3 , X2 ,HOME, , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , ,MPLY,MSTP,MPRV,MNXT,VOLD,VOLU,MUTE, ,END , , X5 ,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , X3 , X6 , X4
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
- ),
-
- [_FN2] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , 0 , 1 , 2 , 3 , , , MUTE,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
- )
-};
diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c b/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c
index ae7e7297cb..0002263de5 100644
--- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c
@@ -3,51 +3,50 @@
#define _QWERTY 0
#define _FN1 1
#define _FN2 2
-#define KC_ KC_TRNS
#define KC_X0 LT(_FN2, KC_GRV)
#define KC_X1 MO(_FN1)
#define KC_X2 BL_STEP
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT_68_ansi(
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
+ 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_INS ,KC_PGUP,
/*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
+ 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_PGDN,
/*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
+ KC_X0 , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, KC_ENTER ,
/*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
+ 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 ,
/*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
- LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
+ KC_LCTL ,KC_LGUI ,KC_LALT , KC_SPACE , KC_X1 ,KC_RALT ,KC_RCTL , KC_LEFT,KC_DOWN,KC_RGHT
/*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
),
- [_FN1] = LAYOUT_kc(
+ [_FN1] = LAYOUT_68_ansi(
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
+ 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 , KC_BSPC , KC_VOLU,KC_HOME,
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , , , , , , X2 , , VOLD,END,
+ KC_TRNS,KC_TRNS,KC_TRNS, KC_UP ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_X2 , KC_TRNS, KC_VOLD,KC_END,
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , , , , , , ,
+ KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , ,MUTE, , , , , MUTE,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_MUTE,
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV,KC_MPLY,KC_MNXT
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
),
- [_FN2] = LAYOUT_kc(
+ [_FN2] = LAYOUT_68_ansi(
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
+ 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 , KC_BSPC , KC_VOLU,KC_HOME,
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
+ KC_TRNS,KC_TRNS,KC_TRNS, KC_UP ,KC_TRNS,KC_TRNS,KC_TRNS, KC_7 , KC_8 , KC_9 ,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_VOLD,KC_END,
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
+ KC_TRNS,KC_TRNS,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS, KC_4 , KC_5 , KC_6 ,KC_TRNS,KC_TRNS, KC_TRNS,
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , 0 , 1 , 2 , 3 , , , MUTE,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_0 , KC_1 , KC_2 , KC_3 ,KC_TRNS, KC_TRNS, KC_MUTE,
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV,KC_MPLY,KC_MNXT
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
)
};
diff --git a/keyboards/40percentclub/mf68/mf68.h b/keyboards/40percentclub/mf68/mf68.h
index 6844ed1b09..71ee4229de 100644
--- a/keyboards/40percentclub/mf68/mf68.h
+++ b/keyboards/40percentclub/mf68/mf68.h
@@ -18,20 +18,3 @@
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
{ K70, K71, K72, K73, K74, KC_NO, KC_NO, KC_NO, KC_NO } \
}
-
-#define LAYOUT_kc( \
- K00, K01, 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, K41, K42, K43, K44, K45, K46, K47, K48, \
- K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
- K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
-) LAYOUT_68_ansi( \
- KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
- KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
- KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
- KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
- KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
- KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
- KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
- KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
-)
diff --git a/keyboards/40percentclub/nori/nori.h b/keyboards/40percentclub/nori/nori.h
index 802f0bfce6..ffcc396218 100644
--- a/keyboards/40percentclub/nori/nori.h
+++ b/keyboards/40percentclub/nori/nori.h
@@ -54,16 +54,3 @@
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b } \
}
-
-#define LAYOUT_kc_ortho_4x12( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \
-) \
-{ \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b } \
-}
diff --git a/keyboards/40percentclub/ut47/ut47.h b/keyboards/40percentclub/ut47/ut47.h
index f6456fe911..f595d3a458 100644
--- a/keyboards/40percentclub/ut47/ut47.h
+++ b/keyboards/40percentclub/ut47/ut47.h
@@ -29,18 +29,3 @@
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \
{ K30, K31, K32, K33, K34, K35, K35, K37, K38, K39, K3a, K3b } \
}
-
-#define LAYOUT_kc( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \
- K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \
-) \
- LAYOUT( \
- KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0a, KC_##K0b, \
- KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1a, KC_##K1b, \
- KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2a, KC_##K2b, \
- KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K37, KC_##K38, KC_##K39, KC_##K3a, KC_##K3b \
- )
-
-#define LAYOUT_kc_ut47 LAYOUT_kc
diff --git a/keyboards/adkb96/adkb96.h b/keyboards/adkb96/adkb96.h
index 4b28775006..5a47f16aad 100644
--- a/keyboards/adkb96/adkb96.h
+++ b/keyboards/adkb96/adkb96.h
@@ -5,24 +5,3 @@
#ifdef KEYBOARD_adkb96_rev1
#include "rev1.h"
#endif
-
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc_ortho_6x16( \
- L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \
- L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \
- L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \
- L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \
- L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
- L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46, KC_##R47, \
- KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##L56, KC_##L57, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, KC_##R55, KC_##R56 ,KC_##R57 \
- )
-
-#define LAYOUT_kc LAYOUT_kc_ortho_6x16
diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h
index de6f64063b..6af5d8bf6e 100644
--- a/keyboards/atreus62/atreus62.h
+++ b/keyboards/atreus62/atreus62.h
@@ -1,5 +1,4 @@
-#ifndef ATREUS62_H
-#define ATREUS62_H
+#pragma once
#include "quantum.h"
@@ -20,21 +19,3 @@
{ k30, k31, k32, k33, k34, k35, k46, k36, k37, k38, k39, k3a, k3b }, \
{ k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, k4d } \
}
-
-// Used to create a keymap using only KC_ prefixed keys.
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \
- k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \
-) \
-{ \
- { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
- { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
- { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
- { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k47, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b }, \
- { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c, KC_##k4d } \
-}
-
-#endif
diff --git a/keyboards/atreus62/keymaps/atreus52/README.md b/keyboards/atreus62/keymaps/atreus52/README.md
deleted file mode 100644
index 245df7deb4..0000000000
--- a/keyboards/atreus62/keymaps/atreus52/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-Atreus52 Modification
-=======================
-
-Firmware for my custom keyboard based on the Atreus layout, but with 5 rows and only 5 columns per hand.
-More documentation coming soon.
-
-# License
- GPL-3+
diff --git a/keyboards/atreus62/keymaps/atreus52/config.h b/keyboards/atreus62/keymaps/atreus52/config.h
deleted file mode 100644
index 91b626b560..0000000000
--- a/keyboards/atreus62/keymaps/atreus52/config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "../../config.h"
-
-#undef MANUFACTURER
-#undef PRODUCT
-#undef MATRIX_ROW_PINS
-#undef MATRIX_COL_PINS
-#undef DIODE_DIRECTION
-
-/* USB Device descriptor parameter */
-#define MANUFACTURER Mesh Industries
-#define PRODUCT Atreus52 Treeboard
-
-#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
-#define MATRIX_COL_PINS { B2, B1, F7, F6, F5, F4, B6, D3, D2, D1, D0, D4, B3 }
-
-#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c
deleted file mode 100644
index 2abd49b116..0000000000
--- a/keyboards/atreus62/keymaps/atreus52/keymap.c
+++ /dev/null
@@ -1,88 +0,0 @@
-#include QMK_KEYBOARD_H
-
-// Layers
-#define DVORAK 0
-#define QWERTY 1
-#define RAISE 2
-#define LOWER 3
-#define BDO 4
-#define RESETL 5
-
-#define KC_RAIS MO(RAISE)
-#define KC_LOWR MO(LOWER)
-#define KC_TGBD TG(BDO)
-#define KC_TGRS TG(RESETL)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [DVORAK] = LAYOUT_kc(
- NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
- NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
- NO, A, O, E, U, I, D, H, T, N, S, NO, \
- NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
- NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO
- ),
-
- [QWERTY] = LAYOUT_kc(
- NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
- NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
- NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
- NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
- NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO
- ),
-
- [RAISE] = LAYOUT_kc(
- NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \
- NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \
- NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \
- NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \
- NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TGRS, NO
- ),
-
- [LOWER] = LAYOUT_kc(
- NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \
- NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \
- NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
- NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \
- NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO
- ),
-
- [BDO] = LAYOUT_kc(
- NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \
- NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \
- NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \
- NO, T, Z, X, C, V, 8, B, N, M, L, NO, \
- NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, TGBD, NO
- ),
-
- [RESETL] = LAYOUT(
- KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
- KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(RESETL),KC_NO
- )
-};
-
-static uint8_t qw_dv_swap_state = 0;
-
-bool process_record_user (uint16_t keycode, keyrecord_t *record) {
- if (keycode == KC_LGUI) {
- if (record->event.pressed) {
- qw_dv_swap_state |= 0b00000001;
- } else {
- qw_dv_swap_state &= ~(0b00000001);
- }
- }
- if (keycode == KC_LCTL) {
- if (record->event.pressed) {
- qw_dv_swap_state |= 0b00000010;
- } else {
- qw_dv_swap_state &= ~(0b00000010);
- }
- }
-
- if (qw_dv_swap_state == 0b00000011) {
- layer_invert(DVORAK);
- }
- return true;
-}
diff --git a/keyboards/atreus62/keymaps/atreus52/rules.mk b/keyboards/atreus62/keymaps/atreus52/rules.mk
deleted file mode 100644
index efa309d201..0000000000
--- a/keyboards/atreus62/keymaps/atreus52/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-NKRO_ENABLE = true
-MOUSEKEY_ENABLE = no
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h
index 78e5c0dac5..32d02886c4 100644
--- a/keyboards/chimera_ergo/chimera_ergo.h
+++ b/keyboards/chimera_ergo/chimera_ergo.h
@@ -46,21 +46,6 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
-#define LAYOUT_kc( \
- 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, k30, k31, k32, k33, k34, k35, \
- k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, \
- k48, k49, k50, k51 \
-) \
-{ \
- { KC_NO, KC_NO, KC_##k26, KC_##k15, KC_##k28, KC_##k01, KC_##k42, KC_##k31, KC_##k20, KC_##k33, KC_NO, KC_NO }, \
- { KC_##k00, KC_NO, KC_##k14, KC_##k27, KC_##k16, KC_##k36, KC_##k47, KC_##k19, KC_##k32, KC_##k21, KC_NO, KC_##k11 }, \
- { KC_##k12, KC_##k25, KC_##k02, KC_##k39, KC_##k17, KC_##k49, KC_##k50, KC_##k18, KC_##k44, KC_##k09, KC_##k34, KC_##k23 }, \
- { KC_##k24, KC_##k13, KC_##k38, KC_##k04, KC_##k05, KC_##k48, KC_##k51, KC_##k06, KC_##k07, KC_##k45, KC_##k22, KC_##k35 }, \
- { KC_##k29, KC_##k41, KC_##k03, KC_##k40, KC_##k37, KC_NO, KC_##k30, KC_##k43, KC_##k08, KC_##k10, KC_##k46, KC_NO }, \
-}
-
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
diff --git a/keyboards/chimera_ls/chimera_ls.h b/keyboards/chimera_ls/chimera_ls.h
index 8ca8534eb9..45c91acc3d 100644
--- a/keyboards/chimera_ls/chimera_ls.h
+++ b/keyboards/chimera_ls/chimera_ls.h
@@ -60,18 +60,5 @@
{ k06, k07, k08, k10, KC_NO, k05, k04, k03, k01, KC_NO } \
}
-#define LAYOUT_kc_ortho_4x12( \
- 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, k30, k31, k32, k33, k34, k35, \
- k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \
- ) { \
- { KC_##k43, KC_##k45, KC_##k34, KC_##k11, KC_##k23, KC_##k40, KC_##k38, KC_##k25, KC_##k00, KC_##k12 }, \
- { KC_##k31, KC_##k44, KC_##k46, KC_##k35, KC_##k22, KC_##k28, KC_##k39, KC_##k37, KC_##k24, KC_##k13 }, \
- { KC_##k30, KC_##k32, KC_##k33, KC_##k47, KC_##k09, KC_##k29, KC_##k27, KC_##k26, KC_##k36, KC_##k02 }, \
- { KC_##k19, KC_##k20, KC_##k21, KC_##k42, KC_##k18, KC_##k16, KC_##k15, KC_##k14, KC_##k41, KC_##k17 }, \
- { KC_##k06, KC_##k07, KC_##k08, KC_##k10, KC_NO, KC_##k05, KC_##k04, KC_##k03, KC_##k01, KC_NO } \
-}
-
#endif
diff --git a/keyboards/chimera_ortho/chimera_ortho.h b/keyboards/chimera_ortho/chimera_ortho.h
index fc2eba86bd..ec893990a3 100644
--- a/keyboards/chimera_ortho/chimera_ortho.h
+++ b/keyboards/chimera_ortho/chimera_ortho.h
@@ -60,18 +60,4 @@
{ KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO } \
}
-#define LAYOUT_kc( \
- 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, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \
- k45, k46, k47, k48 \
-) \
-{ \
- { KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
- { KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
- { KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
- { KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
- { KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO } \
-}
-
#endif
diff --git a/keyboards/chimera_ortho/keymaps/dcompact/config.h b/keyboards/chimera_ortho/keymaps/dcompact/config.h
deleted file mode 100644
index d1e5c3aabf..0000000000
--- a/keyboards/chimera_ortho/keymaps/dcompact/config.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#define TAPPING_TERM 150
-#define TAPPING_TOGGLE 2
-
-#define MOUSEKEY_DELAY 200
-#define MOUSEKEY_INTERVAL 60
-#define MOUSEKEY_MAX_SPEED 50
-#define MOUSEKEY_TIME_TO_MAX 80
-#define MOUSEKEY_WHEEL_MAX_SPEED 8
-#define MOUSEKEY_WHEEL_TIME_TO_MAX 15
diff --git a/keyboards/chimera_ortho/keymaps/dcompact/keymap.c b/keyboards/chimera_ortho/keymaps/dcompact/keymap.c
deleted file mode 100644
index 1c6ef7d6f9..0000000000
--- a/keyboards/chimera_ortho/keymaps/dcompact/keymap.c
+++ /dev/null
@@ -1,119 +0,0 @@
-#include QMK_KEYBOARD_H
-
-enum chimera_ortho_layers
-{
- _BASE,
- _NAV,
- _SYM,
- _FUNC,
- _MOUSE
-};
-
-#define KC_NAV MO(_NAV)
-#define KC_SYM MO(_SYM)
-#define KC_FUNC MO(_FUNC)
-#define KC_MOUSE TT(_MOUSE)
-
-#define KC_DELSHFT SFT_T(KC_DEL)
-#define KC_CTLENT CTL_T(KC_ENT)
-#define KC_SYMSPC LT(_SYM, KC_SPC)
-
-#define KC_WK_LEFT LCA(KC_LEFT)
-#define KC_WK_DOWN LCA(KC_DOWN)
-#define KC_WK_UP LCA(KC_UP)
-#define KC_WK_RGHT LCA(KC_RGHT)
-
-#define KC_QUAKE LCTL(KC_GRAVE)
-
-#define LONGPRESS_DELAY 150
-
-// These are needed because of the 'KC_'-adding macro
-// This macro can be found in ../../chimera_ortho.h
-#define KC_RESET RESET
-#define KC_ KC_TRNS
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_BASE] = LAYOUT_kc(
- //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
- LALT ,TAB ,QUOT ,COMM ,DOT ,P ,Y ,F ,G ,C ,R ,L ,SLSH ,FUNC
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- ,LGUI ,ESC ,A ,O ,E ,U ,I ,D ,H ,T ,N ,S ,MINS ,MOUSE
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- ,LCTL ,DELSHFT,SCLN ,Q ,J ,K ,X ,B ,M ,W ,V ,Z ,BSPC ,ENTER
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- ,LSHIFT ,NAV ,SYMSPC ,CTLENT
- //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
- ),
-
- [_NAV] = LAYOUT_kc(
- //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
- , , , , , , , ,HOME ,PGDOWN ,PGUP ,END , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , ,PSCR ,MENU , , , , , ,LEFT ,DOWN ,UP ,RIGHT , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , ,CAPS ,NLCK ,INS , , , , ,WK_LEFT,WK_DOWN,WK_UP ,WK_RGHT, ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,
- //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
- ),
-
- [_SYM] = LAYOUT_kc(
- //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
- ,QUAKE ,GRAVE ,TILDE ,BSLASH ,PIPE ,LPRN ,RPRN ,7 ,8 ,9 ,SLSH ,EQUAL ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , ,EXLM ,AT ,HASH ,DLR ,LCBR ,RCBR ,4 ,5 ,6 ,ASTR ,PLUS ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , ,PERC ,CIRC ,AMPR ,ASTR ,LBRC ,RBRC ,1 ,2 ,3 ,MINUS , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,0
- //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
- ),
-
- [_FUNC] = LAYOUT_kc(
- //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
- ,RESET ,SLEP ,MRWD ,MPLY ,MFFD , , ,F9 ,F10 ,F11 ,F12 , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , ,PWR ,MUTE ,VOLD ,VOLU , , ,F5 ,F6 ,F7 ,F8 , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , ,WAKE ,MPRV ,MPLY ,MNXT , , ,F1 ,F2 ,F3 ,F4 , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,
- //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
- ),
-
- [_MOUSE] = LAYOUT_kc(
- //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------.
- , , , , , , , , , , , , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,BTN1 ,BTN3 ,BTN2 , , ,MS_L ,MS_D ,MS_U ,MS_R , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,ACL0 ,ACL1 ,ACL2 , , ,WH_L ,WH_D ,WH_U ,WH_R , ,
- //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------|
- , , , ,
- //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/
- ),
-};
-
-// These control the color of the LED on the receiver
-// For color reference, see ../../chimera_ortho.h
-void matrix_scan_user(void) {
- uint8_t layer = biton32(layer_state);
-
- switch (layer) {
- case _BASE:
- set_led_cyan;
- break;
- case _NAV:
- set_led_blue;
- break;
- case _SYM:
- set_led_magenta;
- break;
- case _FUNC:
- set_led_yellow;
- default:
- set_led_white;
- break;
- }
-};
diff --git a/keyboards/chimera_ortho/keymaps/dcompact/readme.md b/keyboards/chimera_ortho/keymaps/dcompact/readme.md
deleted file mode 100644
index bf72567ef1..0000000000
--- a/keyboards/chimera_ortho/keymaps/dcompact/readme.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# DCompact Layout
-
-**Dvorak, Layered, Mouse-Enabled, Compact -- Plover coming soon!?!~**
-
-_See [the layout source](keymap.c) for the actual layout_
-
-## Goals
-
-The following are the goals kept in mind when designing the DCompact
-layout:
-
-- Provide minimal travel distance when typing English or coding
-- Consistent muscle memory translation from standard QWERTY
-- Stateless typing experience
-- OS-agnostic features, macros, and key placement
-- Minimize dependence on mouse usage
-
-These are generally all met or balanced within reason. This layout is
-not intended at all to be a familiar layout for much of anyone (except
-maybe those who already type in Dvorak) -- this is meant to amplify the
-best parts of having limited, ortholinear keys with layering.
-
-## As Reference Material
-
-If you're reading this hoping to find reference material to implement
-your own layout, then please feel free to copy over this layout and
-make edits where you see fit. I removed a lot of the features I felt
-extraneous to my usage and simplified style where I felt needed. This
-would hopefully mean that my code should feel like a good base to
-develop from for those new to QMK.
-
-_Remember that settings defined in the layout directory override and
-merge with those in the keyboard folder_
-
-## Relevant Links
-
-- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/)
-- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard)
-- [QMK Docs](https://docs.qmk.fm/#/)
-- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes)
-
-## Contact
-
-Maintainer: [Dan](https://github.com/loksonarius)
-
diff --git a/keyboards/chimera_ortho/keymaps/dcompact/rules.mk b/keyboards/chimera_ortho/keymaps/dcompact/rules.mk
deleted file mode 100644
index 6c605daecf..0000000000
--- a/keyboards/chimera_ortho/keymaps/dcompact/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-MOUSEKEY_ENABLE = yes
diff --git a/keyboards/chimera_ortho/keymaps/gordon/keymap.c b/keyboards/chimera_ortho/keymaps/gordon/keymap.c
deleted file mode 100644
index 5bd2019c26..0000000000
--- a/keyboards/chimera_ortho/keymaps/gordon/keymap.c
+++ /dev/null
@@ -1,363 +0,0 @@
-// this is the style you want to emulate.
-// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
-
-#include QMK_KEYBOARD_H
-#include "version.h"
-#include "gordon.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.
-
-#define CALTDEL LCTL(LALT(KC_DEL))
-#define TSKMGR LCTL(LSFT(KC_ESC))
-
-#define KC_SNAPLEFT LGUI(KC_LEFT)
-#define KC_SNAPRIGHT LGUI(KC_RIGHT)
-#define KC_SNAPUP LGUI(KC_UP)
-#define KC_SNAPDOWN LGUI(KC_DOWN)
-#define KC_PREVTAB LCTL(LSFT(KC_TAB))
-#define KC_NEXTTAB LCTL(KC_TAB)
-#define KC_WORKRIGHT LCTL(LGUI(KC_RIGHT))
-#define KC_WORKLEFT LCTL(LGUI(KC_LEFT))
-
-#define KC_NMPD TG(_NUMPAD)
-#define KC_SYMB TG(_SYMBOLS)
-
-#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
-#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
-#define KC_SPLT MT(MOD_LALT, KC_MINS)
-#define KC_SPRT MT(MOD_LALT, KC_1)
-#define KC_GBRC MT(MOD_RGUI, KC_8)
-#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
-#define KC_CSHW MT(MOD_LCTL|MOD_LSFT,KC_W)
-
-#define KC_CDEL LCTL(KC_DEL)
-#define KC_AUDUP KC_AUDIO_VOL_UP
-#define KC_AUDOWN KC_AUDIO_VOL_DOWN
-
-
-#define KC_MEHS MEH_T(KC_S)
-#define KC_MEHL MEH_T(KC_L)
-#define KC_GWIN GUI_T(KC_G)
-#define KC_FCTL CTL_T(KC_F)
-#define KC_JCTL CTL_T(KC_J)
-#define KC_ZCTL CTL_T(KC_Z)
-#define KC_ALTV ALT_T(KC_V)
-#define KC_ALTN ALT_T(KC_N)
-#define KC_MEHX ALL_T(KC_X)
-#define KC_RESET RESET
-
-//LTs
-#define KC_MESC LT(_MACROS, KC_ESC)
-#define KC_DNUM LT(_NUMPAD, KC_D)
-#define KC_SPFN LT(_NAV,KC_EQL)
-#define KC_EMAUS LT(_MOUSE,KC_E)
-#define KC_ENAV LT(_NAV,KC_E)
-#define KC_INAV LT(_TEXTNAV,KC_I)
-#define KC_BSPSYM LT(_SYMBOLS,KC_BSPACE)
-#define KC_ENTSYM LT(_SYMBOLS,KC_ENTER)
-#define KC_CLNMAUS LT(_MOUSE,KC_SCOLON)
-
-#define KC_FUNC TT(_FUNCTION)
-
-//TAP DANCE
-#define KC_F6F7 TD(F6F7)
-#define KC_ALF4 TD(ALTF4)
-#define KC_TTT TD(TTT)
-#define KC_ENHM TD(HOME_END)
-#define KC_CLPS TD(CALC_PRINTSCREEN)
-
-
-#define KC_INCL M(0)
-#define KC_PULL M(1)
-#define KC_PUSH M(2)
-#define KC_SCAP M(3)
-#define KC_SCOF M(4)
-#define KC_CAD LALT(LCTL(KC_DEL))
-
-#define LONGPRESS_DELAY 150
-//#define LAYER_TOGGLE_DELAY 300
-
-// Fillers to make layering more clear
-#define KC_ KC_TRNS
-
-/* TODO:
- *
- * DONE: RESET and CAD into macro layer.
- * DONE: WINUP AND WINDOWN in NAV layer
- * DONE: Get rid of caps layer. not sure what it is even for.
- * DONE: LMEH
- * DONE: plus, divide, multiply on left hand for num layer
- * DONE: F1 - F12 on a layer toggle (not a temp toggle but a one shot or something)
- * DONE: Volume, page up and down for mouse layer.
- * DONE: Add full user files - without using anything.
- * DONE: Insert, ctrl delete
- * DONE: Home and End
- * DONE: Printscreen
-
- * Easier way to open new terminal (instead of alt + F2)
- * Intellij/text navigation layer (ctrl delete could be here).
- * Macro for "System.exit(0)" probably macro layer and "c"
- * Some sort of tap dance for comma, H, right pinky, and possibly other corners.
- * Something more with the right hand. not sure what.
- * Mouse: Left scroll, right scroll
- * Passwords and any other macros.
- * LED for control
- * All modifiers reset
- * Russain layer
- * Hebrew layer
- * Get rid of stupid git pull and push macros.
- *
-*/
-
-enum {
- TTT = 4,
- HOME_END,
- CALC_PRINTSCREEN
-};
-
-static xtap ttt_state = {
- .is_press_action = true,
- .state = 0
-};
-
-
-//Already exists in gordon.c, shouldn't need this anymore
-/*// To activate SINGLE_HOLD, you will need to hold for 200ms first.
-// This tap dance favors keys that are used frequently in typing like 'f'
-int cur_dance (qk_tap_dance_state_t *state) {
- if (state->count == 1) {
- if (state->interrupted) {
- return SINGLE_TAP;
- }
- else {
- if (!state->pressed) return SINGLE_TAP;
- else return SINGLE_HOLD;
- }
- }
- //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
- //with single tap.
- else if (state->count == 2) {
- if (state->interrupted) return DOUBLE_SINGLE_TAP;
- else if (state->pressed) return DOUBLE_HOLD;
- else return DOUBLE_TAP;
- }
- else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP;
- else if (state->count == 3) return TRIPLE_HOLD;
- else return 8; //magic number. At some point this method will expand to work for more presses
-}*/
-
-/* "Super tap toggle"
- * Basically, TT but for two or more layers for a single key.
- * This particular dance:
- * Single tap/hold - TT for Function layer
- * Double tap/hold - TT for Numpad layer
- * Triple tap/hold - TT for Mouse layer
- *
-*/
-void TTT_finished (qk_tap_dance_state_t *state, void *user_data) {
- ttt_state.state = cur_dance(state);
- switch (ttt_state.state) {
- case SINGLE_TAP: layer_invert(_FUNCTION); break;
- case SINGLE_HOLD: layer_on(_FUNCTION); break;
- case DOUBLE_TAP: layer_invert(_NUMPAD); break;
- case DOUBLE_HOLD: layer_on(_NUMPAD); break;
- case DOUBLE_SINGLE_TAP: layer_invert(_NUMPAD); break;
- case TRIPLE_TAP: layer_invert(_MOUSE); break;
- case TRIPLE_HOLD: layer_on(_MOUSE); break;
- }
-}
-
-void TTT_reset (qk_tap_dance_state_t *state, void *user_data) {
- switch (ttt_state.state) {
- case SINGLE_TAP: break;
- case SINGLE_HOLD: layer_off(_FUNCTION); break;
- case DOUBLE_TAP: break;
- case DOUBLE_HOLD: layer_off(_NUMPAD); break;
- case DOUBLE_SINGLE_TAP: break;
- case TRIPLE_TAP: break;
- case TRIPLE_HOLD: layer_off(_MOUSE); break;
- }
- ttt_state.state = 0;
-}
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , A , MEHS,DNUM,FCTL,GWIN,GRAVE, TILD, H ,JCTL, K ,MEHL,CLNMAUS,ENHM,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- MINUS,ZCTL,MEHX, C ,ALTV, B ,DELETE, INS ,ALTN, M ,COMM,DOT ,SLSH,UNDS,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSHIFT,BSPSYM, SPC ,ENTSYM
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_NUMPAD] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,MINS,PLUS,/**/,EQUAL, , , , , 4 , 5 , 6 ,PLUS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , 0
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_SYMBOLS] = LAYOUT_kc(
- //,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----.
- ,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/,
- //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
- ,EXLM,EXLM,LPRN,RPRN , , , , ,DQUO,EQUAL,QUOTE,RCBR, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,DOLLAR, PERC,LBRACKET,RBRACKET, , , ,PIPE,BSLASH,PLUS, , , ,
- //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----|
- UNDS,/**/, ,/**/
- // \-------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_FUNCTION] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_NAV] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,SNAPUP,PREVTAB, ,NEXTTAB,SNAPDOWN,, , ,LEFT,DOWN,RGHT, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- CDEL ,DEL, ,
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_TEXTNAV] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , , , , , , , , ,/**/, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
- [_MOUSE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , ,MS_UP, , , , , , , UP , , , ,/**/
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,MS_LEFT,MS_DOWN,MS_RIGHT, , , , ,LEFT,DOWN,RGHT,/**/, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,MS_BTN1 ,MS_BTN2 ,
- // \------------------+----+----+---/ \---+----+----+-------------------/
- ),
-
-
- [_MACROS] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- /**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- CAD ,SECRET_1, , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- SCAP, , , , , , , , , , , , ,SCAP,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,
- // \------------------+----+----+---/ \---+----+----+-------------------/
- )
-
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
- /* include some kind of library or header */
- case 0:
- if (record->event.pressed) {
- SEND_STRING("#include <>");
- return MACRO( T(LEFT), END);
- }
- break;
- case 1:
- if (record->event.pressed) {
- SEND_STRING("git pull");
- return MACRO( T(ENT), END );
- }
- break;
- case 2:
- if (record->event.pressed){
- SEND_STRING("git push");
- return MACRO( T(ENT), END );
- }
- break;
- case 3:
- if (record->event.pressed){
- // layer_on(_CAPS);
- // register_code(KC_CAPSLOCK);
- // unregister_code(KC_CAPSLOCK);
- }
- break;
- case 4:
- if (record->event.pressed){
- // layer_off(_CAPS);
- // register_code(KC_CAPSLOCK);
- // unregister_code(KC_CAPSLOCK);
- }
- break;
- }
- return MACRO_NONE;
-};
-
-
-void matrix_scan_user(void) {
- uint8_t layer = biton32(layer_state);
-
- switch (layer) {
- case _QWERTY:
- set_led_green;
- break;
- case _MOUSE:
- set_led_yellow;
- break;
- case _NUMPAD:
- set_led_blue;
- break;
- case _SYMBOLS:
- set_led_red;
- break;
- case _NAV:
- set_led_magenta;
- break;
- case _MACROS:
- set_led_green;
- _delay_ms(45);
- set_led_red;
- _delay_ms(45);
- break;
- case _FUNCTION:
- set_led_green;
- _delay_ms(45);
- set_led_blue;
- _delay_ms(45);
- break;
- default:
- set_led_green;
- break;
- }
-};
diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h
index 79ae9586db..9a05977153 100644
--- a/keyboards/claw44/rev1/rev1.h
+++ b/keyboards/claw44/rev1/rev1.h
@@ -18,16 +18,3 @@
{ R25, R24, R23, R22, R21, R20 }, \
{ KC_NO, KC_NO, R33, R32, R31, R30 } \
}
-
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, R30, R31, R32, R33 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \
- )
diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h
index b6598f0178..c108d4193b 100644
--- a/keyboards/comet46/comet46.h
+++ b/keyboards/comet46/comet46.h
@@ -6,20 +6,6 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
-#define LAYOUT_kc( \
- 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, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42,\
- k43, k44, k45, k46, k47, k48 \
-) \
-{ \
- { KC_##k13, KC_##k01, KC_##k26, KC_##k12, KC_##k00, KC_##k11, KC_##k25, KC_##k42, KC_##k10, KC_##k24}, \
- { KC_##k03, KC_##k28, KC_##k14, KC_##k02, KC_##k27, KC_##k41, KC_##k09, KC_##k23, KC_##k38, KC_##k08}, \
- { KC_##k31, KC_##k16, KC_##k04, KC_##k29, KC_##k15, KC_##k22, KC_##k37, KC_##k07, KC_##k21, KC_##k36}, \
- { KC_NO, KC_##k32, KC_##k17, KC_##k05, KC_##k43, KC_##k48, KC_##k06, KC_##k20, KC_##k35, KC_NO }, \
- { KC_NO, KC_##k45, KC_##k33, KC_##k18, KC_##k44, KC_##k47, KC_##k19, KC_##k34, KC_##k46, KC_NO }, \
-}
-
#define LAYOUT( \
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,\
diff --git a/keyboards/comet46/keymaps/satt/keymap.c b/keyboards/comet46/keymaps/satt/keymap.c
index eec40eff49..98c3c175be 100644
--- a/keyboards/comet46/keymaps/satt/keymap.c
+++ b/keyboards/comet46/keymaps/satt/keymap.c
@@ -75,94 +75,90 @@ enum custom_keycodes {
#define KC_CAD LCA(KC_DEL)
#define KC_RST RESET
-// Fillers to make layering more clear
-#define KC_ KC_TRNS
-#define KC_XXXX KC_NO
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL ,
+ KC_CAEC, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_DEL ,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- CSTB, A , S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC,
+ KC_CSTB, KC_A , KC_S , KC_D , KC_F , KC_G ,KC_LPRN, KC_RPRN, KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_BSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBRC, KC_RBRC, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_QUOT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- IMOF,LWR ,SPCT, ENSF,RSE ,IMON
+ KC_IMOF,KC_LWR ,KC_SPCT, KC_ENSF,KC_RSE ,KC_IMON
// +----+----+---/ \---+----+----+
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
+ _______,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- , F1 , F2 , F3 , F4 , F5 , F6 , GRV ,BSLS,MINS,EQL ,LBRC,RBRC, ,
+ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_GRV ,KC_BSLS,KC_MINS,KC_EQL ,KC_LBRC,KC_RBRC,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , F7 , F8 , F9 , F10, F11, F12, TILD,PIPE,UNDS,PLUS,LCBR,RCBR, ,
+ _______, KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11, KC_F12, KC_TILD,KC_PIPE,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , ,
+ _______,_______,_______, _______,_______,_______
// +----+----+---/ \---+----+----+
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- , , , , , , , XXXX,LEFT,DOWN, UP ,RGHT,END , ,
+ _______,_______,_______,_______,_______,_______,_______, XXXXXXX,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,KC_END ,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, ,
+ _______,_______,_______,_______,_______,_______,_______, KC_HOME,XXXXXXX,KC_PGDN,KC_PGUP,XXXXXXX,XXXXXXX,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , ,
+ _______,_______,_______, _______,_______,_______
// +----+----+---/ \---+----+----+
),
- [_PSEUDO_US] = LAYOUT_kc(
+ [_PSEUDO_US] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL ,
+ KC_CAEC, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_DEL ,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- CSTB, A , S , D , F , G ,JLPR, JRPR, H , J , K , L ,J2US,BSPC,
+ KC_CSTB, KC_A , KC_S , KC_D , KC_F , KC_G ,KC_JLPR, KC_JRPR, KC_H , KC_J , KC_K , KC_L ,KC_J2US,KC_BSPC,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,J2US, J2US, N , M ,COMM,DOT ,SLSH,J2US,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_J2US, KC_J2US, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_J2US,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- IMOF,P_LW,SPCT, ENSF,P_RS,IMON
+ KC_IMOF,KC_P_LW,KC_SPCT, KC_ENSF,KC_P_RS,KC_IMON
// +----+----+---/ \---+----+----+
),
- [_PSEUDO_US_LOWER] = LAYOUT_kc(
+ [_PSEUDO_US_LOWER] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- ,EXLM,JAT ,HASH,DLR ,PERC, JCIR,JAMP,JAST,JLPR,JRPR, ,
+ _______,KC_EXLM,KC_JAT ,KC_HASH,KC_DLR ,KC_PERC, KC_JCIR,KC_JAMP,KC_JAST,KC_JLPR,KC_JRPR,_______,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- , F1 , F2 , F3 , F4 , F5 , F6 , JGRV,JBSL,MINS,JEQL,JLBR,JRBR, ,
+ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_JGRV,KC_JBSL,KC_MINS,KC_JEQL,KC_JLBR,KC_JRBR,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , F7 , F8 , F9 , F10, F11, F12, JTIL,JPIP,JUND,JPLU,JLCB,JRCB, ,
+ _______, KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11, KC_F12, KC_JTIL,KC_JPIP,KC_JUND,KC_JPLU,KC_JLCB,KC_JRCB,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , ,
+ _______,_______,_______, _______,_______,_______
// +----+----+---/ \---+----+----+
),
- [_PSEUDO_US_RAISE] = LAYOUT_kc(
+ [_PSEUDO_US_RAISE] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- , , , , , ,JZHT, XXXX,LEFT,DOWN, UP ,RGHT,END , ,
+ _______,_______,_______,_______,_______,_______,KC_JZHT, XXXXXXX,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,KC_END ,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, ,
+ _______,_______,_______,_______,_______,_______,_______, KC_HOME,XXXXXXX,KC_PGDN,KC_PGUP,XXXXXXX,XXXXXXX,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , ,
+ _______,_______,_______, _______,_______,_______
// +----+----+---/ \---+----+----+
),
- [_ADJUST] = LAYOUT_kc(
+ [_ADJUST] = LAYOUT(
//,----+----+----+----+----+----+ +----+----+----+----+----+----.
- , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----|
- , , , , , ,CAD , QWRT, , , , , , ,
+ _______,_______,_______,_______,_______,_______,KC_CAD , KC_QWRT,_______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , ,RST , P_US, , , , , , ,
+ _______,_______,_______,_______,_______,_______,KC_RST , KC_P_US,_______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , ,
+ _______,_______,_______, _______,_______,_______
// +----+----+---/ \---+----+----+
)
diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h
index 1ff481097a..74aad77d0b 100755
--- a/keyboards/contra/contra.h
+++ b/keyboards/contra/contra.h
@@ -27,17 +27,4 @@
{ K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \
}
-#define LAYOUT_kc_ortho_4x12( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
- K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
-) \
- LAYOUT_ortho_4x12( \
- KC_##K000, KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \
- KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, KC_##K111, \
- KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208, KC_##K209, KC_##K210, KC_##K211, \
- KC_##K300, KC_##K301, KC_##K302, KC_##K303, KC_##K304, KC_##K305, KC_##K306, KC_##K307, KC_##K308, KC_##K309, KC_##K310, KC_##K311 \
- )
-
#endif
diff --git a/keyboards/crkbd/keymaps/like_jis/config.h b/keyboards/crkbd/keymaps/like_jis/config.h
deleted file mode 100644
index a061b4fb09..0000000000
--- a/keyboards/crkbd/keymaps/like_jis/config.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#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 PREVENT_STUCK_MODIFIERS
-#define TAPPING_FORCE_HOLD
-#define TAPPING_TERM 250
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 27
-#define RGBLIGHT_LIMIT_VAL 120
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
diff --git a/keyboards/crkbd/keymaps/like_jis/keymap.c b/keyboards/crkbd/keymaps/like_jis/keymap.c
deleted file mode 100644
index 41df6330f5..0000000000
--- a/keyboards/crkbd/keymaps/like_jis/keymap.c
+++ /dev/null
@@ -1,291 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "bootloader.h"
-#ifdef PROTOCOL_LUFA
- #include "lufa.h"
- #include "split_util.h"
-#endif
-#ifdef SSD1306OLED
- #include "ssd1306.h"
-#endif
-#include "oled_helper.h"
-
-extern keymap_config_t keymap_config;
-
-extern uint8_t is_master;
-
-// Each layer gets a name for readability, which is then used in the keymap matrix below.
-// The underscores don't mean anything - you can have a layer called STUFF or any other name.
-// Layer names don't all need to be of the same length, obviously, and you can also skip them
-// entirely and just use numbers.
-enum layer_number {
- _BASE = 0,
- _LOWER,
- _RAISE,
- _ADJUST,
-};
-
-enum custom_keycodes {
- LOWER = SAFE_RANGE,
- RAISE,
- ADJUST,
- KANJI,
- RGBRST
-};
-
-enum tapdances{
- TD_CODO = 0,
- // TD_MNUB,
-};
-
-// Layer Mode aliases
-#define KC_LOWER LOWER
-#define KC_RAISE RAISE
-
-#define KC______ KC_TRNS
-#define KC_XXXXX KC_NO
-#define KC_KANJI KANJI
-
-#define KC_RST RESET
-#define KC_LRST RGBRST
-#define KC_LTOG RGB_TOG
-#define KC_LHUI RGB_HUI
-#define KC_LHUD RGB_HUD
-#define KC_LSAI RGB_SAI
-#define KC_LSAD RGB_SAD
-#define KC_LVAI RGB_VAI
-#define KC_LVAD RGB_VAD
-#define KC_LMOD RGB_MOD
-#define KC_KNRM AG_NORM
-#define KC_KSWP AG_SWAP
-
-#define KC_TBSF LSFT_T(KC_TAB)
-// #define KC_SPSF LSFT_T(KC_SPC)
-#define KC_ALAP LALT_T(KC_APP)
-
-#define KC_CODO TD(TD_CODO)
-// #define KC_MNUB TD(TD_MNUB)
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
- // [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)),
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- TBSF, A, S, D, F, G, H, J, K, L, UP, ENT,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LCTRL, Z, X, C, V, B, N, M, CODO, LEFT, DOWN, RGHT,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LGUI, LOWER, BSPC, SPC, RAISE, ALAP \
- //`--------------------' `--------------------'
- ),
-
- [_LOWER] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- _____, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- _____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- _____, F11, F12, TAB, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- _____, _____, DEL, _____, _____, APP \
- //`--------------------' `--------------------'
- ),
-
- [_RAISE] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- _____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, PSLS,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, QUOT, 4, 5, 6, PPLS, PAST,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, PMNS,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- _____, _____, BSPC, _____, _____, LALT \
- //`--------------------' `--------------------'
- ),
-
- [_ADJUST] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- _____, RST, LRST, KNRM, KSWP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
- //|------+-------+------+------+------+-----| |------+------+------+------+------+------|
- _____, LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, PGUP, XXXXX,\
- //|------+-------+------+------+------+-----| |------+------+------+------+------+------|
- _____, LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, HOME, PGDN, END,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- _____, _____, XXXXX, _____, _____, XXXXX \
- //`--------------------' `--------------------'
- )
-};
-
-#define L_BASE _BASE
-#define L_LOWER (1<<_LOWER)
-#define L_RAISE (1<<_RAISE)
-#define L_ADJUST (1<<_ADJUST)
-#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
-
-#ifdef SSD1306OLED
-typedef struct {
- uint8_t state;
- char name[8];
-}LAYER_DISPLAY_NAME;
-
-#define LAYER_DISPLAY_MAX 5
-const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
- {L_BASE, "Base"},
- {L_BASE + 1, "Base"},
- {L_LOWER, "Lower"},
- {L_RAISE, "Raise"},
- {L_ADJUST_TRI, "Adjust"}
-};
-
-static inline const char* get_leyer_status(void) {
-
- for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
- if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
-
- return layer_display_name[i].name;
- } else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
-
- return layer_display_name[i].name;
- }
- }
-
- return "?";
-}
-
-static char layer_status_buf[24] = "Layer state ready.\n";
-static inline void update_keymap_status(void) {
-
- snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
- keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
-}
-
-static inline void render_keymap_status(struct CharacterMatrix *matrix) {
-
- matrix_write(matrix, layer_status_buf);
-}
-
-#define UPDATE_KEYMAP_STATUS() update_keymap_status()
-#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
-
-#else
-
-#define UPDATE_KEYMAP_STATUS()
-#define RENDER_KEYMAP_STATUS(a)
-
-#endif
-
-static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
-
- pressed ? layer_on(layer1) : layer_off(layer1);
- IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
-}
-
-int RGB_current_mode;
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-
- UPDATE_KEY_STATUS(keycode, record);
-
- bool result = false;
- switch (keycode) {
- case LOWER:
- update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
- break;
- case RAISE:
- update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
- break;
- case KANJI:
- if (record->event.pressed) {
- if (keymap_config.swap_lalt_lgui == false) {
- register_code(KC_LANG2);
- } else {
- SEND_STRING(SS_LALT("`"));
- }
- } else {
- unregister_code(KC_LANG2);
- }
- break;
- #ifdef RGBLIGHT_ENABLE
- case RGB_MOD:
- if (record->event.pressed) {
- rgblight_mode(RGB_current_mode);
- rgblight_step();
- RGB_current_mode = rgblight_config.mode;
- }
- break;
- case RGBRST:
- if (record->event.pressed) {
- eeconfig_update_rgblight_default();
- rgblight_enable();
- RGB_current_mode = rgblight_config.mode;
- }
- break;
- #endif
- default:
- result = true;
- break;
- }
-
- UPDATE_KEYMAP_STATUS();
- return result;
-}
-
-void matrix_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- RGB_current_mode = rgblight_config.mode;
- UPDATE_KEYMAP_STATUS();
- #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
-
-void matrix_scan_user(void) {
- iota_gfx_task(); // this is what updates the display continuously
-}
-
-static inline 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;
- }
-}
-
-static inline void render_status(struct CharacterMatrix *matrix) {
-
- UPDATE_LED_STATUS();
- RENDER_LED_STATUS(matrix);
- RENDER_KEYMAP_STATUS(matrix);
- UPDATE_LOCK_STATUS();
- RENDER_LOCK_STATUS(matrix);
- RENDER_KEY_STATUS(matrix);
-}
-
-void iota_gfx_task_user(void) {
- struct CharacterMatrix matrix;
-
- #if DEBUG_TO_SCREEN
- if (debug_enable) {
- return;
- }
- #endif
-
- matrix_clear(&matrix);
- if (is_master) {
- render_status(&matrix);
- } else {
- RENDER_LOGO(&matrix);
- }
-
- matrix_update(&display, &matrix);
-}
-
-#endif
diff --git a/keyboards/crkbd/keymaps/like_jis/oled_helper.c b/keyboards/crkbd/keymaps/like_jis/oled_helper.c
deleted file mode 100644
index 500d3c0dc1..0000000000
--- a/keyboards/crkbd/keymaps/like_jis/oled_helper.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifdef SSD1306OLED
-#include QMK_KEYBOARD_H
-#include "ssd1306.h"
-
-void render_logo(struct CharacterMatrix *matrix) {
-
- const char logo_buf[]={
- 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
- 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
- 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
- 0};
-
- matrix_write(matrix, logo_buf);
-}
-
-static char keylog_buf[24] = "Key state ready.";
-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 update_key_status(uint16_t keycode, keyrecord_t *record) {
-
- if (!record->event.pressed) return;
-
- char name = (keycode < 60) ? code_to_name[keycode] : ' ';
- snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c",
- record->event.key.row, record->event.key.col,
- (uint16_t)keycode, name);
-}
-
-void render_key_status(struct CharacterMatrix *matrix) {
-
- matrix_write(matrix, keylog_buf);
-}
-
-static char lock_buf[24] = "Lock state ready.\n";
-void update_lock_status(void) {
-
- uint8_t leds = host_keyboard_leds();
- char *num_lock = (leds & (1<
-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 .
-*/
-
-#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 100
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 27
-#define RGBLIGHT_LIMIT_VAL 120
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
-#define BACKLIGHT_LEVELS 10
-
-#undef PRODUCT
-#define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb"
-
-#define NO_ACTION_MACRO
-#define NO_ACTION_FUNCTION
diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c
deleted file mode 100644
index 2c33d8b8c5..0000000000
--- a/keyboards/crkbd/keymaps/omgvee/keymap.c
+++ /dev/null
@@ -1,242 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "bootloader.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
-// entirely and just use numbers.
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 3
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
- BACKLIT,
- RGBRST
-};
-
-enum macro_keycodes {
- KC_SAMPLEMACRO,
-};
-
-#define KC______ KC_TRNS
-#define KC_XXXXX KC_NO
-#define KC_LOWER LOWER
-#define KC_RAISE RAISE
-#define KC_RST RESET
-#define KC_ERST EEPROM_RESET
-#define KC_LRST RGBRST
-#define KC_LTOG RGB_TOG
-#define KC_LHUI RGB_HUI
-#define KC_LHUD RGB_HUD
-#define KC_LSAI RGB_SAI
-#define KC_LSAD RGB_SAD
-#define KC_LVAI RGB_VAI
-#define KC_LVAD RGB_VAD
-#define KC_LMOD RGB_MOD
-#define KC_SFCPS SFT_T(KC_CAPS)
-#define KC_CTLTB CTL_T(KC_TAB)
-#define KC_GUIEI GUI_T(KC_LANG2)
-#define KC_ALTKN ALT_T(KC_LANG1)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- SFCPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_LOWER] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- SFCPS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, ENT,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, RSFT,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_RAISE] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- SFCPS, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, BSLS,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, XXXXX, VOLD, VOLU, MUTE, MPLY, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_ADJUST] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, INS,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \
- //`--------------------' `--------------------'
- )
-};
-
-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 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
-
-// When add source files to SRC in rules.mk, you can use functions.
-const char *read_layer_state(void);
-const char *read_logo(void);
-void set_keylog(uint16_t keycode, keyrecord_t *record);
-const char *read_keylog(void);
-const char *read_keylogs(void);
-
-// const char *read_mode_icon(bool swap);
-// const char *read_host_led_state(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) {
- // 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_ln(matrix, read_layer_state());
- matrix_write_ln(matrix, read_keylog());
- matrix_write_ln(matrix, read_keylogs());
- //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;
- }
-}
-
-void iota_gfx_task_user(void) {
- struct CharacterMatrix matrix;
- matrix_clear(&matrix);
- matrix_render_user(&matrix);
- matrix_update(&display, &matrix);
-}
-#endif//SSD1306OLED
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
-#ifdef SSD1306OLED
- set_keylog(keycode, record);
-#endif
- // set_timelog();
- }
-
- switch (keycode) {
- 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;
-}
diff --git a/keyboards/crkbd/keymaps/omgvee/readme.md b/keyboards/crkbd/keymaps/omgvee/readme.md
deleted file mode 100644
index bc316c2a35..0000000000
--- a/keyboards/crkbd/keymaps/omgvee/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Reade.md for what I want from my HeliDox(CRKBD) layout
-======================================================
-
-
-
-
-- media keys and media controls
-- in-switch LED intensity controls (+/-)
-- underglow RGB hue/color controls
-- underglow RGB intensity controls
-- familiar key arrangement with Enter and symbols on the usual keys (to the right hand side)
-- navigation keys should be the vim ones really;
-- arrow keys on one layer(most likely on the ADJUST one)
-
-See keymap.c for layouts
-
-
-P.S> this lil' keeb is so addictive I have no words, really...
diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk
deleted file mode 100644
index 88e43aa99f..0000000000
--- a/keyboards/crkbd/keymaps/omgvee/rules.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-
-# 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
-#
-EXTRAFLAGS += -flto
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-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 = yes # 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
-
-# If you want to change the display of OLED, you need to change here
-SRC += ./lib/glcdfont.c \
- ./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 \
diff --git a/keyboards/crkbd/keymaps/rs/keymap.c b/keyboards/crkbd/keymaps/rs/keymap.c
index 135ccb076c..7e2a2e066e 100644
--- a/keyboards/crkbd/keymaps/rs/keymap.c
+++ b/keyboards/crkbd/keymaps/rs/keymap.c
@@ -2,37 +2,37 @@
#include "rs.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_EQL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_ESCC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENTS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LGUI,SPC , BSPC,CODE,FN
+ KC_LALT,KC_LGUI,KC_SPC , KC_BSPC,KC_CODE,KC_FN
// `----+----+----' `+---+----+----'c
),
- [_CODE] = LAYOUT_kc(
+ [_CODE] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_LPLT,KC_ASTR,KC_RPGT,KC_NEQL,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_MINS,KC_LBRC, KC_UP ,KC_RBRC,_______,KC_BSLS,
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
- , 6 , 7 , 8 , 9 , 0 , AMPR,LEFT,DOWN,RGHT, ,PIPE,
+ _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_AMPR,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_PIPE,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DOT , , ,
+ _______,_______,KC_DOT , _______,_______,_______
// `----+----+----' `----+----+----'
),
- [_FN] = LAYOUT_kc(
+ [_FN] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
+ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , ,
+ KC_LTOG,KC_LHUI,KC_LSAI,KC_LVAI,KC_LRST,KC_BRMU, KC_VOLU,_______,KC_PGUP,_______,_______,_______,
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
- LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , ,
+ KC_LMOD,KC_LHUD,KC_LSAD,KC_LVAD,KC_RST ,KC_BRMD, KC_VOLD,KC_CTRA,KC_PGDN,KC_CTRE,_______,_______,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , MUTE, ,
+ _______,_______,_______, KC_MUTE,_______,_______
// `----+----+----' `----+----+----'
),
};
diff --git a/keyboards/crkbd/keymaps/thefrey/README.md b/keyboards/crkbd/keymaps/thefrey/README.md
deleted file mode 100644
index 69b20cfcd6..0000000000
--- a/keyboards/crkbd/keymaps/thefrey/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# Keyboard layout by the-frey
-
-This is a layout that allows access to all the paren keys easily, has a tab on the lower layer (for SUPER-TAB app switching) and some utility features like PGUP/PGDOWN and HOME/END.
-
-In addition, the arrows are on the lower layer and are bound to the vim keys (h,j,k,l). I've found this a productive layout for programming in emacs and hopefully you will too.
-
-The layout image above shows the keymap, with each key marked with all three layers:
-
-- The top indicates the raise layer
-- The middle indicates the default layer
-- The bottom indicates the lower layer
-
-All the keys respond as you'd expect to the 'shift' key - i.e. on a UK/GB keyboard, `/` becomes `?` and so on.
-
diff --git a/keyboards/crkbd/keymaps/thefrey/config.h b/keyboards/crkbd/keymaps/thefrey/config.h
deleted file mode 100644
index cee901fc81..0000000000
--- a/keyboards/crkbd/keymaps/thefrey/config.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#pragma once
-
-//#define USE_MATRIX_I2C
-#define FORCE_NKRO
-
-/* 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 100
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 27
-#define RGBLIGHT_LIMIT_VAL 120
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
diff --git a/keyboards/crkbd/keymaps/thefrey/keymap.c b/keyboards/crkbd/keymaps/thefrey/keymap.c
deleted file mode 100644
index 9a142a924a..0000000000
--- a/keyboards/crkbd/keymaps/thefrey/keymap.c
+++ /dev/null
@@ -1,243 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "bootloader.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
-// entirely and just use numbers.
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 3
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
- BACKLIT,
- RGBRST
-};
-
-enum macro_keycodes {
- KC_SAMPLEMACRO,
-};
-
-#define KC______ KC_TRNS
-#define KC_XXXXX KC_NO
-#define KC_LOWER LOWER
-#define KC_RAISE RAISE
-#define KC_RST RESET
-#define KC_LRST RGBRST
-#define KC_LTOG RGB_TOG
-#define KC_LHUI RGB_HUI
-#define KC_LHUD RGB_HUD
-#define KC_LSAI RGB_SAI
-#define KC_LSAD RGB_SAD
-#define KC_LVAI RGB_VAI
-#define KC_LVAD RGB_VAD
-#define KC_LMOD RGB_MOD
-#define KC_CTLTB CTL_T(KC_TAB)
-#define KC_GUIEI GUI_T(KC_LANG2)
-#define KC_ALTKN ALT_T(KC_LANG1)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_LOWER] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, MUTE, VOLD, VOLU, PGUP, PGDN, LEFT, DOWN, UP, RIGHT, HOME, END,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LSFT, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_RAISE] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \
- //`--------------------' `--------------------'
- ),
-
- [_ADJUST] = LAYOUT_kc( \
- //,-----------------------------------------. ,-----------------------------------------.
- RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
- //|------+------+------+------+------+------| |------+------+------+------+------+------|
- LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
- //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \
- //`--------------------' `--------------------'
- )
-};
-
-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 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
-
-// When add source files to SRC in rules.mk, you can use functions.
-const char *read_layer_state(void);
-const char *read_logo(void);
-void set_keylog(uint16_t keycode, keyrecord_t *record);
-const char *read_keylog(void);
-const char *read_keylogs(void);
-
-// const char *read_mode_icon(bool swap);
-// const char *read_host_led_state(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) {
- // 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());
- }
-}
-
-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
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
-#ifdef SSD1306OLED
- 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;
-}
diff --git a/keyboards/crkbd/keymaps/thefrey/rules.mk b/keyboards/crkbd/keymaps/thefrey/rules.mk
deleted file mode 100644
index 16deaf45d1..0000000000
--- a/keyboards/crkbd/keymaps/thefrey/rules.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-
-# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
-# the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = no # Mouse keys(+4700)
-EXTRAKEY_ENABLE = no # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = 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
-
-# If you want to change the display of OLED, you need to change here
-SRC += ./lib/glcdfont.c \
- ./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 \
diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c
index c67958aa14..0011b1143a 100755
--- a/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c
+++ b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c
@@ -62,51 +62,51 @@ enum custom_keycodes {
#define KC_ALTDL ALT_T(KC_DEL)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
+ KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- ALTSP, LOWER, GUIEN, SFTJP, RAISE, ALTDL
+ KC_ALTSP, KC_LOWER, KC_GUIEN, KC_SFTJP, KC_RAISE, KC_ALTDL
//`--------------------' `--------------------'
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, ,
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- , HOME, END, PGDN, PGUP, F11, LEFT, DOWN, UP, RGHT, F12, PIPE,
+ _______, KC_HOME, KC_END, KC_PGDN, KC_PGUP, KC_F11, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F12, KC_PIPE,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- , F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, ,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- , , , , ,
+ _______, _______, _______, _______, _______, _______
//`--------------------' `--------------------'
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- , EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, ,
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- , XXXXX, XXXXX, XXXXX, XXXXX, PSCR, GRV, MINS, PLUS, LCBR, RCBR, BSLS,
+ _______, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_PSCR, KC_GRV, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- , XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, TILD, UNDS, EQL, LBRC, RBRC, ,
+ _______, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_TILD, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, _______,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- , , , , ,
+ _______, _______, _______, _______, _______, _______
//`--------------------' `--------------------'
),
- [_ADJUST] = LAYOUT_kc(
+ [_ADJUST] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_RST, KC_LRST, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LTOG, KC_LHUI, KC_LSAI, KC_LVAI, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- GUIEI, LOWER, SPC, ENT, RAISE, ALTKN
+ KC_GUIEI, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_ALTKN
//`--------------------' `--------------------'
)
};
diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c
index 48f60419fb..0bdc9d2658 100644
--- a/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c
+++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c
@@ -31,8 +31,6 @@ enum custom_keycodes {
SCRL
};
-#define KC______ KC_TRNS
-#define KC_XXXXX KC_NO
#define KC_LOWER LOWER
#define KC_RAISE RAISE
#define KC_RST RESET
@@ -57,51 +55,51 @@ enum custom_keycodes {
#define KC_SCRL SCRL
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- TAB, CTLA, S, D, F, G, H, J, K, L, CTLSC, QUOT,
+ KC_TAB, KC_CTLA, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTLSC, KC_QUOT,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- GRAVE, SFTZ, WINX, C, V, B, N, M, COMM, WINDO, SFTSL,BSLASH,
+ KC_GRAVE, KC_SFTZ, KC_WINX, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_WINDO, KC_SFTSL,KC_BSLASH,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, XXXXX, PGDN, PSCR, PGUP, LBRC, RBRC, 7, 8, 9, XXXXX, XXXXX,
+ KC_ESC, XXXXXXX, KC_PGDN, KC_PSCR, KC_PGUP, KC_LBRC, KC_RBRC, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LCTRL, PLUS, MINS, EQL, LPRN, RPRN, 4, 5, 6, RCTRL, XXXXX,
+ XXXXXXX, KC_LCTRL, KC_PLUS, KC_MINS, KC_EQL, KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_RCTRL, XXXXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LSFT, HOME, XXXXX, END, LCBR, RCBR, 1, 2, 3, RSFT, XXXXX,
+ XXXXXXX, KC_LSFT, KC_HOME, XXXXXXX, KC_END, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_RSFT, XXXXXXX,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, 0
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_0
//`--------------------' `--------------------'
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, XXXXX, F7, F8, F9, F10, BTN2, BTN2, MNXT, MPRV, MPLY, MSTP,
+ KC_ESC, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_BTN2, KC_BTN2, KC_MNXT, KC_MPRV, KC_MPLY, KC_MSTP,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LCTRL, F4, F5, F6, F11, LEFT, DOWN, UP, RIGHT, RCTRL, XXXXX,
+ XXXXXXX, KC_LCTRL, KC_F4, KC_F5, KC_F6, KC_F11, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RCTRL, XXXXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LSFT, F1, F2, F3, F12, XXXXX, XXXXX, VOLU, VOLD, MUTE, RSFT,
+ XXXXXXX, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F12, XXXXXXX, XXXXXXX, KC_VOLU, KC_VOLD, KC_MUTE, KC_RSFT,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
),
- [_ADJUST] = LAYOUT_kc(
+ [_ADJUST] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RST,
+ KC_RST, KC_LRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RST,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LTOG, KC_LHUI, KC_LSAI, KC_LVAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
)
};
diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
index 8749f7a686..dc176a9fdf 100644
--- a/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
+++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c
@@ -60,51 +60,51 @@ enum custom_keycodes {
#define KC_SCRL SCRL
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- TAB, CTLA, S, D, F, G, H, J, K, L, CTLSC, QUOT,
+ KC_TAB, KC_CTLA, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTLSC, KC_QUOT,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- GRAVE, SFTZ, WINX, C, V, B, N, M, COMM, WINDO, SFTSL,BSLASH,
+ KC_GRAVE, KC_SFTZ, KC_WINX, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_WINDO, KC_SFTSL,KC_BSLASH,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, XXXXX, PGDN, PSCR, PGUP, LBRC, RBRC, 7, 8, 9, XXXXX, XXXXX,
+ KC_ESC, KC_XXXXX, KC_PGDN, KC_PSCR, KC_PGUP, KC_LBRC, KC_RBRC, KC_7, KC_8, KC_9, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LCTRL, PLUS, MINS, EQL, LPRN, RPRN, 4, 5, 6, RCTRL, XXXXX,
+ KC_XXXXX, KC_LCTRL, KC_PLUS, KC_MINS, KC_EQL, KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_RCTRL, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LSFT, HOME, XXXXX, END, LCBR, RCBR, 1, 2, 3, RSFT, XXXXX,
+ KC_XXXXX, KC_LSFT, KC_HOME, KC_XXXXX, KC_END, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_RSFT, KC_XXXXX,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, 0
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_0
//`--------------------' `--------------------'
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- ESC, XXXXX, F7, F8, F9, F10, BTN2, BTN2, MNXT, MPRV, MPLY, MSTP,
+ KC_ESC, KC_XXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_BTN2, KC_BTN2, KC_MNXT, KC_MPRV, KC_MPLY, KC_MSTP,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LCTRL, F4, F5, F6, F11, LEFT, DOWN, UP, RIGHT, RCTRL, XXXXX,
+ KC_XXXXX, KC_LCTRL, KC_F4, KC_F5, KC_F6, KC_F11, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RCTRL, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- XXXXX, LSFT, F1, F2, F3, F12, XXXXX, XXXXX, VOLU, VOLD, MUTE, RSFT,
+ KC_XXXXX, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F12, KC_XXXXX, KC_XXXXX, KC_VOLU, KC_VOLD, KC_MUTE, KC_RSFT,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
),
- [_ADJUST] = LAYOUT_kc(
+ [_ADJUST] = LAYOUT(
//,-----------------------------------------. ,-----------------------------------------.
- RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RST,
+ KC_RST, KC_LRST, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_RST,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LTOG, KC_LHUI, KC_LSAI, KC_LVAI, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,
+ KC_LMOD, KC_LHUD, KC_LSAD, KC_LVAD, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LOWER, SPC, SCRL, MBTN1, ENT, RAISE
+ KC_LOWER, KC_SPC, KC_SCRL, KC_MBTN1, KC_ENT, KC_RAISE
//`--------------------' `--------------------'
)
};
diff --git a/keyboards/crkbd/keymaps/vxid/keymap.c b/keyboards/crkbd/keymaps/vxid/keymap.c
index e1c73caeb7..2b600cdd4a 100644
--- a/keyboards/crkbd/keymaps/vxid/keymap.c
+++ b/keyboards/crkbd/keymaps/vxid/keymap.c
@@ -25,39 +25,39 @@ enum custom_keycodes {
#define KC_RAISE RAISE
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc( \
+ [_QWERTY] = LAYOUT( \
//,-----------------------------------------. ,-----------------------------------------.
- Q, W, E, R, T, ESC, DEL, Y, U, I, O, P,\
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- A, S, D, F, G, SPC, BSPC, H, J, K, L, SCLN,\
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_SPC, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN,\
//|------+------+------+------+------+------| |------+------+------+------+------+------|
- Z, X, C, V, B, TAB, ENT, N, M, COMM, DOT, SLSH,\
+ KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TAB, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- LALT, LGUI, LCTL, LSFT, RAISE, LOWER \
+ KC_LALT, KC_LGUI, KC_LCTL, KC_LSFT, KC_RAISE, KC_LOWER \
//`--------------------' `--------------------'
),
- [_LOWER] = LAYOUT_kc( \
+ [_LOWER] = LAYOUT( \
//,-----------------------------------------. ,------------------------------------------.
- 1, 2, 3, 4, 5, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,\
//|------+------+------+------+------+------| |-------+------+------+------+------+------|
- 6, 7, 8, 9, 0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ KC_6, KC_7, KC_8, KC_9, KC_0, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,\
//|------+------+------+------+------+------| |-------+------+------+------+------+------|
- EQL, PLUS, MINS, SLSH, ASTR, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ KC_EQL, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,\
//|------+------+------+------+------+------+------| |------+-------+------+------+------+------+------|
- LALT, LGUI, LCTL, LSFT, RAISE, LOWER \
+ KC_LALT, KC_LGUI, KC_LCTL, KC_LSFT, KC_RAISE, KC_LOWER \
//`--------------------' `--------------------'
),
- [_RAISE] = LAYOUT_kc( \
+ [_RAISE] = LAYOUT( \
//,-----------------------------------------. ,------------------------------------------.
- EXLM, AT, HASH, DLR, PERC, LPRN, RPRN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LPRN, KC_RPRN, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,\
//|------+------+------+------+------+------| |-------+------+------+------+------+------|
- CIRC, AMPR, ASTR, QUOT, DQUO, LCBR, RCBR, LEFT, DOWN, UP, RIGHT, XXXXX,\
+ KC_CIRC, KC_AMPR, KC_ASTR, KC_QUOT, KC_DQUO, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_XXXXX,\
//|------+------+------+------+------+------| |-------+------+------+------+------+------|
- BSLS, TILD, GRV, UNDS, PIPE, LBRC, RBRC, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
+ KC_BSLS, KC_TILD, KC_GRV, KC_UNDS, KC_PIPE, KC_LBRC, KC_RBRC, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX, KC_XXXXX,\
//|------+------+------+------+------+------+------| |------+-------+------+------+------+------+------|
- LALT, LGUI, LCTL, LSFT, RAISE, LOWER \
+ KC_LALT, KC_LGUI, KC_LCTL, KC_LSFT, KC_RAISE, KC_LOWER \
//`--------------------' `--------------------'
)
};
diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h
index c805efccce..5446583b13 100644
--- a/keyboards/crkbd/rev1/rev1.h
+++ b/keyboards/crkbd/rev1/rev1.h
@@ -70,18 +70,4 @@ along with this program. If not, see .
{ KC_NO, KC_NO, KC_NO, R32, R31, R30 } \
}
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, R30, R31, R32 \
- ) \
- LAYOUT_split_3x6_3( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \
- )
-// clang-format on
-
#define LAYOUT LAYOUT_split_3x6_3
diff --git a/keyboards/dm9records/plaid/plaid.h b/keyboards/dm9records/plaid/plaid.h
index d791cf7c00..0b1c837619 100644
--- a/keyboards/dm9records/plaid/plaid.h
+++ b/keyboards/dm9records/plaid/plaid.h
@@ -44,25 +44,9 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define KC_KEYMAP( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
- ) \
- LAYOUT_plaid_grid( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
- )
-
-#define KEYMAP LAYOUT_plaid_grid
+#define LAYOUT LAYOUT_plaid_grid
#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid
#define LAYOUT_planck_mit LAYOUT_plaid_mit
-#define LAYOUT_kc_ortho_4x12 KC_KEYMAP
-#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
#define LED_RED C5
#define LED_GREEN C4
diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h
index 8c57244fba..211e41fe8f 100644
--- a/keyboards/eco/eco.h
+++ b/keyboards/eco/eco.h
@@ -10,18 +10,4 @@
#include "quantum.h"
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \
- k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \
- k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \
- k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \
- ) \
- { \
- { KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k010, KC_##k011, KC_##k012, KC_##k013, KC_##k014 }, \
- { KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k110, KC_##k111, KC_##k112, KC_##k113, KC_##k114 }, \
- { KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k210, KC_##k211, KC_##k212, KC_##k213, KC_##k214 }, \
- { KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k310, KC_##k311, KC_##k312, KC_##k313, KC_##k314 } \
- }
-
#endif
diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c
deleted file mode 100644
index 3f21eacd3b..0000000000
--- a/keyboards/eco/keymaps/hexwire/keymap.c
+++ /dev/null
@@ -1,116 +0,0 @@
-
-// Default ECO Layout
-// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039
-
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_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 _LOWER 1
-#define _RAISE 2
-#define _FN3 3
-
-enum eco_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
-};
-
-// Fillers to make layering more clear
-#define KC_ KC_TRNS
-
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_LOWR MO(_LOWER)
-#define KC_RASE MO(_RAISE)
-#define KC_ENTS MT(MOD_LSFT, KC_ENT)
-#define KC_ESCC MT(MOD_LCTL, KC_ESC)
-#define KC_GRVF LT(_FN3, KC_GRV)
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
- TAB , Q , W , E , R , T ,LPRN,RPRN, Y , U , I , O , P ,MINS,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- ESCC, A , S , D , F , G ,LBRC,RBRC, H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,LCBR,RCBR, N , M ,COMM,DOT ,SLSH,ENTS,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- GRVF,LCTL,LALT,LGUI,LOWR,SPC ,SPC ,BSPC,BSPC,RASE,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
- ),
-
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
- , 1 , 2 , 3 , 4 , 5 ,LPRN,RPRN, 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC,LBRC,RBRC,RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- ,CPYP, , ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS, ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- , , , , , , ,DEL ,DEL , , P0 ,PDOT, ,
- //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
- ,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , ,EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , , ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- RST ,DBUG,RHUD,RSAD,RVAD, , , , , , , , , ,
- //|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
- ),
-
-};
-
-void persistant_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- persistant_default_layer_set(1UL<<_QWERTY);
- }
- return false;
- break;
- }
- return true;
-}
-
diff --git a/keyboards/eco/keymaps/hexwire/rules.mk b/keyboards/eco/keymaps/hexwire/rules.mk
deleted file mode 100644
index 83d1175db9..0000000000
--- a/keyboards/eco/keymaps/hexwire/rules.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
-# the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-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 = no # Enable WS2812 RGB underlight.
-
-# 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/ergo42/ergo42.h b/keyboards/ergo42/ergo42.h
index ced1709d3e..656b211308 100644
--- a/keyboards/ergo42/ergo42.h
+++ b/keyboards/ergo42/ergo42.h
@@ -5,19 +5,3 @@
#ifdef KEYBOARD_ergo42_rev1
#include "rev1.h"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc_ortho_4x14( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36 \
- )
-
-#define LAYOUT_kc LAYOUT_kc_ortho_4x14
diff --git a/keyboards/ergodash/ergodash.h b/keyboards/ergodash/ergodash.h
index 83c7859307..5fba70e75d 100644
--- a/keyboards/ergodash/ergodash.h
+++ b/keyboards/ergodash/ergodash.h
@@ -1,44 +1,11 @@
-#ifndef ERGODASH_H
-#define ERGODASH_H
+#pragma once
#include "quantum.h"
#ifdef KEYBOARD_ergodash_rev1
#include "rev1.h"
-
- // Used to create a keymap using only KC_ prefixed keys
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
- L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
- )
#endif // #ifdef KEYBOARD_ergodash_rev1
#ifdef KEYBOARD_ergodash_mini
#include "mini.h"
-
- // Used to create a keymap using only KC_ prefixed keys
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36 \
- )
-#endif // #ifdef KEYBOARD_ergodash_mini
-
#endif
diff --git a/keyboards/ergotravel/ergotravel.h b/keyboards/ergotravel/ergotravel.h
index 7201db788d..314775495b 100644
--- a/keyboards/ergotravel/ergotravel.h
+++ b/keyboards/ergotravel/ergotravel.h
@@ -5,18 +5,3 @@
#endif
#include "quantum.h"
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
diff --git a/keyboards/ergotravel/keymaps/ckofy/config.h b/keyboards/ergotravel/keymaps/ckofy/config.h
deleted file mode 100644
index 7c99c093c9..0000000000
--- a/keyboards/ergotravel/keymaps/ckofy/config.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2017 Pierre Constantineau
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-//#define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-
-//#define MASTER_LEFT
-#define MASTER_RIGHT
-//#define EE_HANDS
-
-#define TAPPING_TOGGLE 2
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c
deleted file mode 100644
index b9a2c140d8..0000000000
--- a/keyboards/ergotravel/keymaps/ckofy/keymap.c
+++ /dev/null
@@ -1,179 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _COLEMAK 0
-#define _QWERTY 1
-#define _NUMPAD 2
-#define _LOWER 3
-#define _RAISE 4
-#define _ADJUST 16
-
-enum custom_keycodes {
- COLEMAK = SAFE_RANGE,
- QWERTY,
- NUMPAD,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-
-#define KC_ KC_TRNS
-#define KC_XXXX KC_NO
-
-#define KC_CMK COLEMAK
-#define KC_QWE QWERTY
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_QRAS QRAISE
-#define KC_ADJT ADJUST
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-//#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del
-#define KC_CPY LCTL(KC_C)
-#define KC_PST LCTL(KC_V)
-#define KC_SELA LCTL(KC_A)
-#define KC_UDO LCTL(KC_Z)
-#define KC_CUT LCTL(KC_X)
-#define KC_SVE LCTL(KC_S)
-#define KC_OSH OSM(MOD_LSFT)
-#define KC_OCTL OSM(MOD_LCTL)
-#define KC_NUMP TT(_NUMPAD)
-#define KC_SHESC MT(MOD_LSFT,KC_ESC)
-#define KC_SHENT MT(MOD_RSFT,KC_ENT)
-//#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in KC_keymaps
-//#define KC_RST RESET
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-// Colemak Mod-DH is used. https://colemakmods.github.io/mod-dh/
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- TAB , Q , W , F , P , B ,LPRN, RPRN, J , L , U , Y ,SCLN,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- BSPC, A , R , S , T , G ,EQL , MINS, K , N , E , I , O ,QUOT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- SHESC, Z , X , C , D , V ,NUMP, ENT, M , H ,COMM,DOT ,SLSH,SHENT,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- OCTL,LALT,LGUI,DEL ,LOWR, SPC, OSH, RASE,LEFT,RIGHT,RALT,RCTL
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , A , S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- LCTL,LGUI,LALT,DEL , , SPC, SPC , ,LEFT,DOWN, UP ,RIGHT
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_NUMPAD] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , , , , , , ,ASTR, P7 , P8 , P9 ,SLSH, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , ,PIPE, P4 , P5 , P6 ,MINS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , ,COMM, P1 , P2 , P3 ,PLUS, ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , P0 ,NLCK, , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ,XXXX,XXXX,XXXX,XXXX,CAPS, , ,PGUP,HOME, UP ,END ,DEL , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,SELA,LALT,LSFT,LCTL,SVE , , ,PGDN,LEFT,DOWN,RGHT,BSPC,INS ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,UDO ,CUT ,CPY ,PST ,XXXX, , ,XXXX,XXXX,COMM,DOT ,SLSH, ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ,AMPR,PERC,HASH,EXLM,LPRN, , ,ASTR,RPRN, AT ,DLR ,CIRC,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , 7 , 5 , 3 , 1 , 9 ,LBRC, RBRC, 8 , 0 , 2 , 4 , 6 ,BSLS,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , GRV,TILD,XXXX,EQL ,PLUS, , ,UNDS,MINS,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , CMK,QWE , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , ,VOLD,VOLU,MUTE
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- )
-
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case COLEMAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_COLEMAK);
-
- }
- return false;
- break;
- 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(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/ergotravel/keymaps/ckofy/rules.mk b/keyboards/ergotravel/keymaps/ckofy/rules.mk
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/config.h b/keyboards/ergotravel/keymaps/jpconstantineau/config.h
deleted file mode 100644
index eeca26ce1d..0000000000
--- a/keyboards/ergotravel/keymaps/jpconstantineau/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2017 Pierre Constantineau
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-
diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c
deleted file mode 100644
index 764b2b18c7..0000000000
--- a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c
+++ /dev/null
@@ -1,128 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_ADJT ADJUST
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , A , S , D , F , G , A, A, H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- GRAVE, 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,DEL,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , F1 , F2 , F3 , F4 , F5 , F6 , D, Y ,MINS, EQL,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, F7 , F8 , F9 , F10, F11, F12, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- )
-
-};
-
-
-
-
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- 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(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/rules.mk b/keyboards/ergotravel/keymaps/jpconstantineau/rules.mk
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/keyboards/ergotravel/keymaps/rs/keymap.c b/keyboards/ergotravel/keymaps/rs/keymap.c
index 0cf1cb3622..f8c6de56bc 100644
--- a/keyboards/ergotravel/keymaps/rs/keymap.c
+++ b/keyboards/ergotravel/keymaps/rs/keymap.c
@@ -2,37 +2,37 @@
#include "rs.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_GRV, KC_BSLS, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_EQL ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ESCC, A , S , D , F , G ,PIPE, MINS, H , J , K , L ,SCLN,QUOT,
+ KC_ESCC, KC_A , KC_S , KC_D , KC_F , KC_G ,KC_PIPE, KC_MINS, KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_SPC, KC_BSPC, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENTS,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- FN , ,LCTL,LALT,LGUI, SPC, BSPC, CODE,LEFT, UP ,DOWN,RIGHT
+ KC_FN ,_______,KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_BSPC, KC_CODE,KC_LEFT, KC_UP ,KC_DOWN,KC_RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
),
- [_CODE] = LAYOUT_kc(
+ [_CODE] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- GRV ,EXLM, AT ,HASH, DLR,PERC, , ,CIRC,LPLT,ASTR,RPGT,NEQL, ,
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,_______, _______,KC_CIRC,KC_LPLT,KC_ASTR,KC_RPGT,KC_NEQL,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , 1 , 2 , 3 , 4 , 5 , , ,MINS,LBRC, UP ,RBRC, ,BSLS,
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,_______, _______,KC_MINS,KC_LBRC, KC_UP ,KC_RBRC,_______,KC_BSLS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , 6 , 7 , 8 , 9 , 0 , DOT, ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
+ _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DOT, _______,KC_AMPR,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_PIPE,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
),
- [_FN] = LAYOUT_kc(
+ [_FN] = LAYOUT(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 , F10,F11 ,
+ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 ,_______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10,KC_F11 ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , ,BRMU, , , ,PGUP, , , ,
+ _______,_______,_______,_______,_______,_______,KC_BRMU, _______,_______,_______,KC_PGUP,_______,_______,_______,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , RST,BRMD, VOLU, ,CTRA,PGDN,CTRE, , ,
+ _______,_______,_______,_______,_______, KC_RST,KC_BRMD, KC_VOLU,_______,KC_CTRA,KC_PGDN,KC_CTRE,_______,_______,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , VOLD,MUTE, , , ,
+ _______,_______,_______,_______,_______,_______, KC_VOLD,KC_MUTE,_______,_______,_______,_______
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
),
-};
\ No newline at end of file
+};
diff --git a/keyboards/ergotravel/keymaps/viet/config.h b/keyboards/ergotravel/keymaps/viet/config.h
deleted file mode 100644
index 1c6c400b45..0000000000
--- a/keyboards/ergotravel/keymaps/viet/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2017 Pierre Constantineau
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-//#define MASTER_LEFT
-#define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 26
-#define RGBLIGHT_HUE_STEP 20
-#define RGBLIGHT_SAT_STEP 20
-#define RGBLIGHT_VAL_STEP 20
-#define RGBLIGHT_LIMIT_VAL 220
-
diff --git a/keyboards/ergotravel/keymaps/viet/keymap.c b/keyboards/ergotravel/keymaps/viet/keymap.c
deleted file mode 100644
index dd7fffcc69..0000000000
--- a/keyboards/ergotravel/keymaps/viet/keymap.c
+++ /dev/null
@@ -1,326 +0,0 @@
-#include "ergotravel.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#include "mousekey.h"
-#include "process_unicode.h"
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _NUMBERS 1
-#define _SYMBOLS 2
-#define _CODING 3
-#define _NAVIGATION 4
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- ADJUST,
- CODING_SPACE,
- NUMBERS_SPACE,
- SYMBOLS_SPACE,
- NAVIGATE_SPACE,
- TABLE_FLIP,
- RESET_TABLE,
- SHRUG,
- LOOK_OF_DISAPPROVAL
-};
-
-#define KC_ KC_TRNS
-
-#define KC_ADJT MO(_ADJUST)
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-#define KC_RSEN MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift
-
-#define KC_LCCA MT(MOD_LCTL, KC_CAPS) // Tap for caps lock, hold for left control
-#define KC_SHDE MT(MOD_LSFT, KC_DEL) // Tap for delete, hold for left shift
-
-#define KC_NAVI MO(_NAVIGATION)
-
-#define KC_COSP CODING_SPACE
-#define KC_NUSP NUMBERS_SPACE
-#define KC_SYSP SYMBOLS_SPACE
-#define KC_NASP NAVIGATE_SPACE
-
-#define KC_FLIP TABLE_FLIP
-#define KC_TSET RESET_TABLE
-#define KC_SRUG SHRUG
-#define KC_DISA LOOK_OF_DISAPPROVAL
-#define KC_RST RESET
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- TAB , Q , W , E , R , T ,HOME, PGUP, Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LCCA, A , S , D , F , G ,END , PGDN, H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- SHDE, Z , X , C , V , B ,LGUI, RALT, N , M ,COMM,DOT ,SLSH,RSEN,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- ESC ,ADJT,LALT,ENT ,NUSP,NASP, SYSP,COSP,RCTL,NAVI,ADJT,DEL
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_NUMBERS] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- GRAVE, 1 , 2 , 3 , 4 , 5 ,MPLY, VOLU, 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , ,MNXT, VOLD,FLIP,TSET,SRUG,DISA, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_SYMBOLS] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- GRAVE,EXLM, AT ,HASH,DLR ,PERC,MPLY, VOLU,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , ,MNXT, VOLD, , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_CODING] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , ,LCBR,RCBR, ,MPLY, VOLU, ,AMPR,PIPE,DLR , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,LPRN,RPRN, ,MNXT, VOLD, ,UNDS,MINS,ASTR, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,LBRC,RBRC, , , , ,PLUS,EQL , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_NAVIGATION] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , , UP , , ,MPLY, VOLU,WH_U,BTN1,MS_U,BTN1, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,LEFT,DOWN,RGHT, ,MNXT, VOLD,WH_D,MS_L,MS_D,MS_R, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- F1 ,F2 ,F3 ,F4 ,F5 ,F6 , , ,F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,RTOG,RVAI,RHUI,RSAI, , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,RMOD,RVAD,RHUD,RSAD, , , ,RST , , , , , ,
- //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
- )
-
-};
-
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-uint16_t custom_lt_timer;
-keypos_t prv_key_pressed;
-// Runs just one time when the keyboard initializes.
-void matrix_init_user(void) {
-// set_unicode_input_mode(UC_LNX); // Linux
- set_unicode_input_mode(UC_OSX); // Mac OSX
-// set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
- //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-
- if(record->event.pressed) prv_key_pressed = record->event.key;
- #define IS_KEYPOS_SAME(keyone,keytwo) ((keyone.col==keytwo.col)&&(keyone.row==keytwo.row))
- #define ANOTHER_KEY_PRESSED (!IS_KEYPOS_SAME(prv_key_pressed, record->event.key))
-
- inline void tap(uint16_t keycode) {
- register_code(keycode);
- unregister_code(keycode);
- };
-
- inline void swapInput(void) {
- register_code(KC_LGUI);
- tap(KC_SPC);
- unregister_code(KC_LGUI);
- };
-
- 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 CODING_SPACE:
- if (record->event.pressed) {
- custom_lt_timer = timer_read();
- layer_on(_CODING);
- } else {
- layer_off(_CODING);
- if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) {
- register_code(KC_SPC);
- unregister_code(KC_SPC);
- }
- }
- return false;
- break;
- case NUMBERS_SPACE:
- if (record->event.pressed) {
- custom_lt_timer = timer_read();
- layer_on(_NUMBERS);
- } else {
- layer_off(_NUMBERS);
- if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) {
- register_code(KC_SPC);
- unregister_code(KC_SPC);
- }
- }
- return false;
- break;
- case SYMBOLS_SPACE:
- if (record->event.pressed) {
- custom_lt_timer = timer_read();
- layer_on(_SYMBOLS);
- } else {
- layer_off(_SYMBOLS);
- if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) {
- register_code(KC_SPC);
- unregister_code(KC_SPC);
- }
- }
- return false;
- break;
- case NAVIGATE_SPACE:
- if (record->event.pressed) {
- custom_lt_timer = timer_read();
- layer_on(_NAVIGATION);
- } else {
- layer_off(_NAVIGATION);
- if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) {
- register_code(KC_SPC);
- unregister_code(KC_SPC);
- }
- }
- return false;
- break;
- case TABLE_FLIP:
- if (record->event.pressed) {
- swapInput();
-
- register_code(KC_RSFT);
- tap(KC_9);
- unregister_code(KC_RSFT);
- process_unicode((0x256F|QK_UNICODE), record); // Arm
- process_unicode((0x00B0|QK_UNICODE), record); // Eye
- process_unicode((0x25A1|QK_UNICODE), record); // Mouth
- process_unicode((0x00B0|QK_UNICODE), record); // Eye
- register_code(KC_RSFT);
- tap(KC_0);
- unregister_code(KC_RSFT);
- process_unicode((0x256F|QK_UNICODE), record); // Arm
- tap(KC_SPC);
- process_unicode((0x0361|QK_UNICODE), record); // Flippy
- tap(KC_SPC);
- process_unicode((0x253B|QK_UNICODE), record); // Table
- process_unicode((0x2501|QK_UNICODE), record); // Table
- process_unicode((0x253B|QK_UNICODE), record); // Table
-
- swapInput();
- }
- return false;
- break;
- case RESET_TABLE: // ┬──┬ ノ( ゜-゜ノ)
- if (record->event.pressed) {
- swapInput();
-
- process_unicode((0x252C|QK_UNICODE), record); // Table
- process_unicode((0x2500|QK_UNICODE), record); // Table
- process_unicode((0x2500|QK_UNICODE), record); // Table
- process_unicode((0x252C|QK_UNICODE), record); // Table
- tap(KC_SPC);
- process_unicode((0x30CE|QK_UNICODE), record); // Arm
- register_code(KC_RSFT);
- tap(KC_9);
- unregister_code(KC_RSFT);
- tap(KC_SPC);
- process_unicode((0x309C|QK_UNICODE), record); // Eye
- tap(KC_MINS);
- process_unicode((0x309C|QK_UNICODE), record); // Eye
- process_unicode((0x30CE|QK_UNICODE), record); // Arm
- register_code(KC_RSFT);
- tap(KC_0);
- unregister_code(KC_RSFT);
-
- swapInput();
- }
- return false;
- break;
- case SHRUG: // ¯\_(ツ)_/¯
- if (record->event.pressed) {
- swapInput();
-
- process_unicode((0x00AF|QK_UNICODE), record); // Hand
- tap(KC_BSLS); // Arm
- register_code(KC_RSFT);
- tap(KC_UNDS); // Arm
- tap(KC_LPRN); // Head
- unregister_code(KC_RSFT);
- process_unicode((0x30C4|QK_UNICODE), record); // Face
- register_code(KC_RSFT);
- tap(KC_RPRN); // Head
- tap(KC_UNDS); // Arm
- unregister_code(KC_RSFT);
- tap(KC_SLSH); // Arm
- process_unicode((0x00AF|QK_UNICODE), record); // Hand
-
- swapInput();
- }
- return false;
- break;
- case LOOK_OF_DISAPPROVAL: // ಠ_à²
- if(record->event.pressed){
- swapInput();
-
- process_unicode((0x0CA0|QK_UNICODE), record); // Eye
- register_code(KC_RSFT);
- tap(KC_MINS);
- unregister_code(KC_RSFT);
- process_unicode((0x0CA0|QK_UNICODE), record); // Eye
-
- swapInput();
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/ergotravel/keymaps/viet/rules.mk b/keyboards/ergotravel/keymaps/viet/rules.mk
deleted file mode 100644
index 24963d46b6..0000000000
--- a/keyboards/ergotravel/keymaps/viet/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = no
-UNICODE_ENABLE = yes
-
diff --git a/keyboards/fortitude60/fortitude60.h b/keyboards/fortitude60/fortitude60.h
index 61404fa750..0ad157f2d2 100644
--- a/keyboards/fortitude60/fortitude60.h
+++ b/keyboards/fortitude60/fortitude60.h
@@ -5,19 +5,3 @@
#endif
#include "quantum.h"
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, LT5, RT5, R30, R31, R32, R33, R34, R35, \
- LT0, LT1, LT2, LT3, LT4, RT4, RT3, RT2, RT1, RT0 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##LT5, KC_##RT5, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##RT4, KC_##RT3, KC_##RT2, KC_##RT1, KC_##RT0 \
- )
diff --git a/keyboards/gh60/revc/keymaps/bluezio/keymap.c b/keyboards/gh60/revc/keymaps/bluezio/keymap.c
index c0f650ecc5..98ca935053 100644
--- a/keyboards/gh60/revc/keymaps/bluezio/keymap.c
+++ b/keyboards/gh60/revc/keymaps/bluezio/keymap.c
@@ -1,7 +1,7 @@
#include QMK_KEYBOARD_H
// lshift split, backspace split, full ANSI enter, full right shift
-#define KEYMAP_BZIO( \
+#define LAYOUT_BZIO( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \
@@ -19,7 +19,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: HHKB with hyper key where ctrl used to be, and right half of left
shift used as a key lock */
- KEYMAP_BZIO(
+ LAYOUT_BZIO(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,\
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 1: spacefn with WASD arrows/navigation block and extra space key for
realignment of source code, plus IJKL mouse arrows, volume up/down in <>,
and caps lock where it used to be */
- KEYMAP_BZIO(
+ LAYOUT_BZIO(
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_TRNS, KC_TRNS, \
KC_TRNS, KC_PGUP, KC_UP, KC_PGDOWN, KC_INSERT, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, \
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DELETE, KC_MS_BTN1, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, \
diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h
index e2e8510b62..a53c267424 100644
--- a/keyboards/handwired/atreus50/atreus50.h
+++ b/keyboards/handwired/atreus50/atreus50.h
@@ -18,19 +18,6 @@
{ k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \
}
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \
-) \
-{ \
- { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
- { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
- { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
- { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
-}
-
#define KC_ KC_TRNS
#endif
diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h
deleted file mode 100644
index c3c4a1b697..0000000000
--- a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-#define SOLENOID_ENABLE
-#define SOLENOID_PIN F6
-#define SOLENOID_ACTIVE true
diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c
deleted file mode 100644
index 01c64d8701..0000000000
--- a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c
+++ /dev/null
@@ -1,56 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "mtdjr.h"
-
-extern keymap_config_t keymap_config;
-
-#define KC_LOCK TD(TD_ALTLOCK)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----,
- TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT,
- // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----|
- LGUI, LOWR, SPC, SPC, RASE, LOCK
- // `----+-----+-----` `----+-----+-----`
- ),
-
- [_LOWER] = LAYOUT_kc(
- // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----,
- ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- , , , , , , , , , LCBR, RCBR, BSLS,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- , , , XCPY, XINS, , , , , , , ,
- // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----|
- , , , , ,
- // `----+-----+-----` `----+-----+-----`
- ),
-
- [_RAISE] = LAYOUT_kc(
- // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----,
- GRV, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- , , , , MINS, EQL, , , UP, LBRC, RBRC, PIPE,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- , , , , , , , LEFT, DOWN, RGHT, , ,
- // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----|
- , , , , ,
- // `----+-----+-----` `----+-----+-----`
- ),
- [_ADJUST] = LAYOUT_kc(
- // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----,
- STOG, xxxx, xxxx, xxxx, RST, xxxx, ROOT, PPLY, PSEF, xxxx, xxxx, CAD,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- SDM, SDP, SBOF, SBON, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx,
- // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----|
- xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx,
- // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----|
- xxxx, , xxxx, xxxx, , xxxx
- // `----+-----+-----` `----+-----+-----`
- )
-};
diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk
deleted file mode 100644
index e5ddcae8d9..0000000000
--- a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-TAP_DANCE_ENABLE = yes
diff --git a/keyboards/handwired/not_so_minidox/not_so_minidox.h b/keyboards/handwired/not_so_minidox/not_so_minidox.h
index 05e7bc4914..c24a515e43 100644
--- a/keyboards/handwired/not_so_minidox/not_so_minidox.h
+++ b/keyboards/handwired/not_so_minidox/not_so_minidox.h
@@ -21,22 +21,4 @@
{ KC_NO, KC_NO, KC_NO, RT1, RT2, RT3 }, \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \
- L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \
- L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \
- LT1, LT2, LT3, RT3, RT2, RT1 \
- ) \
- { \
- { KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05 }, \
- { KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15 }, \
- { KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25 }, \
- { KC_NO, KC_NO, KC_NO, KC_##LT1, KC_##LT2, KC_##LT3 }, \
- { KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05 }, \
- { KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15 }, \
- { KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 }, \
- { KC_NO, KC_NO, KC_NO, KC_##RT1, KC_##RT2, KC_##RT3 }, \
- }
-
#endif
diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h
index a43fc76ae6..bd34925a9a 100644
--- a/keyboards/handwired/ortho5x13/ortho5x13.h
+++ b/keyboards/handwired/ortho5x13/ortho5x13.h
@@ -16,18 +16,3 @@
{ k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b, k3c }, \
{ k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \
}
-
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
- k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c \
-) \
-{ \
- { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \
- { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_##k1c }, \
- { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_##k2c }, \
- { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \
- { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \
-}
diff --git a/keyboards/handwired/qc60/qc60.h b/keyboards/handwired/qc60/qc60.h
index 55c83aca5e..944ec10f5e 100644
--- a/keyboards/handwired/qc60/qc60.h
+++ b/keyboards/handwired/qc60/qc60.h
@@ -7,20 +7,4 @@
#include "proto.h"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \
- LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \
- LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \
- LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \
- ) \
- LAYOUT( \
- KC_##LA1, KC_##LA2, KC_##LA3, KC_##LA4, KC_##LA5, KC_##LA6, KC_##RA1, KC_##RA2, KC_##RA3, KC_##RA4, KC_##RA5, KC_##RA6, KC_##RA7, \
- KC_##LB1, KC_##LB2, KC_##LB3, KC_##LB4, KC_##LB5, KC_##LB6, KC_##RB1, KC_##RB2, KC_##RB3, KC_##RB4, KC_##RB5, KC_##RB7, \
- KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \
- KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \
- )
-
-
#endif
diff --git a/keyboards/handwired/tennie/keymaps/default/readme.md b/keyboards/handwired/tennie/keymaps/default/readme.md
deleted file mode 100644
index 1fbaa7f463..0000000000
--- a/keyboards/handwired/tennie/keymaps/default/readme.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Default keymap
-
-This keymap is to serve as an example of how you could make a multi-layer keymap.
-
-#### keymap
-
-```
-[base] = LAYOUT_kc(
-// ┌────────┬────────┬────────â”
-
- DEL , SPC , ENT ,
-
-// ├────────┼────────┼────────┼────────┼
-
- LEFT , DOWN , UP , RGHT ,
-
-// ├────────┼────────┼────────┼────────┼
-
- SHRK , OGRE , TCP
-
-// └────────┴────────┴────────┘
-),
-[shrek] = LAYOUT_kc(
-// ┌────────┬────────┬────────â”
-
- MPRV , MPLY , MNXT ,
-
-// ├────────┼────────┼────────┼────────┼
-
- BRID , VOLD , VOLU , BRIU ,
-
-// ├────────┼────────┼────────┼────────┼
-
- _______, _______, _______
-
-// └────────┴────────┴────────┘
-),
-[ogre] = LAYOUT_kc(
-// ┌────────┬────────┬────────â”
-
- RGB_MOD, RGB_TOG, RGB_RMOD
-
-// ├────────┼────────┼────────┼────────┼
-
- F13 , F14 , F15 , F16 ,
-
-// ├────────┼────────┼────────┼────────┼
-
- _______, _______, _______
-
-// └────────┴────────┴────────┘
-),
-[tcp] = LAYOUT_kc(
-// ┌────────┬────────┬────────â”
-
- WBAK , WREF , WFWD ,
-
-// ├────────┼────────┼────────┼────────┼
-
- XXXXXXX , PGDN , PGUP , XXXXXXX ,
-
-// ├────────┼────────┼────────┼────────┼
-
- _______, _______, _______
-
-// └────────┴────────┴────────┘
-),
-```
diff --git a/keyboards/handwired/traveller/traveller.h b/keyboards/handwired/traveller/traveller.h
index 972a1a94a6..acf2ee7028 100644
--- a/keyboards/handwired/traveller/traveller.h
+++ b/keyboards/handwired/traveller/traveller.h
@@ -16,7 +16,7 @@
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
+#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \
k10, k11, k12, k13, k14, k15, k17, k18, k19, k1a, k1b, k1c, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
diff --git a/keyboards/hecomi/hecomi.h b/keyboards/hecomi/hecomi.h
index ef90a8ead9..9586e83947 100644
--- a/keyboards/hecomi/hecomi.h
+++ b/keyboards/hecomi/hecomi.h
@@ -67,23 +67,3 @@ Right hand:
{K80, K81, K82, K83, K84, K85, K86, K87},\
{KC_NO, KC_NO, K92, K93, K94, K95, K96, K97}\
}
-
-#define LAYOUT_kc(\
-K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, K57, \
-K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, K67, \
-K20, K21, K22, K23, K24, K25, K71, K72, K73, K74, K75, K76, K77,\
-K30, K31, K32, K33, K34, K35, K80, K81, K82, K83, K84, K85, K86, K87, \
- K40, K41, K42, K43, K44, K45, K92, K93, K94, K95, K96, K97\
-) {\
-{KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_NO},\
-{KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO},\
-{KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_NO, KC_NO},\
-{KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_NO, KC_NO},\
-{KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_NO, KC_NO},\
-{KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57},\
-{KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67},\
-{KC_NO, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77},\
-{KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_##K87},\
-{KC_NO, KC_NO, KC_##K92, KC_##K93, KC_##K94, KC_##K95, KC_##K96, KC_##K97}\
-}
-
diff --git a/keyboards/helix/pico/pico.h b/keyboards/helix/pico/pico.h
index 60a5078ed4..5fa5f72958 100644
--- a/keyboards/helix/pico/pico.h
+++ b/keyboards/helix/pico/pico.h
@@ -50,15 +50,3 @@ extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to
{ R36, R30, R31, R32, R33, R34, R35 }, \
}
#endif
-
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
-) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
-)
diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h
index b3a525554e..7db27bcca0 100644
--- a/keyboards/helix/rev1/rev1.h
+++ b/keyboards/helix/rev1/rev1.h
@@ -127,42 +127,3 @@
#else
#error "expected HELIX_ROWS 3 or 4 or 5"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#if MATRIX_ROWS == 6 // HELIX_ROWS == 3
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \
- ) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 \
- )
-#elif MATRIX_ROWS == 8 // HELIX_ROWS == 4
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-#else // HELIX_ROWS == 5
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
- ) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
- )
-#endif
diff --git a/keyboards/helix/rev2/rev2.h b/keyboards/helix/rev2/rev2.h
index bab841fe39..787b6c67bb 100644
--- a/keyboards/helix/rev2/rev2.h
+++ b/keyboards/helix/rev2/rev2.h
@@ -99,32 +99,3 @@ extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to
}
#endif
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#if MATRIX_ROWS == 8 // HELIX_ROWS == 4
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
- ) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-#else // HELIX_ROWS == 5
- #define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \
- ) LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
- )
-#endif
diff --git a/keyboards/jc65/v32a/v32a.h b/keyboards/jc65/v32a/v32a.h
index b319ba80af..4e24420913 100644
--- a/keyboards/jc65/v32a/v32a.h
+++ b/keyboards/jc65/v32a/v32a.h
@@ -36,21 +36,4 @@ along with this program. If not, see .
{ KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7 } \
}
-#define LAYOUT_kc( \
- K04,K14,K24,K34,K44,K54,K16,KB6,KB7,K17,KA4,KB4,KC4,KD4,KE4,KD0, \
- K03,K13,K23,K33,K43,K53,K26,KC6,KC7,K27,KA3,KB3,KC3, KD3,K67, \
- K02,K12,K22,K32,K42,K52,K36,KD6,KD7,K37,KA2,KB2,KC2, KD2,K87, \
- K01,K30,K11,K21,K31,K41,K51,K46,KE6,KE7,K47,KA1, KB1,K86,K77, \
- K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \
-) \
-{ \
- { KC_##K00,KC_##K10,KC_##K20,KC_##K30,KC_##K40,KC_##K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KB0,KC_##KC0,KC_##KD0, KC_NO }, \
- { KC_##K01,KC_##K11,KC_##K21,KC_##K31,KC_##K41,KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA1,KC_##KB1, KC_NO, KC_NO, KC_NO }, \
- { KC_##K02,KC_##K12,KC_##K22,KC_##K32,KC_##K42,KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA2,KC_##KB2,KC_##KC2,KC_##KD2, KC_NO }, \
- { KC_##K03,KC_##K13,KC_##K23,KC_##K33,KC_##K43,KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA3,KC_##KB3,KC_##KC3,KC_##KD3, KC_NO }, \
- { KC_##K04,KC_##K14,KC_##K24,KC_##K34,KC_##K44,KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA4,KC_##KB4,KC_##KC4,KC_##KD4,KC_##KE4 }, \
- { KC_NO,KC_##K16,KC_##K26,KC_##K36,KC_##K46,KC_##K56,KC_##K66,KC_##K76,KC_##K86,KC_##K96, KC_NO,KC_##KB6,KC_##KC6,KC_##KD6,KC_##KE6 }, \
- { KC_NO,KC_##K17,KC_##K27,KC_##K37,KC_##K47,KC_##K57,KC_##K67,KC_##K77,KC_##K87, KC_NO, KC_NO,KC_##KB7,KC_##KC7,KC_##KD7,KC_##KE7 } \
-}
-
#endif
diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h
index 3ed6149f05..4426fd7629 100644
--- a/keyboards/jd40/jd40.h
+++ b/keyboards/jd40/jd40.h
@@ -28,20 +28,6 @@ inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
*/
-/* JD40 MKII keymap definition macro
- */
-#define LAYOUT_kc( \
- 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, K30, K31, K32, K33, K34, \
- K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \
-) { \
- { 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_NO }, \
- { KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO }, \
- { KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_NO, KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_NO } \
-}
-
#define LAYOUT( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \
diff --git a/keyboards/jd45/jd45.h b/keyboards/jd45/jd45.h
index 105a8acb60..a0603d4e43 100644
--- a/keyboards/jd45/jd45.h
+++ b/keyboards/jd45/jd45.h
@@ -17,16 +17,4 @@
{ k30, k31, k32, k33, k34, KC_NO, k36, KC_NO, k38, k39, k3a, k3b, KC_NO } \
}
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3b \
-) { \
- { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, KC_##k0c }, \
- { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, KC_NO }, \
- { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, KC_NO }, \
- { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_NO, KC_##k36, KC_NO, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_NO } \
-}
-
#endif
diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c
deleted file mode 100644
index 985ff19b88..0000000000
--- a/keyboards/jd45/keymaps/justin/keymap.c
+++ /dev/null
@@ -1,80 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_MO1 MO(1)
-#define KC_MO2 MO(2)
-#define KC_MO3 MO(3)
-#define KC_LM4 LM(4, MOD_LSFT)
-
-#define KC_MTCM MT(MOD_LCTL, KC_MINS)
-#define KC_MTSG MT(MOD_LSFT, KC_GRV)
-#define KC_MTSW MT(MOD_RSFT, KC_RGUI)
-#define KC_MTSC MT(MOD_RSFT, KC_CAPS)
-#define KC_MTCT MT(MOD_LCTL, KC_TAB)
-
-#define KC_BLTG BL_TOGG
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_kc(
- ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC,
- MTCT, A, R, S, T, D, H, N, E, I, O, ENT,
- LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, MTSC,
- MTSG, LGUI, LM4, MO2, MO1, SPC, MTSW, RALT, MO3, MTCM),
- [1] = LAYOUT_kc(
- TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, END, PGDN, DOWN, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
- [2] = LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
- TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
- [3] = LAYOUT_kc(
- TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
- [4] = LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
- TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
-};
-
-enum macro_id
-{
- PSWD1,
- PSWD2,
- PSWD3,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [10] = ACTION_MACRO(PSWD1),
- [11] = ACTION_MACRO(PSWD2),
- [12] = ACTION_MACRO(PSWD3)
-};
-
-/*
- * Macro definition
- */
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch (id)
- {
- case PSWD1:
- return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
- case PSWD2:
- return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
- case PSWD3:
- return (record->event.pressed ? MACRO(I(0), T(1), T(2), T(3), T(4), T(5), T(6), T(7), T(8), T(ENT), END) : MACRO_NONE);
- //case VOLUP:
- // return (record->event.pressed ?
- // MACRO( D(VOLU), U(VOLU), END ) :
- // MACRO_NONE );
- //case ALT_TAB:
- // return (record->event.pressed ?
- // MACRO( D(LALT), D(TAB), END ) :
- // MACRO( U(TAB), END ));
- }
- return MACRO_NONE;
-}
diff --git a/keyboards/jd45/keymaps/mjt/config.h b/keyboards/jd45/keymaps/mjt/config.h
deleted file mode 100644
index 1121d9ab02..0000000000
--- a/keyboards/jd45/keymaps/mjt/config.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-Copyright 2012 Jun Wako
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6060
-#define DEVICE_VER 0x0001
-#define MANUFACTURER geekhack
-#define PRODUCT JD45
-
-/* key matrix size */
-#define MATRIX_ROWS 4
-#define MATRIX_COLS 13
-
-/* 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
-
-#define USB_MAX_POWER_CONSUMPTION 50
-#define BACKLIGHT_BREATHING
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-/* 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
-
-/* 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
-
-/*
- * 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
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c
deleted file mode 100644
index 95f96066d3..0000000000
--- a/keyboards/jd45/keymaps/mjt/keymap.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include QMK_KEYBOARD_H
-
-/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
- */
-
-#define KC_TT2 TT(2)
-#define KC_BLST BL_STEP
-#define KC_BLTG BL_TOGG
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_kc(
- TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS,
- FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
- FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
- NO, LCTL, LALT, LGUI, SPC, BSPC, APP, TT2, ESC, NO),
- [1] = LAYOUT_kc(
- GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
- TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
- TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
- TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, BLST, TRNS, TRNS),
- [2] = LAYOUT_kc(
- TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, BLST, BLTG,
- TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
- TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
- TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS)
- /* ,
-[3] = LAYOUT_kc(
-TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
-TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
-TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
-TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/
-};
-
-enum macro_id
-{
- M_LAYER1,
- M_LAYER2
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
- [1] = ACTION_MACRO(M_LAYER1)
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- // MACRODOWN only works in this function
- switch (id)
- {
- case M_LAYER1:
- // need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
- // action_function_tap may also handle this...
- if (record->event.pressed)
- {
- breathing_period_set(3);
- breathing_enable();
- layer_on(1);
- }
- else
- {
- breathing_period_set(1);
- breathing_self_disable();
- layer_off(1);
- }
- break;
- case M_LAYER2:
- if (record->event.pressed)
- {
- breathing_period_set(2);
- breathing_pulse();
- layer_on(2);
- }
- else
- {
- breathing_period_set(1);
- breathing_self_disable();
- layer_off(2);
- }
- break;
- }
- return MACRO_NONE;
-};
diff --git a/keyboards/jd45/keymaps/mjt/readme.md b/keyboards/jd45/keymaps/mjt/readme.md
deleted file mode 100644
index 54bdb83463..0000000000
--- a/keyboards/jd45/keymaps/mjt/readme.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Mike's JD45 standard layout
-
-- Backlight that matches active layer
-- Works with iPhone Camera Adapter
-
-## Layers
-
-Base for letters and mods.
-
-Function 1 layer adds a centered numpad to the board
-
-Function 2 layer replaces the numpad numbers with Fkeys.
diff --git a/keyboards/jd45/keymaps/mjt/rules.mk b/keyboards/jd45/keymaps/mjt/rules.mk
deleted file mode 100644
index a22e71b0d9..0000000000
--- a/keyboards/jd45/keymaps/mjt/rules.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
-# the appropriate keymap folder that will get included automatically
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/jj40/jj40.h b/keyboards/jj40/jj40.h
index fce68eda58..a77f35af23 100644
--- a/keyboards/jj40/jj40.h
+++ b/keyboards/jj40/jj40.h
@@ -63,20 +63,4 @@ along with this program. If not, see .
}
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-
#define LAYOUT LAYOUT_planck_mit
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/jj40/keymaps/like_jis/config.h b/keyboards/jj40/keymaps/like_jis/config.h
deleted file mode 100644
index cd9709272c..0000000000
--- a/keyboards/jj40/keymaps/like_jis/config.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#pragma once
-
-// place overrides here
-
-#define TAPPING_TERM 200
-
-#ifdef MOUSEKEY_ENABLE
- #undef MOUSEKEY_INTERVAL
- #define MOUSEKEY_INTERVAL 5
-
- #undef MOUSEKEY_TIME_TO_MAX
- #define MOUSEKEY_TIME_TO_MAX 150
-
- #undef MOUSEKEY_MAX_SPEED
- #define MOUSEKEY_MAX_SPEED 3
-
- #undef MOUSEKEY_MOVE_DELTA
- #define MOUSEKEY_MOVE_DELTA 3
-
- #undef MOUSEKEY_DELAY
- #define MOUSEKEY_DELAY 0
-#endif
-
-#undef BACKLIGHT_LEVELS
-#define BACKLIGHT_LEVELS 15
-// #undef BACKLIGHT_LEVELS
-// #define BACKLIGHT_BREATHING
-// #undef BREATHING_PERIOD
-// #define BREATHING_PERIOD 4
diff --git a/keyboards/jj40/keymaps/like_jis/keymap.c b/keyboards/jj40/keymaps/like_jis/keymap.c
deleted file mode 100644
index 24db919472..0000000000
--- a/keyboards/jj40/keymaps/like_jis/keymap.c
+++ /dev/null
@@ -1,200 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _QWERTY 0
-#define _LOWER 3
-#define _RAISE 4
-#define _ADJUST 16
-
-enum custom_keycodes {
- LOWER = SAFE_RANGE,
- RAISE,
- ADJUST,
- RGBRST
-};
-
-#define KC______ KC_TRNS
-#define KC_XXXXX KC_NO
-#define KC_KANJI KC_GRV
-
-#define KC_LOWER LOWER
-#define KC_RAISE RAISE
-#define KC_ADJST ADJUST
-
-#define KC_RST RESET
-
-#define KC_LRST RGBRST
-#define KC_LTOG RGB_TOG
-#define KC_LHUI RGB_HUI
-#define KC_LHUD RGB_HUD
-#define KC_LSAI RGB_SAI
-#define KC_LSAD RGB_SAD
-#define KC_LVAI RGB_VAI
-#define KC_LVAD RGB_VAD
-#define KC_LMOD RGB_MOD
-#define KC_BTOG BL_TOGG
-#define KC_BINC BL_INC
-#define KC_BDEC BL_DEC
-// #define KC_BRTG BL_BRTG
-
-#define KC_KNRM AG_NORM
-#define KC_KSWP AG_SWAP
-
-// Layer Mode aliases
-// #define KC_L_LO MO(_LOWER)
-// #define KC_L_RA MO(_RAISE)
-// #define KC_L_AD MO(_ADJUST)
-#define KC_TBSF LSFT_T(KC_TAB)
-// #define KC_SPSF LSFT_T(KC_SPC)
-// #define KC_GUAP LALT_T(KC_APP)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = KC_LAYOUT_ortho_4x12( \
- //,-----------------------------------------------------------------------------------.
- ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- TBSF, A, S, D, F, G, H, J, K, L, SCLN, ENT,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, UP, RSFT,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- LCTRL, LALT, LGUI, ADJST, LOWER, BSPC, SPC, RAISE, APP, LEFT, DOWN, RGHT \
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- ),
-
- [_LOWER] = KC_LAYOUT_ortho_4x12( \
- //,-----------------------------------------------------------------------------------.
- TAB, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- _____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- _____, F11, F12, XXXXX, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- _____, _____, _____, _____, _____, DEL, _____, _____, _____, _____, _____, _____ \
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- ),
-
- [_RAISE] = KC_LAYOUT_ortho_4x12( \
- //,-----------------------------------------------------------------------------------.
- _____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 4, 5, 6, QUOT, PLUS,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, SLSH,\
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- _____, _____, _____, _____, _____, BSPC, _____, _____, _____, _____, _____, _____ \
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- ),
-
- [_ADJUST] = KC_LAYOUT_ortho_4x12( \
- //,-----------------------------------------------------------------------------------.
- XXXXX, RST, LRST, KNRM, KSWP, XXXXX, XXXXX, WH_L, WH_U, HOME, PGUP, XXXXX,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- XXXXX, LTOG, LHUI, LSAI, LVAI, BTOG, BINC, WH_R, WH_D, END, PGDN, XXXXX,\
- //|------+------+------+------+------+------|------+------+------+------+------+------|
- XXXXX, LMOD, LHUD, LSAD, LVAD, XXXXX, BDEC, XXXXX, BTN1, BTN2, MS_U, XXXXX,\
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- _____, _____, _____, _____, _____, XXXXX, XXXXX, _____, _____, MS_L, MS_D, MS_R \
- //|------+------+------+------+------+-------------+------+------+------+------+------|
- )
-};
-
-
-#ifdef BACKLIGHT_ENABLE
- extern backlight_config_t backlight_config;
-
- inline void enable_backright(bool on) {
- backlight_config.enable = on;
- if (backlight_config.raw == 1) // enabled but level = 0
- backlight_config.level = 1;
- eeconfig_update_backlight(backlight_config.raw);
- // dprintf("backlight toggle: %u\n", backlight_config.enable);
- backlight_set(backlight_config.enable ? backlight_config.level : 0);
- }
-
- uint8_t bl_breath_count;
- uint8_t bl_breath_speed = 10;
- int8_t bl_breath_updown = 1;
- bool bl_breath_on;
- backlight_config_t bl_breath_backup;
-
- void bl_breath_start(uint8_t speed) {
-
- bl_breath_on = true;
- bl_breath_speed = speed;
- bl_breath_backup = backlight_config;
- }
-
- void bl_breath_end(void) {
-
- bl_breath_on = false;
- backlight_config = bl_breath_backup;
- eeconfig_update_backlight(backlight_config.raw);
- backlight_set(backlight_config.enable ? backlight_config.level : 0);
- }
-
- void bl_breath_update(void) {
-
- if (bl_breath_on) {
- ++bl_breath_count;
- if (bl_breath_count > bl_breath_speed) {
- bl_breath_count = 0;
-
- backlight_config.level += bl_breath_updown;
- bl_breath_updown = (backlight_config.level > BACKLIGHT_LEVELS) ? -1 :
- (backlight_config.level <= 0) ? 1 :
- bl_breath_updown;
- enable_backright(true);
- }
- }
- }
-
- #define BL_BREATH_START bl_breath_start
- #define BL_BREATH_END bl_breath_end
- #define BL_BREATH_UPDATE bl_breath_update
-
-#else
-
- #define BL_BREATH_START(a)
- #define BL_BREATH_END()
- #define BL_BREATH_UPDATE()
-#endif
-
-// Loop
-void matrix_scan_user(void) {
-
- BL_BREATH_UPDATE();
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-
- switch (keycode) {
- case LOWER:
- if (record->event.pressed) {
- BL_BREATH_START(50);
- layer_on(_LOWER);
- } else {
- BL_BREATH_END();
- layer_off(_LOWER);
- }
- break;
- case RAISE:
- if (record->event.pressed) {
- BL_BREATH_START(100);
- layer_on(_RAISE);
- } else {
- BL_BREATH_END();
- layer_off(_RAISE);
- }
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- break;
- default:
- return true;
- }
-
- return false;
-}
diff --git a/keyboards/jj40/keymaps/like_jis/rules.mk b/keyboards/jj40/keymaps/like_jis/rules.mk
deleted file mode 100644
index 0103be5f4a..0000000000
--- a/keyboards/jj40/keymaps/like_jis/rules.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-MOUSEKEY_ENABLE = yes
-BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-
-# 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/jm60/jm60.h b/keyboards/jm60/jm60.h
index c0af36298d..bea4451a04 100644
--- a/keyboards/jm60/jm60.h
+++ b/keyboards/jm60/jm60.h
@@ -34,5 +34,3 @@ along with this program. If not, see .
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, XXX, k3D }, \
{ k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \
}
-
-#define KEYMAP_ANSI LAYOUT_60_ansi
diff --git a/keyboards/kbdfans/kbd4x/kbd4x.h b/keyboards/kbdfans/kbd4x/kbd4x.h
index ab31d3657f..9e7e2ba220 100644
--- a/keyboards/kbdfans/kbd4x/kbd4x.h
+++ b/keyboards/kbdfans/kbd4x/kbd4x.h
@@ -43,16 +43,3 @@
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-
-#define LAYOUT_kc_ortho_4x12( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-{ \
- { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
- { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
- { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
- { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \
-}
diff --git a/keyboards/keebio/chocopad/chocopad.h b/keyboards/keebio/chocopad/chocopad.h
index d37aefc57e..43e94a093d 100644
--- a/keyboards/keebio/chocopad/chocopad.h
+++ b/keyboards/keebio/chocopad/chocopad.h
@@ -13,17 +13,3 @@
{ C1, C2, C3, C4 }, \
{ D1, D2, D3, D4 } \
}
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- A1, A2, A3, A4, \
- B1, B2, B3, B4, \
- C1, C2, C3, C4, \
- D1, D2, D3, D4 \
-) \
- LAYOUT_ortho_4x4( \
- KC_##A1, KC_##A2, KC_##A3, KC_##A4, \
- KC_##B1, KC_##B2, KC_##B3, KC_##B4, \
- KC_##C1, KC_##C2, KC_##C3, KC_##C4, \
- KC_##D1, KC_##D2, KC_##D3, KC_##D4 \
- )
diff --git a/keyboards/keebio/chocopad/keymaps/khord/config.h b/keyboards/keebio/chocopad/keymaps/khord/config.h
deleted file mode 100644
index 7fa3bf328e..0000000000
--- a/keyboards/keebio/chocopad/keymaps/khord/config.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#endif
diff --git a/keyboards/keebio/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h
index c7cc4aa725..229c6cd954 100644
--- a/keyboards/keebio/dilly/dilly.h
+++ b/keyboards/keebio/dilly/dilly.h
@@ -16,16 +16,4 @@
{ C10, C9, C8, C7, C6 } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, \
- B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, \
- C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 \
-) \
- LAYOUT_ortho_3x10( \
- KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, \
- KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, \
- KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C8, KC_##C9, KC_##C10 \
- )
-
#endif
diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/config.h b/keyboards/keebio/dilly/keymaps/bakingpy/config.h
deleted file mode 100644
index d141283ea4..0000000000
--- a/keyboards/keebio/dilly/keymaps/bakingpy/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#define TAPPING_TERM 150
diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c
deleted file mode 100644
index 7b52d5ff74..0000000000
--- a/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c
+++ /dev/null
@@ -1,106 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _BASE 0
-#define _FN1 1
-#define _FN2 2
-#define _FN3 3
-#define _FN4 4
-#define _FN5 5
-
-#define KC_ KC_TRNS
-
-// Tap-Hold keys
-#define KC_ASFT MT(MOD_LSFT, KC_A)
-#define KC_F_L3 LT(_FN3, KC_F)
-#define KC_ZCTL MT(MOD_LCTL, KC_Z)
-#define KC_XALT MT(MOD_LALT, KC_X)
-#define KC_CGUI MT(MOD_LGUI, KC_C)
-#define KC_V_L4 LT(_FN4, KC_V)
-#define KC_SPL2 LT(_FN2, KC_SPC)
-#define KC_B_L1 LT(_FN1, KC_B)
-#define KC_N_L5 LT(_FN5, KC_N)
-#define KC_MALT MT(MOD_RALT, KC_M)
-#define KC_BSCT MT(MOD_RCTL, KC_BSPC)
-#define KC_ENTS MT(MOD_RSFT, KC_ENT)
-#define KC_ESCS MT(MOD_RSFT, KC_ESC)
-#define KC_SCNS MT(MOD_RSFT, KC_SCLN)
-
-#define KC_GUIC LGUI(KC_C)
-
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_BASE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- Q , W , E , R , T , Y , U , I , O , P ,
- //|----+----+----+----+----+----+----+----+----+----|
- ASFT, S , D ,F_L3, G , H , J , K , L ,ESCS,
- //|----+----+----+----+----+----+----+----+----+----|
- ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,
- //|----+----+----+----+----+----+----+----+----+----|
- F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,BSPC, , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN2] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,
- //|----+----+----+----+----+----+----+----+----+----|
- F11 ,F12 , , , ,LEFT,DOWN, UP ,RGHT,GRV ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , , ,DEL , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , , , ,MINS,EQL ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN4] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , , LT , GT ,QUES,COLN,DQUO,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN5] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , ,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,DBUG, ,RHUD,RSAD,RVAD, , , ,
- //|----+----+----+----+----+----+----+----+----+----|
- BL_S, ,GUIC, , , , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- )
-
-};
diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk b/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/dilly/keymaps/delmo/config.h b/keyboards/keebio/dilly/keymaps/delmo/config.h
deleted file mode 100644
index 4d704c17ef..0000000000
--- a/keyboards/keebio/dilly/keymaps/delmo/config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#define TAPPING_TERM 200
-#define RETRO_TAPPING
-#define PERMISSIVE_HOLD
-
-#endif
diff --git a/keyboards/keebio/dilly/keymaps/delmo/keymap.c b/keyboards/keebio/dilly/keymaps/delmo/keymap.c
deleted file mode 100644
index 9d6c900ff4..0000000000
--- a/keyboards/keebio/dilly/keymaps/delmo/keymap.c
+++ /dev/null
@@ -1,105 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _BASE 0
-#define _FN1 1
-#define _FN2 2
-#define _FN3 3
-#define _FN4 4
-#define _FN5 5
-
-#define KC_ KC_TRNS
-
-// Tap-Hold keys
-//#define KC_ASFT MT(MOD_LSFT, KC_A)
-#define KC_F_L3 LT(_FN3, KC_F)
-#define KC_ZCTL MT(MOD_LCTL, KC_Z)
-#define KC_XALT MT(MOD_LALT, KC_X)
-//#define KC_CGUI MT(MOD_LGUI, KC_C)
-#define KC_V_L4 LT(_FN4, KC_V)
-#define KC_SPL2 LT(_FN2, KC_SPC)
-#define KC_B_L1 LT(_FN1, KC_B)
-#define KC_N_L5 LT(_FN5, KC_N)
-//#define KC_MALT MT(MOD_RALT, KC_M)
-//#define KC_BSCT MT(MOD_RCTL, KC_BSPC)
-#define KC_ENTS MT(MOD_RSFT, KC_ENT)
-#define KC_BSCS MT(MOD_RSFT, KC_BSPC)
-
-#define KC_GUIC LGUI(KC_C)
-
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_BASE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- Q , W , E , R , T , Y , U , I , O , P ,
- //|----+----+----+----+----+----+----+----+----+----|
- A , S , D ,F_L3, G , H , J , K , L ,BSCS,
- //|----+----+----+----+----+----+----+----+----+----|
- ZCTL,XALT,C ,V_L4,B_L1,SPL2,N_L5,M ,DOT ,ENTS
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,
- //|----+----+----+----+----+----+----+----+----+----|
- F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , , ,BSPC, , , ,CAPS
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN2] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,
- //|----+----+----+----+----+----+----+----+----+----|
- F11 ,F12 , , , , , , , ,GRV ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,DEL , , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- ESC , , , , ,MINS,EQL ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN4] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , , LT , GT ,QUES,COLN,DQUO,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN5] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , ,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,DBUG, ,RHUD,RSAD,RVAD, , , ,
- //|----+----+----+----+----+----+----+----+----+----|
- BL_S, ,GUIC, , , , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- )
-
-};
diff --git a/keyboards/keebio/dilly/keymaps/delmo/rules.mk b/keyboards/keebio/dilly/keymaps/delmo/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/dilly/keymaps/delmo/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/dilly/keymaps/pletcher/config.h b/keyboards/keebio/dilly/keymaps/pletcher/config.h
deleted file mode 100644
index 805bef4188..0000000000
--- a/keyboards/keebio/dilly/keymaps/pletcher/config.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#define AUTO_SHIFT_TIMEOUT 150
-#define NO_AUTO_SHIFT_SPECIAL
-#define NO_AUTO_SHIFT_NUMERIC
-#define USB_MAX_POWER_CONSUMPTION 50
-
-#endif
diff --git a/keyboards/keebio/dilly/keymaps/pletcher/keymap.c b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c
deleted file mode 100644
index 8bad575d6b..0000000000
--- a/keyboards/keebio/dilly/keymaps/pletcher/keymap.c
+++ /dev/null
@@ -1,95 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _BASE 0
-#define _FN1 1
-#define _FN2 2
-#define _FN3 3
-#define _FN4 4
-#define _FN5 5
-
-#define KC_ KC_TRNS
-
-// Tap-Hold keys
-#define KC_F_L3 LT(_FN3, KC_F)
-#define KC_ZCTL MT(MOD_LCTL, KC_Z)
-#define KC_XALT MT(MOD_LALT, KC_X)
-#define KC_CGUI MT(MOD_LGUI, KC_C)
-#define KC_V_L4 LT(_FN4, KC_V)
-#define KC_SPL2 LT(_FN2, KC_SPC)
-#define KC_B_L1 LT(_FN1, KC_B)
-#define KC_N_L5 LT(_FN5, KC_N)
-#define KC_MALT MT(MOD_RALT, KC_M)
-#define KC_BSCT MT(MOD_RCTL, KC_BSPC)
-#define KC_ENTS MT(MOD_RSFT, KC_ENT)
-#define KC_ESCS MT(MOD_RSFT, KC_ESC)
-
-#define KC_GUIC LGUI(KC_C)
-
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_BASE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- Q , W , E , R , T , Y , U , I , O , P ,
- //|----+----+----+----+----+----+----+----+----+----|
- A , S , D ,F_L3, G , H , J , K , L ,ESCS,
- //|----+----+----+----+----+----+----+----+----+----|
- ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,
- //|----+----+----+----+----+----+----+----+----+----|
- F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,BSPC, , , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN2] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,
- //|----+----+----+----+----+----+----+----+----+----|
- F11 ,F12 , , , , , , , ,GRV ,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,TAB , DEL, , , ,
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , , , ,MINS,EQL ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT,
- //|----+----+----+----+----+----+----+----+----+----|
- , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN4] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----+----+----+----+----|
- TAB , , , , , LT , GT ,QUES,COLN,DQUO,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END
- //`----+----+----+----+----+----+----+----+----+----'
- ),
-
- [_FN5] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----.
- , , ,RST , , ,MSTP,VOLD,VOLU,MPLY,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,DBUG, , , , ,ASDN,ASUP,ASRP,
- //|----+----+----+----+----+----+----+----+----+----|
- , ,GUIC, , , , , , ,ASTG
- //`----+----+----+----+----+----+----+----+----+----'
- )
-
-};
diff --git a/keyboards/keebio/dilly/keymaps/pletcher/rules.mk b/keyboards/keebio/dilly/keymaps/pletcher/rules.mk
deleted file mode 100644
index 9b9dd8341b..0000000000
--- a/keyboards/keebio/dilly/keymaps/pletcher/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-AUTO_SHIFT_ENABLE = yes
-RGBLIGHT_ENABLE = no
diff --git a/keyboards/keebio/fourier/fourier.h b/keyboards/keebio/fourier/fourier.h
index 7505ad8b3e..b99dd57c2e 100644
--- a/keyboards/keebio/fourier/fourier.h
+++ b/keyboards/keebio/fourier/fourier.h
@@ -22,17 +22,3 @@
{ RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \
{ RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \
}
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \
- LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \
- LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \
- LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \
- ) \
- LAYOUT( \
- KC_##LA1, KC_##LA2, KC_##LA3, KC_##LA4, KC_##LA5, KC_##LA6, KC_##RA1, KC_##RA2, KC_##RA3, KC_##RA4, KC_##RA5, KC_##RA6, KC_##RA7, \
- KC_##LB1, KC_##LB2, KC_##LB3, KC_##LB4, KC_##LB5, KC_##LB6, KC_##RB1, KC_##RB2, KC_##RB3, KC_##RB4, KC_##RB5, KC_##RB7, \
- KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \
- KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \
- )
diff --git a/keyboards/keebio/fourier/keymaps/jennetters/config.h b/keyboards/keebio/fourier/keymaps/jennetters/config.h
deleted file mode 100644
index 5f99c65ad5..0000000000
--- a/keyboards/keebio/fourier/keymaps/jennetters/config.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#pragma once
-
-#define TAPPING_TERM 100
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
diff --git a/keyboards/keebio/fourier/keymaps/jennetters/keymap.c b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c
deleted file mode 100644
index a6ec95e1e3..0000000000
--- a/keyboards/keebio/fourier/keymaps/jennetters/keymap.c
+++ /dev/null
@@ -1,146 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_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 _BASE 0
-#define _FN1 1
-#define _FN2 2
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
-};
-
-#define KC_ KC_TRNS
-#define KC_FN1 MO(_FN1)
-#define KC_FN2 MO(_FN2)
-#define KC_SPFN1 LT(_FN1, KC_SPACE)
-#define KC_SPFN2 LT(_FN2, KC_SPACE)
-#define KC_BSFN1 LT(_FN1, KC_BSPC)
-#define KC_BSFN2 LT(_FN2, KC_BSPC)
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-//Tap Dance Declarations
-enum {
- ESC_GR = 0,
- Q_1,
- W_2,
- E_3,
- R_4,
- T_5,
- Y_6,
- U_7,
- I_8,
- O_9,
- P_0,
- MIN_LB,
- EQL_RB,
- SCL_QUO
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_BASE] = LAYOUT(
- // ,----+----+----+----+----+----|----+----+----+----+----+----+----.
- // |ESC | Q1 | W2 | E3 | R4 | T5 | Y6 | U7 | I8 | O9 | P0 | -[ | =] |
- // |----`----`----`----`----`----|----`----`----`----`----`----`----|
- // | TAB | A | S | D | F | G | H | H | J | K | L | BKSP |
- // |-----`----`----`----`----`----|----`----`----`----`----`--------|
- // | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT |
- // |-------`----`----`----`----`----|----`----`----`----`----`------|
- // | CTL | SYS| ALT | SP SPACE | SPACE | FN1 | CTL | \ | ENT |
- // `-----+----+-----+----+--------|--------+-----+------+----+------'
-
- TD(ESC_GR), TD(Q_1), TD(W_2), TD(E_3), TD(R_4), TD(T_5), TD(Y_6), TD(U_7), TD(I_8), TD(O_9), TD(P_0),TD(MIN_LB),TD(EQL_RB), \
- KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(SCL_QUO), KC_BSPC, \
- KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_FN1, KC_LCTL, KC_NUBS, KC_ENTER
- ),
-
- [_FN1] = LAYOUT_kc(
- // ,----+----+----+----+----+----|----+----+----+----+----+----+----.
- // | | | UP | | | | | | | | | | |
- // |----`----`----`----`----`----|----`----`----`----`----`----`----|
- // | | LT | DN | RT | | | | | | | ' | DEL |
- // |-----`----`----`----`----`----|----`----`----`----`----`--------|
- // | | | | | | | | | | |PIPE| |
- // |-------`----`----`----`----`----|----`----`----`----`----`------|
- // | | | | | | | | | | |
- // `-----+----+-----+----+--------|--------+-----+------+----+------'
-
- , , UP, , , , , , , , , , , \
- , LEFT, DOWN, RIGHT, , , , , , , QUOT, DEL, \
- , , , , , , , , , , NUBS, , \
- , , , , , , , , ,
- ),
-
- [_FN2] = LAYOUT_kc(
- // ,----+----+----+----+----+----|----+----+----+----+----+----+----.
- // | | | | | | | | | | | | | |
- // |----`----`----`----`----`----|----`----`----`----`----`----`----|
- // | | | | | | | | | | | | |
- // |-----`----`----`----`----`----|----`----`----`----`----`--------|
- // | | | | | | | | | | | | |
- // |-------`----`----`----`----`----|----`----`----`----`----`------|
- // | | | | | | | | | | |
- // `-----+----+-----+----+--------|--------+-----+------+----+------'
-
- , , , , , , , , , , , , , \
- , , , , , , , , , , , , \
- , , , , , , , , , , , , \
- , , , , , , , , ,
- )
-
-};
-
-void esc_gr_finished (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- register_code (KC_ESC);
- } else if (state->count == 2) {
- register_code (KC_GRV);
- } else {
- register_code (KC_LSFT);
- register_code (KC_GRV);
- }
-}
-
-void esc_gr_reset (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- unregister_code (KC_ESC);
- } else if (state->count == 2) {
- unregister_code (KC_GRV);
- } else {
- unregister_code (KC_LSFT);
- unregister_code (KC_GRV);
- }
-}
-
-//Tap Dance Definitions
-qk_tap_dance_action_t tap_dance_actions[] = {
-[ESC_GR] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, esc_gr_finished, esc_gr_reset), //Tap once for ESC, twice for `, thrice for ~
-[Q_1] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_1), //Tap once for Q, twice for 1/!
-[W_2] = ACTION_TAP_DANCE_DOUBLE(KC_W, KC_2), //Tap once for W, twice for 2/@
-[E_3] = ACTION_TAP_DANCE_DOUBLE(KC_E, KC_3), //Tap once for E, twice for 3/#
-[R_4] = ACTION_TAP_DANCE_DOUBLE(KC_R, KC_4), //Tap once for R, twice for 4/$
-[T_5] = ACTION_TAP_DANCE_DOUBLE(KC_T, KC_5), //Tap once for T, twice for 5/%
-[Y_6] = ACTION_TAP_DANCE_DOUBLE(KC_Y, KC_6), //Tap once for Y, twice for 6/^
-[U_7] = ACTION_TAP_DANCE_DOUBLE(KC_U, KC_7), //Tap once for U, twice for 7/&
-[I_8] = ACTION_TAP_DANCE_DOUBLE(KC_I, KC_8), //Tap once for I, twice for 8/*
-[O_9] = ACTION_TAP_DANCE_DOUBLE(KC_O, KC_9), //Tap once for O, twice for 9/(
-[P_0] = ACTION_TAP_DANCE_DOUBLE(KC_P, KC_0), //Tap once for P, twice for 0/)
-[MIN_LB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_LBRC), //Tap once for -, twice for [/{
-[EQL_RB] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_RBRC), //Tap once for =, twice for ]/}
-[SCL_QUO] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT) //Tap once for ;, '/"
-// Other declarations would go here, separated by commas, if you have them
-};
diff --git a/keyboards/keebio/fourier/keymaps/jennetters/rules.mk b/keyboards/keebio/fourier/keymaps/jennetters/rules.mk
deleted file mode 100644
index 1ba2fa8fbe..0000000000
--- a/keyboards/keebio/fourier/keymaps/jennetters/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-TAP_DANCE_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/fourier/keymaps/valgrahf/config.h b/keyboards/keebio/fourier/keymaps/valgrahf/config.h
deleted file mode 100644
index 20e49c4219..0000000000
--- a/keyboards/keebio/fourier/keymaps/valgrahf/config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-#endif
diff --git a/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c
deleted file mode 100644
index a31c884750..0000000000
--- a/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c
+++ /dev/null
@@ -1,69 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_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 _BASE 0
-#define _FN1 1
-#define _FN2 2
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
-};
-
-#define KC_ KC_TRNS
-#define KC_FN1 LT(_FN1, KC_NO)
-#define KC_FN2 LT(_FN2, KC_NO)
-#define KC_SPFN LT(_FN1, KC_SPACE)
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_kc(
- //,----+----+----+----+----+----|----+----+----+----+----+----+----.
- TAB , Q , W , E , R , T , Y , U , I , O , P , DEL,BSPC,
- //|----`----`----`----`----`----|----`----`----`----`----`----`----|
- ESC , A , S , D , F , G , H , J , K , L ,QUOT, SCLN ,
- //|-----`----`----`----`----`----|----`----`----`----`----`--------|
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, PGUP ,
- //|-------`----`----`----`----`----|----`----`----`----`----`------|
- LCTL ,LALT, FN1, ,ENTER , SPACE , FN2 , HOME, END , PGDN
- //`-----+----+-----+-------------|--------+-----+-----+-----+------'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----|----+----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , ,
- //|----`----`----`----`----`----|----`----`----`----`----`----`----|
- DEL , F1 ,F2 , F3 , F4 , F5 , F6 ,MINS, EQL,LBRC,RBRC, BSLS ,
- //|-----`----`----`----`----`----|----`----`----`----`----`--------|
- , F7 , F8 , F9 , F10, F11, F12, , , , UP , ,
- //|-------`----`----`----`----`----|----`----`----`----`----`------|
- , , , , , ,RGUI,LEFT ,DOWN ,RIGHT
- //`-----+----+-----+-------------|--------+-----+-----+-----+------'
- ),
-
- [_FN2] = LAYOUT_kc(
- //,----+----+----+----+----+----|----+----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, , ,
- //|----`----`----`----`----`----|----`----`----`----`----`----`----|
- DEL ,RHUI,RSAI,RVAI, , , ,UNDS,PLUS,LCBR,RCBR, PIPE ,
- //|-----`----`----`----`----`----|----`----`----`----`----`--------|
- ,RHUD,RSAD,RVAD, , ,VOLU,VOLD, , , UP , ,
- //|-------`----`----`----`----`----|----`----`----`----`----`------|
- ,RTOG,RMOD , , , , , LEFT, DOWN, RIGHT
- //`-----+----+-----+-------------|--------+-----+-----+-----+------'
- )
-
-};
diff --git a/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk b/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/keyboards/keebio/iris/iris.h b/keyboards/keebio/iris/iris.h
index 878d57897b..a02158e36f 100644
--- a/keyboards/keebio/iris/iris.h
+++ b/keyboards/keebio/iris/iris.h
@@ -14,19 +14,3 @@
#include "quantum.h"
#include "via.h"
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \
- LT1, LT2, LT3, RT3, RT2, RT1 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##LT4, KC_##RT4, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##LT1, KC_##LT2, KC_##LT3, KC_##RT3, KC_##RT2, KC_##RT1 \
- )
diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
index fd953bab3d..ce2fee792a 100644
--- a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
+++ b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c
@@ -22,17 +22,17 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P , AA ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, A , S , D , F , G , H , J , K , L , OE , AE ,
+ KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LCTL, Z , X , C , V , B ,LBR ,RBR , N , M ,COMM,DOT ,SLSH,MINS,
+ KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBR ,KC_RBR , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_MINS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPC , ENT ,RASE,LALT
+ KC_LGUI,KC_LOWR,KC_SPC , KC_ENT ,KC_RASE,KC_LALT
// `----+----+----' `----+----+----'
),
diff --git a/keyboards/keebio/iris/keymaps/broswen/config.h b/keyboards/keebio/iris/keymaps/broswen/config.h
deleted file mode 100644
index fcfbfe8cf0..0000000000
--- a/keyboards/keebio/iris/keymaps/broswen/config.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-
-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 .
-*/
-
-#pragma once
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 5
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define AUDIO_PIN C6
-
-#define NO_MUSIC_MODE
-
-#ifdef AUDIO_ENABLE
- #define STARTUP_SONG SONG(NO_SOUND)
-#endif
-
-
-#if !defined(NO_DEBUG) && !defined(CONSOLE_ENABLE)
-#define NO_DEBUG
-#endif // !NO_DEBUG
-#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
-#define NO_PRINT
-#endif // !NO_PRINT
-#define NO_ACTION_MACRO
-#define NO_ACTION_FUNCTION
-#define DISABLE_LEADER
diff --git a/keyboards/keebio/iris/keymaps/broswen/keymap.c b/keyboards/keebio/iris/keymaps/broswen/keymap.c
deleted file mode 100644
index a64b03f571..0000000000
--- a/keyboards/keebio/iris/keymaps/broswen/keymap.c
+++ /dev/null
@@ -1,125 +0,0 @@
-#include QMK_KEYBOARD_H
-
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,LBRC, RBRC , N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LGUI,SPC, ENT ,LOWR,RASE
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , ,PGDN,PGUP, , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,TILD,PIPE,MINS,PLUS, , LEFT,DOWN, UP ,RGHT, , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , GRV,BSLS,UNDS, EQL, , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,F12 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , MUTE,VOLD,VOLU, , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- AU_TOG, CK_UP, CK_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-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);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/broswen/rules.mk b/keyboards/keebio/iris/keymaps/broswen/rules.mk
deleted file mode 100644
index 14fa112898..0000000000
--- a/keyboards/keebio/iris/keymaps/broswen/rules.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = no
-MOUSEKEY_ENABLE = no
-MIDI_ENABLE = no
-BLUETOOTH_ENABLE = no
-COMMAND_ENABLE = no
-TERMINAL_ENABLE = no
-AUDIO_ENABLE = yes
diff --git a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
index 4d76d745d8..aa757508a4 100644
--- a/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
+++ b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c
@@ -54,81 +54,81 @@ enum {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_COLEMAK] = LAYOUT_kc(
+ [_COLEMAK] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
+ KC_GRV , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- NAVMAC, A , R , S , T , D , H , N , E , I , O ,QUOT,
+ KC_NAVMAC, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SFLK, Z , X , C , V , B , PC , ENT , K , M ,COMM, DOT,SLSH,RSFT,
+ KC_SFLK, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_PC , KC_ENT , KC_K , KC_M ,KC_COMM, KC_DOT,KC_SLSH,KC_RSFT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LCTL,LGUI,CMBS, SPC, SYM, LALT
+ KC_LCTL,KC_LGUI,KC_CMBS, KC_SPC, KC_SYM, KC_LALT
// `----+----+----' `----+----+----'
),
- [_PC] = LAYOUT_kc(
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ [_PC] = LAYOUT(
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- NAVPC,___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC_NAVPC,KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , GM, ___, ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC_GM, KC____, KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- LGUI , LCTL , CTBS , ___ , ___ , ___
+ KC_LGUI , KC_LCTL , KC_CTBS , KC____ , KC____ , KC____
),
- [_GAME] = LAYOUT_kc(
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ [_GAME] = LAYOUT(
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- B , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC_B , KC_T , KC_Q , KC_W , KC_E , KC_R , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC_TAB , KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- LALT, LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ ,
+ KC_LALT, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_M, KC_P , KC____, KC____ , KC____ , KC____ , KC____ , KC____ ,
- G , I , SPC, BSPC, MAC, ___
+ KC_G , KC_I , KC_SPC, KC_BSPC, KC_MAC, KC____
),
- [_SYMBOL] = LAYOUT_kc(
+ [_SYMBOL] = LAYOUT(
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- LBRC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , RBRC,
+ KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC,
- BSLS, EXLM, AT , HASH, DLR , PERC, CIRC, AMPR, ASTR, LPRN, RPRN, EQL ,
+ KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL ,
- ___ , HOME, END , VOLD, VOLU, MPLY,___, ___,___, MINS, ___ , ___ , ___ , ___ ,
+ KC____ , KC_HOME, KC_END , KC_VOLD, KC_VOLU, KC_MPLY,KC____, KC____,KC____, KC_MINS, KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___, ___, ___ , ___
+ KC____ , KC____ , KC____, KC____, KC____ , KC____
),
- [_NAVMAC] = LAYOUT_kc(
+ [_NAVMAC] = LAYOUT(
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , C_TAB, AL , UP , AR , DEL , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC_C_TAB, KC_AL , KC_UP , KC_AR , KC_DEL , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , GSL , LEFT, DOWN, RGHT, GSR , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC_GSL , KC_LEFT, KC_DOWN, KC_RGHT, KC_GSR , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,G_TAB,ABSPC, ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,KC____, KC____,KC_G_TAB,KC_ABSPC, KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____
),
- [_NAVPC] = LAYOUT_kc(
+ [_NAVPC] = LAYOUT(
- ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , C_TAB, CL , UP , CR , DEL , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC_C_TAB, KC_CL , KC_UP , KC_CR , KC_DEL , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ , CPGU, LEFT, DOWN, RGHT, CPGD, ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ , KC_CPGU, KC_LEFT, KC_DOWN, KC_RGHT, KC_CPGD, KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___ ,___, ___,A_TAB,CBSPC, ___ , ___ , ___ , ___ ,
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____ ,KC____, KC____,KC_A_TAB,KC_CBSPC, KC____ , KC____ , KC____ , KC____ ,
- ___ , ___ , ___ , ___ , ___ , ___
+ KC____ , KC____ , KC____ , KC____ , KC____ , KC____
),
};
@@ -153,4 +153,4 @@ void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_action_t tap_dance_actions[] = {
//Tap once for Shift, twice for Caps Lock
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end)
-};
\ No newline at end of file
+};
diff --git a/keyboards/keebio/iris/keymaps/dbroqua/config.h b/keyboards/keebio/iris/keymaps/dbroqua/config.h
deleted file mode 100644
index 130b52c286..0000000000
--- a/keyboards/keebio/iris/keymaps/dbroqua/config.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-#define USE_SERIAL
-
-#define MASTER_LEFT
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/dbroqua/keymap.c b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c
deleted file mode 100644
index fe19696e1b..0000000000
--- a/keyboards/keebio/iris/keymaps/dbroqua/keymap.c
+++ /dev/null
@@ -1,124 +0,0 @@
-
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- /*
- * ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
- * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` |
- * |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC|
- * +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | LCTL| A | S | D | F | G | | H | J | K | L | ; | ' |
- * +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
- * | LSFT| Z | X | C | V | B | / \ | N | M | , | . | / | RSFT|
- * +-----+-----+-----+--+--+-----+-----+ SPC/ \ ENT+-----+-----+--+--+-----+-----+-----+
- * \ LGUI| LOWR| / \ | RASE| LALT/
- * `-----+-----+-----' `-----+-----+----'
- */
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , GRV,
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- LSFT, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,RSFT,
- LGUI,LOWR, SPC , ENT ,RASE,LALT
- ),
-
- [_LOWER] = LAYOUT_kc(
- /*
- * ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
- * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC|
- * |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | RST | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
- * +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | DEL | | LEFT| RGHT| UP | [ | | ] | 4 | 5 | 6 | + | | |
- * +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
- * | | | | | DOWN| { | / \ | } | 1 | 2 | 3 | - | |
- * +-----+-----+-----+--+--+-----+-----+ DEL/ \ DEL+-----+-----+--+--+-----+-----+-----+
- * \ | | / \ | | 0 /
- * `-----+-----+-----' `-----+-----+----'
- */
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- , , , ,DOWN,LCBR, , ,RCBR, P1 , P2 , P3 ,MINS, ,
- , ,DEL , DEL , , P0
- ),
-
- [_RAISE] = LAYOUT_kc(
- /*
- * ,-----+-----+-----+-----+-----+-----+ ,-----+-----+-----+-----+-----+-----+
- * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
- * |-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
- * +-----+-----+-----+-----+-----+-----+ +-----+-----+-----+-----+-----+-----+
- * | | Prev| Next| Vol+| PgUp| _ | | = | Home| | | + | \ |
- * +-----+-----+-----+-----+-----+-----+-----. ,-----+-----+-----+-----+-----+-----+-----+
- * | Mute| Stop| Play| Vol-| PgDn| - | / \ | + | End | | | |Debug|
- * +-----+-----+-----+--+--+-----+-----+ / \ +-----+-----+--+--+-----+-----+-----+
- * \ | | / \ | | 0 /
- * `-----+-----+-----' `-----+-----+----'
- */
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , ,DBUG,
- , , , , ,
- )
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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);
- update_tri_layer(_LOWER, _RAISE, _QWERTY);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _QWERTY);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _QWERTY);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _QWERTY);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/dbroqua/rules.mk b/keyboards/keebio/iris/keymaps/dbroqua/rules.mk
deleted file mode 100644
index 1d2d9e5a9c..0000000000
--- a/keyboards/keebio/iris/keymaps/dbroqua/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = no
-BACKLIGHT_ENABLE = no
diff --git a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h
deleted file mode 100644
index 72e35c4728..0000000000
--- a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c
deleted file mode 100644
index 12ac00cd78..0000000000
--- a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , ,COMM,DOT , P , Y , F , G , C , R , L ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, A , O , E , U , I , D , H , T , N , S ,INS ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,ENT , SPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , DEL , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S,RST , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/fabian/config.h b/keyboards/keebio/iris/keymaps/fabian/config.h
deleted file mode 100644
index faae942a83..0000000000
--- a/keyboards/keebio/iris/keymaps/fabian/config.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-// Add layout to the product identifier
-#undef PRODUCT
-#define PRODUCT Iris Keyboard (fabian)
-
-/* Use I2C or Serial, not both */
-// #define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// RGB configuration
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/fabian/keymap.c b/keyboards/keebio/iris/keymaps/fabian/keymap.c
deleted file mode 100644
index d7d98fdc06..0000000000
--- a/keyboards/keebio/iris/keymaps/fabian/keymap.c
+++ /dev/null
@@ -1,179 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-enum custom_layers {
- _COLEMAK,
- _QWERTY,
- _LOWER,
- _RAISE,
- _MOUSECURSOR,
- _ADJUST,
-};
-
-enum custom_keycodes {
- COLEMAK = SAFE_RANGE,
- QWERTY,
- LOWER,
- RAISE,
- MOUSECURSOR,
- ADJUST,
- DYNAMIC_MACRO_RANGE,
-};
-
-#include "dynamic_macro.h"
-
-#define KC_ KC_TRNS
-
-#define KC_COLE COLEMAK
-#define KC_LOWR LOWER
-#define KC_QWER QWERTY
-#define KC_RASE RAISE
-#define KC_RECB DYN_REC_START1
-#define KC_RECE DYN_REC_STOP
-#define KC_RECP DYN_MACRO_PLAY1
-#define KC_RSET RESET
-
-#define KC_CTLE CTL_T(KC_ESC) // Tap for Escape, hold for Control
-#define KC_HTAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
-#define KC_SBSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift
-#define KC_SENT KC_SFTENT // Tap for Enter, hold for Shift
-#define KC_TGMC TG(_MOUSECURSOR) // Toggle MOUSECURSOR layer
-#define KC_SPMC LT(_MOUSECURSOR, KC_SPC) // Tap for Space, hold for MOUSECURSOR layer
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- MEH , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,TGMC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- HTAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTLE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SBSP, Z , X , C , V , B ,LALT, RALT, N , M ,COMM,DOT ,SLSH,SENT,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPMC, HTAB,RASE,RGUI
- // `----+----+----' `----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- MEH , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,TGMC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- HTAB, Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTLE, A , R , S , T , D , H , N , E , I , O ,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SBSP, Z , X , C , V , B ,LALT, RALT, K , M ,COMM,DOT ,SLSH,SENT,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPMC, HTAB,RASE,RGUI
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , F7 , F8 , F9 ,F10 ,F11 , , ,F12 ,MS_L,MS_D,MS_U,MS_R,BTN1,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TILD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , F7 , F8 , F9 ,F10 ,F11 , , ,F12 ,LEFT,DOWN, UP ,RGHT,BTN2,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_MOUSECURSOR] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , UP , , , WH_D,WH_R,MS_U,ACL0,ACL1,ACL2,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , ,LEFT,DOWN,RGHT, , WH_L,MS_L,MS_D,MS_R,BTN1,BTN2,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , ,WH_U,LEFT,DOWN, UP ,RGHT,BTN3,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RSET, , , , , , , , ,RSET, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , ,QWER,COLE, , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , ,RECB,RECE,RECP,CAPS,
- //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_dynamic_macro(keycode, record)) {
- return false;
- }
-
- switch (keycode) {
- case COLEMAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_COLEMAK);
- }
- return false;
- break;
- 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(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
- }
diff --git a/keyboards/keebio/iris/keymaps/fate/config.h b/keyboards/keebio/iris/keymaps/fate/config.h
deleted file mode 100644
index 5f16bffb7b..0000000000
--- a/keyboards/keebio/iris/keymaps/fate/config.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-/* QMK DFU configuration */
-#define QMK_ESC_OUTPUT F6
-#define QMK_ESC_INPUT D7
-#define QMK_LED D5
-#define QMK_SPEAKER C6
-
-/* Use I2C or Serial, not both */
-// #define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/fate/keymap.c b/keyboards/keebio/iris/keymaps/fate/keymap.c
deleted file mode 100644
index 0e21944c79..0000000000
--- a/keyboards/keebio/iris/keymaps/fate/keymap.c
+++ /dev/null
@@ -1,125 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-enum iris_layers {
- _QWERTY,
- _LOWER,
- _RAISE,
- _ADJUST,
- _NUMPAD
-};
-
-// Tap Dance Declarations
-enum {
- TD_LALT_LGUI = 0,
- TD_RALT_RGUI
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR MO(_LOWER)
-#define KC_RASE MO(_RAISE)
-#define KC_NUM TG(_NUMPAD)
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_BL_S BL_STEP
-#define KC_RTOG RGB_TOG
-#define KC_RMD RGB_MOD
-#define KC_RRMD RGB_RMOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-#define KC_LAG TD(TD_LALT_LGUI)
-#define KC_RAG TD(TD_RALT_RGUI)
-#define KC_RSEN MT(MOD_RSFT, KC_ENT)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,ENT , ENT , N , M ,COMM,DOT ,SLSH,RSEN,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LAG ,LOWR,SPC , SPC ,RASE,RAG
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CAPS, ,HOME, UP ,END ,PGUP, LEFT,DOWN, UP ,RGHT,INS ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,TILD,LEFT,DOWN,RGHT,PGDN, ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,MPLY,MPRV,MNXT,VOLD,VOLU, , ,HOME,PGDN,PGUP,END ,APP , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CAPS, ,BTN1,MS_U,BTN2,WH_U, LEFT,DOWN, UP ,RGHT,INS ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,GRV ,MS_L,MS_D,MS_R,WH_D, ,MINS,EQL ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,MPLY,MPRV,MNXT,VOLD,VOLU, , ,HOME,PGDN,PGUP,END ,APP , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RMD ,RHUI,RSAI,RVAI,RTOG, ,PSCR,SLCK,PAUS, , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RRMD,RHUD,RSAD,RVAD,BL_S, LEFT,DOWN, UP ,RGHT, , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,DBUG, , , ,RST ,NUM , NUM ,HOME,PGDN,PGUP,END ,APP , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_NUMPAD] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , NLCK, P7 , P8 , P9 ,PSLS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , P4 , P5 , P6 ,PAST, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , P1 , P2 , P3 ,PPLS,ENT ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , P0 , P0 ,PDOT,PMNS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-
-};
-
-uint32_t layer_state_set_user(uint32_t state) {
- return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
-}
-
-// Tap Dance Definitions
-qk_tap_dance_action_t tap_dance_actions[] = {
- // Tap once for L-Alt, twice for L-GUI
- [TD_LALT_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_LGUI),
- // Tap once for R-Alt, twice for R-GUI
- [TD_RALT_RGUI] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RGUI)
-};
diff --git a/keyboards/keebio/iris/keymaps/fate/readme.md b/keyboards/keebio/iris/keymaps/fate/readme.md
deleted file mode 100644
index 70f464b0da..0000000000
--- a/keyboards/keebio/iris/keymaps/fate/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Fate Iris Layout
-
-This keymap is configured for Pro Micro(s) with QMK-DFU bootloader flashed. Please refer to [this guide](https://www.reddit.com/r/olkb/comments/8sxgzb/replace_pro_micro_bootloader_with_qmk_dfu/) for further details on ISP flashing your Pro Micro.
-
-To generate a production-ready .hex file (containing the application and the bootloader), use the production target
-
- make iris/rev2:fate:production
-
-To replace your Pro Micro with QMK-DFU bootloader along with the keymap, setup your ISP Flasher and avrdude, run (This command assumes you're using SparkFun's Pocket AVR Programmer to program):
-
- $ avrdude -p m32u4 -P usb -c usbtiny -U flash:w:"iris_rev2_fate_production.hex" -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m -U lock:w:0x3F:m -v
-
-Command to replace your Pro Micro with QMK-DFU bootloader only:
-
- $ avrdude -p m32u4 -P usb -c usbtiny -U flash:w:"iris_rev2_fate_bootloader.hex" -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m -U lock:w:0x3F:m -v
-
-The QMK_ESC is mapped to the ESC key in keymap.c; QMK_LED is mapped to TX_LED on the Pro Micro.
-
- /* QMK DFU configuration */
- #define QMK_ESC_OUTPUT F6
- #define QMK_ESC_INPUT D7
- #define QMK_LED D5
- #define QMK_SPEAKER C6
diff --git a/keyboards/keebio/iris/keymaps/fate/rules.mk b/keyboards/keebio/iris/keymaps/fate/rules.mk
deleted file mode 100644
index 378a653d90..0000000000
--- a/keyboards/keebio/iris/keymaps/fate/rules.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-# Bootloader
-# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
-# automatically (+60). See bootloader.mk for all options.
-BOOTLOADER = qmk-dfu
-
-TAP_DANCE_ENABLE = yes
diff --git a/keyboards/keebio/iris/keymaps/gary/keymap.c b/keyboards/keebio/iris/keymaps/gary/keymap.c
index 41ac9207b8..fd9a8a0d45 100644
--- a/keyboards/keebio/iris/keymaps/gary/keymap.c
+++ b/keyboards/keebio/iris/keymaps/gary/keymap.c
@@ -2,46 +2,46 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_DEL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_RASE, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+---- +----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,NEXT, FULL , N , M ,COMM,DOT ,SLSH,SFTENT,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_NEXT, KC_FULL , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_SFTENT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPC , GARY, ENT,LALT
+ KC_LGUI,KC_LOWR,KC_SPC , KC_GARY, KC_ENT,KC_LALT
// `----+----+----' `----+----+----'
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- CLTB, ,CNTR,UPLF,UPRG, , , ,PLUS,LBRC,RBRC,OPASS,
+ KC_CLTB,_______,KC_CNTR,KC_UPLF,KC_UPRG,_______, _______,_______,KC_PLUS,KC_LBRC,KC_RBRC,KC_OPASS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,LHLF,RHLF,DNLF,DNRG, , , ,MINS, , ,PIPE,
+ _______,KC_LHLF,KC_RHLF,KC_DNLF,KC_DNRG,_______, _______,_______,KC_MINS,_______,_______,KC_PIPE,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|`
- , , ,CTLC, , , , , , , ,EQL , ,UNDS ,
+ _______,_______,_______,KC_CTLC,_______,_______,_______, _______,_______,_______,_______,KC_EQL ,_______,KC_UNDS ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , BSPC , ,
+ _______,_______,KC_DEL , KC_BSPC ,_______, _______
// `----+----+----' `----+----+----'
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD, F1 , F2 , F3 ,SHOT, F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
+ KC_TILD, KC_F1 , KC_F2 , KC_F3 ,KC_SHOT, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MPRV,MPLY,MNXT, , , ,PGUP, UP ,PGDN, , ,
+ _______,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______, _______,KC_PGUP, KC_UP ,KC_PGDN,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , ,VOLD,VOLU,MUTE, , ,LEFT,DOWN,RGHT, , ,
+ _______,_______,KC_VOLD,KC_VOLU,KC_MUTE,_______, _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , RST, , , , , , ,
+ _______,_______,_______,_______,_______,_______,_______, KC_RST,_______,_______,_______,_______,_______,_______,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- ,LALT, , , ,
+ _______,KC_LALT,_______, _______,_______, _______
// `----+----+----' `----+----+----'
),
};
diff --git a/keyboards/keebio/iris/keymaps/hag/config.h b/keyboards/keebio/iris/keymaps/hag/config.h
deleted file mode 100644
index c4604af436..0000000000
--- a/keyboards/keebio/iris/keymaps/hag/config.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/hag/keymap.c b/keyboards/keebio/iris/keymaps/hag/keymap.c
deleted file mode 100644
index 222b68208f..0000000000
--- a/keyboards/keebio/iris/keymaps/hag/keymap.c
+++ /dev/null
@@ -1,295 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-
-//Heavily modified keymap. Some features:
-//Multiple layouts, I use dvorak as main.
-//Nordic(swedish) signs
-//Symbols, numpad, arrows/navigation reachable under the alpas via the layers
-//Mirrored ctl, alt and shift to be able to use both hands when doing commands
-//Gaming layer, qwerty with space on left half.
-
-#define _QWERTY 2
-#define _DVORAK 0
-#define _COLEMAK 1
-#define _WORKMAN 3
-#define _GAMING 4
-#define _NUMPAD 5
-#define _LOWER 6
-#define _RAISE 7
-
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- DVORAK,
- COLEMAK,
- WORKMAN,
- GAMING,
- NUMPAD,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_Sw2 RALT(KC_2) // Nordic @
-#define KC_Sw3 RALT(KC_3) // Nordic something
-#define KC_Sw4 RALT(KC_4) // Nordic something
-#define KC_Sw5 RALT(KC_5) // Nordic something
-#define KC_Sw6 RALT(KC_6) // ...
-#define KC_Sw7 RALT(KC_7)
-#define KC_Sw8 RALT(KC_8)
-#define KC_Sw9 RALT(KC_9)
-#define KC_Sw0 RALT(KC_0)
-#define KC_Tild RALT(KC_RBRC)
-#define KC_Bsls RALT(KC_MINS)
-#define KC_Bar RALT(KC_NUBS)
-#define KC_Less S(KC_NUBS)
-#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del
-#define KC_TSKMGR LCTL(S(KC_ESC)) // Ctrl shift esc
-#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in LAYOUT_kc
-#define KC_Close RALT(KC_F4) // Alt F4
-#define KC_Great S(KC_NUBS)
-#define KC_MEH1 MEH(KC_1)
-#define KC_MEH2 MEH(KC_2)
-#define KC_MEH3 MEH(KC_3)
-#define KC_MEH4 MEH(KC_4)
-#define KC_MEH5 MEH(KC_5)
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,NUMP, ENT , N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LOWR,BSPC, SPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_GAMING] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,ESC ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,RCTL,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , Y , ENT , N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LOWR,SPC, BSPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- DEL ,APP ,VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB ,LBRC,QUOT,SCLN, P , Y , F , G , C , R , L ,DEL,
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LCTL, A , O , E , U , I , D , H , T , N , S ,RCTL,
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LSFT,DOT , Q , J , K , X ,NUMP, ENT , B , M , W , V , Z ,RSFT,
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- LALT,LOWR,BSPC, SPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , F , P , G , J , L , U , Y ,LBRC,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , R , S , T , D , H , N , E , I , O ,SCLN,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,NUMP, ENT , K , M ,COMM, DOT,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LOWR,BSPC, SPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
-[_WORKMAN] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- DEL ,APP, VOLD,MUTE,VOLU,LGUI, RGUI,MPRV,MPLY,MNXT,DOWN,ESC ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , R , W , B , J , F , U , P ,LBRC,SCLN,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , H , T , G , Y , N , E , O , I ,RCTL,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , M , C , V ,NUMP, ENT , K , L ,QUOT, DOT,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LOWR,BSPC, SPC ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_NUMPAD] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MEH1,BTN2,MS_U,BTN1,CATDEL, PIPE, P7 , P8 , P9 ,SLSH, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MEH4,MS_L,MS_D,MS_R,TSKMGR, COMM, P4 , P5 , P6 ,MINS, ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,MEH5,ACL0,ACL1,ACL2,MEH3, , PENT,DOT , P1 , P2 , P3 , P0 , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LOWR,BSPC, , P0 ,NLCK
- // `----+----+----' `----+----+----'
- ),
-
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,CAPS,PGUP, UP ,PGDN, ESC, RCBR,EXLM,ASTR,LPRN,UNDS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,HOME,LEFT,DOWN,RGHT, END, RPRN,QUES,Sw8 ,Sw9 ,LABK, ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , ENT, , , , DEL, , ,RABK,NUBS,Sw7 ,Sw0 ,Great, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM,GRV ,EQL, DLR ,PERC, Sw3 ,Sw5 ,Sw6 ,Sw0 ,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,Bar ,Sw2 ,HASH, AT ,PERC, PIPE, 7 , 8 , 9 ,PMNS,PSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,Bsls,Tild,SLSH,AMPR,BSLS, COMM, 4 , 5 , 6 ,PPLS,PAST,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,PIPE,Sw4 ,PLUS,CIRC,TILD, , PENT,DOT , 1 , 2 , 3 , 0 ,PEQL,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , KC_RST, _______, _______, _______, _______, KC_PWR, RESET,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, _______, _______,LGUI(KC_UP),_______,LALT(KC_F4), _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, _______,LGUI(KC_LEFT),LGUI(KC_DOWN),LGUI(KC_RGHT),_______, _______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP,
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 DVORAK:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
-// PLAY_SONG(tone_qwerty);
- #endif
- persistent_default_layer_set(1UL<<_DVORAK);
- }
- return false;
- break;
- case NUMPAD:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
-// PLAY_SONG(tone_qwerty);
- #endif
- persistent_default_layer_set(1UL<<_NUMPAD);
- }
- return false;
- break;
- case COLEMAK:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
-// PLAY_SONG(tone_qwerty);
- #endif
- persistent_default_layer_set(1UL<<_COLEMAK);
- }
- return false;
- break;
- case WORKMAN:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
-// PLAY_SONG(tone_qwerty);
- #endif
- persistent_default_layer_set(1UL<<_WORKMAN);
- }
- return false;
- break;
- case GAMING:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
-// PLAY_SONG(tone_qwerty);
- #endif
- persistent_default_layer_set(1UL<<_GAMING);
- }
- return false;
- break;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/hag/rules.mk b/keyboards/keebio/iris/keymaps/hag/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/hag/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/hbbisenieks/keymap.c b/keyboards/keebio/iris/keymaps/hbbisenieks/keymap.c
index a886bf7a30..7c477f8502 100644
--- a/keyboards/keebio/iris/keymaps/hbbisenieks/keymap.c
+++ b/keyboards/keebio/iris/keymaps/hbbisenieks/keymap.c
@@ -87,7 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//`-------+-------+-------+---+---+-------+-------+-------/ \-------+-------+-------+---+---+-------+-------+-------'
_______,_______,_______, _______,_______,_______
// `-------+-------+-------' `-------+-------+-------'
-
),
[_ADJUST] = LAYOUT(
diff --git a/keyboards/keebio/iris/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/hexwire/config.h
deleted file mode 100644
index 8166822d93..0000000000
--- a/keyboards/keebio/iris/keymaps/hexwire/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-#define USE_I2C
-
-/* Select hand configuration */
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/hexwire/keymap.c b/keyboards/keebio/iris/keymaps/hexwire/keymap.c
deleted file mode 100644
index 33105c1c86..0000000000
--- a/keyboards/keebio/iris/keymaps/hexwire/keymap.c
+++ /dev/null
@@ -1,142 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_ESCC MT(MOD_LCTL, KC_ESC)
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_ENTS MT(MOD_LSFT, KC_ENT)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESCC, A , S , D , F , G , H , J , K , L ,SCLN,ENTS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,SPC , LCTL, N , M ,COMM,DOT ,SLSH,ENTS,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPC , BSPC,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S,CPYP, , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , DEL , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/hexwire/rules.mk b/keyboards/keebio/iris/keymaps/hexwire/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/hexwire/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c
index 930c747f09..4abb6a63bc 100644
--- a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c
+++ b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c
@@ -20,45 +20,45 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GUIE, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSLS,
+ KC_GUIE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- AGRV, A, S, D, F, G, H, J, K, L, SCLN,AQUO,
+ KC_AGRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_AQUO,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- PSFT, Z, X, C, V, B, NAVI, NAVI, N, M, COMM,DOT, SLSH,DSFT,
+ KC_PSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NAVI, KC_NAVI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_DSFT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- NAVI,ECTL, SPC, ENT, MCTL,NAVI
+ KC_NAVI,KC_ECTL, KC_SPC, KC_ENT, KC_MCTL,KC_NAVI
// `----+----+----' `----+----+----'
),
- [_NAVI] = LAYOUT_kc(
+ [_NAVI] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,
+ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TRNS,TRNS,MUTE,VOLU,TRNS,TRNS, PGUP,HOME, UP, END, TRNS,TRNS,
+ KC_TRNS,KC_TRNS,KC_MUTE,KC_VOLU,KC_TRNS,KC_TRNS, KC_PGUP,KC_HOME, KC_UP, KC_END, KC_TRNS,KC_TRNS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TRNS,TRNS,BRID,VOLD,BRIU,TRNS, PGDN,LEFT,DOWN,RGHT,TRNS,TRNS,
+ KC_TRNS,KC_TRNS,KC_BRID,KC_VOLD,KC_BRIU,KC_TRNS, KC_PGDN,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- TRNS,TRNS,TRNS,NUMP,INS, TRNS,TRNS, TRNS,TRNS,CAPS,LBRC,RBRC,TRNS,TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_NUMP,KC_INS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_CAPS,KC_LBRC,KC_RBRC,KC_TRNS,KC_TRNS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- TRNS,TRNS,TRNS, TRNS,TRNS,TRNS
+ KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
// `----+----+----' `----+----+----'
),
- [_NUMP] = LAYOUT_kc(
+ [_NUMP] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,NLCK,PSLS,PAST,PMNS,TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,KC_TRNS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, P7, P8, P9, PPLS,TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS,KC_TRNS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, P4, P5, P6, PCMM,TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PCMM,KC_TRNS,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, P1, P2, P3, PEQL,TRNS,
+ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_P1, KC_P2, KC_P3, KC_PEQL,KC_TRNS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- TRNS,TRNS,TRNS, PENT, P0, PDOT
+ KC_TRNS,KC_TRNS,KC_TRNS, KC_PENT, KC_P0, KC_PDOT
// `----+----+----' `----+----+----'
)
};
diff --git a/keyboards/keebio/iris/keymaps/jennetters/config.h b/keyboards/keebio/iris/keymaps/jennetters/config.h
deleted file mode 100644
index 42f91bd027..0000000000
--- a/keyboards/keebio/iris/keymaps/jennetters/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-#define TAPPING_TERM 150
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/jennetters/keymap.c b/keyboards/keebio/iris/keymaps/jennetters/keymap.c
deleted file mode 100644
index c06079c926..0000000000
--- a/keyboards/keebio/iris/keymaps/jennetters/keymap.c
+++ /dev/null
@@ -1,206 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
- YUNO,
- SHRG,
- NOVY,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_YUNO YUNO
-#define KC_SHRG SHRG
-#define KC_NOVY NOVY
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-
-//Tap Dance Declartaions
-enum {
- ESC_GR = 0
-};
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT(
-
- // ,----+----+----+----+----+----. ,----+----+----+----+----+----.
- // | ESC| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | TAB| Q | W | E | R | T | | Y | U | I | O | P | BSP|
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | CAP| A | S | D | F | G | | H | J | K | L | ; | ' |
- // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- // | SFT| Z | X | C | V | B | SPC| | SPC| N | M | , | . | / | ENT|
- // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- // \ GUI| ALT| CTL / \RASE\ CTL | SFT /
- // `----+----+----' `----+----+----'
-
- TD(ESC_GR), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
- 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_QUOT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
- KC_LGUI, KC_LALT, KC_LCTL, KC_RASE, KC_RCTL, KC_RSFT
- ),
-
- [_LOWER] = LAYOUT_kc(
-
- // ,----+----+----+----+----+----. ,----+----+----+----+----+----.
- // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL|
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | | | | | | | | | | | | |PIPE|
- // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- // | \ | | | | | [ | ( | | ) | ] | | | | - | |
- // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- // \ | | DEL / \ DEL\ | /
- // `----+----+----' `----+----+----'
-
- TILD, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL, \
- , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, , \
- , , , , , , , , , , ,PIPE, \
- BL_S, , , , , LCBR, LPRN, RPRN, RCBR, , , , MINS, , \
- , , DEL, DEL, ,
- ),
-
- [_RAISE] = LAYOUT_kc(
- // ,----+----+----+----+----+----. ,----+----+----+----+----+----.
- // | | F1 | F2 | | | | | | | | [ | ] | = |
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | | | UP | | | | | | | | { | } | DEL|
- // |----+----+----+----+----+----| |----+----+----+----+----+----|
- // | | LT | DN | RT | | | |SHRG| | | |PIPE| |
- // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- // | | | | | | | | | | | | | | \ | |
- // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- // \ | | / \ \ | /
- // `----+----+----' `----+----+----'
-
- , F1, F2, , , , , , , LBRC, RBRC, EQL, \
- , , UP, , , , YUNO, NOVY, , LCBR, RCBR, DEL, \
- , LEFT, DOWN, RIGHT, , , SHRG, , , , PIPE, , \
- , , , , , , , , , , , , BSLS, , \
- , , , , ,
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void esc_gr_finished (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- register_code (KC_ESC);
- } else if (state->count == 2) {
- register_code (KC_GRV);
- } else {
- register_code (KC_LSFT);
- register_code (KC_GRV);
- }
-}
-
-void esc_gr_reset (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count == 1) {
- unregister_code (KC_ESC);
- } else if (state->count == 2) {
- unregister_code (KC_GRV);
- } else {
- unregister_code (KC_LSFT);
- unregister_code (KC_GRV);
- }
-}
-
-//Tap Dance Definitions
-qk_tap_dance_action_t tap_dance_actions[] = {
- //Tap once for ESC, twice for `, thrice for ~
- [ESC_GR] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, esc_gr_finished, esc_gr_reset)
- // Other declarations would go here, separated by commas, if you have them
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- case SHRG:
- if (record->event.pressed) {
- SEND_STRING("¯\\_(ツ)_/¯"); // I dunno.
- return false;
- }
- /* Ignore for now - special characters not working with macros
- }
- case NOVY:
- if (record->event.pressed) {
- SEND_STRING("ლ(ಠ_ಠლ)"); // YUNO?!
- return false;
- }
- */
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/jennetters/readme.md b/keyboards/keebio/iris/keymaps/jennetters/readme.md
deleted file mode 100644
index 272a4ed745..0000000000
--- a/keyboards/keebio/iris/keymaps/jennetters/readme.md
+++ /dev/null
@@ -1,10 +0,0 @@
-## jennetters iris keymap
-
-This keymap is based on the Iris default by [Bakingpy/nooges](https://github.com/nooges) without much deviation.
-
-* The QERTY layer remains largely the same with repositioning of the control key for ease of use.
-* L/RBRC, L/RCBR, and PIPE added to raise layer.
-* Arrow keys moved to wasd on raise layer.
-* Grave Escape added to maintain usage of ESC/~/` with top left key.
-
-See keymap.c for full details.
\ No newline at end of file
diff --git a/keyboards/keebio/iris/keymaps/jennetters/rules.mk b/keyboards/keebio/iris/keymaps/jennetters/rules.mk
deleted file mode 100644
index 1ba2fa8fbe..0000000000
--- a/keyboards/keebio/iris/keymaps/jennetters/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-TAP_DANCE_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/iris/keymaps/lewisridden/config.h b/keyboards/keebio/iris/keymaps/lewisridden/config.h
deleted file mode 100644
index 6d96b31bd9..0000000000
--- a/keyboards/keebio/iris/keymaps/lewisridden/config.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-//#define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/lewisridden/keymap.c b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c
deleted file mode 100644
index e5d12ebd11..0000000000
--- a/keyboards/keebio/iris/keymaps/lewisridden/keymap.c
+++ /dev/null
@@ -1,136 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,SPC , PSCR , N , M ,COMM,DOT ,SLSH,RGHT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LCTL,LOWR,SPC , ENT ,LGUI,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , ,PGUP, , ,LBRC, RBRC, P7 , P8 , P9 ,PLUS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,HOME,PGDN,END, ,LPRN, RPRN, P4 , P5 , P6 ,MINS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , BSPC , , P0
- // `----+----+----' `----+----+----'
-
-),
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , UP , , ,LBRC, RBRC, ,NLCK,INS ,SLCK,MUTE,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,LEFT,DOWN,RGHT, ,LPRN, RPRN,MPRV,MPLY,MNXT, ,VOLU,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , , , , ,VOLD,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/lewisridden/rules.mk b/keyboards/keebio/iris/keymaps/lewisridden/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/lewisridden/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/mojitas/keymap.c b/keyboards/keebio/iris/keymaps/mojitas/keymap.c
index 2ecfc0f6a1..e3ec651834 100644
--- a/keyboards/keebio/iris/keymaps/mojitas/keymap.c
+++ b/keyboards/keebio/iris/keymaps/mojitas/keymap.c
@@ -43,8 +43,6 @@ enum custom_keycodes {
ADJUST
};
-#define KC_ KC_TRNS
-
#define SE_YEN ALGR(SE_6) //isn't in the swedish_keymap.h
#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del
#define KC_TSKMGR LCTL(S(KC_ESC)) // Ctrl shift esc
diff --git a/keyboards/keebio/iris/keymaps/mtdjr/config.h b/keyboards/keebio/iris/keymaps/mtdjr/config.h
deleted file mode 100644
index 9adb6d6271..0000000000
--- a/keyboards/keebio/iris/keymaps/mtdjr/config.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-//#define SOLENOID_ENABLE
-//#define SOLENOID_PIN C6
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-//#define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-
-// #define AUDIO_CLICKY
-// #define AUDIO_CLICKY_ON
-// #define AUDIO_PIN C6
-// #define AUDIO_CLICKY_FREQ_RANDOMNESS 0.1f
-// #define AUDIO_CLICKY_FREQ_MAX 100.0f
-
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-// #undef RGBLED_NUM
-// #define RGBLIGHT_ANIMATIONS
-// #define RGBLED_NUM 12
-// #define RGBLIGHT_HUE_STEP 8
-// #define RGBLIGHT_SAT_STEP 8
-// #define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/mtdjr/keymap.c b/keyboards/keebio/iris/keymaps/mtdjr/keymap.c
deleted file mode 100644
index d6e3ec05e8..0000000000
--- a/keyboards/keebio/iris/keymaps/mtdjr/keymap.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "mtdjr.h"
-
-extern keymap_config_t keymap_config;
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- EXC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- EQL, Z , X , C , V , B ,LGUI, LALT, N , M ,COMM,DOT ,SLSH,MINS,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LCTL,RASE,SPC , SPC ,LOWR,xxxx
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , ,LCBR,RCBR,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , UP , , ,PIPE,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , ,LEFT,DOWN,RGHT, , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , ,HOME, ,END , ,EQL ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , , , , ,LBRC,RBRC,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , F5 , F6 , F7 , F8 , , , , , , ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , F9 ,F10 ,F11 ,F12 , , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , ,XCPY,XINS, , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- STOG,ROOT,PPLY,PSEF,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- xxxx, ,xxxx, xxxx, ,
- // `----+----+----' `----+----+----'
- )
-};
diff --git a/keyboards/keebio/iris/keymaps/mtdjr/rules.mk b/keyboards/keebio/iris/keymaps/mtdjr/rules.mk
deleted file mode 100644
index 7f8c630d8b..0000000000
--- a/keyboards/keebio/iris/keymaps/mtdjr/rules.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-RGBLIGHT_ENABLE = no
-BACKLIGHT_ENABLE = no
-#AUDIO_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/osiris/keymap.c b/keyboards/keebio/iris/keymaps/osiris/keymap.c
index a777c8a351..09ad74733d 100644
--- a/keyboards/keebio/iris/keymaps/osiris/keymap.c
+++ b/keyboards/keebio/iris/keymaps/osiris/keymap.c
@@ -17,8 +17,6 @@ enum custom_keycodes {
RAISE
};
-#define KC_ KC_TRNS
-
#define KC_LOWR LOWER
#define KC_RASE RAISE
#define KC_RST RESET
@@ -30,59 +28,59 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSLS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LESF, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RGHT,
+ KC_LESF, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBRC, KC_RBRC, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RGHT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,ENT , SPC ,RASE,RALT
+ KC_LGUI,KC_LOWR,KC_ENT , KC_SPC ,KC_RASE,KC_RALT
// `----+----+----' `----+----+----'
),
- [_COLEMAK] = LAYOUT_kc(
+ [_COLEMAK] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
+ KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSLS,
+ KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_BSLS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, A , R , S , T , D , H , N , E , I , O ,QUOT,
+ KC_LCTL, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LESF, Z , X , C , V , B ,LBRC, RBRC, K , M ,COMM,DOT ,SLSH,RGHT,
+ KC_LESF, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBRC, KC_RBRC, KC_K , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RGHT,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,ENT , SPC ,RASE,RALT
+ KC_LGUI,KC_LOWR,KC_ENT , KC_SPC ,KC_RASE,KC_RALT
// `----+----+----' `----+----+----'
),
- [_LOWER] = LAYOUT_kc(
+ [_LOWER] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL ,
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , ,BTN1, , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,KC_BTN1,_______,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , MS_L,MS_D,MS_U,MS_R, , ,
+ _______,_______,_______,_______,_______,_______, KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R,_______,_______,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , UP , , ,DOWN, , , , , ,
+ _______,_______,_______,_______,_______, KC_UP ,_______, _______,KC_DOWN,_______,_______,_______,_______,_______,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
+ _______,_______,_______, _______,_______, _______
// `----+----+----' `----+----+----'
),
- [_RAISE] = LAYOUT_kc(
+ [_RAISE] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
+ KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , ,VOLU, , ,LBRC, RBRC,UNDS,PLUS, , ,MUTE,
+ _______,_______,KC_VOLU,_______,_______,KC_LBRC, KC_RBRC,KC_UNDS,KC_PLUS,_______,_______,KC_MUTE,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MPLY,VOLD,MNXT, ,LPRN, RPRN,MINS,EQL , , , ,
+ _______,KC_MPLY,KC_VOLD,KC_MNXT,_______,KC_LPRN, KC_RPRN,KC_MINS,KC_EQL ,_______,_______,_______,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
+ _______,_______,_______, _______,_______, _______
// `----+----+----' `----+----+----'
),
diff --git a/keyboards/keebio/iris/keymaps/rdhaene/config.h b/keyboards/keebio/iris/keymaps/rdhaene/config.h
deleted file mode 100644
index 3c4b6cfd27..0000000000
--- a/keyboards/keebio/iris/keymaps/rdhaene/config.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-// #define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/rdhaene/keymap.c b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c
deleted file mode 100644
index 7a153346c5..0000000000
--- a/keyboards/keebio/iris/keymaps/rdhaene/keymap.c
+++ /dev/null
@@ -1,145 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RASE, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,SPC , ENT , N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LCTL,LOWR,SPC , ENT ,LGUI,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , DEL , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S,RST , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/rdhaene/rules.mk b/keyboards/keebio/iris/keymaps/rdhaene/rules.mk
deleted file mode 100644
index 4bfbfb2ae2..0000000000
--- a/keyboards/keebio/iris/keymaps/rdhaene/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = no
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/rs/keymap.c b/keyboards/keebio/iris/keymaps/rs/keymap.c
index 0e254ea190..40c62bbc81 100644
--- a/keyboards/keebio/iris/keymaps/rs/keymap.c
+++ b/keyboards/keebio/iris/keymaps/rs/keymap.c
@@ -2,43 +2,43 @@
#include "rs.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_EQL ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_ESCC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_SPC, KC_BSPC, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENTS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LGUI,SPC , BSPC,CODE,FN
+ KC_LALT,KC_LGUI,KC_SPC , KC_BSPC,KC_CODE,KC_FN
// `----+----+----' `+---+----+----'
),
- [_CODE] = LAYOUT_kc(
+ [_CODE] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_LPLT,KC_ASTR,KC_RPGT,KC_NEQL,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
+ _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_MINS,KC_LBRC, KC_UP ,KC_RBRC,_______,KC_BSLS,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , 6 , 7 , 8 , 9 , 0 , , ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
+ _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______, _______,KC_AMPR,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_PIPE,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , DOT, , ,
+ _______,_______, KC_DOT, _______,_______, _______
// `----+----+----' `----+----+----'
),
- [_FN] = LAYOUT_kc(
+ [_FN] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
+ _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- BLTG,BLUP, , , ,BRMU, , ,PGUP, , , ,
+ KC_BLTG,KC_BLUP,_______,_______,_______,KC_BRMU, _______,_______,KC_PGUP,_______,_______,_______,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,BLDN, , ,RST ,BRMD, , VOLU, ,CTRA,PGDN,CTRE, , ,
+ _______,KC_BLDN,_______,_______,KC_RST ,KC_BRMD,_______, KC_VOLU,_______,KC_CTRA,KC_PGDN,KC_CTRE,_______,_______,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , VOLD,MUTE,
+ _______,_______, _______, KC_VOLD,KC_MUTE, _______
// `----+----+----' `----+----+----'
),
};
diff --git a/keyboards/keebio/iris/keymaps/s1carii/config.h b/keyboards/keebio/iris/keymaps/s1carii/config.h
deleted file mode 100644
index 117f825234..0000000000
--- a/keyboards/keebio/iris/keymaps/s1carii/config.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/s1carii/keymap.c b/keyboards/keebio/iris/keymaps/s1carii/keymap.c
deleted file mode 100644
index 4655bb1ad9..0000000000
--- a/keyboards/keebio/iris/keymaps/s1carii/keymap.c
+++ /dev/null
@@ -1,144 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-//#define KC_DEV DEVLAYER
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LOWR, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,LGUI, RCMD, N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+-+--+----+----+----'
- RCTL,ENT ,SPC , SPC ,RASE,RALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----.
- GRV , , , , , , , , ,MINS,EQL ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , ,PGDN, UP ,PGUP,LBRC,RBRC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,VOLD,VOLU,MUTE, , , HOME,LEFT,DOWN,RGHT, , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, , , , , ,LGUI, RCMD,END , , , ,PSCR,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+-+--+----+----+----'
- RCTL,ENT ,SPC , SPC , ,RALT
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , UP , , , , , P7 , P8 , P9 ,PSLS,PAST,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,LEFT,DOWN,RGHT, , , , P4 , P5 , P6 ,PMNS,PPLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , NLCK, , P1 , P2 , P3 ,PDOT,PENT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+-+--+----+----+----'
- RCTL,ENT ,SPC , SPC , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT_kc(
- //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----.
- , , , , ,RST , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , ,DBUG, , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+-+--+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-
- /*
- [_DEVLAYER] = LAYOUT_kc(
- //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----.
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+-+--+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-*/
-
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/s1carii/readme.md b/keyboards/keebio/iris/keymaps/s1carii/readme.md
deleted file mode 100644
index 6d94b6c877..0000000000
--- a/keyboards/keebio/iris/keymaps/s1carii/readme.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Pok3r Based iris Keymap
-
-Pok3r was what got me into mechanical keyboards years ago and what has been my daily driver since, WhiteFox and the like being always on the periphery. As such, those keybinds are what is most natural and notably not in the default keymap configuration.
-
-Make example for this keymap (after setting up your build environment):
-
- make iris/rev2:s1carii:avrdude
-
-See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
diff --git a/keyboards/keebio/iris/keymaps/s1carii/rules.mk b/keyboards/keebio/iris/keymaps/s1carii/rules.mk
deleted file mode 100644
index 5cf55d3d79..0000000000
--- a/keyboards/keebio/iris/keymaps/s1carii/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = no
-BACKLIGHT_ENABLE= no
diff --git a/keyboards/keebio/iris/keymaps/saviof/config.h b/keyboards/keebio/iris/keymaps/saviof/config.h
deleted file mode 100644
index eb4c7328eb..0000000000
--- a/keyboards/keebio/iris/keymaps/saviof/config.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright 2018 Savio Fernandes
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-//#define USE_SERIAL
-#define USE_I2C
-
-/* Select hand configuration */
-
-//#define MASTER_LEFT
-#define MASTER_RIGHT
-// #define BACKLIGHT_BREATHING
-// #define EE_HANDS
-
-#define TAPPING_TERM 200
-
-// #undef RGBLED_NUM
-// #define RGBLIGHT_ANIMATIONS
-// #define RGBLED_NUM 30
-// #define RGBLIGHT_HUE_STEP 8
-// #define RGBLIGHT_SAT_STEP 8
-// #define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/iris/keymaps/saviof/keymap.c b/keyboards/keebio/iris/keymaps/saviof/keymap.c
deleted file mode 100644
index a63e606821..0000000000
--- a/keyboards/keebio/iris/keymaps/saviof/keymap.c
+++ /dev/null
@@ -1,107 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJ 3
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJ,
-};
-
-//Tap Dance Declarations
-enum {
- TD_SPC_ENT = 0
-};
-
-//Tap Dance Definitions
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LT(_LOWER, KC_LEFT) //LOWER
-#define KC_RASE LT(_RAISE, KC_RIGHT) //RAISE
-#define KC_ADJT LT(_ADJ, KC_LGUI) //RAISE
-#define KC_SCET TD(TD_SPC_ENT)
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_LMOD RGB_RMOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-#define KC_BTOG BL_TOGG
-#define KC_BLVL BL_STEP
-#define KC_BRTG BL_BRTG
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LCTL, Z , X , C , V , B ,HOME, END , N , M ,COMM,DOT ,SLSH,RSFT,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- ADJT,LOWR, SPC, SCET,RASE, ENT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH, DLR,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , DEL , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJ] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,LMOD, , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RTOG,RMOD,RHUI,RSAI,RVAI, , BTOG,BLVL,BRTG, , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S,RST , , , , , , , , , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- )
-
-};
diff --git a/keyboards/keebio/iris/keymaps/saviof/rules.mk b/keyboards/keebio/iris/keymaps/saviof/rules.mk
deleted file mode 100644
index 0e1023be1a..0000000000
--- a/keyboards/keebio/iris/keymaps/saviof/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-TAP_DANCE_ENABLE=yes
diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c
index 269350403f..3195a2ba0f 100644
--- a/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c
+++ b/keyboards/keebio/iris/keymaps/sethBarberee/keymap.c
@@ -17,8 +17,6 @@
extern backlight_config_t backlight_config;
-#define KC_ KC_TRNS
-
#define KC_RST RESET
#define KC_BL_S BL_STEP
#define KC_RTOG RGB_TOG
diff --git a/keyboards/keebio/iris/keymaps/swedish/config.h b/keyboards/keebio/iris/keymaps/swedish/config.h
deleted file mode 100644
index 4e3e558613..0000000000
--- a/keyboards/keebio/iris/keymaps/swedish/config.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-// #define MASTER_LEFT
-// #define MASTER_RIGHT
-#define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/swedish/keymap.c b/keyboards/keebio/iris/keymaps/swedish/keymap.c
deleted file mode 100644
index c6b7f6afd2..0000000000
--- a/keyboards/keebio/iris/keymaps/swedish/keymap.c
+++ /dev/null
@@ -1,109 +0,0 @@
-#include "iris.h"
-#include "keymap_swedish.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _EMPTY 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE
-};
-
-#define KC_ KC_TRNS
-
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-
-#define KC_AA SE_AA
-#define KC_AE SE_AE
-#define KC_OE SE_OSLH
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P , AA ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, A , S , D , F , G , H , J , K , L , OE , AE ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LCTL, Z , X , C , V , B ,DEL , BSPC, N , M ,COMM,DOT ,SLSH,MINS,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPC , ENT ,RASE,LALT
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT(
- //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
- SE_TILD,KC_EXLM,SE_AT ,KC_HASH,SE_DLR ,KC_PERC, SE_CIRC,SE_AMPR,SE_ASTR,SE_SLSH,SE_LPRN,SE_RPRN,
- //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- SE_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,SE_PIPE,SE_LCBR,SE_RCBR,
- //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,SE_LBRC,SE_RBRC,
- //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
- KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_LESS,SE_GRTR,
- //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
- KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
- // `-------+-------+-------' `-------+-------+-------'
- ),
-
- [_RAISE] = LAYOUT(
- //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
- KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
- //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- SE_GRV ,KC_7 ,KC_8 ,KC_9 ,SE_MINS,SE_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,SE_PIPE,
- //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
- KC_TRNS,KC_4 ,KC_5 ,KC_6 ,SE_PLUS,SE_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,SE_BSLS,
- //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
- KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,SE_EQL ,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
- // `-------+-------+-------' `-------+-------+-------'
- )
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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);
- update_tri_layer(_LOWER, _RAISE, _EMPTY);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _EMPTY);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _EMPTY);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _EMPTY);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/swedish/rules.mk b/keyboards/keebio/iris/keymaps/swedish/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/swedish/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/transmogrified/Readme.md b/keyboards/keebio/iris/keymaps/transmogrified/Readme.md
deleted file mode 100644
index 96e27411dd..0000000000
--- a/keyboards/keebio/iris/keymaps/transmogrified/Readme.md
+++ /dev/null
@@ -1,9 +0,0 @@
-This layout is an attempt to make switching between the Iris and my laptop keyboard as seemless as possible. I switch caps lock and Ctrl/ESC on my laptop and I am able to adjust well with everything else... I still miss the Iris, but I am able to get work done.
-
-I use the following lighting queues to indicate layer changes.
-
-* Momentary toggled layer : LEDs brighten and dim when layer is released.
-* Locked layer : LEDs breath.
-* Config layer locked : LEDs off.
-
-NOTE you will need to flash both sides to update the brightness_levels so that breathing works on both sides as expected.
diff --git a/keyboards/keebio/iris/keymaps/transmogrified/config.h b/keyboards/keebio/iris/keymaps/transmogrified/config.h
deleted file mode 100644
index 12f2d7d6d8..0000000000
--- a/keyboards/keebio/iris/keymaps/transmogrified/config.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Copyright 2017 Adam Roberts
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-//#define MASTER_LEFT
-#define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#define NO_USB_STARTUP_CHECK //keep both sides on when pc is sleeping.
-#define TAPPING_TERM 200
-
-// Remove features i don't use
-#define NO_ACTION_ONESHOT
-#define NO_ACTION_MACRO
-
-// Override the rev2 config.h BACKLIGHT_LEVELS setting
-#undef BACKLIGHT_LEVELS
-#define BACKLIGHT_LEVELS 125
diff --git a/keyboards/keebio/iris/keymaps/transmogrified/keymap.c b/keyboards/keebio/iris/keymaps/transmogrified/keymap.c
deleted file mode 100644
index 67545f08e6..0000000000
--- a/keyboards/keebio/iris/keymaps/transmogrified/keymap.c
+++ /dev/null
@@ -1,421 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _COLEMAK 1
-#define _RLAYER 2
-#define _LLAYER 3
-#define _DUAL 4
-#define _CONFIG 5
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE, // qwerty base layer
- COLEMAK, // colemak base layer
- RLAYER, // right layer
- LLAYER, // left layer
- RLOCK, // right layer LOCK
- LLOCK, // left layer LOCK
- DUAL, // right and left combo layer
- CONFIG, // config layer
- LEDUP, // custom LED brightness increase keycode
- LEDDOWN, // custom LED brightness decrease keycode
-};
-
-/* Tap Dance */
-enum {
- TD_LGUIAPP, // LGUI x1, app/menu x2
- TD_SHIFTCAPS, // LSHIFT x1, CAPS x3
- TD_CTRLALTDL, // CTRL+ALT+DEL x3
- TD_SHIFTCLAT, // LSHIFT x1, LCRTL x2, LALT x3, CTRL+ALT x4
-};
-
-/* NOOP Key and Transparent */
-#define KC_ KC_TRNS
-#define KC_XXXX KC_NO
-
-/* LAYERS / CUSTOM KEYS */
-#define KC_LLAY LLAYER
-#define KC_RLAY RLAYER
-#define KC_RLOK RLOCK
-#define KC_LLOK LLOCK
-#define KC_QWER QWERTY
-#define KC_COLE COLEMAK
-#define KC_DUAL DUAL
-#define KC_CONF CONFIG
-#define KC_BLUP LEDUP
-#define KC_BLDN LEDDOWN
-
-/* Custom Shortened Keys (4 digits so they fit in my grid) */
-#define KC_MCTB LCTL(KC_TAB)
-#define KC_MCST LCTL(LSFT(KC_TAB))
-#define KC_CTEC CTL_T(KC_ESC)
-#define KC_SINS LSFT(KC_INS)
-#define KC_LGU1 LGUI(KC_1)
-#define KC_LGU2 LGUI(KC_2)
-#define KC_LGU3 LGUI(KC_3)
-#define KC_LGU4 LGUI(KC_4)
-#define KC_LGU5 LGUI(KC_5)
-#define KC_LGU6 LGUI(KC_6)
-#define KC_LGU7 LGUI(KC_7)
-#define KC_LGU8 LGUI(KC_8)
-#define KC_LGU9 LGUI(KC_9)
-#define KC_LGU0 LGUI(KC_0)
-#define KC_SYSR KC_SYSREQ
-#define KC_REST RESET
-
-/* Tap Dance */
-#define KC_LGUA TD(TD_LGUIAPP)
-#define KC_SHCP TD(TD_SHIFTCAPS)
-#define KC_CADL TD(TD_CTRLALTDL)
-#define KC_SHCA TD(TD_SHIFTCLAT)
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- CADL, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTEC, A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SHCP, Z , X , C , V , B ,LLOK, RLOK, N , M ,COMM,DOT ,SLSH,SHCA,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LLAY,TAB , SPC ,RLAY,LGUA
- // `----+----+----' `----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- CADL, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,DEL ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTEC, A , R , S , T , D , H , N , E , I , O ,ENT ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- SHCP, Z , X , C , V , B ,LLOK, RLOK, K , M ,COMM,DOT ,SLSH,SHCA,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LALT,LLAY,TAB , SPC ,RLAY,LGUA
- // `----+----+----' `----+----+----'
- ),
-
- [_RLAYER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,SLCK,SYSR,PSCR,INS ,PAUS, MUTE,VOLD,VOLU,BLDN,BLUP, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,TILD,GRV ,EQL ,LBRC,RBRC, ASTR,HOME, UP ,PGUP,PLUS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM,PIPE,DLR ,LPRN,RPRN, AMPR,LEFT,DOWN,RGHT,MINS,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- , AT ,HASH,PERC,LCBR,RCBR, , ,CIRC,END ,UNDS,PGDN,BSLS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_LLAYER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,XXXX,XXXX, UP , F5 ,XXXX, ASTR, 7 , 8 , 9 ,PLUS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,XXXX,MCST,DOWN,MCTB,ENT , SLSH, 4 , 5 , 6 ,MINS, ,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,XXXX,XXXX,BSPC,SINS,SPC ,F11 , F12 ,EQL , 1 , 2 , 3 ,DOT , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , 0 , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_DUAL] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,MS_U,XXXX,XXXX,XXXX,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,XXXX,XXXX,XXXX,XXXX,XXXX, BTN2,MS_L,MS_D,MS_R,BTN1,XXXX,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- ,LGU1,LGU2,LGU3,LGU4,LGU5,CONF, XXXX,LGU6,LGU7,LGU8,LGU9,LGU0, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_CONFIG] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- REST,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- XXXX,QWER,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- XXXX,XXXX,XXXX,XXXX,XXXX,XXXX, XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- XXXX,XXXX,XXXX,COLE,XXXX,XXXX, , ,XXXX,XXXX,XXXX,XXXX,XXXX,XXXX,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- XXXX, ,XXXX, XXXX, ,XXXX
- // `----+----+----' `----+----+----'
- ),
-};
-
-
-/* VARIABLES */
-// Configurable Variables for layer toggled light
-int layerBLStep = 20; // change how much the brightness changes when holding layer key
-int breathPulse = 5; // timing of the breathing
-int breathPulseStall = 3; // time to pause at top and bottom of breath cycle
-int blSteps = 6; // blSteps + 1 is the amount of brightness settings when manually adjusting
-
-// Variables needed for layer locked breathing and layer toggling lighting to work
-int counter = 0;
-bool breathUp = true;
-bool resetBL = false;
-bool rlocked = false;
-bool llocked = false;
-bool configOn = false;
-int lockedBLLevel;
-int momentaryLBLLevel;
-int momentaryRBLLevel;
-int currentBL;
-/* END VARIABLES */
-
-/* TAP DANCE */
-void shift_caps_down (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 3) {
- register_code (KC_CAPS);
- } else {
- register_code (KC_LSFT);
- }
-}
-void shift_caps_up (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 3) {
- unregister_code (KC_CAPS);
- } else {
- unregister_code (KC_LSFT);
- }
-}
-void shift_ctrlalt_down (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 4) {
- register_code (KC_LCTL);
- register_code (KC_LALT);
- } else if (state->count == 3) {
- register_code (KC_LALT);
- } else if (state->count == 2) {
- register_code (KC_LCTL);
- } else {
- register_code (KC_RSFT);
- }
-}
-void shift_ctlalt_up (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 4) {
- unregister_code (KC_LALT);
- unregister_code (KC_LCTL);
- } else if (state->count == 3) {
- unregister_code (KC_LALT);
- } else if (state->count == 2) {
- unregister_code (KC_LCTL);
- } else {
- unregister_code (KC_RSFT);
- }
-}
-void ctrlaltdel_up (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 3) {
- unregister_code (KC_DEL);
- unregister_code (KC_LALT);
- unregister_code (KC_LCTL);
- } else {
- }
-}
-void ctrlaltdel_down (qk_tap_dance_state_t *state, void *user_data) {
- if (state->count >= 3) {
- register_code (KC_LCTL);
- register_code (KC_LALT);
- register_code (KC_DEL);
- } else {
- }
-}
-qk_tap_dance_action_t tap_dance_actions[] = {
- [TD_LGUIAPP] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, KC_APP),
- [TD_SHIFTCAPS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, shift_caps_down, shift_caps_up),
- [TD_SHIFTCLAT] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, shift_ctrlalt_down, shift_ctlalt_up),
- [TD_CTRLALTDL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ctrlaltdel_down, ctrlaltdel_up)
-};
-/* END TAP DANCE */
-
-
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
- configOn = false;
- if (momentaryRBLLevel != 0 || momentaryLBLLevel != 0){
- backlight_toggle();
- }
- }
- return false;
- break;
- case COLEMAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_COLEMAK);
- configOn = false;
- if (momentaryRBLLevel != 0 || momentaryLBLLevel != 0){
- backlight_toggle();
- }
- }
- return false;
- break;
- case CONFIG:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_CONFIG);
- configOn = true;
- if (momentaryRBLLevel != 0 || momentaryLBLLevel != 0){
- backlight_toggle();
- }
- }
- return false;
- break;
- case RLAYER:
- if (record->event.pressed) {
- layer_on(_RLAYER);
- update_tri_layer(_RLAYER, _LLAYER, _DUAL);
- momentaryRBLLevel = get_backlight_level();
- if (momentaryRBLLevel != 0 || momentaryLBLLevel != 0){
- for (int i = 0; i < layerBLStep ; i++){
- backlight_increase();
- }
- }
- } else {
- unregister_code(KC_LGUI);
- layer_off(_RLAYER);
- update_tri_layer(_RLAYER, _LLAYER, _DUAL);
- if ( llocked == false && configOn == false ) {
- for (int i = 0; i < layerBLStep ; i++){
- backlight_decrease();
- }
- } else {
- }
- rlocked = false;
- }
- return false;
- break;
- case LLAYER:
- if (record->event.pressed) {
- layer_on(_LLAYER);
- update_tri_layer(_RLAYER, _LLAYER, _DUAL);
- momentaryLBLLevel = get_backlight_level();
- if (momentaryRBLLevel != 0 || momentaryLBLLevel != 0){
- for (int i = 0; i < layerBLStep ; i++){
- backlight_increase();
- }
- }
- } else {
- layer_off(_LLAYER);
- update_tri_layer(_RLAYER, _LLAYER, _DUAL);
- if ( rlocked == false && configOn == false ) {
- for (int i = 0; i < layerBLStep ; i++){
- backlight_decrease();
- }
- } else {
- }
- llocked = false;
- }
- return false;
- break;
- case RLOCK:
- if (record->event.pressed) {
- layer_on(_RLAYER);
- /* add logic to toggle backlight change when on a layer */
- if (rlocked == false && llocked == false){
- lockedBLLevel = get_backlight_level();
- }
- rlocked = true;
- } else {
- }
- return false;
- break;
- case LLOCK:
- if (record->event.pressed) {
- layer_on(_LLAYER);
- /* add logic to toggle backlight change when on a layer */
- if (rlocked == false && llocked == false){
- lockedBLLevel = get_backlight_level();
- }
- llocked = true;
- } else {
- }
- return false;
- break;
- case LEDUP:
- if (record->event.pressed) {
- for (int i = 0; i < (BACKLIGHT_LEVELS / blSteps ) ; i++ ){
- backlight_increase();
- }
- } else {
- }
- return false;
- break;
- case LEDDOWN:
- if (record->event.pressed) {
- for (int i = 0; i < (BACKLIGHT_LEVELS / blSteps ) ; i++ ){
- backlight_decrease();
- }
- } else {
- }
- return false;
- break;
- }
- return true;
-}
-
-
-// LED breathing when a layer is locked
-void matrix_scan_user(void) {
- // Only breath if layer is locked
- if (lockedBLLevel != 0 && (rlocked || llocked)){
- // counter to slow down the breathing
- if (counter >= breathPulse) {
- counter = 0;
- // iterate brightness up or down
- if (breathUp){
- backlight_increase();
- } else {
- backlight_decrease();
- }
- // figure out if we need to change directions
- currentBL = get_backlight_level();
- if (currentBL >= BACKLIGHT_LEVELS){
- breathUp = false;
- // make counter a big negative number to add some stall time
- counter = ((BACKLIGHT_LEVELS * breathPulseStall) * (-1));
- } else if (currentBL == 0){
- breathUp = true;
- // make counter a big negative number to add some stall time
- counter = ((BACKLIGHT_LEVELS * breathPulseStall) * (-1));
- }
- // make not that we need to change the brightness back to when we started the breathing
- resetBL = true;
- } else {
- counter++;
- }
- } else {
- // get the brightness back to the level it started at
- if (resetBL){
- int i = 0;
- // i is just there to make sure i don't get stuck in a loop if for some reason get_backlight_level isn't working as expected
- while (get_backlight_level() != lockedBLLevel && i <= BACKLIGHT_LEVELS ){
- backlight_step();
- i++;
- }
- resetBL = false;
- }
- }
-}
diff --git a/keyboards/keebio/iris/keymaps/transmogrified/rules.mk b/keyboards/keebio/iris/keymaps/transmogrified/rules.mk
deleted file mode 100644
index 444fa38a93..0000000000
--- a/keyboards/keebio/iris/keymaps/transmogrified/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-BACKLIGHT_ENABLE = yes
-TAP_DANCE_ENABLE = yes
-
diff --git a/keyboards/keebio/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c
index cc120c1585..e5e8aebd28 100644
--- a/keyboards/keebio/iris/keymaps/xyverz/keymap.c
+++ b/keyboards/keebio/iris/keymaps/xyverz/keymap.c
@@ -23,7 +23,6 @@ enum custom_keycodes {
ADJUST
};
-#define KC_____ KC_TRNS
#define KC_LOWR LOWER
#define KC_RASE RAISE
#define KC_RST RESET
@@ -40,60 +39,60 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_DVORAK] = LAYOUT_kc (
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS,
- TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,
- ESC , A , O , E , U , I , D , H , T , N , S ,MINS,
- LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT,
- LCTL,BSLT,LGUI, ENT ,SPC ,LALT
+ [_DVORAK] = LAYOUT (
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSLS,
+ KC_TAB ,KC_QUOT,KC_COMM,KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L ,KC_SLSH,
+ KC_ESC , KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S ,KC_MINS,
+ KC_LSFT,KC_SCLN, KC_Q , KC_J , KC_K , KC_X ,KC_LOWR, KC_RASE, KC_B , KC_M , KC_W , KC_V , KC_Z ,KC_RSFT,
+ KC_LCTL,KC_BSLT,KC_LGUI, KC_ENT ,KC_SPC ,KC_LALT
),
- [_QWERTY] = LAYOUT_kc (
- EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,
- ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- LSFT, Z , X , C , V , B ,LOWR, RASE, N , M ,COMM,DOT ,SLSH,RSFT,
- LCTL,BSPC,LGUI, ENT ,SPC ,LALT
+ [_QWERTY] = LAYOUT (
+ KC_EQL , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINS,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSLS,
+ KC_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_LOWR, KC_RASE, KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
+ KC_LCTL,KC_BSPC,KC_LGUI, KC_ENT ,KC_SPC ,KC_LALT
),
- [_COLEMAK] = LAYOUT_kc (
- EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
- ESC , A , R , S , T , D , H , N , E , I , O ,QUOT,
- LSFT, Z , X , C , V , B ,LOWR, RASE, K , M ,COMM,DOT ,SLSH,RSFT,
- LCTL,BSPC,LGUI, ENT ,SPC ,LALT
+ [_COLEMAK] = LAYOUT (
+ KC_EQL , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINS,
+ 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_LOWR, KC_RASE, KC_K , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
+ KC_LCTL,KC_BSPC,KC_LGUI, KC_ENT ,KC_SPC ,KC_LALT
),
- [_WOW] = LAYOUT_kc (
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSLS,
- TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,
- ESC , A , O , E , U , I , D , H , T , N , S ,MINS,
- LSFT,SCLN, Q , J , K , X ,LALT, RGUI, B , M , W , V , Z ,RSFT,
- LOWR,BSPC,LCTL, ENT ,SPC ,RASE
+ [_WOW] = LAYOUT (
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSLS,
+ KC_TAB ,KC_QUOT,KC_COMM,KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L ,KC_SLSH,
+ KC_ESC , KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S ,KC_MINS,
+ KC_LSFT,KC_SCLN, KC_Q , KC_J , KC_K , KC_X ,KC_LALT, KC_RGUI, KC_B , KC_M , KC_W , KC_V , KC_Z ,KC_RSFT,
+ KC_LOWR,KC_BSPC,KC_LCTL, KC_ENT ,KC_SPC ,KC_RASE
),
- [_LOWER] = LAYOUT_kc (
- F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 ,
- TILD,____,____, UP ,____,____, ____,____,____,____,____,____,
- CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,UNDS,PLUS,LCBR,RCBR,PIPE,
- BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____,
- ____,DEL ,____, ____,INS ,____
+ [_LOWER] = LAYOUT (
+ KC_F11 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F12 ,
+ KC_TILD,_______,_______, KC_UP ,_______,_______, _______,_______,_______,_______,_______,_______,
+ KC_CAPS,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_HOME, KC_PGUP,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,
+ KC_BL_S,_______,KC_MUTE,KC_VOLD,KC_VOLU,KC_END ,_______, _______,KC_PGDN,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,
+ _______,KC_DEL ,_______, _______,KC_INS ,_______
),
- [_RAISE] = LAYOUT_kc (
- F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 ,
- GRV ,____,____, UP ,____,____, ____,____,____,____,____,____,
- CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,MINS,EQL ,LBRC,RBRC,BSLS,
- BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____,
- ____,DEL ,____, ____,INS ,____
+ [_RAISE] = LAYOUT (
+ KC_F11 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F12 ,
+ KC_GRV ,_______,_______, KC_UP ,_______,_______, _______,_______,_______,_______,_______,_______,
+ KC_CAPS,_______,KC_LEFT,KC_DOWN,KC_RGHT,KC_HOME, KC_PGUP,KC_MINS,KC_EQL ,KC_LBRC,KC_RBRC,KC_BSLS,
+ KC_BL_S,_______,KC_MUTE,KC_VOLD,KC_VOLU,KC_END ,_______, _______,KC_PGDN,KC_MPRV,KC_MPLY,KC_MNXT,_______,_______,
+ _______,KC_DEL ,_______, _______,KC_INS ,_______
),
- [_ADJUST] = LAYOUT_kc (
- F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 ,
- ____,RST ,____,____,____,____, ____,____,____,____,____,____,
- ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,WOW ,____,
- ____,____,____,____,____,____,____, ____,____,____,____,____,____,____,
- ____,____,____, ____,____,____
+ [_ADJUST] = LAYOUT (
+ KC_F11 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F12 ,
+ _______,KC_RST ,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
+ _______,_______,_______,_______,_______,_______, _______,KC_QWRT,KC_CLMK,KC_DVRK,KC_WOW ,_______,
+ _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,_______,
+ _______,_______,_______, _______,_______,_______
)
};
@@ -137,4 +136,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
}
return true;
-}
\ No newline at end of file
+}
diff --git a/keyboards/keebio/iris/keymaps/yanfali/config.h b/keyboards/keebio/iris/keymaps/yanfali/config.h
deleted file mode 100644
index 81df2e9164..0000000000
--- a/keyboards/keebio/iris/keymaps/yanfali/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/iris/keymaps/yanfali/keymap.c b/keyboards/keebio/iris/keymaps/yanfali/keymap.c
deleted file mode 100644
index 92117bd6de..0000000000
--- a/keyboards/keebio/iris/keymaps/yanfali/keymap.c
+++ /dev/null
@@ -1,144 +0,0 @@
-#include "iris.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _LOWER 1
-#define _RAISE 2
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- LOWER,
- RAISE,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_ESCC MT(MOD_LCTL, KC_ESC) // Control (hold), Escape (tap)
-#define KC_BACK LGUI(KC_LEFT) // Browser Back
-#define KC_FORW LGUI(KC_RIGHT) // Browser Forward
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-#define KC_RST RESET
-#define KC_BL_S BL_STEP
-#define KC_ENTS MT(MOD_LSFT, KC_ENT)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,PLUS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- LSFT, Z , X , C , V , B ,SPC , LALT, N , M ,COMM,DOT ,SLSH,DEL ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- LGUI,LOWR,SPC , BSPC,ENTS,RASE
- // `----+----+----' `----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- BL_S,CPYP, , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , ,DEL , DEL , , P0
- // `----+----+----' `----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,MPRV,BACK,FORW,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
- //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
- , , , , ,
- // `----+----+----' `----+----+----'
- ),
-
- [_ADJUST] = LAYOUT(
- //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
- //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
- _______, _______, _______, _______, _______, _______
- // `--------+--------+--------' `--------+--------+--------'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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 LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/iris/keymaps/yanfali/readme.md b/keyboards/keebio/iris/keymaps/yanfali/readme.md
deleted file mode 100644
index f72e88e51e..0000000000
--- a/keyboards/keebio/iris/keymaps/yanfali/readme.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## u/yanfali keymap for Iris
-
-Based heavily off Hexwire's configuration. Differs in following ways:
-
- 1. Moved LALT to LCTL; I don't need CTL because of ESCC.
- 1. Moved RAISE to old LALT.
- 1. Moved ENTER to old RAISE.
- 1. Move QUOTE to old ENTER.
- 1. Moved PLUS to old QUOTE.
- 1. replaced music next and volume up with browser forward and back
- through history
-
-This configuration lets me use my thumbs for enter and backspace.
-It turns out I need `+` a lot for programming so I moved it logically
-below `-`. I also added a couple of web specific short cuts for
-navigating previous and next in web history on OSX Chrome.
-
diff --git a/keyboards/keebio/iris/keymaps/yanfali/rules.mk b/keyboards/keebio/iris/keymaps/yanfali/rules.mk
deleted file mode 100644
index 73142a1680..0000000000
--- a/keyboards/keebio/iris/keymaps/yanfali/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c
deleted file mode 100644
index 97fb70af5e..0000000000
--- a/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _BASE 0
-#define _FN1 1
-#define _FN2 2
-
-#define KC_ KC_TRNS
-#define KC_FN1 MO(_FN1)
-#define KC_FN2 MO(_FN2)
-#define KC_SPFN1 LT(_FN1, KC_SPACE)
-#define KC_SPFN2 LT(_FN2, KC_SPACE)
-#define KC_BSFN1 LT(_FN1, KC_BSPC)
-#define KC_BSFN2 LT(_FN2, KC_BSPC)
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BASE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----.
- ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL ,BSPC,
- //|----`----`----`----`----`----`----`----`----`----`----`----`----+
- TAB , A , S , D , F , G , H , J , K , L ,QUOT, ENTER ,
- //|-----`----`----`----`----`----`----`----`----`----`----`--------+
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT ,
- //|-------`----`----`----`----`----`----`----`----`----`----`------+
- GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1
- //`-----+----+-----+----+--------+--------+-----+-----+-----+------'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,
- //|----`----`----`----`----`----`----`----`----`----`----`----`----+
- RST ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, 4 , 5 , 6 ,SCLN, ,
- //|-----`----`----`----`----`----`----`----`----`----`----`--------+
- RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , ,
- //|-------`----`----`----`----`----`----`----`----`----`----`------+
- RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT
- //`-----+----+-----+----+--------+--------+-----+-----+-----+------'
- ),
-
- [_FN2] = LAYOUT_kc(
- //,----+----+----+----+----+----+----+----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS,
- //|----`----`----`----`----`----`----`----`----`----`----`----`----+
- , , ,INS ,PGUP,HOME, , , , ,COLN, ,
- //|-----`----`----`----`----`----`----`----`----`----`----`--------+
- , , ,DEL ,PGDN,END , , , , , , ,
- //|-------`----`----`----`----`----`----`----`----`----`----`------+
- , , , , DEL , , , , ,
- //`-----+----+-----+----+--------+--------+-----+-----+-----+------'
- )
-};
diff --git a/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk b/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/keyboards/keebio/laplace/laplace.h b/keyboards/keebio/laplace/laplace.h
index fc0510fe58..0be1e95b9d 100644
--- a/keyboards/keebio/laplace/laplace.h
+++ b/keyboards/keebio/laplace/laplace.h
@@ -17,17 +17,3 @@
{D1, D2, D3, D4, D5, KC_NO, D7}, \
{KC_NO, D13, D12, D11, D10, KC_NO, KC_NO} \
}
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, \
- B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B13, \
- C1, C2, C3, C4, C5, C6, C7, C9, C10, C11, C12, C13, \
- D1, D2, D3, D4, D5, D7, D10, D11, D12, D13 \
- ) \
- LAYOUT( \
- KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, KC_##A11, KC_##A12, KC_##A13, \
- KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, KC_##B11, KC_##B13, \
- KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C9, KC_##C10, KC_##C11, KC_##C12, KC_##C13, \
- KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D7, KC_##D10, KC_##D11, KC_##D12, KC_##D13 \
- )
diff --git a/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h b/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h
deleted file mode 100644
index 1db6ea433f..0000000000
--- a/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c
deleted file mode 100644
index 6a6ab496ab..0000000000
--- a/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c
+++ /dev/null
@@ -1,203 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _COLEMAK 1
-#define _DVORAK 2
-#define _LOWER 3
-#define _RAISE 4
-#define _FN3 5
-#define _FN4 6
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- COLEMAK,
- DVORAK,
- LOWER,
- RAISE,
- FN3,
- FN4,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_X0 MT(MOD_LCTL, KC_ESC)
-#define KC_X1 LOWER
-#define KC_X2 RAISE
-#define KC_X3 LT(_FN3, KC_GRV)
-#define KC_X4 MT(MOD_LSFT, KC_ENT)
-#define KC_X5 BL_STEP
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL, X1 ,LGUI,SPC ,SPC , BSPC,BSPC, X2 ,RALT, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL, X1 ,LGUI,SPC ,SPC , BSPC,BSPC, X2 ,RALT, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL, X1 ,LGUI,SPC ,SPC , BSPC,BSPC, X2 ,RALT, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- X5 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , ,DEL , DEL , , P0 ,PDOT, ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
-/* Adjust (Lower + Raise)
- * ,-----------------------------------------------------------------------------------.
- * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
- [_ADJUST] = LAYOUT( \
- _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
- _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
- )
-
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk b/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk
deleted file mode 100644
index d7463419b4..0000000000
--- a/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/levinson/keymaps/jyh/config.h b/keyboards/keebio/levinson/keymaps/jyh/config.h
deleted file mode 100644
index d3e598bd09..0000000000
--- a/keyboards/keebio/levinson/keymaps/jyh/config.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-#pragma once
-
-/* Select hand configuration */
-#define MASTER_LEFT
-
-/* Tap Dance timing */
-#define TAPPING_TERM 150
-
-/* Toggling layer requires # taps */
-#define TAPPING_TOGGLE 2
diff --git a/keyboards/keebio/levinson/keymaps/omgvee/config.h b/keyboards/keebio/levinson/keymaps/omgvee/config.h
deleted file mode 100644
index ba005c0b25..0000000000
--- a/keyboards/keebio/levinson/keymaps/omgvee/config.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_LIMIT_VAL 120
-#define RGBLIGHT_HUE_STEP 10
-#define RGBLIGHT_SAT_STEP 17
-#define RGBLIGHT_VAL_STEP 17
-
-#undef PRODUCT
-#define PRODUCT "Vee's hotswappable LEVINSON purely ortholinear keeb"
-
diff --git a/keyboards/keebio/levinson/keymaps/omgvee/keymap.c b/keyboards/keebio/levinson/keymaps/omgvee/keymap.c
deleted file mode 100644
index 8dab1c2745..0000000000
--- a/keyboards/keebio/levinson/keymaps/omgvee/keymap.c
+++ /dev/null
@@ -1,185 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _COLEMAK 1
-#define _DVORAK 2
-#define _LOWER 3
-#define _RAISE 4
-#define _FN3 5
-#define _FN4 6
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- COLEMAK,
- DVORAK,
- LOWER,
- RAISE,
- FN3,
- FN4,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_X0 MT(MOD_LCTL, KC_ESC)
-#define KC_SCAP SFT_T(KC_CAPS)
-#define KC_LOW LOWER
-#define KC_RAIS RAISE
-#define KC_X3 LT(_FN3, KC_GRV)
-#define KC_SENT MT(MOD_LSFT, KC_ENT)
-#define KC_X5 BL_STEP
-#define KC_CTB CTL_T(KC_TAB)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- SCAP, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTB, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,SENT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI,LOW ,ENT , SPC,RAIS,RALT, , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- SCAP, NO ,HOME,PGDN,PGUP, END, LEFT,DOWN, UP ,RGHT, INS, DEL,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTB , F1 , F2 , F3 , F4 , F5 , F6, F7 , F8 , F9 , F10, F11,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , F12
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB, EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, DEL,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- SCAP, , , , , , MINS, EQL, ,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTB, , , , , , UNDS,PLUS,VOLD,VOLU,MUTE,SENT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , NO
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GESC, Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- SCAP, A , R , S , T , D , H , N , E , I , O ,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- CTB, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,SENT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,SENT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , MS_L,MS_D,MS_U,MS_R,WH_L,WH_R,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , BTN1,WH_D,WH_U,BTN2, , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
-/* Adjust (Lower + Raise)
- * ,-----------------------------------------------------------------------------------.
- * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
- [_ADJUST] = LAYOUT( \
- RESET, QWERTY, COLEMAK, DVORAK, _______, EEP_RST, KC_MNXT, KC_MPRV, KC_MFFD, KC_MRWD, DVORAK, KC_EJCT, \
- RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_PGUP, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CK_UP, CK_DOWN, \
- RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_PGDN, KC_END, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, \
- BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, CK_RST, _______, CK_TOGG, MU_MOD, MU_TOG, AU_TOG \
- )
-
-
-};
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QWERTY:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_QWERTY);
- }
- return false;
- break;
- case COLEMAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_COLEMAK);
- }
- return false;
- break;
- case DVORAK:
- if (record->event.pressed) {
- set_single_persistent_default_layer(_DVORAK);
- }
- return false;
- break;
- case LOWER:
- if (record->event.pressed) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/levinson/keymaps/omgvee/readme.md b/keyboards/keebio/levinson/keymaps/omgvee/readme.md
deleted file mode 100644
index f882c98b0b..0000000000
--- a/keyboards/keebio/levinson/keymaps/omgvee/readme.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# What I want from my LEVINSON (Let's Split on steroids) keymap
-====================================================================================================
-
-
-
-
-- media keys and media controls, including Eject, for however rare those computers with OSX *and* bloody optical drives might be
-- in-switch LED intensity controls (+/-)
-- underglow RGB hue/color controls
-- underglow RGB intensity controls
-- familiar key arrangement with Enter and symbols on the usual keys (to the right hand side, on some layer, pref RAISE for one-handed operation)
-- navigation keys should be the vim ones really;
-- arrow keys on one layer(most likely on the ADJUST one, but also on LOWER, as per my usual other split keebs)
-- mouse keys too
-- hardware reset for the ProMicro to put it bootloader mode, sounds, eeprom reset, backlights and rgb controls reset, etc.
-
-See keymap.c for layouts
-See config.h for various toggles and flags
-
-
-P.S> this is my first fully and purely ortholinear keyboard, as opposed to my [Iris](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/iris/keymaps/omgvee "Vee's Iris keeb"), [Helidox](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/omgvee "Vee's beloved Helidox keeb"), MiniDox, etc., which are mildly staggered, but on the vertical side, which seems better imho than this... but we'll see how I get on with it over time...
diff --git a/keyboards/keebio/levinson/keymaps/omgvee/rules.mk b/keyboards/keebio/levinson/keymaps/omgvee/rules.mk
deleted file mode 100644
index 3540947ac5..0000000000
--- a/keyboards/keebio/levinson/keymaps/omgvee/rules.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-EXTRAFLAGS += -flto
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-COMMAND_ENABLE = no
-TAP_DANCE_ENABLE = no
-NKRO_ENABLE = yes
-LEADER_ENABLE = no
-UNICODE_ENABLE = yes
-AUDIO_ENABLE = yes
diff --git a/keyboards/keebio/levinson/keymaps/treadwell/keymap.c b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c
index 4d3d9a4f64..55ac74e9d8 100644
--- a/keyboards/keebio/levinson/keymaps/treadwell/keymap.c
+++ b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c
@@ -22,8 +22,6 @@ enum custom_keycodes {
ADJUST,
};
-#define KC_ KC_TRNS
-
#define KC_X1 CODE
#define KC_X2 NUMB
#define KC_X3 MO(_SYS)
@@ -31,75 +29,75 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
+ [_QWERTY] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- BSPC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH, KC_X4 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,LALT, SPC , X2 ,LEFT,DOWN, UP ,RGHT
+ KC_X3 ,KC_LCTL,KC_LALT,KC_LGUI, KC_X1 ,KC_LALT, KC_SPC , KC_X2 ,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_COLEMAK] = LAYOUT_kc(
+ [_COLEMAK] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
+ KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- BSPC, A , R , S , T , D , H , N , E , I , O ,QUOT,
+ KC_BSPC, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M ,KC_COMM,KC_DOT ,KC_SLSH, KC_X4 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,LALT, SPC , X2 ,LEFT,DOWN, UP ,RGHT
+ KC_X3 ,KC_LCTL,KC_LALT,KC_LGUI, KC_X1 ,KC_LALT, KC_SPC , KC_X2 ,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_GAME] = LAYOUT_kc(
+ [_GAME] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT , UP ,ENT ,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT , KC_UP ,KC_ENT ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL, X3 ,LGUI,LALT,SPC , X2 , BSPC, X1 ,SLSH,LEFT,DOWN,RGHT
+ KC_LCTL, KC_X3 ,KC_LGUI,KC_LALT,KC_SPC , KC_X2 , KC_BSPC, KC_X1 ,KC_SLSH,KC_LEFT,KC_DOWN,KC_RGHT
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_NUMB] = LAYOUT_kc(
+ [_NUMB] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, DEL,
+ KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, KC_DEL,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,UNDS,
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_UNDS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , ,MPRV,MNXT,MPLY, , ,VOLD,VOLU,MUTE, , ,
+ _______,_______,KC_MPRV,KC_MNXT,KC_MPLY,_______, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , ,LALT, , , , , ,
+ _______,_______,_______,_______,_______,KC_LALT, _______,_______,_______,_______,_______,_______
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
- [_CODE] = LAYOUT_kc(
+ [_CODE] = LAYOUT(
//,----+------+----+----+----+----. ,----+----+----+----+----+----.
- ESC , , , UP , , , PGUP,HOME,LPRN,RPRN,BSLS,PIPE,
+ KC_ESC , _______,_______, KC_UP ,_______,_______, KC_PGUP,KC_HOME,KC_LPRN,KC_RPRN,KC_BSLS,KC_PIPE,
//|----+------+----+----+----+----| |----+----+----+----+----+----|
- CAPS,SELECT,LEFT,DOWN,RGHT,DEL , PGDN, END,LBRC,RBRC,MINS,UNDS,
+ KC_CAPS,KC_SELECT,KC_LEFT,KC_DOWN,KC_RGHT,KC_DEL , KC_PGDN, KC_END,KC_LBRC,KC_RBRC,KC_MINS,KC_UNDS,
//|----+------+----+----+----+----| |----+----+----+----+----+----|
- LSFT, UNDO ,CUT ,COPY,PASTE, , LEFT,RGHT,LCBR,RCBR,PLUS, EQL,
+ KC_LSFT, KC_UNDO ,KC_CUT ,KC_COPY,KC_PASTE, _______, KC_LEFT,KC_RGHT,KC_LCBR,KC_RCBR,KC_PLUS, KC_EQL,
//|----+------+----+----+----+----| |----+----+----+----+----+----|
- , , , , ,LALT, , , , , ,
+ _______, _______,_______,_______,_______,KC_LALT, _______,_______,_______,_______,_______,_______
//`----+------+----+----+----+----' `----+----+----+----+----+----'
),
- [_SYS] = LAYOUT_kc(
+ [_SYS] = LAYOUT(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
- , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
+ KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
+ _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______
//`----+----+----+----+----+----' `----+----+----+----+----+----'
),
diff --git a/keyboards/keebio/levinson/keymaps/valgrahf/config.h b/keyboards/keebio/levinson/keymaps/valgrahf/config.h
deleted file mode 100644
index b7c6b0a7f5..0000000000
--- a/keyboards/keebio/levinson/keymaps/valgrahf/config.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define RGB_DI_PIN D3
-#define RGBLED_NUM 12
-#define RGBLIGHT_ANIMATIONS
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP
-
-#endif
diff --git a/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c
deleted file mode 100644
index cbe86db373..0000000000
--- a/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _BASE 0
-#define _FN1 1
-#define _FN2 2
-
-#define KC_ KC_TRNS
-#define KC_FN1 LT(_FN1, KC_NO)
-#define KC_FN2 LT(_FN2, KC_NO)
-#define KC_SPFN LT(_FN1, KC_SPACE)
-#define KC_RST RESET
-#define KC_DBUG DEBUG
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_BASE] = LAYOUT_kc_ortho_4x12(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ESC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM, DOT,SLSH,PGUP,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LCTL,LGUI,LALT, FN1, ENT, ENT, SPC, SPC, FN2,HOME, END,PGDN
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_FN1] = LAYOUT_kc_ortho_4x12(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- GRV, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL, F1, F2, F3, F4, F5, F6,MINS, EQL,LBRC,RBRC,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , F7, F8, F9, F10, F11, F12, , , , UP, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , ,LEFT,DOWN,RIGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_FN2] = LAYOUT_kc_ortho_4x12(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL,RHUI,RSAI,RVAI, , , ,UNDS,PLUS,LCBR,RCBR,PIPE,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RHUD,RSAD,RVAD, , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,RTOG,RMOD, , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
-};
diff --git a/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk b/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk
deleted file mode 100644
index 1f54b32c48..0000000000
--- a/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-AUDIO_ENABLE = no
diff --git a/keyboards/keebio/levinson/levinson.h b/keyboards/keebio/levinson/levinson.h
index 503b1f0fd8..fd022ab518 100644
--- a/keyboards/keebio/levinson/levinson.h
+++ b/keyboards/keebio/levinson/levinson.h
@@ -9,19 +9,3 @@
#elif KEYBOARD_keebio_levinson_rev3
#include "rev3.h"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/README.md b/keyboards/keebio/nyquist/keymaps/bakingpy/README.md
deleted file mode 100644
index 3ce3f6af33..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/README.md
+++ /dev/null
@@ -1,116 +0,0 @@
-Hexwire's Nyquist Layout
-============================
-
-### Changes from default layout
-
-- Main layer
- - The right space bar key has been changed to backspace, as I only hit space with my left thumb
- - Backtick is at the lower right and also serves goes to the 3rd function layer when held
- - Enter key acts as shift when held
- - Escape key acts as control when held
- - Minus key at upper right
-- Lower layer
- - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
- - Arrow keys
- - Straight and curly brackets in the middle two columns
- - Screenshot keys for MacOS
-- Upper layer
- - Symbols are on the upper layer
- - Media keys
- - Page Up/Down, Home/End
-- 3rd function layer
- - Function keys
-
-## Layouts
-
-### QWERTY
-
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Colemak
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Dvorak
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Lower
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , DEL , , P0 ,PDOT, , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Raise
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### 3rd function layer
-
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md b/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md
deleted file mode 100644
index 9a7633a52f..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Let's Split RGB Underglow
-
-## Master
-
-### Pro Micro
-- Red: LED +5V -> Pro Micro VCC
-- Green: LED Din -> Pro Micro TX0
-- Black: LED GND -> Pro Micro GND
-
-### TRRS
-- Red: LED +5V -> PCB VCC
-- Green: LED Do -> PCB Extra Data
-- Black: LED GND -> PCB GND
-
-## Slave
-
-### TRRS
-- Red: LED +5V -> PCB VCC
-- Green: LED Din -> PCB Extra Data
-- Black: LED GND -> PCB GND
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/config.h b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h
deleted file mode 100644
index eecff3dd51..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/config.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-// #define USE_I2C
-
-/* Select hand configuration */
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 8
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c
deleted file mode 100644
index 38c13f3baa..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c
+++ /dev/null
@@ -1,216 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _COLEMAK 1
-#define _DVORAK 2
-#define _LOWER 3
-#define _RAISE 4
-#define _FN3 5
-#define _FN4 6
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- COLEMAK,
- DVORAK,
- LOWER,
- RAISE,
- FN3,
- FN4,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_X0 MT(MOD_LCTL, KC_ESC)
-#define KC_X1 LOWER
-#define KC_X2 RAISE
-#define KC_X3 LT(_FN3, KC_GRV)
-#define KC_X4 MT(MOD_LSFT, KC_ENT)
-#define KC_BL_S BL_STEP
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X0 , A , O , E , U , I , D , H , T , N , S ,SLSH,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- BL_S, , , , , , DEL , , P0 ,PDOT, ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----. ,----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , , ,
- //|----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
- //`----+----+----+----+----+----' `----+----+----+----+----+----'
- ),
-
-/* Adjust (Lower + Raise)
- * ,-----------------------------------------------------------------------------------.
- * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
- [_ADJUST] = LAYOUT( \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \
- _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
- )
-
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py
deleted file mode 100755
index 683f64da45..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-
-import re
-
-class KeymapConverter:
-
- def __init__(self, filename):
- self.filename = filename
-
- def read_keymaps(self):
- with open(self.filename) as f:
- lines = f.readlines()
-
- mode = 0
- for line in lines:
- line = line[:-1]
- if mode == 0:
- if "KC_KEYMAP" in line:
- matches = re.match(r'.*\[(.*)\] = .*', line)
- if matches:
- layer_name = matches.group(1)
- layer_name = layer_name[1:].capitalize()
- print '###', layer_name
- print '```'
- mode = 1
- elif mode == 1:
- if "//" in line:
- print line[4:]
- elif ")" in line:
- mode = 0
- print '```'
- print
- elif line[-1] == ',':
- print "|" + line[5:-1] + "|"
- else:
- print "|" + line[5:] + "|"
-
-converter = KeymapConverter('keymap.c')
-converter.read_keymaps()
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb
deleted file mode 100755
index 7285b008a4..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env ruby
-
-class KeymapConverter
-
- def initialize(filename)
- @filename = filename
- @mode = :search
- end
-
- def read_keymaps
- lines = IO.readlines(@filename)
- lines.each { |line| parse_line line[0..-2] }
- end
-
- def parse_line(line)
- case @mode
- when :search
- if line =~ /KC_KEYMAP/
- puts "### #{line}"
- puts "```"
- @mode = :parse
- end
- when :parse
- if line =~ /\)/
- @mode = :search
- puts "```\n\n"
- else
- line = line[4..-1]
- line.sub!(/(,)^-/m, "|")
- line.sub!(/( {4})/, " |")
-
- puts line
- end
- end
- end
-
-end
-
-converter = KeymapConverter.new('keymap.c')
-converter.read_keymaps
diff --git a/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk b/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk
deleted file mode 100644
index a81250cdf6..0000000000
--- a/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = yes
-
diff --git a/keyboards/keebio/nyquist/keymaps/mtdjr/config.h b/keyboards/keebio/nyquist/keymaps/mtdjr/config.h
deleted file mode 100644
index 0fa606f296..0000000000
--- a/keyboards/keebio/nyquist/keymaps/mtdjr/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c b/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c
deleted file mode 100644
index 668e7964b5..0000000000
--- a/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c
+++ /dev/null
@@ -1,64 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "mtdjr.h"
-
-extern keymap_config_t keymap_config;
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc (
-// ,-----------------------------. .-----------------------------.
- GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- TAB, Q , W , E , R , T , Y , U , I , O , P ,QUOT,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- RASE, A , S , D , F , G , H , J , K , L ,SCLN, ENT,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM, DOT,SLSH,xxxx,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- LOWR,LCTL,LALT,LGUI, SPC, SPC, SPC, SPC,LEFT,DOWN, UP ,RGHT
-// '-----------------------------' '-----------------------------'
-),
-
- [_LOWER] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- TILD,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,UNDS,PLUS, DEL,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,LBRC,RBRC,BSLS,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,UNDO, CUT,XCPY,XINS,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , ,MNXT,VOLD,VOLU,MPLY
-// '-----------------------------' '-----------------------------'
-),
-
- [_RAISE] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,MINS, EQL, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,LCBR,RCBR,PIPE,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , ,MNXT,VOLD,VOLU,MPLY
-// '-----------------------------' '-----------------------------'
-),
-
- [_ADJUST] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- xxxx,ROOT,PPLY,PSEF,xxxx,xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx, RST,xxxx, F7 , F8 , F9 , F10, F11, F12,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- , RGB,RHUI,RSAI,RVAI, MOD, xxxx,xxxx,xxxx,xxxx,xxxx, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,RBTH,RHUD,RSAD,RVAD,RMOD, xxxx,xxxx,xxxx,xxxx,xxxx, BLB,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,xxxx,xxxx,xxxx, , , , ,BLOF, BLD, BLI,BLON
-// '-----------------------------' '-----------------------------'
-)
-
-};
diff --git a/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk b/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk
deleted file mode 100644
index d7463419b4..0000000000
--- a/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = yes
-BACKLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h
index f261c2994d..25da44172b 100644
--- a/keyboards/keebio/nyquist/nyquist.h
+++ b/keyboards/keebio/nyquist/nyquist.h
@@ -12,24 +12,6 @@
#include "quantum.h"
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
- )
-
-#define LAYOUT_kc_ortho_5x12 LAYOUT_kc
-
#define LAYOUT_ortho_4x12( \
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/keebio/quefrency/quefrency.h b/keyboards/keebio/quefrency/quefrency.h
index 02139e043b..bbd5ad699e 100644
--- a/keyboards/keebio/quefrency/quefrency.h
+++ b/keyboards/keebio/quefrency/quefrency.h
@@ -11,17 +11,3 @@
#ifdef KEYBOARD_keebio_quefrency_rev3
#include "rev3.h"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \
- LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \
- LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \
- LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \
- ) \
- LAYOUT( \
- KC_##LA1, KC_##LA2, KC_##LA3, KC_##LA4, KC_##LA5, KC_##LA6, KC_##RA1, KC_##RA2, KC_##RA3, KC_##RA4, KC_##RA5, KC_##RA6, KC_##RA7, \
- KC_##LB1, KC_##LB2, KC_##LB3, KC_##LB4, KC_##LB5, KC_##LB6, KC_##RB1, KC_##RB2, KC_##RB3, KC_##RB4, KC_##RB5, KC_##RB7, \
- KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \
- KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \
- )
diff --git a/keyboards/keebio/rorschach/rorschach.h b/keyboards/keebio/rorschach/rorschach.h
index 45e64587f4..f11093f074 100644
--- a/keyboards/keebio/rorschach/rorschach.h
+++ b/keyboards/keebio/rorschach/rorschach.h
@@ -5,19 +5,3 @@
#endif
#include "quantum.h"
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \
- LT1, LT2, RT2, RT1 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##LT1, KC_##LT2, KC_##RT2, KC_##RT1 \
- )
diff --git a/keyboards/keebio/tragicforce68/tragicforce68.h b/keyboards/keebio/tragicforce68/tragicforce68.h
index cdecc55d96..a177f52816 100644
--- a/keyboards/keebio/tragicforce68/tragicforce68.h
+++ b/keyboards/keebio/tragicforce68/tragicforce68.h
@@ -56,21 +56,4 @@
{ J1, J2, J3, J4, J5, J6, J7, J8 } \
}
-#define LAYOUT_kc( \
- K00, K01, 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, K41, K42, K43, K44, K45, K46, K47, K48, \
- K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
- K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
-) LAYOUT( \
- KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
- KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
- KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
- KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
- KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
- KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
- KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
- KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
-)
-
#define LAYOUT LAYOUT_68_ansi
diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/README.md b/keyboards/keebio/viterbi/keymaps/bakingpy/README.md
deleted file mode 100644
index 3ce3f6af33..0000000000
--- a/keyboards/keebio/viterbi/keymaps/bakingpy/README.md
+++ /dev/null
@@ -1,116 +0,0 @@
-Hexwire's Nyquist Layout
-============================
-
-### Changes from default layout
-
-- Main layer
- - The right space bar key has been changed to backspace, as I only hit space with my left thumb
- - Backtick is at the lower right and also serves goes to the 3rd function layer when held
- - Enter key acts as shift when held
- - Escape key acts as control when held
- - Minus key at upper right
-- Lower layer
- - Numbers are on the lower layer, to make it easier to use a numpad on the right hand
- - Arrow keys
- - Straight and curly brackets in the middle two columns
- - Screenshot keys for MacOS
-- Upper layer
- - Symbols are on the upper layer
- - Media keys
- - Page Up/Down, Home/End
-- 3rd function layer
- - Function keys
-
-## Layouts
-
-### QWERTY
-
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Colemak
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , R , S , T , D , H , N , E , I , O ,QUOT|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Dvorak
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X0 , A , O , E , U , I , D , H , T , N , S ,SLSH|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT|
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Lower
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , DEL , , P0 ,PDOT, , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### Raise
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS|
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-|MUTE,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
-
-### 3rd function layer
-
-```
-,----+----+----+----+----+----. ,----+----+----+----+----+----.
-|F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-|----+----+----+----+----+----| |----+----+----+----+----+----|
-| , , , , , , , , , , , |
-`----+----+----+----+----+----' `----+----+----+----+----+----'
-```
diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/config.h b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h
deleted file mode 100644
index 7d01468e8d..0000000000
--- a/keyboards/keebio/viterbi/keymaps/bakingpy/config.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-// #define USE_I2C
-
-/* Select hand configuration */
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c
deleted file mode 100644
index ab8cf2a9ae..0000000000
--- a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c
+++ /dev/null
@@ -1,215 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _COLEMAK 1
-#define _DVORAK 2
-#define _LOWER 3
-#define _RAISE 4
-#define _FN3 5
-#define _FN4 6
-#define _ADJUST 16
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- COLEMAK,
- DVORAK,
- LOWER,
- RAISE,
- FN3,
- FN4,
- ADJUST,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
-#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
-#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
-#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
-#define KC_X0 MT(MOD_LCTL, KC_ESC)
-#define KC_X1 LOWER
-#define KC_X2 RAISE
-#define KC_X3 LT(_FN3, KC_GRV)
-#define KC_X4 MT(MOD_LSFT, KC_ENT)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , Q , W , E , R , T , , Y , U , I , O , P ,MINS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X0 , A , S , D , F , G , , H , J , K , L ,SCLN,QUOT, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , , N , M ,COMM,DOT ,SLSH, X4 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_COLEMAK] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , Q , W , F , P , G , , J , L , U , Y ,SCLN,MINS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X0 , A , R , S , T , D , , H , N , E , I , O ,QUOT, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , , K , M ,COMM,DOT ,SLSH, X4 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- ESC , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 ,BSPC, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB ,QUOT,COMM,DOT , P , Y , , F , G , C , R , L ,MINS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X0 , A , O , E , U , I , , D , H , T , N , S ,SLSH, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- LSFT,SCLN, Q , J , K , X , , B , M , W , V , Z , X4 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- X3 ,LCTL,LALT,LGUI, X1 ,SPC , , BSPC, X2 ,LEFT,DOWN, UP ,RGHT,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_LOWER] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , 1 , 2 , 3 , 4 , 5 , , 6 , 7 , 8 , 9 , 0 , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- DEL ,CAPP,LEFT,RGHT, UP ,LBRC, , RBRC, P4 , P5 , P6 ,PLUS,PIPE, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,CPYP, , ,DOWN,LCBR, , RCBR, P1 , P2 , P3 ,MINS, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , DEL , , P0 ,PDOT, , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_RAISE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- TILD,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,EXLM, AT ,HASH,DLR ,PERC, , CIRC,AMPR,ASTR,LPRN,RPRN, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , EQL ,HOME, , , ,BSLS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , PLUS,END , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_FN3] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- F12 , F1 , F2 , F3 , F4 , F5 , , F6 , F7 , F8 , F9 ,F10 ,F11 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
-/* Adjust (Lower + Raise)
- * ,-----------------------------------------------------------------------------------.
- * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | | | | |
- * `-----------------------------------------------------------------------------------'
- */
- [_ADJUST] = LAYOUT( \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, _______, \
- _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
- )
-
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-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) {
- layer_on(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_LOWER);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case RAISE:
- if (record->event.pressed) {
- layer_on(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- } else {
- layer_off(_RAISE);
- update_tri_layer(_LOWER, _RAISE, _ADJUST);
- }
- return false;
- break;
- case ADJUST:
- if (record->event.pressed) {
- layer_on(_ADJUST);
- } else {
- layer_off(_ADJUST);
- }
- return false;
- break;
- }
- return true;
-}
diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk b/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/config.h b/keyboards/keebio/viterbi/keymaps/dwallace/config.h
deleted file mode 100644
index 585b41dbcf..0000000000
--- a/keyboards/keebio/viterbi/keymaps/dwallace/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2017 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 14
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c
deleted file mode 100644
index c03cf970fd..0000000000
--- a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c
+++ /dev/null
@@ -1,223 +0,0 @@
-#include "viterbi.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _FN 1
-
-enum custom_keycodes {
- QWERTY = SAFE_RANGE,
- STK_SHIFT,
- STK_CTRL,
- STK_ALT,
- STK_GUI,
- STK_META,
- STK_CLEAR,
- RGB_LEVEL_UP,
- RGB_LEVEL_DOWN,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_SWIN LGUI(KC_TILD) // Switch between windows
-#define KC_SAPP LGUI(KC_TAB) // Switch between applications
-#define KC_FN1 MO(_FN)
-#define KC_LCAG LCAG(KC_NO)
-#define KC_RTOG RGB_TOG
-#define KC_RGUP RGB_LEVEL_UP
-#define KC_RGDN RGB_LEVEL_DOWN
-#define KC_RST RESET
-#define KC_SSFT STK_SHIFT
-#define KC_SCTL STK_CTRL
-#define KC_SALT STK_ALT
-#define KC_SGUI STK_GUI
-#define KC_SMTA STK_META
-#define KC_SCLR STK_CLEAR
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,BSPC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- TAB , Q , W , E , R , T ,LBRC, Y , U , I , O , P ,BSLS,PGUP,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ESC , A , S , D , F , G ,RBRC, H , J , K , L ,SCLN,QUOT,ENT ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- SSFT, Z , X , C , V , B ,SWIN, N , M ,COMM,DOT , UP ,SLSH,RSFT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- SCTL,SMTA,SALT,SGUI,SPC ,SCLR,SAPP, FN1 ,SPC ,RGUI,LEFT,DOWN,RGHT,PGDN
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_FN] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , ,RST , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , RTOG, ,RGDN,RGUP, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , ,MUTE,VOLD,VOLU, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- )
-
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-#endif
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-
-bool modifier_already_applied = false;
-uint8_t physically_held_modifiers = 0;
-uint8_t last_mods = 0xFF;
-uint8_t rgb_dimming = 0;
-#define SET_LED_RGB(val, led_num) setrgb(((val >> 16) & 0xFF) >> rgb_dimming, ((val >> 8) & 0xFF) >> rgb_dimming, (val & 0xFF) >> rgb_dimming, (LED_TYPE *)&led[led_num])
-
-void update_underglow_level(void) {
- if (get_mods() == last_mods)
- return;
-
- last_mods = get_mods();
-
- if (get_mods() == 0) {
- uint8_t level = 0x10 >> rgb_dimming;
- rgblight_setrgb(level, level, level);
- return;
- }
-
- uint32_t mod_colors[4] = {0};
- uint8_t mod_count = 0;
- rgblight_setrgb(0x00, 0x00, 0x00);
-
- if (get_mods() & MOD_BIT(KC_LSFT))
- mod_colors[mod_count++] = 0xFF0000;
- if (get_mods() & MOD_BIT(KC_LCTL))
- mod_colors[mod_count++] = 0x00FF00;
- if (get_mods() & MOD_BIT(KC_LALT))
- mod_colors[mod_count++] = 0x0000FF;
- if (get_mods() & MOD_BIT(KC_LGUI))
- mod_colors[mod_count++] = 0xFFFF00;
-
- uint8_t led_num = 0;
- for (int m = 0; m < mod_count; m++) {
- for (; led_num < RGBLED_NUM*(m+1)/mod_count; led_num++) {
- SET_LED_RGB(mod_colors[m], led_num);
- }
- }
- rgblight_set();
-}
-
-void add_sticky_modifier(uint16_t keycode) {
- add_mods(MOD_BIT(keycode));
- register_code(keycode);
- modifier_already_applied = false;
-}
-
-void clear_sticky_modifiers(void) {
- unregister_code(KC_LSFT);
- unregister_code(KC_LCTL);
- unregister_code(KC_LALT);
- unregister_code(KC_LGUI);
- update_underglow_level();
-}
-
-void handle_sticky_modifier_event(uint16_t keycode, bool pressed) {
- if (pressed) {
- add_sticky_modifier(keycode);
- physically_held_modifiers |= MOD_BIT(keycode);
- } else {
- del_mods(MOD_BIT(keycode));
- physically_held_modifiers &= ~MOD_BIT(keycode);
- if (modifier_already_applied) {
- clear_sticky_modifiers();
- } else {
- add_sticky_modifier(keycode);
- }
- }
- update_underglow_level();
-}
-
-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 STK_SHIFT:
- handle_sticky_modifier_event(KC_LSFT, record->event.pressed);
- return false;
- break;
- case STK_CTRL:
- handle_sticky_modifier_event(KC_LCTL, record->event.pressed);
- return false;
- break;
- case STK_ALT:
- handle_sticky_modifier_event(KC_LALT, record->event.pressed);
- return false;
- break;
- case STK_GUI:
- handle_sticky_modifier_event(KC_LGUI, record->event.pressed);
- return false;
- break;
- case STK_META:
- handle_sticky_modifier_event(KC_LCTL, record->event.pressed);
- handle_sticky_modifier_event(KC_LALT, record->event.pressed);
- handle_sticky_modifier_event(KC_LGUI, record->event.pressed);
- return false;
- break;
- case STK_CLEAR:
- if (record->event.pressed) {
- clear_sticky_modifiers();
- }
- return false;
- break;
- case RGB_LEVEL_DOWN:
- if (record->event.pressed && rgb_dimming < 8) {
- rgb_dimming++;
- }
- return false;
- break;
- case RGB_LEVEL_UP:
- if (record->event.pressed && rgb_dimming > 0) {
- rgb_dimming--;
- }
- return false;
- break;
- }
- if (!record->event.pressed && IS_KEY(keycode)) {
- modifier_already_applied = true;
- if (physically_held_modifiers == 0)
- clear_sticky_modifiers();
- }
- return true;
-}
-
-void matrix_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- rgblight_enable();
- #endif //RGBLIGHT_ENABLE
-}
-
-void matrix_scan_user(void) {
- #ifdef RGBLIGHT_ENABLE
- update_underglow_level();
- #endif //RGBLIGHT_ENABLE
-}
diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk b/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/keymaps/fido/config.h b/keyboards/keebio/viterbi/keymaps/fido/config.h
deleted file mode 100644
index 5cb1083652..0000000000
--- a/keyboards/keebio/viterbi/keymaps/fido/config.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright 2018 Danny Nguyen
-
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-#ifndef MASTER_LEFT
- #define MASTER_RIGHT
-#endif
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 2
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-
-#endif
diff --git a/keyboards/keebio/viterbi/keymaps/fido/keymap.c b/keyboards/keebio/viterbi/keymaps/fido/keymap.c
deleted file mode 100644
index cd6c8d087f..0000000000
--- a/keyboards/keebio/viterbi/keymaps/fido/keymap.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "viterbi.h"
-#include "action_layer.h"
-#include "eeconfig.h"
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
-extern keymap_config_t keymap_config;
-
-#define _QWERTY 0
-#define _FN 1
-
-#define KC_ KC_TRNS
-
-#define KC_FN1 MO(_FN)
-#define KC_WD_L LCTL(KC_LEFT)
-#define KC_WD_R LCTL(KC_RGHT)
-#define KC_RTOG RGB_TOG
-#define KC_RMOD RGB_MOD
-#define KC_RHUI RGB_HUI
-#define KC_RHUD RGB_HUD
-#define KC_RSAI RGB_SAI
-#define KC_RSAD RGB_SAD
-#define KC_RVAI RGB_VAI
-#define KC_RVAD RGB_VAD
-#define KC_RST RESET
-#define KC_CTLZ LCTL(KC_Z)
-#define KC_CTLX LCTL(KC_X)
-#define KC_CTLC LCTL(KC_C)
-#define KC_CTLV LCTL(KC_V)
-#define KC_ATAB LALT(KC_TAB)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- 1 , 2 , 3 , 4 , 5 , 6 ,ESC , DEL , 7 , 8 , 9 , 0 ,MINS,EQL ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- RBRC, Q , W , E , R , T ,TAB , BSPC, Y , U , I , O , P ,LBRC,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- GRV , A , S , D , F , G ,LALT, CAPS, H , J , K , L ,SCLN,QUOT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- BSLS, Z , X , C , V , B ,LSFT, RSFT, N , M ,COMM,DOT ,SLSH,ENT ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- INS ,PSCR,MENU,LGUI,LCTL,SPC ,FN1 , FN1 ,SPC ,RCTL,RALT, , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_FN] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- F1 , F2 , F3 , F4 , F5 , F6 , , , F7 , F8 , F9 ,F10 ,F11 ,F12 ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,PGUP,WD_L, UP ,WD_R, ,ATAB, ,RMOD,RHUI,RSAI,RVAI, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,HOME,LEFT,DOWN,RGHT, , , , ,RHUD,RSAD,RVAD, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- ,CTLZ,CTLX,CTLC,CTLV, , , ,MUTE,VOLD,VOLU, , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- )
-
-};
-
-void led_set_user(uint8_t usb_led) {
- #ifdef RGBLIGHT_ENABLE
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- rgblight_enable();
- } else {
- rgblight_disable();
- }
- #endif //RGBLIGHT_ENABLE
-}
diff --git a/keyboards/keebio/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/fido/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/viterbi/keymaps/fido/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/keymaps/mike808/config.h b/keyboards/keebio/viterbi/keymaps/mike808/config.h
deleted file mode 100644
index 95625ea670..0000000000
--- a/keyboards/keebio/viterbi/keymaps/mike808/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-Copyright 2018 Danny Nguyen
-
-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 .
-*/
-
-#pragma once
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#define TAPPING_TERM 150
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 2
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c
deleted file mode 100644
index 9922f1a555..0000000000
--- a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c
+++ /dev/null
@@ -1,157 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _DVORAK 0
-#define _QWERTY 1
-#define _FN1 2
-#define _MOUSE 3
-
-enum custom_keycodes {
- DVORAK = SAFE_RANGE,
- QWERTY,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_DVOR DVORAK
-#define KC_QWER QWERTY
-#define KC_FN1 MO(_FN1)
-
-// Tap-Hold keys (QWERTY)
-#define KC_S_C MT(MOD_LCTL, KC_S)
-#define KC_D_A MT(MOD_LALT, KC_D)
-#define KC_F_G MT(MOD_LGUI, KC_F)
-#define KC_J_G MT(MOD_RGUI, KC_J)
-#define KC_K_A MT(MOD_RALT, KC_K)
-#define KC_L_C MT(MOD_RCTL, KC_L)
-
-// Tap-Hold keys (Dvorak)
-#define KC_O_C MT(MOD_LCTL, KC_O)
-#define KC_E_A MT(MOD_LALT, KC_E)
-#define KC_U_G MT(MOD_LGUI, KC_U)
-#define KC_H_G MT(MOD_RGUI, KC_H)
-#define KC_T_A MT(MOD_RALT, KC_T)
-#define KC_N_C MT(MOD_RCTL, KC_N)
-
-#define KC_G_A LGUI(KC_A)
-#define KC_G_C LGUI(KC_C)
-#define KC_G_V LGUI(KC_V)
-#define KC_G_X LGUI(KC_X)
-#define KC_G_Z LGUI(KC_Z)
-#define KC_G_BL LGUI(KC_BSLS)
-#define KC_G_TB LGUI(KC_TAB)
-#define KC_G_SP LGUI(KC_SPC)
-
-#define KC_ENTM LT(_MOUSE, KC_ENT)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- DVOR,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,PGUP,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_A ,TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,PGDN,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_X ,CAPS, A ,S_C ,D_A ,F_G , G , H ,J_G ,K_A ,L_C ,SCLN,QUOT, UP ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_C ,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,DOWN,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,EQL ,LEFT,RGHT
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_DVORAK] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- QWER,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,EQL ,PGUP,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_A ,TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,PGDN,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_X ,CAPS, A ,O_C ,E_A ,U_G , I , D ,H_G ,T_A ,N_C , S ,MINS, UP ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_C ,LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,RSFT,DOWN,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,BSLS,LEFT,RGHT
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_FN1] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,EXLM, AT ,LCBR,RCBR,PIPE, , P7 , P8 , P9 ,ASTR,F12 , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,HASH,DLR ,LPRN,RPRN,GRV , , P4 , P5 , P6 ,PLUS,MINS, ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , ,PDOT, P0 ,EQL , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- ),
-
- [_MOUSE] = LAYOUT_kc(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , ,MS_U, , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , ,MS_L,MS_D,MS_R, , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , , , , , , , , , , , ,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- , , , ,BTN1,BTN2, , , , , , , ,
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
- )
-};
-
-#ifdef AUDIO_ENABLE
-float tone_qwerty[][2] = SONG(QWERTY_SOUND);
-float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-#endif
-
-void update_rgblight(uint16_t layer) {
- if (layer & (1UL << _DVORAK)) {
- rgblight_sethsv_green();
- } else if (layer & (1UL << _QWERTY)) {
- rgblight_sethsv_goldenrod();
- }
-}
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
- #ifdef RGBLIGHT_ENABLE
- update_rgblight(default_layer);
- #endif // RGBLIGHT_ENABLE
-}
-
-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 DVORAK:
- if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
- PLAY_SONG(tone_dvorak);
- #endif
- persistent_default_layer_set(1UL << _DVORAK);
- }
- return false;
- break;
- }
- return true;
-}
-
-
-void matrix_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- rgblight_enable();
- uint8_t default_layer = eeconfig_read_default_layer();
- update_rgblight(default_layer);
- #endif
-}
diff --git a/keyboards/keebio/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk
deleted file mode 100644
index 1e3cebb145..0000000000
--- a/keyboards/keebio/viterbi/keymaps/mike808/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-RGBLIGHT_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/viterbi.h b/keyboards/keebio/viterbi/viterbi.h
index 186892d57a..b17b322410 100644
--- a/keyboards/keebio/viterbi/viterbi.h
+++ b/keyboards/keebio/viterbi/viterbi.h
@@ -8,21 +8,5 @@
#include "rev2.h"
#endif
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
- L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \
- )
-
#define LAYOUT_ortho_5x14 LAYOUT
diff --git a/keyboards/keebio/wavelet/wavelet.h b/keyboards/keebio/wavelet/wavelet.h
index 69a87a70cd..d6a0ef4227 100644
--- a/keyboards/keebio/wavelet/wavelet.h
+++ b/keyboards/keebio/wavelet/wavelet.h
@@ -19,19 +19,4 @@
{ R35, R34, R33, R32, R31, R30 } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
#define LAYOUT_ortho_4x12 LAYOUT
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/laptreus/laptreus.h b/keyboards/laptreus/laptreus.h
index 305d412748..f367c13dc3 100644
--- a/keyboards/laptreus/laptreus.h
+++ b/keyboards/laptreus/laptreus.h
@@ -23,19 +23,4 @@
{A1, B1, C1, D1, KC_NO, KC_NO, D12, C12, B12, A12} \
}
-#define LAYOUT_kc( \
- A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \
- B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \
- C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \
- D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \
-) \
-{ \
- LAYOUT( \
- KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, KC_##A11, KC_##A12, \
- KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, KC_##B11, KC_##B12, \
- KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C8, KC_##C9, KC_##C10, KC_##C11, KC_##C12, \
- KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D6, KC_##D7, KC_##D8, KC_##D9, KC_##D10, KC_##D11, KC_##D12 \
- ) \
-}
-
#endif
diff --git a/keyboards/lets_split/keymaps/bbaserdem/keymap.c b/keyboards/lets_split/keymaps/bbaserdem/keymap.c
index 623117530d..f9eab059ef 100755
--- a/keyboards/lets_split/keymaps/bbaserdem/keymap.c
+++ b/keyboards/lets_split/keymaps/bbaserdem/keymap.c
@@ -5,7 +5,6 @@
* Most of the code is in the "user" directory.
* Check qmk_firmware/users/bbaserdem for the main part of the code
*/
-#define KEYMAP(...) LAYOUT_ortho_4x12(__VA_ARGS__)
#include "lets_split.h"
#include "bbaserdem.h"
diff --git a/keyboards/lets_split/keymaps/mtdjr/config.h b/keyboards/lets_split/keymaps/mtdjr/config.h
deleted file mode 100644
index afbf735695..0000000000
--- a/keyboards/lets_split/keymaps/mtdjr/config.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-This is the c configuration file for the keymap
-
-Copyright 2012 Jun Wako
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-#define SOLENOID_ENABLE
-#define SOLENOID_PIN F4
-
-#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 8
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-/* Select hand configuration */
-
- #define MASTER_LEFT
-// #define _MASTER_RIGHT
-// #define EE_HANDS
-
-#endif
diff --git a/keyboards/lets_split/keymaps/mtdjr/keymap.c b/keyboards/lets_split/keymaps/mtdjr/keymap.c
deleted file mode 100644
index 47972fcd35..0000000000
--- a/keyboards/lets_split/keymaps/mtdjr/keymap.c
+++ /dev/null
@@ -1,55 +0,0 @@
-#include QMK_KEYBOARD_H
-#include "mtdjr.h"
-
-extern keymap_config_t keymap_config;
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
- [_QWERTY] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- TAB, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- EXC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- LSFT, Z , X , C , V , B , N , M ,COMM, DOT,SLSH, ENT,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- LOWR,LCTL,LALT,LGUI,LOWR, SPC, SPC,RASE,LEFT,DOWN, UP ,RGHT
-// '-----------------------------' '-----------------------------'
- ),
-
- [_LOWER] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- TILD, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,LBRC,RBRC,BSLS,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,UNDO, CUT,XCPY,XINS,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , , , , ,
-// '-----------------------------' '-----------------------------'
- ),
-
- [_RAISE] = LAYOUT_kc(
-// ,-----------------------------. .-----------------------------.
- GRV,EXLM, AT ,HASH, DLR,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, MINS, EQL,xxxx,LCBR,RCBR,PIPE,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,xxxx,xxxx,xxxx,xxxx,xxxx, UNDS,PLUS,xxxx,xxxx,xxxx, ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- , , , , , , , ,MNXT,VOLD,VOLU,MPLY
-// '-----------------------------' '-----------------------------'
- ),
-
- [_ADJUST] = LAYOUT_kc( \
-// ,-----------------------------. .-----------------------------.
- xxxx,ROOT,PPLY,PSEF,xxxx,xxxx, RST,STOG,xxxx,xxxx,xxxx, DEL,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- RGB,RHUI,RSAI,RVAI, MOD,xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- RBTH,RHUD,RSAD,RVAD,RMOD,xxxx, F7 , F8 , F9 , F10, F11, F12,
-// |----+----+----+----+----+----| |----+----+----+----+----+----|
- ,xxxx,xxxx,xxxx, ,xxxx, xxxx, ,xxxx,xxxx,xxxx,xxxx
-// '-----------------------------' '-----------------------------'
- )
-};
diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk
deleted file mode 100644
index a81250cdf6..0000000000
--- a/keyboards/lets_split/keymaps/mtdjr/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = yes
-
diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h
index 9c46f382d1..90290e586f 100644
--- a/keyboards/lets_split/lets_split.h
+++ b/keyboards/lets_split/lets_split.h
@@ -9,20 +9,3 @@
#elif KEYBOARD_lets_split_sockets
#include "sockets.h"
#endif
-
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/lets_split_eh/lets_split_eh.h b/keyboards/lets_split_eh/lets_split_eh.h
index 51828b09ba..aa1f213b20 100644
--- a/keyboards/lets_split_eh/lets_split_eh.h
+++ b/keyboards/lets_split_eh/lets_split_eh.h
@@ -5,20 +5,3 @@
#ifdef KEYBOARD_lets_split_eh_eh
#include "eh.h"
#endif
-
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/mechmini/v1/v1.h b/keyboards/mechmini/v1/v1.h
index acdad5c6d6..401eac85b7 100644
--- a/keyboards/mechmini/v1/v1.h
+++ b/keyboards/mechmini/v1/v1.h
@@ -23,7 +23,7 @@ along with this program. If not, see .
#include "action.h"
#include "quantum.h"
-#define KEYMAP( \
+#define LAYOUT( \
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, \
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, \
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, \
diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h
index 8cdcd09fe2..cad590477c 100644
--- a/keyboards/meira/meira.h
+++ b/keyboards/meira/meira.h
@@ -25,7 +25,7 @@ void reset_keyboard_kb(void);
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
+#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
@@ -38,23 +38,7 @@ void reset_keyboard_kb(void);
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define KC_KEYMAP( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
- ) \
- KEYMAP( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
- )
-
-#define LAYOUT_ortho_4x12 KEYMAP
-#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
-#define LAYOUT_kc_ortho_4x12 KC_KEYMAP
+#define LAYOUT_ortho_4x12 LAYOUT
#endif
diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h
index 3ff9c89d00..c202d5f6c7 100644
--- a/keyboards/mt40/mt40.h
+++ b/keyboards/mt40/mt40.h
@@ -38,22 +38,6 @@
{ KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \
}
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
- ) \
- LAYOUT_planck_mit( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
- )
-
#define LAYOUT LAYOUT_planck_mit
-#define LAYOUT_kc_planck_mit LAYOUT_kc
-
-
#endif
diff --git a/keyboards/niu_mini/niu_mini.h b/keyboards/niu_mini/niu_mini.h
index 5fef7b4326..b815219123 100644
--- a/keyboards/niu_mini/niu_mini.h
+++ b/keyboards/niu_mini/niu_mini.h
@@ -28,19 +28,4 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
- ) \
- LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
- )
-
#define LAYOUT LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h
index 6f8dad60ac..ebf13debb7 100644
--- a/keyboards/orthodox/orthodox.h
+++ b/keyboards/orthodox/orthodox.h
@@ -11,18 +11,3 @@
#ifdef KEYBOARD_orthodox_rev3_teensy
#include "rev3_teensy.h"
#endif
-
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, L16, L18, R10, R12, R13, R14, R15, R16, R17, R18, \
- L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28 \
- ) \
- { \
- { KC_##LL00, KC_##LL01, KC_##LL02, KC_##LL03, KC_##LL04, KC_##LL05 }, \
- { KC_##LL10, KC_##LL11, KC_##LL12, KC_##LL13, KC_##LL14, KC_##LL15, KC_##LL16, KC_NO, KC_##LL18}, \
- { KC_##LL20, KC_##LL21, KC_##LL22, KC_##LL23, KC_##LL24, KC_##LL25, KC_##LL26, KC_##LL27, KC_##LL28 }, \
- { KC_##LR05, KC_##LR04, KC_##LR03, KC_##LR02, KC_##LR01, KC_##LR00 }, \
- { KC_##LR18, KC_##LR17, KC_##LR16, KC_##LR15, KC_##LR14, KC_##LR13, KC_##LR12, KC_NO, KC_##LR10 }, \
- { KC_##LR28, KC_##LR27, KC_##LR26, KC_##LR25, KC_##LR24, KC_##LR23, KC_##LR22, KC_##LR21, KC_##LR20 } \
- }
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
index f989cd9386..d11929d3ef 100644
--- a/keyboards/planck/ez/ez.h
+++ b/keyboards/planck/ez/ez.h
@@ -51,7 +51,6 @@ LAYOUT_planck_1x2uC( \
k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \
)
-#define KEYMAP LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
diff --git a/keyboards/planck/keymaps/corvec/keymap.c b/keyboards/planck/keymaps/corvec/keymap.c
index 3099a78345..a927c522a2 100644
--- a/keyboards/planck/keymaps/corvec/keymap.c
+++ b/keyboards/planck/keymaps/corvec/keymap.c
@@ -40,12 +40,6 @@ enum planck_keycodes {
BACKLIT
};
-#define KC_ KC_TRNS
-#define KC_____ KC_TRNS
-#define KC_XXXX KC_NO
-#define KC_LOWR LOWER
-#define KC_RASE RAISE
-
/**
* Custom Corvec Bindings
*
@@ -76,54 +70,54 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_COLEMAK] = KC_KEYMAP(
+ [_COLEMAK] = LAYOUT_planck_grid(
//-----+----+----+----+----+----+----+----+----+----+----+----
- TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
+ KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_BSPC,
//-----+----+----+----+----+----+----+----+----+----+----+----
- RESC, A , R , S , T , D , H , N , E , I , O ,TQTD,
+ KC_RESC, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O ,KC_TQTD,
//-----+----+----+----+----+----+----+----+----+----+----+----
- LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,RSFT,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
//-----+----+----+----+----+----+----+----+----+----+----+----
- LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,SDEL,TALT,TGUI,RCTL
+ KC_LCTL,KC_LGUI,KC_WOBL,KC_LALT,KC_LENT, KC_SPC, KC_SPC,RAISE,KC_SDEL,KC_TALT,KC_TGUI,KC_RCTL
),
- [_QWERTY] = KC_KEYMAP(
+ [_QWERTY] = LAYOUT_planck_grid(
//-----+----+----+----+----+----+----+----+----+----+----+----
- TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
+ KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSPC,
//-----+----+----+----+----+----+----+----+----+----+----+----
- RESC, A , S , D , F , G , H , J , K , L ,SCLN,TQTD,
+ KC_RESC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_TQTD,
//-----+----+----+----+----+----+----+----+----+----+----+----
- LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,
+ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT,
//-----+----+----+----+----+----+----+----+----+----+----+----
- LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,RALT,SAPP,RGUI,RCTL
+ KC_LCTL,KC_LGUI,KC_WOBL,KC_LALT,KC_LENT, KC_SPC, KC_SPC,RAISE,KC_RALT,KC_SAPP,KC_RGUI,KC_RCTL
),
- [_LOWER] = KC_KEYMAP(
- GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
- ____,LPRN,RPRN,LBRC,RBRC,XXXX,LEFT,DOWN, UP ,RGHT,XXXX,MINS,
- ____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,PGDN,PGUP,END ,BSLS,____,
- ____,____,____,____,____,____,____,____,____,____,____,____
+ [_LOWER] = LAYOUT_planck_grid(
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
+ _______,KC_LPRN,KC_RPRN,KC_LBRC,KC_RBRC,XXXXXXX,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT,XXXXXXX,KC_MINS,
+ _______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_BSLS,_______,
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
),
- [_LEANDOWN] = KC_KEYMAP(
- GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
- ____,LPRN,RPRN,LBRC,RBRC,LCBR,LCBR,DLR ,PERC,CIRC,____,____,
- ____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,EXLM, AT ,HASH,BSLS,____,
- ____,____,____,____,____,____,____,____,LEFT,DOWN, UP ,RGHT
+ [_LEANDOWN] = LAYOUT_planck_grid(
+ KC_GRV ,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
+ _______,KC_LPRN,KC_RPRN,KC_LBRC,KC_RBRC,KC_LCBR,KC_LCBR,KC_DLR ,KC_PERC,KC_CIRC,_______,_______,
+ _______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,KC_HOME,KC_EXLM, KC_AT ,KC_HASH,KC_BSLS,_______,
+ _______,_______,_______,_______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP ,KC_RGHT
),
- [_RAISE] = KC_KEYMAP(
- GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,____,
- ____,LPRN,RPRN,LCBR,RCBR,XXXX,XXXX, 4 , 5 , 6 ,PPLS,MINS,
- ____,BSLS,TILD,PIPE,EQL ,UNDS,XXXX, 1 , 2 , 3 ,PAST,____,
- ____,____,____,____,____,____,____,____,____,____,____,____
+ [_RAISE] = LAYOUT_planck_grid(
+ KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______,
+ _______,KC_LPRN,KC_RPRN,KC_LCBR,KC_RCBR,XXXXXXX,XXXXXXX, KC_4 , KC_5 , KC_6 ,KC_PPLS,KC_MINS,
+ _______,KC_BSLS,KC_TILD,KC_PIPE,KC_EQL ,KC_UNDS,XXXXXXX, KC_1 , KC_2 , KC_3 ,KC_PAST,_______,
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
),
- [_WOBBLE] = KC_KEYMAP(
- GRV , F1 , F2 , F3 , F4 , NO ,MUTE,VOLD,VOLU, NO , NO , DEL,
- , F5 , F6 , F7 , F8 , NO ,MPRV,MPLY,MSTP,MNXT, NO ,BSLS,
- , F9 , F10, F11, F12, NO , NO , NO , NO , INS,PSCR, ,
- , , , , , , , , , , ,
+ [_WOBBLE] = LAYOUT_planck_grid(
+ KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NO ,KC_MUTE,KC_VOLD,KC_VOLU, KC_NO , KC_NO , KC_DEL,
+ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_NO ,KC_MPRV,KC_MPLY,KC_MSTP,KC_MNXT, KC_NO ,KC_BSLS,
+ _______, KC_F9 , KC_F10, KC_F11, KC_F12, KC_NO , KC_NO , KC_NO , KC_NO , KC_INS,KC_PSCR,_______,
+ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
),
/* Adjust (Lower + Raise)
diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h
index 3ead109ac3..f014c50171 100644
--- a/keyboards/planck/light/light.h
+++ b/keyboards/planck/light/light.h
@@ -46,24 +46,8 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/planck/rev1/rev1.h b/keyboards/planck/rev1/rev1.h
index 3d1d1d21c5..db4c6b368d 100644
--- a/keyboards/planck/rev1/rev1.h
+++ b/keyboards/planck/rev1/rev1.h
@@ -28,22 +28,6 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/planck/rev2/rev2.h b/keyboards/planck/rev2/rev2.h
index 3d1d1d21c5..db4c6b368d 100644
--- a/keyboards/planck/rev2/rev2.h
+++ b/keyboards/planck/rev2/rev2.h
@@ -28,22 +28,6 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h
index 3d1d1d21c5..db4c6b368d 100644
--- a/keyboards/planck/rev3/rev3.h
+++ b/keyboards/planck/rev3/rev3.h
@@ -28,22 +28,6 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h
index 3d1d1d21c5..db4c6b368d 100644
--- a/keyboards/planck/rev4/rev4.h
+++ b/keyboards/planck/rev4/rev4.h
@@ -28,22 +28,6 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/planck/rev5/rev5.h b/keyboards/planck/rev5/rev5.h
index 3d1d1d21c5..db4c6b368d 100644
--- a/keyboards/planck/rev5/rev5.h
+++ b/keyboards/planck/rev5/rev5.h
@@ -28,22 +28,6 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/planck/rev6/rev6.h b/keyboards/planck/rev6/rev6.h
index 513b98f39f..9fd51e70fe 100644
--- a/keyboards/planck/rev6/rev6.h
+++ b/keyboards/planck/rev6/rev6.h
@@ -104,24 +104,8 @@
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
-) \
-LAYOUT_ortho_4x12( \
- KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
- KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
- KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
- KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
-)
-
-#define KEYMAP LAYOUT_ortho_4x12
+#define LAYOUT LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
-#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-#define KC_KEYMAP LAYOUT_kc
#endif
diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
index 3ba52081d2..7f7863fdb2 100644
--- a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
@@ -45,19 +45,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Spc | Ent | | Ent | Spc |
* `-------------' `-------------'
*/
- [_QWERTY] = LAYOUT_kc( \
+ [_QWERTY] = LAYOUT( \
//,--------+--------+--------+--------+--------+--------+--+--------+. ,--------+--+--------+--------+--------+--------+--------+--------+
- GRV, 1, 2, 3, 4, 5, MINS, EQL, 6, 7, 8, 9, 0, BSPC,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- TAB, Q, W, E, R, T, LBRC, RBRC, Y, U, I, O, P, BSLS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- ESC, A, S, D, F, G, _______, _______, H, J, K, L, SCLN, QUOT,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- LSPO, Z, X, C, V, B, _______, _______, N, M, COMM, DOT, SLSH, RSPC,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- LCTL, LALT, FN, LGUI, RGB_MOD, SPC, DEL, BSPC, SPC, ADJ, LGUI, FN, LALT, LCTL,
+ KC_LCTL, KC_LALT, FN, KC_LGUI, RGB_MOD, KC_SPC, KC_DEL, KC_BSPC, KC_SPC, ADJ, KC_LGUI, FN, KC_LALT, KC_LCTL,
//|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- SPC, ENT, ENT, SPC
+ KC_SPC, KC_ENT, KC_ENT, KC_SPC
// |--------+--------| |--------+-----------+
),
@@ -76,13 +76,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | |
* `-------------' `-------------'
*/
- [_FN] = LAYOUT_kc( \
+ [_FN] = LAYOUT( \
//,--------+--------+--------+--------+--------+--------+--+--------+. ,--------+--+--------+--------+--------+--------+--------+--------+
- F1, F2, F3, F4, F5, F6, _______, _______, F7, F8, F9, F10, F11, F12,
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
- _______, _______, LEFT, DOWN, RGHT, _______, _______, _______, MPLY, MNXT, MUTE, VOLD, VOLU, _______,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
diff --git a/keyboards/rgbkb/sol/sol.h b/keyboards/rgbkb/sol/sol.h
index 1bc87cb0aa..e885dc78c4 100644
--- a/keyboards/rgbkb/sol/sol.h
+++ b/keyboards/rgbkb/sol/sol.h
@@ -56,24 +56,3 @@
{ E50, E51 }, \
{ E60, E61 } \
}
-
-#define KC________ KC_TRNS
-#define KC_RGB_MOD RGB_MOD
-#define KC_FN FN
-#define KC_ADJ ADJ
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, L16, R16, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
- L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \
- L55, L56, R56, R50 \
- ) \
- LAYOUT( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
- KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, \
- KC_##L55, KC_##L56, KC_##R56, KC_##R50 \
- )
diff --git a/keyboards/sentraq/s60_x/default/default.h b/keyboards/sentraq/s60_x/default/default.h
index e330d99bb0..04f284171b 100644
--- a/keyboards/sentraq/s60_x/default/default.h
+++ b/keyboards/sentraq/s60_x/default/default.h
@@ -103,21 +103,3 @@ along with this program. If not, see .
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, }, \
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, XXX, } \
}
-
-
-/*This special definition is used for S60-X keymaps that were ported from TMK
- * QMK has a lot of keycodes that don't start with KC_, so using the regular KEYMAP macro is recommended
- */
-#define LAYOUT_kc( \
- 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, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
- K40, K41, K42, K46, K4A, K4B, K4C, K4D \
-) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, XXX }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, XXX }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \
- { KC_##K40, KC_##K41, KC_##K42, XXX, XXX, XXX, KC_##K46, XXX, XXX, XXX, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, XXX } \
-}
diff --git a/keyboards/sentraq/s60_x/keymaps/custom/keymap.c b/keyboards/sentraq/s60_x/keymaps/custom/keymap.c
deleted file mode 100644
index c98d14349f..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/custom/keymap.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include QMK_KEYBOARD_H
-
-/* Main layer: Test layout, using all keys.
-
- 0 1 2 3 4 5 6 7 8 9 A B C D E
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- 0 │GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │PGUP │BKSPC│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- 1 │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- 2 │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │PGDN │ENTER│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- 3 │LSHFT│HOME │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ END │RSHFT│ UP │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- 4 │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│R_GUI│ APP │RCTRL│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-*/
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: ANSI qwerty */
- LAYOUT_kc(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, PGUP, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, PGDN, ENT , \
- LSFT, HOME, Z, X, C, V, B, N, M, COMM, DOT, SLSH, END, RSFT, UP, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/custom/readme.md b/keyboards/sentraq/s60_x/keymaps/custom/readme.md
deleted file mode 100644
index 88ecdbbfc4..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/custom/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
-### 8 Custom
-The custom keymap - [keymap.c](keymap.c) - is where I tested all the switches, not being concerned with a specific layout or layers. It's a plain layout option with the extra keys used on ISO & HHKB layouts being assigned some other keys.
-
-#### 8.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │PgUp │BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │PgDwn│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│Home │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ End │Shift│ Up │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
deleted file mode 100644
index cba307ba49..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c
+++ /dev/null
@@ -1,180 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_MO4 MO(4)
-#define KC_MO6 MO(6)
-#define KC_MO7 MO(7)
-
-#define KC_LT5 LT(5, KC_SLSH)
-#define KC_LT6 LT(6, KC_SCLN)
-
-#define KC_MTRS MT(MOD_RSFT, KC_GRV)
-
-#define KC_DF0 DF(0)
-#define KC_DF1 DF(1)
-#define KC_DF2 DF(2)
-#define KC_DF3 DF(3)
-
-/*
- * Hasu
- */
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Keymap 0: Default Layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn2 │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ Fn1 │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ Fn3 │ Fn3 │ Fn0 │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, MTRS, NO, \
- LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4),
- /* Keymap 1: colemak
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│BKSPC│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│R_WIN│ APP │ Fn0 │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, F, P, G, J, L, U, Y, SCLN, LBRC, RBRC, BSLS, \
- BSPC, A, R, S, T, D, H, N, E, I, O, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, K, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4),
- /* Keymap 2: dvorak
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│R_WIN│ APP │ FN0 │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC, RBRC, NO, BSPC, \
- TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, SLSH, EQL, BSLS, \
- CAPS, A, O, E, U, I, D, H, T, N, S, MINS, NO, ENT, \
- LSFT, NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4),
- /* Keymap 3: workman
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ D │ E │ W │ B │ J │ F │ U │ P │ ; │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│BKSPC│ A │ S │ H │ T │ G │ Y │ N │ E │ O │ I │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ M │ C │ V │ K │ L │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│R_WIN│ APP │ FN0 │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, D, R, W, B, J, F, U, P, SCLN, LBRC, RBRC, BSLS, \
- BSPC, A, S, H, T, G, Y, N, E, O, I, QUOT, NO, ENT, \
- LSFT, NO, Z, X, M, C, V, K, L, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, MO4),
- /* Overlay 4: HHKB mode
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│Caps │ │ │ │ │ │ │ │ Psc │ Slk │Pause│ Up │ │ Ins │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│ VoD │ VoU │Mute │ │ │NP_* │NP_/ │Home │PgUp │Left │Right│▒▒▒▒▒│Enter│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ │ │ │ │ │NP_+ │NP_- │ End │PgDwn│Down │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████│Space│█████│█████│█████│R_ALT│R_GUI│ App │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \
- CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PSCR, SLCK, PAUS, UP, TRNS, INS, \
- LCTL, VOLD, VOLU, MUTE, TRNS, TRNS, PAST, PSLS, HOME, PGUP, LEFT, RGHT, TRNS, ENT, \
- LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PPLS, PMNS, END, PGDN, DOWN, TRNS, RSFT, TRNS, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, MO7, TRNS),
- /* Overlay 5: Vi mode (Slash)
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│BkSpc│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ Tab │Home │PgDwn│ Up │PgUp │ End │Home │PgDwn│PgUp │ End │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│ │Left │Down │Right│ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│Enter│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ │ │ │ │ │Home │PgDwn│PgUp │ End │ │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████│Space│█████│█████│█████│R_ALT│R_GUI│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, BSPC, \
- TAB, HOME, PGDN, UP, PGUP, END, HOME, PGDN, PGUP, END, TRNS, TRNS, TRNS, TRNS, \
- LCTL, TRNS, LEFT, DOWN, RGHT, TRNS, LEFT, DOWN, UP, RGHT, TRNS, TRNS, TRNS, ENT, \
- LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGDN, PGUP, END, TRNS, TRNS, RSFT, TRNS, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL),
- /* Overlay 6: Mouse mode (Semicolon/App)
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│BkSpc│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ Tab │ │ │ │ │ │ MwL │ MwD │ MwU │ MwR │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│ │ Ac0 │ Ac1 │ Ac2 │ │ McL │ McD │ McU │ McR │ │ │▒▒▒▒▒│Enter│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSFHT│▒▒▒▒▒│ │ │ │ │ Mb3 │ Mb2 │ Mb1 │ Mb4 │ Mb5 │ │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████│ Mb1 │█████│█████│█████│ │ │ │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, BSPC, \
- TAB, TRNS, TRNS, TRNS, TRNS, TRNS, WH_L, WH_D, WH_U, WH_R, TRNS, TRNS, TRNS, TRNS, \
- LCTL, TRNS, ACL0, ACL1, ACL2, TRNS, MS_L, MS_D, MS_U, MS_R, TRNS, TRNS, TRNS, ENT, \
- LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, BTN3, BTN2, BTN1, BTN4, BTN5, TRNS, TRNS, RSFT, TRNS, \
- LCTL, LGUI, LALT, BTN1, TRNS, TRNS, TRNS, RCTL),
- /* Overlay 7: Layout selector
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Lq │ Lw │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ Ld │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ Lc │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-
-Lq: set Qwerty layout
-Lc: set Colemak layout
-Ld: set Dvorak layout
-Lw: set Workman layout
-
- */
- LAYOUT_kc(
- DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/readme.md b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md
deleted file mode 100644
index 7a8104472f..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/hasu/readme.md
+++ /dev/null
@@ -1,4 +0,0 @@
-### 5. Hasu
-This is Hasu's favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. See [keymap.c](keymap.c) for detail.
-
-(Hasu is the initial creator of the TMK firmware, in case you weren't aware.)
\ No newline at end of file
diff --git a/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c
deleted file mode 100644
index 1ccefb6dd1..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c
+++ /dev/null
@@ -1,47 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_MO1 MO(1)
-
-/*
- * HHKB Layout
- */
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: Default layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │▒▒▒▒▒│Enter│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│ Fn │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│▒▒▒▒▒│ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│▒▒▒▒▒│ Alt │ Gui │▒▒▒▒▒│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSLS, GRV, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSPC, \
- LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, MO1, \
- NO, LGUI, LALT, SPC, NO, RALT, RGUI, NO),
- /* 1: HHKB Fn layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│Caps │ │ │ │ │ │ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ VoD │ VoU │ Mut │ Ejc │ │NP_* │NP_/ │Home │PgUp │Left │Right│▒▒▒▒▒│NPEnt│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │NP_+ │NP_- │ End │PgDwn│Down │▒▒▒▒▒│ │ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│▒▒▒▒▒│ │ │█████│█████│█████│ │█████│█████│█████│▒▒▒▒▒│ │ │▒▒▒▒▒│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
- CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PSCR, SLCK, PAUS, UP, TRNS, TRNS, \
- TRNS, VOLD, VOLU, MUTE, EJCT, TRNS, PAST, PSLS, HOME, PGUP, LEFT, RGHT, NO, PENT, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PPLS, PMNS, END, PGDN, DOWN, NO, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md
deleted file mode 100644
index 08df14e483..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md
+++ /dev/null
@@ -1,26 +0,0 @@
-### 7. HHKB
-[keymap.c](keymap.c) emulates original HHKB layers.
-#### 7.0: Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│ Fn │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │▒▒▒▒▒│ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│▒▒▒▒▒│ Alt │ Gui │▒▒▒▒▒│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 7.1: HHKB Fn layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ │ │ │ │ │ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ VoD │ VoU │ Mut │ Ejc │ │ * │ / │Home │PgUp │Left │Right│▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │▒▒▒▒▒│ │ │ │ │ │ + │ - │ End │PgDwn│Down │▒▒▒▒▒│ │ │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │▒▒▒▒▒│ │ │█████│█████│█████│ │█████│█████│█████│▒▒▒▒▒│ │ │▒▒▒▒▒│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c
deleted file mode 100644
index aec23f1aee..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include QMK_KEYBOARD_H
-
-/* 0: Main layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-*/
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: ANSI qwerty */
- LAYOUT_kc(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, NO, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT , \
- LSFT, BSLS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, RALT, MO(1),APP, RCTL),
-
-/* 1: Fn layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-*/
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, PGDN, PSCR, SLCK, PAUS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/iso/readme.md b/keyboards/sentraq/s60_x/keymaps/iso/readme.md
deleted file mode 100644
index 6b846617d5..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/iso/readme.md
+++ /dev/null
@@ -1,28 +0,0 @@
-### 2 Standard - ISO
-The same as the standard keymap, but with additional ISO keys.
-
-
-#### 2.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 2.1 Fn layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
deleted file mode 100644
index 24182ad20a..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-Copyright 2016 Julien Pecqueur
-Copyright 2016 Felix Uhl
-
-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 .
-*/
-
-#include QMK_KEYBOARD_H
-
-#define KC_MO1 MO(1)
-#define KC_SPFN LT(1, KC_SPC)
-#define KC_SDEL S(KC_DEL)
-#define KC_CINS C(KC_INS)
-#define KC_SINS S(KC_INS)
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Layout 0: Default Layer
- * ,-----------------------------------------------------------.
- * |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
- * |-----------------------------------------------------------|
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
- * |-----------------------------------------------------------|
- * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |
- * |-----------------------------------------------------------|
- * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
- * |-----------------------------------------------------------|
- * |Fn1 |Gui |Alt | SpaceFn |Alt |Gui |App |Ctrl|
- * `-----------------------------------------------------------'
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT, \
- LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- MO1, LGUI, LALT, SPFN, RALT, RGUI, APP, RCTL),
-
- /* Layout 1: Function Layer
- * ,-----------------------------------------------------------.
- * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
- * |-----------------------------------------------------------|
- * | |Prv|Ply|Nxt|Stp| | |PUp|Up |PDn| |Slk|Pau|Ins |
- * |-----------------------------------------------------------|
- * | |Vl-|Mut|Vl+| | |Hom|Lef|Dow|Rig|End| |PEnt |
- * |-----------------------------------------------------------|
- * | |Prt|Cut|Cop|Pst|Cal| | | | | |CapsLock |
- * |-----------------------------------------------------------|
- * | | | | | | | | |
- * `-----------------------------------------------------------'
- */
- LAYOUT_kc(
- ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \
- TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \
- TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \
- TRNS, TRNS, PSCR, SDEL, CINS, SINS, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
-
-void matrix_init_user(void) {
-
-}
-
-void matrix_scan_user(void) {
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
-}
diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/readme.md b/keyboards/sentraq/s60_x/keymaps/jpec/readme.md
deleted file mode 100644
index 73318dad72..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/jpec/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# The default keymap for s60-x
\ No newline at end of file
diff --git a/keyboards/sentraq/s60_x/keymaps/plain/keymap.c b/keyboards/sentraq/s60_x/keymaps/plain/keymap.c
deleted file mode 100644
index 3cdda75620..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/plain/keymap.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include QMK_KEYBOARD_H
-
-/* Main layer:
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│R_GUI│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-*/
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty */
- LAYOUT_kc(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/plain/readme.md b/keyboards/sentraq/s60_x/keymaps/plain/readme.md
deleted file mode 100644
index 402aa1bf9d..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/plain/readme.md
+++ /dev/null
@@ -1,16 +0,0 @@
-### 4. Plain
-Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host.
-See [keymap.c](keymap.c) for detail.
-
-#### 4.0 Plain Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │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 │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c
deleted file mode 100644
index 6286f24371..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c
+++ /dev/null
@@ -1,181 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_MO6 MO(6)
-#define KC_MO7 MO(7)
-
-#define KC_DF0 DF(0)
-#define KC_DF1 DF(1)
-#define KC_DF2 DF(2)
-#define KC_DF3 DF(3)
-
-#define KC_TG4 TG(4)
-#define KC_TG5 TG(5)
-
-#define KC_CSES C(S(KC_ESC))
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL),
- /* 1: colemak
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ F │ P │ G │ J │ L │ U │ Y │ ; │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│BKSPC│ A │ R │ S │ T │ D │ H │ N │ E │ I │ O │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ K │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, F, P, G, J, L, U, Y, SCLN, LBRC, RBRC, BSLS, \
- BSPC, A, R, S, T, D, H, N, E, I, O, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, K, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL),
- /* 2: dvorak
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ [ │ ] │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ ' │ , │ . │ P │ Y │ F │ G │ C │ R │ L │ / │ = │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ O │ E │ U │ I │ D │ H │ T │ N │ S │ - │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ ; │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC, RBRC, NO, BSPC, \
- TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, SLSH, EQL, BSLS, \
- CAPS, A, O, E, U, I, D, H, T, N, S, MINS, NO, ENT, \
- LSFT, NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL),
- /* 3: workman
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ D │ E │ W │ B │ J │ F │ U │ P │ ; │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│BKSPC│ A │ S │ H │ T │ G │ Y │ N │ E │ O │ I │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ M │ C │ V │ K │ L │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, D, R, W, B, J, F, U, P, SCLN, LBRC, RBRC, BSLS, \
- BSPC, A, S, H, T, G, Y, N, E, O, I, QUOT, NO, ENT, \
- LSFT, NO, Z, X, M, C, V, K, L, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, MO6, RGUI, APP, RCTL),
- /* 4: Poker with Arrow
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ Up │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │Left │Down │Right│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT),
- /* 5: Poker with Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
- /* 6: Poker Fn
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ FnL │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-
-Fn: to Fn overlay
-FnL: to Layout selector overaly
-FnQ: toggle Esc overlay
-FnS: toggle Arrow overlay
-
- */
- LAYOUT_kc(
- ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, TG5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TG4, TRNS, TRNS, TRNS, TRNS),
- /* 7: Layout selector
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Lq │ Lw │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ Ld │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ Lc │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-
-Lq: set Qwerty layout
-Lc: set Colemak layout
-Ld: set Dvorak layout
-Lw: set Workman layout
-
- */
- LAYOUT_kc(
- DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/poker/readme.md b/keyboards/sentraq/s60_x/keymaps/poker/readme.md
deleted file mode 100644
index 2fdc9d702c..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker/readme.md
+++ /dev/null
@@ -1,31 +0,0 @@
-### 3 Poker
-[keymap_poker](../poker/readme.md) emulates original Poker layers
-while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys.
-
- Fn + Esc = `
- Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-
-#### 3.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Fn │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 3.1 Poker Fn layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ Up │▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ Fn │Left │Down │Right│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c
deleted file mode 100644
index a4ab412ee2..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c
+++ /dev/null
@@ -1,111 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_TG5 TG(5)
-#define KC_TG6 TG(6)
-#define KC_CSES C(S(KC_ESC))
-
-// Poker fix with toggle and bit operation
-// Fn + Esc = `
-// Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL),
- /* 4: Poker Default + Fn'd
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│Caps │ Fn2 │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Fn4 │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ Fn1 │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- [4] = LAYOUT_kc(
- TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- CAPS, TG6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TG5, TRNS, TRNS, TRNS, TRNS),
- /* 5: Poker with Arrow
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│PgUp │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ Fn3 │Home │PgDwn│ End │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, TRNS, \
- TRNS, TRNS, TRNS, TRNS, FN3, HOME, PGDN, END),
- /* 6: Poker with Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
- /* 7: Poker with Arrow + Fn'd
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ Up │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │Left │Down │Right│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT),
-};
-const uint16_t PROGMEM fn_actions[] = {
- /* Poker Layout */
- [0] = ACTION_LAYER_BIT_XOR(1, 0b0101, ON_BOTH), // Poker Fn(with fix for Esc)
- [3] = ACTION_LAYER_BIT_XOR(1, 0b1101, ON_BOTH), // Poker Fn(with fix for Arrow)
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md
deleted file mode 100644
index 2fdc9d702c..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md
+++ /dev/null
@@ -1,31 +0,0 @@
-### 3 Poker
-[keymap_poker](../poker/readme.md) emulates original Poker layers
-while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys.
-
- Fn + Esc = `
- Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-
-#### 3.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Fn │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 3.1 Poker Fn layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ Up │▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ Fn │Left │Down │Right│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c
deleted file mode 100644
index 64678cd56c..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c
+++ /dev/null
@@ -1,178 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_CSES C(S(KC_ESC))
-
-// Poker fix with set(state transition)
-// Fn + Esc = `
-// Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_WIN│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│ Fn0 │R_WIN│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, SPC, FN0, RGUI, APP, RCTL),
- /* 1: Poker with Arrow
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ Up │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ Fn1 │Left │Down │Right│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, TRNS, \
- TRNS, TRNS, TRNS, TRNS, FN1, LEFT, DOWN, RGHT),
- /* 2: Poker with Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ Fn2 │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS),
- /* 3: Poker with Arrow and Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │ │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ Up │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ Fn3 │Left │Down │Right│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, TRNS, \
- TRNS, TRNS, TRNS, TRNS, FN3, LEFT, DOWN, RGHT),
- /* 4: Poker Fn'd
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Fn6 │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Fn8 │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ Fn5 │█████│█████│█████│ Fn4 │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, FN6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, FN5, FN4, TRNS, TRNS, TRNS),
- /* 5: Poker Fn'd arrow
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Fn7 │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Fn8 │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│PgUp │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ Fn4 │█████│█████│█████│ Fn5 │Home │PgDwn│ End │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, FN7, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \
- TRNS, TRNS, TRNS, FN4, FN5, HOME, PGDN, END),
- /* 6: Poker Fn'd Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Fn4 │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Fn8 │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ Fn7 │█████│█████│█████│ Fn6 │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, FN4, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, FN7, FN6, TRNS, TRNS, TRNS),
- /* 7: Poker Fn'd Arrow + Esc
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│Grave│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ Fn5 │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Fn8 │ End │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│PgUp │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ Fn6 │█████│█████│█████│ Fn7 │Home │PgDwn│ End │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \
- TRNS, FN5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \
- TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \
- TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \
- TRNS, TRNS, TRNS, FN6, FN7, HOME, PGDN, END),
-};
-
-/*
- * Fn action definition
- */
-const uint16_t PROGMEM fn_actions[] = {
- /* Poker Layout */
- [0] = ACTION_LAYER_SET(4, ON_PRESS), // FN0 move to Fn'd when press
- [1] = ACTION_LAYER_SET(5, ON_PRESS), // FN1 move to Fn'd arrow when press
- [2] = ACTION_LAYER_SET(6, ON_PRESS), // FN2 move to Fn'd Esc when press
- [3] = ACTION_LAYER_SET(7, ON_PRESS), // FN3 move to Fn'd arrow + Esc when press
-
- //[4] = ACTION_LAYER_CLEAR(ON_RELEASE), // FN4 clear overlay when release
- [4] = ACTION_LAYER_SET(0, ON_RELEASE), // FN4 clear overlay when release
- [5] = ACTION_LAYER_SET(1, ON_RELEASE), // FN5 move to arrow when release
- [6] = ACTION_LAYER_SET(2, ON_RELEASE), // FN6 move to Esc when release
- [7] = ACTION_LAYER_SET(3, ON_RELEASE), // FN7 move to arrow + Esc when release
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md
deleted file mode 100644
index 2fdc9d702c..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md
+++ /dev/null
@@ -1,31 +0,0 @@
-### 3 Poker
-[keymap_poker](../poker/readme.md) emulates original Poker layers
-while both [keymap_poker_bit](../poker_bit/readme.md) and [keymap_poker_set](../poker_set/readme.md) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys.
-
- Fn + Esc = `
- Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-
-#### 3.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Fn │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 3.1 Poker Fn layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ Up │▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ Fn │Left │Down │Right│█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
deleted file mode 100644
index 6ef273d1e3..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define KC_LT1 LT(1, KC_SPC)
-
-/*
- * SpaceFN
- * http://geekhack.org/index.php?topic=51069.0
- */
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Keymap 0: Default Layer
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│LCTRL│L_GUI│L_ALT│█████│█████│█████Spc/Fn0█████│█████│█████│R_ALT│R_GUI│ APP │RCTRL│█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NO, ENT, \
- LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \
- LCTL, LGUI, LALT, LT1, RALT, RGUI, APP, RCTL),
-
- /* Overlay 1: SpaceFN
-┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
-│ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ Esc │ │ │ │Home │ Up │ End │Pscr │Slck │Pause│ Ins │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │ │ │ │PgUp │Left │Down │Right│ │ │▒▒▒▒▒│ │█████│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │▒▒▒▒▒│ │ │ │Space│PgDwn│ ` │ ~ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
-├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-│ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│
-└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
- */
- LAYOUT_kc(
- GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \
- TRNS, TRNS, TRNS, ESC, TRNS, TRNS, TRNS, HOME, UP, END, PSCR, SLCK, PAUS, INS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, TILD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
- TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
-};
diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md
deleted file mode 100644
index 3fe215afcc..0000000000
--- a/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md
+++ /dev/null
@@ -1,27 +0,0 @@
-### 6. SpaceFN
-This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. See [keymap.c](keymap.c) and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0).
-
-#### 6.0 Default layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │Ctrl │ Gui │ Alt │█████│█████│████ Space/Fn ███│█████│█████│ Alt │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
-#### 6.1 SpaceFN layer
- ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────â”
- │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │ │ │ │ │Home │ Up │ End │ Psc │ Slk │Pause│ Ins │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │ │ │ │PgUp │Left │Down │Right│ │ │▒▒▒▒▒│ │█████│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │▒▒▒▒▒│ │ │ │ │Space│PgDwn│ ` │ ~ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│
- ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
- │ │ │ │█████│█████│█████│ Fn │█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│
- └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
diff --git a/keyboards/sentraq/s60_x/rgb/rgb.h b/keyboards/sentraq/s60_x/rgb/rgb.h
index 59ffdfbbfa..932aca6243 100644
--- a/keyboards/sentraq/s60_x/rgb/rgb.h
+++ b/keyboards/sentraq/s60_x/rgb/rgb.h
@@ -76,21 +76,3 @@
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, XXX, }, \
{ K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, XXX, } \
}
-
-
-/*This special definition is used for S60-X keymaps that were ported from TMK
- * QMK has a lot of keycodes that don't start with KC_, so using the regular KEYMAP macro is recommended
- */
-#define LAYOUT_kc( \
- 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, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
- K40, K41, K42, K46, K4A, K4B, K4C, K4D \
-) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, XXX }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, XXX }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \
- { KC_##K40, KC_##K41, KC_##K42, XXX, XXX, XXX, KC_##K46, XXX, XXX, XXX, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, XXX } \
-}
diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h
index aa8fc62aa0..7af43fb6b4 100644
--- a/keyboards/vision_division/keymaps/default/config.h
+++ b/keyboards/vision_division/keymaps/default/config.h
@@ -19,7 +19,7 @@
#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY)
-#define KEYMAP(MATRIX_LAYER, \
+#define LAYOUT(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@@ -27,7 +27,7 @@
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \
-KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \
+LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@@ -39,7 +39,7 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERI
// Example Keymap Macros
/*
-#define KEYMAP(MATRIX_LAYER, \
+#define LAYOUT(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@@ -47,7 +47,7 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERI
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \
) \
-KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
+LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \
@@ -58,7 +58,7 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERI
*/
/*
-#define KEYMAP(MATRIX_LAYER, \
+#define LAYOUT(MATRIX_LAYER, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \
@@ -66,7 +66,7 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERI
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \
k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \
) \
-KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
+LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \
k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \
diff --git a/keyboards/vision_division/matrix_types.h b/keyboards/vision_division/matrix_types.h
index 893e5272a3..460545ab09 100644
--- a/keyboards/vision_division/matrix_types.h
+++ b/keyboards/vision_division/matrix_types.h
@@ -107,47 +107,47 @@
// Specialized Row Macros
-#define KEYMAP_ROW_LEFT_ABSENT( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C)
-
-#define KEYMAP_ROW_LEFT_NUMERIC_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_LEFT_HOMING_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_LEFT_NUMERIC_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_LEFT_HOMING_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_LEFT_NUMERIC_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A
-#define KEYMAP_ROW_LEFT_HOMING_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A
-#define KEYMAP_ROW_LEFT_NUMERIC_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_LEFT_HOMING_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_LEFT_NUMERIC_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_LEFT_HOMING_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_LEFT_NUMERIC_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A
-#define KEYMAP_ROW_LEFT_HOMING_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A
-
-#define KEYMAP_ROW_RIGHT_ABSENT( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C)
-
-#define KEYMAP_ROW_RIGHT_NUMERIC_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_RIGHT_NUMERIC_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_RIGHT_NUMERIC_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_RIGHT_NUMERIC_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_RIGHT_NUMERIC_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
-#define KEYMAP_ROW_RIGHT_NUMERIC_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
-#define KEYMAP_ROW_RIGHT_HOMING_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_LEFT_ABSENT( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C)
+
+#define LAYOUT_ROW_LEFT_NUMERIC_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_LEFT_HOMING_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_LEFT_NUMERIC_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_LEFT_HOMING_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_LEFT_NUMERIC_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A
+#define LAYOUT_ROW_LEFT_HOMING_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A
+#define LAYOUT_ROW_LEFT_NUMERIC_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_LEFT_HOMING_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_LEFT_NUMERIC_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_LEFT_HOMING_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_LEFT_NUMERIC_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A
+#define LAYOUT_ROW_LEFT_HOMING_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A
+
+#define LAYOUT_ROW_RIGHT_ABSENT( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C)
+
+#define LAYOUT_ROW_RIGHT_NUMERIC_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_MAX( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_RIGHT_NUMERIC_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_EXTENDED( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_RIGHT_NUMERIC_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_NORMAL( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_RIGHT_NUMERIC_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_MAX_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_RIGHT_NUMERIC_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_EXTENDED_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B
+#define LAYOUT_ROW_RIGHT_NUMERIC_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C
+#define LAYOUT_ROW_RIGHT_HOMING_NORMAL_TEENSY( k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C) k03, k04, k05, k06, k07, k08, k09, k0A, k0B
// Changable Row Macro
-#define _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, \
+#define _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C \
) \
-KEYMAP_ROW_LEFT_ ## _LEFT_TYPE( k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C ), \
-KEYMAP_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C )
+LAYOUT_ROW_LEFT_ ## _LEFT_TYPE( k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C ), \
+LAYOUT_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C )
// Changable Master Macro
-#define KEYMAP_MASTER(_MATRIX_LAYER, _LEFT_TYPE, _RIGHT_TYPE, \
+#define LAYOUT_MASTER(_MATRIX_LAYER, _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \
k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \
@@ -156,13 +156,13 @@ KEYMAP_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018
k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C \
) \
[_MATRIX_LAYER] = { \
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
- { _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
+ { _LAYOUT_ROW( _LEFT_TYPE, _RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
}
-#endif // MATRIX_TYPES_H
\ No newline at end of file
+#endif // MATRIX_TYPES_H
diff --git a/keyboards/vitamins_included/vitamins_included.h b/keyboards/vitamins_included/vitamins_included.h
index 4cdfe03edd..5cd03cfcf8 100644
--- a/keyboards/vitamins_included/vitamins_included.h
+++ b/keyboards/vitamins_included/vitamins_included.h
@@ -33,20 +33,4 @@
{ R30, R31, R32, R33, R34, R35 } \
}
-// Used to create a keymap using only KC_ prefixed keys
-#define LAYOUT_kc( \
- L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
- L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
- L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
- L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
- ) \
- KEYMAP( \
- KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
- KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
- KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
- KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
- )
-
-#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
#define LAYOUT_ortho_4x12 LAYOUT
-#define KC_KEYMAP LAYOUT_kc
diff --git a/keyboards/ymd96/keymaps/epx/keymap.c b/keyboards/ymd96/keymaps/epx/keymap.c
index 09ec665a3a..cb353a08b7 100644
--- a/keyboards/ymd96/keymaps/epx/keymap.c
+++ b/keyboards/ymd96/keymaps/epx/keymap.c
@@ -24,7 +24,7 @@ along with this program. If not, see .
#define _AR 1
#define _RAISE 2
-#define KEYMAP LAYOUT_default
+#define LAYOUT LAYOUT_default
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0, default layer
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* (Fn-Num Lock operates as conventional Num Lock in case the keyboard needs to be used with Windows or Linux.)
* Caps Lock operates normally but it takes FN to work, the key is Ctrl by default, like in Model F.
*/
- [_DEFLT] = KEYMAP(
+ [_DEFLT] = 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, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, TO(_AR), 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, \
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ... | End | Down | Pg Dn | |
* ... | Ins | Del | Enter |
*/
- [_AR] = KEYMAP(
+ [_AR] = LAYOUT(
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, TO(_DEFLT), _x_, _x_, _x_, \
_x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_HOME, KC_UP, KC_PGUP, _x_, \
@@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | | | |
* | | | | | Win Menu | | | | | | |
*/
- [_RAISE] = KEYMAP(
+ [_RAISE] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_PAUS, KC_SLCK, KC_MUTE, KC_MSTP, KC_DEL, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_NLCK, _______, _______, _______, \
_______, RGB_TOG, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
diff --git a/keyboards/ymd96/keymaps/hgoel89/keymap.c b/keyboards/ymd96/keymaps/hgoel89/keymap.c
index f612f79baf..cb7a3eb1e7 100644
--- a/keyboards/ymd96/keymaps/hgoel89/keymap.c
+++ b/keyboards/ymd96/keymaps/hgoel89/keymap.c
@@ -27,7 +27,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
#define _DEFLT 0
#define _RAISE 1
-#define KEYMAP LAYOUT_custom
+#define LAYOUT LAYOUT_custom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys
*/
- [_DEFLT] = KEYMAP(
+ [_DEFLT] = 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, KC_PSCR, KC_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \
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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, 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_NO, \
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | |
* | | | | | | |MPrev | | | MNext| | | |
*/
- [_RAISE] = KEYMAP(
+ [_RAISE] = LAYOUT(
RESET,RGB_TOG, BL_TOGG, BL_STEP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
______, BL_INC, BL_DEC, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_F22, KC_F23, KC_F24, ______, ______, ______, ______, ______, \
diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h
index 6310a14e35..5fbc968ad8 100755
--- a/keyboards/zlant/zlant.h
+++ b/keyboards/zlant/zlant.h
@@ -27,18 +27,6 @@
{ K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \
}
-#define LAYOUT_kc_ortho_4x12( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
- K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
- K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
- K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
-) LAYOUT( \
- KC_##K000, KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \
- KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, KC_##K111, \
- KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208, KC_##K209, KC_##K210, KC_##K211, \
- KC_##K300, KC_##K301, KC_##K302, KC_##K303, KC_##K304, KC_##K305, KC_##K306, KC_##K307, KC_##K308, KC_##K309, KC_##K310, KC_##K311 \
-)
-
#define LAYOUT LAYOUT_ortho_4x12
#endif
diff --git a/layouts/community/ortho_4x12/rs/keymap.c b/layouts/community/ortho_4x12/rs/keymap.c
index c6d6f14cad..a8a057f3d7 100644
--- a/layouts/community/ortho_4x12/rs/keymap.c
+++ b/layouts/community/ortho_4x12/rs/keymap.c
@@ -24,29 +24,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// |------+------+------+------+------+------+------+------+------+------+------+------|
LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT
+ TRNS , TRNS , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , TRNS , LEFT , RGHT
// `-----------------------------------------------------------------------------------'
),
[_CODE] = LAYOUT_kc(
// ,-----------------------------------------------------------------------------------.
- GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
+ GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , TRNS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
+ TRNS , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , TRNS , BSLS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
+ TRNS , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , TRNS , PIPE ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , , , , DOT , , , , , ,
+ TRNS , TRNS , TRNS , TRNS , TRNS , DOT , TRNS , TRNS , TRNS , TRNS , TRNS , TRNS
// `-----------------------------------------------------------------------------------'
),
[_FN] = LAYOUT_kc(
// ,-----------------------------------------------------------------------------------.
- , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
+ TRNS , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , ,
+ BLTG , BLUP , TRNS , TRNS , TRNS , BRMU , VOLU , TRNS , PGUP , TRNS , TRNS , TRNS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , ,
+ BLTG , BLDN , TRNS , TRNS , RST , BRMD , VOLD , CTRA , PGDN , CTRE , TRNS , TRNS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , , , , , MUTE , , , , ,
+ TRNS , TRNS , TRNS , TRNS , TRNS , TRNS , MUTE , TRNS , TRNS , TRNS , TRNS , TRNS
// `-----------------------------------------------------------------------------------'
),
};
diff --git a/quantum/config_common.h b/quantum/config_common.h
index d93477b27e..661609ef2a 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -24,4 +24,7 @@
#define COL2ROW 0
#define ROW2COL 1
+// Deprecated alias - avoid using
+#define KEYMAP LAYOUT
+
#include "song_list.h"
diff --git a/users/rs/rs.h b/users/rs/rs.h
index 722d6ed19e..fde8c33558 100644
--- a/users/rs/rs.h
+++ b/users/rs/rs.h
@@ -18,8 +18,6 @@ enum custom_keycodes {
#endif
};
-#define KC_ KC_TRNS
-
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
#define KC_LTGT LTGT // > or < with shift
@@ -47,4 +45,4 @@ enum custom_keycodes {
#define KC_LVAI RGB_VAI
#define KC_LVAD RGB_VAD
#define KC_LMOD RGB_MOD
-#endif
\ No newline at end of file
+#endif
--
cgit v1.2.3
From 92fbadeb1bb9f9c37cfeef2a4f81f2f154e1226b Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 13 May 2021 09:17:18 +1000
Subject: Rename `point_t` -> `led_point_t` (#12864)
---
quantum/led_matrix.c | 4 ++--
quantum/led_matrix_types.h | 8 ++++----
quantum/rgb_matrix.c | 4 ++--
quantum/rgb_matrix_types.h | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 58cda64130..d612fbfa9d 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -28,9 +28,9 @@
#include
#ifndef LED_MATRIX_CENTER
-const point_t k_led_matrix_center = {112, 32};
+const led_point_t k_led_matrix_center = {112, 32};
#else
-const point_t k_led_matrix_center = LED_MATRIX_CENTER;
+const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
#endif
// Generic effect runners
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix_types.h
index 13f44b07e9..61cdbd9b8e 100644
--- a/quantum/led_matrix_types.h
+++ b/quantum/led_matrix_types.h
@@ -61,7 +61,7 @@ typedef struct PACKED {
typedef struct PACKED {
uint8_t x;
uint8_t y;
-} point_t;
+} led_point_t;
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
@@ -75,9 +75,9 @@ typedef struct PACKED {
#define NO_LED 255
typedef struct PACKED {
- uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
- point_t point[DRIVER_LED_TOTAL];
- uint8_t flags[DRIVER_LED_TOTAL];
+ uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
+ led_point_t point[DRIVER_LED_TOTAL];
+ uint8_t flags[DRIVER_LED_TOTAL];
} led_config_t;
typedef union {
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 097c5302df..e716c6aad3 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -26,9 +26,9 @@
#include
#ifndef RGB_MATRIX_CENTER
-const point_t k_rgb_matrix_center = {112, 32};
+const led_point_t k_rgb_matrix_center = {112, 32};
#else
-const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
+const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
#endif
__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
index 1a37922af9..df575d6577 100644
--- a/quantum/rgb_matrix_types.h
+++ b/quantum/rgb_matrix_types.h
@@ -62,7 +62,7 @@ typedef struct PACKED {
typedef struct PACKED {
uint8_t x;
uint8_t y;
-} point_t;
+} led_point_t;
#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
@@ -77,9 +77,9 @@ typedef struct PACKED {
#define NO_LED 255
typedef struct PACKED {
- uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
- point_t point[DRIVER_LED_TOTAL];
- uint8_t flags[DRIVER_LED_TOTAL];
+ uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
+ led_point_t point[DRIVER_LED_TOTAL];
+ uint8_t flags[DRIVER_LED_TOTAL];
} led_config_t;
typedef union {
--
cgit v1.2.3
From cbdc3fb81b88ea83949fd55305d1b068225972ac Mon Sep 17 00:00:00 2001
From: Joakim Tufvegren
Date: Thu, 13 May 2021 19:37:24 +0200
Subject: Fix spelling mistake regarding LED Matrix in split_common. (#12888)
---
quantum/split_common/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'quantum')
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 9b3f70ed06..bf942c5260 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -392,7 +392,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_econfig;
+ serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
--
cgit v1.2.3
From 6c7450dad7c3651e0aae7ebaeb6c3cf15bde5112 Mon Sep 17 00:00:00 2001
From: Matthes W
Date: Mon, 17 May 2021 02:59:02 +0200
Subject: Add function to allow repeated blinking of one layer (#12237)
* Implement function rgblight_blink_layer_repeat to allow repeated blinking of one layer at a time
* Update doc
* Rework rgblight blinking according to requested change
* optimize storage---
docs/feature_rgblight.md | 12 ++++++++++++
quantum/rgblight.c | 42 ++++++++++++++++++++++++++++++------------
quantum/rgblight.h | 1 +
3 files changed, 43 insertions(+), 12 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 8e8d6b81c3..292176548f 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -310,6 +310,18 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
}
```
+You can also use `rgblight_blink_layer_repeat` to specify the amount of times the layer is supposed to blink. Using the layers from above,
+```c
+void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case DEBUG:
+ rgblight_blink_layer_repeat(debug_enable ? 0 : 1, 200, 3);
+ break;
+ }
+}
+```
+would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed.
+
### Overriding RGB Lighting on/off status
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 119d3eab21..e4c4d555e5 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -722,23 +722,41 @@ static void rgblight_layers_write(void) {
}
# ifdef RGBLIGHT_LAYER_BLINK
-rgblight_layer_mask_t _blinked_layer_mask = 0;
-static uint16_t _blink_timer;
+rgblight_layer_mask_t _blinking_layer_mask = 0;
+static uint16_t _repeat_timer;
+static uint8_t _times_remaining;
+static uint16_t _dur;
void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) {
+ rgblight_blink_layer_repeat(layer, duration_ms, 1);
+}
+
+void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) {
+ _times_remaining = times * 2;
+ _dur = duration_ms;
+
rgblight_set_layer_state(layer, true);
- _blinked_layer_mask |= (rgblight_layer_mask_t)1 << layer;
- _blink_timer = sync_timer_read() + duration_ms;
+ _times_remaining--;
+ _blinking_layer_mask |= (rgblight_layer_mask_t)1 << layer;
+ _repeat_timer = sync_timer_read() + duration_ms;
}
-void rgblight_unblink_layers(void) {
- if (_blinked_layer_mask != 0 && timer_expired(sync_timer_read(), _blink_timer)) {
+void rgblight_blink_layer_repeat_helper(void) {
+ if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) {
for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) {
- if ((_blinked_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0) {
- rgblight_set_layer_state(layer, false);
+ if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) {
+ if (_times_remaining % 2 == 1) {
+ rgblight_set_layer_state(layer, false);
+ } else {
+ rgblight_set_layer_state(layer, true);
+ }
+ _times_remaining--;
+ _repeat_timer = sync_timer_read() + _dur;
}
}
- _blinked_layer_mask = 0;
+ if (_times_remaining <= 0) {
+ _blinking_layer_mask = 0;
+ }
}
}
# endif
@@ -755,8 +773,8 @@ void rgblight_suspend(void) {
# ifdef RGBLIGHT_LAYER_BLINK
// make sure any layer blinks don't come back after suspend
- rgblight_status.enabled_layer_mask &= ~_blinked_layer_mask;
- _blinked_layer_mask = 0;
+ rgblight_status.enabled_layer_mask &= ~_blinking_layer_mask;
+ _blinking_layer_mask = 0;
# endif
rgblight_disable_noeeprom();
@@ -1030,7 +1048,7 @@ void rgblight_task(void) {
}
# ifdef RGBLIGHT_LAYER_BLINK
- rgblight_unblink_layers();
+ rgblight_blink_layer_repeat_helper();
# endif
}
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
index 6fb3ab9380..bec2c66955 100644
--- a/quantum/rgblight.h
+++ b/quantum/rgblight.h
@@ -222,6 +222,7 @@ extern const rgblight_segment_t *const *rgblight_layers;
# ifdef RGBLIGHT_LAYER_BLINK
# define RGBLIGHT_USE_TIMER
void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms);
+void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times);
# endif
# endif
--
cgit v1.2.3
From 82aa9ad4a567695d1f7d0b1e36bf8563d2967813 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg
Date: Wed, 19 May 2021 22:43:36 +0200
Subject: matrix: wait for row signal to go HIGH for every row (#12945)
I noticed this discrepancy (last row of the matrix treated differently than the
others) when optimizing the input latency of my keyboard controller, see also
https://michael.stapelberg.ch/posts/2021-05-08-keyboard-input-latency-qmk-kinesis/
Before this commit, when tuning the delays I noticed ghost key presses when
pressing the F2 key, which is on the last row of the keyboard matrix: the
dead_grave key, which is on the first row of the keyboard matrix, would be
incorrectly detected as pressed.
After this commit, all keyboard matrix rows are interpreted correctly.
I suspect that my setup is more susceptible to this nuance than others because I
use GPIO_INPUT_PIN_DELAY=0 and hence don’t have another delay that might mask
the problem.---
quantum/matrix.c | 8 ++------
quantum/split_common/matrix.c | 8 ++------
2 files changed, 4 insertions(+), 12 deletions(-)
(limited to 'quantum')
diff --git a/quantum/matrix.c b/quantum/matrix.c
index c027b7bf27..34d6af2e6d 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -116,9 +116,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Unselect row
unselect_row(current_row);
- if (current_row + 1 < MATRIX_ROWS) {
- matrix_output_unselect_delay(); // wait for row signal to go HIGH
- }
+ matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
// If the row has changed, store the row and return the changed flag.
if (current_matrix[current_row] != current_row_value) {
@@ -178,9 +176,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
// Unselect col
unselect_col(current_col);
- if (current_col + 1 < MATRIX_COLS) {
- matrix_output_unselect_delay(); // wait for col signal to go HIGH
- }
+ matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
return matrix_changed;
}
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index f8de17809d..039e7d9773 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -130,9 +130,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Unselect row
unselect_row(current_row);
- if (current_row + 1 < MATRIX_ROWS) {
- matrix_output_unselect_delay(); // wait for row signal to go HIGH
- }
+ matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
// If the row has changed, store the row and return the changed flag.
if (current_matrix[current_row] != current_row_value) {
@@ -192,9 +190,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
// Unselect col
unselect_col(current_col);
- if (current_col + 1 < MATRIX_COLS) {
- matrix_output_unselect_delay(); // wait for col signal to go HIGH
- }
+ matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
return matrix_changed;
}
--
cgit v1.2.3
From 8e96c5a060896c4aa5ed181d9c86c4e66bb78cfc Mon Sep 17 00:00:00 2001
From: Donald Kjer
Date: Fri, 21 May 2021 21:42:39 -0700
Subject: Add support for up to 4 IS31FL3733 drivers (#12342)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>---
docs/feature_led_matrix.md | 31 +++++++++-----
docs/feature_rgb_matrix.md | 96 +++++++++++++++++++++++++++++++++++++++-----
drivers/issi/is31fl3733.c | 2 +-
quantum/led_matrix_drivers.c | 22 +++++++---
quantum/rgb_matrix_drivers.c | 45 +++++++++++++++++++--
5 files changed, 167 insertions(+), 29 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
index 7834b940d5..e56caabfe7 100644
--- a/docs/feature_led_matrix.md
+++ b/docs/feature_led_matrix.md
@@ -15,7 +15,20 @@ LED_MATRIX_ENABLE = yes
LED_MATRIX_DRIVER = IS31FL3731
```
-Configure the hardware via your `config.h`:
+You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | |
+| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
+| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
+| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | |
+| `LED_DRIVER_ADDR_4` | (Optional) Address for the fourth LED driver | |
+
+Here is an example using 2 drivers.
```c
// This is a 7-bit address, that gets left-shifted and bit 0
@@ -25,18 +38,16 @@ Configure the hardware via your `config.h`:
// 0b1110111 AD <-> VCC
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
-#define DRIVER_ADDR_1 0b1110100
-#define DRIVER_ADDR_2 0b1110110
+#define LED_DRIVER_ADDR_1 0b1110100
+#define LED_DRIVER_ADDR_2 0b1110110
-#define DRIVER_COUNT 2
-#define DRIVER_1_LED_TOTAL 25
-#define DRIVER_2_LED_TOTAL 24
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define LED_DRIVER_COUNT 2
+#define LED_DRIVER_1_LED_TOTAL 25
+#define LED_DRIVER_2_LED_TOTAL 24
+#define DRIVER_LED_TOTAL (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)
```
-!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-
-Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
+!> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`.
Define these arrays listing all the LEDs in your `.c`:
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index ffbb8c0b60..a29d5c624b 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -15,7 +15,20 @@ RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3731
```
-Configure the hardware via your `config.h`:
+You can use between 1 and 4 IS31FL3731 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
+| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
+| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
+| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
+| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
+
+Here is an example using 2 drivers.
```c
// This is a 7-bit address, that gets left-shifted and bit 0
@@ -36,8 +49,6 @@ Configure the hardware via your `config.h`:
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
-Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
-
Define these arrays listing all the LEDs in your `.c`:
```c
@@ -53,12 +64,10 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
-Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
+Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`).
---
-### IS31FL3733/IS31FL3737 :id=is31fl3733is31fl3737
-
-!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
+### IS31FL3733 :id=is31fl3733
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
@@ -67,7 +76,24 @@ RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3733
```
-Configure the hardware via your `config.h`:
+You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 |
+| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
+| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | |
+| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | |
+| `DRIVER_ADDR_3` | (Optional) Address for the third RGB driver | |
+| `DRIVER_ADDR_4` | (Optional) Address for the fourth RGB driver | |
+| `DRIVER_SYNC_1` | (Optional) Sync configuration for the first RGB driver | 0 |
+| `DRIVER_SYNC_2` | (Optional) Sync configuration for the second RGB driver | 0 |
+| `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 |
+| `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 |
+
+Here is an example using 2 drivers.
```c
// This is a 7-bit address, that gets left-shifted and bit 0
@@ -81,6 +107,58 @@ Configure the hardware via your `config.h`:
// ADDR2 represents A3:A2 of the 7-bit address.
// The result is: 0b101(ADDR2)(ADDR1)
#define DRIVER_ADDR_1 0b1010000
+#define DRIVER_ADDR_2 0b1010011
+
+#define DRIVER_COUNT 2
+#define DRIVER_1_LED_TOTAL 58
+#define DRIVER_2_LED_TOTAL 10
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+```
+
+!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
+
+Currently only 4 drivers are supported, but it would be trivial to support all 8 combinations.
+
+Define these arrays listing all the LEDs in your `.c`:
+
+```c
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, B_1, A_1, C_1},
+ ....
+}
+```
+
+Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now).
+
+---
+### IS31FL3737 :id=is31fl3737
+
+There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`:
+
+```makefile
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = IS31FL3737
+```
+
+Configure the hardware via your `config.h`:
+
+```c
+// This is a 7-bit address, that gets left-shifted and bit 0
+// set to 0 for write, 1 for read (as per I2C protocol)
+// The address will vary depending on your wiring:
+// 0000 <-> GND
+// 0101 <-> SCL
+// 1010 <-> SDA
+// 1111 <-> VCC
+// ADDR represents A3:A0 of the 7-bit address.
+// The result is: 0b101(ADDR)
+#define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
#define DRIVER_COUNT 2
@@ -105,7 +183,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
}
```
-Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
+Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
---
diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c
index dddf0cb734..d99e5339c9 100644
--- a/drivers/issi/is31fl3733.c
+++ b/drivers/issi/is31fl3733.c
@@ -68,7 +68,7 @@ uint8_t g_twi_transfer_buffer[20];
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
-uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}, {0}};
+uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c
index 370c5e6853..f3d4bc896e 100644
--- a/quantum/led_matrix_drivers.c
+++ b/quantum/led_matrix_drivers.c
@@ -46,16 +46,28 @@ static void init(void) {
# endif
# else
# ifdef LED_DRIVER_ADDR_1
- IS31FL3733_init(LED_DRIVER_ADDR_1, 0);
+# ifndef LED_DRIVER_SYNC_1
+# define LED_DRIVER_SYNC_1 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
# endif
# ifdef LED_DRIVER_ADDR_2
- IS31FL3733_init(LED_DRIVER_ADDR_2, 0);
+# ifndef LED_DRIVER_SYNC_2
+# define LED_DRIVER_SYNC_2 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2);
# endif
# ifdef LED_DRIVER_ADDR_3
- IS31FL3733_init(LED_DRIVER_ADDR_3, 0);
+# ifndef LED_DRIVER_SYNC_3
+# define LED_DRIVER_SYNC_3 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3);
# endif
# ifdef LED_DRIVER_ADDR_4
- IS31FL3733_init(LED_DRIVER_ADDR_4, 0);
+# ifndef LED_DRIVER_SYNC_4
+# define LED_DRIVER_SYNC_4 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4);
# endif
# endif
@@ -133,7 +145,7 @@ const led_matrix_driver_t led_matrix_driver = {
.set_value = IS31FL3731_set_value,
.set_value_all = IS31FL3731_set_value_all,
# else
- .set_value = IS31FL3733_set_value,
+ .set_value = IS31FL3733_set_value,
.set_value_all = IS31FL3733_set_value_all,
# endif
};
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
index 2978e7bed9..a4db86d196 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix_drivers.c
@@ -41,7 +41,28 @@ static void init(void) {
IS31FL3731_init(DRIVER_ADDR_4);
# endif
# elif defined(IS31FL3733)
- IS31FL3733_init(DRIVER_ADDR_1, 0);
+# ifndef DRIVER_SYNC_1
+# define DRIVER_SYNC_1 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
+# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2)
+# ifndef DRIVER_SYNC_2
+# define DRIVER_SYNC_2 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
+# endif
+# ifdef DRIVER_ADDR_3
+# ifndef DRIVER_SYNC_3
+# define DRIVER_SYNC_3 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
+# endif
+# ifdef DRIVER_ADDR_4
+# ifndef DRIVER_SYNC_4
+# define DRIVER_SYNC_4 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
+# endif
# elif defined(IS31FL3737)
IS31FL3737_init(DRIVER_ADDR_1);
# else
@@ -74,7 +95,15 @@ static void init(void) {
# endif
# elif defined(IS31FL3733)
IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
# elif defined(IS31FL3737)
IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2);
# else
@@ -105,13 +134,21 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
# elif defined(IS31FL3733)
static void flush(void) {
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
}
const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3733_set_color,
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3733_set_color,
.set_color_all = IS31FL3733_set_color_all,
};
# elif defined(IS31FL3737)
--
cgit v1.2.3
From a0fed0ea176d1c986e40fc4981b900509c90d66e Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Fri, 21 May 2021 23:17:32 -0700
Subject: Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>---
docs/feature_encoders.md | 9 +-
keyboards/0xcb/1337/keymaps/default/keymap.c | 3 +-
keyboards/0xcb/1337/keymaps/jakob/keymap.c | 3 +-
keyboards/0xcb/1337/keymaps/via/keymap.c | 3 +-
keyboards/10bleoledhub/keymaps/default/keymap.c | 13 +-
keyboards/10bleoledhub/keymaps/via/keymap.c | 15 +-
.../1upkeyboards/sweet16/keymaps/default/keymap.c | 3 +-
.../1upkeyboards/sweet16/v2/promicro/promicro.c | 4 +-
keyboards/2key2crawl/keymaps/default/keymap.c | 4 +-
keyboards/2key2crawl/keymaps/tabs/keymap.c | 4 +-
keyboards/2key2crawl/keymaps/vol/keymap.c | 3 +-
keyboards/45_ats/keymaps/default/keymap.c | 35 +-
keyboards/45_ats/keymaps/via/keymap.c | 35 +-
keyboards/7c8/framework/keymaps/default/keymap.c | 5 +-
keyboards/7c8/framework/keymaps/steven/keymap.c | 7 +-
keyboards/7c8/framework/keymaps/via/keymap.c | 3 +-
keyboards/abacus/keymaps/unicodemap/keymap.c | 13 +-
keyboards/absinthe/keymaps/default/keymap.c | 3 +-
.../abstract/ellipse/keymaps/abstractkb/keymap.c | 5 +-
.../abstract/ellipse/keymaps/default/keymap.c | 5 +-
.../aleblazer/zodiark/keymaps/default/keymap.c | 7 +-
.../aleblazer/zodiark/keymaps/slimoled/keymap.c | 7 +-
keyboards/aleblazer/zodiark/keymaps/via/encoder.c | 3 +-
keyboards/aleth42/keymaps/default/keymap.c | 3 +-
keyboards/aleth42/keymaps/via/keymap.c | 5 +-
.../aplyard/aplx6/rev2/keymaps/default/keymap.c | 65 +-
.../1x4p1/keymaps/default/keymap.c | 3 +-
.../arrayperipherals/1x4p1/keymaps/via/keymap.c | 3 +-
.../basekeys/trifecta/keymaps/default/keymap.c | 3 +-
keyboards/basekeys/trifecta/keymaps/via/keymap.c | 5 +-
keyboards/basketweave/keymaps/default/keymap.c | 3 +-
keyboards/boston/keymaps/default/keymap.c | 26 +-
keyboards/boston/keymaps/rgb-light-layers/keymap.c | 70 +--
keyboards/boston_meetup/2019/2019.c | 3 +-
keyboards/cannonkeys/ortho75/ortho75.c | 4 +-
.../cannonkeys/satisfaction75/satisfaction75.c | 6 +-
keyboards/cassette42/keymaps/default/keymap.c | 11 +-
keyboards/ck60i/ck60i.c | 6 +-
keyboards/ckeys/thedora/keymaps/default/keymap.c | 3 +-
keyboards/ckeys/thedora/readme.md | 3 +-
.../ckeys/washington/keymaps/default/keymap.c | 5 +-
keyboards/clueboard/2x1800/2019/2019.c | 11 +-
keyboards/clueboard/2x1800/2019/2019.h | 3 +-
keyboards/crbn/crbn.c | 4 +-
keyboards/custommk/genesis/genesis.c | 8 +-
.../delikeeb/vaguettelite/keymaps/default/keymap.c | 3 +-
.../keymaps/default_625u_universal/keymap.c | 3 +-
.../delikeeb/vaguettelite/keymaps/noclew/keymap.c | 3 +-
.../delikeeb/vaguettelite/keymaps/via/keymap.c | 3 +-
keyboards/delikeeb/vanana/keymaps/default/keymap.c | 3 +-
.../delikeeb/waaffle/keymaps/default/keymap.c | 3 +-
.../dmqdesign/spin/keymaps/codecoffeecode/keymap.c | 3 +-
keyboards/dmqdesign/spin/keymaps/default/keymap.c | 7 +-
.../dmqdesign/spin/keymaps/encoderlayers/keymap.c | 3 +-
.../dmqdesign/spin/keymaps/gorbachev/keymap.c | 3 +-
.../dmqdesign/spin/keymaps/spidey3_pad/keymap.c | 15 +-
keyboards/dmqdesign/spin/keymaps/via/keymap.c | 9 +-
.../doodboard/duckboard/keymaps/default/keymap.c | 5 +-
.../duckboard_r2/keymaps/default/keymap.c | 5 +-
.../doodboard/duckboard_r2/keymaps/via/keymap.c | 5 +-
keyboards/draculad/keymaps/default/keymap.c | 132 ++--
keyboards/draculad/keymaps/pimoroni/keymap.c | 3 +-
.../draytronics/daisy/keymaps/default/keymap.c | 3 +-
keyboards/dumbo/keymaps/default/keymap.c | 3 +-
keyboards/dumbo/keymaps/trip-trap/keymap.c | 3 +-
keyboards/dumbpad/v0x/keymaps/default/keymap.c | 3 +-
keyboards/dumbpad/v0x/templates/keymap.c | 3 +-
.../v0x_dualencoder/keymaps/default/keymap.c | 3 +-
.../dumbpad/v0x_dualencoder/templates/keymap.c | 3 +-
.../dumbpad/v0x_right/keymaps/default/keymap.c | 3 +-
keyboards/dumbpad/v0x_right/templates/keymap.c | 3 +-
keyboards/dumbpad/v1x/keymaps/default/keymap.c | 3 +-
keyboards/dumbpad/v1x/templates/keymap.c | 3 +-
.../v1x_dualencoder/keymaps/default/keymap.c | 3 +-
.../dumbpad/v1x_dualencoder/templates/keymap.c | 3 +-
.../dumbpad/v1x_right/keymaps/default/keymap.c | 3 +-
keyboards/dumbpad/v1x_right/templates/keymap.c | 3 +-
keyboards/ealdin/quadrant/quadrant.c | 5 +-
.../isometria_75/rev1/keymaps/default/keymap.c | 33 +-
.../isometria_75/rev1/keymaps/via/keymap.c | 43 +-
keyboards/eggman/keymaps/default/keymap.c | 8 +-
keyboards/evolv/evolv.c | 6 +-
keyboards/evyd13/ta65/keymaps/default/keymap.c | 3 +-
keyboards/ffkeebs/siris/keymaps/default/keymap.c | 25 +-
keyboards/ffkeebs/siris/keymaps/via/keymap.c | 25 +-
keyboards/flxlb/zplit/keymaps/via/keymap.c | 33 +-
keyboards/gmmk/pro/keymaps/default/keymap.c | 3 +-
keyboards/gmmk/pro/keymaps/via/keymap.c | 5 +-
keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c | 3 +-
keyboards/hadron/hadron.h | 9 +-
keyboards/hadron/ver3/ver3.c | 7 +-
keyboards/hadron/ver3/ver3.h | 2 +-
.../handwired/amigopunk/keymaps/default/keymap.c | 3 +-
.../handwired/bento/keymaps/cbc02009/keymap.c | 3 +-
keyboards/handwired/bento/keymaps/default/keymap.c | 3 +-
keyboards/handwired/bento/keymaps/mac/keymap.c | 5 +-
keyboards/handwired/d48/keymaps/anderson/keymap.c | 3 +-
keyboards/handwired/d48/keymaps/default/keymap.c | 3 +-
.../dactyl_manuform/5x6_5/keymaps/333fred/keymap.c | 3 +-
.../handwired/daishi/keymaps/default/keymap.c | 17 +-
.../frankie_macropad/keymaps/default/keymap.c | 3 +-
.../handwired/hnah108/keymaps/default/keymap.c | 3 +-
.../obuwunkunubi/spaget/keymaps/default/keymap.c | 5 +-
.../handwired/pill60/keymaps/default/keymap.c | 33 +-
.../handwired/prkl30/keymaps/default/keymap.c | 3 +-
keyboards/handwired/prkl30/keymaps/erkhal/keymap.c | 3 +-
.../pytest/has_template/keymaps/nocpp/keymap.c | 4 +-
.../swiftrax/joypad/keymaps/default/keymap.c | 3 +-
.../handwired/swiftrax/joypad/keymaps/via/keymap.c | 3 +-
.../swiftrax/pandamic/keymaps/default/keymap.c | 7 +-
.../swiftrax/pandamic/keymaps/via/keymap.c | 11 +-
.../handwired/swiftrax/walter/keymaps/via/keymap.c | 6 +-
.../helix/rev3_4rows/keymaps/default/keymap.c | 3 +-
keyboards/helix/rev3_4rows/keymaps/via/keymap.c | 3 +-
.../helix/rev3_5rows/keymaps/default/keymap.c | 3 +-
keyboards/helix/rev3_5rows/keymaps/via/keymap.c | 3 +-
keyboards/hub16/keymaps/ahk_companion/keymap.c | 3 +-
keyboards/hub16/keymaps/default/keymap.c | 3 +-
keyboards/hub16/keymaps/macro/keymap.c | 3 +-
keyboards/hub16/keymaps/peepeetee/keymap.c | 3 +-
keyboards/hub16/keymaps/via/keymap.c | 3 +-
keyboards/hub20/keymaps/default/keymap.c | 3 +-
keyboards/hub20/keymaps/macro/keymap.c | 3 +-
keyboards/hub20/keymaps/via/keymap.c | 3 +-
keyboards/jagdpietr/drakon/drakon.c | 117 ++--
keyboards/jones/v03/keymaps/default_jp/keymap.c | 3 +-
.../jones/v03_1/keymaps/default_ansi/keymap.c | 3 +-
keyboards/jones/v03_1/keymaps/default_jp/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 5 +-
.../keebio/bdn9/keymaps/brandonschlack/keymap.c | 3 +-
.../keebio/bdn9/keymaps/codecoffeecode/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/default/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/eosti/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/mousepad/keymap.c | 15 +-
keyboards/keebio/bdn9/keymaps/rishka/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/test/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/via/keymap.c | 3 +-
.../keebio/bdn9/keymaps/vosechu-browser/keymap.c | 3 +-
keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c | 3 +-
keyboards/keebio/dsp40/keymaps/default/keymap.c | 3 +-
keyboards/keebio/dsp40/keymaps/via/keymap.c | 3 +-
keyboards/keebio/foldkb/keymaps/default/keymap.c | 3 +-
keyboards/keebio/foldkb/keymaps/via/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/dcompact/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/ddone/keymap.c | 5 +-
keyboards/keebio/iris/keymaps/default/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/jhelvy/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/khitsule/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/pvinis/keymap.c | 3 +-
keyboards/keebio/iris/keymaps/via/keymap.c | 3 +-
keyboards/keebio/kbo5000/keymaps/default/keymap.c | 3 +-
keyboards/keebio/kbo5000/keymaps/iso/keymap.c | 3 +-
keyboards/keebio/kbo5000/keymaps/via/keymap.c | 3 +-
.../keebio/quefrency/keymaps/bfiedler/keymap.c | 3 +-
.../keebio/quefrency/keymaps/default65/keymap.c | 3 +-
.../quefrency/keymaps/default65macro/keymap.c | 3 +-
.../keebio/quefrency/keymaps/draevin/keymap.c | 3 +-
.../keebio/quefrency/keymaps/jonavin/keymap.c | 3 +-
keyboards/keebio/quefrency/keymaps/via/keymap.c | 3 +-
keyboards/keebio/sinc/keymaps/default/keymap.c | 3 +-
keyboards/keebio/sinc/keymaps/iso/keymap.c | 3 +-
.../keebio/sinc/keymaps/sethBarberee/keymap.c | 3 +-
keyboards/keebio/sinc/keymaps/via/keymap.c | 3 +-
keyboards/keebio/stick/keymaps/default/keymap.c | 3 +-
keyboards/keebio/stick/keymaps/via/keymap.c | 3 +-
keyboards/keybage/radpad/keymaps/default/keymap.c | 3 +-
.../keycapsss/kimiko/keymaps/default/keymap.c | 3 +-
.../keycapsss/plaid_pad/keymaps/default/keymap.c | 3 +-
.../keycapsss/plaid_pad/keymaps/oled/keymap.c | 3 +-
keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c | 3 +-
.../keysofkings/twokey/keymaps/default/keymap.c | 56 +-
keyboards/kikoslab/kl90/keymaps/default/keymap.c | 57 +-
keyboards/kikoslab/kl90/keymaps/via/keymap.c | 57 +-
.../kingly_keys/ave/ortho/keymaps/default/keymap.c | 3 +-
.../ave/staggered/keymaps/default/keymap.c | 3 +-
.../kingly_keys/ropro/keymaps/default/keymap.c | 7 +-
.../kingly_keys/ropro/keymaps/jdayton3/keymap.c | 3 +-
.../kingly_keys/soap/keymaps/default/keymap.c | 7 +-
keyboards/kiwikeebs/macro/macro.c | 6 +-
keyboards/knobgoblin/knobgoblin.c | 55 +-
keyboards/kyria/keymaps/asapjockey/keymap.c | 5 +-
keyboards/kyria/keymaps/benji/keymap.c | 3 +-
keyboards/kyria/keymaps/default/keymap.c | 3 +-
keyboards/kyria/keymaps/drashna/keymap.c | 3 +-
keyboards/kyria/keymaps/ghidalgo93/keymap.c | 9 +-
keyboards/kyria/keymaps/gotham/keymap.c | 3 +-
keyboards/kyria/keymaps/j-inc/keymap.c | 4 +-
keyboards/kyria/keymaps/jhelvy/keymap.c | 3 +-
keyboards/kyria/keymaps/mattir/keymap.c | 3 +-
keyboards/kyria/keymaps/pierrec83/encoders.c | 3 +-
keyboards/kyria/keymaps/plattfot/keymap.c | 3 +-
keyboards/kyria/keymaps/rmw/keymap.c | 107 ++--
keyboards/kyria/keymaps/shinze/keymap.c | 3 +-
keyboards/kyria/keymaps/thomasbaart/keymap.c | 7 +-
keyboards/kyria/keymaps/winternebs/keymap.c | 691 +++++++++++----------
keyboards/latinpad/keymaps/default/keymap.c | 7 +-
keyboards/latinpad/keymaps/via/keymap.c | 7 +-
keyboards/latinpadble/keymaps/default/keymap.c | 39 +-
keyboards/latinpadble/keymaps/via/keymap.c | 41 +-
keyboards/lck75/lck75.c | 4 +-
keyboards/le_chiffre/keymaps/default/keymap.c | 3 +-
keyboards/le_chiffre/keymaps/via/keymap.c | 3 +-
.../bigknob/keymaps/default/keymap.c | 39 +-
keyboards/lily58/keymaps/chuan/keymap.c | 3 +-
keyboards/lily58/keymaps/drasbeck/keymap.c | 5 +-
keyboards/lily58/keymaps/lily58l/keymap.c | 3 +-
.../linworks/whale75/keymaps/default/keymap.c | 13 +-
keyboards/linworks/whale75/keymaps/via/keymap.c | 29 +-
.../tenkey_plusplus/keymaps/default/keymap.c | 3 +-
.../tenkey_plusplus/keymaps/macro/keymap.c | 3 +-
keyboards/m3n3van/keymaps/matthewdias/keymap.c | 3 +-
keyboards/m3n3van/keymaps/via/keymap.c | 3 +-
.../marksard/leftover30/keymaps/default/keymap.c | 4 +-
keyboards/maxr1998/pulse4k/pulse4k.c | 4 +-
.../adelais/keymaps/brandonschlack/keymap.c | 3 +-
.../mechlovin/adelais/keymaps/default/keymap.c | 5 +-
keyboards/mechlovin/adelais/keymaps/via/keymap.c | 5 +-
keyboards/mechlovin/hex6c/keymaps/default/keymap.c | 3 +-
keyboards/mechlovin/hex6c/keymaps/via/keymap.c | 3 +-
.../mechwild/mercutio/keymaps/bongocat/keymap.c | 51 +-
.../mechwild/mercutio/keymaps/default/keymap.c | 53 +-
keyboards/mechwild/mercutio/keymaps/fancy/keymap.c | 51 +-
keyboards/mechwild/mercutio/keymaps/via/keymap.c | 53 +-
keyboards/merge/iso_macro/keymaps/default/keymap.c | 35 +-
keyboards/merge/iso_macro/keymaps/via/keymap.c | 35 +-
keyboards/merge/uc1/keymaps/default/keymap.c | 35 +-
keyboards/merge/uc1/keymaps/via/keymap.c | 35 +-
keyboards/merge/um70/keymaps/default/keymap.c | 47 +-
keyboards/merge/um70/keymaps/via/keymap.c | 45 +-
keyboards/metamechs/timberwolf/timberwolf.c | 5 +-
.../mexsistor/ludmila/keymaps/default/keymap.c | 3 +-
keyboards/millipad/keymaps/default/keymap.c | 7 +-
keyboards/minimacro5/keymaps/default/keymap.c | 3 +-
keyboards/minimacro5/keymaps/kabraxcis/keymap.c | 3 +-
keyboards/minimacro5/keymaps/media/keymap.c | 3 +-
keyboards/minimacro5/keymaps/voaraq/keymap.c | 3 +-
.../misonoworks/karina/keymaps/default/keymap.c | 20 +-
.../misonoworks/karina/keymaps/voltex/keymap.c | 20 +-
keyboards/mixi/keymaps/default/keymap.c | 11 +-
keyboards/mixi/keymaps/via/keymap.c | 11 +-
keyboards/monarch/keymaps/default/keymap.c | 3 +-
keyboards/monarch/keymaps/iso/keymap.c | 3 +-
keyboards/monarch/keymaps/via/keymap.c | 3 +-
.../rebound/rev3/keymaps/default/keymap.c | 3 +-
.../rebound/rev3/keymaps/rossman360/keymap.c | 4 +-
.../rebound/rev4/keymaps/default/keymap.c | 3 +-
.../rebound/rev4/keymaps/rossman360/keymap.c | 3 +-
.../montsinger/rebound/rev4/keymaps/via/keymap.c | 3 +-
keyboards/murcielago/rev1/keymaps/default/keymap.c | 15 +-
keyboards/murcielago/rev1/keymaps/via/keymap.c | 15 +-
keyboards/ncc1701kb/keymaps/brushsize/keymap.c | 11 +-
keyboards/ncc1701kb/keymaps/default/keymap.c | 11 +-
keyboards/neopad/rev1/keymaps/default/keymap.c | 3 +-
.../hailey/keymaps/default/keymap.c | 3 +-
.../hailey/keymaps/via/keymap.c | 3 +-
keyboards/nightly_boards/adellein/adellein.c | 7 +-
keyboards/nightly_boards/n40_o/n40_o.c | 7 +-
keyboards/nightly_boards/n60_s/n60_s.c | 5 +-
keyboards/nightly_boards/octopad/octopad.c | 7 +-
keyboards/np12/keymaps/default/keymap.c | 55 +-
keyboards/np12/keymaps/via/keymap.c | 55 +-
.../nullbitsco/nibble/keymaps/default/keymap.c | 3 +-
keyboards/nullbitsco/nibble/keymaps/iso/keymap.c | 3 +-
keyboards/nullbitsco/nibble/keymaps/oled/keymap.c | 3 +-
.../nibble/keymaps/oled_bongocat/keymap.c | 3 +-
keyboards/nullbitsco/nibble/keymaps/via/keymap.c | 3 +-
.../nullbitsco/scramble/keymaps/default/keymap.c | 3 +-
.../nullbitsco/scramble/keymaps/oled/keymap.c | 3 +-
keyboards/nullbitsco/scramble/keymaps/via/keymap.c | 7 +-
keyboards/pabile/p18/keymaps/default/keymap.c | 9 +-
keyboards/pabile/p20/ver1/keymaps/default/keymap.c | 29 +-
keyboards/palette1202/keymaps/default/keymap.c | 7 +-
keyboards/palette1202/keymaps/key-check/keymap.c | 3 +-
keyboards/pandora/keymaps/default/keymap.c | 5 +-
keyboards/pandora/keymaps/via/keymap.c | 5 +-
keyboards/pistachio_mp/keymaps/default/keymap.c | 3 +-
keyboards/planck/keymaps/abishalom/keymap.c | 3 +-
keyboards/planck/keymaps/atreus/keymap.c | 3 +-
keyboards/planck/keymaps/charlesrocket/keymap.c | 3 +-
.../planck/keymaps/dear_vehicle_owner/keymap.c | 3 +-
keyboards/planck/keymaps/default/keymap.c | 3 +-
keyboards/planck/keymaps/eshesh2/keymap.c | 3 +-
keyboards/planck/keymaps/fabian/keymap.c | 3 +-
keyboards/planck/keymaps/gitdrik/keymap.c | 3 +-
keyboards/planck/keymaps/grant24/keymap.c | 3 +-
keyboards/planck/keymaps/hvp/keymap.c | 9 +-
keyboards/planck/keymaps/jetpacktuxedo/keymap.c | 3 +-
keyboards/planck/keymaps/mgalisa/keymap.c | 3 +-
keyboards/planck/keymaps/mikethetiger/keymap.c | 3 +-
keyboards/planck/keymaps/msiu/keymap.c | 3 +-
keyboards/planck/keymaps/muzfuz/keymap.c | 3 +-
keyboards/planck/keymaps/navi/keymap.c | 7 +-
keyboards/planck/keymaps/nick/keymap.c | 3 +-
keyboards/planck/keymaps/oryx/keymap.c | 3 +-
keyboards/planck/keymaps/pascamel/keymap.c | 3 +-
keyboards/planck/keymaps/pevecyan/keymap.c | 5 +-
keyboards/planck/keymaps/ptillemans/keymap.c | 3 +-
keyboards/planck/keymaps/raffle/keymap.c | 9 +-
keyboards/planck/keymaps/rjhilgefort/keymap.c | 3 +-
keyboards/planck/keymaps/sigul/keymap.c | 19 +-
keyboards/planck/keymaps/skug/keymap.c | 3 +-
keyboards/planck/keymaps/smittey/keymap.c | 35 +-
keyboards/planck/keymaps/synth_sample/keymap.c | 3 +-
keyboards/planck/keymaps/synth_wavetable/keymap.c | 3 +-
keyboards/planck/keymaps/tk/keymap.c | 63 +-
keyboards/planck/keymaps/tom/keymap.c | 3 +-
keyboards/planck/keymaps/tylerwince/keymap.c | 9 +-
keyboards/planck/keymaps/unagi/keymap.c | 3 +-
.../pohjolaworks/louhi/keymaps/default/keymap.c | 3 +-
keyboards/preonic/keymaps/AlexDaigre/keymap.c | 3 +-
keyboards/preonic/keymaps/cranium/keymap.c | 3 +-
keyboards/preonic/keymaps/default/keymap.c | 3 +-
keyboards/preonic/keymaps/drasbeck/keymap.c | 9 +-
keyboards/preonic/keymaps/elisiano/keymap.c | 3 +-
keyboards/preonic/keymaps/fsck/keymap.c | 3 +-
keyboards/preonic/keymaps/keelhauler/keymap.c | 3 +-
keyboards/preonic/keymaps/kjwon15/keymap.c | 3 +-
keyboards/preonic/keymaps/laurentlaurent/keymap.c | 3 +-
keyboards/preonic/keymaps/mguterl/keymap.c | 3 +-
keyboards/preonic/keymaps/mikethetiger/keymap.c | 17 +-
keyboards/preonic/keymaps/muzfuz/keymap.c | 3 +-
keyboards/preonic/keymaps/mverteuil/keymap.c | 3 +-
keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c | 3 +-
keyboards/preonic/keymaps/pezhore/keymap.c | 3 +-
keyboards/preonic/keymaps/senseored/keymap.c | 21 +-
keyboards/preonic/keymaps/via/keymap.c | 3 +-
keyboards/preonic/keymaps/xulkal/keymap.c | 3 +-
.../program_yoink/ortho/keymaps/default/keymap.c | 12 +-
.../ortho/keymaps/ortho_split/keymap.c | 12 +-
keyboards/program_yoink/program_yoink.c | 5 +-
.../staggered/keymaps/default/keymap.c | 8 +-
.../staggered/keymaps/split_bar/keymap.c | 12 +-
keyboards/punk75/keymaps/default/keymap.c | 3 +-
keyboards/punk75/keymaps/dsanchezseco/keymap.c | 3 +-
keyboards/punk75/keymaps/via/keymap.c | 3 +-
keyboards/qvex/lynepad/keymaps/default/keymap.c | 3 +-
keyboards/rainkeeb/keymaps/default/keymap.c | 3 +-
keyboards/rainkeeb/keymaps/via/keymap.c | 3 +-
.../ramonimbao/chevron/keymaps/default/keymap.c | 3 +-
keyboards/ramonimbao/chevron/keymaps/iso/keymap.c | 3 +-
keyboards/ramonimbao/chevron/keymaps/via/keymap.c | 3 +-
.../herringbone/pro/keymaps/default/keymap.c | 3 +-
.../herringbone/pro/keymaps/iso/keymap.c | 3 +-
.../herringbone/pro/keymaps/via/keymap.c | 3 +-
keyboards/rart/rart4x4/keymaps/default/keymap.c | 11 +-
keyboards/rart/rart4x4/keymaps/via/keymap.c | 15 +-
keyboards/rart/rart75/keymaps/ansi/keymap.c | 3 +-
keyboards/rart/rart75/keymaps/default/keymap.c | 3 +-
keyboards/rart/rart75/keymaps/via/keymap.c | 3 +-
keyboards/rart/rartpad/keymaps/default/keymap.c | 16 +-
keyboards/rart/rartpad/keymaps/numpad/keymap.c | 15 +-
keyboards/rart/rartpad/keymaps/via/keymap.c | 19 +-
keyboards/rgbkb/pan/keymaps/default/keymap.c | 31 +-
keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c | 3 +-
keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c | 3 +-
keyboards/rgbkb/sol/keymaps/default/keymap.c | 5 +-
keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c | 3 +-
keyboards/rgbkb/sol/keymaps/xyverz/keymap.c | 7 +-
keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c | 3 +-
keyboards/rgbkb/zygomorph/keymaps/default/keymap.c | 3 +-
.../rgbkb/zygomorph/keymaps/default_oled/keymap.c | 3 +-
.../rgbkb/zygomorph/keymaps/kageurufu/keymap.c | 3 +-
keyboards/rocketboard_16/keymaps/default/keymap.c | 3 +-
keyboards/rocketboard_16/keymaps/via/keymap.c | 3 +-
keyboards/rotr/rotr.c | 4 +-
keyboards/sck/gtm/keymaps/default/keymap.c | 4 +-
keyboards/sck/gtm/keymaps/tabs/keymap.c | 4 +-
keyboards/sck/gtm/keymaps/vol/keymap.c | 3 +-
keyboards/sendyyeah/pix/keymaps/default/keymap.c | 3 +-
keyboards/sendyyeah/pix/keymaps/via/keymap.c | 3 +-
.../majbritt/rev2/keymaps/default/keymap.c | 4 +-
.../sneakbox/aliceclone/keymaps/default/keymap.c | 19 +-
keyboards/sneakbox/aliceclone/keymaps/via/keymap.c | 35 +-
.../disarray/ortho/keymaps/default/keymap.c | 7 +-
.../sneakbox/disarray/ortho/keymaps/via/keymap.c | 13 +-
.../disarray/staggered/keymaps/default/keymap.c | 13 +-
.../disarray/staggered/keymaps/via/keymap.c | 33 +-
keyboards/sofle/keymaps/default/keymap.c | 3 +-
keyboards/sofle/keymaps/via/encoder.c | 31 +-
keyboards/space_space/keymaps/big_space/keymap.c | 11 +-
keyboards/space_space/keymaps/default/keymap.c | 13 +-
keyboards/splitkb/zima/keymaps/drashna/keymap.c | 12 +-
keyboards/splitkb/zima/zima.c | 14 +-
.../swiftrax/retropad/keymaps/default/keymap.c | 7 +-
keyboards/swiftrax/retropad/keymaps/via/keymap.c | 7 +-
keyboards/taleguers/taleguers75/taleguers75.c | 4 +-
keyboards/tau4/keymaps/default/keymap.c | 3 +-
keyboards/terrazzo/keymaps/default/keymap.c | 21 +-
keyboards/terrazzo/keymaps/ortho/keymap.c | 19 +-
keyboards/terrazzo/keymaps/ortho_all/keymap.c | 21 +-
keyboards/terrazzo/keymaps/ortho_mit/keymap.c | 19 +-
keyboards/terrazzo/readme.md | 8 +-
keyboards/tetris/keymaps/default/keymap.c | 3 +-
.../ncc1701kb/v2/keymaps/default/keymap.c | 23 +-
.../noodlepad/keymaps/default/keymap.c | 23 +-
keyboards/tkw/grandiceps/keymaps/default/keymap.c | 3 +-
keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c | 3 +-
keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c | 3 +-
keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c | 21 +-
keyboards/torn/torn_encoder.c | 7 +-
keyboards/tunks/ergo33/keymaps/default/keymap.c | 3 +-
keyboards/tunks/ergo33/keymaps/prpro/keymap.c | 3 +-
.../ungodly/launch_pad/keymaps/default/keymap.c | 3 +-
keyboards/ungodly/nines/nines.c | 4 +-
keyboards/vn66/keymaps/default/keymap.c | 3 +-
.../walletburner/cajal/keymaps/default/keymap.c | 4 +-
.../cajal/keymaps/default_ortho/keymap.c | 3 +-
keyboards/yeehaw/keymaps/default/keymap.c | 3 +-
keyboards/yeehaw/keymaps/via/keymap.c | 3 +-
.../yushakobo/quick7/keymaps/default/keymap.c | 3 +-
keyboards/yushakobo/quick7/keymaps/tester/keymap.c | 5 +-
keyboards/yushakobo/quick7/keymaps/via/keymap.c | 3 +-
keyboards/ztboards/after/keymaps/default/keymap.c | 3 +-
keyboards/ztboards/after/keymaps/ellicose/keymap.c | 5 +-
keyboards/ztboards/after/keymaps/phlop/keymap.c | 5 +-
layouts/community/ortho_4x12/bocaj/keymap.c | 3 +-
.../community/ortho_4x12/brandonschlack/keymap.c | 3 +-
layouts/community/ortho_4x12/buswerks/keymap.c | 5 +-
layouts/community/ortho_4x12/drashna/keymap.c | 3 +-
layouts/community/ortho_4x12/jackhumbert/keymap.c | 3 +-
layouts/community/ortho_4x12/juno/keymap.c | 35 +-
layouts/community/ortho_4x12/junonum/keymap.c | 3 +-
layouts/community/ortho_4x12/mguterl/keymap.c | 3 +-
layouts/community/ortho_4x12/mindsound/keymap.c | 3 +-
.../community/ortho_5x12/brandonschlack/keymap.c | 3 +-
quantum/encoder.c | 10 +-
quantum/encoder.h | 4 +-
quantum/quantum.h | 4 +
users/greatwizard/greatwizard.c | 3 +-
users/kuchosauronad0/encoder.c | 3 +-
users/kuchosauronad0/encoder.h | 2 +-
users/ninjonas/encoder.c | 7 +-
users/stanrc85/stanrc85.c | 7 +-
users/xulkal/custom_encoder.c | 3 +-
437 files changed, 2539 insertions(+), 2132 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index 4338c85e84..a56f093a39 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -53,15 +53,15 @@ If you are using different pinouts for the encoders on each half of a split keyb
The callback functions can be inserted into your `.c`:
```c
-void encoder_update_kb(uint8_t index, bool clockwise) {
- encoder_update_user(index, clockwise);
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ return encoder_update_user(index, clockwise);
}
```
or `keymap.c`:
```c
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -75,9 +75,12 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
```
+!> If you return `true`, this will allow the keyboard level code to run, as well. Returning `false` will override the keyboard level code. Depending on how the keyboard level function is set up.
+
## Hardware
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c
index 5089117d8d..596ffabcc7 100644
--- a/keyboards/0xcb/1337/keymaps/default/keymap.c
+++ b/keyboards/0xcb/1337/keymaps/default/keymap.c
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE
if (clockwise) {
@@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/0xcb/1337/keymaps/jakob/keymap.c b/keyboards/0xcb/1337/keymaps/jakob/keymap.c
index dc5ba60251..14427ee6d8 100644
--- a/keyboards/0xcb/1337/keymaps/jakob/keymap.c
+++ b/keyboards/0xcb/1337/keymaps/jakob/keymap.c
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE
if (clockwise) {
@@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(C(A(KC_DOWN)));
}
}
+ return true;
}
#endif
diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c
index 5089117d8d..596ffabcc7 100644
--- a/keyboards/0xcb/1337/keymaps/via/keymap.c
+++ b/keyboards/0xcb/1337/keymaps/via/keymap.c
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* rotary encoder (SW3) - add more else if blocks for more granular layer control */
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RGB)) {
#ifdef RGBLIGHT_ENABLE
if (clockwise) {
@@ -72,6 +72,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c
index ee26168196..fec5f8f379 100644
--- a/keyboards/10bleoledhub/keymaps/default/keymap.c
+++ b/keyboards/10bleoledhub/keymaps/default/keymap.c
@@ -13,7 +13,7 @@ along with this program. If not, see .*/
/* Keymap _0: (Base Layer) Default Layer
* .-----.
- * |PGUP |
+ * |PGUP |
* |-----------------.
* | 7 | 8 | 9 |
* |-----|-----|-----|
@@ -37,12 +37,12 @@ along with this program. If not, see .*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT(
+ [0] = LAYOUT(
KC_PGUP,
- KC_KP_7, KC_KP_8, MO(1),
+ KC_KP_7, KC_KP_8, MO(1),
KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3),
- [1] = LAYOUT(
+ [1] = LAYOUT(
KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K,
RGB_SAI, RGB_SAD, RGB_HUI,
@@ -58,14 +58,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c
index d7e986acfc..6f78ac8af0 100644
--- a/keyboards/10bleoledhub/keymaps/via/keymap.c
+++ b/keyboards/10bleoledhub/keymaps/via/keymap.c
@@ -9,11 +9,11 @@ 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 .*/
+along with this program. If not, see .*/
/* Keymap _0: (Base Layer) Default Layer
* .-----.
- * |PGUP |
+ * |PGUP |
* |-----------------.
* | 7 | 8 | 9 |
* |-----|-----|-----|
@@ -37,12 +37,12 @@ along with this program. If not, see .*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT(
+ [0] = LAYOUT(
KC_PGUP,
- KC_KP_7, KC_KP_8, MO(1),
+ KC_KP_7, KC_KP_8, MO(1),
KC_P4, KC_P5, KC_P6,
KC_P1, KC_P2, KC_P3),
- [1] = LAYOUT(
+ [1] = LAYOUT(
KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K,
RGB_SAI, RGB_SAD, RGB_HUI,
@@ -58,14 +58,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
index 4778d2108c..9ab912d7b5 100644
--- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
@@ -27,7 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
#include "encoder.h"
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -35,5 +35,6 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c
index 0176dc1a3c..d850a3b5c6 100644
--- a/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c
+++ b/keyboards/1upkeyboards/sweet16/v2/promicro/promicro.c
@@ -2,7 +2,7 @@
#include "encoder.h"
#ifdef ENCODER_ENABLED
-void encoder_update_kb(int8_t index, bool clockwise) {
- encoder_update_user(index, clockwise);
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ return encoder_update_user(index, clockwise);
}
#endif
diff --git a/keyboards/2key2crawl/keymaps/default/keymap.c b/keyboards/2key2crawl/keymaps/default/keymap.c
index 71222d40f8..3e36b60707 100644
--- a/keyboards/2key2crawl/keymaps/default/keymap.c
+++ b/keyboards/2key2crawl/keymaps/default/keymap.c
@@ -16,7 +16,7 @@ void matrix_init_user(void) {
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGUP);
@@ -24,5 +24,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_PGDN);
}
}
+ return true;
}
-
diff --git a/keyboards/2key2crawl/keymaps/tabs/keymap.c b/keyboards/2key2crawl/keymaps/tabs/keymap.c
index fcf4a2af87..9066c3f2e6 100644
--- a/keyboards/2key2crawl/keymaps/tabs/keymap.c
+++ b/keyboards/2key2crawl/keymaps/tabs/keymap.c
@@ -14,7 +14,7 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code16(C(KC_T));
@@ -22,5 +22,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code16(C(KC_W));
}
}
+ return true;
}
-
diff --git a/keyboards/2key2crawl/keymaps/vol/keymap.c b/keyboards/2key2crawl/keymaps/vol/keymap.c
index 8ffd3f58c8..a45d3f7789 100644
--- a/keyboards/2key2crawl/keymaps/vol/keymap.c
+++ b/keyboards/2key2crawl/keymaps/vol/keymap.c
@@ -14,7 +14,7 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -22,4 +22,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/45_ats/keymaps/default/keymap.c b/keyboards/45_ats/keymaps/default/keymap.c
index 28941b173f..de69c4b05e 100644
--- a/keyboards/45_ats/keymaps/default/keymap.c
+++ b/keyboards/45_ats/keymaps/default/keymap.c
@@ -1,20 +1,20 @@
- /*
+ /*
Copyright 2020 Alec Penland
Copyright 2020 Garret Gartner
-
- 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 .
- */
+
+ 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 .
+ */
#include QMK_KEYBOARD_H
@@ -31,7 +31,7 @@ enum ats_layers{
#define RS_SLS RSFT_T(KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Default QWERTY layer
+ /* Default QWERTY layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┠┌───â”
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
@@ -96,7 +96,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -104,4 +104,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/45_ats/keymaps/via/keymap.c b/keyboards/45_ats/keymaps/via/keymap.c
index 28941b173f..de69c4b05e 100644
--- a/keyboards/45_ats/keymaps/via/keymap.c
+++ b/keyboards/45_ats/keymaps/via/keymap.c
@@ -1,20 +1,20 @@
- /*
+ /*
Copyright 2020 Alec Penland
Copyright 2020 Garret Gartner
-
- 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 .
- */
+
+ 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 .
+ */
#include QMK_KEYBOARD_H
@@ -31,7 +31,7 @@ enum ats_layers{
#define RS_SLS RSFT_T(KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Default QWERTY layer
+ /* Default QWERTY layer
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┠┌───â”
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
@@ -96,7 +96,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -104,4 +104,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/7c8/framework/keymaps/default/keymap.c b/keyboards/7c8/framework/keymaps/default/keymap.c
index 57dbbfee05..592cd02195 100644
--- a/keyboards/7c8/framework/keymaps/default/keymap.c
+++ b/keyboards/7c8/framework/keymaps/default/keymap.c
@@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case _BASE:
@@ -93,7 +93,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
case _RAISE:
- if (clockwise) {
+ if (clockwise) {
tap_code16(LCTL(KC_RGHT));
} else {
tap_code16(LCTL(KC_LEFT));
@@ -120,6 +120,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/7c8/framework/keymaps/steven/keymap.c b/keyboards/7c8/framework/keymaps/steven/keymap.c
index be279f107c..77134db5bc 100644
--- a/keyboards/7c8/framework/keymaps/steven/keymap.c
+++ b/keyboards/7c8/framework/keymaps/steven/keymap.c
@@ -115,9 +115,9 @@ void matrix_scan_user(void) {
tap_code16(G(KC_D));
}
}
-}
+}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state);
if (index == 0) {
if (clockwise) {
@@ -126,4 +126,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(dynamic_keymap_get_keycode(layer, 10, 0));
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/7c8/framework/keymaps/via/keymap.c b/keyboards/7c8/framework/keymaps/via/keymap.c
index a2a353d85f..2fc572b4df 100644
--- a/keyboards/7c8/framework/keymaps/via/keymap.c
+++ b/keyboards/7c8/framework/keymaps/via/keymap.c
@@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state);
if (index == 0) {
if (clockwise) {
@@ -87,4 +87,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(dynamic_keymap_get_keycode(layer, 10, 0));
}
}
+ return true;
}
diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c
index c1d5bd8827..8a2a33889b 100644
--- a/keyboards/abacus/keymaps/unicodemap/keymap.c
+++ b/keyboards/abacus/keymaps/unicodemap/keymap.c
@@ -75,12 +75,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_LOWER] = LAYOUT(
NICKURL, 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_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG,
+ _______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG,
_______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI,
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______
)
-
-
+
+
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -93,7 +93,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
break;
-
+
case ALTTAB:
if (record->event.pressed) {
tap_code16(A(KC_TAB));
@@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
-void dip_switch_update_user(uint8_t index, bool active) {
+void dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
case 0:
if(active) {
@@ -132,7 +132,7 @@ void matrix_init_user(void) {
set_unicode_input_mode(UC_WINC);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)) {
case _BASE:
@@ -145,4 +145,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK);
break;
}
+ return true;
}
diff --git a/keyboards/absinthe/keymaps/default/keymap.c b/keyboards/absinthe/keymaps/default/keymap.c
index d6c4549c47..e5c74366c0 100644
--- a/keyboards/absinthe/keymaps/default/keymap.c
+++ b/keyboards/absinthe/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -39,4 +39,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c
index 8d649419d1..224de55b37 100644
--- a/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c
+++ b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}*/
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
backlight_decrease();
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/abstract/ellipse/keymaps/default/keymap.c b/keyboards/abstract/ellipse/keymaps/default/keymap.c
index ac1ec986b0..4fe1cf7cb2 100644
--- a/keyboards/abstract/ellipse/keymaps/default/keymap.c
+++ b/keyboards/abstract/ellipse/keymaps/default/keymap.c
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}*/
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_O);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_R);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c
index 0692aee124..c09b483d94 100644
--- a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c
+++ b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
-
+
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______,
_______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______
),
-
+
[_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@@ -308,7 +308,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -322,6 +322,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse();
}
}
+ return true;
}
#endif
diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c
index 4e98b5cf0d..4f97953fd1 100644
--- a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c
+++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_MUTE, RGB_TOG, KC_DEL,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
KC_LCTL, KC_LALT, KC_LGUI, LALT(KC_TAB), KC_LOWER, KC_SPC, KC_ENT, KC_ENT, KC_SPC, KC_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
-
+
[_LOWER] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______,
_______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______
),
-
+
[_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_NLCK, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_F12,
@@ -311,7 +311,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -325,6 +325,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse();
}
}
+ return true;
}
#endif
diff --git a/keyboards/aleblazer/zodiark/keymaps/via/encoder.c b/keyboards/aleblazer/zodiark/keymaps/via/encoder.c
index 06d7a25777..c08cfed5c1 100644
--- a/keyboards/aleblazer/zodiark/keymaps/via/encoder.c
+++ b/keyboards/aleblazer/zodiark/keymaps/via/encoder.c
@@ -16,7 +16,7 @@ along with this program. If not, see .
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -30,6 +30,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/aleth42/keymaps/default/keymap.c b/keyboards/aleth42/keymaps/default/keymap.c
index 48214d1e22..707af7116a 100644
--- a/keyboards/aleth42/keymaps/default/keymap.c
+++ b/keyboards/aleth42/keymaps/default/keymap.c
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left encoder */
switch (get_highest_layer(layer_state)) {
case _QWERTY:
@@ -146,4 +146,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/aleth42/keymaps/via/keymap.c b/keyboards/aleth42/keymaps/via/keymap.c
index e747b0d64f..2801e65ec4 100644
--- a/keyboards/aleth42/keymaps/via/keymap.c
+++ b/keyboards/aleth42/keymaps/via/keymap.c
@@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left encoder */
switch (get_highest_layer(layer_state)) {
case _QWERTY:
@@ -146,4 +146,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c
index c773fb988c..91a76a828c 100644
--- a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c
+++ b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c
@@ -1,17 +1,17 @@
- /* Copyright 2020 Aplyard
- *
- * 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 .
+ /* Copyright 2020 Aplyard
+ *
+ * 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 .
*/
#include QMK_KEYBOARD_H
@@ -22,15 +22,15 @@ enum layer_names {
};
#define KC_COPY LCTL(KC_C) //Mac, change it to LGUI(KC_C)
-#define KC_CUT LCTL(KC_X) // >> >> LGUI(KC_X)
+#define KC_CUT LCTL(KC_X) // >> >> LGUI(KC_X)
#define KC_PASTE LCTL(KC_V) // >> >> LGUI(KC_V)
//#define KC_MY_COMPUTER LGUI(KC_SPC) //Uncomment this for Mac Spotlight Search
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Keymap __MEDIA: Default Layer
+ /* Keymap __MEDIA: Default Layer
* ,----------------------------------.
* | .-------. / / / / / / |
- * | | | |------|------|------| |
+ * | | | |------|------|------| |
* | | Pro | | Mute | Play |Vol+/-| |
* | | Micro | |------|------|------| |
* | | | |----------------------|
@@ -43,10 +43,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MUTE, KC_MPLY, TO(1),
KC_MPRV, KC_MSTP, KC_MNXT
),
- /* Keymap __DOC
+ /* Keymap __DOC
* ,----------------------------------.
* | .-------. / / / / / / |
- * | | | |------|------|------| |
+ * | | | |------|------|------| |
* | | Pro | | Home | PgUp | L/R | |
* | | Micro | |------|------|------| |
* | | | |----------------------|
@@ -59,10 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME, KC_PGUP, TO(2),
KC_END, KC_PGDN, KC_INS
),
- /* Keymap __DOC
+ /* Keymap __DOC
* ,----------------------------------.
* | .-------. / / / / / / |
- * | | | |------|------|------| |
+ * | | | |------|------|------| |
* | | Pro | | Calc | MyPc |Bright| |
* | | Micro | |------|------|------| |
* | | | |----------------------|
@@ -82,22 +82,22 @@ static void render_logo(void) {
//Logo for _MEDIA
static const char PROGMEM logo1[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 0, 32, 32,160,160,160,160, 32, 32, 0, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 64,160,144, 8,252,129, 0, 60,126,255,255,255,255,255,255,255,255,126, 60, 0,129,252, 8,144,160, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 12,254,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 21, 42, 17, 96,135, 88,162, 64, 68,128,137,137,137,137,137,136,128, 68, 64,162, 88,199, 32, 17, 42, 21, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 15, 15, 8, 0, 0, 0, 0, 0, 0, 0, 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, 64,160,144, 8,252,129, 0, 60,126,255,255,255,255,255,255,255,255,126, 60, 0,129,252, 8,144,160, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 12,254,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 21, 42, 17, 96,135, 88,162, 64, 68,128,137,137,137,137,137,136,128, 68, 64,162, 88,199, 32, 17, 42, 21, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 15, 15, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2, 1, 5, 4, 2, 2, 2, 2, 2, 2, 4, 5, 1, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
//Logo for _DOC
static const char PROGMEM logo2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128,224,160,224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 17, 16, 16,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6,130,194,102, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,145,161,225, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 14, 11, 9, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 17, 16, 16,224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6,130,194,102, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,145,161,225, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160,224, 32,224,160, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 12, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 14, 11, 9, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
//Logo for _POWER
static const char PROGMEM logo3[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,120,254, 58, 30, 8, 4, 4, 4, 2, 2, 4, 4, 4, 8, 30, 58,254,120,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,248,145, 38, 68,136,144, 16, 32, 32, 32, 32, 16, 16,136, 68, 34,241,254,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 2, 34, 50, 58,110,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 35,231, 47,255, 62, 62, 61, 61, 61, 61, 61, 61, 62, 62, 63,239, 39,227, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 4, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,248,145, 38, 68,136,144, 16, 32, 32, 32, 32, 16, 16,136, 68, 34,241,254,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254, 0, 0, 0, 0, 0, 0,144,144,144,144,240, 0, 0, 48,224,128, 0, 0,224, 48, 0,192,224,176,144,144,240,192, 0, 0,240,240, 16, 16, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 2, 34, 50, 58,110,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 35,231, 47,255, 62, 62, 61, 61, 61, 61, 61, 61, 62, 62, 63,239, 39,227, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, 8, 0, 7, 15, 8, 8, 4, 15, 0, 0, 64, 65,111, 60, 15, 1, 0, 0, 3, 7, 12, 8, 8, 8, 0, 0, 0, 15, 15, 0, 0, 0, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 12, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
//Switch between logos
@@ -110,15 +110,15 @@ static void render_logo(void) {
break;
default:
oled_write_raw_P(logo1, sizeof(logo1));
- }
+ }
}
-void oled_task_user(void) {
+void oled_task_user(void) {
render_logo();
}
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 1:
@@ -141,6 +141,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_VOLD); //edit here your _MEDIA layer(1) encoder keycode
}
- }
+ }
}
-}
+ return true;
+}
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c b/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c
index cf4433d8c8..6a48a3102f 100644
--- a/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c
@@ -17,7 +17,7 @@ along with this program. If not, see .
#include QMK_KEYBOARD_H
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_MS_WH_UP);
@@ -25,6 +25,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN);
}
}
+ return true;
}
//
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c b/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c
index d419050a3d..87739b377e 100644
--- a/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c
@@ -17,7 +17,7 @@ along with this program. If not, see .
#include QMK_KEYBOARD_H
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_MS_WH_UP);
@@ -25,6 +25,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN);
}
}
+ return true;
}
//
diff --git a/keyboards/basekeys/trifecta/keymaps/default/keymap.c b/keyboards/basekeys/trifecta/keymaps/default/keymap.c
index 727ebf381a..6db61e4768 100644
--- a/keyboards/basekeys/trifecta/keymaps/default/keymap.c
+++ b/keyboards/basekeys/trifecta/keymaps/default/keymap.c
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT);
}
}
+ return true;
}
diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c
index e1f401bc24..54e25ff370 100644
--- a/keyboards/basekeys/trifecta/keymaps/via/keymap.c
+++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_FN] = LAYOUT(
- 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, _______, _______, _______,
+ 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_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP,
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_step_reverse();
}
}
+ return true;
}
diff --git a/keyboards/basketweave/keymaps/default/keymap.c b/keyboards/basketweave/keymaps/default/keymap.c
index 40cf61eea6..16c082b61d 100644
--- a/keyboards/basketweave/keymaps/default/keymap.c
+++ b/keyboards/basketweave/keymaps/default/keymap.c
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -49,4 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/boston/keymaps/default/keymap.c b/keyboards/boston/keymaps/default/keymap.c
index 6a3cc1e60a..a1955216e6 100644
--- a/keyboards/boston/keymaps/default/keymap.c
+++ b/keyboards/boston/keymaps/default/keymap.c
@@ -20,33 +20,33 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
- KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
+ KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
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_PAUSE, KC_DEL , KC_END , 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_BSPC, KC_CALC, 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, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
KC_LSFT, KC_BSLS, 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_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
),
-
+
[1] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-};
+};
-void encoder_update_user(uint8_t index, bool clockwise) {
- if (clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (clockwise) {
tap_code(KC_VOLU);
- }
- else {
+ } else {
tap_code(KC_VOLD);
- }
- }
+ }
+ return true;
+}
diff --git a/keyboards/boston/keymaps/rgb-light-layers/keymap.c b/keyboards/boston/keymaps/rgb-light-layers/keymap.c
index 44e3df70f5..6e55632517 100644
--- a/keyboards/boston/keymaps/rgb-light-layers/keymap.c
+++ b/keyboards/boston/keymaps/rgb-light-layers/keymap.c
@@ -20,96 +20,96 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
- KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
+ KC_MUTE, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_MPRV, KC_MPLY, KC_MNXT , KC_INS , KC_HOME, KC_PGUP,
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_PAUSE, KC_DEL , KC_END , 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_BSPC, KC_CALC, 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, RGB_TOG, KC_P7 , KC_P8 , KC_P9 , KC_PEQL,
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_ENT , KC_MSEL, KC_P4 , KC_P5 , KC_P6 , KC_PPLS,
KC_LSFT, KC_BSLS, 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_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_P0 , KC_PDOT
),
-
+
[1] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
[2] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-
+
[3] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-
+
[4] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
[5] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-
+
[6] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-
+
[7] = LAYOUT_all(
-
- _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
+
+ _______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______, _______ , _______, _______, _______,
_______,_______,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______, _______ , _______, _______, _______,
- _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
+ _______,_______,_______ , _______ ,_______ ,_______ , _______ ,_______ ,_______ , _______, _______, _______, _______ , _______, _______
),
-};
+};
uint8_t go_to_layer = 0; /* Used for the layer changing code for the encoder below */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (matrix_is_on(6, 10)) { /* Use the knob to change layers when holding down Menu key. Unfortunately using layers to initiate this behavior is not possible. */
if (clockwise) {
@@ -121,7 +121,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else {
go_to_layer=0;
}
-
+
layer_on(go_to_layer);
}
@@ -129,7 +129,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else {
layer_off(go_to_layer);
-
+
/* update go_to_layer*/
if(go_to_layer>0) {
go_to_layer--;
@@ -142,15 +142,16 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
-
+
else { /* normal operation as volume knob */
if (clockwise) {
tap_code(KC_VOLU);
- }
+ }
else {
tap_code(KC_VOLD);
}
}
+ return true;
}
/*Default layer is white.*/
@@ -220,4 +221,3 @@ bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, true);
return true;
}
-
diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c
index 933c14dee4..fd283b087a 100644
--- a/keyboards/boston_meetup/2019/2019.c
+++ b/keyboards/boston_meetup/2019/2019.c
@@ -182,9 +182,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true;
+ return true;
}
#endif
diff --git a/keyboards/cannonkeys/ortho75/ortho75.c b/keyboards/cannonkeys/ortho75/ortho75.c
index c3ceee28c0..7c722d7156 100644
--- a/keyboards/cannonkeys/ortho75/ortho75.c
+++ b/keyboards/cannonkeys/ortho75/ortho75.c
@@ -11,7 +11,8 @@ uint32_t layer_state_set_kb(uint32_t state) {
return state;
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+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) {
@@ -46,4 +47,5 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ }
unregister_code(mapped_code);
}
+ return true;
}
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
index 47c9a9d503..d3853c2292 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
@@ -300,7 +300,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true;
if (index == 0) {
@@ -325,6 +326,7 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
void custom_config_reset(void){
@@ -451,4 +453,4 @@ void via_eeprom_reset(void)
eeconfig_disable();
}
-#endif // VIA_ENABLE
\ No newline at end of file
+#endif // VIA_ENABLE
diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c
index 2f53c1d6ca..4dc46d74e9 100644
--- a/keyboards/cassette42/keymaps/default/keymap.c
+++ b/keyboards/cassette42/keymaps/default/keymap.c
@@ -33,10 +33,10 @@ enum layer_number {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch)
- [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)),
- [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI),
- [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI),
- [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI),
+ [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)),
+ [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI),
+ [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI),
+ [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI),
[_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______),
};
@@ -112,7 +112,7 @@ void oled_task_user(void) {
void led_set_user(uint8_t usb_led) {}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
oled_on();
if (index == 0) { /* left encoder */
switch (layer_state) {
@@ -171,4 +171,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/ck60i/ck60i.c b/keyboards/ck60i/ck60i.c
index 2516e636de..7e5cd33218 100644
--- a/keyboards/ck60i/ck60i.c
+++ b/keyboards/ck60i/ck60i.c
@@ -17,12 +17,14 @@ along with this program. If not, see .
#include "ck60i.h"
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/ckeys/thedora/keymaps/default/keymap.c b/keyboards/ckeys/thedora/keymaps/default/keymap.c
index c407fbe264..783475eb0a 100755
--- a/keyboards/ckeys/thedora/keymaps/default/keymap.c
+++ b/keyboards/ckeys/thedora/keymaps/default/keymap.c
@@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -152,4 +152,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/ckeys/thedora/readme.md b/keyboards/ckeys/thedora/readme.md
index 273811d0fa..991b5df02d 100755
--- a/keyboards/ckeys/thedora/readme.md
+++ b/keyboards/ckeys/thedora/readme.md
@@ -51,7 +51,7 @@ You can find the default layout in `thedora/keymaps/default/keymap.c`
This is the bit of code at the end of `keymap.c` that needs to changed if you want to change the behavior of the rotary encoder.
```
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN); // What the rotary encoder repeatedly does when turned right.
@@ -59,6 +59,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP); // What it does when turned to the left.
}
}
+ return true;
}
```
diff --git a/keyboards/ckeys/washington/keymaps/default/keymap.c b/keyboards/ckeys/washington/keymaps/default/keymap.c
index bfe2963831..7adac3c433 100644
--- a/keyboards/ckeys/washington/keymaps/default/keymap.c
+++ b/keyboards/ckeys/washington/keymaps/default/keymap.c
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (biton32(layer_state)) {
case _BASE:
if (clockwise) {
@@ -55,6 +55,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
@@ -79,4 +80,4 @@ void oled_task_user(void) {
oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c
index 29f7a4901c..40032cd669 100644
--- a/keyboards/clueboard/2x1800/2019/2019.c
+++ b/keyboards/clueboard/2x1800/2019/2019.c
@@ -144,13 +144,11 @@ bool led_update_kb(led_t led_state) {
return res;
}
-__attribute__ ((weak))
-bool encoder_update_keymap(int8_t index, bool clockwise) {
- return false;
-}
+__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
+__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }
-void encoder_update_kb(int8_t index, bool clockwise) {
- if (!encoder_update_keymap(index, clockwise)) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
// Encoder 1, outside left
if (index == 0 && clockwise) {
tap_code(KC_MS_U); // turned right
@@ -179,4 +177,5 @@ void encoder_update_kb(int8_t index, bool clockwise) {
tap_code(KC_MS_L); // turned left
}
}
+ return true;
}
diff --git a/keyboards/clueboard/2x1800/2019/2019.h b/keyboards/clueboard/2x1800/2019/2019.h
index e4738a4b90..5debfacc5d 100644
--- a/keyboards/clueboard/2x1800/2019/2019.h
+++ b/keyboards/clueboard/2x1800/2019/2019.h
@@ -29,8 +29,7 @@ enum TWOx1800_keycodes {
#define SAFE_RANGE NEW_SAFE_RANGE
// Encoder update function that returns true/false
-__attribute__ ((weak))
-bool encoder_update_keymap(int8_t index, bool clockwise);
+bool encoder_update_keymap(uint8_t index, bool clockwise);
// Encoder button combo check
void check_encoder_buttons(void);
diff --git a/keyboards/crbn/crbn.c b/keyboards/crbn/crbn.c
index 1da726b9c7..866f2d4265 100644
--- a/keyboards/crbn/crbn.c
+++ b/keyboards/crbn/crbn.c
@@ -15,10 +15,12 @@
*/
#include "crbn.h"
/* Encoder setting. only one encoder despite 4 possible spots */
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/custommk/genesis/genesis.c b/keyboards/custommk/genesis/genesis.c
index 47296dd804..f684d7ef7a 100644
--- a/keyboards/custommk/genesis/genesis.c
+++ b/keyboards/custommk/genesis/genesis.c
@@ -16,7 +16,8 @@
#include "genesis.h"
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
/* top left encoder */
if (index == 0) {
if (clockwise) {
@@ -32,5 +33,6 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_VOLD);
}
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/delikeeb/vaguettelite/keymaps/default/keymap.c b/keyboards/delikeeb/vaguettelite/keymaps/default/keymap.c
index 8593526aa3..98af7556ab 100644
--- a/keyboards/delikeeb/vaguettelite/keymaps/default/keymap.c
+++ b/keyboards/delikeeb/vaguettelite/keymaps/default/keymap.c
@@ -106,7 +106,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT);
}
}
+ return true;
}
diff --git a/keyboards/delikeeb/vaguettelite/keymaps/default_625u_universal/keymap.c b/keyboards/delikeeb/vaguettelite/keymaps/default_625u_universal/keymap.c
index a1af844bb3..ed028e84b1 100644
--- a/keyboards/delikeeb/vaguettelite/keymaps/default_625u_universal/keymap.c
+++ b/keyboards/delikeeb/vaguettelite/keymaps/default_625u_universal/keymap.c
@@ -106,7 +106,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT);
}
}
+ return true;
}
diff --git a/keyboards/delikeeb/vaguettelite/keymaps/noclew/keymap.c b/keyboards/delikeeb/vaguettelite/keymaps/noclew/keymap.c
index d8f470288a..58bc0c7783 100644
--- a/keyboards/delikeeb/vaguettelite/keymaps/noclew/keymap.c
+++ b/keyboards/delikeeb/vaguettelite/keymaps/noclew/keymap.c
@@ -126,7 +126,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -151,4 +151,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT);
}
}
+ return true;
}
diff --git a/keyboards/delikeeb/vaguettelite/keymaps/via/keymap.c b/keyboards/delikeeb/vaguettelite/keymaps/via/keymap.c
index 2993728ea0..a84b41b29d 100644
--- a/keyboards/delikeeb/vaguettelite/keymaps/via/keymap.c
+++ b/keyboards/delikeeb/vaguettelite/keymaps/via/keymap.c
@@ -107,7 +107,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -132,4 +132,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_LEFT);
}
}
+ return true;
}
diff --git a/keyboards/delikeeb/vanana/keymaps/default/keymap.c b/keyboards/delikeeb/vanana/keymaps/default/keymap.c
index af7a706ccb..281bb36acb 100644
--- a/keyboards/delikeeb/vanana/keymaps/default/keymap.c
+++ b/keyboards/delikeeb/vanana/keymaps/default/keymap.c
@@ -117,7 +117,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -158,4 +158,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/delikeeb/waaffle/keymaps/default/keymap.c b/keyboards/delikeeb/waaffle/keymaps/default/keymap.c
index 5d572ec892..5fcd609b8a 100644
--- a/keyboards/delikeeb/waaffle/keymaps/default/keymap.c
+++ b/keyboards/delikeeb/waaffle/keymaps/default/keymap.c
@@ -104,7 +104,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
@@ -145,4 +145,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c
index 6e0911da53..d6653691bb 100644
--- a/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c
@@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(index) {
case 0:
if (clockwise) {
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
diff --git a/keyboards/dmqdesign/spin/keymaps/default/keymap.c b/keyboards/dmqdesign/spin/keymaps/default/keymap.c
index 0b5e6bd0b9..ea6b518c38 100644
--- a/keyboards/dmqdesign/spin/keymaps/default/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/default/keymap.c
@@ -24,24 +24,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
rgblight_increase_hue(); //Cycle through the RGB hue
} else {
rgblight_decrease_hue();
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_VOLU); //Example of using tap_code which lets you use keycodes outside of the keymap
} else {
tap_code(KC_VOLD);
}
- } else if (index == 2) { /* Third encoder */
+ } else if (index == 2) { /* Third encoder */
if (clockwise) {
rgblight_increase_val(); //Change brightness on the RGB LEDs
} else {
rgblight_decrease_val();
}
}
+ return true;
}
diff --git a/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c b/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c
index cb2a21f557..100f821a60 100644
--- a/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
switch (currentLayer) { //break each encoder update into a switch statement for the current layer
case _BL:
@@ -124,6 +124,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated
diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c
index b9ad17386c..4760011da5 100644
--- a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c
@@ -61,7 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer
case _NUMPAD:
@@ -135,6 +135,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated
diff --git a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c
index ba3aa96d49..bdf5dff0df 100644
--- a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c
@@ -37,8 +37,8 @@ enum custom_keycodes {
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MACRO] = LAYOUT(
- A(S(KC_N)), HELLO, CH_SUSP, TO(_MACRO),
- KC_MPRV, KC_MPLY, KC_MNXT, TO(_NUMPAD),
+ A(S(KC_N)), HELLO, CH_SUSP, TO(_MACRO),
+ KC_MPRV, KC_MPLY, KC_MNXT, TO(_NUMPAD),
C(A(KC_COMM)), KC_F5, C(A(KC_DOT)), TO(_RGB),
MO(_FN), CH_ASST, CH_CPNL),
@@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_NO, KC_NO, KC_NO, KC_TRNS,
KC_NO, KC_NO, KC_NO),
};
-// clang-format on
+// clang-format on
typedef enum layer_ack {
ACK_NO = 0,
@@ -79,20 +79,20 @@ const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, H
const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GREEN});
const rgblight_segment_t PROGMEM _meh_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_YELLOW});
-// clang-format on
+// clang-format on
const rgblight_segment_t *const PROGMEM _rgb_layers[] = {
[LAYER_OFFSET + 0] = _macro_layer,
[LAYER_OFFSET + 1] = _numpad_layer,
[LAYER_OFFSET + 2] = _rgb_layer,
[LAYER_OFFSET + 3] = _fn_layer,
-
+
[ACK_OFFSET + ACK_NO] = _no_layer,
[ACK_OFFSET + ACK_YES] = _yes_layer,
[ACK_OFFSET + ACK_MEH] = _meh_layer,
[ACK_OFFSET + ACK_MEH + 1] = NULL
};
-// clang-format off
+// clang-format off
const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1;
@@ -200,7 +200,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _RGB:
if (index == 0) {
@@ -234,4 +234,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
diff --git a/keyboards/dmqdesign/spin/keymaps/via/keymap.c b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
index c3b5ef2603..6527cc8fd8 100644
--- a/keyboards/dmqdesign/spin/keymaps/via/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
@@ -45,24 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
rgblight_increase_hue(); //Cycle through the RGB hue
} else {
rgblight_decrease_hue();
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
rgblight_increase_sat();
} else {
rgblight_decrease_sat();
}
- } else if (index == 2) { /* Third encoder */
+ } else if (index == 2) { /* Third encoder */
if (clockwise) {
rgblight_increase_val(); //Change brightness on the RGB LEDs
} else {
rgblight_decrease_val();
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c
index 0dd9c40678..9c849a8a1e 100644
--- a/keyboards/doodboard/duckboard/keymaps/default/keymap.c
+++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c
@@ -38,14 +38,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
-}
+ }
+ return true;
}
diff --git a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c
index e782acba01..40b685d1d6 100644
--- a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c
+++ b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c
@@ -38,14 +38,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
-}
+ }
+ return true;
}
diff --git a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c
index 00ae8fa0d9..521f374c30 100644
--- a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c
+++ b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c
@@ -45,14 +45,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
-}
+ }
+ return true;
}
diff --git a/keyboards/draculad/keymaps/default/keymap.c b/keyboards/draculad/keymaps/default/keymap.c
index f9432c992f..1d3591ce99 100644
--- a/keyboards/draculad/keymaps/default/keymap.c
+++ b/keyboards/draculad/keymaps/default/keymap.c
@@ -82,73 +82,73 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
} else {
return OLED_ROTATION_0;
}
-}
+}
static void render_logo(void) {
static const char PROGMEM drac_logo[] = {
// drac_logo, 128x64px
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x80, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00,
- 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0,
- 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00,
- 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0,
- 0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff,
- 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff,
- 0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00,
- 0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f,
- 0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc,
- 0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0,
- 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07,
- 0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8,
- 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08,
- 0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80,
- 0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
- 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03,
- 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01,
- 0x01, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0x80, 0x80, 0x80, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00,
+ 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0,
+ 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00,
+ 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0,
+ 0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff,
+ 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff,
+ 0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00,
+ 0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f,
+ 0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc,
+ 0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60,
+ 0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0,
+ 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x07,
+ 0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8,
+ 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08,
+ 0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80,
+ 0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
+ 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03,
+ 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01,
+ 0x01, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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(drac_logo, sizeof(drac_logo));
@@ -195,7 +195,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -220,6 +220,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_D);
}
}
-
+ return true;
}
#endif
diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c
index 1f57efb5d5..87cbe3cd3a 100644
--- a/keyboards/draculad/keymaps/pimoroni/keymap.c
+++ b/keyboards/draculad/keymaps/pimoroni/keymap.c
@@ -295,7 +295,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record){
return true;
}
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -319,5 +319,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
// I only have 2 encoders on the the pimoroni example board, just add else ifs for your other encoders...
// the missing ones are encoder 1 on the right side and encoder 3 on the left side
+ return true;
}
#endif
diff --git a/keyboards/draytronics/daisy/keymaps/default/keymap.c b/keyboards/draytronics/daisy/keymaps/default/keymap.c
index 396fcd9dd7..f713eef49d 100644
--- a/keyboards/draytronics/daisy/keymaps/default/keymap.c
+++ b/keyboards/draytronics/daisy/keymaps/default/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGDN);
}
}
+ return true;
}
diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c
index dfa6a52b91..63b9936032 100644
--- a/keyboards/dumbo/keymaps/default/keymap.c
+++ b/keyboards/dumbo/keymaps/default/keymap.c
@@ -189,7 +189,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// master side thumb encoder
// Volume control
@@ -226,5 +226,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_HOME);
}
}
+ return true;
}
#endif
diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c
index 4e73fdaa0e..03825db031 100644
--- a/keyboards/dumbo/keymaps/trip-trap/keymap.c
+++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c
@@ -387,7 +387,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// master side thumb encoder
// Volume control
@@ -424,5 +424,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_HOME);
}
}
+ return true;
}
#endif
diff --git a/keyboards/dumbpad/v0x/keymaps/default/keymap.c b/keyboards/dumbpad/v0x/keymaps/default/keymap.c
index 7ded9f74ed..22fbd24c02 100644
--- a/keyboards/dumbpad/v0x/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v0x/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
//debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* main layer:
@@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v0x/templates/keymap.c b/keyboards/dumbpad/v0x/templates/keymap.c
index 11ed745188..6f862b8225 100644
--- a/keyboards/dumbpad/v0x/templates/keymap.c
+++ b/keyboards/dumbpad/v0x/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v0x_dualencoder/keymaps/default/keymap.c b/keyboards/dumbpad/v0x_dualencoder/keymaps/default/keymap.c
index 59f36a1a91..b103c306f3 100644
--- a/keyboards/dumbpad/v0x_dualencoder/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v0x_dualencoder/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* left encoder:
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v0x_dualencoder/templates/keymap.c b/keyboards/dumbpad/v0x_dualencoder/templates/keymap.c
index 0c2be0aad4..c602269ed3 100644
--- a/keyboards/dumbpad/v0x_dualencoder/templates/keymap.c
+++ b/keyboards/dumbpad/v0x_dualencoder/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -40,4 +40,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v0x_right/keymaps/default/keymap.c b/keyboards/dumbpad/v0x_right/keymaps/default/keymap.c
index 4050ac9420..48002ff4d9 100644
--- a/keyboards/dumbpad/v0x_right/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v0x_right/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* main layer:
@@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v0x_right/templates/keymap.c b/keyboards/dumbpad/v0x_right/templates/keymap.c
index 11ed745188..6f862b8225 100644
--- a/keyboards/dumbpad/v0x_right/templates/keymap.c
+++ b/keyboards/dumbpad/v0x_right/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x/keymaps/default/keymap.c b/keyboards/dumbpad/v1x/keymaps/default/keymap.c
index 7ded9f74ed..22fbd24c02 100644
--- a/keyboards/dumbpad/v1x/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v1x/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
//debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* main layer:
@@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x/templates/keymap.c b/keyboards/dumbpad/v1x/templates/keymap.c
index 11ed745188..6f862b8225 100644
--- a/keyboards/dumbpad/v1x/templates/keymap.c
+++ b/keyboards/dumbpad/v1x/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x_dualencoder/keymaps/default/keymap.c b/keyboards/dumbpad/v1x_dualencoder/keymaps/default/keymap.c
index 548b594dd3..8e4f444ee7 100644
--- a/keyboards/dumbpad/v1x_dualencoder/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v1x_dualencoder/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* left encoder:
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x_dualencoder/templates/keymap.c b/keyboards/dumbpad/v1x_dualencoder/templates/keymap.c
index 0c2be0aad4..c602269ed3 100644
--- a/keyboards/dumbpad/v1x_dualencoder/templates/keymap.c
+++ b/keyboards/dumbpad/v1x_dualencoder/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -40,4 +40,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x_right/keymaps/default/keymap.c b/keyboards/dumbpad/v1x_right/keymaps/default/keymap.c
index 4050ac9420..48002ff4d9 100644
--- a/keyboards/dumbpad/v1x_right/keymaps/default/keymap.c
+++ b/keyboards/dumbpad/v1x_right/keymaps/default/keymap.c
@@ -72,7 +72,7 @@ void keyboard_post_init_user(void) {
// debug_mouse = true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* main layer:
@@ -103,4 +103,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/dumbpad/v1x_right/templates/keymap.c b/keyboards/dumbpad/v1x_right/templates/keymap.c
index 11ed745188..6f862b8225 100644
--- a/keyboards/dumbpad/v1x_right/templates/keymap.c
+++ b/keyboards/dumbpad/v1x_right/templates/keymap.c
@@ -2,7 +2,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 0:
@@ -22,4 +22,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/ealdin/quadrant/quadrant.c b/keyboards/ealdin/quadrant/quadrant.c
index 5a4acaf006..a5aff62dae 100644
--- a/keyboards/ealdin/quadrant/quadrant.c
+++ b/keyboards/ealdin/quadrant/quadrant.c
@@ -17,7 +17,8 @@
// Rotary encoder functions:
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+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) {
@@ -49,6 +50,7 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
}
tap_code(mapped_code);
}
+ return true;
}
void keyboard_pre_init_kb(void) {
@@ -63,4 +65,3 @@ bool led_update_kb(led_t led_state) {
}
return true;
}
-
diff --git a/keyboards/ebastler/isometria_75/rev1/keymaps/default/keymap.c b/keyboards/ebastler/isometria_75/rev1/keymaps/default/keymap.c
index d3242a9de1..d8c980f471 100644
--- a/keyboards/ebastler/isometria_75/rev1/keymaps/default/keymap.c
+++ b/keyboards/ebastler/isometria_75/rev1/keymaps/default/keymap.c
@@ -18,32 +18,32 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* keymap for layer 0 */
- 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_MPLY,
- 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_PGUP,
- 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_ENT, KC_PGDN,
- 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_END,
+ 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_MPLY,
+ 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_PGUP,
+ 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_ENT, KC_PGDN,
+ 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_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_iso( /* keymap for layer 1 */
- RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
- 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_DEL, KC_INS,
- 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, MO(2), KC_TRNS, KC_TRNS,
+ RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
+ 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_DEL, KC_INS,
+ 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_iso( /* keymap for layer 2 */
- 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, RESET,
- 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, MO(2), 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, RESET,
+ 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
};
/* Encoder */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@@ -71,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/ebastler/isometria_75/rev1/keymaps/via/keymap.c b/keyboards/ebastler/isometria_75/rev1/keymaps/via/keymap.c
index 1ed98f1a55..0b83408beb 100644
--- a/keyboards/ebastler/isometria_75/rev1/keymaps/via/keymap.c
+++ b/keyboards/ebastler/isometria_75/rev1/keymaps/via/keymap.c
@@ -18,40 +18,40 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* keymap for layer 0 */
- 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_MPLY,
- 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_PGUP,
- 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_ENT, KC_PGDN,
- 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_END,
+ 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_MPLY,
+ 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_PGUP,
+ 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_ENT, KC_PGDN,
+ 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_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1, KC_APP), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_iso( /* keymap for layer 1 */
- RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
- 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_DEL, KC_INS,
- 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, MO(2), KC_TRNS, KC_TRNS,
+ RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPD, RGB_SPI, RGB_M_P, KC_MUTE,
+ 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_DEL, KC_INS,
+ 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_iso( /* keymap for layer 2 */
- 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, RESET,
- 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, MO(2), 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, RESET,
+ 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, MO(2), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LT(1, KC_APP), KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_iso( /* keymap for layer 3 */
- 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_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),
};
/* Encoder */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@@ -79,4 +79,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/eggman/keymaps/default/keymap.c b/keyboards/eggman/keymaps/default/keymap.c
index fed38de98d..11da71c6c7 100644
--- a/keyboards/eggman/keymaps/default/keymap.c
+++ b/keyboards/eggman/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
#include QMK_KEYBOARD_H
enum layers{
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_NAV] = LAYOUT_default(
- KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB,
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_LCAP, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT,
@@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* left encoder */
if (clockwise) {
tap_code(KC_WH_U);
@@ -74,6 +74,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#ifdef COMBO_ENABLE
@@ -91,4 +92,3 @@ combo_t key_combos[COMBO_COUNT] = {
[COMBO_DEL] = COMBO(combo_del,KC_DEL)
};
#endif
-
diff --git a/keyboards/evolv/evolv.c b/keyboards/evolv/evolv.c
index 276fac26fd..90df449ee2 100644
--- a/keyboards/evolv/evolv.c
+++ b/keyboards/evolv/evolv.c
@@ -17,12 +17,14 @@ along with this program. If not, see .
#include "evolv.h"
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/evyd13/ta65/keymaps/default/keymap.c b/keyboards/evyd13/ta65/keymaps/default/keymap.c
index 8bb8a14ba0..5791f94057 100644
--- a/keyboards/evyd13/ta65/keymaps/default/keymap.c
+++ b/keyboards/evyd13/ta65/keymaps/default/keymap.c
@@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)){
case 1: //Layer 1
if (!clockwise) { // Remove ! to reverse direction
@@ -35,4 +35,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
diff --git a/keyboards/ffkeebs/siris/keymaps/default/keymap.c b/keyboards/ffkeebs/siris/keymaps/default/keymap.c
index 2096f812b9..b9dabafd24 100644
--- a/keyboards/ffkeebs/siris/keymaps/default/keymap.c
+++ b/keyboards/ffkeebs/siris/keymaps/default/keymap.c
@@ -19,32 +19,32 @@ along with this program. If not, see .
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
- 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_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_BSLS,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
+ 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_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_BSLS,
KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC),
[1] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/ffkeebs/siris/keymaps/via/keymap.c b/keyboards/ffkeebs/siris/keymaps/via/keymap.c
index 2096f812b9..b9dabafd24 100644
--- a/keyboards/ffkeebs/siris/keymaps/via/keymap.c
+++ b/keyboards/ffkeebs/siris/keymaps/via/keymap.c
@@ -19,32 +19,32 @@ along with this program. If not, see .
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
- 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_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_BSLS,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV,
+ 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_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_BSLS,
KC_LGUI, MO(1), KC_SPC, KC_LBRC, KC_RBRC, KC_ENT, MO(2), KC_BSPC),
[1] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/flxlb/zplit/keymaps/via/keymap.c b/keyboards/flxlb/zplit/keymaps/via/keymap.c
index 7f92c80e29..6c5651be4d 100644
--- a/keyboards/flxlb/zplit/keymaps/via/keymap.c
+++ b/keyboards/flxlb/zplit/keymaps/via/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2021 FluxLab
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -25,7 +25,7 @@ enum custom_layers {
_LOWER,
_RAISE,
_ADJUST,
-};
+};
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
@@ -71,10 +71,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLD);
} else {
tap_code(KC_VOLU);
}
+ return true;
}
diff --git a/keyboards/gmmk/pro/keymaps/default/keymap.c b/keyboards/gmmk/pro/keymaps/default/keymap.c
index 9e5796ac18..b08400cd8d 100644
--- a/keyboards/gmmk/pro/keymaps/default/keymap.c
+++ b/keyboards/gmmk/pro/keymaps/default/keymap.c
@@ -55,10 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/gmmk/pro/keymaps/via/keymap.c b/keyboards/gmmk/pro/keymaps/via/keymap.c
index 927bf8fdf2..940cc1c1f3 100644
--- a/keyboards/gmmk/pro/keymaps/via/keymap.c
+++ b/keyboards/gmmk/pro/keymaps/via/keymap.c
@@ -34,7 +34,7 @@ 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_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
-
+
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -65,10 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c b/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c
index 90fdec73b7..fded532562 100644
--- a/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c
+++ b/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c
@@ -47,10 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_MS_WH_RIGHT);
} else {
tap_code(KC_MS_WH_LEFT);
}
+ return true;
}
diff --git a/keyboards/hadron/hadron.h b/keyboards/hadron/hadron.h
index 426face6f4..c11774729f 100644
--- a/keyboards/hadron/hadron.h
+++ b/keyboards/hadron/hadron.h
@@ -1,16 +1,17 @@
#ifndef HADRON_H
#define HADRON_H
-#ifdef SUBPROJECT_ver0
+#include "quantum.h"
+
+#ifdef KEYBOARD_hadron_ver0
#include "ver0.h"
#endif
-#ifdef SUBPROJECT_ver2
+#ifdef KEYBOARD_hadron_ver2
#include "ver2.h"
#endif
-#ifdef SUBPROJECT_ver3
+#ifdef KEYBOARD_hadron_ver3
#include "ver3.h"
#endif
-#include "quantum.h"
#define LAYOUT( \
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 1491caba43..0664bf4b0e 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -18,6 +18,7 @@
#include "action_layer.h"
#include "haptic.h"
+
#ifdef RGB_MATRIX_ENABLE
#include "rgb_matrix.h"
@@ -181,9 +182,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise);
+
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
queue_for_send = true;
+ return true;
}
#endif
diff --git a/keyboards/hadron/ver3/ver3.h b/keyboards/hadron/ver3/ver3.h
index 95926469bf..1ad44b871f 100644
--- a/keyboards/hadron/ver3/ver3.h
+++ b/keyboards/hadron/ver3/ver3.h
@@ -15,4 +15,4 @@
*/
#pragma once
-#include "hadron.h"
\ No newline at end of file
+#include "hadron.h"
diff --git a/keyboards/handwired/amigopunk/keymaps/default/keymap.c b/keyboards/handwired/amigopunk/keymaps/default/keymap.c
index 7aed2a61cf..70c6e7725a 100644
--- a/keyboards/handwired/amigopunk/keymaps/default/keymap.c
+++ b/keyboards/handwired/amigopunk/keymaps/default/keymap.c
@@ -37,11 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index != 0)
return;
tap_code(clockwise ? KC_VOLU : KC_VOLD);
+ return true;
}
#endif
diff --git a/keyboards/handwired/bento/keymaps/cbc02009/keymap.c b/keyboards/handwired/bento/keymaps/cbc02009/keymap.c
index 169e0f1dd3..57c107b9fc 100644
--- a/keyboards/handwired/bento/keymaps/cbc02009/keymap.c
+++ b/keyboards/handwired/bento/keymaps/cbc02009/keymap.c
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_ENABLE
#include "encoder.h"
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -37,5 +37,6 @@ void encoder_update_user(int8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/handwired/bento/keymaps/default/keymap.c b/keyboards/handwired/bento/keymaps/default/keymap.c
index 6a2cfa682f..dc074c4205 100644
--- a/keyboards/handwired/bento/keymaps/default/keymap.c
+++ b/keyboards/handwired/bento/keymaps/default/keymap.c
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _ENCODER) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -47,4 +47,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/handwired/bento/keymaps/mac/keymap.c b/keyboards/handwired/bento/keymaps/mac/keymap.c
index 29a7e809fc..bb584c9a5b 100644
--- a/keyboards/handwired/bento/keymaps/mac/keymap.c
+++ b/keyboards/handwired/bento/keymaps/mac/keymap.c
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _ENCODER) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -49,6 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
-
-
diff --git a/keyboards/handwired/d48/keymaps/anderson/keymap.c b/keyboards/handwired/d48/keymaps/anderson/keymap.c
index 25837a3591..f63bf54ea6 100644
--- a/keyboards/handwired/d48/keymaps/anderson/keymap.c
+++ b/keyboards/handwired/d48/keymaps/anderson/keymap.c
@@ -229,7 +229,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (!alpha_pressed) {
tap_code(clockwise ? KC_VOLD : KC_VOLU);
@@ -243,6 +243,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_PGUP : KC_PGDN);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/handwired/d48/keymaps/default/keymap.c b/keyboards/handwired/d48/keymaps/default/keymap.c
index b7914f3bcd..08bb906032 100644
--- a/keyboards/handwired/d48/keymaps/default/keymap.c
+++ b/keyboards/handwired/d48/keymaps/default/keymap.c
@@ -174,7 +174,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return taphold_process(keycode, record);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (!alpha_pressed) {
tap_code(clockwise ? KC_VOLD : KC_VOLU);
@@ -188,6 +188,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_PGUP : KC_PGDN);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c
index f9b5ca6dff..fd8c16420e 100644
--- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c
+++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c
@@ -561,7 +561,7 @@ void oled_task_user(void) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// On the left, control the volume. On the right, scroll the page
if (index == 0) {
if (clockwise) {
@@ -576,4 +576,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c
index eef82dd9b9..5214e8b6f4 100644
--- a/keyboards/handwired/daishi/keymaps/default/keymap.c
+++ b/keyboards/handwired/daishi/keymaps/default/keymap.c
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_EQL ,
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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT
),
/* FN
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | | | | | | | | |
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
*/
-
+
[_FN] = LAYOUT( /* Function */
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, MO(_FN), DEBUG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
@@ -73,23 +73,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case M_EXAMPLE1:
SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter
- return false;
+ return false;
case M_EXAMPLE2:
SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter
- return false;
+ return false;
}
}
return true;
};
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
-
+
void matrix_init_user(void) {
// Call the keymap level matrix init.
@@ -115,4 +116,4 @@ void led_set_kb(uint8_t usb_led) {
} else {
writePinHigh(C6);
}
-}
\ No newline at end of file
+}
diff --git a/keyboards/handwired/frankie_macropad/keymaps/default/keymap.c b/keyboards/handwired/frankie_macropad/keymaps/default/keymap.c
index 02c1002aff..b85d66c4c8 100644
--- a/keyboards/handwired/frankie_macropad/keymaps/default/keymap.c
+++ b/keyboards/handwired/frankie_macropad/keymaps/default/keymap.c
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGUP);
@@ -37,4 +37,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/handwired/hnah108/keymaps/default/keymap.c b/keyboards/handwired/hnah108/keymaps/default/keymap.c
index 682ca0812a..d4d4cde4b6 100644
--- a/keyboards/handwired/hnah108/keymaps/default/keymap.c
+++ b/keyboards/handwired/hnah108/keymaps/default/keymap.c
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (IS_LAYER_ON(_FN)) {
if (clockwise) {
@@ -62,6 +62,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
void rgb_matrix_indicators_user(void) {
diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c
index 1854894e56..5a30f5c578 100644
--- a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c
+++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c
@@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P1, KC_P2, KC_P3, \
KC_P0, KC_PDOT, KC_PENT \
),
-
+
/* Keymap ONE: Util Layer
*
* ,---. ,---.
@@ -371,7 +371,7 @@ void oled_task_user(void) {
}
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if(IS_LAYER_ON(BASE)) {
if (index == 0) { /* First encoder */
if (clockwise) {
@@ -432,4 +432,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c
index d9f0fa727c..55996c0189 100644
--- a/keyboards/handwired/pill60/keymaps/default/keymap.c
+++ b/keyboards/handwired/pill60/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
- /* Copyright 2020 Imam Rafii
- *
- * 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 .
- */
+ /* Copyright 2020 Imam Rafii
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
enum layers {
@@ -74,7 +74,7 @@ void oled_task_user(void) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_A);
@@ -82,6 +82,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_B);
}
}
+ return true;
}
#endif
diff --git a/keyboards/handwired/prkl30/keymaps/default/keymap.c b/keyboards/handwired/prkl30/keymaps/default/keymap.c
index ce60a41933..be032739f4 100644
--- a/keyboards/handwired/prkl30/keymaps/default/keymap.c
+++ b/keyboards/handwired/prkl30/keymaps/default/keymap.c
@@ -81,12 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_TAB);
} else {
tap_code(KC_PGUP);
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/handwired/prkl30/keymaps/erkhal/keymap.c b/keyboards/handwired/prkl30/keymaps/erkhal/keymap.c
index 4b01c9e09e..71e5ed529b 100644
--- a/keyboards/handwired/prkl30/keymaps/erkhal/keymap.c
+++ b/keyboards/handwired/prkl30/keymaps/erkhal/keymap.c
@@ -81,12 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(LCTL(KC_RIGHT));
} else {
tap_code16(LCTL(KC_LEFT));
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c b/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c
index 4e06bb11ec..65cd4cebea 100644
--- a/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c
+++ b/keyboards/handwired/pytest/has_template/keymaps/nocpp/keymap.c
@@ -11,7 +11,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(KC_ENTER)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_UP);
@@ -19,5 +19,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
-
+ return true;
};
diff --git a/keyboards/handwired/swiftrax/joypad/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/joypad/keymaps/default/keymap.c
index c5fd1b7d4e..9ba0b61098 100644
--- a/keyboards/handwired/swiftrax/joypad/keymaps/default/keymap.c
+++ b/keyboards/handwired/swiftrax/joypad/keymaps/default/keymap.c
@@ -27,10 +27,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/handwired/swiftrax/joypad/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/joypad/keymaps/via/keymap.c
index 11a2e0125e..254da6ac8b 100644
--- a/keyboards/handwired/swiftrax/joypad/keymaps/via/keymap.c
+++ b/keyboards/handwired/swiftrax/joypad/keymaps/via/keymap.c
@@ -42,10 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c
index 11e770921e..3dd8992279 100644
--- a/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c
+++ b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c
@@ -37,13 +37,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c
index 38e455becb..877411206e 100644
--- a/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c
+++ b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c
@@ -22,25 +22,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, 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_END,
KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, MO(1), 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_HOME,
- KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
+ KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ),
[1] = LAYOUT(
_______, _______, _______, _______, 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, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/handwired/swiftrax/walter/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/walter/keymaps/via/keymap.c
index cfa69d0c84..74d650bf5e 100644
--- a/keyboards/handwired/swiftrax/walter/keymaps/via/keymap.c
+++ b/keyboards/handwired/swiftrax/walter/keymaps/via/keymap.c
@@ -48,10 +48,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise)
tap_code16(KC_VOLU);
else
tap_code16(KC_VOLD);
-
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/helix/rev3_4rows/keymaps/default/keymap.c b/keyboards/helix/rev3_4rows/keymaps/default/keymap.c
index a9a2c4acca..1544a4fffe 100644
--- a/keyboards/helix/rev3_4rows/keymaps/default/keymap.c
+++ b/keyboards/helix/rev3_4rows/keymaps/default/keymap.c
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left side encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -125,6 +125,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
layer_state_t layer_state_set_user(layer_state_t state) {
diff --git a/keyboards/helix/rev3_4rows/keymaps/via/keymap.c b/keyboards/helix/rev3_4rows/keymaps/via/keymap.c
index 5611c96b34..2cfb1152c0 100644
--- a/keyboards/helix/rev3_4rows/keymaps/via/keymap.c
+++ b/keyboards/helix/rev3_4rows/keymaps/via/keymap.c
@@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left side encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -125,6 +125,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/helix/rev3_5rows/keymaps/default/keymap.c b/keyboards/helix/rev3_5rows/keymaps/default/keymap.c
index 18b5591373..6dde7fed52 100644
--- a/keyboards/helix/rev3_5rows/keymaps/default/keymap.c
+++ b/keyboards/helix/rev3_5rows/keymaps/default/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left side encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -135,6 +135,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
layer_state_t layer_state_set_user(layer_state_t state) {
diff --git a/keyboards/helix/rev3_5rows/keymaps/via/keymap.c b/keyboards/helix/rev3_5rows/keymaps/via/keymap.c
index 903e2637de..8097141dd8 100644
--- a/keyboards/helix/rev3_5rows/keymaps/via/keymap.c
+++ b/keyboards/helix/rev3_5rows/keymaps/via/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left side encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -135,6 +135,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/hub16/keymaps/ahk_companion/keymap.c b/keyboards/hub16/keymaps/ahk_companion/keymap.c
index bbc2ac09a1..10f641b6f8 100644
--- a/keyboards/hub16/keymaps/ahk_companion/keymap.c
+++ b/keyboards/hub16/keymaps/ahk_companion/keymap.c
@@ -103,7 +103,7 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
my_layer5_layer
);
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_MPRV);
@@ -117,6 +117,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
// Allow for a preview of changes when modifying RGB
diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c
index e077fe7409..1c1d188f29 100755
--- a/keyboards/hub16/keymaps/default/keymap.c
+++ b/keyboards/hub16/keymaps/default/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -47,4 +47,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MNXT);
}
}
+ return true;
}
diff --git a/keyboards/hub16/keymaps/macro/keymap.c b/keyboards/hub16/keymaps/macro/keymap.c
index 3bf8fa31fd..e4cf9da5eb 100755
--- a/keyboards/hub16/keymaps/macro/keymap.c
+++ b/keyboards/hub16/keymaps/macro/keymap.c
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key,
// allowing for easy differentiation from a real keyboard.
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
register_code(KC_WRAP);
@@ -76,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_WRAP);
}
}
+ return true;
}
// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c)
diff --git a/keyboards/hub16/keymaps/peepeetee/keymap.c b/keyboards/hub16/keymaps/peepeetee/keymap.c
index f0e393b262..4790feda0a 100644
--- a/keyboards/hub16/keymaps/peepeetee/keymap.c
+++ b/keyboards/hub16/keymaps/peepeetee/keymap.c
@@ -142,7 +142,7 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
// my_layer5_layer
);
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_MPRV);
@@ -156,6 +156,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
// Allow for a preview of changes when modifying RGB
diff --git a/keyboards/hub16/keymaps/via/keymap.c b/keyboards/hub16/keymaps/via/keymap.c
index c6f119adb7..c7facf2ed4 100755
--- a/keyboards/hub16/keymaps/via/keymap.c
+++ b/keyboards/hub16/keymaps/via/keymap.c
@@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MNXT);
}
}
+ return true;
}
diff --git a/keyboards/hub20/keymaps/default/keymap.c b/keyboards/hub20/keymaps/default/keymap.c
index c467312877..a0f048825e 100644
--- a/keyboards/hub20/keymaps/default/keymap.c
+++ b/keyboards/hub20/keymaps/default/keymap.c
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -50,4 +50,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV);
}
}
+ return true;
}
diff --git a/keyboards/hub20/keymaps/macro/keymap.c b/keyboards/hub20/keymaps/macro/keymap.c
index 7007a2f0ba..099fff8755 100644
--- a/keyboards/hub20/keymaps/macro/keymap.c
+++ b/keyboards/hub20/keymaps/macro/keymap.c
@@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key,
// allowing for easy differentiation from a real keyboard.
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
register_code(KC_WRAP);
@@ -81,6 +81,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_WRAP);
}
}
+ return true;
}
// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c)
diff --git a/keyboards/hub20/keymaps/via/keymap.c b/keyboards/hub20/keymaps/via/keymap.c
index 75a0a927af..3f3f3ebd86 100644
--- a/keyboards/hub20/keymaps/via/keymap.c
+++ b/keyboards/hub20/keymaps/via/keymap.c
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -66,4 +66,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV);
}
}
+ return true;
}
diff --git a/keyboards/jagdpietr/drakon/drakon.c b/keyboards/jagdpietr/drakon/drakon.c
index ca25ac3174..e1e6e641d0 100644
--- a/keyboards/jagdpietr/drakon/drakon.c
+++ b/keyboards/jagdpietr/drakon/drakon.c
@@ -18,13 +18,14 @@
char wpm_str[10];
-__attribute__((weak))
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
@@ -91,87 +92,87 @@ uint8_t current_tap_frame = 0;
static void render_anim(void) {
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
- 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
- 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
- 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 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, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
+ 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
+ 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
+ 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 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, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06,
- 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00,
- 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
+ 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, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06,
+ 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00,
+ 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00,
+ 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00
},
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
- 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
- 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
- 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 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, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
+ 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
+ 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
+ 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 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, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06,
- 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00,
- 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
+ 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, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06,
+ 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00,
+ 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00,
+ 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02,
0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00
},
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
- 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
- 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
- 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 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, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60,
+ 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00,
+ 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42,
+ 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00
}
};
static const char PROGMEM prep[][ANIM_SIZE] = {
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38,
- 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00,
- 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84,
- 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38,
+ 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00,
+ 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84,
+ 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00
}
};
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38,
- 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00,
- 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04,
- 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00,
- 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38,
+ 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00,
+ 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00,
+ 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38
},
{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38,
- 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00,
- 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2,
- 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38,
+ 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00,
+ 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2,
+ 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70,
0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c
},
};
diff --git a/keyboards/jones/v03/keymaps/default_jp/keymap.c b/keyboards/jones/v03/keymaps/default_jp/keymap.c
index d1a2a7abfd..54f90c3e57 100644
--- a/keyboards/jones/v03/keymaps/default_jp/keymap.c
+++ b/keyboards/jones/v03/keymaps/default_jp/keymap.c
@@ -241,7 +241,7 @@ bool led_update_user(led_t led_state) {
//------------------------------------------------------------------------------
// Rotary Encoder
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder, Right side */
if (clockwise) {
tap_code(KC_VOLD);
@@ -256,6 +256,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c
index e1bc27305f..6055df8994 100644
--- a/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c
+++ b/keyboards/jones/v03_1/keymaps/default_ansi/keymap.c
@@ -235,7 +235,7 @@ bool led_update_user(led_t led_state) {
//------------------------------------------------------------------------------
// Rotary Encoder
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder, Right side */
if (clockwise) {
tap_code(KC_VOLD);
@@ -275,6 +275,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
index 70e4612b6c..ba68b3dcf7 100644
--- a/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
+++ b/keyboards/jones/v03_1/keymaps/default_jp/keymap.c
@@ -237,7 +237,7 @@ bool led_update_user(led_t led_state) {
//------------------------------------------------------------------------------
// Rotary Encoder
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder, Right side */
if (clockwise) {
tap_code(KC_VOLD);
@@ -277,6 +277,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
index 41246ba7d9..06ba9a5595 100644
--- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c
@@ -21,13 +21,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
/* Top-left encoder (volume) */
case 0:
tap_code(clockwise ? KC_VOLU : KC_VOLD);
break;
-
+
/* Top-right encoder (backlight brightness) */
case 1:
if (clockwise) {
@@ -41,4 +41,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
index 443e8d0ae9..c581070895 100644
--- a/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c
@@ -253,7 +253,7 @@ const uint16_t PROGMEM encoders[][2][2] = {
[LR_EDIT] = {{ KC_COMM, KC_DOT }, { KC_MINS, KC_EQL }},
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t layer = get_highest_layer(layer_state);
switch (layer) {
@@ -285,6 +285,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(pgm_read_word(&encoders[layer][index][clockwise]));
break;
}
+ return true;
}
/**
diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
index 9747dbf223..bce81500d5 100644
--- a/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/keymap.c
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_WH_UP);
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c
index a88617caaa..e33e94b536 100644
--- a/keyboards/keebio/bdn9/keymaps/default/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -67,4 +67,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
index 06537cbadf..b37e2a1cdb 100644
--- a/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/eosti/keymap.c
@@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -131,6 +131,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
// Tapdance! Hold to use as a modifier to the _MOD layout, tap to change it between _BASE and _MACRO
diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
index 445e6e896a..4d323a3126 100644
--- a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -67,4 +67,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGDN);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c b/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
index 1eaee012af..50d44bea14 100644
--- a/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/hbbisenieks/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_RGHT);
@@ -82,4 +82,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
SEND_STRING(SS_LCTRL("3")); // audacity zoom out
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
index 79ae56fd2e..760bb3d5e5 100644
--- a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c
@@ -26,18 +26,18 @@ enum custom_keycodes { // Make sure have the awesome keycode ready
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3,
- KC_WH_U, ALT_TAB, KC_WH_L,
- KC_WH_D, TT(1), KC_WH_R
+ KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3,
+ KC_WH_U, ALT_TAB, KC_WH_L,
+ KC_WH_D, TT(1), KC_WH_R
),
[1] = LAYOUT(
- RESET, KC_ACL0, KC_ACL1,
- KC_VOLU, KC_ACL2, KC_BRIU,
- KC_VOLD, TO(1), KC_BRID
+ RESET, KC_ACL0, KC_ACL1,
+ KC_VOLU, KC_ACL2, KC_BRIU,
+ KC_VOLD, TO(1), KC_BRID
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_LEFT);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_D);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { // This will do most of the grunt work with the keycodes.
diff --git a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
index dec371d173..9777debc3e 100644
--- a/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/rishka/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MPRV, KC_END , KC_MNXT
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/test/keymap.c b/keyboards/keebio/bdn9/keymaps/test/keymap.c
index c42100ddf8..ecf7338a57 100644
--- a/keyboards/keebio/bdn9/keymaps/test/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/test/keymap.c
@@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _LEFT) {
if (clockwise) {
rgblight_increase_hue();
@@ -36,4 +36,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_decrease_val();
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c
index b86f88a232..7c380a4fdd 100644
--- a/keyboards/keebio/bdn9/keymaps/via/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c
@@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == _LEFT) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -63,4 +63,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
index ca8679d574..f473c9a1f9 100644
--- a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
@@ -35,7 +35,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
// Tab right
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(LGUI(KC_LBRC));
}
}
+ return true;
}
diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
index 7687ea2bfb..d1792d2b29 100644
--- a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
+++ b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c
@@ -106,7 +106,7 @@ void keyboard_post_init_user(void) {
// return true;
// }
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if(base_mode == true) {
if (index == 0) {
if (clockwise) {
@@ -169,4 +169,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/keebio/dsp40/keymaps/default/keymap.c b/keyboards/keebio/dsp40/keymaps/default/keymap.c
index e4162d3b48..f9bf6c27c5 100755
--- a/keyboards/keebio/dsp40/keymaps/default/keymap.c
+++ b/keyboards/keebio/dsp40/keymaps/default/keymap.c
@@ -105,7 +105,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -113,4 +113,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/dsp40/keymaps/via/keymap.c b/keyboards/keebio/dsp40/keymaps/via/keymap.c
index dfa7a18323..6575bbc8c6 100755
--- a/keyboards/keebio/dsp40/keymaps/via/keymap.c
+++ b/keyboards/keebio/dsp40/keymaps/via/keymap.c
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -72,4 +72,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/foldkb/keymaps/default/keymap.c b/keyboards/keebio/foldkb/keymaps/default/keymap.c
index 9d339080f3..0a71ef4d2d 100644
--- a/keyboards/keebio/foldkb/keymaps/default/keymap.c
+++ b/keyboards/keebio/foldkb/keymaps/default/keymap.c
@@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -47,4 +47,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/foldkb/keymaps/via/keymap.c b/keyboards/keebio/foldkb/keymaps/via/keymap.c
index f7f19ea7cd..d3e3a95bf6 100644
--- a/keyboards/keebio/foldkb/keymaps/via/keymap.c
+++ b/keyboards/keebio/foldkb/keymaps/via/keymap.c
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -61,4 +61,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/dcompact/keymap.c b/keyboards/keebio/iris/keymaps/dcompact/keymap.c
index 90e48c9c92..baa7e5e583 100644
--- a/keyboards/keebio/iris/keymaps/dcompact/keymap.c
+++ b/keyboards/keebio/iris/keymaps/dcompact/keymap.c
@@ -226,7 +226,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -241,4 +241,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/ddone/keymap.c b/keyboards/keebio/iris/keymaps/ddone/keymap.c
index 584f15e767..815174bf74 100644
--- a/keyboards/keebio/iris/keymaps/ddone/keymap.c
+++ b/keyboards/keebio/iris/keymaps/ddone/keymap.c
@@ -134,9 +134,9 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
}
}
-
-void encoder_update_user(uint8_t index, bool clockwise) {
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _LOWER:
@@ -153,4 +153,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c
index 3102dd2dae..5fda9fb917 100644
--- a/keyboards/keebio/iris/keymaps/default/keymap.c
+++ b/keyboards/keebio/iris/keymaps/default/keymap.c
@@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -127,4 +127,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c
index 1e512540aa..e0c09638b2 100644
--- a/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c
+++ b/keyboards/keebio/iris/keymaps/jerryhcooke/keymap.c
@@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_GE
[2] = LAYOUT(KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_K, KC_NO, KC_WH_D, KC_MS_U, KC_WH_U, KC_NO, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (biton32(layer_state)) {
case _LOWER:
@@ -35,5 +35,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif // ENCODER_ENABLE
diff --git a/keyboards/keebio/iris/keymaps/jhelvy/keymap.c b/keyboards/keebio/iris/keymaps/jhelvy/keymap.c
index a3d20bed59..ad67b6c63d 100644
--- a/keyboards/keebio/iris/keymaps/jhelvy/keymap.c
+++ b/keyboards/keebio/iris/keymaps/jhelvy/keymap.c
@@ -105,7 +105,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(HOTKEYS)) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_UP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/khitsule/keymap.c b/keyboards/keebio/iris/keymaps/khitsule/keymap.c
index 3e99cd6b0a..1ba89962c6 100644
--- a/keyboards/keebio/iris/keymaps/khitsule/keymap.c
+++ b/keyboards/keebio/iris/keymaps/khitsule/keymap.c
@@ -135,7 +135,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -150,4 +150,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/iris/keymaps/pvinis/keymap.c b/keyboards/keebio/iris/keymaps/pvinis/keymap.c
index 5c61c1321e..0c8706de6c 100644
--- a/keyboards/keebio/iris/keymaps/pvinis/keymap.c
+++ b/keyboards/keebio/iris/keymaps/pvinis/keymap.c
@@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -184,6 +184,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
// }
+ return true;
}
#endif
diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c
index 05eb42ae0b..2ada98d6da 100644
--- a/keyboards/keebio/iris/keymaps/via/keymap.c
+++ b/keyboards/keebio/iris/keymaps/via/keymap.c
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -81,4 +81,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/kbo5000/keymaps/default/keymap.c b/keyboards/keebio/kbo5000/keymaps/default/keymap.c
index 00e2189891..0261d11915 100644
--- a/keyboards/keebio/kbo5000/keymaps/default/keymap.c
+++ b/keyboards/keebio/kbo5000/keymaps/default/keymap.c
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == LEFT_HALF_ENC) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -55,4 +55,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c
index e2c334672b..93c44e69a7 100644
--- a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c
+++ b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == LEFT_HALF_ENC) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -55,4 +55,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/kbo5000/keymaps/via/keymap.c b/keyboards/keebio/kbo5000/keymaps/via/keymap.c
index 692358c485..11075faf6f 100644
--- a/keyboards/keebio/kbo5000/keymaps/via/keymap.c
+++ b/keyboards/keebio/kbo5000/keymaps/via/keymap.c
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == LEFT_HALF_ENC) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -55,4 +55,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/bfiedler/keymap.c b/keyboards/keebio/quefrency/keymaps/bfiedler/keymap.c
index c83327ce37..e47cba88c0 100644
--- a/keyboards/keebio/quefrency/keymaps/bfiedler/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/bfiedler/keymap.c
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format on
// TODO: I don't even have a rotary encoder, do I need this?
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -66,4 +66,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c
index 4ac622f8ed..0e06391abe 100644
--- a/keyboards/keebio/quefrency/keymaps/default65/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -46,4 +46,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c
index 478152006e..cd06c5199f 100644
--- a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -46,4 +46,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/draevin/keymap.c b/keyboards/keebio/quefrency/keymaps/draevin/keymap.c
index 7e6291579a..00a933ddb4 100644
--- a/keyboards/keebio/quefrency/keymaps/draevin/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/draevin/keymap.c
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (layer_state_is(_FN)) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -57,4 +57,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c
index 73d0c5af0e..1e8e2f2052 100644
--- a/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -85,4 +85,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/quefrency/keymaps/via/keymap.c b/keyboards/keebio/quefrency/keymaps/via/keymap.c
index f70a5bab9a..213f7af325 100644
--- a/keyboards/keebio/quefrency/keymaps/via/keymap.c
+++ b/keyboards/keebio/quefrency/keymaps/via/keymap.c
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/sinc/keymaps/default/keymap.c b/keyboards/keebio/sinc/keymaps/default/keymap.c
index e7acf19cb6..650314295b 100644
--- a/keyboards/keebio/sinc/keymaps/default/keymap.c
+++ b/keyboards/keebio/sinc/keymaps/default/keymap.c
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -33,4 +33,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/sinc/keymaps/iso/keymap.c b/keyboards/keebio/sinc/keymaps/iso/keymap.c
index 4d4089fa51..dde99bbeb1 100644
--- a/keyboards/keebio/sinc/keymaps/iso/keymap.c
+++ b/keyboards/keebio/sinc/keymaps/iso/keymap.c
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -33,4 +33,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/sinc/keymaps/sethBarberee/keymap.c b/keyboards/keebio/sinc/keymaps/sethBarberee/keymap.c
index 3d55f2c093..5ce1391620 100644
--- a/keyboards/keebio/sinc/keymaps/sethBarberee/keymap.c
+++ b/keyboards/keebio/sinc/keymaps/sethBarberee/keymap.c
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -68,4 +68,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/sinc/keymaps/via/keymap.c b/keyboards/keebio/sinc/keymaps/via/keymap.c
index 3a614da2fe..20cfdd79bb 100644
--- a/keyboards/keebio/sinc/keymaps/via/keymap.c
+++ b/keyboards/keebio/sinc/keymaps/via/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGDN);
@@ -52,4 +52,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/keebio/stick/keymaps/default/keymap.c b/keyboards/keebio/stick/keymaps/default/keymap.c
index 0521afa880..ea4ca3f54f 100644
--- a/keyboards/keebio/stick/keymaps/default/keymap.c
+++ b/keyboards/keebio/stick/keymaps/default/keymap.c
@@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -39,4 +39,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/keebio/stick/keymaps/via/keymap.c b/keyboards/keebio/stick/keymaps/via/keymap.c
index 3f712e6193..3f196dda69 100644
--- a/keyboards/keebio/stick/keymaps/via/keymap.c
+++ b/keyboards/keebio/stick/keymaps/via/keymap.c
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -51,4 +51,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/keybage/radpad/keymaps/default/keymap.c b/keyboards/keybage/radpad/keymaps/default/keymap.c
index f5904150e6..69bb3c685b 100644
--- a/keyboards/keybage/radpad/keymaps/default/keymap.c
+++ b/keyboards/keybage/radpad/keymaps/default/keymap.c
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left encoder */
if (clockwise) {
tap_code16(KC_VOLU);
@@ -51,6 +51,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(KC_MPRV);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c
index c7ec7da9a4..4a008b4660 100644
--- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c
+++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c
@@ -333,7 +333,7 @@ void oled_task_user(void) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// Encoder on master side
if (index == 0) {
switch (get_highest_layer(layer_state)) {
@@ -403,5 +403,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif // ENCODER_ENABLE
diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
index 18f0ac49a0..6e338dc102 100644
--- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
+++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c
@@ -43,7 +43,7 @@ void oled_task_user(void) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/*
Rev1.1 Rev1
,-----------------------, ,-----------------------,
@@ -86,6 +86,7 @@ Rev1.1 Rev1
tap_code(KC_F24);
}
}
+ return true;
}
#endif
diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c
index e665138f6a..f53d289879 100644
--- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c
+++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c
@@ -125,7 +125,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/*
,-----------------------,
| E1 | E2 | E3 | E4 |
@@ -224,5 +224,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c
index 0593d419b5..0f32532d92 100644
--- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c
+++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c
@@ -69,7 +69,7 @@ void oled_task_user(void) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/*
Rev1.1 Rev1
,-----------------------, ,-----------------------,
@@ -112,5 +112,6 @@ Rev1.1 Rev1
tap_code(KC_F24);
}
}
+ return true;
}
#endif
diff --git a/keyboards/keysofkings/twokey/keymaps/default/keymap.c b/keyboards/keysofkings/twokey/keymaps/default/keymap.c
index eaa4f88de5..f5a3732989 100644
--- a/keyboards/keysofkings/twokey/keymaps/default/keymap.c
+++ b/keyboards/keysofkings/twokey/keymaps/default/keymap.c
@@ -1,60 +1,60 @@
/* Copyright 2020 Keys of Kings
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
- LT(1, KC_MUTE),
- LT(4, KC_MPLY), LT(7, KC_MNXT)),
+ LT(1, KC_MUTE),
+ LT(4, KC_MPLY), LT(7, KC_MNXT)),
LAYOUT(
- KC_TRNS,
+ KC_TRNS,
TO(2), TO(3)),
LAYOUT(
- TO(0),
+ TO(0),
RGB_TOG, RGB_MOD),
LAYOUT(
- TO(0),
+ TO(0),
RGB_VAI, RGB_VAD),
-
+
LAYOUT(
- TO(0),
+ TO(0),
RGB_HUI, RGB_HUD),
LAYOUT(
- TO(5),
+ TO(5),
KC_TRNS, TO(6)),
LAYOUT(
- TO(0),
+ TO(0),
RGB_SAI, RGB_SAD),
LAYOUT(
- TO(8),
+ TO(8),
TO(9), KC_TRNS),
LAYOUT(
- TO(0),
+ TO(0),
CK_TOGG, MU_TOG),
LAYOUT(
- TO(0),
+ TO(0),
RESET, EEPROM_RESET),
};
@@ -64,7 +64,7 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -75,5 +75,5 @@ void encoder_update_user(int8_t index, bool clockwise) {
clockwise ? clicky_freq_up() : clicky_freq_down();
# endif
}
+ return true;
}
-
diff --git a/keyboards/kikoslab/kl90/keymaps/default/keymap.c b/keyboards/kikoslab/kl90/keymaps/default/keymap.c
index da68511e7a..04af4ba925 100644
--- a/keyboards/kikoslab/kl90/keymaps/default/keymap.c
+++ b/keyboards/kikoslab/kl90/keymaps/default/keymap.c
@@ -20,31 +20,31 @@ along with this program. If not, see .
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
- KC_DEL , 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_MPLY,
- KC_F13 , 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_F14 , 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_F15 , 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_PIPE, KC_ENT , KC_PGUP,
- KC_F16 , 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_BSLS, KC_UP , KC_PGDN,
+ KC_DEL , 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_MPLY,
+ KC_F13 , 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_F14 , 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_F15 , 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_PIPE, KC_ENT , KC_PGUP,
+ KC_F16 , 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_BSLS, KC_UP , KC_PGDN,
KC_F17 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_all(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT_all(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_WH_D);
@@ -58,6 +58,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
@@ -80,36 +81,36 @@ static void render_anim(void){
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,130, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
}
@@ -126,7 +127,7 @@ static void render_anim(void){
animation_phase();
}
anim_sleep = timer_read32();
- }
+ }
else {
if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT)
oled_off();
@@ -142,4 +143,4 @@ static void render_anim(void){
void oled_task_user(void) {
render_anim();
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/kikoslab/kl90/keymaps/via/keymap.c b/keyboards/kikoslab/kl90/keymaps/via/keymap.c
index da68511e7a..04af4ba925 100644
--- a/keyboards/kikoslab/kl90/keymaps/via/keymap.c
+++ b/keyboards/kikoslab/kl90/keymaps/via/keymap.c
@@ -20,31 +20,31 @@ along with this program. If not, see .
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
- KC_DEL , 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_MPLY,
- KC_F13 , 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_F14 , 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_F15 , 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_PIPE, KC_ENT , KC_PGUP,
- KC_F16 , 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_BSLS, KC_UP , KC_PGDN,
+ KC_DEL , 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_MPLY,
+ KC_F13 , 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_F14 , 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_F15 , 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_PIPE, KC_ENT , KC_PGUP,
+ KC_F16 , 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_BSLS, KC_UP , KC_PGDN,
KC_F17 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_all(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[2] = LAYOUT_all(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_WH_D);
@@ -58,6 +58,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
@@ -80,36 +81,36 @@ static void render_anim(void){
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,130, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
},
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64,
64,
}
@@ -126,7 +127,7 @@ static void render_anim(void){
animation_phase();
}
anim_sleep = timer_read32();
- }
+ }
else {
if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT)
oled_off();
@@ -142,4 +143,4 @@ static void render_anim(void){
void oled_task_user(void) {
render_anim();
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
index 2074c73860..8fe6dedcbd 100644
--- a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c
@@ -195,7 +195,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
}
// Encoder Customization: (*Order-of-Keycode Specific)
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -203,6 +203,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
index 8607c8e4ee..e36839a584 100644
--- a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c
@@ -195,7 +195,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
}
// Encoder Customization: (*Order-of-Keycode Specific)
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -203,6 +203,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/kingly_keys/ropro/keymaps/default/keymap.c b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c
index 1bbe1c2623..91ecbb421e 100644
--- a/keyboards/kingly_keys/ropro/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/ropro/keymaps/default/keymap.c
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
- KC_NO, 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_NO, 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_PGUP, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_HOME, 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_PGDN, KC_DEL, KC_RCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
@@ -67,14 +67,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT(
RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI,
KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL,
- KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS,
KC_HOME, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_WH_L);
@@ -82,4 +82,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_R);
}
}
+ return true;
}
diff --git a/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c
index 0c6db75142..280fe22cc4 100644
--- a/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c
+++ b/keyboards/kingly_keys/ropro/keymaps/jdayton3/keymap.c
@@ -211,7 +211,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_WH_L);
@@ -219,6 +219,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_R);
}
}
+ return true;
}
diff --git a/keyboards/kingly_keys/soap/keymaps/default/keymap.c b/keyboards/kingly_keys/soap/keymaps/default/keymap.c
index 03966e42be..85f3673ea7 100644
--- a/keyboards/kingly_keys/soap/keymaps/default/keymap.c
+++ b/keyboards/kingly_keys/soap/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------'
*/
[BASE] = LAYOUT(
- KC_DEL, KC_UP, KC_ENT, RGB,
+ KC_DEL, KC_UP, KC_ENT, RGB,
KC_LEFT, KC_DOWN, KC_RIGHT, MO(1)
),
@@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------'
*/
[FN] = LAYOUT(
- RGB_HUI, RGB_VAI, RGB_SAI, KC_TR,
+ RGB_HUI, RGB_VAI, RGB_SAI, KC_TR,
RGB_HUD, RGB_VAD, RGB_SAD, KC_TR
)
};
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Rotary Encoder Settings: */
/* - Current Value = Horizontal Scrolling */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_WH_L);
@@ -59,4 +59,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_R);
}
}
+ return true;
}
diff --git a/keyboards/kiwikeebs/macro/macro.c b/keyboards/kiwikeebs/macro/macro.c
index 3d5ab16617..5eb03509e5 100644
--- a/keyboards/kiwikeebs/macro/macro.c
+++ b/keyboards/kiwikeebs/macro/macro.c
@@ -16,7 +16,8 @@
#include "macro.h"
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
@@ -24,4 +25,5 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
tap_code(KC_AUDIO_VOL_DOWN);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/knobgoblin/knobgoblin.c b/keyboards/knobgoblin/knobgoblin.c
index 2f5e02b138..1c66908ef2 100644
--- a/keyboards/knobgoblin/knobgoblin.c
+++ b/keyboards/knobgoblin/knobgoblin.c
@@ -18,8 +18,8 @@
#ifdef ENCODER_ENABLE
/* assign keycodes to the encoder rotation */
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
-
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 1) { /* Bottom encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -34,6 +34,7 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV);
}
}
+ return true;
}
#endif
@@ -44,39 +45,39 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) {
/* byte map for the goblin logo, knob goblin text, and level text */
static void render_goblin_logo(void) {
static const char PROGMEM my_logo[] = {
- 0x00, 0xe0, 0x40, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x10, 0x20, 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x40, 0xe0, 0x00,
- 0x00, 0x03, 0x06, 0x3c, 0x49, 0x91, 0x21, 0x00, 0x40, 0x80, 0x80, 0x80, 0x80, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x00, 0x21, 0x91, 0x49, 0x3c, 0x06, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1f, 0x60, 0x40, 0xc0, 0x06, 0x0e, 0x0f, 0x67, 0x50, 0xc0,
- 0xc0, 0x50, 0x67, 0x0f, 0x0e, 0x06, 0xc0, 0x40, 0x60, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x7b, 0xc7, 0x8e, 0x1e, 0x3e, 0x3e,
- 0x3e, 0x3e, 0x1e, 0x8e, 0xc7, 0x7b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04,
- 0x04, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83,
- 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x06, 0x09, 0x10, 0x00, 0x1f, 0x03, 0x06, 0x0c, 0x1f,
- 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x00, 0x1f, 0x12, 0x12, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x78, 0xfc, 0x84, 0xa4, 0xa4, 0x68, 0x00, 0x78, 0x84, 0x84, 0x84, 0x78, 0x00, 0xfc, 0x94,
- 0x94, 0x68, 0x00, 0xfc, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x00, 0xfc, 0x18, 0x30, 0x60, 0xfc, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00,
- 0x00, 0xf0, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
- 0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0xe0, 0x40, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x08, 0x08, 0x08,
+ 0x08, 0x08, 0x08, 0x10, 0x20, 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x40, 0xe0, 0x00,
+ 0x00, 0x03, 0x06, 0x3c, 0x49, 0x91, 0x21, 0x00, 0x40, 0x80, 0x80, 0x80, 0x80, 0x00, 0x60, 0x00,
+ 0x00, 0x60, 0x00, 0x80, 0x80, 0x80, 0x80, 0x40, 0x00, 0x21, 0x91, 0x49, 0x3c, 0x06, 0x03, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1f, 0x60, 0x40, 0xc0, 0x06, 0x0e, 0x0f, 0x67, 0x50, 0xc0,
+ 0xc0, 0x50, 0x67, 0x0f, 0x0e, 0x06, 0xc0, 0x40, 0x60, 0x1f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x7b, 0xc7, 0x8e, 0x1e, 0x3e, 0x3e,
+ 0x3e, 0x3e, 0x1e, 0x8e, 0xc7, 0x7b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x04,
+ 0x04, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83, 0x03, 0x83, 0x03, 0x03, 0x03, 0x83,
+ 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x83, 0x83, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x06, 0x09, 0x10, 0x00, 0x1f, 0x03, 0x06, 0x0c, 0x1f,
+ 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x00, 0x1f, 0x12, 0x12, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x78, 0xfc, 0x84, 0xa4, 0xa4, 0x68, 0x00, 0x78, 0x84, 0x84, 0x84, 0x78, 0x00, 0xfc, 0x94,
+ 0x94, 0x68, 0x00, 0xfc, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x00, 0xfc, 0x18, 0x30, 0x60, 0xfc, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00,
+ 0x00, 0xf0, 0x00, 0xf0, 0x50, 0x50, 0x50, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x01, 0x02,
+ 0x01, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00
};
oled_write_raw_P(my_logo, sizeof(my_logo));
}
/* text display for layer indication */
__attribute__((weak)) void oled_task_user(void) {
-
+
render_goblin_logo();
-
+
oled_set_cursor(0,11);
-
+
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR(" ONE\n"), false);
diff --git a/keyboards/kyria/keymaps/asapjockey/keymap.c b/keyboards/kyria/keymaps/asapjockey/keymap.c
index 46e70e9e96..9d0d2955e6 100644
--- a/keyboards/kyria/keymaps/asapjockey/keymap.c
+++ b/keyboards/kyria/keymaps/asapjockey/keymap.c
@@ -29,7 +29,7 @@ enum custom_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/*
+/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
@@ -256,7 +256,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case QWERTY:
@@ -308,5 +308,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/benji/keymap.c b/keyboards/kyria/keymaps/benji/keymap.c
index 32a38eb223..2e3e2b1cff 100644
--- a/keyboards/kyria/keymaps/benji/keymap.c
+++ b/keyboards/kyria/keymaps/benji/keymap.c
@@ -210,7 +210,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case _RAISE:
@@ -242,5 +242,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c
index 028d335d9c..c6254c1a52 100644
--- a/keyboards/kyria/keymaps/default/keymap.c
+++ b/keyboards/kyria/keymaps/default/keymap.c
@@ -198,7 +198,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -215,5 +215,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
index ba1b038881..beefe11d74 100644
--- a/keyboards/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -179,7 +179,7 @@ void oled_driver_render_logo(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -195,6 +195,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/kyria/keymaps/ghidalgo93/keymap.c
index de5b93223a..1adbcc6ee7 100644
--- a/keyboards/kyria/keymaps/ghidalgo93/keymap.c
+++ b/keyboards/kyria/keymaps/ghidalgo93/keymap.c
@@ -43,10 +43,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
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_MINS,
- _______, KC_LGUI , KC_LCTL, LT(_LOWER, KC_TAB), LT(_NAV, KC_ENT), KC_BSPC, LT(_RAISE, KC_SPC), KC_RALT, KC_HOME, KC_END
+ _______, KC_LGUI , KC_LCTL, LT(_LOWER, KC_TAB), LT(_NAV, KC_ENT), KC_BSPC, LT(_RAISE, KC_SPC), KC_RALT, KC_HOME, KC_END
),
/*
- * Lower Layer: Number keys, media
+ * Lower Layer: Number keys, media
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | 7 | 8 | 9 | | |
@@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
// /*
-// * Navigation Layer
+// * Navigation Layer
// *
// * ,-------------------------------------------. ,-------------------------------------------.
// * | | | | | | | | home |pg dn |pg up | end | | |
@@ -224,7 +224,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -241,5 +241,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/gotham/keymap.c b/keyboards/kyria/keymaps/gotham/keymap.c
index 572ea067eb..a725e61fe3 100644
--- a/keyboards/kyria/keymaps/gotham/keymap.c
+++ b/keyboards/kyria/keymaps/gotham/keymap.c
@@ -110,7 +110,7 @@ void oled_task_user(void) { render_status(); }
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
encoder_action(get_encoder_mode(true), clockwise);
# ifdef OLED_DRIVER_ENABLE
@@ -122,5 +122,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
oled_on();
# endif
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/j-inc/keymap.c b/keyboards/kyria/keymaps/j-inc/keymap.c
index 77f9d442d3..d842e4c2b9 100644
--- a/keyboards/kyria/keymaps/j-inc/keymap.c
+++ b/keyboards/kyria/keymaps/j-inc/keymap.c
@@ -334,7 +334,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(biton32(layer_state)){
case 1:
if (clockwise) {
@@ -356,7 +356,9 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
+
void matrix_scan_user(void) {
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > 1250) {
diff --git a/keyboards/kyria/keymaps/jhelvy/keymap.c b/keyboards/kyria/keymaps/jhelvy/keymap.c
index e0800dd5ed..371007eeb3 100644
--- a/keyboards/kyria/keymaps/jhelvy/keymap.c
+++ b/keyboards/kyria/keymaps/jhelvy/keymap.c
@@ -170,7 +170,7 @@ void oled_task_user(void) {
}
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(HOTKEYS)) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -198,4 +198,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN);
}
}
+ return true;
}
diff --git a/keyboards/kyria/keymaps/mattir/keymap.c b/keyboards/kyria/keymaps/mattir/keymap.c
index 81a9e1eeb6..0ee0f3d852 100644
--- a/keyboards/kyria/keymaps/mattir/keymap.c
+++ b/keyboards/kyria/keymaps/mattir/keymap.c
@@ -204,7 +204,7 @@ void oled_task_user(void) {
// Layer-specific encoder knob functions
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // left knob
switch (get_highest_layer(layer_state)) {
case QWERTY: // Volume
@@ -287,5 +287,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/pierrec83/encoders.c b/keyboards/kyria/keymaps/pierrec83/encoders.c
index 2497b9eb73..7505925e72 100644
--- a/keyboards/kyria/keymaps/pierrec83/encoders.c
+++ b/keyboards/kyria/keymaps/pierrec83/encoders.c
@@ -3,7 +3,7 @@
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case WORKMAN:
@@ -59,5 +59,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/plattfot/keymap.c b/keyboards/kyria/keymaps/plattfot/keymap.c
index 3bd3489f62..0fb305300e 100644
--- a/keyboards/kyria/keymaps/plattfot/keymap.c
+++ b/keyboards/kyria/keymaps/plattfot/keymap.c
@@ -303,7 +303,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case _LOWER:
@@ -352,6 +352,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/rmw/keymap.c b/keyboards/kyria/keymaps/rmw/keymap.c
index bf04272382..61d66588c6 100644
--- a/keyboards/kyria/keymaps/rmw/keymap.c
+++ b/keyboards/kyria/keymaps/rmw/keymap.c
@@ -19,10 +19,10 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[QWERTY] = LAYOUT_stack(
- KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T,
- OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G,
- TD(FRBK2) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE,
- TO(ADJUST), TD(SGCA), TD(AGC), KC_BSPACE, TD(SHNTC),
+ KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T,
+ OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G,
+ TD(FRBK2) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE,
+ TO(ADJUST), TD(SGCA), TD(AGC), KC_BSPACE, TD(SHNTC),
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOT,
@@ -31,10 +31,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[MINIMAK4] = LAYOUT_stack(
- KC_TAB , KC_Q, KC_W, KC_D, KC_R, KC_K,
- OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G,
- OSM(MOD_LSFT) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE,
- _______, TO(ADJUST), TD(SGCA), KC_BSPACE, TD(SHNTC),
+ KC_TAB , KC_Q, KC_W, KC_D, KC_R, KC_K,
+ OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G,
+ OSM(MOD_LSFT) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE,
+ _______, TO(ADJUST), TD(SGCA), KC_BSPACE, TD(SHNTC),
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
KC_H, LT(JSYM,KC_J), KC_E, KC_L, LT(EDIT,KC_SCLN), KC_QUOT,
@@ -43,75 +43,75 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[NUMPAD] = LAYOUT_stack(
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, TO(QWERTY), _______,
- _______, _______, _______, _______ , _______,
-
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, TO(QWERTY), _______,
+ _______, _______, _______, _______ , _______,
+
_______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______,
- _______, KC_4, KC_5, KC_6, KC_KP_PLUS , _______,
+ _______, KC_4, KC_5, KC_6, KC_KP_PLUS , _______,
_______, TO(EDIT), _______, KC_1, KC_2, KC_3, KC_KP_SLASH, LCTL(KC_RIGHT),
- _______, _______, KC_0, KC_DOT, _______
+ _______, _______, KC_0, KC_DOT, _______
),
[EDIT] = LAYOUT_stack(
- _______, TASK_MAN, _______, SELW_LEFT, SELW_RIGHT, _______,
- _______, _______ , LGUI(KC_GRV), MVW_LEFT, MVW_RIGHT , _______,
- LCTL(KC_LEFT), R_UNDO, R_CUT , R_COPY , R_PASTE, R_REDO , TO(NUMPAD), FORM_GET,
- _______, _______, _______, DEL_WRD, _______,
-
- NEW_TAB , KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______,
- R_HOME , KC_LEFT, KC_DOWN, KC_RIGHT, R_END, _______,
- FORM_PUT, TO(QWERTY), SEL_HOME, S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), SEL_END, _______,
- _______, _______, _______, _______, _______
+ _______, TASK_MAN, _______, SELW_LEFT, SELW_RIGHT, _______,
+ _______, _______ , LGUI(KC_GRV), MVW_LEFT, MVW_RIGHT , _______,
+ LCTL(KC_LEFT), R_UNDO, R_CUT , R_COPY , R_PASTE, R_REDO , TO(NUMPAD), FORM_GET,
+ _______, _______, _______, DEL_WRD, _______,
+
+ NEW_TAB , KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______,
+ R_HOME , KC_LEFT, KC_DOWN, KC_RIGHT, R_END, _______,
+ FORM_PUT, TO(QWERTY), SEL_HOME, S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), SEL_END, _______,
+ _______, _______, _______, _______, _______
),
[ADJUST] = LAYOUT_stack(
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
- TO(QWERTY), TO(EDIT), TO(NUMPAD), TO(JSYM), TO(FSYM), TO(MEDIA),
- DF(MINIMAK4), DF(QWERTY), RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______,
- _______, _______, _______, _______, _______,
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
+ TO(QWERTY), TO(EDIT), TO(NUMPAD), TO(JSYM), TO(FSYM), TO(MEDIA),
+ DF(MINIMAK4), DF(QWERTY), RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______,
+ _______, _______, _______, _______, _______,
- KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
+ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______
),
[FSYM] = LAYOUT_stack(
- _______, _______, _______, _______, _______, _______,
- _______, _______, KC_TILD, KC_EXLM, _______, _______,
- LCTL(KC_RIGHT), _______, TO(QWERTY), _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_TILD, KC_EXLM, _______, _______,
+ LCTL(KC_RIGHT), _______, TO(QWERTY), _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______,
- KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______,
+ KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______,
KC_EQUAL, KC_MINUS, KC_UNDS, KC_PIPE, KC_COLON, KC_DQT,
- _______, _______, _______, KC_PLUS, KC_BSLS, KC_SLSH, _______, _______,
- _______, _______, _______, _______, _______
- ),
-
+ _______, _______, _______, KC_PLUS, KC_BSLS, KC_SLSH, _______, _______,
+ _______, _______, _______, _______, _______
+ ),
+
[JSYM] = LAYOUT_stack(
- _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______,
- _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT,
- _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, _______,
- _______, _______, _______, _______, _______,
+ _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______,
+ _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT,
+ _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, _______,
+ _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
_______, _______, KC_QUES, KC_SLSH, KC_COLON, _______,
- _______, _______, _______, _______, _______, TO(QWERTY), _______, LCTL(KC_LEFT),
+ _______, _______, _______, _______, _______, TO(QWERTY), _______, LCTL(KC_LEFT),
_______, _______, _______, _______, _______
- ),
-
+ ),
+
[MEDIA] = LAYOUT_stack(
- _______, KC_WH_U, KC_WH_L, KC_MS_UP, KC_WH_R, _______,
- _______, KC_WH_D, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______,
- _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______,
- _______, _______, _______, _______, _______,
+ _______, KC_WH_U, KC_WH_L, KC_MS_UP, KC_WH_R, _______,
+ _______, KC_WH_D, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______,
+ _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______,
+ _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______,
- KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE, KC_MRWD, KC_MFFD, _______
+ KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE, KC_MRWD, KC_MFFD, _______
)
};
@@ -136,7 +136,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
#ifdef ENCODER_ENABLE
-void encoder_update_keymap(uint8_t index, bool clockwise) {
+bool encoder_update_keymap(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case EDIT:
@@ -161,6 +161,7 @@ void encoder_update_keymap(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/shinze/keymap.c b/keyboards/kyria/keymaps/shinze/keymap.c
index 720ae7f8a6..29f6dc079f 100644
--- a/keyboards/kyria/keymaps/shinze/keymap.c
+++ b/keyboards/kyria/keymaps/shinze/keymap.c
@@ -226,7 +226,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -243,5 +243,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/thomasbaart/keymap.c b/keyboards/kyria/keymaps/thomasbaart/keymap.c
index 6709cd8672..aed9d9762f 100644
--- a/keyboards/kyria/keymaps/thomasbaart/keymap.c
+++ b/keyboards/kyria/keymaps/thomasbaart/keymap.c
@@ -30,7 +30,7 @@ enum custom_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/*
+/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
@@ -308,7 +308,7 @@ void oled_task_user(void) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (biton32(layer_state)) {
case QWERTY:
@@ -326,7 +326,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
- }
+ }
alt_tab_timer = timer_read();
tap_code16(KC_TAB);
} else {
@@ -354,5 +354,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/kyria/keymaps/winternebs/keymap.c b/keyboards/kyria/keymaps/winternebs/keymap.c
index 60b3464ab3..5a2ea83337 100755
--- a/keyboards/kyria/keymaps/winternebs/keymap.c
+++ b/keyboards/kyria/keymaps/winternebs/keymap.c
@@ -36,13 +36,13 @@ enum layers {
#define RAISE LT(_RAISE, KC_ENT)
#define LOWER MO(_LOWER)
#define HOME_A KC_A
-#define HOME_S KC_S
-#define HOME_H CTL_T(KC_H)
-#define HOME_T SFT_T(KC_T)
-#define HOME_N SFT_T(KC_N)
+#define HOME_S KC_S
+#define HOME_H CTL_T(KC_H)
+#define HOME_T SFT_T(KC_T)
+#define HOME_N SFT_T(KC_N)
#define HOME_E CTL_T(KC_E)
-#define HOME_O KC_O
-#define HOME_I KC_I
+#define HOME_O KC_O
+#define HOME_I KC_I
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
@@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LGUI, KC_LALT, LOWER, KC_SPC, SH_MON, SH_MON, KC_BSPC, RAISE, XXXXXXX, _______
),
/*
- * Lower Layer: NUM/symb
+ * Lower Layer: NUM/symb
*
* ,-------------------------------------------. ,-------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
@@ -169,7 +169,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -186,6 +186,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
#endif
#ifdef OLED_DRIVER_ENABLE
@@ -198,13 +199,13 @@ bool bksp = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u, total: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.key.col + 10 * record->event.key.row);
- #endif
+ #endif
#ifdef OLED_DRIVER_ENABLE
if(record->event.pressed){
uint8_t n = record->event.key.col + 10 * record->event.key.row;
if (n<40) {
left = true;
- }
+ }
else {
right = true;
}
@@ -278,181 +279,181 @@ static void render_anim(void) {
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
{
// 'bongo0', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
-0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
-0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
-0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
-0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
-0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
-0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
-0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
-0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
-0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0x03, 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, 0xf8,
-0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
-0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
+0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
+0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
+0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
+0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
+0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
+0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
+0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
+0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
+0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0x03, 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, 0xf8,
+0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
+0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 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
},
{
// 'bongo1', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 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, 0xc0, 0x40,
-0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0,
-0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58,
-0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20,
-0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28,
-0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03,
-0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 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, 0x01, 0x01,
-0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4,
-0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
-0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07,
-0x1c, 0x70, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
-0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
-0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02,
-0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20,
-0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 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,
-0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
-0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0x03, 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, 0xf8,
-0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
-0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40,
+0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0,
+0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58,
+0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20,
+0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28,
+0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03,
+0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 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, 0x01, 0x01,
+0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4,
+0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
+0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07,
+0x1c, 0x70, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
+0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
+0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02,
+0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20,
+0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 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,
+0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
+0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x02, 0x02, 0x02, 0x03, 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, 0xf8,
+0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
+0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 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
}
};
static const char PROGMEM prep[][ANIM_SIZE] = {
{
// 'bongo2', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
-0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
-0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
-0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
-0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04,
-0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
-0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04,
-0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20,
-0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
-0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e,
-0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 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, 0x01,
-0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
+0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
+0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
+0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
+0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04,
+0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
+0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40,
+0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04,
+0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20,
+0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
+0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e,
+0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 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, 0x01,
+0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
@@ -460,179 +461,179 @@ static void render_anim(void) {
static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = {
{
// 'bongo3', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
-0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
-0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
-0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
-0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
-0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40,
-0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0,
-0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
-0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20,
-0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
-0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f,
-0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
-0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 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, 0x01, 0x01, 0x01, 0x01,
-0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
+0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
+0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
+0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
+0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
+0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40,
+0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0,
+0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
+0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20,
+0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
+0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f,
+0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
+0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 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, 0x01, 0x01, 0x01, 0x01,
+0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{
// 'bongo4', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
-0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
-0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
-0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
-0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04,
-0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
-0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04,
-0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
-0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
-0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e,
-0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8,
-0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
-0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc,
-0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e,
-0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
+0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
+0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
+0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
+0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04,
+0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
+0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04,
+0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
+0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
+0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e,
+0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8,
+0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
+0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc,
+0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e,
+0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
- {
+ {
// 'bongo5', 128x56px
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
-0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
-0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
-0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
-0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
-0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
-0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
-0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0,
-0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
-0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
-0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
-0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f,
-0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
-0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
-0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
-0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01,
-0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8,
-0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
-0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
-0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
-0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 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, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc,
-0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e,
-0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+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, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10,
+0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14,
+0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24,
+0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30,
+0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20,
+0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 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, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39,
+0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01,
+0x06, 0x38, 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, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0,
+0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30,
+0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
+0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10,
+0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f,
+0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18,
+0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10,
+0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40,
+0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01,
+0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8,
+0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10,
+0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00,
+0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10,
+0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 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, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc,
+0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e,
+0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}
};
@@ -642,15 +643,15 @@ static void render_anim(void) {
if(get_current_wpm() <= IDLE_SPEED){
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE);
- }
+ }
else {
// if is true 2 frames in a row make it false;
if(left && !lastl && right && !lastr) {
oled_write_raw_P(tap[2], ANIM_SIZE);
- }
+ }
else if (left && !lastl) {
oled_write_raw_P(tap[0], ANIM_SIZE);
- }
+ }
else if (right && !lastr) {
oled_write_raw_P(tap[1], ANIM_SIZE);
}
@@ -719,7 +720,7 @@ void oled_task_user(void) {
} else {
render_logo();
oled_scroll_left();
-
+
}
}
#endif
diff --git a/keyboards/latinpad/keymaps/default/keymap.c b/keyboards/latinpad/keymaps/default/keymap.c
index 8edc66f0ab..fe0741423c 100644
--- a/keyboards/latinpad/keymaps/default/keymap.c
+++ b/keyboards/latinpad/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
/* Keymap _0: (Base Layer) Default Layer
* .-----------.
- * |PGUP | PGDN|
+ * |PGUP | PGDN|
* |-----------------------.
* | 7 | 8 | 9 | MO1 |
* |-----|-----|-----|-----|
@@ -15,7 +15,7 @@
/* Keymap _1: (Second Layer) second Layer
* .---------------.
- * |NUMLOCK|Calc. |
+ * |NUMLOCK|Calc. |
* |--------------------------------.
* |RGB_TOG|RGB_MOD|RGB_M_K|RGB_M_X |
* |-------|-------|-------|--------|
@@ -52,7 +52,7 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
@@ -66,5 +66,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_BRIGHTNESS_DOWN);
}
}
+ return true;
}
void matrix_init_user(void) { render_logo(); }
diff --git a/keyboards/latinpad/keymaps/via/keymap.c b/keyboards/latinpad/keymaps/via/keymap.c
index c48dd88a81..c196cd485f 100644
--- a/keyboards/latinpad/keymaps/via/keymap.c
+++ b/keyboards/latinpad/keymaps/via/keymap.c
@@ -1,6 +1,6 @@
/* Keymap _0: (Base Layer) Default Layer
* .-----------.
- * |PGUP | PGDN|
+ * |PGUP | PGDN|
* |-----------------------.
* | 7 | 8 | 9 | MO1 |
* |-----|-----|-----|-----|
@@ -13,7 +13,7 @@
*/
/* Keymap _1: (Second Layer) second Layer
* .---------------.
- * |NUMLOCK|Calc. |
+ * |NUMLOCK|Calc. |
* |--------------------------------.
* |RGB_TOG|RGB_MOD|RGB_M_K|RGB_M_X |
* |-------|-------|-------|--------|
@@ -50,7 +50,7 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
@@ -64,5 +64,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_BRIGHTNESS_DOWN);
}
}
+ return true;
}
void matrix_init_user(void) { render_logo(); }
diff --git a/keyboards/latinpadble/keymaps/default/keymap.c b/keyboards/latinpadble/keymaps/default/keymap.c
index e20568540a..7a6e0eda6b 100644
--- a/keyboards/latinpadble/keymaps/default/keymap.c
+++ b/keyboards/latinpadble/keymaps/default/keymap.c
@@ -1,27 +1,27 @@
- /* Copyright 2021 haierwangwei2005
- *
- * 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 .
- */
+ /* Copyright 2021 haierwangwei2005
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_pad(
+ [0] = LAYOUT_pad(
KC_PGUP,
KC_KP_7, KC_KP_8, KC_KP_9, MO(1),
KC_P4, KC_P5, KC_P6, KC_KP_PLUS,
KC_P1, KC_P2, KC_P3, KC_KP_MINUS,
KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER),
- [1] = LAYOUT_pad(
+ [1] = LAYOUT_pad(
KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X,
RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD,
@@ -38,14 +38,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/latinpadble/keymaps/via/keymap.c b/keyboards/latinpadble/keymaps/via/keymap.c
index 45ebdb4936..0a29b04ab3 100644
--- a/keyboards/latinpadble/keymaps/via/keymap.c
+++ b/keyboards/latinpadble/keymaps/via/keymap.c
@@ -1,22 +1,22 @@
- /* Copyright 2021 haierwangwei2005
- *
- * 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 .
- */
+ /* Copyright 2021 haierwangwei2005
+ *
+ * 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 .
+ */
/* Keymap _0: (Base Layer) Default Layer
* .----.
- * |PGUP|
+ * |PGUP|
* |-----------------------.
* | 7 | 8 | 9 | MO1 |
* |-----|-----|-----|-----|
@@ -44,13 +44,13 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_pad(
+ [0] = LAYOUT_pad(
KC_PGUP,
KC_KP_7, KC_KP_8, KC_KP_9, MO(1),
KC_P4, KC_P5, KC_P6, KC_KP_PLUS,
KC_P1, KC_P2, KC_P3, KC_KP_MINUS,
KC_P0, KC_PDOT,KC_DELETE, KC_KP_ENTER),
- [1] = LAYOUT_pad(
+ [1] = LAYOUT_pad(
KC_NUMLOCK,
RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_X,
RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD,
@@ -67,14 +67,15 @@ static void render_logo(void) {
void oled_task_user(void) { render_logo(); }
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
- }
+ }
+ return true;
}
diff --git a/keyboards/lck75/lck75.c b/keyboards/lck75/lck75.c
index 8fc674d03f..caca42678a 100644
--- a/keyboards/lck75/lck75.c
+++ b/keyboards/lck75/lck75.c
@@ -14,7 +14,8 @@
*/
#include "lck75.h"
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+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);
@@ -22,6 +23,7 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#define IDLE_FRAMES 5
diff --git a/keyboards/le_chiffre/keymaps/default/keymap.c b/keyboards/le_chiffre/keymaps/default/keymap.c
index 9ff8fc299e..5d4a4e0f94 100644
--- a/keyboards/le_chiffre/keymaps/default/keymap.c
+++ b/keyboards/le_chiffre/keymaps/default/keymap.c
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -70,6 +70,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#ifdef COMBO_ENABLE
diff --git a/keyboards/le_chiffre/keymaps/via/keymap.c b/keyboards/le_chiffre/keymaps/via/keymap.c
index 485fa1b72e..fcb5463744 100644
--- a/keyboards/le_chiffre/keymaps/via/keymap.c
+++ b/keyboards/le_chiffre/keymaps/via/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MNXT);
@@ -46,6 +46,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MPRV);
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE //Special thanks to Sickbabies for this great OLED widget!
diff --git a/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c
index acb55486a2..397f236890 100644
--- a/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c
+++ b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c
@@ -1,31 +1,32 @@
-/* Copyright 2021 Craig Gardner
- *
- * 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 .
- */
-
+/* Copyright 2021 Craig Gardner
+ *
+ * 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 .
+ */
+
#include QMK_KEYBOARD_H
#define _MAIN 0
-void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
- }
+ }
+ return true;
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //button closest to USB is first
diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c
index e3a2b9db67..da3416087e 100644
--- a/keyboards/lily58/keymaps/chuan/keymap.c
+++ b/keyboards/lily58/keymaps/chuan/keymap.c
@@ -218,7 +218,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
lastIndex = index;
if (clockwise) {
counter++;
@@ -227,4 +227,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
counter--;
tap_code(KC_PGUP);
}
+ return true;
}
diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c
index 0fc1bfb794..e575736c0e 100644
--- a/keyboards/lily58/keymaps/drasbeck/keymap.c
+++ b/keyboards/lily58/keymaps/drasbeck/keymap.c
@@ -1,4 +1,4 @@
-/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
+/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
*
* You are free to:
*
@@ -153,7 +153,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// index 1 == minion side
if (index == 1) {
if (clockwise) {
@@ -162,5 +162,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
#endif
diff --git a/keyboards/lily58/keymaps/lily58l/keymap.c b/keyboards/lily58/keymaps/lily58l/keymap.c
index 7c32dae488..cf1f38d744 100644
--- a/keyboards/lily58/keymaps/lily58l/keymap.c
+++ b/keyboards/lily58/keymaps/lily58l/keymap.c
@@ -291,7 +291,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Rotary encoder related code
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Encoder on master side
if(IS_LAYER_ON(_RAISE)) { // on Raise layer
// Cursor control
@@ -326,5 +326,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
#endif
diff --git a/keyboards/linworks/whale75/keymaps/default/keymap.c b/keyboards/linworks/whale75/keymaps/default/keymap.c
index 0e5f0d7d9c..a2298865ef 100644
--- a/keyboards/linworks/whale75/keymaps/default/keymap.c
+++ b/keyboards/linworks/whale75/keymaps/default/keymap.c
@@ -27,17 +27,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[1] = LAYOUT_all( /* keymap for layer 1 */
- RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPI, RGB_SPI, KC_MPLY,
- 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_PGUP,
- 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_PGDN,
+ RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_SPI, RGB_SPI, KC_MPLY,
+ 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_PGUP,
+ 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_PGDN,
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_END,
+ 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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_TRNS, KC_TRNS, KC_TRNS
),
};
/* Encoder */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/linworks/whale75/keymaps/via/keymap.c b/keyboards/linworks/whale75/keymaps/via/keymap.c
index 43df820a99..3412e8397f 100644
--- a/keyboards/linworks/whale75/keymaps/via/keymap.c
+++ b/keyboards/linworks/whale75/keymaps/via/keymap.c
@@ -27,34 +27,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[1] = LAYOUT_all( /* keymap for layer 1 */
- RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_MPLY,
- 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_PGUP,
- 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_PGDN,
+ RGB_TOG, RGB_VAD, RGB_VAI, BL_DEC, BL_INC, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_RMOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_MPLY,
+ 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_PGUP,
+ 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_PGDN,
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_END,
+ 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_END,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_all( /* keymap for layer 2 */
- 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_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
),
[3] = LAYOUT_all( /* keymap for layer 3 */
- 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_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
),
};
/* Encoder */
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* The first if reads the first encoder, not needed on this board which only features a single one */
if (index == 0) {
/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */
@@ -75,4 +75,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c b/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c
index f785ed97f1..5490156848 100644
--- a/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c
+++ b/keyboards/lizard_trick/tenkey_plusplus/keymaps/default/keymap.c
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code16(KC_VOLU);
@@ -75,4 +75,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(S(KC_TAB));
}
}
+ return true;
}
diff --git a/keyboards/lizard_trick/tenkey_plusplus/keymaps/macro/keymap.c b/keyboards/lizard_trick/tenkey_plusplus/keymaps/macro/keymap.c
index 900bb0a01c..b827b28141 100644
--- a/keyboards/lizard_trick/tenkey_plusplus/keymaps/macro/keymap.c
+++ b/keyboards/lizard_trick/tenkey_plusplus/keymaps/macro/keymap.c
@@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Left Encoder */
if (clockwise) {
tap_code16(KC_VOLU);
@@ -100,4 +100,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(S(KC_TAB));
}
}
+ return true;
}
diff --git a/keyboards/m3n3van/keymaps/matthewdias/keymap.c b/keyboards/m3n3van/keymaps/matthewdias/keymap.c
index 83d7265b09..9ed5028c7c 100644
--- a/keyboards/m3n3van/keymaps/matthewdias/keymap.c
+++ b/keyboards/m3n3van/keymaps/matthewdias/keymap.c
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/m3n3van/keymaps/via/keymap.c b/keyboards/m3n3van/keymaps/via/keymap.c
index 2ef9af90e7..5dcb23b1cf 100644
--- a/keyboards/m3n3van/keymaps/via/keymap.c
+++ b/keyboards/m3n3van/keymaps/via/keymap.c
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -55,4 +55,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/marksard/leftover30/keymaps/default/keymap.c b/keyboards/marksard/leftover30/keymaps/default/keymap.c
index b8d9973330..c0779cfa06 100644
--- a/keyboards/marksard/leftover30/keymaps/default/keymap.c
+++ b/keyboards/marksard/leftover30/keymaps/default/keymap.c
@@ -135,7 +135,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return result;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (IS_LAYER_ON(_ADJUST)) {
if (clockwise) {
@@ -150,8 +150,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code((clockwise == true) ? KC_WH_D : KC_WH_U);
}
-
}
+ return true;
}
// for exsample customize of LED inducator
diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c
index 37c558db72..21bbe5d68e 100644
--- a/keyboards/maxr1998/pulse4k/pulse4k.c
+++ b/keyboards/maxr1998/pulse4k/pulse4k.c
@@ -36,7 +36,8 @@ void process_combo_event(uint16_t combo_index, bool pressed) {
}
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) {
if (led_adjust_active) {
if (clockwise) {
@@ -54,6 +55,7 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
}
} else encoder_two_update(clockwise);
}
+ return true;
}
__attribute__((weak)) void encoder_one_update(bool clockwise) {
diff --git a/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c b/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c
index d3ab5ed110..fb2d43ca96 100644
--- a/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c
@@ -243,7 +243,7 @@ bool led_update_keymap(led_t led_state) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -265,6 +265,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
#endif
diff --git a/keyboards/mechlovin/adelais/keymaps/default/keymap.c b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
index 19c298d4a4..2a38663ed2 100644
--- a/keyboards/mechlovin/adelais/keymaps/default/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/default/keymap.c
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -54,6 +54,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
- #endif
\ No newline at end of file
+ #endif
diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
index 2ebd6a1206..6ab566e1c3 100644
--- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -66,6 +66,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
- #endif
\ No newline at end of file
+ #endif
diff --git a/keyboards/mechlovin/hex6c/keymaps/default/keymap.c b/keyboards/mechlovin/hex6c/keymaps/default/keymap.c
index c8ff6dad1b..fb1f82247c 100644
--- a/keyboards/mechlovin/hex6c/keymaps/default/keymap.c
+++ b/keyboards/mechlovin/hex6c/keymaps/default/keymap.c
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -36,5 +36,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/mechlovin/hex6c/keymaps/via/keymap.c b/keyboards/mechlovin/hex6c/keymaps/via/keymap.c
index 6fa6045a62..eece4752b6 100644
--- a/keyboards/mechlovin/hex6c/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/hex6c/keymaps/via/keymap.c
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -64,5 +64,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c
index 8f1896e811..51034d3940 100644
--- a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c
@@ -1,17 +1,17 @@
-/* Copyright 2021 Kyle McCreery
- *
- * 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 .
+/* Copyright 2021 Kyle McCreery
+ *
+ * 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 .
*/
#include QMK_KEYBOARD_H
@@ -38,7 +38,7 @@ uint8_t current_tap_frame = 0;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_MUTE,
- 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ),
@@ -47,26 +47,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ),
-
+
[2] = LAYOUT_all(
- KC_TRNS,
+ KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_CAPS, 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 ),
-
+
[3] = LAYOUT_all(
- 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 )
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
@@ -76,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
#endif
@@ -164,7 +165,7 @@ static void render_anim(void) {
oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE);
}
}
-
+
if (get_current_wpm() != 000) {
oled_on();
@@ -194,4 +195,4 @@ void oled_task_user(void) {
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/mechwild/mercutio/keymaps/default/keymap.c b/keyboards/mechwild/mercutio/keymaps/default/keymap.c
index 79aa67e051..519e182512 100644
--- a/keyboards/mechwild/mercutio/keymaps/default/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/default/keymap.c
@@ -1,17 +1,17 @@
-/* Copyright 2021 Kyle McCreery
- *
- * 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 .
+/* Copyright 2021 Kyle McCreery
+ *
+ * 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 .
*/
#include QMK_KEYBOARD_H
@@ -19,7 +19,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_MUTE,
- 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ),
@@ -28,26 +28,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ),
-
+
[2] = LAYOUT_all(
- KC_TRNS,
+ KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_CAPS, 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 ),
-
+
[3] = LAYOUT_all(
- 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 )
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
@@ -57,6 +57,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
#endif
@@ -67,7 +68,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
static void render_name(void) {
static const char PROGMEM mercutio_name[] = {
- 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
+ 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
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
@@ -76,6 +77,6 @@ static void render_name(void) {
}
void oled_task_user(void) {
- render_name();
+ render_name();
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
index b5040244fe..ea1cd1525d 100755
--- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c
@@ -1,17 +1,17 @@
-/* Copyright 2021 Kyle McCreery
- *
- * 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 .
+/* Copyright 2021 Kyle McCreery
+ *
+ * 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 .
*/
@@ -20,7 +20,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_MUTE,
- 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ),
@@ -29,27 +29,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ),
-
+
[2] = LAYOUT_all(
- KC_TRNS,
+ KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_CAPS, 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 ),
-
+
[3] = LAYOUT_all(
- 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 )
};
#ifdef ENCODER_ENABLE // Encoder Functionality
uint8_t selected_layer = 0;
- void encoder_update_user(uint8_t index, bool clockwise) {
+ bool encoder_update_user(uint8_t index, bool clockwise) {
#ifdef OLED_DRIVER_ENABLE
oled_clear();
oled_render();
@@ -72,6 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
}
}
+ return true;
}
#endif
@@ -83,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool clear_screen = false; // used to manage singular screen clears to prevent display glitch
static void render_name(void) { // Render Mercutio Script Text
static const char PROGMEM mercutio_name[] = {
- 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
+ 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
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
@@ -107,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
void oled_task_user(void) {
-
+
if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) {
render_name();
clear_screen = true;
diff --git a/keyboards/mechwild/mercutio/keymaps/via/keymap.c b/keyboards/mechwild/mercutio/keymaps/via/keymap.c
index 79aa67e051..519e182512 100755
--- a/keyboards/mechwild/mercutio/keymaps/via/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/via/keymap.c
@@ -1,17 +1,17 @@
-/* Copyright 2021 Kyle McCreery
- *
- * 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 .
+/* Copyright 2021 Kyle McCreery
+ *
+ * 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 .
*/
#include QMK_KEYBOARD_H
@@ -19,7 +19,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_MUTE,
- 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT,
KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ),
@@ -28,26 +28,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP,
KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ),
-
+
[2] = LAYOUT_all(
- KC_TRNS,
+ KC_TRNS,
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_CAPS, 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 ),
-
+
[3] = LAYOUT_all(
- 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 )
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (index) {
case 0:
if (clockwise) {
@@ -57,6 +57,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
#endif
@@ -67,7 +68,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
static void render_name(void) {
static const char PROGMEM mercutio_name[] = {
- 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
+ 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6,
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
@@ -76,6 +77,6 @@ static void render_name(void) {
}
void oled_task_user(void) {
- render_name();
+ render_name();
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/merge/iso_macro/keymaps/default/keymap.c b/keyboards/merge/iso_macro/keymaps/default/keymap.c
index a86d35502c..16c0deba72 100644
--- a/keyboards/merge/iso_macro/keymaps/default/keymap.c
+++ b/keyboards/merge/iso_macro/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
-/* Copyright 2021 duoshock
- *
- * 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 .
- */
+/* Copyright 2021 duoshock
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Encdoer A
if (clockwise) {
tap_code(KC_UP);
@@ -46,4 +46,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/merge/iso_macro/keymaps/via/keymap.c b/keyboards/merge/iso_macro/keymaps/via/keymap.c
index b97e79acf1..b8cf05be39 100644
--- a/keyboards/merge/iso_macro/keymaps/via/keymap.c
+++ b/keyboards/merge/iso_macro/keymaps/via/keymap.c
@@ -1,18 +1,18 @@
- /* Copyright 2021 duoshock
- *
- * 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 .
- */
+ /* Copyright 2021 duoshock
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Encoder A
if (clockwise) {
backlight_increase();
@@ -61,4 +61,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/merge/uc1/keymaps/default/keymap.c b/keyboards/merge/uc1/keymaps/default/keymap.c
index 5a19a9de78..a4556a3f4a 100644
--- a/keyboards/merge/uc1/keymaps/default/keymap.c
+++ b/keyboards/merge/uc1/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
-/* Copyright 2021 duoshock
- *
- * 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 .
- */
+/* Copyright 2021 duoshock
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -37,4 +37,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/merge/uc1/keymaps/via/keymap.c b/keyboards/merge/uc1/keymaps/via/keymap.c
index 6bc732e618..97f55f87f2 100644
--- a/keyboards/merge/uc1/keymaps/via/keymap.c
+++ b/keyboards/merge/uc1/keymaps/via/keymap.c
@@ -1,18 +1,18 @@
- /* Copyright 2021 duoshock
- *
- * 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 .
- */
+ /* Copyright 2021 duoshock
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -50,4 +50,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/merge/um70/keymaps/default/keymap.c b/keyboards/merge/um70/keymaps/default/keymap.c
index 1025d37a92..d16e737b4e 100644
--- a/keyboards/merge/um70/keymaps/default/keymap.c
+++ b/keyboards/merge/um70/keymaps/default/keymap.c
@@ -1,16 +1,16 @@
-/* Copyright 2021 duoshock
- *
- * 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
+/* Copyright 2021 duoshock
+ *
+ * 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 .
*/
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .---. |-------------------------. '---------------------------------| |---|
* |M0 | |CapsL | A| S| D| F| G| | H| J| K| L| ;| :| Retn | |End|
* |---| |----------------------------. '--------------------------------| .---. '---'
- * |M1 | |Shft | Z| X| C| V| B| | N| M| ,| ,| /| Shift| |Up |
+ * |M1 | |Shft | Z| X| C| V| B| | N| M| ,| ,| /| Shift| |Up |
* |---| |----------------------------| |---------------------------' .-----------.
* |M2 | |Ctl |Gui |Alt |Fn0 |Space | | Space| Alt| Ctl| |Lef|Dow|Rig|
* '---' '----------------------------' '-----------------------' '-----------'
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Master Left */
if (clockwise) {
tap_code(KC_VOLU);
@@ -85,6 +85,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
@@ -104,8 +105,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192,224,224,224,224,224,224,224,224,224,224,224,224,224,224,192,192,128,128,192,192,224,224,224,224,224,224,224,224,192,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,255,255,255,255,255,255, 15, 3, 1, 0, 1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0,254,254,254,252,248,224,192,128,224,248,252,254,254,254, 0, 0,128,128,128,128,128,128, 0, 14, 14, 14, 14,142,238,254,254,126, 30, 4,224,248,252, 62, 30, 14, 14, 14, 30, 62,252,248,240, 0, 0, 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,255,255,255,255,255,255,240,192,128, 0,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 63, 63,124,112,112,112,112,124, 63, 63, 15, 0, 0, 0,127,127,127, 0, 1, 7, 15, 15, 7, 1, 0,127,127,127, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0,112,124,126, 63, 15, 3, 1, 0, 0, 0, 15, 31, 63,124,120,112,112,112,120,124, 63, 31, 15, 0, 0, 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,255,255,255,255,255,255, 15, 3, 1, 0, 1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0,254,254,254,252,248,224,192,128,224,248,252,254,254,254, 0, 0,128,128,128,128,128,128, 0, 14, 14, 14, 14,142,238,254,254,126, 30, 4,224,248,252, 62, 30, 14, 14, 14, 30, 62,252,248,240, 0, 0, 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,255,255,255,255,255,255,240,192,128, 0,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 63, 63,124,112,112,112,112,124, 63, 63, 15, 0, 0, 0,127,127,127, 0, 1, 7, 15, 15, 7, 1, 0,127,127,127, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0,112,124,126, 63, 15, 3, 1, 0, 0, 0, 15, 31, 63,124,120,112,112,112,120,124, 63, 31, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 1, 1, 3, 3, 7, 7, 7, 7, 7, 7, 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, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
@@ -114,11 +115,11 @@ static void render_logo(void) {
// 32 * 18 Merge logos
static const char PROGMEM merge_logo[] = {
- 0xf8, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0e,
- 0x06, 0x04, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0,
- 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0,
- 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x0f,
- 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01,
+ 0xf8, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0e,
+ 0x06, 0x04, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0,
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0,
+ 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x0f,
+ 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01,
0x01, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00
};
@@ -179,4 +180,4 @@ void oled_task_user(void) {
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/merge/um70/keymaps/via/keymap.c b/keyboards/merge/um70/keymaps/via/keymap.c
index e71af2d32d..59483e64a4 100644
--- a/keyboards/merge/um70/keymaps/via/keymap.c
+++ b/keyboards/merge/um70/keymaps/via/keymap.c
@@ -1,16 +1,16 @@
-/* Copyright 2021 duoshock
- *
- * 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
+/* Copyright 2021 duoshock
+ *
+ * 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 .
*/
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* .---. |-------------------------. '---------------------------------| |---|
* |M0 | |CapsL | A| S| D| F| G| | H| J| K| L| ;| :| Retn | |End|
* |---| |----------------------------. '--------------------------------| .---. '---'
- * |M1 | |Shft | Z| X| C| V| B| | N| M| ,| ,| /| Shift| |Up |
+ * |M1 | |Shft | Z| X| C| V| B| | N| M| ,| ,| /| Shift| |Up |
* |---| |----------------------------| |---------------------------' .-----------.
* |M2 | |Ctl |Gui |Alt |Fn0 |Space | | Space| Alt| Ctl| |Lef|Dow|Rig|
* '---' '----------------------------' '-----------------------' '-----------'
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Master Left */
if (clockwise) {
tap_code(KC_VOLU);
@@ -85,6 +85,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
@@ -104,8 +105,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192,224,224,224,224,224,224,224,224,224,224,224,224,224,224,192,192,128,128,192,192,224,224,224,224,224,224,224,224,192,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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,255,255,255,255,255,255, 15, 3, 1, 0, 1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0,254,254,254,252,248,224,192,128,224,248,252,254,254,254, 0, 0,128,128,128,128,128,128, 0, 14, 14, 14, 14,142,238,254,254,126, 30, 4,224,248,252, 62, 30, 14, 14, 14, 30, 62,252,248,240, 0, 0, 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,255,255,255,255,255,255,240,192,128, 0,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 63, 63,124,112,112,112,112,124, 63, 63, 15, 0, 0, 0,127,127,127, 0, 1, 7, 15, 15, 7, 1, 0,127,127,127, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0,112,124,126, 63, 15, 3, 1, 0, 0, 0, 15, 31, 63,124,120,112,112,112,120,124, 63, 31, 15, 0, 0, 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,255,255,255,255,255,255, 15, 3, 1, 0, 1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0, 0, 0, 0,254,254,254, 0, 0, 0,254,254,254,252,248,224,192,128,224,248,252,254,254,254, 0, 0,128,128,128,128,128,128, 0, 14, 14, 14, 14,142,238,254,254,126, 30, 4,224,248,252, 62, 30, 14, 14, 14, 30, 62,252,248,240, 0, 0, 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,255,255,255,255,255,255,240,192,128, 0,128,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 63, 63,124,112,112,112,112,124, 63, 63, 15, 0, 0, 0,127,127,127, 0, 1, 7, 15, 15, 7, 1, 0,127,127,127, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0,112,124,126, 63, 15, 3, 1, 0, 0, 0, 15, 31, 63,124,120,112,112,112,120,124, 63, 31, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 1, 1, 3, 3, 7, 7, 7, 7, 7, 7, 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, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
@@ -114,11 +115,11 @@ static void render_logo(void) {
// 32 * 18 Merge logos
static const char PROGMEM merge_logo[] = {
- 0xf8, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0e,
- 0x06, 0x04, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0,
- 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0,
- 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x0f,
- 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01,
+ 0xf8, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0e,
+ 0x06, 0x04, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0,
+ 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0,
+ 0x80, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x0f,
+ 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01,
0x01, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00
};
diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c
index af6d42a54e..16aea12594 100644
--- a/keyboards/metamechs/timberwolf/timberwolf.c
+++ b/keyboards/metamechs/timberwolf/timberwolf.c
@@ -28,11 +28,12 @@ bool led_update_kb(led_t led_state) {
return runDefault;
}
-__attribute__((weak))
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/mexsistor/ludmila/keymaps/default/keymap.c b/keyboards/mexsistor/ludmila/keymaps/default/keymap.c
index ecb66d5df3..e1aaddadd1 100644
--- a/keyboards/mexsistor/ludmila/keymaps/default/keymap.c
+++ b/keyboards/mexsistor/ludmila/keymaps/default/keymap.c
@@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -38,4 +38,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/millipad/keymaps/default/keymap.c b/keyboards/millipad/keymaps/default/keymap.c
index 0fd145dd09..ae6e374908 100644
--- a/keyboards/millipad/keymaps/default/keymap.c
+++ b/keyboards/millipad/keymaps/default/keymap.c
@@ -22,7 +22,7 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
+
[_BASE] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12
@@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -38,4 +38,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/minimacro5/keymaps/default/keymap.c b/keyboards/minimacro5/keymaps/default/keymap.c
index acd7f32831..d2f2910d75 100644
--- a/keyboards/minimacro5/keymaps/default/keymap.c
+++ b/keyboards/minimacro5/keymaps/default/keymap.c
@@ -4,7 +4,7 @@ enum layers {
_MAIN,
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder*/
if (clockwise) {
tap_code(KC_1);
@@ -36,6 +36,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_0);
}
}
+ return true;
}
//
diff --git a/keyboards/minimacro5/keymaps/kabraxcis/keymap.c b/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
index a65bc9ff4a..6b7026ce20 100644
--- a/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
+++ b/keyboards/minimacro5/keymaps/kabraxcis/keymap.c
@@ -20,7 +20,7 @@ enum layers {
_MAIN,
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder*/
if (clockwise) {
tap_code(KC_VOLU);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
//
diff --git a/keyboards/minimacro5/keymaps/media/keymap.c b/keyboards/minimacro5/keymaps/media/keymap.c
index f36954b074..9f21838876 100644
--- a/keyboards/minimacro5/keymaps/media/keymap.c
+++ b/keyboards/minimacro5/keymaps/media/keymap.c
@@ -2,7 +2,7 @@
#define _MAIN 0
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder*/
if (clockwise) {
tap_code(KC_VOLU);
@@ -34,6 +34,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_0);
}
}
+ return true;
}
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first
diff --git a/keyboards/minimacro5/keymaps/voaraq/keymap.c b/keyboards/minimacro5/keymaps/voaraq/keymap.c
index e0dca9777b..9af37167dc 100644
--- a/keyboards/minimacro5/keymaps/voaraq/keymap.c
+++ b/keyboards/minimacro5/keymaps/voaraq/keymap.c
@@ -20,7 +20,7 @@ enum layers {
_MAIN,
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder*/
if (clockwise) {
tap_code(KC_1);
@@ -52,6 +52,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
//
diff --git a/keyboards/misonoworks/karina/keymaps/default/keymap.c b/keyboards/misonoworks/karina/keymaps/default/keymap.c
index 47179fb835..74c0324fe7 100644
--- a/keyboards/misonoworks/karina/keymaps/default/keymap.c
+++ b/keyboards/misonoworks/karina/keymaps/default/keymap.c
@@ -26,26 +26,26 @@ enum layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[DEFAULT] = LAYOUT(
- KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MUTE,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MUTE,
KC_LALT, MO(SUPER), KC_SPC, KC_BSPC, MO(META), KC_LCTL),
[SUPER] = LAYOUT(
- KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
- KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN,
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
+ KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN,
KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_BSLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS),
-
+
[META] = LAYOUT(
- KC_NUMLOCK, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC,
- KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_P2, KC_P0, KC_P1, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_NUMLOCK, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC,
+ KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_P2, KC_P0, KC_P1, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, RGB_MOD)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_PGUP);
@@ -60,5 +60,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
-
diff --git a/keyboards/misonoworks/karina/keymaps/voltex/keymap.c b/keyboards/misonoworks/karina/keymaps/voltex/keymap.c
index 00361602dd..80fc13a579 100644
--- a/keyboards/misonoworks/karina/keymaps/voltex/keymap.c
+++ b/keyboards/misonoworks/karina/keymaps/voltex/keymap.c
@@ -26,26 +26,26 @@ enum layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[DEFAULT] = LAYOUT(
- KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
+ KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_TRNS,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_TRNS,
KC_LALT, MO(SUPER), KC_SPC, KC_BSPC, MO(META), KC_LCTL),
[SUPER] = LAYOUT(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
- KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN,
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
+ KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN,
KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_BSLS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS),
-
+
[META] = LAYOUT(
- KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC,
- KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_KP_2, KC_KP_0, KC_KP_1, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
+ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC,
+ KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_KP_2, KC_KP_0, KC_KP_1, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, RGB_MOD)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_LEFT);
@@ -60,5 +60,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_D);
}
}
+ return true;
}
-
diff --git a/keyboards/mixi/keymaps/default/keymap.c b/keyboards/mixi/keymaps/default/keymap.c
index 21c3c669a0..916bd5e3d0 100644
--- a/keyboards/mixi/keymaps/default/keymap.c
+++ b/keyboards/mixi/keymaps/default/keymap.c
@@ -17,8 +17,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[0] =
LAYOUT(
- KC_MUTE, KC_MPLY, MO(2) ,
- KC_MPRV, KC_UP , KC_MNXT,
+ KC_MUTE, KC_MPLY, MO(2) ,
+ KC_MPRV, KC_UP , KC_MNXT,
KC_LEFT, KC_DOWN , KC_RGHT
),
@@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[2] =
LAYOUT(
- KC_NO , KC_NO, KC_TRNS,
- EEP_RST, RESET, DEBUG ,
+ KC_NO , KC_NO, KC_TRNS,
+ EEP_RST, RESET, DEBUG ,
KC_NO , KC_NO, KC_NO
)
@@ -96,7 +96,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
uint8_t selected_layer = 0;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (layer_state_is(2)) {
if (clockwise) {
@@ -114,4 +114,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/mixi/keymaps/via/keymap.c b/keyboards/mixi/keymaps/via/keymap.c
index 4ffaf111dc..5eb9e12365 100644
--- a/keyboards/mixi/keymaps/via/keymap.c
+++ b/keyboards/mixi/keymaps/via/keymap.c
@@ -17,8 +17,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[0] =
LAYOUT(
- KC_MUTE, KC_MPLY, MO(2) ,
- KC_MPRV, KC_UP , KC_MNXT,
+ KC_MUTE, KC_MPLY, MO(2) ,
+ KC_MPRV, KC_UP , KC_MNXT,
KC_LEFT, KC_DOWN , KC_RGHT
),
@@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[2] =
LAYOUT(
- KC_NO , KC_NO, KC_TRNS,
- EEP_RST, RESET, DEBUG ,
+ KC_NO , KC_NO, KC_TRNS,
+ EEP_RST, RESET, DEBUG ,
KC_NO , KC_NO, KC_NO
),
@@ -113,7 +113,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
uint8_t selected_layer = 0;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (layer_state_is(2)) {
if (clockwise) {
@@ -131,4 +131,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/monarch/keymaps/default/keymap.c b/keyboards/monarch/keymaps/default/keymap.c
index e4d4e9ef35..fb480b8a7f 100644
--- a/keyboards/monarch/keymaps/default/keymap.c
+++ b/keyboards/monarch/keymaps/default/keymap.c
@@ -34,10 +34,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/monarch/keymaps/iso/keymap.c b/keyboards/monarch/keymaps/iso/keymap.c
index 71f02675eb..2a6ea3a340 100644
--- a/keyboards/monarch/keymaps/iso/keymap.c
+++ b/keyboards/monarch/keymaps/iso/keymap.c
@@ -34,10 +34,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/monarch/keymaps/via/keymap.c b/keyboards/monarch/keymaps/via/keymap.c
index 1f14b195dc..079ff65a6b 100644
--- a/keyboards/monarch/keymaps/via/keymap.c
+++ b/keyboards/monarch/keymaps/via/keymap.c
@@ -76,7 +76,7 @@ void matrix_scan_user(void) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
encoder_cw.pressed = true;
encoder_cw.time = (timer_read() | 1);
@@ -86,4 +86,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
encoder_ccw.time = (timer_read() | 1);
action_exec(encoder_ccw);
}
+ return true;
}
diff --git a/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c
index be038b1f53..1dd4bec95f 100644
--- a/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c
+++ b/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c
@@ -93,10 +93,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(S(KC_VOLD));
} else {
tap_code16(KC_VOLU);
}
+ return true;
}
diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c
index ee15a60623..ab2b52a72d 100644
--- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c
+++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c
@@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)){
case _BASE:
if (clockwise) {
@@ -71,6 +71,7 @@ case _BASE:
}
break;
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
@@ -109,4 +110,3 @@ void oled_task_user(void) {
}
#endif
-
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c
index be038b1f53..1dd4bec95f 100644
--- a/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c
+++ b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c
@@ -93,10 +93,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(S(KC_VOLD));
} else {
tap_code16(KC_VOLU);
}
+ return true;
}
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c
index a0c3ab6395..b6f5dc7ddc 100644
--- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c
+++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c
@@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch(get_highest_layer(layer_state)){
case _BASE:
if (clockwise) {
@@ -80,6 +80,7 @@ case _DEL:
}
break;
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c
index 325036231d..85eb73cc55 100644
--- a/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c
+++ b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c
@@ -109,10 +109,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(S(KC_VOLD));
} else {
tap_code16(KC_VOLU);
}
+ return true;
}
diff --git a/keyboards/murcielago/rev1/keymaps/default/keymap.c b/keyboards/murcielago/rev1/keymaps/default/keymap.c
index 9837fcff41..b9a4e9f481 100644
--- a/keyboards/murcielago/rev1/keymaps/default/keymap.c
+++ b/keyboards/murcielago/rev1/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------|
* | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft |
* `------------------------------------------------' `------------------------------------------------'
- * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play |
+ * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play |
* `----------------------------------' `----------------------------------'
*/
[BASE] = LAYOUT( /* qwerty */
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NAV] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX
),
@@ -79,11 +79,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SYM] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
XXXXXXX, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX,
- KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX,
+ KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX,
XXXXXXX, XXXXXXX, KC_GRV, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, XXXXXXX,
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, XXXXXXX, XXXXXXX, KC_NLCK
),
-
+
/* FN - one-shot access to F-keys with modifiers
* ,-----------------------------------------. ,-----------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11|
@@ -100,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FN] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
C(KC_F12), C(KC_F1),C(KC_F2),C(KC_F3),C(KC_F4),C(KC_F5), C(KC_F6),C(KC_F7),C(KC_F8),C(KC_F9),C(KC_F10),C(KC_F11),
- A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11),
+ A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _NAV ... _SYM:
if (index == 0 || index == 1) { /* Left or right encoder */
@@ -122,4 +122,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/murcielago/rev1/keymaps/via/keymap.c b/keyboards/murcielago/rev1/keymaps/via/keymap.c
index 9837fcff41..b9a4e9f481 100644
--- a/keyboards/murcielago/rev1/keymaps/via/keymap.c
+++ b/keyboards/murcielago/rev1/keymaps/via/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------|
* | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft |
* `------------------------------------------------' `------------------------------------------------'
- * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play |
+ * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play |
* `----------------------------------' `----------------------------------'
*/
[BASE] = LAYOUT( /* qwerty */
@@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NAV] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX
),
@@ -79,11 +79,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SYM] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
XXXXXXX, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX,
- KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX,
+ KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX,
XXXXXXX, XXXXXXX, KC_GRV, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, XXXXXXX,
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, XXXXXXX, XXXXXXX, KC_NLCK
),
-
+
/* FN - one-shot access to F-keys with modifiers
* ,-----------------------------------------. ,-----------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11|
@@ -100,13 +100,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_FN] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
C(KC_F12), C(KC_F1),C(KC_F2),C(KC_F3),C(KC_F4),C(KC_F5), C(KC_F6),C(KC_F7),C(KC_F8),C(KC_F9),C(KC_F10),C(KC_F11),
- A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11),
+ A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _NAV ... _SYM:
if (index == 0 || index == 1) { /* Left or right encoder */
@@ -122,4 +122,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/ncc1701kb/keymaps/brushsize/keymap.c b/keyboards/ncc1701kb/keymaps/brushsize/keymap.c
index 4150e70997..0cc21b7c34 100644
--- a/keyboards/ncc1701kb/keymaps/brushsize/keymap.c
+++ b/keyboards/ncc1701kb/keymaps/brushsize/keymap.c
@@ -6,9 +6,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------.
* | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (Brush size)
* |-------+-------+-------|
- * | STOP | PLAY | MEDIA |
+ * | STOP | PLAY | MEDIA |
* |-------+-------+-------|
- * | CALC | MAIL | PC/FN |
+ * | CALC | MAIL | PC/FN |
* `-----------------------'
*/
[0] = LAYOUT(
@@ -34,18 +34,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_RBRC);
} else {
tap_code(KC_LBRC);
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_RBRC);
} else {
tap_code(KC_LBRC);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/ncc1701kb/keymaps/default/keymap.c b/keyboards/ncc1701kb/keymaps/default/keymap.c
index a3e3d819fd..91158f12d5 100644
--- a/keyboards/ncc1701kb/keymaps/default/keymap.c
+++ b/keyboards/ncc1701kb/keymaps/default/keymap.c
@@ -6,9 +6,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------.
* | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (VOLUME CONTROL)
* |-------+-------+-------|
- * | STOP | PLAY | MEDIA |
+ * | STOP | PLAY | MEDIA |
* |-------+-------+-------|
- * | CALC | MAIL | PC/FN |
+ * | CALC | MAIL | PC/FN |
* `-----------------------'
*/
[0] = LAYOUT(
@@ -34,18 +34,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
-}
\ No newline at end of file
+ return true;
+}
diff --git a/keyboards/neopad/rev1/keymaps/default/keymap.c b/keyboards/neopad/rev1/keymaps/default/keymap.c
index 061e26d43e..08227c84f9 100755
--- a/keyboards/neopad/rev1/keymaps/default/keymap.c
+++ b/keyboards/neopad/rev1/keymaps/default/keymap.c
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* LEFT ENCODER */
switch (get_highest_layer(layer_state)) {
case 0:
@@ -150,4 +150,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/nightingale_studios/hailey/keymaps/default/keymap.c b/keyboards/nightingale_studios/hailey/keymaps/default/keymap.c
index 062c51aab4..695937a959 100644
--- a/keyboards/nightingale_studios/hailey/keymaps/default/keymap.c
+++ b/keyboards/nightingale_studios/hailey/keymaps/default/keymap.c
@@ -37,10 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/nightingale_studios/hailey/keymaps/via/keymap.c b/keyboards/nightingale_studios/hailey/keymaps/via/keymap.c
index 0b7e0903e7..71283252d0 100644
--- a/keyboards/nightingale_studios/hailey/keymaps/via/keymap.c
+++ b/keyboards/nightingale_studios/hailey/keymaps/via/keymap.c
@@ -37,10 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/nightly_boards/adellein/adellein.c b/keyboards/nightly_boards/adellein/adellein.c
index eb97716627..8ae826d49e 100644
--- a/keyboards/nightly_boards/adellein/adellein.c
+++ b/keyboards/nightly_boards/adellein/adellein.c
@@ -21,7 +21,8 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+// if (!encoder_update_user(index, clockwise)) return false;
encoder_action_register(index, clockwise);
- // encoder_update_user(index, clockwise);
-};
\ No newline at end of file
+ return true;
+};
diff --git a/keyboards/nightly_boards/n40_o/n40_o.c b/keyboards/nightly_boards/n40_o/n40_o.c
index a91a0716b3..060daaa4b2 100644
--- a/keyboards/nightly_boards/n40_o/n40_o.c
+++ b/keyboards/nightly_boards/n40_o/n40_o.c
@@ -21,7 +21,8 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+// if (!encoder_update_user(index, clockwise)) return false;
encoder_action_register(index, clockwise);
- // encoder_update_user(index, clockwise);
-};
\ No newline at end of file
+ return true;
+};
diff --git a/keyboards/nightly_boards/n60_s/n60_s.c b/keyboards/nightly_boards/n60_s/n60_s.c
index e762fa6d6d..dd0d23425b 100644
--- a/keyboards/nightly_boards/n60_s/n60_s.c
+++ b/keyboards/nightly_boards/n60_s/n60_s.c
@@ -21,7 +21,8 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+// if (!encoder_update_user(index, clockwise)) return false;
encoder_action_register(index, clockwise);
- // encoder_update_user(index, clockwise);
+ return true;
};
diff --git a/keyboards/nightly_boards/octopad/octopad.c b/keyboards/nightly_boards/octopad/octopad.c
index 9dd9b72a15..e05782677e 100644
--- a/keyboards/nightly_boards/octopad/octopad.c
+++ b/keyboards/nightly_boards/octopad/octopad.c
@@ -21,7 +21,8 @@ void matrix_scan_kb(void) {
matrix_scan_user();
}
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+// if (!encoder_update_user(index, clockwise)) return false;
encoder_action_register(index, clockwise);
- // encoder_update_user(index, clockwise);
-};
\ No newline at end of file
+ return true;
+};
diff --git a/keyboards/np12/keymaps/default/keymap.c b/keyboards/np12/keymaps/default/keymap.c
index 4a02b1d3ad..f960573098 100644
--- a/keyboards/np12/keymaps/default/keymap.c
+++ b/keyboards/np12/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
- /* Copyright 2021 nut1414
- *
- * 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
+ /* Copyright 2021 nut1414
+ *
+ * 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 .
- */
+ */
#include QMK_KEYBOARD_H
@@ -22,39 +22,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MPLY,
KC_9, KC_6, KC_3, KC_PENT,
- KC_8, KC_5, KC_2, KC_BSPC,
- KC_7, KC_4, KC_1, KC_0),
-
+ KC_8, KC_5, KC_2, KC_BSPC,
+ KC_7, KC_4, KC_1, KC_0),
+
[1] = LAYOUT(
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),
-
+
[2] = LAYOUT(
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),
-
+
[3] = LAYOUT(
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),
-
-
+
+
};
-void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
}
+ return true;
}
-
-
diff --git a/keyboards/np12/keymaps/via/keymap.c b/keyboards/np12/keymaps/via/keymap.c
index 4a02b1d3ad..f960573098 100644
--- a/keyboards/np12/keymaps/via/keymap.c
+++ b/keyboards/np12/keymaps/via/keymap.c
@@ -1,18 +1,18 @@
- /* Copyright 2021 nut1414
- *
- * 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
+ /* Copyright 2021 nut1414
+ *
+ * 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 .
- */
+ */
#include QMK_KEYBOARD_H
@@ -22,39 +22,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_MPLY,
KC_9, KC_6, KC_3, KC_PENT,
- KC_8, KC_5, KC_2, KC_BSPC,
- KC_7, KC_4, KC_1, KC_0),
-
+ KC_8, KC_5, KC_2, KC_BSPC,
+ KC_7, KC_4, KC_1, KC_0),
+
[1] = LAYOUT(
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),
-
+
[2] = LAYOUT(
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),
-
+
[3] = LAYOUT(
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),
-
-
+
+
};
-void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
if (clockwise) {
tap_code(KC_AUDIO_VOL_UP);
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
}
+ return true;
}
-
-
diff --git a/keyboards/nullbitsco/nibble/keymaps/default/keymap.c b/keyboards/nullbitsco/nibble/keymaps/default/keymap.c
index 787e8bd8f7..beac1c55a2 100644
--- a/keyboards/nullbitsco/nibble/keymaps/default/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/default/keymap.c
@@ -105,7 +105,7 @@ void change_RGB(bool clockwise) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (layer_state_is(1)) {
//change RGB settings
change_RGB(clockwise);
@@ -117,6 +117,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
void matrix_init_user(void) {
diff --git a/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c b/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c
index 214034ef8e..270350ca0f 100644
--- a/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/iso/keymap.c
@@ -105,7 +105,7 @@ void change_RGB(bool clockwise) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (layer_state_is(1)) {
//change RGB settings
change_RGB(clockwise);
@@ -117,6 +117,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
void matrix_init_user(void) {
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c
index b9630b8e8c..c9988848d5 100644
--- a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c
@@ -122,12 +122,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
void matrix_init_user(void) {
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c
index 327cc7720d..d1ddd3bcb4 100644
--- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c
@@ -47,12 +47,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c
index 5b2f3b4f2e..67a53f241b 100644
--- a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c
@@ -148,13 +148,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// Encoder is mapped to volume functions by default
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
void matrix_init_user(void) {
diff --git a/keyboards/nullbitsco/scramble/keymaps/default/keymap.c b/keyboards/nullbitsco/scramble/keymaps/default/keymap.c
index 2ccffe3d86..b80214110a 100644
--- a/keyboards/nullbitsco/scramble/keymaps/default/keymap.c
+++ b/keyboards/nullbitsco/scramble/keymaps/default/keymap.c
@@ -32,10 +32,11 @@ void matrix_init_user(void) {
set_scramble_LED(LED_OFF);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c
index 7168ad9ec6..2081872ac2 100644
--- a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c
+++ b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c
@@ -76,10 +76,11 @@ void matrix_init_user(void) {
set_scramble_LED(LED_OFF);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/nullbitsco/scramble/keymaps/via/keymap.c b/keyboards/nullbitsco/scramble/keymaps/via/keymap.c
index 91a448cc1a..d5b97855a5 100644
--- a/keyboards/nullbitsco/scramble/keymaps/via/keymap.c
+++ b/keyboards/nullbitsco/scramble/keymaps/via/keymap.c
@@ -52,10 +52,11 @@ void matrix_init_user(void) {
set_scramble_LED(LED_OFF);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/pabile/p18/keymaps/default/keymap.c b/keyboards/pabile/p18/keymaps/default/keymap.c
index d47982e562..0223a450cd 100644
--- a/keyboards/pabile/p18/keymaps/default/keymap.c
+++ b/keyboards/pabile/p18/keymaps/default/keymap.c
@@ -2,26 +2,27 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
- KC_P7, KC_P8, KC_P9, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PMNS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_MUTE, KC_P1, KC_P2, KC_P3, KC_TAB,
KC_ESC, KC_DEL, KC_P0, KC_PDOT, KC_PENT
)
-
+
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder below the controller */
if (clockwise) {
tap_code(KC_VOLD); /*volume down*/
} else {
tap_code(KC_VOLU); /*volume up*/
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_WH_U); /*mouse wheel up*/
} else {
tap_code(KC_WH_D); /*mouse wheel down*/
}
}
+ return true;
}
diff --git a/keyboards/pabile/p20/ver1/keymaps/default/keymap.c b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c
index 6b815e72e8..48b537b564 100644
--- a/keyboards/pabile/p20/ver1/keymaps/default/keymap.c
+++ b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c
@@ -2,37 +2,38 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x4(
- KC_PSLS, KC_PMNS, KC_PAST, KC_MPLY,
- KC_P7, KC_P8, KC_P9, KC_PMNS,
- KC_P4, KC_P5, KC_P6, KC_PPLS,
- KC_P1, KC_P2, KC_P3, KC_TAB,
+ KC_PSLS, KC_PMNS, KC_PAST, KC_MPLY,
+ KC_P7, KC_P8, KC_P9, KC_PMNS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_TAB,
LT(2,KC_P0), KC_PCMM, KC_PDOT, LT(1,KC_PENT)),
[1] = LAYOUT_ortho_5x4(
- KC_NLCK, KC_UNDS, KC_NO, KC_NO,
- KC_AMPR, KC_ASTR, KC_LPRN, KC_EQL,
- KC_DLR, KC_PERC, KC_CIRC, KC_NO,
- KC_EXLM, KC_AT, KC_HASH, KC_NO,
+ KC_NLCK, KC_UNDS, KC_NO, KC_NO,
+ KC_AMPR, KC_ASTR, KC_LPRN, KC_EQL,
+ KC_DLR, KC_PERC, KC_CIRC, KC_NO,
+ KC_EXLM, KC_AT, KC_HASH, KC_NO,
KC_RPRN, KC_NO, KC_PSLS, KC_NO),
[2] = LAYOUT_ortho_5x4(
- KC_NLCK, KC_NO, KC_NO, KC_NO,
- KC_BTN1, KC_MS_U, KC_BTN2, KC_NO,
- KC_MS_L, KC_MS_D, KC_MS_R, KC_TAB,
- KC_WH_U, KC_NO, KC_WH_D, KC_NO,
+ KC_NLCK, KC_NO, KC_NO, KC_NO,
+ KC_BTN1, KC_MS_U, KC_BTN2, KC_NO,
+ KC_MS_L, KC_MS_D, KC_MS_R, KC_TAB,
+ KC_WH_U, KC_NO, KC_WH_D, KC_NO,
KC_NO, KC_NO, KC_DEL, KC_ESC)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_WH_U); /*mouse wheel up*/
} else {
tap_code(KC_WH_D); /*mouse wheel down */
}
- } else if (index == 1) { /* Second encoder */
+ } else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_VOLD); /*volume down*/
} else {
tap_code(KC_VOLU); /*volume up*/
}
}
+ return true;
}
diff --git a/keyboards/palette1202/keymaps/default/keymap.c b/keyboards/palette1202/keymaps/default/keymap.c
index d7bd120ed2..b55b39a40f 100644
--- a/keyboards/palette1202/keymaps/default/keymap.c
+++ b/keyboards/palette1202/keymaps/default/keymap.c
@@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
uint8_t currentDefault = get_highest_layer(default_layer_state);
uint8_t currentLayer = get_highest_layer(layer_state);
if (index == 0) { /* the upper encoder */
@@ -159,7 +159,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
case IOS_CS_1:
if (currentLayer % 2 == 0) {
// default layer
- // Zoom
+ // Zoom
tap_code16(!clockwise ? G(KC_MINS) : G(KC_SCLN));
} else {
// Fn Layer
@@ -170,7 +170,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
default:
break;
}
- } else if (index == 1) { /* the lower encoder */
+ } else if (index == 1) { /* the lower encoder */
switch (currentDefault) {
case MAC_CS_1:
if (currentLayer % 2 == 0) {
@@ -231,6 +231,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
// custom keycode
diff --git a/keyboards/palette1202/keymaps/key-check/keymap.c b/keyboards/palette1202/keymaps/key-check/keymap.c
index c3496f78c0..207cf1c2b8 100644
--- a/keyboards/palette1202/keymaps/key-check/keymap.c
+++ b/keyboards/palette1202/keymaps/key-check/keymap.c
@@ -123,7 +123,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* the upper encoder */
if (clockwise) {
SEND_STRING("ENCODER-UPPER:CW");
@@ -137,6 +137,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
SEND_STRING("ENCODER-LOWER:CCW");
}
}
+ return true;
}
// OLED Display
diff --git a/keyboards/pandora/keymaps/default/keymap.c b/keyboards/pandora/keymaps/default/keymap.c
index 2ab65a78c1..eea641d195 100644
--- a/keyboards/pandora/keymaps/default/keymap.c
+++ b/keyboards/pandora/keymaps/default/keymap.c
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Encoder rotate function
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* First encoder */
if (index == 0) {
if (clockwise) {
@@ -25,7 +25,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
- }
+ }
+ return true;
}
// Encoder click function
diff --git a/keyboards/pandora/keymaps/via/keymap.c b/keyboards/pandora/keymaps/via/keymap.c
index f89d66ec57..ae97463f61 100644
--- a/keyboards/pandora/keymaps/via/keymap.c
+++ b/keyboards/pandora/keymaps/via/keymap.c
@@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Encoder rotate function
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* First encoder */
if (index == 0) {
if (clockwise) {
@@ -40,7 +40,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_AUDIO_VOL_DOWN);
}
- }
+ }
+ return true;
}
// Encoder click function
diff --git a/keyboards/pistachio_mp/keymaps/default/keymap.c b/keyboards/pistachio_mp/keymaps/default/keymap.c
index a8e8cc73c9..c206f30617 100644
--- a/keyboards/pistachio_mp/keymaps/default/keymap.c
+++ b/keyboards/pistachio_mp/keymaps/default/keymap.c
@@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
@@ -51,5 +51,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c
index 4c1185ad99..bd53cfb7af 100644
--- a/keyboards/planck/keymaps/abishalom/keymap.c
+++ b/keyboards/planck/keymaps/abishalom/keymap.c
@@ -221,7 +221,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -251,6 +251,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c
index b78a7017e5..c9a721a1fa 100644
--- a/keyboards/planck/keymaps/atreus/keymap.c
+++ b/keyboards/planck/keymaps/atreus/keymap.c
@@ -144,7 +144,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -174,6 +174,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c
index f82819c58e..47cb8865d7 100644
--- a/keyboards/planck/keymaps/charlesrocket/keymap.c
+++ b/keyboards/planck/keymaps/charlesrocket/keymap.c
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -169,6 +169,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
index 9cbcbf3cae..aec7bcdd7d 100644
--- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
+++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c
@@ -263,7 +263,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -293,6 +293,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index 22ff24c92b..304d320b69 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -286,6 +286,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/eshesh2/keymap.c b/keyboards/planck/keymaps/eshesh2/keymap.c
index 1872b42cd6..59768e15aa 100644
--- a/keyboards/planck/keymaps/eshesh2/keymap.c
+++ b/keyboards/planck/keymaps/eshesh2/keymap.c
@@ -187,7 +187,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -226,6 +226,7 @@ void encoder_update(bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c
index 5be91772d7..08ea09d8b0 100644
--- a/keyboards/planck/keymaps/fabian/keymap.c
+++ b/keyboards/planck/keymaps/fabian/keymap.c
@@ -265,7 +265,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c
index bdaef20763..9cc5f7517f 100644
--- a/keyboards/planck/keymaps/gitdrik/keymap.c
+++ b/keyboards/planck/keymaps/gitdrik/keymap.c
@@ -137,7 +137,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RIGHT)) {
if (clockwise) {
@@ -167,6 +167,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c
index ba8b3fcc1d..7ed9a794e4 100644
--- a/keyboards/planck/keymaps/grant24/keymap.c
+++ b/keyboards/planck/keymaps/grant24/keymap.c
@@ -279,7 +279,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -309,6 +309,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c
index c9aa619815..1af3771ae0 100644
--- a/keyboards/planck/keymaps/hvp/keymap.c
+++ b/keyboards/planck/keymaps/hvp/keymap.c
@@ -51,16 +51,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_RAISE] = LAYOUT_planck_grid( /* Right */
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_DEL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
- _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
[_LOWER] = LAYOUT_planck_grid( /* Left */
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_BSPC,
KC_DEL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS,
- _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
+ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
@@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -119,6 +119,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
index b344bd0767..3e195671a8 100644
--- a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
+++ b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c
@@ -190,7 +190,7 @@ uint16_t muse_tempo = 20;
extern float clicky_rand;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (is_clicky_on()) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -238,6 +238,7 @@ void encoder_update(bool clockwise) {
}
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/mgalisa/keymap.c b/keyboards/planck/keymaps/mgalisa/keymap.c
index 09acceb4c0..e3ecc8d7c5 100644
--- a/keyboards/planck/keymaps/mgalisa/keymap.c
+++ b/keyboards/planck/keymaps/mgalisa/keymap.c
@@ -317,7 +317,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -347,6 +347,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c
index 7a4f0b816a..e319fd49ef 100644
--- a/keyboards/planck/keymaps/mikethetiger/keymap.c
+++ b/keyboards/planck/keymaps/mikethetiger/keymap.c
@@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -290,6 +290,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c
index aea59e8d77..bc067973c4 100644
--- a/keyboards/planck/keymaps/msiu/keymap.c
+++ b/keyboards/planck/keymaps/msiu/keymap.c
@@ -128,7 +128,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -152,6 +152,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c
index 84452a3f17..ec2de450a4 100644
--- a/keyboards/planck/keymaps/muzfuz/keymap.c
+++ b/keyboards/planck/keymaps/muzfuz/keymap.c
@@ -177,7 +177,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise)
+bool encoder_update(bool clockwise)
{
if (muse_mode)
{
@@ -227,6 +227,7 @@ void encoder_update(bool clockwise)
#endif
}
}
+ return true;
}
void dip_update(uint8_t index, bool active)
diff --git a/keyboards/planck/keymaps/navi/keymap.c b/keyboards/planck/keymaps/navi/keymap.c
index bbf7d510f9..db53451276 100644
--- a/keyboards/planck/keymaps/navi/keymap.c
+++ b/keyboards/planck/keymaps/navi/keymap.c
@@ -25,7 +25,7 @@ enum planck_layers {
_RAISE,
_FUNCTION,
_ADJUST
-
+
};
enum planck_keycodes {
@@ -159,7 +159,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_FUNCTION);
}
return false;
- break;
+ break;
}
return true;
}
@@ -170,7 +170,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -204,6 +204,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
bool music_mask_user(uint16_t keycode) {
diff --git a/keyboards/planck/keymaps/nick/keymap.c b/keyboards/planck/keymaps/nick/keymap.c
index f100594d6f..b717ccdc81 100644
--- a/keyboards/planck/keymaps/nick/keymap.c
+++ b/keyboards/planck/keymaps/nick/keymap.c
@@ -109,7 +109,7 @@ uint32_t layer_state_set_user(uint32_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (clockwise && !IS_LAYER_ON(_RAISE)) {
tap_code(KC_MS_WH_DOWN);
} else if (!clockwise && !IS_LAYER_ON(_RAISE)) {
@@ -119,4 +119,5 @@ void encoder_update(bool clockwise) {
} else if (!clockwise && IS_LAYER_ON(_RAISE)) {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/planck/keymaps/oryx/keymap.c b/keyboards/planck/keymaps/oryx/keymap.c
index 7892d1a5fb..8abe417d72 100644
--- a/keyboards/planck/keymaps/oryx/keymap.c
+++ b/keyboards/planck/keymaps/oryx/keymap.c
@@ -319,7 +319,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -353,6 +353,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/pascamel/keymap.c b/keyboards/planck/keymaps/pascamel/keymap.c
index 9ee0dde359..852643218c 100644
--- a/keyboards/planck/keymaps/pascamel/keymap.c
+++ b/keyboards/planck/keymaps/pascamel/keymap.c
@@ -157,7 +157,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -181,6 +181,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/pevecyan/keymap.c b/keyboards/planck/keymaps/pevecyan/keymap.c
index d2a0c85159..2391efebb1 100644
--- a/keyboards/planck/keymaps/pevecyan/keymap.c
+++ b/keyboards/planck/keymaps/pevecyan/keymap.c
@@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, SI_QUES, SI_ASTR, SI_GRV, SI_PLUS, _______,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, SI_LABK, SI_RABK, KC_END, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
-),
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -178,7 +178,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -202,6 +202,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/ptillemans/keymap.c b/keyboards/planck/keymaps/ptillemans/keymap.c
index c1f847e2f3..c163f73727 100644
--- a/keyboards/planck/keymaps/ptillemans/keymap.c
+++ b/keyboards/planck/keymaps/ptillemans/keymap.c
@@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -266,6 +266,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/raffle/keymap.c b/keyboards/planck/keymaps/raffle/keymap.c
index 0dbab38939..350a9166c1 100644
--- a/keyboards/planck/keymaps/raffle/keymap.c
+++ b/keyboards/planck/keymaps/raffle/keymap.c
@@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
-/* Nav Layer
+/* Nav Layer
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | PGUP | UP | PGDN | |KC_CAD|
* |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
-/* DEV Layer
+/* DEV Layer
* ,-----------------------------------------------------------------------------------.
* | | | |R_CMLM| | | | | | | |KC_CAD|
* |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -223,7 +223,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -247,6 +247,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
@@ -301,5 +302,3 @@ bool music_mask_user(uint16_t keycode) {
return true;
}
}
-
-
diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c
index 57f966e74e..d832e70515 100644
--- a/keyboards/planck/keymaps/rjhilgefort/keymap.c
+++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c
@@ -154,7 +154,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -184,6 +184,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c
index 0bc0d9e030..bdbf21b113 100644
--- a/keyboards/planck/keymaps/sigul/keymap.c
+++ b/keyboards/planck/keymaps/sigul/keymap.c
@@ -1,13 +1,13 @@
/*
- *
+ *
* An Italian ANSI layout
- * Version 0.3
- *
+ * Version 0.3
+ *
* Created by Silvio Gulizia on the basis of the default Planck keymap.
* Thanks to SomeBuddyOnReddit, gepeirl, fauxpark, BXO511, drashna, and ridingqwerty.
*
- * The layout is based on the original Planck layout when used with language set to Italian on your Mac.
- * Accented vowels have been moverd on RAISE ("è", "ì", and "ù") and LOWER ("é", "ò", and "à")
+ * The layout is based on the original Planck layout when used with language set to Italian on your Mac.
+ * Accented vowels have been moverd on RAISE ("�", "�", and "�") and LOWER ("�", "�", and "�")
*
*/
@@ -40,9 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * |Enter | F1 | F2 | F3 | F4 | F5 | | _ | = | é | ò | à |
+ * |Enter | F1 | F2 | F3 | F4 | F5 | | _ | = | � | � | � |
* |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F6 | F7 | F8 | F9 | |NUMPAD| § | ± | { | } | | |
+ * | | F6 | F7 | F8 | F9 | |NUMPAD| � | � | { | } | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
@@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
- * | | | SGCOM| DESK | | | | - | + | è | ì | ù |
+ * | | | SGCOM| DESK | | | | - | + | � | � | � |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Caps | | PHONE| SVIV |VIVERE| |NUMPAD| | | [ | ] | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -162,7 +162,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -192,6 +192,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c
index 27efc4759d..a2162d9112 100644
--- a/keyboards/planck/keymaps/skug/keymap.c
+++ b/keyboards/planck/keymaps/skug/keymap.c
@@ -264,7 +264,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -288,6 +288,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/smittey/keymap.c b/keyboards/planck/keymaps/smittey/keymap.c
index fd5e91fb91..7efe5fd4d1 100644
--- a/keyboards/planck/keymaps/smittey/keymap.c
+++ b/keyboards/planck/keymaps/smittey/keymap.c
@@ -48,7 +48,7 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Qwerty
+ /* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
@@ -79,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_planck_grid(
- XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT),
+ XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_1, KC_2, KC_3, KC_PLUS, MT(MOD_LSFT, KC_ENT),
_______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_0, KC_DOT, KC_EQL, XXXXXXX
),
@@ -93,13 +93,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | _ | + |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | Space | | Home | PgDn | PgUp | End |
+ * | | | | | | Space | | Home | PgDn | PgUp | End |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_planck_grid(
- KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
- XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT),
+ KC_GRV, KC_EXLM, KC_DQUO, LALT(KC_4), KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
+ XXXXXXX, KC_TILD, KC_NUHS, KC_SLSH, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_BSLS, KC_MINS, KC_EQL, KC_PIPE,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, MT(MOD_LSFT, KC_ENT),
_______, XXXXXXX, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
),
@@ -116,9 +116,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[_FN] = LAYOUT_planck_grid(
- LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
- XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ LALT(KC_BSPC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
+ XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
@@ -128,16 +128,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |PRNT SC| | UP | | | | | | | | |SLEEP |
* |-------+------+------+------+------+-------------+------+------+------+------+------|
* | | LEFT | DOWN | RIGHT| | | | LEFT | DOWN | UP | RIGHT| |
- * |-------+------+------+------+------+------|------+------+------+------+------+------|
+ * |-------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |-------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | MUTE |VOLDWN|VOL UP| |
* `-----------------------------------------------------------------------------------'
*/
[_SPACE_FN] = LAYOUT_planck_grid(
- KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
- XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ KC_PSCR, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP,
+ XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX,
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC__MUTE, KC__VOLDOWN, KC__VOLUP, XXXXXXX
),
@@ -216,7 +216,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
- ),
+ ),
};
#ifdef AUDIO_ENABLE
@@ -297,7 +297,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -319,6 +319,7 @@ void encoder_update(bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/synth_sample/keymap.c b/keyboards/planck/keymaps/synth_sample/keymap.c
index 87a7479cef..64bfde9aa9 100644
--- a/keyboards/planck/keymaps/synth_sample/keymap.c
+++ b/keyboards/planck/keymaps/synth_sample/keymap.c
@@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
register_code(KC_MS_WH_DOWN);
@@ -265,6 +265,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
#endif
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/synth_wavetable/keymap.c b/keyboards/planck/keymaps/synth_wavetable/keymap.c
index a0d7106793..1fcc977420 100644
--- a/keyboards/planck/keymaps/synth_wavetable/keymap.c
+++ b/keyboards/planck/keymaps/synth_wavetable/keymap.c
@@ -308,7 +308,7 @@ uint16_t dac_value_generate(void) {
return value;
}
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (clockwise) {
dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH;
} else {
@@ -317,4 +317,5 @@ void encoder_update(bool clockwise) {
else
dac_morph--;
}
+ return true;
}
diff --git a/keyboards/planck/keymaps/tk/keymap.c b/keyboards/planck/keymaps/tk/keymap.c
index b3273aec5d..1ceb6cc5bb 100644
--- a/keyboards/planck/keymaps/tk/keymap.c
+++ b/keyboards/planck/keymaps/tk/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2020 Tushar Khan
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
#include QMK_KEYBOARD_H
#include "muse.h"
@@ -77,8 +77,8 @@ enum keycodes {
EMAIL, // [email address]
PHONE, // [phone number]
GT_CMT, // git commit -m ''
- SHEBANG, // #!/usr/bin/env
- CHMOD, // chmod 744 *sh
+ SHEBANG, // #!/usr/bin/env
+ CHMOD, // chmod 744 *sh
PY_VENV, // source *env*/bin/activate
};
@@ -355,7 +355,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
// enabling base layer song breaks a lot of other songs including
// - macro recording start song
// - rotary feedback songs
-
+
// PLAY_SONG(base_song);
break;
case _HYPER:
@@ -393,10 +393,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
/*
- ██†██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██†██████†██████†██████†███████â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€
- ██†██â€â€â–ˆâ–ˆâ€â€â€â€â€â€â€â–ˆâ–ˆâ€ ██â€â€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆâ€â€â€â€â€â€
- █████â€â€ █████†â€â–ˆâ–ˆâ–ˆâ–ˆâ€â€ ██†██†██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ███████â€
- ██â€â€â–ˆâ–ˆâ€ ██â€â€â€â€ â€â–ˆâ–ˆâ€â€ ██†██†██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â€â€â€ â€â€â€â€â€â–ˆâ–ˆâ€
+ ██†██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██†██████†██████†██████†███████â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ
+ ██†██â€â€â–ˆâ–ˆâ€â€â€â€â€â€â€â–ˆâ–ˆâ€ ██â€â€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆ
+ █████â€â€ █████†â€â–ˆâ–ˆâ–ˆâ–ˆâ€â€ ██†██†██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ███████
+ ██â€â€â–ˆâ–ˆâ€ ██â€â€â€â€ â€â–ˆâ–ˆâ€â€ ██†██†██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â€â€â€ â€â€â€â€â€â–ˆâ–ˆ
██†██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ██†â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ
*/
@@ -480,10 +480,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
/*
- ███†███†█████†██████â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ██████†███████â€
- ████†████â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â€â€
- ██â€â–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██████â€â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€
- ██â€â€â–ˆâ–ˆâ€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â€â€â€â€â€â–ˆâ–ˆâ€
+ ███†███†█████†██████â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ██████†███████
+ ████†████â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â€â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆ
+ ██â€â–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██████â€â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ
+ ██â€â€â–ˆâ–ˆâ€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â€â€â€â€â€â–ˆâ–ˆ
██†â€â€â€ ██â€â–ˆâ–ˆâ€ ██â€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ
*/
@@ -527,10 +527,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
/*
- █████†██†██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ██†██████â€
- ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆâ€
- ███████â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€
- ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€
+ █████†██†██â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€ ██†██████
+ ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â–ˆâ–ˆâ€â€â€â€â–ˆâ–ˆ
+ ███████â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██
+ ██â€â€â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€ ██â€â–ˆâ–ˆâ€â–ˆâ–ˆâ€ ██
██†██â€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ€â€â–ˆâ–ˆâ€â€â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ
*/
@@ -600,7 +600,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
-
+
}
@@ -615,7 +615,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
static int scroll_interval = 5;
switch (rotary_state) {
@@ -686,5 +686,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
#endif
diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c
index e6a1411ee8..ea625d165d 100644
--- a/keyboards/planck/keymaps/tom/keymap.c
+++ b/keyboards/planck/keymaps/tom/keymap.c
@@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -169,6 +169,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c
index 30412e9db5..c9ba7da899 100644
--- a/keyboards/planck/keymaps/tylerwince/keymap.c
+++ b/keyboards/planck/keymaps/tylerwince/keymap.c
@@ -95,8 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
- RESET, _______, _______, _______, _______, LALT(LCTL(KC_7)), LALT(LCTL(KC_8)), _______, _______, _______, LALT(LCTL(KC_L)), _______,
- _______, _______, _______, _______, _______, LALT(LCTL(KC_U)), LALT(LCTL(KC_I)), LALT(LCTL(KC_H)), _______, _______, _______, _______,
+ RESET, _______, _______, _______, _______, LALT(LCTL(KC_7)), LALT(LCTL(KC_8)), _______, _______, _______, LALT(LCTL(KC_L)), _______,
+ _______, _______, _______, _______, _______, LALT(LCTL(KC_U)), LALT(LCTL(KC_I)), LALT(LCTL(KC_H)), _______, _______, _______, _______,
_______, _______, _______, LALT(LCTL(KC_J)), LALT(LCTL(KC_K)), _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_ENTER)),
TO(0), TO(4), _______, _______, _______, _______, KC_NO, _______, KC_AUDIO_VOL_DOWN, KC_F14, KC_F15, KC_AUDIO_VOL_UP
),
@@ -133,7 +133,7 @@ void keyboard_post_init_user(void) {
const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = {
[0] = { {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
- {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
+ {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255},
{32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,0,0}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255} },
[1] = { {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255},
@@ -215,7 +215,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -245,6 +245,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void matrix_scan_user(void) {
diff --git a/keyboards/planck/keymaps/unagi/keymap.c b/keyboards/planck/keymaps/unagi/keymap.c
index 596973ba3c..5f4d3b8864 100644
--- a/keyboards/planck/keymaps/unagi/keymap.c
+++ b/keyboards/planck/keymaps/unagi/keymap.c
@@ -267,7 +267,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -291,6 +291,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/pohjolaworks/louhi/keymaps/default/keymap.c b/keyboards/pohjolaworks/louhi/keymaps/default/keymap.c
index ee334a249b..852d3d107d 100644
--- a/keyboards/pohjolaworks/louhi/keymaps/default/keymap.c
+++ b/keyboards/pohjolaworks/louhi/keymaps/default/keymap.c
@@ -48,10 +48,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
+ return true;
}
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keymap.c b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
index 67d13005cf..3ea61a26ee 100644
--- a/keyboards/preonic/keymaps/AlexDaigre/keymap.c
+++ b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
@@ -249,7 +249,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -273,6 +273,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/cranium/keymap.c b/keyboards/preonic/keymaps/cranium/keymap.c
index d640ff8494..63897d1e6d 100644
--- a/keyboards/preonic/keymaps/cranium/keymap.c
+++ b/keyboards/preonic/keymaps/cranium/keymap.c
@@ -150,7 +150,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -172,6 +172,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index 6fec14d4f1..078ab27265 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -233,7 +233,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -257,6 +257,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c
index d2d30ffa15..909e86a97d 100644
--- a/keyboards/preonic/keymaps/drasbeck/keymap.c
+++ b/keyboards/preonic/keymaps/drasbeck/keymap.c
@@ -1,4 +1,4 @@
-/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
+/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
*
* You are free to:
*
@@ -44,8 +44,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL,
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_DVORAK] = LAYOUT_preonic_grid(
@@ -163,7 +163,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -187,6 +187,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c
index a4e78d0155..8d3898922f 100644
--- a/keyboards/preonic/keymaps/elisiano/keymap.c
+++ b/keyboards/preonic/keymaps/elisiano/keymap.c
@@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -254,6 +254,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c
index 97a0ed6089..8e2747f445 100644
--- a/keyboards/preonic/keymaps/fsck/keymap.c
+++ b/keyboards/preonic/keymaps/fsck/keymap.c
@@ -175,7 +175,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -199,6 +199,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/keelhauler/keymap.c b/keyboards/preonic/keymaps/keelhauler/keymap.c
index e83e40dfc5..c7e0766920 100644
--- a/keyboards/preonic/keymaps/keelhauler/keymap.c
+++ b/keyboards/preonic/keymaps/keelhauler/keymap.c
@@ -237,7 +237,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -261,6 +261,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c
index 11ea0e51c0..6f1d5f30af 100644
--- a/keyboards/preonic/keymaps/kjwon15/keymap.c
+++ b/keyboards/preonic/keymaps/kjwon15/keymap.c
@@ -302,7 +302,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -324,6 +324,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c
index c113bcaf64..b1a73035b3 100644
--- a/keyboards/preonic/keymaps/laurentlaurent/keymap.c
+++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c
@@ -529,7 +529,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -551,6 +551,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c
index ecaf26b8da..4e8738be2d 100644
--- a/keyboards/preonic/keymaps/mguterl/keymap.c
+++ b/keyboards/preonic/keymaps/mguterl/keymap.c
@@ -240,7 +240,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -270,6 +270,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/mikethetiger/keymap.c b/keyboards/preonic/keymaps/mikethetiger/keymap.c
index 621148a6bf..e4b1f2e82a 100644
--- a/keyboards/preonic/keymaps/mikethetiger/keymap.c
+++ b/keyboards/preonic/keymaps/mikethetiger/keymap.c
@@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_QWERTY] = LAYOUT_preonic_grid(
+[_QWERTY] = LAYOUT_preonic_grid(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_COLEMAK] = LAYOUT_preonic_grid(
+[_COLEMAK] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
@@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
-[_DVORAK] = LAYOUT_preonic_grid(
+[_DVORAK] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
@@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = LAYOUT_preonic_grid(
+[_LOWER] = LAYOUT_preonic_grid(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
@@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = LAYOUT_preonic_grid(
+[_RAISE] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
@@ -155,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = LAYOUT_preonic_grid(
+[_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, \
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
@@ -233,13 +233,14 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
- }
+ return true;
+}
void dip_update(uint8_t index, bool active) {
switch (index) {
diff --git a/keyboards/preonic/keymaps/muzfuz/keymap.c b/keyboards/preonic/keymaps/muzfuz/keymap.c
index a0a4b34fa9..a728946775 100644
--- a/keyboards/preonic/keymaps/muzfuz/keymap.c
+++ b/keyboards/preonic/keymaps/muzfuz/keymap.c
@@ -197,7 +197,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update(bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -221,6 +221,7 @@ void encoder_update(bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c
index 621d60be6a..60677701c7 100644
--- a/keyboards/preonic/keymaps/mverteuil/keymap.c
+++ b/keyboards/preonic/keymaps/mverteuil/keymap.c
@@ -434,7 +434,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -456,6 +456,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
index 232b853114..290ea16387 100644
--- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
+++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c
@@ -370,7 +370,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -392,6 +392,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c
index 39b045d6d3..71d9306dc5 100644
--- a/keyboards/preonic/keymaps/pezhore/keymap.c
+++ b/keyboards/preonic/keymaps/pezhore/keymap.c
@@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -254,6 +254,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c
index 6ddf289420..c78528d8c3 100644
--- a/keyboards/preonic/keymaps/senseored/keymap.c
+++ b/keyboards/preonic/keymaps/senseored/keymap.c
@@ -25,7 +25,7 @@ enum preonic_layers {
_FNL2,
_ADJUST,
_GAMEMODE,
- _FNL3,
+ _FNL3,
_LOWER2,
_RAISE2
};
@@ -236,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
* | § | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | ´ | ` | @ | £ | $ | € | ¨ | { | [ | ] | } | \ |
@@ -271,7 +271,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_P0) SS_TAP(X_P1) SS_TAP(X_P7) SS_TAP(X_P6) SS_UP(X_LALT));
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_KP_0) SS_TAP(X_KP_1) SS_TAP(X_KP_7) SS_TAP(X_KP_6) SS_UP(X_LALT) );
return false;
-
+
if(bnumlock) {
tap_code(KC_NLCK);
bnumlock = false;
@@ -283,14 +283,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
else {
workmode = false;
- return false;
- }
+ return false;
+ }
}
-
+
}
return true;
switch (keycode) {
-
+
case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
@@ -318,7 +318,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -342,6 +342,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
@@ -375,7 +376,7 @@ uint32_t layer_state_set_user(uint32_t state) {
if(!bnumlock) {
tap_code(KC_NLCK);
}
-
+
break;
case _ADJUST:
if(bnumlock) {
@@ -398,7 +399,7 @@ uint32_t layer_state_set_user(uint32_t state) {
if(bnumlock) {
tap_code(KC_NLCK);
}
-
+
break;
}
// }
diff --git a/keyboards/preonic/keymaps/via/keymap.c b/keyboards/preonic/keymaps/via/keymap.c
index 04f20b316d..5df57fd3d2 100644
--- a/keyboards/preonic/keymaps/via/keymap.c
+++ b/keyboards/preonic/keymaps/via/keymap.c
@@ -120,7 +120,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -144,6 +144,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c
index 967cd5a0ab..f127ea4693 100644
--- a/keyboards/preonic/keymaps/xulkal/keymap.c
+++ b/keyboards/preonic/keymaps/xulkal/keymap.c
@@ -74,7 +74,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -98,6 +98,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
unregister_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/keyboards/program_yoink/ortho/keymaps/default/keymap.c b/keyboards/program_yoink/ortho/keymaps/default/keymap.c
index 6f20f22ddb..9b09f21cc0 100644
--- a/keyboards/program_yoink/ortho/keymaps/default/keymap.c
+++ b/keyboards/program_yoink/ortho/keymaps/default/keymap.c
@@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______,
KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______
- ),
+ _______, _______, _______, _______, _______, _______, _______
+ ),
[_LAYER2] = LAYOUT_ortho(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -59,7 +59,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
+ return true;
+}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_ent[] = {KC_DOT, KC_SLSH, COMBO_END};
@@ -70,6 +71,3 @@ combo_t key_combos[COMBO_COUNT] = {
};
#endif
-
-
-
diff --git a/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c b/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c
index 1c8f939136..9ffc617f08 100644
--- a/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c
+++ b/keyboards/program_yoink/ortho/keymaps/ortho_split/keymap.c
@@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______,
KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
- ),
+ _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
[_LAYER2] = LAYOUT_ortho_split(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -59,7 +59,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
+ return true;
+}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END};
@@ -70,6 +71,3 @@ combo_t key_combos[COMBO_COUNT] = {
};
#endif
-
-
-
diff --git a/keyboards/program_yoink/program_yoink.c b/keyboards/program_yoink/program_yoink.c
index a974d7f6fa..7733aa2ad5 100644
--- a/keyboards/program_yoink/program_yoink.c
+++ b/keyboards/program_yoink/program_yoink.c
@@ -16,8 +16,8 @@
#include "program_yoink.h"
-__attribute__ ((weak))
-void encoder_update_user(uint8_t index, bool clockwise) {
+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);
@@ -25,4 +25,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/program_yoink/staggered/keymaps/default/keymap.c b/keyboards/program_yoink/staggered/keymaps/default/keymap.c
index 5aa0c95e69..8a039044ac 100644
--- a/keyboards/program_yoink/staggered/keymaps/default/keymap.c
+++ b/keyboards/program_yoink/staggered/keymaps/default/keymap.c
@@ -41,8 +41,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MINS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______,
KC_EQL, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- KC_LGUI, KC_LALT, _______, _______, _______, _______, _______
- ),
+ KC_LGUI, KC_LALT, _______, _______, _______, _______, _______
+ ),
[_LAYER2] = LAYOUT_default(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
@@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -61,6 +61,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#ifdef COMBO_ENABLE
@@ -72,4 +73,3 @@ combo_t key_combos[COMBO_COUNT] = {
};
#endif
-
diff --git a/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c b/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c
index 89865dad32..7bbde7bd01 100644
--- a/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c
+++ b/keyboards/program_yoink/staggered/keymaps/split_bar/keymap.c
@@ -39,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______,
KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, KC_SCLN, KC_QUOT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
- ),
+ _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
[_LAYER2] = LAYOUT_split_bar(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -59,7 +59,8 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
-}
+ return true;
+}
#ifdef COMBO_ENABLE
const uint16_t PROGMEM combo_slsh[] = {MT(MOD_RSFT, KC_DOT), KC_COMM, COMBO_END};
@@ -70,6 +71,3 @@ combo_t key_combos[COMBO_COUNT] = {
};
#endif
-
-
-
diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c
index fe4e87ccec..30910a4a0d 100644
--- a/keyboards/punk75/keymaps/default/keymap.c
+++ b/keyboards/punk75/keymaps/default/keymap.c
@@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Encoder on the LEFT */
if (clockwise) {
tap_code(KC_VOLU);
@@ -92,4 +92,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/punk75/keymaps/dsanchezseco/keymap.c b/keyboards/punk75/keymaps/dsanchezseco/keymap.c
index e3fb62f036..034af79a08 100644
--- a/keyboards/punk75/keymaps/dsanchezseco/keymap.c
+++ b/keyboards/punk75/keymaps/dsanchezseco/keymap.c
@@ -76,7 +76,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Encoder on the LEFT */
if (clockwise) {
tap_code(KC_VOLU);
@@ -90,4 +90,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c
index 265814d13a..44deb8bd96 100644
--- a/keyboards/punk75/keymaps/via/keymap.c
+++ b/keyboards/punk75/keymaps/via/keymap.c
@@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* Encoder on the LEFT */
if (clockwise) {
tap_code(KC_VOLU);
@@ -87,4 +87,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c
index 37e015e624..11d04f60a6 100644
--- a/keyboards/qvex/lynepad/keymaps/default/keymap.c
+++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Standard encoder functionality
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
// Process encoder rotational movements
if (index == 0) { /* First encoder */
if (clockwise) {
@@ -46,6 +46,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_DOWN);
}
}
+ return true;
}
// Encoder press / tilt event handling
diff --git a/keyboards/rainkeeb/keymaps/default/keymap.c b/keyboards/rainkeeb/keymaps/default/keymap.c
index f68ab2ef08..3d82661f8c 100644
--- a/keyboards/rainkeeb/keymaps/default/keymap.c
+++ b/keyboards/rainkeeb/keymaps/default/keymap.c
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_NO, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _BASE:
if (clockwise) {
@@ -82,6 +82,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
char wpm[10];
diff --git a/keyboards/rainkeeb/keymaps/via/keymap.c b/keyboards/rainkeeb/keymaps/via/keymap.c
index f68ab2ef08..3d82661f8c 100644
--- a/keyboards/rainkeeb/keymaps/via/keymap.c
+++ b/keyboards/rainkeeb/keymaps/via/keymap.c
@@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_NO, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _BASE:
if (clockwise) {
@@ -82,6 +82,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
char wpm[10];
diff --git a/keyboards/ramonimbao/chevron/keymaps/default/keymap.c b/keyboards/ramonimbao/chevron/keymaps/default/keymap.c
index 04da00848e..45c7494f8b 100644
--- a/keyboards/ramonimbao/chevron/keymaps/default/keymap.c
+++ b/keyboards/ramonimbao/chevron/keymaps/default/keymap.c
@@ -32,10 +32,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/ramonimbao/chevron/keymaps/iso/keymap.c b/keyboards/ramonimbao/chevron/keymaps/iso/keymap.c
index c22c0af8c4..ed18fc0e54 100644
--- a/keyboards/ramonimbao/chevron/keymaps/iso/keymap.c
+++ b/keyboards/ramonimbao/chevron/keymaps/iso/keymap.c
@@ -32,10 +32,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/ramonimbao/chevron/keymaps/via/keymap.c b/keyboards/ramonimbao/chevron/keymaps/via/keymap.c
index 11304be9d0..d34b06a999 100644
--- a/keyboards/ramonimbao/chevron/keymaps/via/keymap.c
+++ b/keyboards/ramonimbao/chevron/keymaps/via/keymap.c
@@ -70,7 +70,7 @@ void matrix_scan_user(void) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
encoder_cw.pressed = true;
encoder_cw.time = (timer_read() | 1);
@@ -80,4 +80,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
encoder_ccw.time = (timer_read() | 1);
action_exec(encoder_ccw);
}
+ return true;
}
diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c
index 17030cc8a4..1b9b60c0a4 100644
--- a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c
+++ b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c
@@ -35,7 +35,7 @@ uint8_t current_frame = 0;
#define FRAME_DURATION 50
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
anim_sleep = timer_read32();
@@ -45,6 +45,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
anim_sleep = timer_read32();
oled_on();
}
+ return true;
}
static void render_pattern(void) {
diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c
index cfda38776c..1458b19c22 100644
--- a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c
+++ b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c
@@ -35,7 +35,7 @@ uint8_t current_frame = 0;
#define FRAME_DURATION 50
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
anim_sleep = timer_read32();
@@ -45,6 +45,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
anim_sleep = timer_read32();
oled_on();
}
+ return true;
}
static void render_pattern(void) {
diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c
index 2010780539..ecc35c19ab 100644
--- a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c
+++ b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c
@@ -83,7 +83,7 @@ uint8_t current_frame = 0;
#define FRAME_DURATION 50
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
encoder_cw.pressed = true;
encoder_cw.time = (timer_read() | 1);
@@ -97,6 +97,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
anim_sleep = timer_read32();
oled_on();
}
+ return true;
}
static void render_pattern(void) {
diff --git a/keyboards/rart/rart4x4/keymaps/default/keymap.c b/keyboards/rart/rart4x4/keymaps/default/keymap.c
index 36680e357b..02dfc0a148 100644
--- a/keyboards/rart/rart4x4/keymaps/default/keymap.c
+++ b/keyboards/rart/rart4x4/keymaps/default/keymap.c
@@ -25,16 +25,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PENT
),
-
+
[1] = LAYOUT_ortho_4x4(
- KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS,
- RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
- RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
+ KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS,
+ RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
+ RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
KC_COPY, KC_PSTE, KC_MYCM, RGB_TOG
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_U);
}
}
+ return true;
}
diff --git a/keyboards/rart/rart4x4/keymaps/via/keymap.c b/keyboards/rart/rart4x4/keymaps/via/keymap.c
index 9407b5f332..86e5538073 100644
--- a/keyboards/rart/rart4x4/keymaps/via/keymap.c
+++ b/keyboards/rart/rart4x4/keymaps/via/keymap.c
@@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PMNS
),
-
+
[1] = LAYOUT_ortho_4x4(
- KC_TRNS, RGB_HUI, RGB_HUD, RESET,
- RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
- RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
+ KC_TRNS, RGB_HUI, RGB_HUD, RESET,
+ RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
+ RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
KC_COPY, KC_PSTE, KC_MYCM, RGB_TOG
),
-
+
[2] = LAYOUT_ortho_4x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______
),
-
+
[3] = LAYOUT_ortho_4x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_WH_U);
@@ -58,4 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rart/rart75/keymaps/ansi/keymap.c b/keyboards/rart/rart75/keymaps/ansi/keymap.c
index 71bbcb7351..35da09b6f9 100644
--- a/keyboards/rart/rart75/keymaps/ansi/keymap.c
+++ b/keyboards/rart/rart75/keymaps/ansi/keymap.c
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -45,4 +45,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rart/rart75/keymaps/default/keymap.c b/keyboards/rart/rart75/keymaps/default/keymap.c
index ffbd77a325..145d5b6117 100644
--- a/keyboards/rart/rart75/keymaps/default/keymap.c
+++ b/keyboards/rart/rart75/keymaps/default/keymap.c
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -45,4 +45,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rart/rart75/keymaps/via/keymap.c b/keyboards/rart/rart75/keymaps/via/keymap.c
index aad420e725..d4a83373c8 100644
--- a/keyboards/rart/rart75/keymaps/via/keymap.c
+++ b/keyboards/rart/rart75/keymaps/via/keymap.c
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -48,4 +48,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rart/rartpad/keymaps/default/keymap.c b/keyboards/rart/rartpad/keymaps/default/keymap.c
index 8fd5ac248b..e102d241a1 100644
--- a/keyboards/rart/rartpad/keymaps/default/keymap.c
+++ b/keyboards/rart/rartpad/keymaps/default/keymap.c
@@ -26,17 +26,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P1, KC_P2, KC_P3, KC_PMNS,
MO(1), KC_P0, KC_PDOT, KC_PENT
),
-
+
[1] = LAYOUT_ortho_5x4(
- KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS,
- RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
- RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
- KC_COPY, KC_PSTE, KC_MYCM, KC_CALC,
- KC_TRNS, RGB_TOG, RESET, KC_TRNS
+ KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS,
+ RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
+ RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
+ KC_COPY, KC_PSTE, KC_MYCM, KC_CALC,
+ KC_TRNS, RGB_TOG, RESET, KC_TRNS
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -50,5 +50,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_WH_U);
}
}
+ return true;
}
-
diff --git a/keyboards/rart/rartpad/keymaps/numpad/keymap.c b/keyboards/rart/rartpad/keymaps/numpad/keymap.c
index dbeaebeca8..e149dd6b1d 100644
--- a/keyboards/rart/rartpad/keymaps/numpad/keymap.c
+++ b/keyboards/rart/rartpad/keymaps/numpad/keymap.c
@@ -27,15 +27,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P0, MO(1), KC_PENT
),
[1] = LAYOUT_numpad_5x4(
- KC_TRNS, KC_TRNS, KC_TRNS, RESET,
- 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_PDOT
+ KC_TRNS, KC_TRNS, KC_TRNS, RESET,
+ 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_PDOT
)
};
-
-void encoder_update_user(uint8_t index, bool clockwise) {
+
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -49,4 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGDN);
}
}
+ return true;
}
diff --git a/keyboards/rart/rartpad/keymaps/via/keymap.c b/keyboards/rart/rartpad/keymaps/via/keymap.c
index 986ba68137..8e4f05fea4 100644
--- a/keyboards/rart/rartpad/keymaps/via/keymap.c
+++ b/keyboards/rart/rartpad/keymaps/via/keymap.c
@@ -9,15 +9,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_P1, KC_P2, KC_P3, KC_PMNS,
MO(1), KC_P0, KC_PDOT, KC_PENT
),
-
+
[1] = LAYOUT_ortho_5x4(
- KC_TRNS, RGB_HUI, RGB_HUD, RESET,
- RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
- RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
- KC_COPY, KC_PSTE, KC_MYCM, KC_CALC,
- KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS
+ KC_TRNS, RGB_HUI, RGB_HUD, RESET,
+ RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV,
+ RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY,
+ KC_COPY, KC_PSTE, KC_MYCM, KC_CALC,
+ KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS
),
-
+
[2] = LAYOUT_ortho_5x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
@@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______,
_______, _______, _______, _______
),
-
+
[3] = LAYOUT_ortho_5x4(
_______, _______, _______, _______,
_______, _______, _______, _______,
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_WH_U);
@@ -49,4 +49,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c
index c041c0b57b..f19d36256c 100644
--- a/keyboards/rgbkb/pan/keymaps/default/keymap.c
+++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2020 RGBKB
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
// 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
@@ -100,7 +100,7 @@ void oled_task_user(void) {
}
#endif
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // First encoder - right
if (clockwise) {
tap_code(KC_VOLU);
@@ -114,4 +114,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
index 7f7863fdb2..2ae07984d8 100644
--- a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c
@@ -131,7 +131,7 @@ bool TOG_STATUS = false;
int RGB_current_mode;
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -145,6 +145,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
#endif
diff --git a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c
index 860361e810..96e19bf865 100644
--- a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c
@@ -164,7 +164,7 @@ bool TOG_STATUS = false;
int RGB_current_mode;
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -178,6 +178,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c
index 04af5165e7..0883cb7753 100644
--- a/keyboards/rgbkb/sol/keymaps/default/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c
@@ -223,9 +223,9 @@ const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (!is_keyboard_master())
- return;
+ return true;
#ifdef RGB_OLED_MENU
if (index == RGB_OLED_MENU) {
@@ -244,6 +244,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
if (keycode != KC_TRANSPARENT)
tap_code16(keycode);
}
+ return true;
}
#endif
diff --git a/keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c
index b587ef2b3d..1c8320ac6e 100644
--- a/keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -93,5 +93,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
#endif
diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c
index e38663dbb3..ed98a951c2 100644
--- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c
+++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c
@@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_BSPC, KC_DEL, KC_ENT, KC_SPC \
),
-
+
[_QWERTY] = LAYOUT( \
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_PGUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, KC_PGDN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, \
@@ -253,7 +253,7 @@ const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (!is_keyboard_master())
return;
@@ -274,6 +274,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
if (keycode != KC_TRANSPARENT)
tap_code16(keycode);
}
+ return true;
}
#endif
@@ -358,4 +359,4 @@ void oled_task_user(void) {
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c
index 2f0138c8e0..f31da8bf5d 100644
--- a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c
+++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -81,6 +81,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c
index f236e20a43..fa2b9a57b9 100644
--- a/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c
+++ b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c
@@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -126,6 +126,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c
index d313bec8b0..972fa4b057 100644
--- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c
+++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c
@@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -126,6 +126,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c
index 29702b614a..c4bcbcfbeb 100644
--- a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c
+++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c
@@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_PGDN);
@@ -81,4 +81,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_DOWN);
}
}
+ return true;
}
diff --git a/keyboards/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c
index b014e50393..ea078cbafa 100644
--- a/keyboards/rocketboard_16/keymaps/default/keymap.c
+++ b/keyboards/rocketboard_16/keymaps/default/keymap.c
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise){
+bool encoder_update_user(uint8_t index, bool clockwise){
if(index == 0) { // first encoder
if(clockwise){
tap_code(KC_AUDIO_VOL_UP);
@@ -51,6 +51,7 @@ void encoder_update_user(uint8_t index, bool clockwise){
rgblight_decrease_val();
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c
index b014e50393..ea078cbafa 100644
--- a/keyboards/rocketboard_16/keymaps/via/keymap.c
+++ b/keyboards/rocketboard_16/keymaps/via/keymap.c
@@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise){
+bool encoder_update_user(uint8_t index, bool clockwise){
if(index == 0) { // first encoder
if(clockwise){
tap_code(KC_AUDIO_VOL_UP);
@@ -51,6 +51,7 @@ void encoder_update_user(uint8_t index, bool clockwise){
rgblight_decrease_val();
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/rotr/rotr.c b/keyboards/rotr/rotr.c
index 2097bd9c14..b7c551075d 100644
--- a/keyboards/rotr/rotr.c
+++ b/keyboards/rotr/rotr.c
@@ -1,9 +1,11 @@
#include "rotr.h"
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/sck/gtm/keymaps/default/keymap.c b/keyboards/sck/gtm/keymaps/default/keymap.c
index 218a1d107e..e629087efc 100644
--- a/keyboards/sck/gtm/keymaps/default/keymap.c
+++ b/keyboards/sck/gtm/keymaps/default/keymap.c
@@ -14,11 +14,11 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_PGUP);
} else {
tap_code(KC_PGDN);
}
+ return true;
}
-
diff --git a/keyboards/sck/gtm/keymaps/tabs/keymap.c b/keyboards/sck/gtm/keymaps/tabs/keymap.c
index 9a60e0f053..6cc4b2c651 100644
--- a/keyboards/sck/gtm/keymaps/tabs/keymap.c
+++ b/keyboards/sck/gtm/keymaps/tabs/keymap.c
@@ -14,11 +14,11 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(C(KC_T));
} else {
tap_code16(C(KC_W));
}
+ return true;
}
-
diff --git a/keyboards/sck/gtm/keymaps/vol/keymap.c b/keyboards/sck/gtm/keymaps/vol/keymap.c
index e3d01439d3..3eaa696bb2 100644
--- a/keyboards/sck/gtm/keymaps/vol/keymap.c
+++ b/keyboards/sck/gtm/keymaps/vol/keymap.c
@@ -14,10 +14,11 @@ void matrix_init_user(void) {
debug_config.enable = 1;
}
-void encoder_update_user(int8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c
index ab227b9ac3..7206161018 100644
--- a/keyboards/sendyyeah/pix/keymaps/default/keymap.c
+++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ int get_icon_start_position(int key_position) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
static const char PROGMEM UP_ICON[] = {0x1E,0};
static const char PROGMEM DOWN_ICON[] = {0x1F,0};
if (index == 0) {
@@ -66,6 +66,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c
index ab227b9ac3..7206161018 100644
--- a/keyboards/sendyyeah/pix/keymaps/via/keymap.c
+++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c
@@ -31,7 +31,7 @@ int get_icon_start_position(int key_position) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
static const char PROGMEM UP_ICON[] = {0x1E,0};
static const char PROGMEM DOWN_ICON[] = {0x1F,0};
if (index == 0) {
@@ -66,6 +66,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
#ifdef OLED_DRIVER_ENABLE
diff --git a/keyboards/sidderskb/majbritt/rev2/keymaps/default/keymap.c b/keyboards/sidderskb/majbritt/rev2/keymaps/default/keymap.c
index a91945646e..141a4fcb91 100644
--- a/keyboards/sidderskb/majbritt/rev2/keymaps/default/keymap.c
+++ b/keyboards/sidderskb/majbritt/rev2/keymaps/default/keymap.c
@@ -45,11 +45,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
-
+ return true;
}
diff --git a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c
index 0dee1fb03a..a318dabede 100644
--- a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c
+++ b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c
@@ -25,20 +25,20 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_alice_split_bs(
- KC_ESC, 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_BSPC,
- 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
+ KC_ESC, 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_BSPC,
+ 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL),
[_FN] = LAYOUT_alice_split_bs(
- KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- RESET, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RESET, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_DOWN);
@@ -52,4 +52,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c
index a8f44e60dc..8092f46fcb 100644
--- a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c
+++ b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c
@@ -28,32 +28,32 @@ enum layer_names {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_alice_split_bs(
- KC_ESC, 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_BSPC,
- 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
+ KC_ESC, 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_BSPC,
+ 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI,
KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL),
[_FN] = LAYOUT_alice_split_bs(
- KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- RESET, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ RESET, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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),
[_L3] = LAYOUT_alice_split_bs(
- 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_L4] = LAYOUT_alice_split_bs(
- 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_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_DOWN);
@@ -67,4 +67,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_UP);
}
}
+ return true;
}
diff --git a/keyboards/sneakbox/disarray/ortho/keymaps/default/keymap.c b/keyboards/sneakbox/disarray/ortho/keymaps/default/keymap.c
index ef10af3220..020f01d60d 100644
--- a/keyboards/sneakbox/disarray/ortho/keymaps/default/keymap.c
+++ b/keyboards/sneakbox/disarray/ortho/keymaps/default/keymap.c
@@ -36,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, 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_HOME, KC_END, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -55,4 +55,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/sneakbox/disarray/ortho/keymaps/via/keymap.c b/keyboards/sneakbox/disarray/ortho/keymaps/via/keymap.c
index 01e83680f3..ed72fcbfbe 100644
--- a/keyboards/sneakbox/disarray/ortho/keymaps/via/keymap.c
+++ b/keyboards/sneakbox/disarray/ortho/keymaps/via/keymap.c
@@ -38,26 +38,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, 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_HOME, KC_END, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_L3] = LAYOUT(
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_HOME, KC_END, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_L4] = LAYOUT(
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),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -71,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/sneakbox/disarray/staggered/keymaps/default/keymap.c b/keyboards/sneakbox/disarray/staggered/keymaps/default/keymap.c
index 1c177013ad..3eedd078cd 100644
--- a/keyboards/sneakbox/disarray/staggered/keymaps/default/keymap.c
+++ b/keyboards/sneakbox/disarray/staggered/keymaps/default/keymap.c
@@ -33,14 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT),
[_FN] = LAYOUT(
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, RESET,
- 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, RESET,
+ 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),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/sneakbox/disarray/staggered/keymaps/via/keymap.c b/keyboards/sneakbox/disarray/staggered/keymaps/via/keymap.c
index 34da4d4ac8..2637d1b03f 100644
--- a/keyboards/sneakbox/disarray/staggered/keymaps/via/keymap.c
+++ b/keyboards/sneakbox/disarray/staggered/keymaps/via/keymap.c
@@ -36,28 +36,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT),
[_FN] = LAYOUT(
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, RESET,
- 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, RESET,
+ 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),
[_L3] = LAYOUT(
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_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),
[_L4] = LAYOUT(
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_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),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -71,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c
index 38200bfb7e..2360a45d47 100644
--- a/keyboards/sofle/keymaps/default/keymap.c
+++ b/keyboards/sofle/keymaps/default/keymap.c
@@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -387,6 +387,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/sofle/keymaps/via/encoder.c b/keyboards/sofle/keymaps/via/encoder.c
index 8126d077a2..f6e267e095 100644
--- a/keyboards/sofle/keymaps/via/encoder.c
+++ b/keyboards/sofle/keymaps/via/encoder.c
@@ -1,25 +1,25 @@
/* Copyright 2020 Josef Adamcik
* Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang
- *
- * 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 .
+ *
+ * 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 .
*/
//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via.
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLU);
@@ -33,6 +33,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/space_space/keymaps/big_space/keymap.c b/keyboards/space_space/keymaps/big_space/keymap.c
index 9aeeb2ef46..f99925971a 100644
--- a/keyboards/space_space/keymaps/big_space/keymap.c
+++ b/keyboards/space_space/keymaps/big_space/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
#include QMK_KEYBOARD_H
enum layers{
@@ -52,18 +52,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS,
- KC_TRNS, KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS
),
[_NAV] = LAYOUT_big_space(
KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC,
KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB,
KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT,
- KC_TRNS, KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 1) { /* left encoder*/
switch(get_highest_layer(layer_state)){
@@ -94,7 +94,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
} else if (index == 0) { /* right encoder */
switch(get_highest_layer(layer_state)){
-
+
case _SYM:
if (clockwise) {
tap_code(KC_MPRV);
@@ -112,6 +112,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#ifdef COMBO_ENABLE
diff --git a/keyboards/space_space/keymaps/default/keymap.c b/keyboards/space_space/keymaps/default/keymap.c
index 81b53abfe5..3de82fa923 100644
--- a/keyboards/space_space/keymaps/default/keymap.c
+++ b/keyboards/space_space/keymaps/default/keymap.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-
+
#include QMK_KEYBOARD_H
enum layers{
@@ -47,25 +47,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_NUM] = LAYOUT_default(
KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC,
KC_PLUS, KC_P4, KC_P5, KC_P6, KC_BSPC, KC_LSFT, KC_TRNS, KC_TRNS, KC_SCLN, KC_COLN, KC_TAB,
KC_PAST, KC_P1, KC_P2, KC_P3, KC_ENT, KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT,
- KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[_NAV] = LAYOUT_default(
KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC,
KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB,
KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_LCAP, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 1) { /* left encoder*/
switch(get_highest_layer(layer_state)){
@@ -96,7 +96,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
} else if (index == 0) { /* right encoder */
switch(get_highest_layer(layer_state)){
-
+
case _SYM:
if (clockwise) {
tap_code(KC_MPRV);
@@ -114,6 +114,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#ifdef COMBO_ENABLE
diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
index 9d3919ee28..d9e1f44e29 100644
--- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c
+++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c
@@ -122,19 +122,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) {
}
- void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code16(KC_VOLU);
} else {
tap_code16(KC_VOLD);
}
-# ifdef OLED_DRIVER_ENABLE
- oled_timer = timer_read32();
-# endif
-# if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY)
- if (is_audio_on() && is_clicky_on()) clicky_play();
-# endif
-# ifdef HAPTIC_ENABLE
- if (haptic_config.enable) haptic_play();
-# endif
+ return true;
}
diff --git a/keyboards/splitkb/zima/zima.c b/keyboards/splitkb/zima/zima.c
index 3989ebeb29..74f9c84a79 100644
--- a/keyboards/splitkb/zima/zima.c
+++ b/keyboards/splitkb/zima/zima.c
@@ -93,12 +93,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
#endif
#ifdef ENCODER_ENABLE
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
- if (clockwise) {
- tap_code16(KC_VOLU);
- } else {
- tap_code16(KC_VOLD);
- }
+bool encoder_update_kb(uint8_t index, bool clockwise) {
# ifdef OLED_DRIVER_ENABLE
oled_timer = timer_read32();
# endif
@@ -108,5 +103,12 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
# ifdef HAPTIC_ENABLE
if (haptic_config.enable) haptic_play();
# endif
+ if (!encoder_update_user(index, clockwise)) return false;
+ if (clockwise) {
+ tap_code16(KC_VOLU);
+ } else {
+ tap_code16(KC_VOLD);
+ }
+ return true;
}
#endif
diff --git a/keyboards/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/swiftrax/retropad/keymaps/default/keymap.c
index 8b9992e1d7..6fd2ff5daa 100644
--- a/keyboards/swiftrax/retropad/keymaps/default/keymap.c
+++ b/keyboards/swiftrax/retropad/keymaps/default/keymap.c
@@ -33,11 +33,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, KC_PGDN),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if(IS_LAYER_ON(2)){
if (clockwise)
tap_code(KC_LEFT);
- else
+ else
tap_code(KC_RGHT);
}
else{
@@ -46,6 +46,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else
tap_code(KC_VOLD);
}
+ return true;
}
void matrix_init_user(void) {
@@ -66,4 +67,4 @@ layer_state_t layer_state_set_user(layer_state_t state) {
writePin(D4, !layer_state_cmp(state, 1));
writePin(D3, !layer_state_cmp(state, 2));
return state;
-}
\ No newline at end of file
+}
diff --git a/keyboards/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/swiftrax/retropad/keymaps/via/keymap.c
index 8b9992e1d7..6fd2ff5daa 100644
--- a/keyboards/swiftrax/retropad/keymaps/via/keymap.c
+++ b/keyboards/swiftrax/retropad/keymaps/via/keymap.c
@@ -33,11 +33,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_END, KC_PGDN),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if(IS_LAYER_ON(2)){
if (clockwise)
tap_code(KC_LEFT);
- else
+ else
tap_code(KC_RGHT);
}
else{
@@ -46,6 +46,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
else
tap_code(KC_VOLD);
}
+ return true;
}
void matrix_init_user(void) {
@@ -66,4 +67,4 @@ layer_state_t layer_state_set_user(layer_state_t state) {
writePin(D4, !layer_state_cmp(state, 1));
writePin(D3, !layer_state_cmp(state, 2));
return state;
-}
\ No newline at end of file
+}
diff --git a/keyboards/taleguers/taleguers75/taleguers75.c b/keyboards/taleguers/taleguers75/taleguers75.c
index 684d54a38d..97664effde 100644
--- a/keyboards/taleguers/taleguers75/taleguers75.c
+++ b/keyboards/taleguers/taleguers75/taleguers75.c
@@ -17,10 +17,12 @@
#include "taleguers75.h"
-__attribute__ ((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (!clockwise) {
tap_code(KC_AUDIO_VOL_DOWN);
} else {
tap_code(KC_AUDIO_VOL_UP);
}
+ return true;
}
diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c
index aff188e4c6..f5585ce2a0 100755
--- a/keyboards/tau4/keymaps/default/keymap.c
+++ b/keyboards/tau4/keymaps/default/keymap.c
@@ -101,7 +101,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -109,6 +109,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/terrazzo/keymaps/default/keymap.c b/keyboards/terrazzo/keymaps/default/keymap.c
index 9392a60557..b6439aa8e9 100644
--- a/keyboards/terrazzo/keymaps/default/keymap.c
+++ b/keyboards/terrazzo/keymaps/default/keymap.c
@@ -36,41 +36,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
- TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH,
+ TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH,
TZ_OFF, KC_LGUI, KC_RALT, LOWERSP, RAISESP, MO(_NAV), MO(_FN)
),
-
+
[_RAISE] = LAYOUT(
_______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT(
_______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______,
_______, _______, _______, _______, _______, _______, _______
),
[_NAV] = LAYOUT(
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
_______, _______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
- _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG,
+ _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG,
_______, RESET, _______, _______, _______, _______, _______
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -81,5 +81,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
// Default encoder behavior of Page Up and Down
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/terrazzo/keymaps/ortho/keymap.c b/keyboards/terrazzo/keymaps/ortho/keymap.c
index c2085c4148..986cb884d7 100644
--- a/keyboards/terrazzo/keymaps/ortho/keymap.c
+++ b/keyboards/terrazzo/keymaps/ortho/keymap.c
@@ -36,40 +36,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_ortho(
KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, LOWERSP, RAISESP, MO(_NAV), MO(_FN), KC_DEL
),
[_RAISE] = LAYOUT_ortho(
_______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT_ortho(
_______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_NAV] = LAYOUT_ortho(
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT_ortho(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
- _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
+ _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
_______, RESET, _______, _______, _______, _______, _______, _______, _______
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -80,5 +80,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
// Default encoder behavior of Page Up and Down
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/terrazzo/keymaps/ortho_all/keymap.c b/keyboards/terrazzo/keymaps/ortho_all/keymap.c
index ba33c15fbd..b0ecd9c911 100644
--- a/keyboards/terrazzo/keymaps/ortho_all/keymap.c
+++ b/keyboards/terrazzo/keymaps/ortho_all/keymap.c
@@ -16,7 +16,7 @@
/* Ortho layout with all 1u
* make terrazzo:othro_all
- */
+ */
#include QMK_KEYBOARD_H
enum layers {
@@ -36,40 +36,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_ortho_all(
KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), MO(_NAV), MO(_FN), KC_DEL
),
[_RAISE] = LAYOUT_ortho_all(
_______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT_ortho_all(
_______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_NAV] = LAYOUT_ortho_all(
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,_______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT_ortho_all(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
- _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
+ _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -80,5 +80,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
/* Default encoder behavior of Page Up and Down */
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/terrazzo/keymaps/ortho_mit/keymap.c b/keyboards/terrazzo/keymaps/ortho_mit/keymap.c
index ab63f53952..87e6d3f786 100644
--- a/keyboards/terrazzo/keymaps/ortho_mit/keymap.c
+++ b/keyboards/terrazzo/keymaps/ortho_mit/keymap.c
@@ -33,41 +33,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_ortho_mit(
KC_MUTE, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
TZ_NXT, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
- TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ TZ_PRV, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
TZ_OFF, KC_TAB, KC_LGUI, KC_RALT, MO(_LOWER), KC_SPC, MO(_RAISE), MO(_NAV), MO(_FN), KC_DEL
),
[_RAISE] = LAYOUT_ortho_mit(
_______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_LBRC, KC_RBRC, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_LOWER] = LAYOUT_ortho_mit(
_______, KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_COLN, KC_DQT, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_LCBR, KC_RCBR, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_NAV] = LAYOUT_ortho_mit(
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,_______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_FN] = LAYOUT_ortho_mit(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
- _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
- _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
+ _______, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, KC_F12, _______, _______,
+ _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, CG_TOGG,
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -78,5 +78,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
/* Default encoder behavior of Page Up and Down */
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
- }
-}
\ No newline at end of file
+ }
+ return true;
+}
diff --git a/keyboards/terrazzo/readme.md b/keyboards/terrazzo/readme.md
index 08cecd6a64..e0f4f3457f 100644
--- a/keyboards/terrazzo/readme.md
+++ b/keyboards/terrazzo/readme.md
@@ -93,7 +93,7 @@ Terrazzo has 4 positions for encoders in the left-hand column. Up to 3 may be us
The default keymaps are setup for one encoder. Encoders can change behavior based on the current layer. Here, on the "NAV" layer, the encoder changes volume instead of scrolling.
```c
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(get_highest_layer(layer_state)) {
case _NAV:
@@ -105,13 +105,14 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
break;
}
+ return true;
}
```
If using multiple encoders, the `index` param can be used to distingish which is providing input.
```c
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
terrazzo_scroll_pixel(clockwise);
switch(index) {
case 0:
@@ -121,5 +122,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
clockwise ? tap_code(KC_AUDIO_VOL_UP) : tap_code(KC_AUDIO_VOL_DOWN);
break;
}
+ return true;
}
-```
\ No newline at end of file
+```
diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c
index c1b5ad2b1f..1b53ea80b9 100755
--- a/keyboards/tetris/keymaps/default/keymap.c
+++ b/keyboards/tetris/keymaps/default/keymap.c
@@ -149,7 +149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t * record) {
return (true);
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+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);
@@ -183,4 +183,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}));
}
}
+ return true;
}
diff --git a/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c b/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c
index 486db5070e..15b6df3b1a 100644
--- a/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c
+++ b/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c
@@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[0] = LAYOUT_ortho_3x3(
- KC_MPRV, LT(2, KC_MUTE), KC_MNXT,
+ KC_MPRV, LT(2, KC_MUTE), KC_MNXT,
KC_MSTP, KC_MPLY, KC_MSEL,
KC_CALC, KC_MAIL, LT(1, KC_MYCM)
),
@@ -28,14 +28,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | SAT+ | SAT- | |
* `-----------------------'
*/
-
+
[1] = LAYOUT_ortho_3x3(
- RGB_MOD, RGB_TOG, RGB_RMOD,
- RGB_SPI, RGB_SPD, RGB_VAI,
+ RGB_MOD, RGB_TOG, RGB_RMOD,
+ RGB_SPI, RGB_SPD, RGB_VAI,
RGB_SAI, RGB_SAD, KC_TRNS
),
-
+
/* LAYER 2 (ENCODER)
* ,-----------------------.
* | | | | ENCODER - PRESS (NA) / KNOB (Arrow Left/Right)
@@ -45,17 +45,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | |
* `-----------------------'
*/
-
+
[2] = LAYOUT_ortho_3x3(
- 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
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
-
+bool encoder_update_user(uint8_t index, bool clockwise) {
+
switch (get_highest_layer(layer_state)) {
case 1:
if (clockwise) {
@@ -78,6 +78,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
break;
-
+
}
+ return true;
}
diff --git a/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c b/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c
index e487c27262..8fc7e2a27b 100644
--- a/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c
+++ b/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c
@@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[0] = LAYOUT_ortho_3x3(
- KC_MPRV, LT(2, KC_MUTE), KC_MNXT,
+ KC_MPRV, LT(2, KC_MUTE), KC_MNXT,
KC_MSTP, KC_MPLY, KC_MSEL,
KC_CALC, KC_MAIL, LT(1, KC_MYCM)
),
@@ -28,14 +28,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | SAT+ | SAT- | |
* `-----------------------'
*/
-
+
[1] = LAYOUT_ortho_3x3(
- RGB_MOD, RGB_TOG, RGB_RMOD,
- RGB_SPI, RGB_SPD, RGB_VAI,
+ RGB_MOD, RGB_TOG, RGB_RMOD,
+ RGB_SPI, RGB_SPD, RGB_VAI,
RGB_SAI, RGB_SAD, KC_TRNS
),
-
+
/* LAYER 2 (ENCODER)
* ,-----------------------.
* | | | | ENCODER - PRESS (NA) / KNOB (Arrow Left/Right)
@@ -45,17 +45,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | |
* `-----------------------'
*/
-
+
[2] = LAYOUT_ortho_3x3(
- 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
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
-
+bool encoder_update_user(uint8_t index, bool clockwise) {
+
switch (get_highest_layer(layer_state)) {
case 1:
if (clockwise) {
@@ -78,6 +78,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
break;
-
+
}
+ return true;
}
diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c
index b4cf6ed025..53a2fd85cc 100644
--- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c
+++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c
@@ -421,7 +421,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
#endif
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise){
+bool encoder_update_user(uint8_t index, bool clockwise){
if (index == 0) {
switch (get_highest_layer(layer_state)) {
@@ -462,5 +462,6 @@ void encoder_update_user(uint8_t index, bool clockwise){
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c
index bf9d905843..300b698bb8 100644
--- a/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c
+++ b/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c
@@ -32,7 +32,7 @@
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
@@ -73,5 +73,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c
index 618d336cdb..4a3a83e45a 100644
--- a/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c
+++ b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c
@@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise){
+bool encoder_update_user(uint8_t index, bool clockwise){
if (index == 0) {
switch (get_highest_layer(layer_state)) {
@@ -68,5 +68,6 @@ void encoder_update_user(uint8_t index, bool clockwise){
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c
index c794c9c643..f7139b70b1 100644
--- a/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c
+++ b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c
@@ -9,22 +9,22 @@ enum layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_encoder(
- 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_GRV,
- 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_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_NUHS, KC_ENT, KC_PGUP,
- KC_MPLY, 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_PGDN,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
+ 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_GRV,
+ 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_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_NUHS, KC_ENT, KC_PGUP,
+ KC_MPLY, 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_PGDN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_encoder(
/* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */
- 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, KC_DEL, RESET,
+ 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, KC_DEL, RESET,
/* tab Q W E R T Y U I O P [ ] delete */
- RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS,
+ RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS,
/* caps A S D F G H J K L ; ' # enter pg up */
- RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME,
+ RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME,
/* shift \ Z X C V B N M , . / shift up pg dn */
- KC_MPLY, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END,
+ KC_MPLY, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END,
/* ctrl win alt space alt fn ctrl left down right */
KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS
)
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise){
+bool encoder_update_user(uint8_t index, bool clockwise){
if (index == 0) {
switch (get_highest_layer(layer_state)) {
@@ -75,5 +75,6 @@ void encoder_update_user(uint8_t index, bool clockwise){
break;
}
}
+ return true;
}
#endif
diff --git a/keyboards/torn/torn_encoder.c b/keyboards/torn/torn_encoder.c
index 9178388d0f..64804ac3a9 100644
--- a/keyboards/torn/torn_encoder.c
+++ b/keyboards/torn/torn_encoder.c
@@ -38,11 +38,13 @@ const uint16_t encoder_default[2][2] = { { KC_PGDN, KC_PGUP }, { KC__VOLDOWN, K
/**
* Tap on encoder updates using the encoder keymap
*/
-void encoder_update_kb(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ // if (!encoder_update_user(index, clockwise)) return false;
+
uint16_t code;
if (encoder_keymaps) {
- int layer = get_highest_layer(layer_state);
+ uint8_t layer = get_highest_layer(layer_state);
do {
code = pgm_read_word(&encoder_keymaps[layer--][index][clockwise]);
} while (code == KC_TRNS);
@@ -51,6 +53,7 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
}
tap_code16(code);
+ return true;
}
static bool encoder_read_state(uint8_t *state) {
diff --git a/keyboards/tunks/ergo33/keymaps/default/keymap.c b/keyboards/tunks/ergo33/keymaps/default/keymap.c
index 664f7b415e..7234acf1df 100644
--- a/keyboards/tunks/ergo33/keymaps/default/keymap.c
+++ b/keyboards/tunks/ergo33/keymaps/default/keymap.c
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_WH_DOWN);
@@ -54,6 +54,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_UP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/tunks/ergo33/keymaps/prpro/keymap.c b/keyboards/tunks/ergo33/keymaps/prpro/keymap.c
index 2ccba8b1e0..db49eeb7f8 100644
--- a/keyboards/tunks/ergo33/keymaps/prpro/keymap.c
+++ b/keyboards/tunks/ergo33/keymaps/prpro/keymap.c
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_MS_WH_DOWN);
@@ -99,6 +99,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_MS_WH_UP);
}
}
+ return true;
}
#endif
diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c
index 4ddec6c429..880b225d43 100644
--- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c
+++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c
@@ -92,12 +92,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
+ return true;
}
uint8_t divisor = 0;
diff --git a/keyboards/ungodly/nines/nines.c b/keyboards/ungodly/nines/nines.c
index 3b29b268d7..08f8a9ad74 100644
--- a/keyboards/ungodly/nines/nines.c
+++ b/keyboards/ungodly/nines/nines.c
@@ -15,7 +15,8 @@
*/
#include "nines.h"
-__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) return false;
if (index == 0) { /* Left encoder */
if (clockwise) {
tap_code(KC_VOLU);
@@ -29,4 +30,5 @@ __attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLD);
}
}
+ return true;
}
diff --git a/keyboards/vn66/keymaps/default/keymap.c b/keyboards/vn66/keymaps/default/keymap.c
index cf7ed98ef4..6b5bb083d3 100644
--- a/keyboards/vn66/keymaps/default/keymap.c
+++ b/keyboards/vn66/keymaps/default/keymap.c
@@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise == 0) {
#ifdef MOUSEKEY_ENABLE
tap_code(KC_MS_WH_DOWN);
@@ -54,4 +54,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
#endif
}
+ return true;
}
diff --git a/keyboards/walletburner/cajal/keymaps/default/keymap.c b/keyboards/walletburner/cajal/keymaps/default/keymap.c
index 0a9837df72..b985417537 100644
--- a/keyboards/walletburner/cajal/keymaps/default/keymap.c
+++ b/keyboards/walletburner/cajal/keymaps/default/keymap.c
@@ -74,7 +74,7 @@ bool led_update_user(led_t led_state) {
return false;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -82,5 +82,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
-
diff --git a/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c b/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c
index c1a3a1e224..394a744e6d 100644
--- a/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c
+++ b/keyboards/walletburner/cajal/keymaps/default_ortho/keymap.c
@@ -71,7 +71,7 @@ bool led_update_user(led_t led_state) {
return false;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
@@ -79,4 +79,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
diff --git a/keyboards/yeehaw/keymaps/default/keymap.c b/keyboards/yeehaw/keymaps/default/keymap.c
index abcbc838a9..20bdbf581e 100644
--- a/keyboards/yeehaw/keymaps/default/keymap.c
+++ b/keyboards/yeehaw/keymaps/default/keymap.c
@@ -43,7 +43,7 @@ KC_TRNS, RGB_SAD, RGB_M_P, RGB_MOD, RGB_SPD,
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -51,6 +51,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/yeehaw/keymaps/via/keymap.c b/keyboards/yeehaw/keymaps/via/keymap.c
index e1d10bf0ed..dfb0bdd568 100644
--- a/keyboards/yeehaw/keymaps/via/keymap.c
+++ b/keyboards/yeehaw/keymaps/via/keymap.c
@@ -62,7 +62,7 @@ _______, _______, _______, _______, _______,
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -70,6 +70,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_VOLU);
}
}
+ return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/yushakobo/quick7/keymaps/default/keymap.c b/keyboards/yushakobo/quick7/keymaps/default/keymap.c
index 3137f5853d..385e89277b 100644
--- a/keyboards/yushakobo/quick7/keymaps/default/keymap.c
+++ b/keyboards/yushakobo/quick7/keymaps/default/keymap.c
@@ -54,7 +54,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Left encoder
if (clockwise) {
tap_code(KC_VOLU);
@@ -69,4 +69,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_increase_hue_noeeprom();
}
}
+ return true;
}
diff --git a/keyboards/yushakobo/quick7/keymaps/tester/keymap.c b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c
index 57e4a28f30..d89bfd034d 100644
--- a/keyboards/yushakobo/quick7/keymaps/tester/keymap.c
+++ b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c
@@ -114,7 +114,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Left encoder
if (clockwise) {
tap_code(KC_VOLU);
@@ -129,6 +129,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_increase_hue_noeeprom();
}
}
+ return true;
}
const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS(
@@ -154,4 +155,4 @@ bool led_update_user(led_t led_state){
rgblight_set_layer_state(0, led_state.caps_lock);
rgblight_set_layer_state(1, led_state.num_lock);
return true;
-}
\ No newline at end of file
+}
diff --git a/keyboards/yushakobo/quick7/keymaps/via/keymap.c b/keyboards/yushakobo/quick7/keymaps/via/keymap.c
index 9c64042bc5..122decc92a 100644
--- a/keyboards/yushakobo/quick7/keymaps/via/keymap.c
+++ b/keyboards/yushakobo/quick7/keymaps/via/keymap.c
@@ -66,7 +66,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Left encoder
if (clockwise) {
tap_code(KC_VOLU);
@@ -81,4 +81,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
rgblight_increase_hue_noeeprom();
}
}
+ return true;
}
diff --git a/keyboards/ztboards/after/keymaps/default/keymap.c b/keyboards/ztboards/after/keymaps/default/keymap.c
index 7dfb9e1261..a317884d3e 100644
--- a/keyboards/ztboards/after/keymaps/default/keymap.c
+++ b/keyboards/ztboards/after/keymaps/default/keymap.c
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (get_highest_layer(layer_state)) {
case 1:
@@ -42,4 +42,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/ztboards/after/keymaps/ellicose/keymap.c b/keyboards/ztboards/after/keymaps/ellicose/keymap.c
index b7e65bbf14..88c1d5839a 100644
--- a/keyboards/ztboards/after/keymaps/ellicose/keymap.c
+++ b/keyboards/ztboards/after/keymaps/ellicose/keymap.c
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
/* Custom encoder control - handles CW/CCW turning of encoder
* Default behavior:
* main layer:
@@ -29,7 +29,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
* other layers:
* CW: = (equals/plus - increase slider in Adobe products)
* CCW: - (minus/underscore - decrease slider in adobe products)
- * Thank you to imchipwood/dumbpad for defining this.
+ * Thank you to imchipwood/dumbpad for defining this.
*/
if (index == 0) {
switch(get_highest_layer(layer_state)) {
@@ -52,4 +52,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
}
diff --git a/keyboards/ztboards/after/keymaps/phlop/keymap.c b/keyboards/ztboards/after/keymaps/phlop/keymap.c
index 15a91d51ad..5d4fd97599 100644
--- a/keyboards/ztboards/after/keymaps/phlop/keymap.c
+++ b/keyboards/ztboards/after/keymaps/phlop/keymap.c
@@ -20,12 +20,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch(get_highest_layer(layer_state)) {
case 1: //EDIT THESE FOR THE ENCODER'S FUNCTION WHEN PRESSING MO(1)
if (clockwise) {
- tap_code16 (KC_VOLU);
+ tap_code16 (KC_VOLU);
} else {
tap_code16(KC_VOLD);
}
@@ -39,4 +39,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
break;
}
}
+ return true;
};
diff --git a/layouts/community/ortho_4x12/bocaj/keymap.c b/layouts/community/ortho_4x12/bocaj/keymap.c
index 89d4d1d9ab..6adbb6d61b 100644
--- a/layouts/community/ortho_4x12/bocaj/keymap.c
+++ b/layouts/community/ortho_4x12/bocaj/keymap.c
@@ -237,7 +237,7 @@ void rgb_matrix_indicators_user(void) {
void matrix_init_keymap(void) {}
#ifdef ENCODER_ENABLE
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _RAISE:
clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
@@ -260,6 +260,7 @@ void encoder_update(bool clockwise) {
# ifdef AUDIO_CLICKY
clicky_play();
# endif
+ return true;
}
#endif // ENCODER_ENABLE
diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c
index d4c1a4a867..ea9d295064 100644
--- a/layouts/community/ortho_4x12/brandonschlack/keymap.c
+++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c
@@ -121,7 +121,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_keymap(uint8_t index, bool clockwise) {
+bool encoder_update_keymap(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -151,6 +151,7 @@ void encoder_update_keymap(uint8_t index, bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/layouts/community/ortho_4x12/buswerks/keymap.c b/layouts/community/ortho_4x12/buswerks/keymap.c
index 95d9e7019a..455db2a8a5 100644
--- a/layouts/community/ortho_4x12/buswerks/keymap.c
+++ b/layouts/community/ortho_4x12/buswerks/keymap.c
@@ -142,7 +142,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (IS_LAYER_ON(_RAISE) || IS_LAYER_ON(_LOWER)) {
if (clockwise) {
register_code(KC_VOLU);
@@ -170,6 +170,5 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
-
-
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 61f22dfe95..1f3176e368 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -348,7 +348,7 @@ void matrix_init_keymap(void) {
#endif // RGB_MATRIX_INIT
#ifdef ENCODER_ENABLE
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _RAISE:
clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
@@ -371,6 +371,7 @@ void encoder_update(bool clockwise) {
# ifdef AUDIO_CLICKY
clicky_play();
# endif
+ return true;
}
#endif // ENCODER_ENABLE
diff --git a/layouts/community/ortho_4x12/jackhumbert/keymap.c b/layouts/community/ortho_4x12/jackhumbert/keymap.c
index f9a3e1686f..08abf78d14 100644
--- a/layouts/community/ortho_4x12/jackhumbert/keymap.c
+++ b/layouts/community/ortho_4x12/jackhumbert/keymap.c
@@ -130,7 +130,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
};
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
#ifdef MOUSEKEY_ENABLE
tap_code(KC_MS_WH_DOWN);
@@ -144,6 +144,7 @@ void encoder_update(bool clockwise) {
tap_code(KC_PGUP);
#endif
}
+ return true;
}
bool music_mask_user(uint16_t keycode) {
diff --git a/layouts/community/ortho_4x12/juno/keymap.c b/layouts/community/ortho_4x12/juno/keymap.c
index 2b16b9955e..b3ef8fce53 100644
--- a/layouts/community/ortho_4x12/juno/keymap.c
+++ b/layouts/community/ortho_4x12/juno/keymap.c
@@ -10,7 +10,7 @@ enum planck_layers {
_RAISE,
_PLOVER,
_ADJUST,
-
+
_FN1,
_DPAD,
_DPADNUM
@@ -23,7 +23,7 @@ enum planck_keycodes {
PLOVER,
BACKLIT,
EXT_PLV,
-
+
DP_ON,
DP_OFF
};
@@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, 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_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT),
- KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
+ KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
),
/* Colemak
@@ -218,10 +218,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef AUDIO_ENABLE
float plover_song[][2] = SONG(PLOVER_SOUND);
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
-
+
// Borrowing audio from unused audio
// Caps Lock on and off sound too similar
-
+
float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND);
float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND);
@@ -236,7 +236,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
#else
-
+
layer_state_t layer_state_set_user(layer_state_t state) {
// LED control, lighting up when Fn layer is activated
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
@@ -256,7 +256,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
-#endif
+#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
@@ -324,8 +324,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
-
-
+
+
// Play audio upon switching Caps Lock and custom layers
case KC_CAPS:
@@ -339,26 +339,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
return true;
-
+
case DP_ON:
if (record->event.pressed) {
-
+
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(dpad_song_on);
#endif
-
+
layer_off(_FN1);
layer_on(_DPAD);
}
-
+
case DP_OFF:
if (record->event.pressed) {
- #ifdef AUDIO_ENABLE
+ #ifdef AUDIO_ENABLE
PLAY_SONG(dpad_song_off);
#endif
-
- layer_off(_DPAD);
+
+ layer_off(_DPAD);
}
}
return true;
@@ -370,7 +370,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -392,6 +392,7 @@ void encoder_update(bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c
index 67f7efde45..82ff4d63a7 100644
--- a/layouts/community/ortho_4x12/junonum/keymap.c
+++ b/layouts/community/ortho_4x12/junonum/keymap.c
@@ -268,7 +268,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -290,6 +290,7 @@ void encoder_update(bool clockwise) {
tap_code(KC_PGUP);
}
}
+ return true;
}
void dip_update(uint8_t index, bool active) {
diff --git a/layouts/community/ortho_4x12/mguterl/keymap.c b/layouts/community/ortho_4x12/mguterl/keymap.c
index 2be2d449e3..66039b61e6 100644
--- a/layouts/community/ortho_4x12/mguterl/keymap.c
+++ b/layouts/community/ortho_4x12/mguterl/keymap.c
@@ -257,7 +257,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -287,6 +287,7 @@ void encoder_update(bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/layouts/community/ortho_4x12/mindsound/keymap.c b/layouts/community/ortho_4x12/mindsound/keymap.c
index 613f11d134..336545502f 100644
--- a/layouts/community/ortho_4x12/mindsound/keymap.c
+++ b/layouts/community/ortho_4x12/mindsound/keymap.c
@@ -185,7 +185,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void encoder_update(bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
register_code(KC_VOLU);
unregister_code(KC_VOLU);
@@ -193,6 +193,7 @@ void encoder_update(bool clockwise) {
register_code(KC_VOLD);
unregister_code(KC_VOLD);
}
+ return true;
}
// flicker implementation:
diff --git a/layouts/community/ortho_5x12/brandonschlack/keymap.c b/layouts/community/ortho_5x12/brandonschlack/keymap.c
index 4d7b7483ad..c9c94fc967 100644
--- a/layouts/community/ortho_5x12/brandonschlack/keymap.c
+++ b/layouts/community/ortho_5x12/brandonschlack/keymap.c
@@ -116,7 +116,7 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
-void encoder_update_keymap(uint8_t index, bool clockwise) {
+bool encoder_update_keymap(uint8_t index, bool clockwise) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
@@ -146,6 +146,7 @@ void encoder_update_keymap(uint8_t index, bool clockwise) {
#endif
}
}
+ return true;
}
void dip_switch_update_user(uint8_t index, bool active) {
diff --git a/quantum/encoder.c b/quantum/encoder.c
index 2ed64c1e30..c30bf01cb2 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -59,9 +59,9 @@ static uint8_t thisHand, thatHand;
static uint8_t encoder_value[NUMBER_OF_ENCODERS] = {0};
#endif
-__attribute__((weak)) void encoder_update_user(int8_t index, bool clockwise) {}
+__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return true; }
-__attribute__((weak)) void encoder_update_kb(int8_t index, bool clockwise) { encoder_update_user(index, clockwise); }
+__attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) { return encoder_update_user(index, clockwise); }
void encoder_init(void) {
#if defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT)
@@ -94,14 +94,14 @@ void encoder_init(void) {
#endif
}
-static bool encoder_update(int8_t index, uint8_t state) {
+static bool encoder_update(uint8_t index, uint8_t state) {
bool changed = false;
uint8_t i = index;
#ifdef ENCODER_RESOLUTIONS
- int8_t resolution = encoder_resolutions[i];
+ uint8_t resolution = encoder_resolutions[i];
#else
- int8_t resolution = ENCODER_RESOLUTION;
+ uint8_t resolution = ENCODER_RESOLUTION;
#endif
#ifdef SPLIT_KEYBOARD
diff --git a/quantum/encoder.h b/quantum/encoder.h
index db6f220da4..25dc77721d 100644
--- a/quantum/encoder.h
+++ b/quantum/encoder.h
@@ -22,8 +22,8 @@
void encoder_init(void);
bool encoder_read(void);
-void encoder_update_kb(int8_t index, bool clockwise);
-void encoder_update_user(int8_t index, bool clockwise);
+bool encoder_update_kb(uint8_t index, bool clockwise);
+bool encoder_update_user(uint8_t index, bool clockwise);
#ifdef SPLIT_KEYBOARD
void encoder_state_raw(uint8_t* slave_state);
diff --git a/quantum/quantum.h b/quantum/quantum.h
index fe6bf310aa..e4a7c5723c 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -200,6 +200,10 @@ extern layer_state_t layer_state;
# include "usbpd.h"
#endif
+#ifdef ENCODER_ENABLE
+# include "encoder.h"
+#endif
+
// For tri-layer
void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3);
layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3);
diff --git a/users/greatwizard/greatwizard.c b/users/greatwizard/greatwizard.c
index 46ee414361..3ec856d720 100644
--- a/users/greatwizard/greatwizard.c
+++ b/users/greatwizard/greatwizard.c
@@ -70,7 +70,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#ifdef ENCODER_ENABLE
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
switch (get_highest_layer(layer_state)) {
case _QWERTY:
#ifdef LAYERS_PROGRAMMER
@@ -90,6 +90,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
break;
}
+ return true;
}
#endif
diff --git a/users/kuchosauronad0/encoder.c b/users/kuchosauronad0/encoder.c
index 06b7b51233..9284a041c2 100644
--- a/users/kuchosauronad0/encoder.c
+++ b/users/kuchosauronad0/encoder.c
@@ -1,5 +1,5 @@
#include "encoder.h"
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
static uint16_t kc;
uint8_t temp_mod = get_mods();
if (index == 0) { /* first encoder */
@@ -55,6 +55,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code(KC_1);
}
}
+ return true;
}
const uint16_t PROGMEM encoder_actions[][9] = { \
// None CTRL ALT SHIFT GUI CTRL+ALT CTRL+SHFT ALT+SHFT HYPER
diff --git a/users/kuchosauronad0/encoder.h b/users/kuchosauronad0/encoder.h
index 2610c9677a..7b05aa4911 100644
--- a/users/kuchosauronad0/encoder.h
+++ b/users/kuchosauronad0/encoder.h
@@ -1,4 +1,4 @@
#pragma once
#include "quantum.h"
const uint16_t PROGMEM encoder_actions[][9];
-void encoder_update_user(uint8_t index, bool clockwise);
+bool encoder_update_user(uint8_t index, bool clockwise);
diff --git a/users/ninjonas/encoder.c b/users/ninjonas/encoder.c
index 3d56ff89ee..f1b448b79b 100644
--- a/users/ninjonas/encoder.c
+++ b/users/ninjonas/encoder.c
@@ -15,7 +15,7 @@
*/
#include "ninjonas.h"
-#ifdef ENCODER_ENABLE
+#ifdef ENCODER_ENABLE
void left_encoder_cw(void) {
switch (get_highest_layer(layer_state)) {
case _LOWER:
@@ -81,7 +81,7 @@ void right_encoder_acw(void) {
}
}
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
encoder_rotated_timer = timer_read();
if (index == 0) {
left_encoder_rotated = true;
@@ -99,6 +99,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
right_encoder_acw();
}
}
+ return true;
}
-#endif
\ No newline at end of file
+#endif
diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c
index d5e56571d1..f8555d87bd 100644
--- a/users/stanrc85/stanrc85.c
+++ b/users/stanrc85/stanrc85.c
@@ -45,7 +45,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
}
#if defined(HAS_ROTARY)
- void encoder_update_user(uint8_t index, bool clockwise) {
+ bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLD);
@@ -53,6 +53,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
tap_code(KC_VOLU);
}
}
+ return true;
}
#endif
@@ -75,7 +76,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
writePin(INDICATOR_PIN_1, !led_user);
wait_ms(200);
writePin(INDICATOR_PIN_2, !led_user);
- #endif
+ #endif
break;
case SINGLE_HOLD:
break;
@@ -91,7 +92,7 @@ void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
writePin(INDICATOR_PIN_1, !led_user);
wait_ms(200);
writePin(INDICATOR_PIN_0, !led_user);
- #endif
+ #endif
break;
}
}
diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c
index cd029944ff..acd0275a8b 100644
--- a/users/xulkal/custom_encoder.c
+++ b/users/xulkal/custom_encoder.c
@@ -58,7 +58,7 @@ const uint16_t PROGMEM encoders[][2] = {
{ KC_VOLU, KC_VOLD }
};
-void encoder_update_user(uint8_t index, bool clockwise)
+bool encoder_update_user(uint8_t index, bool clockwise)
{
if (!is_keyboard_master())
return;
@@ -69,4 +69,5 @@ void encoder_update_user(uint8_t index, bool clockwise)
else
#endif // RGB_OLED_MENU
tap_code16(pgm_read_word(&encoders[index][clockwise]));
+ return true;
}
--
cgit v1.2.3
From 06aea834c420d5c11bbcf64d37596cb0cee9af98 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 27 May 2021 15:21:15 +1000
Subject: Backlight: add defines for default level and breathing state (#12560)
---
docs/feature_backlight.md | 20 +++++++++++---------
quantum/backlight/backlight.c | 23 ++++++++++++++++++++---
quantum/backlight/backlight.h | 4 ++++
tmk_core/common/eeconfig.c | 11 -----------
tmk_core/common/eeconfig.h | 5 -----
5 files changed, 35 insertions(+), 28 deletions(-)
(limited to 'quantum')
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index 74511dd43f..d47ecc6824 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -62,15 +62,17 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help
To configure the backlighting, `#define` these in your `config.h`:
-| Define | Default | Description |
-|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
-| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
-| `BACKLIGHT_LEVELS` | `3` | The number of brightness levels (maximum 31 excluding off) |
-| `BACKLIGHT_CAPS_LOCK` | *Not defined* | Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
-| `BACKLIGHT_BREATHING` | *Not defined* | Enable backlight breathing, if supported |
-| `BREATHING_PERIOD` | `6` | The length of one backlight "breath" in seconds |
-| `BACKLIGHT_ON_STATE` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
-| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. |
+|Define |Default |Description |
+|-----------------------------|------------------|-----------------------------------------------------------------------------------------------------------------|
+|`BACKLIGHT_PIN` |*Not defined* |The pin that controls the LED(s) |
+|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
+|`BACKLIGHT_CAPS_LOCK` |*Not defined* |Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
+|`BACKLIGHT_BREATHING` |*Not defined* |Enable backlight breathing, if supported |
+|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
+|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
+|`BACKLIGHT_LIMIT_VAL` |`255` |The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum.|
+|`BACKLIGHT_DEFAULT_LEVEL` |`BACKLIGHT_LEVELS`|The default backlight level to use upon clearing the EEPROM |
+|`BACKLIGHT_DEFAULT_BREATHING`|*Not defined* |Whether to enable backlight breathing upon clearing the EEPROM |
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c
index 113beb832f..1bc276899c 100644
--- a/quantum/backlight/backlight.c
+++ b/quantum/backlight/backlight.c
@@ -22,6 +22,10 @@ along with this program. If not, see .
backlight_config_t backlight_config;
+#ifndef BACKLIGHT_DEFAULT_LEVEL
+# define BACKLIGHT_DEFAULT_LEVEL BACKLIGHT_LEVELS
+#endif
+
#ifdef BACKLIGHT_BREATHING
// TODO: migrate to backlight_config_t
static uint8_t breathing_period = BREATHING_PERIOD;
@@ -35,6 +39,7 @@ void backlight_init(void) {
/* check signature */
if (!eeconfig_is_enabled()) {
eeconfig_init();
+ eeconfig_update_backlight_default();
}
backlight_config.raw = eeconfig_read_backlight();
if (backlight_config.level > BACKLIGHT_LEVELS) {
@@ -152,11 +157,23 @@ void backlight_level(uint8_t level) {
eeconfig_update_backlight(backlight_config.raw);
}
-/** \brief Update current backlight state to EEPROM
- *
- */
+uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); }
+
+void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); }
+
void eeconfig_update_backlight_current(void) { eeconfig_update_backlight(backlight_config.raw); }
+void eeconfig_update_backlight_default(void) {
+ backlight_config.enable = 1;
+#ifdef BACKLIGHT_DEFAULT_BREATHING
+ backlight_config.breathing = 1;
+#else
+ backlight_config.breathing = 0;
+#endif
+ backlight_config.level = BACKLIGHT_DEFAULT_LEVEL;
+ eeconfig_update_backlight(backlight_config.raw);
+}
+
/** \brief Get backlight level
*
* FIXME: needs doc
diff --git a/quantum/backlight/backlight.h b/quantum/backlight/backlight.h
index 3e506737d4..c30c70fd62 100644
--- a/quantum/backlight/backlight.h
+++ b/quantum/backlight/backlight.h
@@ -55,7 +55,11 @@ void backlight_decrease(void);
void backlight_level_noeeprom(uint8_t level);
void backlight_level(uint8_t level);
uint8_t get_backlight_level(void);
+
+uint8_t eeconfig_read_backlight(void);
+void eeconfig_update_backlight(uint8_t val);
void eeconfig_update_backlight_current(void);
+void eeconfig_update_backlight_default(void);
// implementation specific
void backlight_init_ports(void);
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c
index 92a5092176..ffa56ab56d 100644
--- a/tmk_core/common/eeconfig.c
+++ b/tmk_core/common/eeconfig.c
@@ -155,17 +155,6 @@ void eeconfig_update_keymap(uint16_t val) {
eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, (val >> 8) & 0xFF);
}
-/** \brief eeconfig read backlight
- *
- * FIXME: needs doc
- */
-uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); }
-/** \brief eeconfig update backlight
- *
- * FIXME: needs doc
- */
-void eeconfig_update_backlight(uint8_t val) { eeprom_update_byte(EECONFIG_BACKLIGHT, val); }
-
/** \brief eeconfig read audio
*
* FIXME: needs doc
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index 9e18fd4e15..a88071729d 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -94,11 +94,6 @@ void eeconfig_update_default_layer(uint8_t val);
uint16_t eeconfig_read_keymap(void);
void eeconfig_update_keymap(uint16_t val);
-#ifdef BACKLIGHT_ENABLE
-uint8_t eeconfig_read_backlight(void);
-void eeconfig_update_backlight(uint8_t val);
-#endif
-
#ifdef AUDIO_ENABLE
uint8_t eeconfig_read_audio(void);
void eeconfig_update_audio(uint8_t val);
--
cgit v1.2.3
From d66090af19fff061ce925882e94687bfb5d8b93b Mon Sep 17 00:00:00 2001
From: Ryan
Date: Sat, 29 May 2021 02:04:13 +1000
Subject: `backlight.c`: include `eeprom.h` (#13024)
---
quantum/backlight/backlight.c | 1 +
1 file changed, 1 insertion(+)
(limited to 'quantum')
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c
index 1bc276899c..dfb98419e6 100644
--- a/quantum/backlight/backlight.c
+++ b/quantum/backlight/backlight.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include "quantum.h"
#include "backlight.h"
+#include "eeprom.h"
#include "eeconfig.h"
#include "debug.h"
--
cgit v1.2.3
From 7d1194de01ea94f065bd5176607b4d66279ef51b Mon Sep 17 00:00:00 2001
From: James Young
Date: Sat, 29 May 2021 13:53:10 -0700
Subject: run: qmk cformat --core-only
---
drivers/chibios/analog.c | 2 +-
drivers/chibios/serial_usart.h | 20 ++++--
quantum/led_matrix_animations/alpha_mods_anim.h | 2 +-
quantum/led_matrix_animations/band_anim.h | 6 +-
quantum/led_matrix_animations/band_pinwheel_anim.h | 10 +--
quantum/led_matrix_animations/band_spiral_anim.h | 10 +--
quantum/led_matrix_animations/breathing_anim.h | 2 +-
.../led_matrix_animations/cycle_left_right_anim.h | 10 +--
quantum/led_matrix_animations/cycle_out_in_anim.h | 10 +--
quantum/led_matrix_animations/cycle_up_down_anim.h | 10 +--
quantum/led_matrix_animations/dual_beacon_anim.h | 10 +--
.../led_matrix_animations/solid_reactive_cross.h | 12 ++--
.../led_matrix_animations/solid_reactive_nexus.h | 12 ++--
.../solid_reactive_simple_anim.h | 12 ++--
.../led_matrix_animations/solid_reactive_wide.h | 12 ++--
quantum/led_matrix_animations/solid_splash_anim.h | 12 ++--
.../led_matrix_animations/wave_left_right_anim.h | 10 +--
quantum/led_matrix_animations/wave_up_down_anim.h | 10 +--
quantum/led_matrix_drivers.c | 2 +-
quantum/quantum_keycodes.h | 12 ++--
quantum/rgb_matrix_drivers.c | 6 +-
quantum/rgblight.c | 8 +--
quantum/split_common/transport.c | 34 ++++-----
tmk_core/common/action.c | 83 ++++++++++------------
tmk_core/common/action.h | 2 +-
tmk_core/common/chibios/sleep_led.c | 4 +-
tmk_core/common/keyboard.h | 6 +-
27 files changed, 139 insertions(+), 190 deletions(-)
(limited to 'quantum')
diff --git a/drivers/chibios/analog.c b/drivers/chibios/analog.c
index b1081623d3..8c476fcac2 100644
--- a/drivers/chibios/analog.c
+++ b/drivers/chibios/analog.c
@@ -123,7 +123,7 @@ static ADCConversionGroup adcConversionGroup = {
.smpr = ADC_SAMPLING_RATE,
#elif defined(USE_ADCV2)
# if !defined(STM32F1XX)
- .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without...
+ .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without...
# endif
.smpr2 = ADC_SMPR2_SMP_AN0(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN1(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN2(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN3(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN4(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN5(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN6(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN7(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN8(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN9(ADC_SAMPLING_RATE),
.smpr1 = ADC_SMPR1_SMP_AN10(ADC_SAMPLING_RATE) | ADC_SMPR1_SMP_AN11(ADC_SAMPLING_RATE) | ADC_SMPR1_SMP_AN12(ADC_SAMPLING_RATE) | ADC_SMPR1_SMP_AN13(ADC_SAMPLING_RATE) | ADC_SMPR1_SMP_AN14(ADC_SAMPLING_RATE) | ADC_SMPR1_SMP_AN15(ADC_SAMPLING_RATE),
diff --git a/drivers/chibios/serial_usart.h b/drivers/chibios/serial_usart.h
index d35b5d12c6..fee7b4d159 100644
--- a/drivers/chibios/serial_usart.h
+++ b/drivers/chibios/serial_usart.h
@@ -40,13 +40,25 @@
#endif
#if defined(USART1_REMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); \
+ } while (0)
#elif defined(USART2_REMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); \
+ } while (0)
#elif defined(USART3_PARTIALREMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); \
+ } while (0)
#elif defined(USART3_FULLREMAP)
-# define USART_REMAP do { (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); } while(0)
+# define USART_REMAP \
+ do { \
+ (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); \
+ } while (0)
#endif
#ifndef SELECT_SOFT_SERIAL_SPEED
diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix_animations/alpha_mods_anim.h
index a4638fde69..6f69f6892b 100644
--- a/quantum/led_matrix_animations/alpha_mods_anim.h
+++ b/quantum/led_matrix_animations/alpha_mods_anim.h
@@ -21,4 +21,4 @@ bool ALPHAS_MODS(effect_params_t* params) {
}
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
+#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix_animations/band_anim.h
index 4a2b746a76..523dba1b78 100644
--- a/quantum/led_matrix_animations/band_anim.h
+++ b/quantum/led_matrix_animations/band_anim.h
@@ -7,9 +7,7 @@ static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) {
return scale8(v < 0 ? 0 : v, val);
}
-bool BAND(effect_params_t* params) {
- return effect_runner_i(params, &BAND_math);
-}
+bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND
+#endif // DISABLE_LED_MATRIX_BAND
diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix_animations/band_pinwheel_anim.h
index 9836320d2a..fb3b835cad 100644
--- a/quantum/led_matrix_animations/band_pinwheel_anim.h
+++ b/quantum/led_matrix_animations/band_pinwheel_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(BAND_PINWHEEL)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) {
- return scale8(val - time - atan2_8(dy, dx) * 3, val);
-}
+static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); }
-bool BAND_PINWHEEL(effect_params_t* params) {
- return effect_runner_dx_dy(params, &BAND_PINWHEEL_math);
-}
+bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
+#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix_animations/band_spiral_anim.h
index be17c03aad..fca22aad9c 100644
--- a/quantum/led_matrix_animations/band_spiral_anim.h
+++ b/quantum/led_matrix_animations/band_spiral_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(BAND_SPIRAL)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- return scale8(val + dist - time - atan2_8(dy, dx), val);
-}
+static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); }
-bool BAND_SPIRAL(effect_params_t* params) {
- return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math);
-}
+bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
+#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix_animations/breathing_anim.h
index 4f49f50690..00310e3f65 100644
--- a/quantum/led_matrix_animations/breathing_anim.h
+++ b/quantum/led_matrix_animations/breathing_anim.h
@@ -16,4 +16,4 @@ bool BREATHING(effect_params_t* params) {
}
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BREATHING
+#endif // DISABLE_LED_MATRIX_BREATHING
diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix_animations/cycle_left_right_anim.h
index 404fda26f5..51e81d57ca 100644
--- a/quantum/led_matrix_animations/cycle_left_right_anim.h
+++ b/quantum/led_matrix_animations/cycle_left_right_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) {
- return scale8(g_led_config.point[i].x - time, val);
-}
+static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); }
-bool CYCLE_LEFT_RIGHT(effect_params_t* params) {
- return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math);
-}
+bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
+#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h
index 3f5fc5b187..f62061552c 100644
--- a/quantum/led_matrix_animations/cycle_out_in_anim.h
+++ b/quantum/led_matrix_animations/cycle_out_in_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(CYCLE_OUT_IN)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- return scale8(3 * dist / 2 + time, val);
-}
+static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); }
-bool CYCLE_OUT_IN(effect_params_t* params) {
- return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math);
-}
+bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
+#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix_animations/cycle_up_down_anim.h
index 25fc211b17..bd1d125672 100644
--- a/quantum/led_matrix_animations/cycle_up_down_anim.h
+++ b/quantum/led_matrix_animations/cycle_up_down_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(CYCLE_UP_DOWN)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) {
- return scale8(g_led_config.point[i].y - time, val);
-}
+static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); }
-bool CYCLE_UP_DOWN(effect_params_t* params) {
- return effect_runner_i(params, &CYCLE_UP_DOWN_math);
-}
+bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
+#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix_animations/dual_beacon_anim.h
index 1fa1df1395..9b8a7877c9 100644
--- a/quantum/led_matrix_animations/dual_beacon_anim.h
+++ b/quantum/led_matrix_animations/dual_beacon_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(DUAL_BEACON)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
- return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val);
-}
+static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); }
-bool DUAL_BEACON(effect_params_t* params) {
- return effect_runner_sin_cos_i(params, &DUAL_BEACON_math);
-}
+bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_DUAL_BEACON
+#endif // DISABLE_LED_MATRIX_DUAL_BEACON
diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix_animations/solid_reactive_cross.h
index a50d1fc629..f402d99b37 100644
--- a/quantum/led_matrix_animations/solid_reactive_cross.h
+++ b/quantum/led_matrix_animations/solid_reactive_cross.h
@@ -23,17 +23,13 @@ static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, ui
}
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
-bool SOLID_REACTIVE_CROSS(effect_params_t* params) {
- return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math);
-}
+bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); }
# endif
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
-bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) {
- return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math);
-}
+bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); }
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix_animations/solid_reactive_nexus.h
index 4638aac5a4..4d0d252263 100644
--- a/quantum/led_matrix_animations/solid_reactive_nexus.h
+++ b/quantum/led_matrix_animations/solid_reactive_nexus.h
@@ -20,17 +20,13 @@ static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, ui
}
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
-bool SOLID_REACTIVE_NEXUS(effect_params_t* params) {
- return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math);
-}
+bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); }
# endif
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
-bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) {
- return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math);
-}
+bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); }
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix_animations/solid_reactive_simple_anim.h
index e1166a4fb6..30e2527f60 100644
--- a/quantum/led_matrix_animations/solid_reactive_simple_anim.h
+++ b/quantum/led_matrix_animations/solid_reactive_simple_anim.h
@@ -3,14 +3,10 @@
LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) {
- return scale8(255 - offset, val);
-}
+static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); }
-bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) {
- return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math);
-}
+bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix_animations/solid_reactive_wide.h
index 4bcaba331e..34a230c259 100644
--- a/quantum/led_matrix_animations/solid_reactive_wide.h
+++ b/quantum/led_matrix_animations/solid_reactive_wide.h
@@ -18,17 +18,13 @@ static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uin
}
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
-bool SOLID_REACTIVE_WIDE(effect_params_t* params) {
- return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math);
-}
+bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); }
# endif
# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
-bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) {
- return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math);
-}
+bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); }
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix_animations/solid_splash_anim.h
index 3e9046640e..4f6ba3d343 100644
--- a/quantum/led_matrix_animations/solid_splash_anim.h
+++ b/quantum/led_matrix_animations/solid_splash_anim.h
@@ -18,17 +18,13 @@ uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uin
}
# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
-bool SOLID_SPLASH(effect_params_t* params) {
- return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math);
-}
+bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
# endif
# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
-bool SOLID_MULTISPLASH(effect_params_t* params) {
- return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math);
-}
+bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
# endif
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix_animations/wave_left_right_anim.h
index d547c72cee..736f22ddc5 100644
--- a/quantum/led_matrix_animations/wave_left_right_anim.h
+++ b/quantum/led_matrix_animations/wave_left_right_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) {
- return scale8(sin8(g_led_config.point[i].x - time), val);
-}
+static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); }
-bool WAVE_LEFT_RIGHT(effect_params_t* params) {
- return effect_runner_i(params, &WAVE_LEFT_RIGHT_math);
-}
+bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
+#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix_animations/wave_up_down_anim.h
index b68ff9bbc6..3cab0597d4 100644
--- a/quantum/led_matrix_animations/wave_up_down_anim.h
+++ b/quantum/led_matrix_animations/wave_up_down_anim.h
@@ -2,13 +2,9 @@
LED_MATRIX_EFFECT(WAVE_UP_DOWN)
# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) {
- return scale8(sin8(g_led_config.point[i].y - time), val);
-}
+static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); }
-bool WAVE_UP_DOWN(effect_params_t* params) {
- return effect_runner_i(params, &WAVE_UP_DOWN_math);
-}
+bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); }
# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
+#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c
index f3d4bc896e..1d46b2c506 100644
--- a/quantum/led_matrix_drivers.c
+++ b/quantum/led_matrix_drivers.c
@@ -145,7 +145,7 @@ const led_matrix_driver_t led_matrix_driver = {
.set_value = IS31FL3731_set_value,
.set_value_all = IS31FL3731_set_value_all,
# else
- .set_value = IS31FL3733_set_value,
+ .set_value = IS31FL3733_set_value,
.set_value_all = IS31FL3733_set_value_all,
# endif
};
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 26021598a1..316c20fcef 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -760,12 +760,12 @@ enum quantum_keycodes {
#define CMD_T(kc) LCMD_T(kc)
#define WIN_T(kc) LWIN_T(kc)
-#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal
-#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt
-#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI
-#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI
+#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal
+#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt
+#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI
+#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI
#define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
-#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI
+#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI
#define SCMD_T(kc) SGUI_T(kc)
#define SWIN_T(kc) SGUI_T(kc)
#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt
@@ -792,7 +792,7 @@ enum quantum_keycodes {
#define UC_M_MA UNICODE_MODE_MAC
#define UNICODE_MODE_OSX UNICODE_MODE_MAC // Deprecated alias
-#define UC_M_OS UNICODE_MODE_MAC // Deprecated alias
+#define UC_M_OS UNICODE_MODE_MAC // Deprecated alias
#define UC_M_LN UNICODE_MODE_LNX
#define UC_M_WI UNICODE_MODE_WIN
#define UC_M_BS UNICODE_MODE_BSD
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
index a4db86d196..896fa6d0ef 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix_drivers.c
@@ -146,9 +146,9 @@ static void flush(void) {
}
const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3733_set_color,
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3733_set_color,
.set_color_all = IS31FL3733_set_color_all,
};
# elif defined(IS31FL3737)
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index e4c4d555e5..baa10ec416 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -727,13 +727,11 @@ static uint16_t _repeat_timer;
static uint8_t _times_remaining;
static uint16_t _dur;
-void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) {
- rgblight_blink_layer_repeat(layer, duration_ms, 1);
-}
+void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); }
void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) {
_times_remaining = times * 2;
- _dur = duration_ms;
+ _dur = duration_ms;
rgblight_set_layer_state(layer, true);
_times_remaining--;
@@ -892,7 +890,7 @@ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
animation_status.restart = true;
}
# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
-# endif /* RGBLIGHT_USE_TIMER */
+# endif /* RGBLIGHT_USE_TIMER */
}
#endif /* RGBLIGHT_SPLIT */
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index bf942c5260..9ed0f7591b 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -240,38 +240,38 @@ typedef struct _Serial_s2m_buffer_t {
matrix_row_t smatrix[ROWS_PER_HAND];
# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
+ uint8_t encoder_state[NUMBER_OF_ENCODERS];
# endif
} Serial_s2m_buffer_t;
typedef struct _Serial_m2s_buffer_t {
# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
+ uint8_t real_mods;
+ uint8_t weak_mods;
# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
+ uint8_t oneshot_mods;
# endif
# endif
# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
+ uint32_t sync_timer;
# endif
# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
+ matrix_row_t mmatrix[ROWS_PER_HAND];
# endif
# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
+ uint8_t backlight_level;
# endif
# ifdef WPM_ENABLE
- uint8_t current_wpm;
+ uint8_t current_wpm;
# endif
# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
led_eeconfig_t led_matrix;
bool led_suspend_state;
# endif
# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
# endif
} Serial_m2s_buffer_t;
@@ -363,7 +363,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
// TODO: if MATRIX_COLS > 8 change to unpack()
for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
+ slave_matrix[i] = serial_s2m_buffer.smatrix[i];
# ifdef SPLIT_TRANSPORT_MIRROR
serial_m2s_buffer.mmatrix[i] = master_matrix[i];
# endif
@@ -380,14 +380,14 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# ifdef WPM_ENABLE
// Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
+ serial_m2s_buffer.current_wpm = get_current_wpm();
# endif
# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
+ serial_m2s_buffer.real_mods = get_mods();
+ serial_m2s_buffer.weak_mods = get_weak_mods();
# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
+ serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
# endif
# endif
@@ -401,7 +401,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
# endif
# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
# endif
return true;
}
@@ -416,7 +416,7 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_s2m_buffer.smatrix[i] = slave_matrix[i];
# ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
+ master_matrix[i] = serial_m2s_buffer.mmatrix[i];
# endif
}
# ifdef BACKLIGHT_ENABLE
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index f41665b06c..bd41d28b66 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -773,10 +773,9 @@ void register_code(uint8_t code) {
}
#endif
- else if
- IS_KEY(code) {
- // TODO: should push command_proc out of this block?
- if (command_proc(code)) return;
+ else if IS_KEY (code) {
+ // TODO: should push command_proc out of this block?
+ if (command_proc(code)) return;
#ifndef NO_ACTION_ONESHOT
/* TODO: remove
@@ -793,35 +792,33 @@ void register_code(uint8_t code) {
} else
*/
#endif
- {
- // Force a new key press if the key is already pressed
- // without this, keys with the same keycode, but different
- // modifiers will be reported incorrectly, see issue #1708
- if (is_key_pressed(keyboard_report, code)) {
- del_key(code);
- send_keyboard_report();
- }
- add_key(code);
+ {
+ // Force a new key press if the key is already pressed
+ // without this, keys with the same keycode, but different
+ // modifiers will be reported incorrectly, see issue #1708
+ if (is_key_pressed(keyboard_report, code)) {
+ del_key(code);
send_keyboard_report();
}
- }
- else if
- IS_MOD(code) {
- add_mods(MOD_BIT(code));
+ add_key(code);
send_keyboard_report();
}
+ } else if IS_MOD (code) {
+ add_mods(MOD_BIT(code));
+ send_keyboard_report();
+ }
#ifdef EXTRAKEY_ENABLE
- else if
- IS_SYSTEM(code) { host_system_send(KEYCODE2SYSTEM(code)); }
- else if
- IS_CONSUMER(code) { host_consumer_send(KEYCODE2CONSUMER(code)); }
+ else if IS_SYSTEM (code) {
+ host_system_send(KEYCODE2SYSTEM(code));
+ } else if IS_CONSUMER (code) {
+ host_consumer_send(KEYCODE2CONSUMER(code));
+ }
#endif
#ifdef MOUSEKEY_ENABLE
- else if
- IS_MOUSEKEY(code) {
- mousekey_on(code);
- mousekey_send();
- }
+ else if IS_MOUSEKEY (code) {
+ mousekey_on(code);
+ mousekey_send();
+ }
#endif
}
@@ -866,26 +863,22 @@ void unregister_code(uint8_t code) {
}
#endif
- else if
- IS_KEY(code) {
- del_key(code);
- send_keyboard_report();
- }
- else if
- IS_MOD(code) {
- del_mods(MOD_BIT(code));
- send_keyboard_report();
- }
- else if
- IS_SYSTEM(code) { host_system_send(0); }
- else if
- IS_CONSUMER(code) { host_consumer_send(0); }
+ else if IS_KEY (code) {
+ del_key(code);
+ send_keyboard_report();
+ } else if IS_MOD (code) {
+ del_mods(MOD_BIT(code));
+ send_keyboard_report();
+ } else if IS_SYSTEM (code) {
+ host_system_send(0);
+ } else if IS_CONSUMER (code) {
+ host_consumer_send(0);
+ }
#ifdef MOUSEKEY_ENABLE
- else if
- IS_MOUSEKEY(code) {
- mousekey_off(code);
- mousekey_send();
- }
+ else if IS_MOUSEKEY (code) {
+ mousekey_off(code);
+ mousekey_send();
+ }
#endif
}
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index 6c84561785..8cb4722c6e 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -77,7 +77,7 @@ extern bool disable_action_cache;
/* Code for handling one-handed key modifiers. */
#ifdef SWAP_HANDS_ENABLE
-extern bool swap_hands;
+extern bool swap_hands;
extern const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS];
# if (MATRIX_COLS <= 8)
typedef uint8_t swap_state_row_t;
diff --git a/tmk_core/common/chibios/sleep_led.c b/tmk_core/common/chibios/sleep_led.c
index 477056a454..1c65016a42 100644
--- a/tmk_core/common/chibios/sleep_led.c
+++ b/tmk_core/common/chibios/sleep_led.c
@@ -65,7 +65,7 @@ void sleep_led_timer_callback(void) {
/* LPTMR clock options */
# define LPTMR_CLOCK_MCGIRCLK 0 /* 4MHz clock */
-# define LPTMR_CLOCK_LPO 1 /* 1kHz clock */
+# define LPTMR_CLOCK_LPO 1 /* 1kHz clock */
# define LPTMR_CLOCK_ERCLK32K 2 /* external 32kHz crystal */
# define LPTMR_CLOCK_OSCERCLK 3 /* output from OSC */
@@ -121,7 +121,7 @@ void sleep_led_init(void) {
MCG->C2 |= MCG_C2_IRCS; // fast (4MHz) internal ref clock
# if defined(KL27) // divide the 8MHz IRC by 2, to have the same MCGIRCLK speed as others
MCG->MC |= MCG_MC_LIRC_DIV2_DIV2;
-# endif /* KL27 */
+# endif /* KL27 */
MCG->C1 |= MCG_C1_IRCLKEN; // enable internal ref clock
// to work in stop mode, also MCG_C1_IREFSTEN
// Divide 4MHz by 2^N (N=6) => 62500 irqs/sec =>
diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h
index 779973f1d6..08f4e84f94 100644
--- a/tmk_core/common/keyboard.h
+++ b/tmk_core/common/keyboard.h
@@ -70,9 +70,9 @@ void keyboard_pre_init_user(void);
void keyboard_post_init_kb(void);
void keyboard_post_init_user(void);
-void housekeeping_task(void); // To be executed by the main loop in each backend TMK protocol
-void housekeeping_task_kb(void); // To be overridden by keyboard-level code
-void housekeeping_task_user(void); // To be overridden by user/keymap-level code
+void housekeeping_task(void); // To be executed by the main loop in each backend TMK protocol
+void housekeeping_task_kb(void); // To be overridden by keyboard-level code
+void housekeeping_task_user(void); // To be overridden by user/keymap-level code
uint32_t last_input_activity_time(void); // Timestamp of the last matrix or encoder activity
uint32_t last_input_activity_elapsed(void); // Number of milliseconds since the last matrix or encoder activity
--
cgit v1.2.3
From e5d3e5a98969e59d702fefb2690ec582699e129b Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Tue, 1 Jun 2021 15:10:39 +1000
Subject: Add weak refs on reading rows/cols. (#13062)
---
quantum/matrix.c | 18 +++++++++---------
quantum/split_common/matrix.c | 18 +++++++++---------
2 files changed, 18 insertions(+), 18 deletions(-)
(limited to 'quantum')
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 34d6af2e6d..9298661ad0 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -47,7 +47,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
#ifdef DIRECT_PINS
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
for (int row = 0; row < MATRIX_ROWS; row++) {
for (int col = 0; col < MATRIX_COLS; col++) {
pin_t pin = direct_pins[row][col];
@@ -58,7 +58,7 @@ static void init_pins(void) {
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -90,14 +90,14 @@ static void unselect_rows(void) {
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
setPinInputHigh_atomic(col_pins[x]);
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -138,14 +138,14 @@ static void unselect_cols(void) {
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
setPinInputHigh_atomic(row_pins[x]);
}
}
-static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+__attribute__((weak)) bool matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
bool matrix_changed = false;
// Select col
@@ -190,7 +190,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
void matrix_init(void) {
// initialize key pins
- init_pins();
+ matrix_init_pins();
// initialize matrix state: all keys off
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
@@ -209,12 +209,12 @@ uint8_t matrix_scan(void) {
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
- changed |= read_cols_on_row(raw_matrix, current_row);
+ changed |= matrix_read_cols_on_row(raw_matrix, current_row);
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- changed |= read_rows_on_col(raw_matrix, current_col);
+ changed |= matrix_read_rows_on_col(raw_matrix, current_col);
}
#endif
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index 039e7d9773..a54ea90b3f 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -61,7 +61,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
#ifdef DIRECT_PINS
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
for (int row = 0; row < MATRIX_ROWS; row++) {
for (int col = 0; col < MATRIX_COLS; col++) {
pin_t pin = direct_pins[row][col];
@@ -72,7 +72,7 @@ static void init_pins(void) {
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -104,14 +104,14 @@ static void unselect_rows(void) {
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_rows();
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
setPinInputHigh_atomic(col_pins[x]);
}
}
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -152,14 +152,14 @@ static void unselect_cols(void) {
}
}
-static void init_pins(void) {
+__attribute__((weak)) void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
setPinInputHigh_atomic(row_pins[x]);
}
}
-static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+__attribute__((weak)) bool matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
bool matrix_changed = false;
// Select col
@@ -233,7 +233,7 @@ void matrix_init(void) {
thatHand = ROWS_PER_HAND - thisHand;
// initialize key pins
- init_pins();
+ matrix_init_pins();
// initialize matrix state: all keys off
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
@@ -293,12 +293,12 @@ uint8_t matrix_scan(void) {
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
- local_changed |= read_cols_on_row(raw_matrix, current_row);
+ local_changed |= matrix_read_cols_on_row(raw_matrix, current_row);
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- local_changed |= read_rows_on_col(raw_matrix, current_col);
+ local_changed |= matrix_read_rows_on_col(raw_matrix, current_col);
}
#endif
--
cgit v1.2.3
From f287597c19dc926c7c28cefa32ffc3f0b4fdba7f Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Wed, 9 Jun 2021 17:19:42 +1000
Subject: Use single memcmp to determine if matrix changed. (#13064)
* Use memcmp to determine if matrix changed.
* Firmware size issues.
* Add documentation for the lack of need of MATRIX_ROW_PINS/MATRIX_COL_PINS, when overriding low-level matrix functions.---
docs/config_options.md | 3 +
docs/custom_quantum_functions.md | 8 +++
keyboards/anavi/macropad8/keymaps/default/config.h | 19 ++++++
.../frankie_macropad/keymaps/default/config.h | 19 ++++++
.../kbdfans/kbd67/rev1/keymaps/default/config.h | 2 +-
keyboards/mt84/keymaps/default/config.h | 19 ++++++
quantum/matrix.c | 71 ++++++++++------------
quantum/split_common/matrix.c | 69 +++++++++------------
8 files changed, 131 insertions(+), 79 deletions(-)
create mode 100644 keyboards/anavi/macropad8/keymaps/default/config.h
create mode 100644 keyboards/handwired/frankie_macropad/keymaps/default/config.h
create mode 100644 keyboards/mt84/keymaps/default/config.h
(limited to 'quantum')
diff --git a/docs/config_options.md b/docs/config_options.md
index d0f0b316e0..26fe8cea55 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -51,8 +51,10 @@ This is a C header file that is one of the first things included, and will persi
* the number of columns in your keyboard's matrix
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
* pins of the rows, from top to bottom
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
* pins of the columns, from left to right
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define MATRIX_IO_DELAY 30`
* the delay in microseconds when between changing matrix pin state and reading values
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
@@ -280,6 +282,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_ROW_PINS_RIGHT { }`
* `#define MATRIX_COL_PINS_RIGHT { }`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
+ * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information.
* `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
* If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`.
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index 694b421e79..30c637bb49 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`
+### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides
+
+* GPIO pin initialisation: `void matrix_init_pins(void)`
+ * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override.
+* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)`
+* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
+* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)`
+ * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override.
## Keyboard Post Initialization code
diff --git a/keyboards/anavi/macropad8/keymaps/default/config.h b/keyboards/anavi/macropad8/keymaps/default/config.h
new file mode 100644
index 0000000000..dd687cad58
--- /dev/null
+++ b/keyboards/anavi/macropad8/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/keyboards/handwired/frankie_macropad/keymaps/default/config.h b/keyboards/handwired/frankie_macropad/keymaps/default/config.h
new file mode 100644
index 0000000000..dd687cad58
--- /dev/null
+++ b/keyboards/handwired/frankie_macropad/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
index a3ed4f762a..90fb10ebbe 100644
--- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
+++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h
@@ -16,4 +16,4 @@
#pragma once
-// place overrides here
+#define LAYER_STATE_8BIT
diff --git a/keyboards/mt84/keymaps/default/config.h b/keyboards/mt84/keymaps/default/config.h
new file mode 100644
index 0000000000..dd687cad58
--- /dev/null
+++ b/keyboards/mt84/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#define LAYER_STATE_8BIT
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 9298661ad0..71ef270892 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -16,6 +16,7 @@ along with this program. If not, see .
*/
#include
#include
+#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
@@ -24,14 +25,23 @@ along with this program. If not, see .
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
+# ifdef MATRIX_ROW_PINS
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+# endif // MATRIX_ROW_PINS
+# ifdef MATRIX_COL_PINS
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+# endif // MATRIX_COL_PINS
#endif
/* matrix state(1:on, 0:off) */
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
+// user-defined overridable functions
+__attribute__((weak)) void matrix_init_pins(void);
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
+
static inline void setPinOutput_writeLow(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
setPinOutput(pin);
@@ -58,7 +68,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -69,16 +79,13 @@ __attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[]
}
}
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
}
#elif defined(DIODE_DIRECTION)
-# if (DIODE_DIRECTION == COL2ROW)
+# if defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
+# if (DIODE_DIRECTION == COL2ROW)
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
@@ -97,7 +104,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -118,15 +125,11 @@ __attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[]
unselect_row(current_row);
matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
}
-# elif (DIODE_DIRECTION == ROW2COL)
+# elif (DIODE_DIRECTION == ROW2COL)
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
@@ -145,45 +148,32 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
- bool matrix_changed = false;
-
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
// Select col
select_col(current_col);
matrix_output_select_delay();
// For each row...
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
- // Store last value of row prior to reading
- matrix_row_t last_row_value = current_matrix[row_index];
- matrix_row_t current_row_value = last_row_value;
-
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
- current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
+ current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {
// Pin HI, clear col bit
- current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col);
- }
-
- // Determine if the matrix changed state
- if ((last_row_value != current_row_value)) {
- matrix_changed |= true;
- current_matrix[row_index] = current_row_value;
+ current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
}
}
// Unselect col
unselect_col(current_col);
matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
-
- return matrix_changed;
}
-# else
-# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
-# endif
+# else
+# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
+# endif
+# endif // defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
#else
# error DIODE_DIRECTION is not defined!
#endif
@@ -204,20 +194,23 @@ void matrix_init(void) {
}
uint8_t matrix_scan(void) {
- bool changed = false;
+ matrix_row_t curr_matrix[MATRIX_ROWS] = {0};
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
- changed |= matrix_read_cols_on_row(raw_matrix, current_row);
+ matrix_read_cols_on_row(curr_matrix, current_row);
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- changed |= matrix_read_rows_on_col(raw_matrix, current_col);
+ matrix_read_rows_on_col(curr_matrix, current_col);
}
#endif
+ bool changed = memcmp(raw_matrix, curr_matrix, sizeof(curr_matrix)) != 0;
+ if (changed) memcpy(raw_matrix, curr_matrix, sizeof(curr_matrix));
+
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
matrix_scan_quantum();
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index a54ea90b3f..2cf7b70582 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -16,6 +16,7 @@ along with this program. If not, see .
*/
#include
#include
+#include
#include "util.h"
#include "matrix.h"
#include "debounce.h"
@@ -31,8 +32,12 @@ along with this program. If not, see .
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
+# ifdef MATRIX_ROW_PINS
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+# endif // MATRIX_ROW_PINS
+# ifdef MATRIX_COL_PINS
static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+# endif // MATRIX_COL_PINS
#endif
/* matrix state(1:on, 0:off) */
@@ -45,6 +50,9 @@ uint8_t thisHand, thatHand;
// user-defined overridable functions
__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); }
__attribute__((weak)) void matrix_slave_scan_user(void) {}
+__attribute__((weak)) void matrix_init_pins(void);
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
static inline void setPinOutput_writeLow(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
@@ -72,7 +80,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -83,16 +91,13 @@ __attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[]
}
}
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
}
#elif defined(DIODE_DIRECTION)
-# if (DIODE_DIRECTION == COL2ROW)
+# if defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
+# if (DIODE_DIRECTION == COL2ROW)
static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); }
@@ -111,7 +116,7 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Start with a clear matrix row
matrix_row_t current_row_value = 0;
@@ -132,15 +137,11 @@ __attribute__((weak)) bool matrix_read_cols_on_row(matrix_row_t current_matrix[]
unselect_row(current_row);
matrix_output_unselect_delay(); // wait for all Col signals to go HIGH
- // If the row has changed, store the row and return the changed flag.
- if (current_matrix[current_row] != current_row_value) {
- current_matrix[current_row] = current_row_value;
- return true;
- }
- return false;
+ // Update the matrix
+ current_matrix[current_row] = current_row_value;
}
-# elif (DIODE_DIRECTION == ROW2COL)
+# elif (DIODE_DIRECTION == ROW2COL)
static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); }
@@ -159,45 +160,32 @@ __attribute__((weak)) void matrix_init_pins(void) {
}
}
-__attribute__((weak)) bool matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
- bool matrix_changed = false;
-
+__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
// Select col
select_col(current_col);
matrix_output_select_delay();
// For each row...
for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) {
- // Store last value of row prior to reading
- matrix_row_t last_row_value = current_matrix[row_index];
- matrix_row_t current_row_value = last_row_value;
-
// Check row pin state
if (readPin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
- current_row_value |= (MATRIX_ROW_SHIFTER << current_col);
+ current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
} else {
// Pin HI, clear col bit
- current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col);
- }
-
- // Determine if the matrix changed state
- if ((last_row_value != current_row_value)) {
- matrix_changed |= true;
- current_matrix[row_index] = current_row_value;
+ current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
}
}
// Unselect col
unselect_col(current_col);
matrix_output_unselect_delay(); // wait for all Row signals to go HIGH
-
- return matrix_changed;
}
-# else
-# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
-# endif
+# else
+# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL!
+# endif
+# endif // defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS)
#else
# error DIODE_DIRECTION is not defined!
#endif
@@ -288,20 +276,23 @@ bool matrix_post_scan(void) {
}
uint8_t matrix_scan(void) {
- bool local_changed = false;
+ matrix_row_t curr_matrix[MATRIX_ROWS] = {0};
#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
- local_changed |= matrix_read_cols_on_row(raw_matrix, current_row);
+ matrix_read_cols_on_row(curr_matrix, current_row);
}
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
- local_changed |= matrix_read_rows_on_col(raw_matrix, current_col);
+ matrix_read_rows_on_col(curr_matrix, current_col);
}
#endif
+ bool local_changed = memcmp(raw_matrix, curr_matrix, sizeof(curr_matrix)) != 0;
+ if (local_changed) memcpy(raw_matrix, curr_matrix, sizeof(curr_matrix));
+
debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed);
bool remote_changed = matrix_post_scan();
--
cgit v1.2.3
From b829a1d2648abd0751e9d3505554547faf643425 Mon Sep 17 00:00:00 2001
From: Simon Arlott
Date: Wed, 9 Jun 2021 08:23:21 +0100
Subject: Avoid 8-bit timer overflows in debounce algorithms (#12240)
* Add fast_timer_t that is 16-bit or 32-bit based on architecture
A 16-bit timer will overflow sooner but be faster to compare on AVR.
* Avoid 8-bit timer overflows in debounce algorithms
Count down remaining elapsed time instead of trying to do 8-bit timer
comparisons.
Add a "none" implementation that is automatically used if DEBOUNCE is
0 otherwise it will break the _pk/_pr count down.
* Avoid unnecessary polling of the entire matrix in sym_eager_pk
The matrix only needs to be updated when a debounce timer expires.
* Avoid unnecessary polling of the entire matrix in sym_eager_pr
The matrix only needs to be updated when a debounce timer expires.
The use of the "needed_update" variable is trying to do what
"matrix_need_update" was added to fix but didn't work because it only
applied when all keys finished debouncing.
* Fix sym_defer_g timing inconsistency compared to other debounce algorithms
DEBOUNCE=5 should process the key after 5ms, not 6ms
* Add debounce tests---
build_test.mk | 1 +
quantum/debounce.h | 2 +
quantum/debounce/none.c | 31 +++
quantum/debounce/sym_defer_g.c | 26 +--
quantum/debounce/sym_defer_pk.c | 67 ++++--
quantum/debounce/sym_eager_pk.c | 72 +++---
quantum/debounce/sym_eager_pr.c | 76 ++++---
quantum/debounce/tests/debounce_test_common.cpp | 229 +++++++++++++++++++
quantum/debounce/tests/debounce_test_common.h | 83 +++++++
quantum/debounce/tests/rules.mk | 39 ++++
quantum/debounce/tests/sym_defer_g_tests.cpp | 223 +++++++++++++++++++
quantum/debounce/tests/sym_defer_pk_tests.cpp | 225 +++++++++++++++++++
quantum/debounce/tests/sym_eager_pk_tests.cpp | 237 ++++++++++++++++++++
quantum/debounce/tests/sym_eager_pr_tests.cpp | 280 ++++++++++++++++++++++++
quantum/debounce/tests/testlist.mk | 5 +
testlist.mk | 1 +
tmk_core/common/arm_atsam/_timer.h | 19 ++
tmk_core/common/avr/_timer.h | 19 ++
tmk_core/common/chibios/_timer.h | 19 ++
tmk_core/common/timer.h | 24 +-
20 files changed, 1587 insertions(+), 91 deletions(-)
create mode 100644 quantum/debounce/none.c
create mode 100644 quantum/debounce/tests/debounce_test_common.cpp
create mode 100644 quantum/debounce/tests/debounce_test_common.h
create mode 100644 quantum/debounce/tests/rules.mk
create mode 100644 quantum/debounce/tests/sym_defer_g_tests.cpp
create mode 100644 quantum/debounce/tests/sym_defer_pk_tests.cpp
create mode 100644 quantum/debounce/tests/sym_eager_pk_tests.cpp
create mode 100644 quantum/debounce/tests/sym_eager_pr_tests.cpp
create mode 100644 quantum/debounce/tests/testlist.mk
create mode 100644 tmk_core/common/arm_atsam/_timer.h
create mode 100644 tmk_core/common/avr/_timer.h
create mode 100644 tmk_core/common/chibios/_timer.h
(limited to 'quantum')
diff --git a/build_test.mk b/build_test.mk
index 77c4265f93..5171c58c36 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -49,6 +49,7 @@ endif
include common_features.mk
include $(TMK_PATH)/common.mk
+include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
diff --git a/quantum/debounce.h b/quantum/debounce.h
index 9ca05c6824..5043868289 100644
--- a/quantum/debounce.h
+++ b/quantum/debounce.h
@@ -9,3 +9,5 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
bool debounce_active(void);
void debounce_init(uint8_t num_rows);
+
+void debounce_free(void);
diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c
new file mode 100644
index 0000000000..b03892bc5b
--- /dev/null
+++ b/quantum/debounce/none.c
@@ -0,0 +1,31 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "matrix.h"
+#include "quantum.h"
+#include
+
+void debounce_init(uint8_t num_rows) {}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+ for (int i = 0; i < num_rows; i++) {
+ cooked[i] = raw[i];
+ }
+}
+
+bool debounce_active(void) { return false; }
+
+void debounce_free(void) {}
diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c
index 3ed9055d2a..fbefd55ede 100644
--- a/quantum/debounce/sym_defer_g.c
+++ b/quantum/debounce/sym_defer_g.c
@@ -1,5 +1,6 @@
/*
Copyright 2017 Alex Ong
+Copyright 2021 Simon Arlott
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
@@ -23,30 +24,29 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
# define DEBOUNCE 5
#endif
-void debounce_init(uint8_t num_rows) {}
+#if DEBOUNCE > 0
static bool debouncing = false;
+static fast_timer_t debouncing_time;
-#if DEBOUNCE > 0
-static uint16_t debouncing_time;
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+void debounce_init(uint8_t num_rows) {}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
if (changed) {
debouncing = true;
- debouncing_time = timer_read();
+ debouncing_time = timer_read_fast();
}
- if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
+ if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) {
for (int i = 0; i < num_rows; i++) {
cooked[i] = raw[i];
}
debouncing = false;
}
}
-#else // no debouncing.
-void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- for (int i = 0; i < num_rows; i++) {
- cooked[i] = raw[i];
- }
-}
-#endif
bool debounce_active(void) { return debouncing; }
+
+void debounce_free(void) {}
+#else // no debouncing.
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c
index 60513f98e1..626a9be841 100644
--- a/quantum/debounce/sym_defer_pk.c
+++ b/quantum/debounce/sym_defer_pk.c
@@ -1,6 +1,7 @@
/*
Copyright 2017 Alex Ong
Copyright 2020 Andrei Purdea
+Copyright 2021 Simon Arlott
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
@@ -33,28 +34,25 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state.
# define DEBOUNCE 5
#endif
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
#define ROW_SHIFTER ((matrix_row_t)1)
-#define debounce_counter_t uint8_t
+typedef uint8_t debounce_counter_t;
+#if DEBOUNCE > 0
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
-void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time);
+static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -67,27 +65,49 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time);
+ }
}
if (changed) {
- start_debounce_counters(raw, cooked, num_rows, current_time);
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ start_debounce_counters(raw, cooked, num_rows);
}
}
-void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
cooked[row] = (cooked[row] & ~(ROW_SHIFTER << col)) | (raw[row] & (ROW_SHIFTER << col));
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -96,14 +116,14 @@ void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix
}
}
-void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
+static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t delta = raw[row] ^ cooked[row];
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (delta & (ROW_SHIFTER << col)) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
counters_need_update = true;
}
} else {
@@ -115,3 +135,6 @@ void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c
index e66cf92d79..15a3242e68 100644
--- a/quantum/debounce/sym_eager_pk.c
+++ b/quantum/debounce/sym_eager_pk.c
@@ -1,5 +1,6 @@
/*
Copyright 2017 Alex Ong
+Copyright 2021 Simon Arlott
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
@@ -33,29 +34,26 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
# define DEBOUNCE 5
#endif
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
#define ROW_SHIFTER ((matrix_row_t)1)
-#define debounce_counter_t uint8_t
+typedef uint8_t debounce_counter_t;
+#if DEBOUNCE > 0
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
static bool matrix_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -68,27 +66,51 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters(num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters(num_rows, elapsed_time);
+ }
}
if (changed || matrix_need_update) {
- transfer_matrix_values(raw, cooked, num_rows, current_time);
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
}
}
// If the current time is > debounce counter, set the counter to enable input.
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
+ matrix_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
+ matrix_need_update = true;
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -98,8 +120,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
}
// upload from raw_matrix to final matrix;
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
- matrix_need_update = false;
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t delta = raw[row] ^ cooked[row];
@@ -108,11 +129,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
matrix_row_t col_mask = (ROW_SHIFTER << col);
if (delta & col_mask) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
counters_need_update = true;
existing_row ^= col_mask; // flip the bit.
- } else {
- matrix_need_update = true;
}
}
debounce_pointer++;
@@ -122,3 +141,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c
index 20ccb46f1d..2ad592c5a6 100644
--- a/quantum/debounce/sym_eager_pr.c
+++ b/quantum/debounce/sym_eager_pr.c
@@ -1,5 +1,6 @@
/*
Copyright 2019 Alex Ong
+Copyright 2021 Simon Arlott
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
@@ -33,27 +34,25 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred.
# define DEBOUNCE 5
#endif
-#define debounce_counter_t uint8_t
+// Maximum debounce: 255ms
+#if DEBOUNCE > UINT8_MAX
+# undef DEBOUNCE
+# define DEBOUNCE UINT8_MAX
+#endif
+
+typedef uint8_t debounce_counter_t;
+
+#if DEBOUNCE > 0
static bool matrix_need_update;
static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
static bool counters_need_update;
-#define DEBOUNCE_ELAPSED 251
-#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
-
-static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
- static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
- return last_result;
-}
+#define DEBOUNCE_ELAPSED 0
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time);
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time);
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
// we use num_rows rather than MATRIX_ROWS to support split keyboards
void debounce_init(uint8_t num_rows) {
@@ -63,27 +62,50 @@ void debounce_init(uint8_t num_rows) {
}
}
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
- uint8_t current_time = wrapping_timer_read();
- bool needed_update = counters_need_update;
+ bool updated_last = false;
+
if (counters_need_update) {
- update_debounce_counters(num_rows, current_time);
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters(num_rows, elapsed_time);
+ }
}
- if (changed || (needed_update && !counters_need_update) || matrix_need_update) {
- transfer_matrix_values(raw, cooked, num_rows, current_time);
+ if (changed || matrix_need_update) {
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
}
}
// If the current time is > debounce counter, set the counter to enable input.
-void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
+static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) {
counters_need_update = false;
+ matrix_need_update = false;
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
if (*debounce_pointer != DEBOUNCE_ELAPSED) {
- if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) {
+ if (*debounce_pointer <= elapsed_time) {
*debounce_pointer = DEBOUNCE_ELAPSED;
+ matrix_need_update = true;
} else {
+ *debounce_pointer -= elapsed_time;
counters_need_update = true;
}
}
@@ -92,8 +114,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) {
}
// upload from raw_matrix to final matrix;
-void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) {
- matrix_need_update = false;
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
debounce_counter_t *debounce_pointer = debounce_counters;
for (uint8_t row = 0; row < num_rows; row++) {
matrix_row_t existing_row = cooked[row];
@@ -102,11 +123,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
// determine new value basd on debounce pointer + raw value
if (existing_row != raw_row) {
if (*debounce_pointer == DEBOUNCE_ELAPSED) {
- *debounce_pointer = current_time;
+ *debounce_pointer = DEBOUNCE;
cooked[row] = raw_row;
counters_need_update = true;
- } else {
- matrix_need_update = true;
}
}
debounce_pointer++;
@@ -114,3 +133,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n
}
bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp
new file mode 100644
index 0000000000..1c5e7c9f4e
--- /dev/null
+++ b/quantum/debounce/tests/debounce_test_common.cpp
@@ -0,0 +1,229 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+#include
+#include
+#include
+
+extern "C" {
+#include "quantum.h"
+#include "timer.h"
+#include "debounce.h"
+
+void set_time(uint32_t t);
+void advance_time(uint32_t ms);
+}
+
+void DebounceTest::addEvents(std::initializer_list events) {
+ events_.insert(events_.end(), events.begin(), events.end());
+}
+
+void DebounceTest::runEvents() {
+ /* Run the test multiple times, from 1kHz to 10kHz scan rate */
+ for (extra_iterations_ = 0; extra_iterations_ < 10; extra_iterations_++) {
+ if (time_jumps_) {
+ /* Don't advance time smoothly, jump to the next event (some tests require this) */
+ auto_advance_time_ = false;
+ runEventsInternal();
+ } else {
+ /* Run the test with both smooth and irregular time; it must produce the same result */
+ auto_advance_time_ = true;
+ runEventsInternal();
+ auto_advance_time_ = false;
+ runEventsInternal();
+ }
+ }
+}
+
+void DebounceTest::runEventsInternal() {
+ fast_timer_t previous = 0;
+ bool first = true;
+
+ /* Initialise keyboard with start time (offset to avoid testing at 0) and all keys UP */
+ debounce_init(MATRIX_ROWS);
+ set_time(time_offset_);
+ std::fill(std::begin(input_matrix_), std::end(input_matrix_), 0);
+ std::fill(std::begin(output_matrix_), std::end(output_matrix_), 0);
+
+ for (auto &event : events_) {
+ if (!auto_advance_time_) {
+ /* Jump to the next event */
+ set_time(time_offset_ + event.time_);
+ } else if (!first && event.time_ == previous + 1) {
+ /* This event immediately follows the previous one, don't make extra debounce() calls */
+ advance_time(1);
+ } else {
+ /* Fast forward to the time for this event, calling debounce() with no changes */
+ ASSERT_LT((time_offset_ + event.time_) - timer_read_fast(), 60000) << "Test tries to advance more than 1 minute of time";
+
+ while (timer_read_fast() != time_offset_ + event.time_) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ advance_time(1);
+ }
+ }
+
+ first = false;
+ previous = event.time_;
+
+ /* Prepare input matrix */
+ for (auto &input : event.inputs_) {
+ matrixUpdate(input_matrix_, "input", input);
+ }
+
+ /* Call debounce */
+ runDebounce(!event.inputs_.empty());
+
+ /* Prepare output matrix */
+ for (auto &output : event.outputs_) {
+ matrixUpdate(output_matrix_, "output", output);
+ }
+
+ /* Check output matrix has expected change events */
+ for (auto &output : event.outputs_) {
+ EXPECT_EQ(!!(cooked_matrix_[output.row_] & (1U << output.col_)), directionValue(output.direction_))
+ << "Missing event at " << strTime()
+ << " expected key " << output.row_ << "," << output.col_ << " " << directionLabel(output.direction_)
+ << "\ninput_matrix: changed=" << !event.inputs_.empty() << "\n" << strMatrix(input_matrix_)
+ << "\nexpected_matrix:\n" << strMatrix(output_matrix_)
+ << "\nactual_matrix:\n" << strMatrix(cooked_matrix_);
+ }
+
+ /* Check output matrix has no other changes */
+ checkCookedMatrix(!event.inputs_.empty(), "debounce() cooked matrix does not match expected output matrix");
+
+ /* Perform some extra iterations of the matrix scan with no changes */
+ for (int i = 0; i < extra_iterations_; i++) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ }
+ }
+
+ /* Check that no further changes happen for 1 minute */
+ for (int i = 0; i < 60000; i++) {
+ runDebounce(false);
+ checkCookedMatrix(false, "debounce() modified cooked matrix");
+ advance_time(1);
+ }
+
+ debounce_free();
+}
+
+void DebounceTest::runDebounce(bool changed) {
+ std::copy(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_));
+ std::copy(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_));
+
+ debounce(raw_matrix_, cooked_matrix_, MATRIX_ROWS, changed);
+
+ if (!std::equal(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_))) {
+ FAIL() << "Fatal error: debounce() modified raw matrix at " << strTime()
+ << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_)
+ << "\nraw_matrix:\n" << strMatrix(raw_matrix_);
+ }
+}
+
+void DebounceTest::checkCookedMatrix(bool changed, const std::string &error_message) {
+ if (!std::equal(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_))) {
+ FAIL() << "Unexpected event: " << error_message << " at " << strTime()
+ << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_)
+ << "\nexpected_matrix:\n" << strMatrix(output_matrix_)
+ << "\nactual_matrix:\n" << strMatrix(cooked_matrix_);
+ }
+}
+
+std::string DebounceTest::strTime() {
+ std::stringstream text;
+
+ text << "time " << (timer_read_fast() - time_offset_)
+ << " (extra_iterations=" << extra_iterations_
+ << ", auto_advance_time=" << auto_advance_time_ << ")";
+
+ return text.str();
+}
+
+std::string DebounceTest::strMatrix(matrix_row_t matrix[]) {
+ std::stringstream text;
+
+ text << "\t" << std::setw(3) << "";
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ text << " " << std::setw(2) << col;
+ }
+ text << "\n";
+
+ for (int row = 0; row < MATRIX_ROWS; row++) {
+ text << "\t" << std::setw(2) << row << ":";
+ for (int col = 0; col < MATRIX_COLS; col++) {
+ text << ((matrix[row] & (1U << col)) ? " XX" : " __");
+ }
+
+ text << "\n";
+ }
+
+ return text.str();
+}
+
+bool DebounceTest::directionValue(Direction direction) {
+ switch (direction) {
+ case DOWN:
+ return true;
+
+ case UP:
+ return false;
+ }
+}
+
+std::string DebounceTest::directionLabel(Direction direction) {
+ switch (direction) {
+ case DOWN:
+ return "DOWN";
+
+ case UP:
+ return "UP";
+ }
+}
+
+/* Modify a matrix and verify that events always specify a change */
+void DebounceTest::matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event) {
+ ASSERT_NE(!!(matrix[event.row_] & (1U << event.col_)), directionValue(event.direction_))
+ << "Test " << name << " at " << strTime()
+ << " sets key " << event.row_ << "," << event.col_ << " " << directionLabel(event.direction_)
+ << " but it is already " << directionLabel(event.direction_)
+ << "\n" << name << "_matrix:\n" << strMatrix(matrix);
+
+ switch (event.direction_) {
+ case DOWN:
+ matrix[event.row_] |= (1U << event.col_);
+ break;
+
+ case UP:
+ matrix[event.row_] &= ~(1U << event.col_);
+ break;
+ }
+}
+
+DebounceTestEvent::DebounceTestEvent(fast_timer_t time,
+ std::initializer_list inputs,
+ std::initializer_list outputs)
+ : time_(time), inputs_(inputs), outputs_(outputs) {
+}
+
+MatrixTestEvent::MatrixTestEvent(int row, int col, Direction direction)
+ : row_(row), col_(col), direction_(direction) {
+}
diff --git a/quantum/debounce/tests/debounce_test_common.h b/quantum/debounce/tests/debounce_test_common.h
new file mode 100644
index 0000000000..d87e310594
--- /dev/null
+++ b/quantum/debounce/tests/debounce_test_common.h
@@ -0,0 +1,83 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include
+#include
+#include
+
+extern "C" {
+#include "quantum.h"
+#include "timer.h"
+}
+
+enum Direction {
+ DOWN,
+ UP,
+};
+
+class MatrixTestEvent {
+public:
+ MatrixTestEvent(int row, int col, Direction direction);
+
+ const int row_;
+ const int col_;
+ const Direction direction_;
+};
+
+class DebounceTestEvent {
+public:
+ // 0, {{0, 1, DOWN}}, {{0, 1, DOWN}})
+ DebounceTestEvent(fast_timer_t time,
+ std::initializer_list inputs,
+ std::initializer_list outputs);
+
+ const fast_timer_t time_;
+ const std::list inputs_;
+ const std::list outputs_;
+};
+
+class DebounceTest : public ::testing::Test {
+protected:
+ void addEvents(std::initializer_list events);
+ void runEvents();
+
+ fast_timer_t time_offset_ = 7777;
+ bool time_jumps_ = false;
+
+private:
+ static bool directionValue(Direction direction);
+ static std::string directionLabel(Direction direction);
+
+ void runEventsInternal();
+ void runDebounce(bool changed);
+ void checkCookedMatrix(bool changed, const std::string &error_message);
+ void matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event);
+
+ std::string strTime();
+ std::string strMatrix(matrix_row_t matrix[]);
+
+ std::list events_;
+
+ matrix_row_t input_matrix_[MATRIX_ROWS];
+ matrix_row_t raw_matrix_[MATRIX_ROWS];
+ matrix_row_t cooked_matrix_[MATRIX_ROWS];
+ matrix_row_t output_matrix_[MATRIX_ROWS];
+
+ int extra_iterations_;
+ bool auto_advance_time_;
+};
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
new file mode 100644
index 0000000000..29fda7889f
--- /dev/null
+++ b/quantum/debounce/tests/rules.mk
@@ -0,0 +1,39 @@
+# Copyright 2021 Simon Arlott
+#
+# 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 .
+
+DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5
+
+DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \
+ $(TMK_PATH)/common/test/timer.c
+
+debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_defer_g.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_defer_g_tests.cpp
+
+debounce_sym_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_defer_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_defer_pk_tests.cpp
+
+debounce_sym_eager_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_eager_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_eager_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_eager_pk_tests.cpp
+
+debounce_sym_eager_pr_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_sym_eager_pr_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/sym_eager_pr.c \
+ $(QUANTUM_PATH)/debounce/tests/sym_eager_pr_tests.cpp
diff --git a/quantum/debounce/tests/sym_defer_g_tests.cpp b/quantum/debounce/tests/sym_defer_g_tests.cpp
new file mode 100644
index 0000000000..a56aecd8f3
--- /dev/null
+++ b/quantum/debounce/tests/sym_defer_g_tests.cpp
@@ -0,0 +1,223 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 1ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 2ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ /* Release key exactly on the debounce time */
+ {5, {{0, 1, UP}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+
+ /* Press key exactly on the debounce time */
+ {11, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ {8, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {{0, 1, UP}}, {}},
+ {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {}},
+
+ {55, {}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {13, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {6, {{0, 1, UP}, {0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {}},
+ {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {13, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Release key before debounce expires */
+ {300, {{0, 1, UP}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is a bit late */
+ {50, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ {56, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_defer_pk_tests.cpp b/quantum/debounce/tests/sym_defer_pk_tests.cpp
new file mode 100644
index 0000000000..1f3061e59c
--- /dev/null
+++ b/quantum/debounce/tests/sym_defer_pk_tests.cpp
@@ -0,0 +1,225 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 0ms delay (fast scan rate) */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 1ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ /* 2ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ /* Release key exactly on the debounce time */
+ {5, {{0, 1, UP}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyTooQuick2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+
+ /* Press key exactly on the debounce time */
+ {11, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ {8, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {{0, 1, UP}}, {}},
+ {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {}},
+
+ {55, {}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {}, {{0, 2, DOWN}}},
+
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 2, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}},
+ {13, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {6, {{0, 1, UP}, {0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+ {1, {{0, 2, DOWN}}, {}},
+
+ {5, {}, {{0, 1, DOWN}}},
+ {6, {{0, 1, UP}}, {{0, 2, DOWN}}},
+ {7, {{0, 2, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}},
+ {12, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Release key before debounce expires */
+ {300, {{0, 1, UP}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {}},
+
+ /* Processing is a bit late */
+ {50, {}, {{0, 1, DOWN}}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ {56, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp
new file mode 100644
index 0000000000..e0fc205e33
--- /dev/null
+++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp
@@ -0,0 +1,237 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 2ms delay (debounce has not yet finished) */
+ {7, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 3ms delay (debounce has not yet finished) */
+ {8, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 4ms delay (debounce has not yet finished) */
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 5ms delay (debounce has finished) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key after after 6ms delay (debounce has finished) */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {3, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {3, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {4, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+ {3, {{0, 2, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {}, {{0, 2, UP}}},
+
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {9, {{0, 2, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+
+ {12, {}, {{0, 2, DOWN}}}, /* 5ms after UP at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {300, {}, {}},
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {300, {}, {}},
+ {301, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late but the change will now be accepted */
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {50, {}, {}},
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {50, {}, {}},
+ {51, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/sym_eager_pr_tests.cpp b/quantum/debounce/tests/sym_eager_pr_tests.cpp
new file mode 100644
index 0000000000..2c4bca127e
--- /dev/null
+++ b/quantum/debounce/tests/sym_eager_pr_tests.cpp
@@ -0,0 +1,280 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 2ms delay (debounce has not yet finished) */
+ {7, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 3ms delay (debounce has not yet finished) */
+ {8, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 4ms delay (debounce has not yet finished) */
+ {9, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 5ms delay (debounce has finished) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key after after 6ms delay (debounce has finished) */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {3, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {3, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {4, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoRowsShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{2, 0, DOWN}}, {{2, 0, DOWN}}},
+ {3, {{2, 0, UP}}, {}},
+
+ {5, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {}, {{2, 0, UP}}},
+
+ /* Press key again after 1ms delay (debounce has not yet finished) */
+ {9, {{2, 0, DOWN}}, {}},
+ {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */
+
+ {12, {}, {{2, 0, DOWN}}}, /* 5ms after UP at time 7 */
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysOverlap) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ /* Press a second key during the first debounce */
+ {2, {{0, 2, DOWN}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 0 */
+ {5, {}, {{0, 1, UP}, {0, 2, DOWN}}},
+ {6, {{0, 1, DOWN}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 5 */
+ {10, {}, {{0, 1, DOWN}}},
+ /* Release both keys */
+ {11, {{0, 1, UP}}, {}},
+ {12, {{0, 2, UP}}, {}},
+
+ /* Keys register as soon as debounce finishes, 5ms after time 10 */
+ {15, {}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {20, {{0, 1, UP}}, {{0, 1, UP}}},
+ {21, {{0, 2, UP}}, {}},
+
+ /* Key registers as soon as debounce finishes, 5ms after time 20 */
+ {25, {}, {{0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysSimultaneous2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}},
+ {20, {{0, 1, UP}, {0, 2, UP}}, {{0, 1, UP}, {0, 2, UP}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted */
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {300, {}, {}},
+ {300, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {300, {}, {}},
+ {301, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late but the change will now be accepted */
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1 scan delay */
+ {50, {}, {}},
+ {50, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late but the change will now be accepted even with a 1ms delay */
+ {50, {}, {}},
+ {51, {{0, 1, UP}}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/testlist.mk b/quantum/debounce/tests/testlist.mk
new file mode 100644
index 0000000000..16ce8a0a8e
--- /dev/null
+++ b/quantum/debounce/tests/testlist.mk
@@ -0,0 +1,5 @@
+TEST_LIST += \
+ debounce_sym_defer_g \
+ debounce_sym_defer_pk \
+ debounce_sym_eager_pk \
+ debounce_sym_eager_pr
diff --git a/testlist.mk b/testlist.mk
index 0d7609b9f0..d256f4c815 100644
--- a/testlist.mk
+++ b/testlist.mk
@@ -1,6 +1,7 @@
TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk)))
FULL_TESTS := $(TEST_LIST)
+include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk
include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk
include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk
diff --git a/tmk_core/common/arm_atsam/_timer.h b/tmk_core/common/arm_atsam/_timer.h
new file mode 100644
index 0000000000..77402b612a
--- /dev/null
+++ b/tmk_core/common/arm_atsam/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+#pragma once
+
+// The platform is 32-bit, so prefer 32-bit timers to avoid overflow
+#define FAST_TIMER_T_SIZE 32
diff --git a/tmk_core/common/avr/_timer.h b/tmk_core/common/avr/_timer.h
new file mode 100644
index 0000000000..b81e0f68b7
--- /dev/null
+++ b/tmk_core/common/avr/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+#pragma once
+
+// The platform is 8-bit, so prefer 16-bit timers to reduce code size
+#define FAST_TIMER_T_SIZE 16
diff --git a/tmk_core/common/chibios/_timer.h b/tmk_core/common/chibios/_timer.h
new file mode 100644
index 0000000000..77402b612a
--- /dev/null
+++ b/tmk_core/common/chibios/_timer.h
@@ -0,0 +1,19 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+#pragma once
+
+// The platform is 32-bit, so prefer 32-bit timers to avoid overflow
+#define FAST_TIMER_T_SIZE 32
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h
index 58f637dd93..928811a2b7 100644
--- a/tmk_core/common/timer.h
+++ b/tmk_core/common/timer.h
@@ -1,5 +1,6 @@
/*
Copyright 2011 Jun Wako
+Copyright 2021 Simon Arlott
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
@@ -17,13 +18,13 @@ along with this program. If not, see .
#pragma once
+#if __has_include_next("_timer.h")
+# include_next "_timer.h" /* Include the platform's _timer.h */
+#endif
+
#include
#include
-#if defined(__AVR__)
-# include "avr/timer_avr.h"
-#endif
-
#define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a)))))
#define TIMER_DIFF_8(a, b) TIMER_DIFF(a, b, UINT8_MAX)
#define TIMER_DIFF_16(a, b) TIMER_DIFF(a, b, UINT16_MAX)
@@ -47,6 +48,21 @@ uint32_t timer_elapsed32(uint32_t last);
#define timer_expired(current, future) ((uint16_t)(current - future) < UINT16_MAX / 2)
#define timer_expired32(current, future) ((uint32_t)(current - future) < UINT32_MAX / 2)
+// Use an appropriate timer integer size based on architecture (16-bit will overflow sooner)
+#if FAST_TIMER_T_SIZE < 32
+# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_16(a, b)
+# define timer_expired_fast(current, future) timer_expired(current, future)
+typedef uint16_t fast_timer_t;
+fast_timer_t inline timer_read_fast(void) { return timer_read(); }
+fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed(last); }
+#else
+# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_32(a, b)
+# define timer_expired_fast(current, future) timer_expired32(current, future)
+typedef uint32_t fast_timer_t;
+fast_timer_t inline timer_read_fast(void) { return timer_read32(); }
+fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed32(last); }
+#endif
+
#ifdef __cplusplus
}
#endif
--
cgit v1.2.3
From 32b2ac0a807bdb088df685e6118f4c0966b6cca4 Mon Sep 17 00:00:00 2001
From: Gigahawk
Date: Wed, 9 Jun 2021 18:40:25 -0700
Subject: GMMK Pro RGB Support (#13147)
* Enable SPI1 for GMMK pro
* Setup initial boilerplate for new LED driver
* RGB matrix minimally functional
* Map full LED matrix
* Return keymap to default
* Fix printscreen LED mapping
* Reduce max brightness
* Default values for AW20216
* Add documentation for AW20216
* Disable console and warnings
* Run cformat
* Update drivers/awinic/aw20216.h
Co-authored-by: Drashna Jaelre
* make aw struct match issi struct
Co-authored-by: Drashna Jaelre
* add led location defines
Co-authored-by: Drashna Jaelre
* Use led pin definitions in keyboard.c
* Add driver indices to led map
* Fix elif typo
* Run cformat
* Update docs
* Fix typo in docs
* Document global brightness limits
Co-authored-by: Drashna Jaelre ---
common_features.mk | 9 +-
docs/feature_rgb_matrix.md | 68 ++++++++++++
drivers/awinic/aw20216.c | 166 ++++++++++++++++++++++++++++
drivers/awinic/aw20216.h | 251 +++++++++++++++++++++++++++++++++++++++++++
keyboards/gmmk/pro/config.h | 17 +++
keyboards/gmmk/pro/halconf.h | 7 ++
keyboards/gmmk/pro/mcuconf.h | 6 ++
keyboards/gmmk/pro/pro.c | 222 ++++++++++++++++++++++++++++++++++++++
keyboards/gmmk/pro/rules.mk | 2 +
quantum/rgb_matrix.h | 2 +
quantum/rgb_matrix_drivers.c | 16 +++
11 files changed, 765 insertions(+), 1 deletion(-)
create mode 100644 drivers/awinic/aw20216.c
create mode 100644 drivers/awinic/aw20216.h
create mode 100644 keyboards/gmmk/pro/halconf.h
create mode 100644 keyboards/gmmk/pro/mcuconf.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 1a9fd46b55..37ce928e2a 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -244,7 +244,7 @@ endif
endif
RGB_MATRIX_ENABLE ?= no
-VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
+VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
@@ -261,6 +261,13 @@ endif
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
+ OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
+ COMMON_VPATH += $(DRIVER_PATH)/awinic
+ SRC += aw20216.c
+ QUANTUM_LIB_SRC += spi_master.c
+ endif
+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 169443fb85..afd72fecff 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -227,6 +227,74 @@ Configure the hardware via your `config.h`:
#define DRIVER_LED_TOTAL 70
```
+---
+### AW20216 :id=aw20216
+There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`:
+
+```makefile
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = AW20216
+```
+
+You can use up to 2 AW20216 IC's. Do not specify `DRIVER__xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 |
+| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | |
+| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 |
+| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | |
+| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | |
+| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | |
+| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | |
+| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | |
+| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 |
+| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 |
+
+Here is an example using 2 drivers.
+
+```c
+#define DRIVER_1_CS B13
+#define DRIVER_2_CS B14
+// Hardware enable lines may be connected to the same pin
+#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 32
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+```
+
+!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
+
+Define these arrays listing all the LEDs in your `.c`:
+
+```c
+const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
+/* Each AW20216 channel is controlled by a register at some offset between 0x00
+ * and 0xD7 inclusive.
+ * See drivers/awinic/aw20216.h for the mapping between register offsets and
+ * driver pin locations.
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ { 0, CS1_SW1, CS2_SW1, CS3_SW1 },
+ { 0, CS4_SW1, CS5_SW1, CS6_SW1 },
+ { 0, CS7_SW1, CS8_SW1, CS9_SW1 },
+ { 0, CS10_SW1, CS11_SW1, CS12_SW1 },
+ { 0, CS13_SW1, CS14_SW1, CS15_SW1 },
+ ...
+ { 1, CS1_SW1, CS2_SW1, CS3_SW1 },
+ { 1, CS13_SW1, CS14_SW1, CS15_SW1 },
+ { 1, CS16_SW1, CS17_SW1, CS18_SW1 },
+ { 1, CS4_SW2, CS5_SW2, CS6_SW2 },
+ ...
+};
+```
+
---
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
diff --git a/drivers/awinic/aw20216.c b/drivers/awinic/aw20216.c
new file mode 100644
index 0000000000..236c42a3cd
--- /dev/null
+++ b/drivers/awinic/aw20216.c
@@ -0,0 +1,166 @@
+/* Copyright 2021 Jasper Chan
+ *
+ * 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 .
+ */
+
+#include "aw20216.h"
+#include "spi_master.h"
+
+/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
+ * a few things are different, such as the command byte format and page ordering.
+ * The LED addresses start from 0x00 instead of 0x01.
+ */
+#define AWINIC_ID 0b1010 << 4
+
+#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
+#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
+#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
+#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
+#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
+
+#define AW_WRITE 0
+#define AW_READ 1
+
+#define AW_REG_CONFIGURATION 0x00 // PG0
+#define AW_REG_GLOBALCURRENT 0x01 // PG0
+
+// Default value of AW_REG_CONFIGURATION
+// D7:D4 = 1011, SWSEL (SW1~SW12 active)
+// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
+// D2:D1 = 00, OSDE (open/short detection enable)
+// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
+#define AW_CONFIG_DEFAULT 0b10110000
+#define AW_CHIPEN 1
+
+#ifndef AW_SCALING_MAX
+# define AW_SCALING_MAX 150
+#endif
+
+#ifndef AW_GLOBAL_CURRENT_MAX
+# define AW_GLOBAL_CURRENT_MAX 150
+#endif
+
+#ifndef DRIVER_1_CS
+# define DRIVER_1_CS B13
+#endif
+
+#ifndef DRIVER_1_EN
+# define DRIVER_1_EN C13
+#endif
+
+uint8_t g_spi_transfer_buffer[20] = {0};
+aw_led g_pwm_buffer[DRIVER_LED_TOTAL];
+bool g_pwm_buffer_update_required[DRIVER_LED_TOTAL];
+
+bool AW20216_write_register(pin_t slave_pin, uint8_t page, uint8_t reg, uint8_t data) {
+ // Do we need to call spi_stop() if this fails?
+ if (!spi_start(slave_pin, false, 0, 16)) {
+ return false;
+ }
+
+ g_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE);
+ g_spi_transfer_buffer[1] = reg;
+ g_spi_transfer_buffer[2] = data;
+
+ if (spi_transmit(g_spi_transfer_buffer, 3) != SPI_STATUS_SUCCESS) {
+ spi_stop();
+ return false;
+ }
+ spi_stop();
+ return true;
+}
+
+bool AW20216_init_scaling(void) {
+ // Set constant current to the max, control brightness with PWM
+ aw_led led;
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ led = g_aw_leds[i];
+ if (led.driver == 0) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
+ }
+#ifdef DRIVER_2_CS
+ else if (led.driver == 1) {
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.r, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.g, AW_SCALING_MAX);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_SCALING, led.b, AW_SCALING_MAX);
+ }
+#endif
+ }
+ return true;
+}
+
+bool AW20216_soft_enable(void) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
+#ifdef DRIVER_2_CS
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
+#endif
+ return true;
+}
+
+void AW20216_update_pwm(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ aw_led led = g_aw_leds[index];
+ if (led.driver == 0) {
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.r, red);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.g, green);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_PWM, led.b, blue);
+ }
+#ifdef DRIVER_2_CS
+ else if (led.driver == 1) {
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.r, red);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.g, green);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_PWM, led.b, blue);
+ }
+#endif
+ return;
+}
+
+void AW20216_init(void) {
+ // All LEDs should start with all scaling and PWM registers as off
+ setPinOutput(DRIVER_1_EN);
+ writePinHigh(DRIVER_1_EN);
+ AW20216_write_register(DRIVER_1_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
+#ifdef DRIVER_2_EN
+ setPinOutput(DRIVER_2_EN);
+ writePinHigh(DRIVER_2_EN);
+ AW20216_write_register(DRIVER_2_CS, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
+#endif
+ AW20216_init_scaling();
+ AW20216_soft_enable();
+ return;
+}
+
+void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+ g_pwm_buffer[index].r = red;
+ g_pwm_buffer[index].g = green;
+ g_pwm_buffer[index].b = blue;
+ g_pwm_buffer_update_required[index] = true;
+ return;
+}
+void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ AW20216_set_color(i, red, green, blue);
+ }
+ return;
+}
+void AW20216_update_pwm_buffers(void) {
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
+ if (g_pwm_buffer_update_required[i]) {
+ AW20216_update_pwm(i, g_pwm_buffer[i].r, g_pwm_buffer[i].g, g_pwm_buffer[i].b);
+ g_pwm_buffer_update_required[i] = false;
+ }
+ }
+ return;
+}
diff --git a/drivers/awinic/aw20216.h b/drivers/awinic/aw20216.h
new file mode 100644
index 0000000000..9c6865cc82
--- /dev/null
+++ b/drivers/awinic/aw20216.h
@@ -0,0 +1,251 @@
+/* Copyright 2021 Jasper Chan (Gigahawk)
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include
+#include
+
+typedef struct aw_led {
+ uint8_t driver : 2;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} aw_led;
+
+extern const aw_led g_aw_leds[DRIVER_LED_TOTAL];
+
+void AW20216_init(void);
+void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+void AW20216_update_pwm_buffers(void);
+
+#define CS1_SW1 0x00
+#define CS2_SW1 0x01
+#define CS3_SW1 0x02
+#define CS4_SW1 0x03
+#define CS5_SW1 0x04
+#define CS6_SW1 0x05
+#define CS7_SW1 0x06
+#define CS8_SW1 0x07
+#define CS9_SW1 0x08
+#define CS10_SW1 0x09
+#define CS11_SW1 0x0A
+#define CS12_SW1 0x0B
+#define CS13_SW1 0x0C
+#define CS14_SW1 0x0D
+#define CS15_SW1 0x0E
+#define CS16_SW1 0x0F
+#define CS17_SW1 0x10
+#define CS18_SW1 0x11
+#define CS1_SW2 0x12
+#define CS2_SW2 0x13
+#define CS3_SW2 0x14
+#define CS4_SW2 0x15
+#define CS5_SW2 0x16
+#define CS6_SW2 0x17
+#define CS7_SW2 0x18
+#define CS8_SW2 0x19
+#define CS9_SW2 0x1A
+#define CS10_SW2 0x1B
+#define CS11_SW2 0x1C
+#define CS12_SW2 0x1D
+#define CS13_SW2 0x1E
+#define CS14_SW2 0x1F
+#define CS15_SW2 0x20
+#define CS16_SW2 0x21
+#define CS17_SW2 0x22
+#define CS18_SW2 0x23
+#define CS1_SW3 0x24
+#define CS2_SW3 0x25
+#define CS3_SW3 0x26
+#define CS4_SW3 0x27
+#define CS5_SW3 0x28
+#define CS6_SW3 0x29
+#define CS7_SW3 0x2A
+#define CS8_SW3 0x2B
+#define CS9_SW3 0x2C
+#define CS10_SW3 0x2D
+#define CS11_SW3 0x2E
+#define CS12_SW3 0x2F
+#define CS13_SW3 0x30
+#define CS14_SW3 0x31
+#define CS15_SW3 0x32
+#define CS16_SW3 0x33
+#define CS17_SW3 0x34
+#define CS18_SW3 0x35
+#define CS1_SW4 0x36
+#define CS2_SW4 0x37
+#define CS3_SW4 0x38
+#define CS4_SW4 0x39
+#define CS5_SW4 0x3A
+#define CS6_SW4 0x3B
+#define CS7_SW4 0x3C
+#define CS8_SW4 0x3D
+#define CS9_SW4 0x3E
+#define CS10_SW4 0x3F
+#define CS11_SW4 0x40
+#define CS12_SW4 0x41
+#define CS13_SW4 0x42
+#define CS14_SW4 0x43
+#define CS15_SW4 0x44
+#define CS16_SW4 0x45
+#define CS17_SW4 0x46
+#define CS18_SW4 0x47
+#define CS1_SW5 0x48
+#define CS2_SW5 0x49
+#define CS3_SW5 0x4A
+#define CS4_SW5 0x4B
+#define CS5_SW5 0x4C
+#define CS6_SW5 0x4D
+#define CS7_SW5 0x4E
+#define CS8_SW5 0x4F
+#define CS9_SW5 0x50
+#define CS10_SW5 0x51
+#define CS11_SW5 0x52
+#define CS12_SW5 0x53
+#define CS13_SW5 0x54
+#define CS14_SW5 0x55
+#define CS15_SW5 0x56
+#define CS16_SW5 0x57
+#define CS17_SW5 0x58
+#define CS18_SW5 0x59
+#define CS1_SW6 0x5A
+#define CS2_SW6 0x5B
+#define CS3_SW6 0x5C
+#define CS4_SW6 0x5D
+#define CS5_SW6 0x5E
+#define CS6_SW6 0x5F
+#define CS7_SW6 0x60
+#define CS8_SW6 0x61
+#define CS9_SW6 0x62
+#define CS10_SW6 0x63
+#define CS11_SW6 0x64
+#define CS12_SW6 0x65
+#define CS13_SW6 0x66
+#define CS14_SW6 0x67
+#define CS15_SW6 0x68
+#define CS16_SW6 0x69
+#define CS17_SW6 0x6A
+#define CS18_SW6 0x6B
+#define CS1_SW7 0x6C
+#define CS2_SW7 0x6D
+#define CS3_SW7 0x6E
+#define CS4_SW7 0x6F
+#define CS5_SW7 0x70
+#define CS6_SW7 0x71
+#define CS7_SW7 0x72
+#define CS8_SW7 0x73
+#define CS9_SW7 0x74
+#define CS10_SW7 0x75
+#define CS11_SW7 0x76
+#define CS12_SW7 0x77
+#define CS13_SW7 0x78
+#define CS14_SW7 0x79
+#define CS15_SW7 0x7A
+#define CS16_SW7 0x7B
+#define CS17_SW7 0x7C
+#define CS18_SW7 0x7D
+#define CS1_SW8 0x7E
+#define CS2_SW8 0x7F
+#define CS3_SW8 0x80
+#define CS4_SW8 0x81
+#define CS5_SW8 0x82
+#define CS6_SW8 0x83
+#define CS7_SW8 0x84
+#define CS8_SW8 0x85
+#define CS9_SW8 0x86
+#define CS10_SW8 0x87
+#define CS11_SW8 0x88
+#define CS12_SW8 0x89
+#define CS13_SW8 0x8A
+#define CS14_SW8 0x8B
+#define CS15_SW8 0x8C
+#define CS16_SW8 0x8D
+#define CS17_SW8 0x8E
+#define CS18_SW8 0x8F
+#define CS1_SW9 0x90
+#define CS2_SW9 0x91
+#define CS3_SW9 0x92
+#define CS4_SW9 0x93
+#define CS5_SW9 0x94
+#define CS6_SW9 0x95
+#define CS7_SW9 0x96
+#define CS8_SW9 0x97
+#define CS9_SW9 0x98
+#define CS10_SW9 0x99
+#define CS11_SW9 0x9A
+#define CS12_SW9 0x9B
+#define CS13_SW9 0x9C
+#define CS14_SW9 0x9D
+#define CS15_SW9 0x9E
+#define CS16_SW9 0x9F
+#define CS17_SW9 0xA0
+#define CS18_SW9 0xA1
+#define CS1_SW10 0xA2
+#define CS2_SW10 0xA3
+#define CS3_SW10 0xA4
+#define CS4_SW10 0xA5
+#define CS5_SW10 0xA6
+#define CS6_SW10 0xA7
+#define CS7_SW10 0xA8
+#define CS8_SW10 0xA9
+#define CS9_SW10 0xAA
+#define CS10_SW10 0xAB
+#define CS11_SW10 0xAC
+#define CS12_SW10 0xAD
+#define CS13_SW10 0xAE
+#define CS14_SW10 0xAF
+#define CS15_SW10 0xB0
+#define CS16_SW10 0xB1
+#define CS17_SW10 0xB2
+#define CS18_SW10 0xB3
+#define CS1_SW11 0xB4
+#define CS2_SW11 0xB5
+#define CS3_SW11 0xB6
+#define CS4_SW11 0xB7
+#define CS5_SW11 0xB8
+#define CS6_SW11 0xB9
+#define CS7_SW11 0xBA
+#define CS8_SW11 0xBB
+#define CS9_SW11 0xBC
+#define CS10_SW11 0xBD
+#define CS11_SW11 0xBE
+#define CS12_SW11 0xBF
+#define CS13_SW11 0xC0
+#define CS14_SW11 0xC1
+#define CS15_SW11 0xC2
+#define CS16_SW11 0xC3
+#define CS17_SW11 0xC4
+#define CS18_SW11 0xC5
+#define CS1_SW12 0xC6
+#define CS2_SW12 0xC7
+#define CS3_SW12 0xC8
+#define CS4_SW12 0xC9
+#define CS5_SW12 0xCA
+#define CS6_SW12 0xCB
+#define CS7_SW12 0xCC
+#define CS8_SW12 0xCD
+#define CS9_SW12 0xCE
+#define CS10_SW12 0xCF
+#define CS11_SW12 0xD0
+#define CS12_SW12 0xD1
+#define CS13_SW12 0xD2
+#define CS14_SW12 0xD3
+#define CS15_SW12 0xD4
+#define CS16_SW12 0xD5
+#define CS17_SW12 0xD6
+#define CS18_SW12 0xD7
diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h
index ab3c7a7a21..64062becea 100644
--- a/keyboards/gmmk/pro/config.h
+++ b/keyboards/gmmk/pro/config.h
@@ -46,3 +46,20 @@
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
+
+/* SPI Config for LED Driver */
+#define SPI_DRIVER SPID1
+#define SPI_SCK_PIN A5
+#define SPI_MOSI_PIN A6
+#define SPI_MISO_PIN A7
+
+#define DRIVER_1_CS B13
+#define DRIVER_2_CS B14
+#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 32
+#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+
diff --git a/keyboards/gmmk/pro/halconf.h b/keyboards/gmmk/pro/halconf.h
new file mode 100644
index 0000000000..23ecb202a1
--- /dev/null
+++ b/keyboards/gmmk/pro/halconf.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#define HAL_USE_SPI TRUE
+#define SPI_USE_WAIT TRUE
+#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
+
+#include_next
diff --git a/keyboards/gmmk/pro/mcuconf.h b/keyboards/gmmk/pro/mcuconf.h
new file mode 100644
index 0000000000..bb1c0acde2
--- /dev/null
+++ b/keyboards/gmmk/pro/mcuconf.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include_next
+
+#undef STM32_SPI_USE_SPI1
+#define STM32_SPI_USE_SPI1 TRUE
diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c
index 816d089a58..3a343f2237 100644
--- a/keyboards/gmmk/pro/pro.c
+++ b/keyboards/gmmk/pro/pro.c
@@ -14,3 +14,225 @@
* along with this program. If not, see .
*/
#include "pro.h"
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ { 4, NO_LED, NO_LED, 97, 65, 79, 5, 28 },
+ { 8, 2, 9, 0, 10, 75, 1, 7 },
+ { 14, 3, 15, NO_LED, 16, 86, 6, 13 },
+ { 20, 18, 21, 23, 22, 94, 12, 19 },
+ { 25, 30, 26, 31, 27, 32, 29, 24 },
+ { 41, 36, 42, 37, 43, 38, 35, 40 },
+ { 46, 89, 47, 34, 48, 72, 78, 45 },
+ { 52, 39, 53, 101, 54, 82, 44, 51 },
+ { 58, 63, 59, 64, NO_LED, 60, 62, 57 },
+ { 11, 90, 55, 17, 33, 49, NO_LED, 69 },
+ { NO_LED, 85, 93, 61, 100, 66, 50, 56 }
+}, {
+ { 0, 0 }, // 0, ESC, k13
+ { 0, 15 }, // 1, ~, k16
+ { 4, 26 }, // 2, Tab, k11
+ { 5, 38 }, // 3, Caps, k21
+ { 9, 49 }, // 4, Sh_L, k00
+ { 2, 61 }, // 5, Ct_L, k06
+ { 18, 0 }, // 6, F1, k26
+ { 14, 15 }, // 7, 1, k17
+ { 22, 26 }, // 8, Q, k10
+ { 25, 38 }, // 9, A, k12
+ { 33, 49 }, // 10, Z, k14
+ { 20, 61 }, // 11, Win_L, k90
+ { 33, 0 }, // 12, F2, k36
+ { 29, 15 }, // 13, 2, k27
+ { 36, 26 }, // 14, W, k20
+ { 40, 38 }, // 15, S, k22
+ { 47, 49 }, // 16, X, k24
+ { 38, 61 }, // 17, Alt_L, k93
+ { 47, 0 }, // 18, F3, k31
+ { 43, 15 }, // 19, 3, k37
+ { 51, 26 }, // 20, E, k30
+ { 54, 38 }, // 21, D, k32
+ { 61, 49 }, // 22, C, k34
+ { 61, 0 }, // 23, F4, k33
+ { 58, 15 }, // 24, 4, k47
+ { 65, 26 }, // 25, R, k40
+ { 69, 38 }, // 26, F, k42
+ { 76, 49 }, // 27, V, k44
+ { 79, 0 }, // 28, F5, k07
+ { 72, 15 }, // 29, 5, k46
+ { 79, 26 }, // 30, T, k41
+ { 83, 38 }, // 31, G, k43
+ { 90, 49 }, // 32, B, k45
+ { 92, 61 }, // 33, SPACE, k94
+ { 94, 0 }, // 34, F6, k63
+ { 87, 15 }, // 35, 6, k56
+ { 94, 26 }, // 36, Y, k51
+ { 98, 38 }, // 37, H, k53
+ { 105, 49 }, // 38, N, k55
+ { 108, 0 }, // 39, F7, k71
+ { 101, 15 }, // 40, 7, k57
+ { 108, 26 }, // 41, U, k50
+ { 112, 38 }, // 42, J, k52
+ { 119, 49 }, // 43, M, k54
+ { 123, 0 }, // 44, F8, k76
+ { 116, 15 }, // 45, 8, k67
+ { 123, 26 }, // 46, I, k60
+ { 126, 38 }, // 47, K, k62
+ { 134, 49 }, // 48, ,, k64
+ { 145, 61 }, // 49, Alt_R, k95
+ { 141, 0 }, // 50, F9, ka6
+ { 130, 15 }, // 51, 9, k77
+ { 137, 26 }, // 52, O, k70
+ { 141, 38 }, // 53, L, k72
+ { 148, 49 }, // 54, ., k74
+ { 159, 61 }, // 55, FN, k92
+ { 155, 0 }, // 56, F10, ka7
+ { 145, 15 }, // 57, 0, k87
+ { 152, 26 }, // 58, P, k80
+ { 155, 38 }, // 59, ;, k82
+ { 163, 49 }, // 60, ?, k85
+ { 170, 0 }, // 61, F11, ka3
+ { 159, 15 }, // 62, -, k86
+ { 166, 26 }, // 63, [, k81
+ { 170, 38 }, // 64, ", k83
+ { 173, 61 }, // 65, Ct_R, k04
+ { 184, 0 }, // 66, F12, ka5
+ { 0, 8 }, // 67, LED, l01
+ { 224, 8 }, // 68, LED, l11
+ { 202, 0 }, // 69, Prt, k97
+ { 0, 15 }, // 70, LED, l02
+ { 224, 15 }, // 71, LED, l12
+ { 224, 15 }, // 72, Del, k65
+ { 0, 21 }, // 73, LED, l03
+ { 224, 21 }, // 74, LED, l13
+ { 224, 26 }, // 75, PgUp, k15
+ { 0, 28 }, // 76, LED, l04
+ { 224, 28 }, // 77, LED, l14
+ { 173, 15 }, // 78, =, k66
+ { 220, 64 }, // 79, Right, k05
+ { 0, 35 }, // 80, LED, l05
+ { 224, 35 }, // 81, LED, l15
+ { 224, 49 }, // 82, End, k75
+ { 0, 42 }, // 83, LED, l06
+ { 224, 42 }, // 84, LED, l16
+ { 195, 15 }, // 85, BSpc, ka1
+ { 224, 38 }, // 86, PgDn, k25
+ { 0, 48 }, // 87, LED, l07
+ { 224, 48 }, // 88, LED, l17
+ { 181, 26 }, // 89, ], k61
+ { 182, 49 }, // 90, Sh_R, k91
+ { 0, 55 }, // 91, LED, l08
+ { 224, 55 }, // 92, LED, l18
+ { 199, 26 }, // 93, \, ka2
+ { 206, 52 }, // 94, Up, k35
+ { 191, 64 }, // 95, Left, k03
+ { 193, 38 }, // 96, Enter, ka4
+ { 206, 64 } // 97, Down, k73
+}, {
+ 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, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2,
+ 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4
+} };
+
+const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
+ { 0, CS1_SW1, CS2_SW1, CS3_SW1 }, // 0, ESC, k13
+ { 0, CS4_SW1, CS5_SW1, CS6_SW1 }, // 1, ~, k16
+ { 0, CS7_SW1, CS8_SW1, CS9_SW1 }, // 2, Tab, k11
+ { 0, CS10_SW1, CS11_SW1, CS12_SW1 }, // 3, Caps, k21
+ { 0, CS13_SW1, CS14_SW1, CS15_SW1 }, // 4, Sh_L, k00
+ { 0, CS16_SW1, CS17_SW1, CS18_SW1 }, // 5, Ct_L, k06
+ { 0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 6, F1, k26
+ { 0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 7, 1, k17
+ { 0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 8, Q, k10
+ { 0, CS10_SW2, CS11_SW2, CS12_SW2 }, // 9, A, k12
+ { 0, CS13_SW2, CS14_SW2, CS15_SW2 }, // 10, Z, k14
+ { 0, CS16_SW2, CS17_SW2, CS18_SW2 }, // 11, Win_L, k90
+ { 0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 12, F2, k36
+ { 0, CS4_SW3, CS5_SW3, CS6_SW3 }, // 13, 2, k27
+ { 0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 14, W, k20
+ { 0, CS10_SW3, CS11_SW3, CS12_SW3 }, // 15, S, k22
+ { 0, CS13_SW3, CS14_SW3, CS15_SW3 }, // 16, X, k24
+ { 0, CS16_SW3, CS17_SW3, CS18_SW3 }, // 17, Alt_L, k93
+ { 0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 18, F3, k31
+ { 0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 19, 3, k37
+ { 0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 20, E, k30
+ { 0, CS10_SW4, CS11_SW4, CS12_SW4 }, // 21, D, k32
+ { 0, CS13_SW4, CS14_SW4, CS15_SW4 }, // 22, C, k34
+ { 0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 23, F4, k33
+ { 0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 24, 4, k47
+ { 0, CS7_SW5, CS8_SW5, CS9_SW5 }, // 25, R, k40
+ { 0, CS10_SW5, CS11_SW5, CS12_SW5 }, // 26, F, k42
+ { 0, CS13_SW5, CS14_SW5, CS15_SW5 }, // 27, V, k44
+ { 0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 28, F5, k07
+ { 0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 29, 5, k46
+ { 0, CS7_SW6, CS8_SW6, CS9_SW6 }, // 30, T, k41
+ { 0, CS10_SW6, CS11_SW6, CS12_SW6 }, // 31, G, k43
+ { 0, CS13_SW6, CS14_SW6, CS15_SW6 }, // 32, B, k45
+ { 0, CS16_SW6, CS17_SW6, CS18_SW6 }, // 33, SPACE, k94
+ { 0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 34, F6, k63
+ { 0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 35, 6, k56
+ { 0, CS7_SW7, CS8_SW7, CS9_SW7 }, // 36, Y, k51
+ { 0, CS10_SW7, CS11_SW7, CS12_SW7 }, // 37, H, k53
+ { 0, CS13_SW7, CS14_SW7, CS15_SW7 }, // 38, N, k55
+ { 0, CS1_SW8, CS2_SW8, CS3_SW8 }, // 39, F7, k71
+ { 0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 40, 7, k57
+ { 0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 41, U, k50
+ { 0, CS10_SW8, CS11_SW8, CS12_SW8 }, // 42, J, k52
+ { 0, CS13_SW8, CS14_SW8, CS15_SW8 }, // 43, M, k54
+ { 0, CS1_SW9, CS2_SW9, CS3_SW9 }, // 44, F8, k76
+ { 0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 45, 8, k67
+ { 0, CS7_SW9, CS8_SW9, CS9_SW9 }, // 46, I, k60
+ { 0, CS10_SW9, CS11_SW9, CS12_SW9 }, // 47, K, k62
+ { 0, CS13_SW9, CS14_SW9, CS15_SW9 }, // 48, ,, k64
+ { 0, CS16_SW9, CS17_SW9, CS18_SW9 }, // 49, Alt_R, k95
+ { 0, CS1_SW10, CS2_SW10, CS3_SW10 }, // 50, F9, ka6
+ { 0, CS4_SW10, CS5_SW10, CS6_SW10 }, // 51, 9, k77
+ { 0, CS7_SW10, CS8_SW10, CS9_SW10 }, // 52, O, k70
+ { 0, CS10_SW10, CS11_SW10, CS12_SW10 }, // 53, L, k72
+ { 0, CS13_SW10, CS14_SW10, CS15_SW10 }, // 54, ., k74
+ { 0, CS16_SW10, CS17_SW10, CS18_SW10 }, // 55, FN, k92
+ { 0, CS1_SW11, CS2_SW11, CS3_SW11 }, // 56, F10, ka7
+ { 0, CS4_SW11, CS5_SW11, CS6_SW11 }, // 57, 0, k87
+ { 0, CS7_SW11, CS8_SW11, CS9_SW11 }, // 58, P, k80
+ { 0, CS10_SW11, CS11_SW11, CS12_SW11 }, // 59, ;, k82
+ { 0, CS13_SW11, CS14_SW11, CS15_SW11 }, // 60, ?, k85
+ { 0, CS1_SW12, CS2_SW12, CS3_SW12 }, // 61, F11, ka3
+ { 0, CS4_SW12, CS5_SW12, CS6_SW12 }, // 62, -, k86
+ { 0, CS7_SW12, CS8_SW12, CS9_SW12 }, // 63, [, k81
+ { 0, CS10_SW12, CS11_SW12, CS12_SW12 }, // 64, ", k83
+ { 0, CS16_SW12, CS17_SW12, CS18_SW12 }, // 65, Ct_R, k04
+
+ { 1, CS1_SW1, CS2_SW1, CS3_SW1 }, // 66, F12, ka5
+ { 1, CS13_SW1, CS14_SW1, CS15_SW1 }, // 67, LED, l01
+ { 1, CS16_SW1, CS17_SW1, CS18_SW1 }, // 68, LED, l11
+ { 1, CS4_SW2, CS5_SW2, CS6_SW2 }, // 69, Prt, k97
+ { 1, CS13_SW2, CS14_SW2, CS15_SW2 }, // 70, LED, l02
+ { 1, CS16_SW2, CS17_SW2, CS18_SW2 }, // 71, LED, l12
+ { 1, CS4_SW3, CS5_SW3, CS6_SW3 }, // 72, Del, k65
+ { 1, CS13_SW3, CS14_SW3, CS15_SW3 }, // 73, LED, l03
+ { 1, CS16_SW3, CS17_SW3, CS18_SW3 }, // 74, LED, l13
+ { 1, CS4_SW4, CS5_SW4, CS6_SW4 }, // 75, PgUp, k15
+ { 1, CS13_SW4, CS14_SW4, CS15_SW4 }, // 76, LED, l04
+ { 1, CS16_SW4, CS17_SW4, CS18_SW4 }, // 77, LED, l14
+ { 1, CS1_SW5, CS2_SW5, CS3_SW5 }, // 78, =, k66
+ { 1, CS10_SW5, CS11_SW5, CS12_SW5 }, // 79, Right, k05
+ { 1, CS13_SW5, CS14_SW5, CS15_SW5 }, // 80, LED, l05
+ { 1, CS16_SW5, CS17_SW5, CS18_SW5 }, // 81, LED, l15
+ { 1, CS4_SW6, CS5_SW6, CS6_SW6 }, // 82, End, k75
+ { 1, CS13_SW6, CS14_SW6, CS15_SW6 }, // 83, LED, l06
+ { 1, CS16_SW6, CS17_SW6, CS18_SW6 }, // 84, LED, l16
+ { 1, CS1_SW7, CS2_SW7, CS3_SW7 }, // 85, BSpc, ka1
+ { 1, CS4_SW7, CS5_SW7, CS6_SW7 }, // 86, PgDn, k25
+ { 1, CS13_SW7, CS14_SW7, CS15_SW7 }, // 87, LED, l07
+ { 1, CS16_SW7, CS17_SW7, CS18_SW7 }, // 88, LED, l17
+ { 1, CS1_SW8, CS2_SW8, CS3_SW8 }, // 89, ], k61
+ { 1, CS4_SW8, CS5_SW8, CS6_SW8 }, // 90, Sh_R, k91
+ { 1, CS13_SW8, CS14_SW8, CS15_SW8 }, // 91, LED, l08
+ { 1, CS16_SW8, CS17_SW8, CS18_SW8 }, // 92, LED, l18
+ { 1, CS1_SW9, CS2_SW9, CS3_SW9 }, // 93, \, ka2
+ { 1, CS4_SW9, CS5_SW9, CS6_SW9 }, // 94, Up, k35
+ { 1, CS4_SW10, CS5_SW10, CS6_SW10 }, // 95, Left, k03
+ { 1, CS1_SW11, CS2_SW11, CS3_SW11 }, // 96, Enter, ka4
+ { 1, CS4_SW11, CS5_SW11, CS6_SW11 }, // 97, Down, k73
+};
+#endif
diff --git a/keyboards/gmmk/pro/rules.mk b/keyboards/gmmk/pro/rules.mk
index b12d055a3d..6221d64082 100644
--- a/keyboards/gmmk/pro/rules.mk
+++ b/keyboards/gmmk/pro/rules.mk
@@ -21,3 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = AW20216
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index a615b8422c..741a2fe446 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -33,6 +33,8 @@
# include "is31fl3737.h"
#elif defined(IS31FL3741)
# include "is31fl3741.h"
+#elif defined(AW20216)
+# include "aw20216.h"
#elif defined(WS2812)
# include "ws2812.h"
#endif
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
index 896fa6d0ef..6a11d4791e 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix_drivers.c
@@ -171,6 +171,22 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};
# endif
+#elif defined(AW20216)
+# include "spi_master.h"
+static void init(void) {
+ spi_init();
+ AW20216_init();
+}
+
+static void flush(void) { AW20216_update_pwm_buffers(); }
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = AW20216_set_color,
+ .set_color_all = AW20216_set_color_all,
+};
+
#elif defined(WS2812)
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
--
cgit v1.2.3
From 7a6e630ffd1a2a8357daf8b7ed2ab766eae55e07 Mon Sep 17 00:00:00 2001
From: Drashna Jaelre
Date: Wed, 9 Jun 2021 22:59:19 -0700
Subject: Fix RGB/LED Suspend defines (#13146)
---
keyboards/basekeys/trifecta/config.h | 4 +-
keyboards/bm40hsrgb/config.h | 2 +-
keyboards/bm68rgb/keymaps/peepeetee/config.h | 2 +-
keyboards/boardsource/the_mark/config.h | 2 +-
keyboards/crkbd/keymaps/devdev/config.h | 14 +++----
keyboards/crkbd/keymaps/gotham/config.h | 2 +-
keyboards/crkbd/keymaps/kidbrazil/config.h | 2 +-
keyboards/crkbd/keymaps/rpbaptist/config.h | 2 +-
keyboards/crkbd/keymaps/soundmonster/config.h | 4 +-
keyboards/crkbd/readme.md | 2 +-
keyboards/dztech/dz60rgb/v1/config.h | 2 +-
keyboards/dztech/dz60rgb/v2/config.h | 2 +-
keyboards/dztech/dz60rgb_ansi/v1/config.h | 2 +-
keyboards/dztech/dz60rgb_ansi/v2/config.h | 2 +-
keyboards/dztech/dz60rgb_wkl/v1/config.h | 2 +-
keyboards/dztech/dz60rgb_wkl/v2/config.h | 2 +-
keyboards/dztech/dz65rgb/v1/config.h | 4 +-
keyboards/dztech/dz65rgb/v2/config.h | 2 +-
keyboards/ergodox_ez/config.h | 2 +-
.../ergodox_ez/keymaps/hacker_dvorak/config.h | 2 +-
keyboards/geekboards/macropad_v2/config.h | 4 +-
keyboards/geekboards/tester/config.h | 4 +-
keyboards/handwired/colorlice/config.h | 2 +-
keyboards/handwired/hnah40rgb/config.h | 2 +-
keyboards/handwired/p65rgb/config.h | 2 +-
keyboards/helix/rev3_4rows/config.h | 2 +-
keyboards/helix/rev3_5rows/config.h | 2 +-
keyboards/hs60/v1/config.h | 2 +-
keyboards/kbdfans/bella/rgb/config.h | 2 +-
keyboards/kbdfans/bella/rgb_iso/config.h | 2 +-
keyboards/kbdfans/kbd67/mkiirgb/v1/config.h | 4 +-
keyboards/kbdfans/kbd67/mkiirgb/v2/config.h | 4 +-
keyboards/kbdfans/kbdmini/config.h | 2 +-
keyboards/kbdfans/maja/config.h | 4 +-
keyboards/latin17rgb/config.h | 32 ++++++++--------
keyboards/latin60rgb/config.h | 31 ++++++++-------
keyboards/le_chiffre/config.h | 2 +-
keyboards/marksard/rhymestone/rev1/config.h | 2 +-
keyboards/massdrop/alt/keymaps/pregame/config.h | 4 +-
.../massdrop/alt/keymaps/urbanvanilla/config.h | 2 +-
keyboards/massdrop/ctrl/keymaps/endgame/config.h | 2 +-
.../massdrop/ctrl/keymaps/matthewrobo/config.h | 2 +-
keyboards/mechlovin/adelais/rgb_led/rev1/config.h | 4 +-
keyboards/mechlovin/adelais/rgb_led/rev2/config.h | 6 +--
keyboards/mechlovin/delphine/rgb_led/config.h | 4 +-
keyboards/mechlovin/hannah60rgb/rev1/config.h | 4 +-
keyboards/mechlovin/hannah60rgb/rev2/config.h | 4 +-
keyboards/mechlovin/infinity87/rgb_rev1/config.h | 2 +-
keyboards/melgeek/mj61/config.h | 2 +-
keyboards/melgeek/mj63/config.h | 2 +-
keyboards/melgeek/mj64/config.h | 2 +-
keyboards/melgeek/mj65/config.h | 2 +-
keyboards/melgeek/mojo75/config.h | 2 +-
keyboards/melgeek/z70ultra/config.h | 2 +-
keyboards/miller/gm862/config.h | 4 +-
keyboards/monstargear/xo87/rgb/config.h | 2 +-
keyboards/moonlander/config.h | 2 +-
keyboards/naked48/keymaps/salicylic/config.h | 3 +-
keyboards/opendeck/32/rev1/config.h | 2 +-
keyboards/percent/canoe_gen2/config.h | 2 +-
keyboards/phase_studio/titan65/config.h | 2 +-
keyboards/planck/ez/config.h | 2 +-
keyboards/planck/rev6/config.h | 2 +-
keyboards/setta21/keymaps/salicylic/config.h | 3 +-
keyboards/sofle/keymaps/devdev/config.h | 44 +++++++++++-----------
keyboards/sofle/keymaps/rgb_default/config.h | 44 +++++++++++-----------
keyboards/terrazzo/config.h | 4 +-
keyboards/tkc/portico/config.h | 2 +-
keyboards/xbows/nature/config.h | 2 +-
keyboards/xbows/woody/config.h | 6 +--
keyboards/yncognito/batpad/config.h | 14 +++----
layouts/community/ortho_4x12/bocaj/config.h | 2 +-
layouts/community/ortho_4x12/drashna/config.h | 2 +-
layouts/community/split_3x6_3/drashna/config.h | 2 +-
quantum/led_matrix.c | 4 --
quantum/rgb_matrix.c | 4 --
users/bcat/config.h | 2 +-
users/bocaj/config.h | 2 +-
users/curry/config.h | 2 +-
users/drashna/config.h | 2 +-
users/spidey3/config.h | 4 +-
users/tominabox1/config.h | 2 +-
82 files changed, 181 insertions(+), 196 deletions(-)
(limited to 'quantum')
diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h
index 8a95291260..28c9c18fb2 100644
--- a/keyboards/basekeys/trifecta/config.h
+++ b/keyboards/basekeys/trifecta/config.h
@@ -80,11 +80,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+//# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
# define RGB_MATRIX_HUE_STEP 8
# define RGB_MATRIX_SAT_STEP 8
# define RGB_MATRIX_VAL_STEP 8
diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h
index 84d0950d59..8ef9a78c7d 100755
--- a/keyboards/bm40hsrgb/config.h
+++ b/keyboards/bm40hsrgb/config.h
@@ -51,5 +51,5 @@
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#endif
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#endif
diff --git a/keyboards/bm68rgb/keymaps/peepeetee/config.h b/keyboards/bm68rgb/keymaps/peepeetee/config.h
index 53eebce7f2..aada255cd7 100644
--- a/keyboards/bm68rgb/keymaps/peepeetee/config.h
+++ b/keyboards/bm68rgb/keymaps/peepeetee/config.h
@@ -64,7 +64,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
// #define RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h
index 5888452ce4..9ca598b40e 100644
--- a/keyboards/boardsource/the_mark/config.h
+++ b/keyboards/boardsource/the_mark/config.h
@@ -59,7 +59,7 @@ along with this program. If not, see .
#define DRIVER_LED_TOTAL 24 // Number of LEDs
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# endif
#endif
diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h
index 793c7b020b..c858f8f2d0 100644
--- a/keyboards/crkbd/keymaps/devdev/config.h
+++ b/keyboards/crkbd/keymaps/devdev/config.h
@@ -32,7 +32,7 @@ along with this program. If not, see .
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 200
@@ -43,7 +43,7 @@ along with this program. If not, see .
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -55,11 +55,11 @@ along with this program. If not, see .
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
//#define RGBLED_NUM 54
//#define RGBLED_SPLIT 27
- //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet
-
+ //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet
+
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -71,11 +71,11 @@ along with this program. If not, see .
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h
index dd58a0fe05..05b04e0aa3 100644
--- a/keyboards/crkbd/keymaps/gotham/config.h
+++ b/keyboards/crkbd/keymaps/gotham/config.h
@@ -39,7 +39,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
# define RGB_MATRIX_HUE_STEP 32
# define RGB_MATRIX_SAT_STEP 64
diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h
index be1777e575..752ea862e0 100644
--- a/keyboards/crkbd/keymaps/kidbrazil/config.h
+++ b/keyboards/crkbd/keymaps/kidbrazil/config.h
@@ -56,7 +56,7 @@ along with this program. If not, see .
//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h
index 6bd16725f5..9e5f75c362 100644
--- a/keyboards/crkbd/keymaps/rpbaptist/config.h
+++ b/keyboards/crkbd/keymaps/rpbaptist/config.h
@@ -42,7 +42,7 @@ along with this program. If not, see .
#define NO_ACTION_ONESHOT
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
# define RGB_MATRIX_HUE_STEP 8
diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h
index 1e58af3abe..8235b48697 100644
--- a/keyboards/crkbd/keymaps/soundmonster/config.h
+++ b/keyboards/crkbd/keymaps/soundmonster/config.h
@@ -59,11 +59,11 @@ along with this program. If not, see .
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
# define RGB_MATRIX_HUE_STEP 8
# define RGB_MATRIX_SAT_STEP 8
# define RGB_MATRIX_VAL_STEP 8
diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md
index 1e5bfb39ab..f0b5672cf6 100644
--- a/keyboards/crkbd/readme.md
+++ b/keyboards/crkbd/readme.md
@@ -38,7 +38,7 @@ And in your `config.h` file, add the following:
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index 6e5b3da6ff..f6ee7c4e2f 100644
--- a/keyboards/dztech/dz60rgb/v1/config.h
+++ b/keyboards/dztech/dz60rgb/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h
index df84fff59a..6108e99034 100644
--- a/keyboards/dztech/dz60rgb/v2/config.h
+++ b/keyboards/dztech/dz60rgb/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h
index 8710f8d07b..dc2a6f4bc0 100644
--- a/keyboards/dztech/dz60rgb_ansi/v1/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h
index f3c9b73fb4..6c1e006821 100644
--- a/keyboards/dztech/dz60rgb_ansi/v2/config.h
+++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h
index 9c630c75be..12317c2d35 100644
--- a/keyboards/dztech/dz60rgb_wkl/v1/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h
index a6145c2749..945b591ce6 100644
--- a/keyboards/dztech/dz60rgb_wkl/v2/config.h
+++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h
@@ -37,7 +37,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h
index cd47477160..1b0aa52054 100644
--- a/keyboards/dztech/dz65rgb/v1/config.h
+++ b/keyboards/dztech/dz65rgb/v1/config.h
@@ -36,9 +36,9 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
-# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h
index ccd74275ae..117fb1e3e4 100644
--- a/keyboards/dztech/dz65rgb/v2/config.h
+++ b/keyboards/dztech/dz65rgb/v2/config.h
@@ -36,7 +36,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index bc63f6108f..9dcfc341e1 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -129,7 +129,7 @@ along with this program. If not, see .
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
index a0ba655ede..da20820787 100644
--- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
+++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h
@@ -14,7 +14,7 @@
#undef IGNORE_MOD_TAP_INTERRUPT
#define IGNORE_MOD_TAP_INTERRUPT
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#undef FORCE_NKRO
#define FORCE_NKRO
diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h
index 5f11cdddb0..d0e208f9b9 100644
--- a/keyboards/geekboards/macropad_v2/config.h
+++ b/keyboards/geekboards/macropad_v2/config.h
@@ -41,7 +41,7 @@
#define WS2812_DMA_CHANNEL 3
#ifdef RGB_MATRIX_ENABLE
-#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_ALPHAS_MODS
#define DISABLE_RGB_MATRIX_BAND_SAT
@@ -67,7 +67,7 @@
#define RGB_MATRIX_STARTUP_SPD 30
#endif //RGB_MATRIX_ENABLE
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define WAIT_FOR_USB
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h
index 4f072c0ee6..3e3daccd57 100644
--- a/keyboards/geekboards/tester/config.h
+++ b/keyboards/geekboards/tester/config.h
@@ -24,7 +24,7 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
@@ -36,4 +36,4 @@
#define DRIVER_1_LED_TOTAL 8
#define DRIVER_2_LED_TOTAL 0
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h
index 206a4004ea..0148817f3f 100644
--- a/keyboards/handwired/colorlice/config.h
+++ b/keyboards/handwired/colorlice/config.h
@@ -49,7 +49,7 @@ along with this program. If not, see .
/* RGB LEDs */
#define RGB_DI_PIN B1
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h
index e6271738c0..3d558f97fc 100644
--- a/keyboards/handwired/hnah40rgb/config.h
+++ b/keyboards/handwired/hnah40rgb/config.h
@@ -60,7 +60,7 @@ along with this program. If not, see .
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h
index c50fc2826a..142d3c03ea 100644
--- a/keyboards/handwired/p65rgb/config.h
+++ b/keyboards/handwired/p65rgb/config.h
@@ -40,7 +40,7 @@ along with this program. If not, see .
#define RGB_DI_PIN B4
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h
index 9102104bfc..95eb8bf0cf 100644
--- a/keyboards/helix/rev3_4rows/config.h
+++ b/keyboards/helix/rev3_4rows/config.h
@@ -68,7 +68,7 @@ along with this program. If not, see .
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h
index 4dda76206b..a373de7d12 100644
--- a/keyboards/helix/rev3_5rows/config.h
+++ b/keyboards/helix/rev3_5rows/config.h
@@ -68,7 +68,7 @@ along with this program. If not, see .
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h
index 68c75b2af0..41246b6ee8 100644
--- a/keyboards/hs60/v1/config.h
+++ b/keyboards/hs60/v1/config.h
@@ -118,7 +118,7 @@ along with this program. If not, see .
//#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215
#define DRIVER_ADDR_1 0b1110100
diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h
index f56049690b..07594a34ab 100644
--- a/keyboards/kbdfans/bella/rgb/config.h
+++ b/keyboards/kbdfans/bella/rgb/config.h
@@ -37,7 +37,7 @@
/* disable these deprecated features by default */
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h
index fc7a9d7c08..4fda998677 100644
--- a/keyboards/kbdfans/bella/rgb_iso/config.h
+++ b/keyboards/kbdfans/bella/rgb_iso/config.h
@@ -37,7 +37,7 @@
/* disable these deprecated features by default */
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
index a832110d3c..b0b7e1dad2 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h
@@ -16,9 +16,9 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
index 1ac9c770db..51e732f101 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h
@@ -16,10 +16,10 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h
index 5a36e983d1..fc65f43411 100644
--- a/keyboards/kbdfans/kbdmini/config.h
+++ b/keyboards/kbdfans/kbdmini/config.h
@@ -35,7 +35,7 @@
#ifdef RGB_MATRIX_ENABLE
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h
index d8553766bb..3722c8381d 100755
--- a/keyboards/kbdfans/maja/config.h
+++ b/keyboards/kbdfans/maja/config.h
@@ -18,9 +18,9 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h
index 013899f600..6a7ea8e781 100644
--- a/keyboards/latin17rgb/config.h
+++ b/keyboards/latin17rgb/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 18438880
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
#pragma once
@@ -56,7 +56,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -100,5 +100,3 @@
#define RGBLIGHT_VAL_STEP 5
#define RGBLIGHT_SLEEP
#endif
-
-
diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h
index bbe502054a..97b4812910 100644
--- a/keyboards/latin60rgb/config.h
+++ b/keyboards/latin60rgb/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 latincompass
- *
- * 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 .
- */
+ *
+ * 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 .
+ */
#pragma once
/* USB Device descriptor parameter */
@@ -53,7 +53,7 @@
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -77,4 +77,3 @@
# define DRIVER_1_LED_TOTAL 60
# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#endif
-
diff --git a/keyboards/le_chiffre/config.h b/keyboards/le_chiffre/config.h
index e14b4665f2..af4d1e49cf 100644
--- a/keyboards/le_chiffre/config.h
+++ b/keyboards/le_chiffre/config.h
@@ -69,7 +69,7 @@
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_HUE_STEP 8
diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h
index 9a1bf0a1d8..9833925110 100644
--- a/keyboards/marksard/rhymestone/rev1/config.h
+++ b/keyboards/marksard/rhymestone/rev1/config.h
@@ -93,7 +93,7 @@ along with this program. If not, see .
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h
index acd041ce14..32dee56d30 100644
--- a/keyboards/massdrop/alt/keymaps/pregame/config.h
+++ b/keyboards/massdrop/alt/keymaps/pregame/config.h
@@ -89,7 +89,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGBLIGHT_ANIMATIONS // Run RGB animations
@@ -103,7 +103,7 @@
// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode.
// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode.
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode.
-
+
// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255
// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds
diff --git a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
index 0f2740013d..f2a7e50386 100644
--- a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
+++ b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h
@@ -24,4 +24,4 @@ along with this program. If not, see .
#define RGB_MATRIX_LED_PROCESS_LIMIT 15
#define RGB_MATRIX_LED_FLUSH_LIMIT 10
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h
index 0ef485591f..ad738347ab 100644
--- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h
+++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h
@@ -49,7 +49,7 @@
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
// #define RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
index 6e16c3a5f9..89c129c58e 100644
--- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
+++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h
@@ -67,7 +67,7 @@ along with this program. If not, see .
// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation
// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness)
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
// #define RGBLIGHT_ANIMATIONS // Run RGB animations
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
index 1ba7d27dff..d75cbd3f2a 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h
@@ -13,7 +13,7 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
\ No newline at end of file
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
index 38ffdd40ae..c830edce26 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h
@@ -1,7 +1,7 @@
#pragma once
#define PRODUCT_ID 0xAEC2
-#define PRODUCT Adelais En Ciel Rev2
+#define PRODUCT Adelais En Ciel Rev2
#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, A7 }
@@ -31,7 +31,7 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
@@ -42,4 +42,4 @@
#define ENCODERS_PAD_B { A3 }
#define ENCODER_RESOLUTION 4
-#define TAP_CODE_DELAY 10
\ No newline at end of file
+#define TAP_CODE_DELAY 10
diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h
index 4d5c853d0c..9a653d7595 100644
--- a/keyboards/mechlovin/delphine/rgb_led/config.h
+++ b/keyboards/mechlovin/delphine/rgb_led/config.h
@@ -24,7 +24,7 @@
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
#endif
-
+
//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
@@ -41,7 +41,7 @@
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h
index 20873e7161..fd45ecca6c 100644
--- a/keyboards/mechlovin/hannah60rgb/rev1/config.h
+++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h
@@ -11,8 +11,8 @@
# define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h
index 2bcffbc856..5e57f985d3 100644
--- a/keyboards/mechlovin/hannah60rgb/rev2/config.h
+++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h
@@ -30,11 +30,11 @@
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_DISABLE_KEYCODES
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
index 0c16c684cf..76c6e0db73 100644
--- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h
+++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h
@@ -35,7 +35,7 @@
// 0b0110001 AD <-> SCL
// 0b0110010 AD <-> SDA
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h
index 164c04fb50..6ba19dd757 100644
--- a/keyboards/melgeek/mj61/config.h
+++ b/keyboards/melgeek/mj61/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h
index 47ad2f96cf..46d3b0fb7b 100644
--- a/keyboards/melgeek/mj63/config.h
+++ b/keyboards/melgeek/mj63/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h
index 29cb95f171..920d34acd5 100644
--- a/keyboards/melgeek/mj64/config.h
+++ b/keyboards/melgeek/mj64/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h
index 12a7c7ce18..399c243ac6 100644
--- a/keyboards/melgeek/mj65/config.h
+++ b/keyboards/melgeek/mj65/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h
index c1a8083f1c..d5bb4b4547 100644
--- a/keyboards/melgeek/mojo75/config.h
+++ b/keyboards/melgeek/mojo75/config.h
@@ -37,7 +37,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h
index d5a9d0a894..e4530e2eaa 100644
--- a/keyboards/melgeek/z70ultra/config.h
+++ b/keyboards/melgeek/z70ultra/config.h
@@ -36,7 +36,7 @@
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h
index 2b084efc25..e6e1b4c1df 100644
--- a/keyboards/miller/gm862/config.h
+++ b/keyboards/miller/gm862/config.h
@@ -36,10 +36,10 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h
index 83eee83492..5ed0ed445d 100644
--- a/keyboards/monstargear/xo87/rgb/config.h
+++ b/keyboards/monstargear/xo87/rgb/config.h
@@ -36,7 +36,7 @@
#define DIODE_DIRECTION ROW2COL
#define RGB_DI_PIN D7
#define DRIVER_LED_TOTAL 110
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 100 out of 255.
#define RGBLIGHT_LIMIT_VAL 100 // limits maximum brightness of LEDs to 100 out of 255.
diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h
index c88feea3d0..c1a139dc77 100644
--- a/keyboards/moonlander/config.h
+++ b/keyboards/moonlander/config.h
@@ -91,7 +91,7 @@
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define MUSIC_MAP
diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h
index b6372db3b9..71a43e208c 100644
--- a/keyboards/naked48/keymaps/salicylic/config.h
+++ b/keyboards/naked48/keymaps/salicylic/config.h
@@ -31,7 +31,7 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
@@ -41,4 +41,3 @@
# define RGB_MATRIX_VAL_STEP 5
# define RGB_MATRIX_SPD_STEP 10
#endif
-
diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h
index 9f8ed74278..8b25ab2564 100644
--- a/keyboards/opendeck/32/rev1/config.h
+++ b/keyboards/opendeck/32/rev1/config.h
@@ -38,7 +38,7 @@
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL (4 * 8 * 3)
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL)
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL
#define RGB_MATRIX_DISABLE_KEYCODES
diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h
index bac5ebb3f3..6409371d40 100644
--- a/keyboards/percent/canoe_gen2/config.h
+++ b/keyboards/percent/canoe_gen2/config.h
@@ -64,4 +64,4 @@ along with this program. If not, see .
#define RGB_MATRIX_STARTUP_SAT 255
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_STARTUP_SPD 127
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
diff --git a/keyboards/phase_studio/titan65/config.h b/keyboards/phase_studio/titan65/config.h
index 4104c2ec2c..66ae4f20be 100644
--- a/keyboards/phase_studio/titan65/config.h
+++ b/keyboards/phase_studio/titan65/config.h
@@ -47,5 +47,5 @@
#define RGB_DI_PIN E6
#define DRIVER_LED_TOTAL 67
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h
index 7f88764963..5317a51568 100644
--- a/keyboards/planck/ez/config.h
+++ b/keyboards/planck/ez/config.h
@@ -147,7 +147,7 @@
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_LED_PROCESS_LIMIT 5
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h
index 4bc8a509f6..18bb740968 100644
--- a/keyboards/planck/rev6/config.h
+++ b/keyboards/planck/rev6/config.h
@@ -141,7 +141,7 @@
#define WS2812_DMA_CHANNEL 2
#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
#endif
#endif
diff --git a/keyboards/setta21/keymaps/salicylic/config.h b/keyboards/setta21/keymaps/salicylic/config.h
index 44b34aa2fd..06e23ba7a3 100644
--- a/keyboards/setta21/keymaps/salicylic/config.h
+++ b/keyboards/setta21/keymaps/salicylic/config.h
@@ -27,7 +27,7 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
@@ -37,4 +37,3 @@
# define RGB_MATRIX_VAL_STEP 5
# define RGB_MATRIX_SPD_STEP 10
#endif
-
diff --git a/keyboards/sofle/keymaps/devdev/config.h b/keyboards/sofle/keymaps/devdev/config.h
index 7d597d991a..32d0717352 100644
--- a/keyboards/sofle/keymaps/devdev/config.h
+++ b/keyboards/sofle/keymaps/devdev/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 Dane Evans
- *
- * 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 .
-*/
+ *
+ * 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 .
+*/
#pragma once
@@ -29,7 +29,7 @@
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
@@ -56,7 +56,7 @@
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
//#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -68,11 +68,11 @@
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
#define RGBLED_NUM 70
//#define RGBLED_SPLIT
- #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
-
+ #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
+
//#define RGBLED_NUM 30
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -84,11 +84,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -127,4 +127,4 @@
// # define DISABLE_RGB_MATRIX_MULTISPLASH
// # define DISABLE_RGB_MATRIX_SOLID_SPLASH
// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h
index 7d597d991a..32d0717352 100644
--- a/keyboards/sofle/keymaps/rgb_default/config.h
+++ b/keyboards/sofle/keymaps/rgb_default/config.h
@@ -1,18 +1,18 @@
/* Copyright 2021 Dane Evans
- *
- * 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 .
-*/
+ *
+ * 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 .
+*/
#pragma once
@@ -29,7 +29,7 @@
#define CUSTOM_FONT
-#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
+#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding
#define TAPPING_FORCE_HOLD
@@ -56,7 +56,7 @@
#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
-
+
//#define RGBLIGHT_ANIMATIONS
//#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
@@ -68,11 +68,11 @@
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
//#define RGBLIGHT_EFFECT_TWINKLE
-
+
#define RGBLED_NUM 70
//#define RGBLED_SPLIT
- #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
-
+ #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
+
//#define RGBLED_NUM 30
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
@@ -84,11 +84,11 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -127,4 +127,4 @@
// # define DISABLE_RGB_MATRIX_MULTISPLASH
// # define DISABLE_RGB_MATRIX_SOLID_SPLASH
// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h
index 985110d16b..907c94ff52 100644
--- a/keyboards/terrazzo/config.h
+++ b/keyboards/terrazzo/config.h
@@ -83,13 +83,13 @@ so there is only one configuration. */
#ifdef LED_MATRIX_ENABLE
-#define LED_DRIVER_ADDR_1 0x74
+#define LED_DRIVER_ADDR_1 0x74
#define LED_DRIVER_COUNT 1
#define DRIVER_LED_TOTAL 105
#define LED_MATRIX_ROWS 15
#define LED_MATRIX_COLS 7
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 20
-#define LED_DISABLE_WHEN_USB_SUSPENDED true
+#define LED_DISABLE_WHEN_USB_SUSPENDED
#define DISABLE_LED_MATRIX_ALPHAS_MODS
#define DISABLE_LED_MATRIX_BREATHING
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 4a7da833f7..ef6e46658a 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h
index c1ff793352..e321f7ee1e 100644
--- a/keyboards/xbows/nature/config.h
+++ b/keyboards/xbows/nature/config.h
@@ -35,7 +35,7 @@
# define RGB_MATRIX_LED_PROCESS_LIMIT 18
# define RGB_MATRIX_LED_FLUSH_LIMIT 16
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h
index 7f396d0008..ea27508da8 100644
--- a/keyboards/xbows/woody/config.h
+++ b/keyboards/xbows/woody/config.h
@@ -16,10 +16,10 @@
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DEBOUNCE 3
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
-#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
@@ -40,4 +40,4 @@
#define DRIVER_1_LED_TOTAL 35
#define DRIVER_2_LED_TOTAL 32
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#endif
\ No newline at end of file
+#endif
diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h
index 02c84a514a..7ca4072e07 100644
--- a/keyboards/yncognito/batpad/config.h
+++ b/keyboards/yncognito/batpad/config.h
@@ -47,13 +47,11 @@ along with this program. If not, see .
#define RGB_DI_PIN B5
#define DRIVER_LED_TOTAL 8
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_KEYRELEASES
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_KEYRELEASES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_AFTER_TIMEOUT 0
-#define RGB_DISABLE_WHEN_USB_SUSPENDED false
-#define RGB_MATRIX_LED_FLUSH_LIMIT 16
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_DISABLE_AFTER_TIMEOUT 0
+// #define RGB_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
-
-
diff --git a/layouts/community/ortho_4x12/bocaj/config.h b/layouts/community/ortho_4x12/bocaj/config.h
index 9a65684f35..c9d297f927 100644
--- a/layouts/community/ortho_4x12/bocaj/config.h
+++ b/layouts/community/ortho_4x12/bocaj/config.h
@@ -24,7 +24,7 @@
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# undef RGB_MATRIX_LED_PROCESS_LIMIT
# undef RGB_MATRIX_LED_FLUSH_LIMIT
#endif
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index f4abd64f57..43143c3a3a 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -37,7 +37,7 @@
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# undef RGB_MATRIX_LED_PROCESS_LIMIT
# undef RGB_MATRIX_LED_FLUSH_LIMIT
# ifdef KEYBOARD_planck_rev6
diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h
index dd950ce7bc..cc53d4c367 100644
--- a/layouts/community/split_3x6_3/drashna/config.h
+++ b/layouts/community/split_3x6_3/drashna/config.h
@@ -47,7 +47,7 @@
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 7e0fdf896a..942e6d7dc8 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -67,10 +67,6 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
# define LED_DISABLE_TIMEOUT 0
#endif
-#if LED_DISABLE_WHEN_USB_SUSPENDED != 1
-# undef LED_DISABLE_WHEN_USB_SUSPENDED
-#endif
-
#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index ab8dbd849b..27f6417975 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -67,10 +67,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv
# define RGB_DISABLE_TIMEOUT 0
#endif
-#if RGB_DISABLE_WHEN_USB_SUSPENDED != 1
-# undef RGB_DISABLE_WHEN_USB_SUSPENDED
-#endif
-
#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
diff --git a/users/bcat/config.h b/users/bcat/config.h
index 16188950e2..5bb93f3833 100644
--- a/users/bcat/config.h
+++ b/users/bcat/config.h
@@ -33,7 +33,7 @@
#if defined(RGB_MATRIX_ENABLE)
/* Turn off per-key RGB when the host goes to sleep. */
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
/* Keep per-key RGB increments consistent across keyboards. */
# undef RGB_MATRIX_HUE_STEP
diff --git a/users/bocaj/config.h b/users/bocaj/config.h
index 2a44aabfc4..ecfb09c6f9 100644
--- a/users/bocaj/config.h
+++ b/users/bocaj/config.h
@@ -28,7 +28,7 @@
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// # define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/users/curry/config.h b/users/curry/config.h
index b982dab038..e3c0a103ef 100644
--- a/users/curry/config.h
+++ b/users/curry/config.h
@@ -17,7 +17,7 @@
#if defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 5f7c32ff35..7964856892 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -65,7 +65,7 @@
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
-# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
// # define EECONFIG_RGB_MATRIX (uint32_t *)16
diff --git a/users/spidey3/config.h b/users/spidey3/config.h
index 7062fde030..f5f5e07f0f 100644
--- a/users/spidey3/config.h
+++ b/users/spidey3/config.h
@@ -1,7 +1,7 @@
#pragma once
-#define LED_DISABLE_WHEN_USB_SUSPENDED true
-#define RGB_DISABLE_WHEN_USB_SUSPENDED true
+#define LED_DISABLE_WHEN_USB_SUSPENDED
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGBLIGHT_LAYERS
#define RGBLIGHT_MAX_LAYERS 17
#define RGBLIGHT_LAYER_BLINK
diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h
index 2a8c1e943d..004f58ab53 100644
--- a/users/tominabox1/config.h
+++ b/users/tominabox1/config.h
@@ -31,7 +31,7 @@
// RGB_Matrix settings
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
- #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
+ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
#define RGB_MATRIX_HUE_STEP 8
--
cgit v1.2.3
From b2fdd4874434ef6921a436fc82d9f24909c726f8 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Thu, 10 Jun 2021 17:16:09 +1000
Subject: Add ST7565 LCD driver (#13089)
Co-authored-by: Joakim Tufvegren ---
common_features.mk | 8 +
docs/_summary.md | 1 +
docs/feature_st7565.md | 270 +++++++++++++++++++++++++
drivers/lcd/st7565.c | 479 +++++++++++++++++++++++++++++++++++++++++++++
drivers/lcd/st7565.h | 215 ++++++++++++++++++++
quantum/quantum.h | 4 +
tmk_core/common/keyboard.c | 18 ++
7 files changed, 995 insertions(+)
create mode 100644 docs/feature_st7565.md
create mode 100644 drivers/lcd/st7565.c
create mode 100644 drivers/lcd/st7565.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 37ce928e2a..b259af46c0 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -587,6 +587,14 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_driver.c
endif
+ifeq ($(strip $(ST7565_ENABLE)), yes)
+ OPT_DEFS += -DST7565_ENABLE
+ COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
+ COMMON_VPATH += $(DRIVER_PATH)/lcd
+ QUANTUM_LIB_SRC += spi_master.c
+ SRC += st7565.c
+endif
+
include $(DRIVER_PATH)/qwiic/qwiic.mk
ifeq ($(strip $(UCIS_ENABLE)), yes)
diff --git a/docs/_summary.md b/docs/_summary.md
index 9798ef5127..4141e01e77 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -93,6 +93,7 @@
* Hardware Features
* Displays
* [HD44780 LCD Controller](feature_hd44780.md)
+ * [ST7565 LCD Driver](feature_st7565.md)
* [OLED Driver](feature_oled_driver.md)
* Lighting
* [Backlight](feature_backlight.md)
diff --git a/docs/feature_st7565.md b/docs/feature_st7565.md
new file mode 100644
index 0000000000..7db0f9ac4a
--- /dev/null
+++ b/docs/feature_st7565.md
@@ -0,0 +1,270 @@
+# ST7565 LCD Driver
+
+## Supported Hardware
+
+LCD modules using ST7565 driver IC, communicating over SPI.
+
+|Module |IC |Size |Notes |
+|------------------------------|-------|------|----------------------------------------------------------|
+|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature|
+|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment |
+
+## Usage
+
+To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`:
+
+```make
+ST7565_ENABLE = yes
+```
+
+Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`:
+
+```c
+#ifdef ST7565_ENABLE
+void st7565_task_user(void) {
+ // Host Keyboard Layer Status
+ st7565_write_P(PSTR("Layer: "), false);
+
+ switch (get_highest_layer(layer_state)) {
+ case _QWERTY:
+ st7565_write_P(PSTR("Default\n"), false);
+ break;
+ case _FN:
+ st7565_write_P(PSTR("FN\n"), false);
+ break;
+ case _ADJ:
+ st7565_write_P(PSTR("ADJ\n"), false);
+ break;
+ default:
+ // Or use the write_ln shortcut over adding '\n' to the end of your string
+ st7565_write_ln_P(PSTR("Undefined"), false);
+ }
+
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
+ st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
+ st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
+}
+#endif
+```
+
+## Logo Example
+
+In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example:
+
+```c
+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, 0x00
+ };
+
+ st7565_write_P(qmk_logo, false);
+}
+```
+
+## Buffer Read Example
+For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer.
+
+In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time.
+```c
+//Setup some mask which can be or'd with bytes to turn off pixels
+const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254};
+
+static void fade_display(void) {
+ //Define the reader structure
+ display_buffer_reader_t reader;
+ uint8_t buff_char;
+ if (random() % 30 == 0) {
+ srand(timer_read());
+ // Fetch a pointer for the buffer byte at index 0. The return structure
+ // will have the pointer and the number of bytes remaining from this
+ // index position if we want to perform a sequential read by
+ // incrementing the buffer pointer
+ reader = st7565_read_raw(0);
+ //Loop over the remaining buffer and erase pixels as we go
+ for (uint16_t i = 0; i < reader.remaining_element_count; i++) {
+ //Get the actual byte in the buffer by dereferencing the pointer
+ buff_char = *reader.current_element;
+ if (buff_char != 0) {
+ st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i);
+ }
+ //increment the pointer to fetch a new byte during the next loop
+ reader.current_element++;
+ }
+ }
+}
+```
+
+## Other Examples
+
+In split keyboards, it is very common to have two displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g:
+
+```c
+#ifdef ST7565_ENABLE
+display_rotation_t st7565_init_user(display_rotation_t rotation) {
+ if (!is_keyboard_master()) {
+ return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand
+ }
+
+ return rotation;
+}
+
+void st7565_task_user(void) {
+ if (is_keyboard_master()) {
+ render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
+ } else {
+ render_logo(); // Renders a static logo
+ }
+}
+#endif
+```
+
+## Basic Configuration
+
+|Define |Default |Description |
+|------------------------|--------------|-----------------------------------------------------------------------------------------------------|
+|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin |
+|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin |
+|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin |
+|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use |
+|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts |
+|`ST7565_FONT_START` |`0` |The starting character index for custom fonts |
+|`ST7565_FONT_END` |`223` |The ending character index for custom fonts |
+|`ST7565_FONT_WIDTH` |`6` |The font width |
+|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) |
+|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.|
+|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. |
+|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. |
+|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. |
+
+## Custom sized displays
+
+The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind.
+
+|Define |Default |Description |
+|-----------------------|----------|-----------------------------------------------------------------------------------------------------------|
+|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. |
+|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. |
+|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. |
+|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. |
+|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(ST7565_BLOCK_TYPE) * 8)`.|
+|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. |
+
+## API
+
+```c
+// Rotation enum values are flags
+typedef enum {
+ DISPLAY_ROTATION_0,
+ DISPLAY_ROTATION_180
+} display_rotation_t;
+
+// Initialize the display, rotating the rendered output based on the define passed in.
+// Returns true if the was initialized successfully
+bool st7565_init(display_rotation_t rotation);
+
+// Called at the start of st7565_init, weak function overridable by the user
+// rotation - the value passed into st7565_init
+// Return new display_rotation_t if you want to override default rotation
+display_rotation_t st7565_init_user(display_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void st7565_clear(void);
+
+// Renders the dirty chunks of the buffer to display
+void st7565_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
+void st7565_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void st7565_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void st7565_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void st7565_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void st7565_write_ln(const char *data, bool invert);
+
+// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
+// Useful for moving the screen in preparation for new drawing
+void st7565_pan(bool left);
+
+// Returns a pointer to the requested start index in the buffer plus remaining
+// buffer length as struct
+display_buffer_reader_t st7565_read_raw(uint16_t start_index);
+
+// Writes a string to the buffer at current cursor position
+void st7565_write_raw(const char *data, uint16_t size);
+
+// Writes a single byte into the buffer at the specified index
+void st7565_write_raw_byte(const char data, uint16_t index);
+
+// Sets a specific pixel on or off
+// Coordinates start at top-left and go right and down for positive x and y
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
+void st7565_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
+void st7565_write_ln_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+void st7565_write_raw_P(const char *data, uint16_t size);
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool st7565_on(void);
+
+// Called when st7565_on() turns on the screen, weak function overridable by the user
+// Not called if the screen is already on
+void st7565_on_user(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool st7565_off(void);
+
+// Called when st7565_off() turns off the screen, weak function overridable by the user
+// Not called if the screen is already off
+void st7565_off_user(void);
+
+// Returns true if the screen is currently on, false if it is
+// not
+bool st7565_is_on(void);
+
+// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
+void st7565_task(void);
+
+// Called at the start of st7565_task, weak function overridable by the user
+void st7565_task_user(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t st7565_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the display
+uint8_t st7565_max_lines(void);
+```
diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c
new file mode 100644
index 0000000000..4b4891ce71
--- /dev/null
+++ b/drivers/lcd/st7565.c
@@ -0,0 +1,479 @@
+/*
+Copyright 2021
+
+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 .
+*/
+
+#include "st7565.h"
+
+#include
+
+#include "keyboard.h"
+#include "progmem.h"
+#include "timer.h"
+#include "wait.h"
+
+#include ST7565_FONT_H
+
+// Fundamental Commands
+#define CONTRAST 0x81
+#define DISPLAY_ALL_ON 0xA5
+#define DISPLAY_ALL_ON_RESUME 0xA4
+#define NORMAL_DISPLAY 0xA6
+#define DISPLAY_ON 0xAF
+#define DISPLAY_OFF 0xAE
+#define NOP 0xE3
+
+// Addressing Setting Commands
+#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 COM_SCAN_INC 0xC0
+#define COM_SCAN_DEC 0xC8
+#define LCD_BIAS_7 0xA3
+#define LCD_BIAS_9 0xA2
+#define RESISTOR_RATIO 0x20
+#define POWER_CONTROL 0x28
+
+// Misc defines
+#ifndef ST7565_BLOCK_COUNT
+# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8)
+#endif
+#ifndef ST7565_BLOCK_SIZE
+# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)
+#endif
+
+#define ST7565_ALL_BLOCKS_MASK (((((ST7565_BLOCK_TYPE)1 << (ST7565_BLOCK_COUNT - 1)) - 1) << 1) | 1)
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+
+// Display buffer's is the same as the display 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 st7565_buffer[ST7565_MATRIX_SIZE];
+uint8_t * st7565_cursor;
+ST7565_BLOCK_TYPE st7565_dirty = 0;
+bool st7565_initialized = false;
+bool st7565_active = false;
+display_rotation_t st7565_rotation = DISPLAY_ROTATION_0;
+#if ST7565_TIMEOUT > 0
+uint32_t st7565_timeout;
+#endif
+#if ST7565_UPDATE_INTERVAL > 0
+uint16_t st7565_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 + ST7565_FONT_WIDTH;
+ while (cursor < end) {
+ *cursor = ~(*cursor);
+ cursor++;
+ }
+}
+
+bool st7565_init(display_rotation_t rotation) {
+ setPinOutput(ST7565_A0_PIN);
+ writePinHigh(ST7565_A0_PIN);
+ setPinOutput(ST7565_RST_PIN);
+ writePinHigh(ST7565_RST_PIN);
+
+ st7565_rotation = st7565_init_user(rotation);
+
+ spi_init();
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+
+ st7565_reset();
+
+ st7565_send_cmd(LCD_BIAS_7);
+ if (!HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
+ st7565_send_cmd(SEGMENT_REMAP);
+ st7565_send_cmd(COM_SCAN_DEC);
+ } else {
+ st7565_send_cmd(SEGMENT_REMAP_INV);
+ st7565_send_cmd(COM_SCAN_INC);
+ }
+ st7565_send_cmd(DISPLAY_START_LINE | 0x00);
+ st7565_send_cmd(CONTRAST);
+ st7565_send_cmd(ST7565_CONTRAST);
+ st7565_send_cmd(RESISTOR_RATIO | 0x01);
+ st7565_send_cmd(POWER_CONTROL | 0x04);
+ wait_ms(50);
+ st7565_send_cmd(POWER_CONTROL | 0x06);
+ wait_ms(50);
+ st7565_send_cmd(POWER_CONTROL | 0x07);
+ wait_ms(10);
+ st7565_send_cmd(DISPLAY_ON);
+ st7565_send_cmd(DISPLAY_ALL_ON_RESUME);
+ st7565_send_cmd(NORMAL_DISPLAY);
+
+ spi_stop();
+
+#if ST7565_TIMEOUT > 0
+ st7565_timeout = timer_read32() + ST7565_TIMEOUT;
+#endif
+
+ st7565_clear();
+ st7565_initialized = true;
+ st7565_active = true;
+ return true;
+}
+
+__attribute__((weak)) display_rotation_t st7565_init_user(display_rotation_t rotation) { return rotation; }
+
+void st7565_clear(void) {
+ memset(st7565_buffer, 0, sizeof(st7565_buffer));
+ st7565_cursor = &st7565_buffer[0];
+ st7565_dirty = ST7565_ALL_BLOCKS_MASK;
+}
+
+uint8_t crot(uint8_t a, int8_t n) {
+ const uint8_t mask = 0x7;
+ n &= mask;
+ return a << n | a >> (-n & mask);
+}
+
+void st7565_render(void) {
+ if (!st7565_initialized) {
+ return;
+ }
+
+ // Do we have work to do?
+ st7565_dirty &= ST7565_ALL_BLOCKS_MASK;
+ if (!st7565_dirty) {
+ return;
+ }
+
+ // Find first dirty block
+ uint8_t update_start = 0;
+ while (!(st7565_dirty & ((ST7565_BLOCK_TYPE)1 << update_start))) {
+ ++update_start;
+ }
+
+ // Calculate commands to set memory addressing bounds.
+ uint8_t start_page = ST7565_BLOCK_SIZE * update_start / ST7565_DISPLAY_WIDTH;
+ uint8_t start_column = ST7565_BLOCK_SIZE * update_start % ST7565_DISPLAY_WIDTH;
+ // IC has 132 segment drivers, for panels with less width we need to offset the starting column
+ if (HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) {
+ start_column += (132 - ST7565_DISPLAY_WIDTH);
+ }
+
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+
+ st7565_send_cmd(PAM_PAGE_ADDR | start_page);
+ st7565_send_cmd(PAM_SETCOLUMN_LSB | ((ST7565_COLUMN_OFFSET + start_column) & 0x0f));
+ st7565_send_cmd(PAM_SETCOLUMN_MSB | ((ST7565_COLUMN_OFFSET + start_column) >> 4 & 0x0f));
+
+ st7565_send_data(&st7565_buffer[ST7565_BLOCK_SIZE * update_start], ST7565_BLOCK_SIZE);
+
+ // Turn on display if it is off
+ st7565_on();
+
+ // Clear dirty flag
+ st7565_dirty &= ~((ST7565_BLOCK_TYPE)1 << update_start);
+}
+
+void st7565_set_cursor(uint8_t col, uint8_t line) {
+ uint16_t index = line * ST7565_DISPLAY_WIDTH + col * ST7565_FONT_WIDTH;
+
+ // Out of bounds?
+ if (index >= ST7565_MATRIX_SIZE) {
+ index = 0;
+ }
+
+ st7565_cursor = &st7565_buffer[index];
+}
+
+void st7565_advance_page(bool clearPageRemainder) {
+ uint16_t index = st7565_cursor - &st7565_buffer[0];
+ uint8_t remaining = ST7565_DISPLAY_WIDTH - (index % ST7565_DISPLAY_WIDTH);
+
+ if (clearPageRemainder) {
+ // Remaining Char count
+ remaining = remaining / ST7565_FONT_WIDTH;
+
+ // Write empty character until next line
+ while (remaining--) st7565_write_char(' ', false);
+ } else {
+ // Next page index out of bounds?
+ if (index + remaining >= ST7565_MATRIX_SIZE) {
+ index = 0;
+ remaining = 0;
+ }
+
+ st7565_cursor = &st7565_buffer[index + remaining];
+ }
+}
+
+void st7565_advance_char(void) {
+ uint16_t nextIndex = st7565_cursor - &st7565_buffer[0] + ST7565_FONT_WIDTH;
+ uint8_t remainingSpace = ST7565_DISPLAY_WIDTH - (nextIndex % ST7565_DISPLAY_WIDTH);
+
+ // Do we have enough space on the current line for the next character
+ if (remainingSpace < ST7565_FONT_WIDTH) {
+ nextIndex += remainingSpace;
+ }
+
+ // Did we go out of bounds
+ if (nextIndex >= ST7565_MATRIX_SIZE) {
+ nextIndex = 0;
+ }
+
+ // Update cursor position
+ st7565_cursor = &st7565_buffer[nextIndex];
+}
+
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert) {
+ // Advance to the next line if newline
+ if (data == '\n') {
+ // Old source wrote ' ' until end of line...
+ st7565_advance_page(true);
+ return;
+ }
+
+ if (data == '\r') {
+ st7565_advance_page(false);
+ return;
+ }
+
+ // copy the current render buffer to check for dirty after
+ static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH];
+ memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH);
+
+ _Static_assert(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_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 < ST7565_FONT_START || cast_data > ST7565_FONT_END) {
+ memset(st7565_cursor, 0x00, ST7565_FONT_WIDTH);
+ } else {
+ const uint8_t *glyph = &font[(cast_data - ST7565_FONT_START) * ST7565_FONT_WIDTH];
+ memcpy_P(st7565_cursor, glyph, ST7565_FONT_WIDTH);
+ }
+
+ // Invert if needed
+ if (invert) {
+ InvertCharacter(st7565_cursor);
+ }
+
+ // Dirty check
+ if (memcmp(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH)) {
+ uint16_t index = st7565_cursor - &st7565_buffer[0];
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+ // Edgecase check if the written data spans the 2 chunks
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << ((index + ST7565_FONT_WIDTH - 1) / ST7565_BLOCK_SIZE));
+ }
+
+ // Finally move to the next char
+ st7565_advance_char();
+}
+
+void st7565_write(const char *data, bool invert) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ st7565_write_char(*data, invert);
+ data++;
+ }
+}
+
+void st7565_write_ln(const char *data, bool invert) {
+ st7565_write(data, invert);
+ st7565_advance_page(true);
+}
+
+void st7565_pan(bool left) {
+ uint16_t i = 0;
+ for (uint16_t y = 0; y < ST7565_DISPLAY_HEIGHT / 8; y++) {
+ if (left) {
+ for (uint16_t x = 0; x < ST7565_DISPLAY_WIDTH - 1; x++) {
+ i = y * ST7565_DISPLAY_WIDTH + x;
+ st7565_buffer[i] = st7565_buffer[i + 1];
+ }
+ } else {
+ for (uint16_t x = ST7565_DISPLAY_WIDTH - 1; x > 0; x--) {
+ i = y * ST7565_DISPLAY_WIDTH + x;
+ st7565_buffer[i] = st7565_buffer[i - 1];
+ }
+ }
+ }
+ st7565_dirty = ST7565_ALL_BLOCKS_MASK;
+}
+
+display_buffer_reader_t st7565_read_raw(uint16_t start_index) {
+ if (start_index > ST7565_MATRIX_SIZE) start_index = ST7565_MATRIX_SIZE;
+ display_buffer_reader_t ret_reader;
+ ret_reader.current_element = &st7565_buffer[start_index];
+ ret_reader.remaining_element_count = ST7565_MATRIX_SIZE - start_index;
+ return ret_reader;
+}
+
+void st7565_write_raw_byte(const char data, uint16_t index) {
+ if (index > ST7565_MATRIX_SIZE) index = ST7565_MATRIX_SIZE;
+ if (st7565_buffer[index] == data) return;
+ st7565_buffer[index] = data;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+}
+
+void st7565_write_raw(const char *data, uint16_t size) {
+ uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
+ if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index;
+ for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
+ if (st7565_buffer[i] == data[i]) continue;
+ st7565_buffer[i] = data[i];
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
+ }
+}
+
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on) {
+ if (x >= ST7565_DISPLAY_WIDTH) {
+ return;
+ }
+ uint16_t index = x + (y / 8) * ST7565_DISPLAY_WIDTH;
+ if (index >= ST7565_MATRIX_SIZE) {
+ return;
+ }
+ uint8_t data = st7565_buffer[index];
+ if (on) {
+ data |= (1 << (y % 8));
+ } else {
+ data &= ~(1 << (y % 8));
+ }
+ if (st7565_buffer[index] != data) {
+ st7565_buffer[index] = data;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE));
+ }
+}
+
+#if defined(__AVR__)
+void st7565_write_P(const char *data, bool invert) {
+ uint8_t c = pgm_read_byte(data);
+ while (c != 0) {
+ st7565_write_char(c, invert);
+ c = pgm_read_byte(++data);
+ }
+}
+
+void st7565_write_ln_P(const char *data, bool invert) {
+ st7565_write_P(data, invert);
+ st7565_advance_page(true);
+}
+
+void st7565_write_raw_P(const char *data, uint16_t size) {
+ uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0];
+ if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_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 (st7565_buffer[i] == c) continue;
+ st7565_buffer[i] = c;
+ st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE));
+ }
+}
+#endif // defined(__AVR__)
+
+bool st7565_on(void) {
+ if (!st7565_initialized) {
+ return st7565_active;
+ }
+
+#if ST7565_TIMEOUT > 0
+ st7565_timeout = timer_read32() + ST7565_TIMEOUT;
+#endif
+
+ if (!st7565_active) {
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+ st7565_send_cmd(DISPLAY_ON);
+ spi_stop();
+ st7565_active = true;
+ st7565_on_user();
+ }
+ return st7565_active;
+}
+
+__attribute__((weak)) void st7565_on_user(void) {}
+
+bool st7565_off(void) {
+ if (!st7565_initialized) {
+ return !st7565_active;
+ }
+
+ if (st7565_active) {
+ spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR);
+ st7565_send_cmd(DISPLAY_OFF);
+ spi_stop();
+ st7565_active = false;
+ st7565_off_user();
+ }
+ return !st7565_active;
+}
+
+__attribute__((weak)) void st7565_off_user(void) {}
+
+bool st7565_is_on(void) { return st7565_active; }
+
+uint8_t st7565_max_chars(void) { return ST7565_DISPLAY_WIDTH / ST7565_FONT_WIDTH; }
+
+uint8_t st7565_max_lines(void) { return ST7565_DISPLAY_HEIGHT / ST7565_FONT_HEIGHT; }
+
+void st7565_task(void) {
+ if (!st7565_initialized) {
+ return;
+ }
+
+#if ST7565_UPDATE_INTERVAL > 0
+ if (timer_elapsed(st7565_update_timeout) >= ST7565_UPDATE_INTERVAL) {
+ st7565_update_timeout = timer_read();
+ st7565_set_cursor(0, 0);
+ st7565_task_user();
+ }
+#else
+ st7565_set_cursor(0, 0);
+ st7565_task_user();
+#endif
+
+ // Smart render system, no need to check for dirty
+ st7565_render();
+
+ // Display timeout check
+#if ST7565_TIMEOUT > 0
+ if (st7565_active && timer_expired32(timer_read32(), st7565_timeout)) {
+ st7565_off();
+ }
+#endif
+}
+
+__attribute__((weak)) void st7565_task_user(void) {}
+
+void st7565_reset(void) {
+ writePinLow(ST7565_RST_PIN);
+ wait_ms(20);
+ writePinHigh(ST7565_RST_PIN);
+ wait_ms(20);
+}
+
+spi_status_t st7565_send_cmd(uint8_t cmd) {
+ writePinLow(ST7565_A0_PIN);
+ return spi_write(cmd);
+}
+
+spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
+ writePinHigh(ST7565_A0_PIN);
+ return spi_transmit(data, length);
+}
diff --git a/drivers/lcd/st7565.h b/drivers/lcd/st7565.h
new file mode 100644
index 0000000000..53cfc9a810
--- /dev/null
+++ b/drivers/lcd/st7565.h
@@ -0,0 +1,215 @@
+/*
+Copyright 2021
+
+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 .
+*/
+
+#pragma once
+
+#include
+#include
+
+#include "spi_master.h"
+
+#ifndef ST7565_DISPLAY_WIDTH
+# define ST7565_DISPLAY_WIDTH 128
+#endif
+#ifndef ST7565_DISPLAY_HEIGHT
+# define ST7565_DISPLAY_HEIGHT 32
+#endif
+#ifndef ST7565_MATRIX_SIZE
+# define ST7565_MATRIX_SIZE (ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH) // 1024 (compile time mathed)
+#endif
+#ifndef ST7565_BLOCK_TYPE
+# define ST7565_BLOCK_TYPE uint16_t
+#endif
+#ifndef ST7565_BLOCK_COUNT
+# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8) // 32 (compile time mathed)
+#endif
+#ifndef ST7565_BLOCK_SIZE
+# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT) // 32 (compile time mathed)
+#endif
+
+// the column address corresponding to the first column in the display hardware
+#if !defined(ST7565_COLUMN_OFFSET)
+# define ST7565_COLUMN_OFFSET 0
+#endif
+
+// spi clock divisor
+#if !defined(ST7565_SPI_CLK_DIVISOR)
+# define ST7565_SPI_CLK_DIVISOR 4
+#endif
+
+// Custom font file to use
+#if !defined(ST7565_FONT_H)
+# define ST7565_FONT_H "glcdfont.c"
+#endif
+// unsigned char value of the first character in the font file
+#if !defined(ST7565_FONT_START)
+# define ST7565_FONT_START 0
+#endif
+// unsigned char value of the last character in the font file
+#if !defined(ST7565_FONT_END)
+# define ST7565_FONT_END 223
+#endif
+// Font render width
+#if !defined(ST7565_FONT_WIDTH)
+# define ST7565_FONT_WIDTH 6
+#endif
+// Font render height
+#if !defined(ST7565_FONT_HEIGHT)
+# define ST7565_FONT_HEIGHT 8
+#endif
+// Default contrast level
+#if !defined(ST7565_CONTRAST)
+# define ST7565_CONTRAST 32
+#endif
+
+#if !defined(ST7565_TIMEOUT)
+# if defined(ST7565_DISABLE_TIMEOUT)
+# define ST7565_TIMEOUT 0
+# else
+# define ST7565_TIMEOUT 60000
+# endif
+#endif
+
+#if !defined(ST7565_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD)
+# define ST7565_UPDATE_INTERVAL 50
+#endif
+
+typedef struct __attribute__((__packed__)) {
+ uint8_t *current_element;
+ uint16_t remaining_element_count;
+} display_buffer_reader_t;
+
+// Rotation enum values are flags
+typedef enum { DISPLAY_ROTATION_0, DISPLAY_ROTATION_180 } display_rotation_t;
+
+// Initialize the display, rotating the rendered output based on the define passed in.
+// Returns true if the display was initialized successfully
+bool st7565_init(display_rotation_t rotation);
+
+// Called at the start of st7565_init, weak function overridable by the user
+// rotation - the value passed into st7565_init
+// Return new display_rotation_t if you want to override default rotation
+display_rotation_t st7565_init_user(display_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void st7565_clear(void);
+
+// Renders the dirty chunks of the buffer to display
+void st7565_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions
+void st7565_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void st7565_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void st7565_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void st7565_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void st7565_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void st7565_write_ln(const char *data, bool invert);
+
+// Pans the buffer to the right (or left by passing true) by moving contents of the buffer
+// Useful for moving the screen in preparation for new drawing
+void st7565_pan(bool left);
+
+// Returns a pointer to the requested start index in the buffer plus remaining
+// buffer length as struct
+display_buffer_reader_t st7565_read_raw(uint16_t start_index);
+
+// Writes a string to the buffer at current cursor position
+void st7565_write_raw(const char *data, uint16_t size);
+
+// Writes a single byte into the buffer at the specified index
+void st7565_write_raw_byte(const char data, uint16_t index);
+
+// Sets a specific pixel on or off
+// Coordinates start at top-left and go right and down for positive x and y
+void st7565_write_pixel(uint8_t x, uint8_t y, bool on);
+
+#if defined(__AVR__)
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM
+void st7565_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM
+void st7565_write_ln_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+void st7565_write_raw_P(const char *data, uint16_t size);
+#else
+# define st7565_write_P(data, invert) st7565_write(data, invert)
+# define st7565_write_ln_P(data, invert) st7565_write_ln(data, invert)
+# define st7565_write_raw_P(data, size) st7565_write_raw(data, size)
+#endif // defined(__AVR__)
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool st7565_on(void);
+
+// Called when st7565_on() turns on the screen, weak function overridable by the user
+// Not called if the screen is already on
+void st7565_on_user(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool st7565_off(void);
+
+// Called when st7565_off() turns off the screen, weak function overridable by the user
+// Not called if the screen is already off
+void st7565_off_user(void);
+
+// Returns true if the screen is currently on, false if it is
+// not
+bool st7565_is_on(void);
+
+// Basically it's st7565_render, but with timeout management and st7565_task_user calling!
+void st7565_task(void);
+
+// Called at the start of st7565_task, weak function overridable by the user
+void st7565_task_user(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t st7565_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the display
+uint8_t st7565_max_lines(void);
+
+void st7565_reset(void);
+
+spi_status_t st7565_send_cmd(uint8_t cmd);
+
+spi_status_t st7565_send_data(uint8_t *data, uint16_t length);
diff --git a/quantum/quantum.h b/quantum/quantum.h
index e4a7c5723c..66ba96fde8 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -176,6 +176,10 @@ extern layer_state_t layer_state;
# include "oled_driver.h"
#endif
+#ifdef ST7565_ENABLE
+# include "st7565.h"
+#endif
+
#ifdef DIP_SWITCH_ENABLE
# include "dip_switch.h"
#endif
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 3d6092e71c..249da85bd2 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -85,6 +85,9 @@ along with this program. If not, see .
#ifdef OLED_DRIVER_ENABLE
# include "oled_driver.h"
#endif
+#ifdef ST7565_ENABLE
+# include "st7565.h"
+#endif
#ifdef VELOCIKEY_ENABLE
# include "velocikey.h"
#endif
@@ -306,6 +309,9 @@ void keyboard_init(void) {
#ifdef OLED_DRIVER_ENABLE
oled_init(OLED_ROTATION_0);
#endif
+#ifdef ST7565_ENABLE
+ st7565_init(DISPLAY_ROTATION_0);
+#endif
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
#endif
@@ -470,6 +476,18 @@ MATRIX_LOOP_END:
# endif
#endif
+#ifdef ST7565_ENABLE
+ st7565_task();
+# ifndef ST7565_DISABLE_TIMEOUT
+ // Wake up display if user is using those fabulous keys or spinning those encoders!
+# ifdef ENCODER_ENABLE
+ if (matrix_changed || encoders_changed) st7565_on();
+# else
+ if (matrix_changed) st7565_on();
+# endif
+# endif
+#endif
+
#ifdef MOUSEKEY_ENABLE
// mousekey repeat & acceleration
mousekey_task();
--
cgit v1.2.3
From a0959f1b3393d284b3aa11162497e8851fd94bca Mon Sep 17 00:00:00 2001
From: Simon Arlott
Date: Wed, 16 Jun 2021 05:00:37 +0100
Subject: Add asym_eager_defer_pk debounce type (#12689)
---
docs/feature_debounce_type.md | 4 +-
quantum/debounce/asym_eager_defer_pk.c | 171 ++++++++++
.../debounce/tests/asym_eager_defer_pk_tests.cpp | 374 +++++++++++++++++++++
quantum/debounce/tests/rules.mk | 5 +
quantum/debounce/tests/testlist.mk | 3 +-
5 files changed, 554 insertions(+), 3 deletions(-)
create mode 100644 quantum/debounce/asym_eager_defer_pk.c
create mode 100644 quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
(limited to 'quantum')
diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md
index 3ad74224c1..306185fe83 100644
--- a/docs/feature_debounce_type.md
+++ b/docs/feature_debounce_type.md
@@ -121,16 +121,16 @@ DEBOUNCE_TYPE =
Where name of algorithm is one of:
* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed.
* This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant.
-* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
+* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row.
For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed.
+* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed.
### A couple algorithms that could be implemented in the future:
* ```sym_defer_pr```
* ```sym_eager_g```
-* ```asym_eager_defer_pk```
### Use your own debouncing code
You have the option to implement you own debouncing algorithm. To do this:
diff --git a/quantum/debounce/asym_eager_defer_pk.c b/quantum/debounce/asym_eager_defer_pk.c
new file mode 100644
index 0000000000..24380dc5e5
--- /dev/null
+++ b/quantum/debounce/asym_eager_defer_pk.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2017 Alex Ong
+ * Copyright 2020 Andrei Purdea
+ * Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+/*
+Basic symmetric per-key algorithm. Uses an 8-bit counter per key.
+When no state changes have occured for DEBOUNCE milliseconds, we push the state.
+*/
+
+#include "matrix.h"
+#include "timer.h"
+#include "quantum.h"
+#include
+
+#ifdef PROTOCOL_CHIBIOS
+# if CH_CFG_USE_MEMCORE == FALSE
+# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm.
+# endif
+#endif
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+// Maximum debounce: 127ms
+#if DEBOUNCE > 127
+# undef DEBOUNCE
+# define DEBOUNCE 127
+#endif
+
+#define ROW_SHIFTER ((matrix_row_t)1)
+
+typedef struct {
+ bool pressed : 1;
+ uint8_t time : 7;
+} debounce_counter_t;
+
+#if DEBOUNCE > 0
+static debounce_counter_t *debounce_counters;
+static fast_timer_t last_time;
+static bool counters_need_update;
+static bool matrix_need_update;
+
+#define DEBOUNCE_ELAPSED 0
+
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time);
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
+
+// we use num_rows rather than MATRIX_ROWS to support split keyboards
+void debounce_init(uint8_t num_rows) {
+ debounce_counters = malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t));
+ int i = 0;
+ for (uint8_t r = 0; r < num_rows; r++) {
+ for (uint8_t c = 0; c < MATRIX_COLS; c++) {
+ debounce_counters[i++].time = DEBOUNCE_ELAPSED;
+ }
+ }
+}
+
+void debounce_free(void) {
+ free(debounce_counters);
+ debounce_counters = NULL;
+}
+
+void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) {
+ bool updated_last = false;
+
+ if (counters_need_update) {
+ fast_timer_t now = timer_read_fast();
+ fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
+
+ last_time = now;
+ updated_last = true;
+ if (elapsed_time > UINT8_MAX) {
+ elapsed_time = UINT8_MAX;
+ }
+
+ if (elapsed_time > 0) {
+ update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time);
+ }
+ }
+
+ if (changed || matrix_need_update) {
+ if (!updated_last) {
+ last_time = timer_read_fast();
+ }
+
+ transfer_matrix_values(raw, cooked, num_rows);
+ }
+}
+
+static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) {
+ debounce_counter_t *debounce_pointer = debounce_counters;
+
+ counters_need_update = false;
+ matrix_need_update = false;
+
+ for (uint8_t row = 0; row < num_rows; row++) {
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ matrix_row_t col_mask = (ROW_SHIFTER << col);
+
+ if (debounce_pointer->time != DEBOUNCE_ELAPSED) {
+ if (debounce_pointer->time <= elapsed_time) {
+ debounce_pointer->time = DEBOUNCE_ELAPSED;
+
+ if (debounce_pointer->pressed) {
+ // key-down: eager
+ matrix_need_update = true;
+ } else {
+ // key-up: defer
+ cooked[row] = (cooked[row] & ~col_mask) | (raw[row] & col_mask);
+ }
+ } else {
+ debounce_pointer->time -= elapsed_time;
+ counters_need_update = true;
+ }
+ }
+ debounce_pointer++;
+ }
+ }
+}
+
+static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) {
+ debounce_counter_t *debounce_pointer = debounce_counters;
+
+ for (uint8_t row = 0; row < num_rows; row++) {
+ matrix_row_t delta = raw[row] ^ cooked[row];
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ matrix_row_t col_mask = (ROW_SHIFTER << col);
+
+ if (delta & col_mask) {
+ if (debounce_pointer->time == DEBOUNCE_ELAPSED) {
+ debounce_pointer->pressed = (raw[row] & col_mask);
+ debounce_pointer->time = DEBOUNCE;
+ counters_need_update = true;
+
+ if (debounce_pointer->pressed) {
+ // key-down: eager
+ cooked[row] ^= col_mask;
+ }
+ }
+ } else if (debounce_pointer->time != DEBOUNCE_ELAPSED) {
+ if (!debounce_pointer->pressed) {
+ // key-up: defer
+ debounce_pointer->time = DEBOUNCE_ELAPSED;
+ }
+ }
+ debounce_pointer++;
+ }
+ }
+}
+
+bool debounce_active(void) { return true; }
+#else
+# include "none.c"
+#endif
diff --git a/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
new file mode 100644
index 0000000000..fe374c3dfa
--- /dev/null
+++ b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp
@@ -0,0 +1,374 @@
+/* Copyright 2021 Simon Arlott
+ *
+ * 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 .
+ */
+
+#include "gtest/gtest.h"
+
+#include "debounce_test_common.h"
+
+TEST_F(DebounceTest, OneKeyShort1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ /*
+ * Until the eager timer on DOWN is observed to finish, the defer timer
+ * on UP can't start. There's no workaround for this because it's not
+ * possible to debounce an event that isn't being tracked.
+ *
+ * sym_defer_pk has the same problem but the test has to track that the
+ * key changed state so the DOWN timer is always allowed to finish
+ * before starting the UP timer.
+ */
+ {5, {}, {}},
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 2ms delay */
+ {2, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 3ms delay */
+ {3, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 4ms delay */
+ {4, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 5ms delay */
+ {5, {{0, 1, UP}}, {}},
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 6ms delay */
+ {6, {{0, 1, UP}}, {}},
+
+ {11, {}, {{0, 1, UP}}}, /* 5ms after UP at time 6 */
+ /* Press key again after 1ms delay */
+ {12, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort7) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Release key after 7ms delay */
+ {7, {{0, 1, UP}}, {}},
+
+ {12, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */
+ /* Press key again after 1ms delay */
+ {13, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort8) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */
+ /* Press key again after 0ms delay (scan 2) */
+ {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyShort9) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Release key after 1ms delay */
+ {1, {{0, 1, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+
+ /* Press key again after 0ms delay (same scan) before debounce finishes */
+ {10, {{0, 1, DOWN}}, {}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {3, {{0, 1, UP}}, {}},
+ {4, {{0, 1, DOWN}}, {}},
+ {5, {{0, 1, UP}}, {}},
+ {6, {{0, 1, DOWN}}, {}},
+ {7, {{0, 1, UP}}, {}},
+ {8, {{0, 1, DOWN}}, {}},
+ {9, {{0, 1, UP}}, {}},
+ {10, {{0, 1, DOWN}}, {}},
+ {11, {{0, 1, UP}}, {}},
+ {12, {{0, 1, DOWN}}, {}},
+ {13, {{0, 1, UP}}, {}},
+ {14, {{0, 1, DOWN}}, {}},
+ {15, {{0, 1, UP}}, {}},
+
+ {20, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay */
+ {21, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyBouncing2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ /* Change twice in the same time period */
+ {1, {{0, 1, UP}}, {}},
+ {1, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {2, {{0, 1, UP}}, {}},
+ {2, {{0, 1, DOWN}}, {}},
+ {2, {{0, 1, UP}}, {}},
+ /* Change twice in the same time period */
+ {6, {{0, 1, DOWN}}, {}},
+ {6, {{0, 1, UP}}, {}},
+ /* Change three times in the same time period */
+ {7, {{0, 1, DOWN}}, {}},
+ {7, {{0, 1, UP}}, {}},
+ {7, {{0, 1, DOWN}}, {}},
+ /* Change twice in the same time period */
+ {8, {{0, 1, UP}}, {}},
+ {8, {{0, 1, DOWN}}, {}},
+ /* Change three times in the same time period */
+ {9, {{0, 1, UP}}, {}},
+ {9, {{0, 1, DOWN}}, {}},
+ {9, {{0, 1, UP}}, {}},
+
+ {14, {}, {{0, 1, UP}}},
+ /* Press key again after 1ms delay */
+ {15, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyLong) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {25, {{0, 1, UP}}, {}},
+
+ {30, {}, {{0, 1, UP}}},
+
+ {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {75, {{0, 1, UP}}, {}},
+
+ {80, {}, {{0, 1, UP}}},
+
+ {100, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ runEvents();
+}
+
+TEST_F(DebounceTest, TwoKeysShort) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ {1, {{0, 2, DOWN}}, {{0, 2, DOWN}}},
+ /* Release key after 2ms delay */
+ {2, {{0, 1, UP}}, {}},
+ {3, {{0, 2, UP}}, {}},
+
+ {5, {}, {}}, /* See OneKeyShort1 */
+ {6, {}, {}}, /* See OneKeyShort1 */
+
+ {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ /* Press key again after 1ms delay */
+ {11, {{0, 1, DOWN}}, {{0, 1, DOWN}, {0, 2, UP}}}, /* 5ms+5ms after DOWN at time 0 */
+ {12, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, /* 5ms+5ms after DOWN at time 0 */
+ });
+ runEvents();
+}
+
+
+TEST_F(DebounceTest, OneKeyDelayedScan1) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late, immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ {305, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan2) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late, immediately release key */
+ {300, {{0, 1, UP}}, {}},
+
+ /* Processing is very late again */
+ {600, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan3) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ {306, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan4) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is very late */
+ {300, {}, {}},
+ /* Release key after 1ms */
+ {301, {{0, 1, UP}}, {}},
+
+ /* Processing is very late again */
+ {600, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan5) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, UP}}},
+ /* Immediately press key again */
+ {300, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan6) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Processing is very late */
+ {300, {}, {{0, 1, UP}}},
+
+ /* Press key again after 1ms */
+ {301, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan7) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ {5, {{0, 1, UP}}, {}},
+
+ /* Press key again before debounce expires */
+ {300, {{0, 1, DOWN}}, {}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
+
+TEST_F(DebounceTest, OneKeyDelayedScan8) {
+ addEvents({ /* Time, Inputs, Outputs */
+ {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}},
+
+ /* Processing is a bit late */
+ {50, {}, {}},
+ /* Release key after 1ms */
+ {51, {{0, 1, UP}}, {}},
+
+ /* Processing is a bit late again */
+ {100, {}, {{0, 1, UP}}},
+ });
+ time_jumps_ = true;
+ runEvents();
+}
diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk
index 29fda7889f..66928d7eb6 100644
--- a/quantum/debounce/tests/rules.mk
+++ b/quantum/debounce/tests/rules.mk
@@ -37,3 +37,8 @@ debounce_sym_eager_pr_DEFS := $(DEBOUNCE_COMMON_DEFS)
debounce_sym_eager_pr_SRC := $(DEBOUNCE_COMMON_SRC) \
$(QUANTUM_PATH)/debounce/sym_eager_pr.c \
$(QUANTUM_PATH)/debounce/tests/sym_eager_pr_tests.cpp
+
+debounce_asym_eager_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS)
+debounce_asym_eager_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \
+ $(QUANTUM_PATH)/debounce/asym_eager_defer_pk.c \
+ $(QUANTUM_PATH)/debounce/tests/asym_eager_defer_pk_tests.cpp
diff --git a/quantum/debounce/tests/testlist.mk b/quantum/debounce/tests/testlist.mk
index 16ce8a0a8e..c54c45aa63 100644
--- a/quantum/debounce/tests/testlist.mk
+++ b/quantum/debounce/tests/testlist.mk
@@ -2,4 +2,5 @@ TEST_LIST += \
debounce_sym_defer_g \
debounce_sym_defer_pk \
debounce_sym_eager_pk \
- debounce_sym_eager_pr
+ debounce_sym_eager_pr \
+ debounce_asym_eager_defer_pk
--
cgit v1.2.3
From ff61df103e010de425c01560d16b77555a7f9ee4 Mon Sep 17 00:00:00 2001
From: Albert Y
Date: Wed, 16 Jun 2021 12:04:21 +0800
Subject: Limit saturation for RGB_MATRIX_JELLYBEAN_RAINDROPS (#12669)
* Set saturation limit to jellybean_raindrops_anim.h
* Use faster bit-shift maths and qadd8
* Remove extra parenthesis
* Single bitmask operation is sufficient.
Co-authored-by: filterpaper ---
quantum/rgb_matrix_animations/jellybean_raindrops_anim.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'quantum')
diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
index 9493b38508..a17e954b1b 100644
--- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
+++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
- HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v};
+ HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v};
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
--
cgit v1.2.3
From ef92c9ee2cf4745637635ec1895399e4f013914c Mon Sep 17 00:00:00 2001
From: Stefan Kerkmann
Date: Fri, 18 Jun 2021 01:09:43 +0200
Subject: Add CRC8 calculation subsystem to quantum (#12641)
* Intended usage is data validation in split transport code.
* Default space efficient algorithm.
* Opt-in fast table based algorithmn with #define CRC8_USE_TABLE switch.
* Define switches for size and speed optimized versions, the default is size
optimized by using uint_least8_t as datatype for calculations.
* #define CRC8_OPTIMIZE_SPEED uses uint_fast8_t as datatype for
calculations, this only affects 32-bit Archs like ARM and RISC-V.
* Placeholder crc_init() function for hardware backed crc calculation,
not implemented yet.---
common_features.mk | 6 +++++
quantum/crc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++
quantum/crc.h | 44 ++++++++++++++++++++++++++++++++++
tmk_core/common/keyboard.c | 6 +++++
4 files changed, 115 insertions(+)
create mode 100644 quantum/crc.c
create mode 100644 quantum/crc.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index b259af46c0..1a079a8df2 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -530,6 +530,7 @@ endif
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
OPT_DEFS += -DSPLIT_KEYBOARD
+ CRC_ENABLE := yes
# Include files used by all split keyboards
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
@@ -557,6 +558,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
+ifeq ($(strip $(CRC_ENABLE)), yes)
+ OPT_DEFS += -DCRC_ENABLE
+ QUANTUM_LIB_SRC += crc.c
+endif
+
HAPTIC_ENABLE ?= no
ifneq ($(strip $(HAPTIC_ENABLE)),no)
COMMON_VPATH += $(DRIVER_PATH)/haptic
diff --git a/quantum/crc.c b/quantum/crc.c
new file mode 100644
index 0000000000..0d8b9d6017
--- /dev/null
+++ b/quantum/crc.c
@@ -0,0 +1,59 @@
+/* Copyright 2021 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 .
+ */
+
+#include "crc.h"
+
+__attribute__((weak)) void crc_init(void){
+ /* Software implementation nothing todo here. */
+};
+
+#if defined(CRC8_USE_TABLE)
+/**
+ * Static table used for the table_driven implementation.
+ */
+static const crc_t crc_table[256] = {0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a,
+ 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3};
+
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) {
+ const uint8_t *d = (const uint8_t *)data;
+ crc_t crc = 0xff;
+ size_t tbl_idx;
+
+ while (data_len--) {
+ tbl_idx = crc ^ *d;
+ crc = crc_table[tbl_idx] & 0xff;
+ d++;
+ }
+ return crc & 0xff;
+}
+#else
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) {
+ const uint8_t *d = (const uint8_t *)data;
+ crc_t crc = 0xff;
+ size_t i, j;
+
+ for (i = 0; i < data_len; i++) {
+ crc ^= d[i];
+ for (j = 0; j < 8; j++) {
+ if ((crc & 0x80) != 0)
+ crc = (crc_t)((crc << 1) ^ 0x31);
+ else
+ crc <<= 1;
+ }
+ }
+ return crc;
+}
+#endif
\ No newline at end of file
diff --git a/quantum/crc.h b/quantum/crc.h
new file mode 100644
index 0000000000..c17f5888e2
--- /dev/null
+++ b/quantum/crc.h
@@ -0,0 +1,44 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+/**
+ * The type of the CRC values.
+ *
+ * This type must be big enough to contain at least 8 bits.
+ */
+#if defined(CRC8_OPTIMIZE_SPEED)
+typedef uint_fast8_t crc_t;
+#else
+typedef uint_least8_t crc_t;
+#endif
+
+/**
+ * Initialize crc subsystem.
+ */
+__attribute__((weak)) void crc_init(void);
+
+/**
+ * Generate CRC8 value from given data.
+ *
+ * \param[in] data Pointer to a buffer of \a data_len bytes.
+ * \param[in] data_len Number of bytes in the \a data buffer.
+ * \return The calculated crc value.
+ */
+__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len);
\ No newline at end of file
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 249da85bd2..28fa97bc8f 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -103,6 +103,9 @@ along with this program. If not, see .
#ifdef EEPROM_DRIVER
# include "eeprom_driver.h"
#endif
+#if defined(CRC_ENABLE)
+# include "crc.h"
+#endif
static uint32_t last_input_modification_time = 0;
uint32_t last_input_activity_time(void) { return last_input_modification_time; }
@@ -300,6 +303,9 @@ void keyboard_init(void) {
timer_init();
sync_timer_init();
matrix_init();
+#if defined(CRC_ENABLE)
+ crc_init();
+#endif
#ifdef VIA_ENABLE
via_init();
#endif
--
cgit v1.2.3
From 172e6a703041363decd6fc829542f33180c13beb Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Fri, 18 Jun 2021 09:10:06 +1000
Subject: Extensible split data sync (#11930)
* Extensible split data sync capability through transactions.
- Split common transport has been split up between the transport layer
and data layer.
- Split "transactions" model used, with convergence between I2C and
serial data definitions.
- Slave matrix "generation count" is used to determine if the full slave
matrix needs to be retrieved.
- Encoders get the same "generation count" treatment.
- All other blocks of data are synchronised when a change is detected.
- All transmissions have a globally-configurable deadline before a
transmission is forced (`FORCED_SYNC_THROTTLE_MS`, default 100ms).
- Added atomicity for all core-synced data, preventing partial updates
- Added retries to AVR i2c_master's i2c_start, to minimise the number of
failed transactions when interrupts are disabled on the slave due to
atomicity checks.
- Some keyboards have had slight modifications made in order to ensure
that they still build due to firmware size restrictions.
* Fixup LED_MATRIX compile.
* Parameterise ERROR_DISCONNECT_COUNT.---
common_features.mk | 6 +-
docs/config_options.md | 26 +-
docs/feature_split_keyboard.md | 114 ++++-
drivers/avr/i2c_master.c | 19 +-
drivers/avr/i2c_slave.c | 29 +-
drivers/avr/i2c_slave.h | 13 +-
drivers/avr/serial.c | 82 +---
drivers/avr/serial.h | 62 ---
drivers/chibios/serial.c | 52 +-
drivers/chibios/serial.h | 62 ---
drivers/chibios/serial_usart.c | 47 +-
drivers/serial.h | 46 ++
keyboards/draculad/config.h | 2 +
keyboards/handwired/freoduo/rules.mk | 4 +-
keyboards/helix/rev2/keymaps/default/rules.mk | 2 +-
keyboards/keebio/iris/rev2/rules.mk | 2 +
keyboards/keebio/iris/rev3/rules.mk | 1 +
keyboards/keebio/iris/rev4/rules.mk | 2 +
keyboards/keebio/quefrency/rules.mk | 1 +
keyboards/keebio/viterbi/rev2/rules.mk | 2 +
keyboards/keebio/viterbi/rules.mk | 8 +-
quantum/split_common/matrix.c | 6 +-
quantum/split_common/post_config.h | 9 -
quantum/split_common/transaction_id_define.h | 94 ++++
quantum/split_common/transactions.c | 670 ++++++++++++++++++++++++++
quantum/split_common/transactions.h | 54 +++
quantum/split_common/transport.c | 484 +++----------------
quantum/split_common/transport.h | 165 +++++++
tmk_core/common/host.c | 14 +-
29 files changed, 1387 insertions(+), 691 deletions(-)
delete mode 100644 drivers/avr/serial.h
delete mode 100644 drivers/chibios/serial.h
create mode 100644 drivers/serial.h
create mode 100644 quantum/split_common/transaction_id_define.h
create mode 100644 quantum/split_common/transactions.c
create mode 100644 quantum/split_common/transactions.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 1a079a8df2..15637d7608 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -537,7 +537,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
- QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c
+ QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
+ $(QUANTUM_DIR)/split_common/transactions.c
+
+ OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
+
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
ifeq ($(PLATFORM),AVR)
diff --git a/docs/config_options.md b/docs/config_options.md
index 26fe8cea55..980195ac68 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -274,7 +274,7 @@ There are a few different ways to set handedness for split keyboards (listed in
### Other Options
* `#define USE_I2C`
- * For using I2C instead of Serial (defaults to serial)
+ * For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only)
* `#define SOFT_SERIAL_PIN D0`
* When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`.
@@ -303,7 +303,7 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_DETECT`
* Detect (with timeout) USB connection when delegating master/slave
* Default behavior for ARM
- * Required for AVR Teensy
+ * Required for AVR Teensy (without hardware mods)
* `#define SPLIT_USB_TIMEOUT 2000`
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
@@ -311,6 +311,28 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define SPLIT_USB_TIMEOUT_POLL 10`
* Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
+* `#define FORCED_SYNC_THROTTLE_MS 100`
+ * Deadline for synchronizing data from master to slave when using the QMK-provided split transport.
+
+* `#define SPLIT_TRANSPORT_MIRROR`
+ * Mirrors the master-side matrix on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_LAYER_STATE_ENABLE`
+ * Ensures the current layer state is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_LED_STATE_ENABLE`
+ * Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_MODS_ENABLE`
+ * Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_WPM_ENABLE`
+ * Ensures the current WPM is available on the slave when using the QMK-provided split transport.
+
+* `#define SPLIT_TRANSACTION_IDS_KB .....`
+* `#define SPLIT_TRANSACTION_IDS_USER .....`
+ * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information.
+
# The `rules.mk` File
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md
index 4ebf585f5c..603c387c2d 100644
--- a/docs/feature_split_keyboard.md
+++ b/docs/feature_split_keyboard.md
@@ -8,8 +8,7 @@ QMK Firmware has a generic implementation that is usable by any board, as well a
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
-!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity.
-
+!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported.
## Compatibility Overview
@@ -169,7 +168,7 @@ Because not every split keyboard is identical, there are a number of additional
#define USE_I2C
```
-This enables I2C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I2C-based devices.
+This configures the use of I2C support for split keyboard transport (AVR only).
```c
#define SOFT_SERIAL_PIN D0
@@ -193,20 +192,115 @@ If you're having issues with serial communication, you can change this value, as
* **`5`**: about 20kbps
```c
-#define SPLIT_MODS_ENABLE
+#define FORCED_SYNC_THROTTLE_MS 100
```
-This enables transmitting modifier state (normal, weak and oneshot) to the non
-primary side of the split keyboard. This adds a few bytes of data to the split
-communication protocol and may impact the matrix scan speed when enabled.
-The purpose of this feature is to support cosmetic use of modifer state (e.g.
-displaying status on an OLED screen).
+This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync.
```c
#define SPLIT_TRANSPORT_MIRROR
```
-This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses).
+This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_LAYER_STATE_ENABLE
+```
+
+This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_LED_STATE_ENABLE
+```
+
+This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_MODS_ENABLE
+```
+
+This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+```c
+#define SPLIT_WPM_ENABLE
+```
+
+This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled.
+
+### Custom data sync between sides :id=custom-data-sync
+
+QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master.
+
+To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_:
+
+```c
+// for keyboard-level data sync:
+#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B
+// or, for user:
+#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C
+```
+
+These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example:
+
+```c
+typedef struct _master_to_slave_t {
+ int m2s_data;
+} master_to_slave_t;
+
+typedef struct _slave_to_master_t {
+ int s2m_data;
+} slave_to_master_t;
+
+void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
+ const master_to_slave_t *m2s = (const master_to_slave_t*)in_data;
+ slave_to_master_t *s2m = (slave_to_master_t*)out_data;
+ s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back
+}
+
+void keyboard_post_init_user(void) {
+ transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler);
+}
+```
+
+The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled:
+
+```c
+void housekeeping_task_user(void) {
+ if (is_keyboard_master()) {
+ // Interact with slave every 500ms
+ static uint32_t last_sync = 0;
+ if (timer_elapsed32(last_sync) > 500) {
+ master_to_slave_t m2s = {6};
+ slave_to_master_t s2m = {0};
+ if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) {
+ last_sync = timer_read32();
+ dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5
+ } else {
+ dprint("Slave sync failed!\n");
+ }
+ }
+ }
+}
+```
+
+!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur.
+
+If only one-way data transfer is needed, helper methods are provided:
+
+```c
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer);
+bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+```
+
+By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required:
+
+```c
+// Master to slave:
+#define RPC_M2S_BUFFER_SIZE 48
+// Slave to master:
+#define RPC_S2M_BUFFER_SIZE 48
+```
### Hardware Configuration Options
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index b1e4885298..2773e00778 100644
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -28,8 +28,14 @@
# define F_SCL 400000UL // SCL frequency
#endif
+#ifndef I2C_START_RETRY_COUNT
+# define I2C_START_RETRY_COUNT 20
+#endif // I2C_START_RETRY_COUNT
+
#define TWBR_val (((F_CPU / F_SCL) - 16) / 2)
+#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
+
void i2c_init(void) {
TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
@@ -47,7 +53,7 @@ void i2c_init(void) {
#endif
}
-i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
+static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) {
// reset TWI control register
TWCR = 0;
// transmit START condition
@@ -86,6 +92,17 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
return I2C_STATUS_SUCCESS;
}
+i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
+ // Retry i2c_start_impl a bunch times in case the remote side has interrupts disabled.
+ uint16_t timeout_timer = timer_read();
+ uint16_t time_slice = MAX(1, (timeout == (I2C_TIMEOUT_INFINITE)) ? 5 : (timeout / (I2C_START_RETRY_COUNT))); // if it's infinite, wait 1ms between attempts, otherwise split up the entire timeout into the number of retries
+ i2c_status_t status;
+ do {
+ status = i2c_start_impl(address, time_slice);
+ } while ((status < 0) && ((timeout == I2C_TIMEOUT_INFINITE) || (timer_elapsed(timeout_timer) < timeout)));
+ return status;
+}
+
i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
// load data into data register
TWDR = data;
diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c
index 62a378165a..2907f164c0 100644
--- a/drivers/avr/i2c_slave.c
+++ b/drivers/avr/i2c_slave.c
@@ -17,6 +17,7 @@
* GitHub repository: https://github.com/g4lvanix/I2C-slave-lib
*/
+#include
#include
#include
#include
@@ -24,6 +25,12 @@
#include "i2c_slave.h"
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# include "transactions.h"
+
+static volatile bool is_callback_executor = false;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
static volatile uint8_t buffer_address;
@@ -48,11 +55,14 @@ ISR(TWI_vect) {
case TW_SR_SLA_ACK:
// The device is now a slave receiver
slave_has_register_set = false;
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ is_callback_executor = false;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
break;
case TW_SR_DATA_ACK:
// This device is a slave receiver and has received data
- // First byte is the location then the bytes will be writen in buffer with auto-incriment
+ // First byte is the location then the bytes will be writen in buffer with auto-increment
if (!slave_has_register_set) {
buffer_address = TWDR;
@@ -60,10 +70,25 @@ ISR(TWI_vect) {
ack = 0;
buffer_address = 0;
}
- slave_has_register_set = true; // address has been receaved now fill in buffer
+ slave_has_register_set = true; // address has been received now fill in buffer
+
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ // Work out if we're attempting to execute a callback
+ is_callback_executor = buffer_address == split_transaction_table[I2C_EXECUTE_CALLBACK].initiator2target_offset;
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
} else {
i2c_slave_reg[buffer_address] = TWDR;
buffer_address++;
+
+#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+ // If we're intending to execute a transaction callback, do so, as we've just received the transaction ID
+ if (is_callback_executor) {
+ split_transaction_desc_t *trans = &split_transaction_table[split_shmem->transaction_id];
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
+ }
+#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
}
break;
diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h
index 1cd0625ef4..a8647c9da3 100644
--- a/drivers/avr/i2c_slave.h
+++ b/drivers/avr/i2c_slave.h
@@ -22,7 +22,18 @@
#pragma once
-#define I2C_SLAVE_REG_COUNT 30
+#ifndef I2C_SLAVE_REG_COUNT
+
+# if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# include "transport.h"
+# define I2C_SLAVE_REG_COUNT sizeof(split_shared_memory_t)
+# else // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+# define I2C_SLAVE_REG_COUNT 30
+# endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS)
+
+#endif // I2C_SLAVE_REG_COUNT
+
+_Static_assert(I2C_SLAVE_REG_COUNT < 256, "I2C target registers must be single byte");
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
diff --git a/drivers/avr/serial.c b/drivers/avr/serial.c
index 3647bee0d3..9a7345a53d 100644
--- a/drivers/avr/serial.c
+++ b/drivers/avr/serial.c
@@ -224,15 +224,8 @@
# 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;
+# define SLAVE_INT_ACK_WIDTH_UNIT 2
+# define SLAVE_INT_ACK_WIDTH 4
inline static void serial_delay(void) ALWAYS_INLINE;
inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); }
@@ -259,16 +252,12 @@ inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); }
inline static void serial_high(void) ALWAYS_INLINE;
inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); }
-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;
+void soft_serial_initiator_init(void) {
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;
+void soft_serial_target_init(void) {
serial_input_with_pullup();
// Enable INT0-INT7
@@ -395,19 +384,14 @@ static inline uint8_t nibble_bits_count(uint8_t 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);
+ bits = serial_read_chunk(&pecount, 8);
tid = bits >> 3;
- bits = (bits & 7) != nibble_bits_count(tid);
- if (bits || pecount > 0 || tid > Transaction_table_size) {
+ bits = (bits & 7) != (nibble_bits_count(tid) & 7);
+ if (bits || pecount > 0 || tid > NUM_TOTAL_TRANSACTIONS) {
return;
}
serial_delay_half1();
@@ -415,18 +399,22 @@ ISR(SERIAL_PIN_INTERRUPT) {
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];
+ split_transaction_desc_t *trans = &split_transaction_table[tid];
serial_low(); // response step2 ack high->low
-# endif
+
+ // If the transaction has a callback, we can execute it now
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
// target send phase
- if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size);
+ if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)split_trans_target2initiator_buffer(trans), 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)) {
+ if (serial_recive_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) {
*trans->status = TRANSACTION_ACCEPTED;
} else {
*trans->status = TRANSACTION_DATA_ERROR;
@@ -448,14 +436,12 @@ ISR(SERIAL_PIN_INTERRUPT) {
// 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
+ if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
+
+ if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
+
cli();
// signal to the target that we want to start a transaction
@@ -463,27 +449,11 @@ int soft_serial_transaction(int sstd_index) {
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_write_chunk(tid, 8);
serial_delay_half1();
// wait for the target response (step1 low->high)
@@ -504,12 +474,11 @@ int soft_serial_transaction(int sstd_index) {
}
_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)) {
+ if (!serial_recive_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) {
serial_output();
serial_high();
*trans->status = TRANSACTION_DATA_ERROR;
@@ -523,7 +492,7 @@ int soft_serial_transaction(int sstd_index) {
// initiator send phase
if (trans->initiator2target_buffer_size > 0) {
- serial_send_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size);
+ serial_send_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
}
// always, release the line when not in use
@@ -534,9 +503,8 @@ int soft_serial_transaction(int sstd_index) {
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];
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
cli();
int retval = *trans->status;
*trans->status = 0;
@@ -544,8 +512,6 @@ int soft_serial_get_and_clean_status(int sstd_index) {
sei();
return retval;
}
-# endif
-
#endif
// Helix serial.c history
diff --git a/drivers/avr/serial.h b/drivers/avr/serial.h
deleted file mode 100644
index 53e66cf905..0000000000
--- a/drivers/avr/serial.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#pragma once
-
-#include
-
-// /////////////////////////////////////////////////////////////////
-// 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 (using signle-type transaction function)
-// /* nothing */
-// //// USE flexible API (using multi-type transaction function)
-// #define SERIAL_USE_MULTI_TRANSACTION
-//
-// /////////////////////////////////////////////////////////////////
-
-// 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/drivers/chibios/serial.c b/drivers/chibios/serial.c
index 54f7e1321f..f54fbcee4e 100644
--- a/drivers/chibios/serial.c
+++ b/drivers/chibios/serial.c
@@ -74,21 +74,12 @@ static THD_FUNCTION(Thread1, arg) {
}
}
-static SSTD_t *Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
-
-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;
-
+void soft_serial_initiator_init(void) {
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;
-
+void soft_serial_target_init(void) {
serial_input();
palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE);
@@ -154,16 +145,14 @@ void interrupt_handler(void *arg) {
uint8_t checksum_computed = 0;
int sstd_index = 0;
-#ifdef SERIAL_USE_MULTI_TRANSACTION
sstd_index = serial_read_byte();
sync_send();
-#endif
- SSTD_t *trans = &Transaction_table[sstd_index];
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
- trans->initiator2target_buffer[i] = serial_read_byte();
+ split_trans_initiator2target_buffer(trans)[i] = serial_read_byte();
sync_send();
- checksum_computed += trans->initiator2target_buffer[i];
+ checksum_computed += split_trans_initiator2target_buffer(trans)[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();
@@ -172,12 +161,17 @@ void interrupt_handler(void *arg) {
// wait for the sync to finish sending
serial_delay();
+ // Allow any slave processing to occur
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
+ }
+
uint8_t checksum = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
- serial_write_byte(trans->target2initiator_buffer[i]);
+ serial_write_byte(split_trans_target2initiator_buffer(trans)[i]);
sync_send();
serial_delay_half();
- checksum += trans->target2initiator_buffer[i];
+ checksum += split_trans_target2initiator_buffer(trans)[i];
}
serial_write_byte(checksum ^ 7);
sync_send();
@@ -206,15 +200,10 @@ void interrupt_handler(void *arg) {
// 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) {
- int sstd_index = 0;
-#else
int soft_serial_transaction(int sstd_index) {
-#endif
-
- if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
- SSTD_t *trans = &Transaction_table[sstd_index];
+ if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
+ split_transaction_desc_t *trans = &split_transaction_table[sstd_index];
+ if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
// TODO: remove extra delay between transactions
serial_delay();
@@ -244,14 +233,13 @@ int soft_serial_transaction(int sstd_index) {
uint8_t checksum = 0;
// send data to the slave
-#ifdef SERIAL_USE_MULTI_TRANSACTION
serial_write_byte(sstd_index); // first chunk is transaction id
sync_recv();
-#endif
+
for (int i = 0; i < trans->initiator2target_buffer_size; ++i) {
- serial_write_byte(trans->initiator2target_buffer[i]);
+ serial_write_byte(split_trans_initiator2target_buffer(trans)[i]);
sync_recv();
- checksum += trans->initiator2target_buffer[i];
+ checksum += split_trans_initiator2target_buffer(trans)[i];
}
serial_write_byte(checksum ^ 7);
sync_recv();
@@ -262,9 +250,9 @@ int soft_serial_transaction(int sstd_index) {
// receive data from the slave
uint8_t checksum_computed = 0;
for (int i = 0; i < trans->target2initiator_buffer_size; ++i) {
- trans->target2initiator_buffer[i] = serial_read_byte();
+ split_trans_target2initiator_buffer(trans)[i] = serial_read_byte();
sync_recv();
- checksum_computed += trans->target2initiator_buffer[i];
+ checksum_computed += split_trans_target2initiator_buffer(trans)[i];
}
checksum_computed ^= 7;
uint8_t checksum_received = serial_read_byte();
diff --git a/drivers/chibios/serial.h b/drivers/chibios/serial.h
deleted file mode 100644
index 0c1857d52e..0000000000
--- a/drivers/chibios/serial.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#pragma once
-
-#include
-
-// /////////////////////////////////////////////////////////////////
-// 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 (using signle-type transaction function)
-// /* nothing */
-// //// USE flexible API (using multi-type transaction function)
-// #define SERIAL_USE_MULTI_TRANSACTION
-//
-// /////////////////////////////////////////////////////////////////
-
-// 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 result
-#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/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c
index cae29388c3..9f180d2d74 100644
--- a/drivers/chibios/serial_usart.c
+++ b/drivers/chibios/serial_usart.c
@@ -113,37 +113,29 @@ void usart_slave_init(void) {
chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL);
}
-static SSTD_t* Transaction_table = NULL;
-static uint8_t Transaction_table_size = 0;
+void soft_serial_initiator_init(void) { usart_master_init(); }
-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;
-
- usart_master_init();
-}
-
-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;
-
- usart_slave_init();
-}
+void soft_serial_target_init(void) { usart_slave_init(); }
void handle_soft_serial_slave(void) {
- uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
- SSTD_t* trans = &Transaction_table[sstd_index];
+ uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id
+ split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
// Always write back the sstd_index as part of a basic handshake
sstd_index ^= HANDSHAKE_MAGIC;
sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index));
if (trans->initiator2target_buffer_size) {
- sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size);
+ sdRead(&SERIAL_USART_DRIVER, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size);
+ }
+
+ // Allow any slave processing to occur
+ if (trans->slave_callback) {
+ trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans));
}
if (trans->target2initiator_buffer_size) {
- sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size);
+ sdWrite(&SERIAL_USART_DRIVER, split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size);
}
if (trans->status) {
@@ -160,17 +152,14 @@ void handle_soft_serial_slave(void) {
// TRANSACTION_END
// TRANSACTION_NO_RESPONSE
// TRANSACTION_DATA_ERROR
-#ifndef SERIAL_USE_MULTI_TRANSACTION
-int soft_serial_transaction(void) {
- uint8_t sstd_index = 0;
-#else
int soft_serial_transaction(int index) {
uint8_t sstd_index = index;
-#endif
- if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR;
- SSTD_t* trans = &Transaction_table[sstd_index];
- msg_t res = 0;
+ if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR;
+ split_transaction_desc_t* trans = &split_transaction_table[sstd_index];
+ msg_t res = 0;
+
+ if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered
sdClear(&SERIAL_USART_DRIVER);
@@ -189,7 +178,7 @@ int soft_serial_transaction(int index) {
}
if (trans->initiator2target_buffer_size) {
- res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
+ res = sdWriteTimeout(&SERIAL_USART_DRIVER, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_transmit NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
@@ -197,7 +186,7 @@ int soft_serial_transaction(int index) {
}
if (trans->target2initiator_buffer_size) {
- res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
+ res = sdReadTimeout(&SERIAL_USART_DRIVER, split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT));
if (res < 0) {
dprintf("serial::usart_receive NO_RESPONSE\n");
return TRANSACTION_NO_RESPONSE;
diff --git a/drivers/serial.h b/drivers/serial.h
new file mode 100644
index 0000000000..d9c2a69e96
--- /dev/null
+++ b/drivers/serial.h
@@ -0,0 +1,46 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#include
+#include
+
+#include
+
+// initiator is transaction start side
+void soft_serial_initiator_init(void);
+// target is interrupt accept side
+void soft_serial_target_init(void);
+
+// initiator result
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+int soft_serial_transaction(int sstd_index);
+
+// 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
+int soft_serial_get_and_clean_status(int sstd_index);
diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h
index 8a27fdea4d..d8a9fbd37c 100644
--- a/keyboards/draculad/config.h
+++ b/keyboards/draculad/config.h
@@ -65,3 +65,5 @@ along with this program. If not, see .
#define UNUSED_PINS
#define EE_HANDS
+
+#define LAYER_STATE_8BIT
\ No newline at end of file
diff --git a/keyboards/handwired/freoduo/rules.mk b/keyboards/handwired/freoduo/rules.mk
index e3da3753e4..d8923557d6 100644
--- a/keyboards/handwired/freoduo/rules.mk
+++ b/keyboards/handwired/freoduo/rules.mk
@@ -11,7 +11,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
# 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 this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
@@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
VELOCIKEY_ENABLE = yes
-SPLIT_KEYBOARD = yes
\ No newline at end of file
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk
index 206e836ec0..c16f3e2b87 100644
--- a/keyboards/helix/rev2/keymaps/default/rules.mk
+++ b/keyboards/helix/rev2/keymaps/default/rules.mk
@@ -5,7 +5,7 @@
# See TOP/keyboards/helix/rules.mk for a list of options that can be set.
# See TOP/docs/config_options.md for more information.
#
-LTO_ENABLE = no # if firmware size over limit, try this option
+LTO_ENABLE = yes # if firmware size over limit, try this option
# Helix Spacific Build Options
# you can uncomment and edit follows 7 Variables
diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk
index 765fa7f07a..197bad4764 100644
--- a/keyboards/keebio/iris/rev2/rules.mk
+++ b/keyboards/keebio/iris/rev2/rules.mk
@@ -32,3 +32,5 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
+
+LTO_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk
index ea92bc98f5..b64eab5a4b 100644
--- a/keyboards/keebio/iris/rev3/rules.mk
+++ b/keyboards/keebio/iris/rev3/rules.mk
@@ -33,3 +33,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
+LTO_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk
index ea92bc98f5..9bf5688da0 100644
--- a/keyboards/keebio/iris/rev4/rules.mk
+++ b/keyboards/keebio/iris/rev4/rules.mk
@@ -33,3 +33,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
+
+LTO_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk
index 2c5ad0c36b..c674e10162 100644
--- a/keyboards/keebio/quefrency/rules.mk
+++ b/keyboards/keebio/quefrency/rules.mk
@@ -19,3 +19,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = keebio/quefrency/rev1
+LTO_ENABLE = yes
diff --git a/keyboards/keebio/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk
index f95e7ae6a4..829d6a56e0 100644
--- a/keyboards/keebio/viterbi/rev2/rules.mk
+++ b/keyboards/keebio/viterbi/rev2/rules.mk
@@ -1,3 +1,5 @@
BACKLIGHT_ENABLE = yes
LAYOUTS = ortho_5x14
+
+LTO_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk
index 0b746d1720..92576d33e8 100644
--- a/keyboards/keebio/viterbi/rules.mk
+++ b/keyboards/keebio/viterbi/rules.mk
@@ -19,16 +19,16 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = yes # Commands for debug and configuration
+COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index 2cf7b70582..56d91b07fe 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -23,9 +23,11 @@ along with this program. If not, see .
#include "quantum.h"
#include "split_util.h"
#include "config.h"
-#include "transport.h"
+#include "transactions.h"
-#define ERROR_DISCONNECT_COUNT 5
+#ifndef ERROR_DISCONNECT_COUNT
+# define ERROR_DISCONNECT_COUNT 5
+#endif // ERROR_DISCONNECT_COUNT
#define ROWS_PER_HAND (MATRIX_ROWS / 2)
diff --git a/quantum/split_common/post_config.h b/quantum/split_common/post_config.h
index 4ae1d52732..a4c0a1956b 100644
--- a/quantum/split_common/post_config.h
+++ b/quantum/split_common/post_config.h
@@ -7,13 +7,4 @@
# ifndef F_SCL
# define F_SCL 100000UL // SCL frequency
# endif
-
-#else // use serial
-// When using serial, the user must define RGBLIGHT_SPLIT explicitly
-// in config.h as needed.
-// see quantum/rgblight_post_config.h
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When using serial and RGBLIGHT_SPLIT need separate transaction
-# define SERIAL_USE_MULTI_TRANSACTION
-# endif
#endif
diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h
new file mode 100644
index 0000000000..464c73478a
--- /dev/null
+++ b/quantum/split_common/transaction_id_define.h
@@ -0,0 +1,94 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+enum serial_transaction_id {
+#ifdef USE_I2C
+ I2C_EXECUTE_CALLBACK,
+#endif // USE_I2C
+
+ GET_SLAVE_MATRIX_CHECKSUM,
+ GET_SLAVE_MATRIX_DATA,
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+ PUT_MASTER_MATRIX,
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+ GET_ENCODERS_CHECKSUM,
+ GET_ENCODERS_DATA,
+#endif // ENCODER_ENABLE
+
+#ifndef DISABLE_SYNC_TIMER
+ PUT_SYNC_TIMER,
+#endif // DISABLE_SYNC_TIMER
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+ PUT_LAYER_STATE,
+ PUT_DEFAULT_LAYER_STATE,
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#ifdef SPLIT_LED_STATE_ENABLE
+ PUT_LED_STATE,
+#endif // SPLIT_LED_STATE_ENABLE
+
+#ifdef SPLIT_MODS_ENABLE
+ PUT_MODS,
+#endif // SPLIT_MODS_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+ PUT_BACKLIGHT,
+#endif // BACKLIGHT_ENABLE
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ PUT_RGBLIGHT,
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ PUT_LED_MATRIX,
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ PUT_RGB_MATRIX,
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+ PUT_WPM,
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ PUT_RPC_INFO,
+ PUT_RPC_REQ_DATA,
+ EXECUTE_RPC,
+ GET_RPC_RESP_DATA,
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+// keyboard-specific
+#ifdef SPLIT_TRANSACTION_IDS_KB
+ SPLIT_TRANSACTION_IDS_KB,
+#endif // SPLIT_TRANSACTION_IDS_KB
+
+// user/keymap-specific
+#ifdef SPLIT_TRANSACTION_IDS_USER
+ SPLIT_TRANSACTION_IDS_USER,
+#endif // SPLIT_TRANSACTION_IDS_USER
+
+ NUM_TOTAL_TRANSACTIONS
+};
+
+// Ensure we only use 5 bits for transaction
+_Static_assert(NUM_TOTAL_TRANSACTIONS <= (1 << 5), "Max number of usable transactions exceeded");
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c
new file mode 100644
index 0000000000..99a8623b3c
--- /dev/null
+++ b/quantum/split_common/transactions.c
@@ -0,0 +1,670 @@
+/* Copyright 2021 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 .
+ */
+
+#include
+#include
+
+#include "debug.h"
+#include "matrix.h"
+#include "quantum.h"
+#include "transactions.h"
+#include "transport.h"
+#include "transaction_id_define.h"
+
+#define SYNC_TIMER_OFFSET 2
+
+#ifndef FORCED_SYNC_THROTTLE_MS
+# define FORCED_SYNC_THROTTLE_MS 100
+#endif // FORCED_SYNC_THROTTLE_MS
+
+#define sizeof_member(type, member) sizeof(((type *)NULL)->member)
+
+#define trans_initiator2target_initializer_cb(member, cb) \
+ { &dummy, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb }
+#define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL)
+
+#define trans_target2initiator_initializer_cb(member, cb) \
+ { &dummy, 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb }
+#define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL)
+
+#define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0)
+#define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length)
+
+static uint8_t crc8(const void *data, size_t len) {
+ const uint8_t *p = (const uint8_t *)data;
+ uint8_t crc = 0xff;
+ size_t i, j;
+ for (i = 0; i < len; i++) {
+ crc ^= p[i];
+ for (j = 0; j < 8; j++) {
+ if ((crc & 0x80) != 0)
+ crc = (uint8_t)((crc << 1) ^ 0x31);
+ else
+ crc <<= 1;
+ }
+ }
+ return crc;
+}
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+// Forward-declare the RPC callback handlers
+void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+////////////////////////////////////////////////////
+// Helpers
+
+bool transaction_handler_master(bool okay, matrix_row_t master_matrix[], matrix_row_t slave_matrix[], const char *prefix, bool (*handler)(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])) {
+ if (okay) {
+ bool this_okay = true;
+ for (int iter = 1; iter <= 10; ++iter) {
+ if (!this_okay) {
+ for (int i = 0; i < iter * iter; ++i) {
+ wait_us(10);
+ }
+ }
+ ATOMIC_BLOCK_FORCEON { this_okay = handler(master_matrix, slave_matrix); };
+ if (this_okay) break;
+ }
+ okay &= this_okay;
+ if (!okay) {
+ dprintf("Failed to execute %s\n", prefix);
+ }
+ }
+ return okay;
+}
+
+#define TRANSACTION_HANDLER_MASTER(prefix) \
+ do { \
+ okay &= transaction_handler_master(okay, master_matrix, slave_matrix, #prefix, &prefix##_master); \
+ } while (0)
+
+#define TRANSACTION_HANDLER_SLAVE(prefix) \
+ do { \
+ ATOMIC_BLOCK_FORCEON { prefix##_slave(master_matrix, slave_matrix); }; \
+ } while (0)
+
+inline static bool read_if_checksum_mismatch(int8_t trans_id_checksum, int8_t trans_id_retrieve, uint32_t *last_update, void *destination, const void *equiv_shmem, size_t length) {
+ uint8_t curr_checksum;
+ bool okay = transport_read(trans_id_checksum, &curr_checksum, sizeof(curr_checksum));
+ if (okay && (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || curr_checksum != crc8(equiv_shmem, length))) {
+ okay &= transport_read(trans_id_retrieve, destination, length);
+ okay &= curr_checksum == crc8(equiv_shmem, length);
+ if (okay) {
+ *last_update = timer_read32();
+ }
+ } else {
+ memcpy(destination, equiv_shmem, length);
+ }
+ return okay;
+}
+
+inline static bool send_if_condition(int8_t trans_id, uint32_t *last_update, bool condition, void *source, size_t length) {
+ bool okay = true;
+ if (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || condition) {
+ okay &= transport_write(trans_id, source, length);
+ if (okay) {
+ *last_update = timer_read32();
+ }
+ }
+ return okay;
+}
+
+inline static bool send_if_data_mismatch(int8_t trans_id, uint32_t *last_update, void *source, const void *equiv_shmem, size_t length) {
+ // Just run a memcmp to compare the source and equivalent shmem location
+ return send_if_condition(trans_id, last_update, (memcmp(source, equiv_shmem, length) != 0), source, length);
+}
+
+////////////////////////////////////////////////////
+// Slave matrix
+
+static bool slave_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ static matrix_row_t last_matrix[(MATRIX_ROWS) / 2] = {0}; // last successfully-read matrix, so we can replicate if there are checksum errors
+ matrix_row_t temp_matrix[(MATRIX_ROWS) / 2]; // holding area while we test whether or not checksum is correct
+
+ bool okay = read_if_checksum_mismatch(GET_SLAVE_MATRIX_CHECKSUM, GET_SLAVE_MATRIX_DATA, &last_update, temp_matrix, split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix));
+ if (okay) {
+ // Checksum matches the received data, save as the last matrix state
+ memcpy(last_matrix, temp_matrix, sizeof(temp_matrix));
+ }
+ // Copy out the last-known-good matrix state to the slave matrix
+ memcpy(slave_matrix, last_matrix, sizeof(last_matrix));
+ return okay;
+}
+
+static void slave_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(split_shmem->smatrix.matrix, slave_matrix, sizeof(split_shmem->smatrix.matrix));
+ split_shmem->smatrix.checksum = crc8(split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix));
+}
+
+// clang-format off
+#define TRANSACTIONS_SLAVE_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(slave_matrix_handlers)
+#define TRANSACTIONS_SLAVE_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(slave_matrix_handlers)
+#define TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS \
+ [GET_SLAVE_MATRIX_CHECKSUM] = trans_target2initiator_initializer(smatrix.checksum), \
+ [GET_SLAVE_MATRIX_DATA] = trans_target2initiator_initializer(smatrix.matrix),
+// clang-format on
+
+////////////////////////////////////////////////////
+// Master matrix
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+
+static bool master_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ return send_if_data_mismatch(PUT_MASTER_MATRIX, &last_update, master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix));
+}
+
+static void master_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ // Always copy to the master matrix
+ memcpy(master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix));
+}
+
+# define TRANSACTIONS_MASTER_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(master_matrix_handlers)
+# define TRANSACTIONS_MASTER_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(master_matrix_handlers)
+# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS [PUT_MASTER_MATRIX] = trans_initiator2target_initializer(mmatrix.matrix),
+
+#else // SPLIT_TRANSPORT_MIRROR
+
+# define TRANSACTIONS_MASTER_MATRIX_MASTER()
+# define TRANSACTIONS_MASTER_MATRIX_SLAVE()
+# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS
+
+#endif // SPLIT_TRANSPORT_MIRROR
+
+////////////////////////////////////////////////////
+// Encoders
+
+#ifdef ENCODER_ENABLE
+
+static bool encoder_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t temp_state[NUMBER_OF_ENCODERS];
+
+ bool okay = read_if_checksum_mismatch(GET_ENCODERS_CHECKSUM, GET_ENCODERS_DATA, &last_update, temp_state, split_shmem->encoders.state, sizeof(temp_state));
+ if (okay) encoder_update_raw(temp_state);
+ return okay;
+}
+
+static void encoder_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ uint8_t encoder_state[NUMBER_OF_ENCODERS];
+ encoder_state_raw(encoder_state);
+ // Always prepare the encoder state for read.
+ memcpy(split_shmem->encoders.state, encoder_state, sizeof(encoder_state));
+ // Now update the checksum given that the encoders has been written to
+ split_shmem->encoders.checksum = crc8(encoder_state, sizeof(encoder_state));
+}
+
+// clang-format off
+# define TRANSACTIONS_ENCODERS_MASTER() TRANSACTION_HANDLER_MASTER(encoder_handlers)
+# define TRANSACTIONS_ENCODERS_SLAVE() TRANSACTION_HANDLER_SLAVE(encoder_handlers)
+# define TRANSACTIONS_ENCODERS_REGISTRATIONS \
+ [GET_ENCODERS_CHECKSUM] = trans_target2initiator_initializer(encoders.checksum), \
+ [GET_ENCODERS_DATA] = trans_target2initiator_initializer(encoders.state),
+// clang-format on
+
+#else // ENCODER_ENABLE
+
+# define TRANSACTIONS_ENCODERS_MASTER()
+# define TRANSACTIONS_ENCODERS_SLAVE()
+# define TRANSACTIONS_ENCODERS_REGISTRATIONS
+
+#endif // ENCODER_ENABLE
+
+////////////////////////////////////////////////////
+// Sync timer
+
+#ifndef DISABLE_SYNC_TIMER
+
+static bool sync_timer_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+
+ bool okay = true;
+ if (timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS) {
+ uint32_t sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ okay &= transport_write(PUT_SYNC_TIMER, &sync_timer, sizeof(sync_timer));
+ if (okay) {
+ last_update = timer_read32();
+ }
+ }
+ return okay;
+}
+
+static void sync_timer_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_sync_timer = 0;
+ if (last_sync_timer != split_shmem->sync_timer) {
+ last_sync_timer = split_shmem->sync_timer;
+ sync_timer_update(last_sync_timer);
+ }
+}
+
+# define TRANSACTIONS_SYNC_TIMER_MASTER() TRANSACTION_HANDLER_MASTER(sync_timer_handlers)
+# define TRANSACTIONS_SYNC_TIMER_SLAVE() TRANSACTION_HANDLER_SLAVE(sync_timer_handlers)
+# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS [PUT_SYNC_TIMER] = trans_initiator2target_initializer(sync_timer),
+
+#else // DISABLE_SYNC_TIMER
+
+# define TRANSACTIONS_SYNC_TIMER_MASTER()
+# define TRANSACTIONS_SYNC_TIMER_SLAVE()
+# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS
+
+#endif // DISABLE_SYNC_TIMER
+
+////////////////////////////////////////////////////
+// Layer state
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+static bool layer_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_layer_state_update = 0;
+ static uint32_t last_default_layer_state_update = 0;
+
+ bool okay = send_if_condition(PUT_LAYER_STATE, &last_layer_state_update, (layer_state != split_shmem->layers.layer_state), &layer_state, sizeof(layer_state));
+ if (okay) {
+ okay &= send_if_condition(PUT_DEFAULT_LAYER_STATE, &last_default_layer_state_update, (default_layer_state != split_shmem->layers.default_layer_state), &default_layer_state, sizeof(default_layer_state));
+ }
+ return okay;
+}
+
+static void layer_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ layer_state = split_shmem->layers.layer_state;
+ default_layer_state = split_shmem->layers.default_layer_state;
+}
+
+// clang-format off
+# define TRANSACTIONS_LAYER_STATE_MASTER() TRANSACTION_HANDLER_MASTER(layer_state_handlers)
+# define TRANSACTIONS_LAYER_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(layer_state_handlers)
+# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS \
+ [PUT_LAYER_STATE] = trans_initiator2target_initializer(layers.layer_state), \
+ [PUT_DEFAULT_LAYER_STATE] = trans_initiator2target_initializer(layers.default_layer_state),
+// clang-format on
+
+#else // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+# define TRANSACTIONS_LAYER_STATE_MASTER()
+# define TRANSACTIONS_LAYER_STATE_SLAVE()
+# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS
+
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+////////////////////////////////////////////////////
+// LED state
+
+#ifdef SPLIT_LED_STATE_ENABLE
+
+static bool led_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t led_state = host_keyboard_leds();
+ return send_if_data_mismatch(PUT_LED_STATE, &last_update, &led_state, &split_shmem->led_state, sizeof(led_state));
+}
+
+static void led_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ void set_split_host_keyboard_leds(uint8_t led_state);
+ set_split_host_keyboard_leds(split_shmem->led_state);
+}
+
+# define TRANSACTIONS_LED_STATE_MASTER() TRANSACTION_HANDLER_MASTER(led_state_handlers)
+# define TRANSACTIONS_LED_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(led_state_handlers)
+# define TRANSACTIONS_LED_STATE_REGISTRATIONS [PUT_LED_STATE] = trans_initiator2target_initializer(led_state),
+
+#else // SPLIT_LED_STATE_ENABLE
+
+# define TRANSACTIONS_LED_STATE_MASTER()
+# define TRANSACTIONS_LED_STATE_SLAVE()
+# define TRANSACTIONS_LED_STATE_REGISTRATIONS
+
+#endif // SPLIT_LED_STATE_ENABLE
+
+////////////////////////////////////////////////////
+// Mods
+
+#ifdef SPLIT_MODS_ENABLE
+
+static bool mods_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ bool mods_need_sync = timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS;
+ split_mods_sync_t new_mods;
+ new_mods.real_mods = get_mods();
+ if (!mods_need_sync && new_mods.real_mods != split_shmem->mods.real_mods) {
+ mods_need_sync = true;
+ }
+
+ new_mods.weak_mods = get_weak_mods();
+ if (!mods_need_sync && new_mods.weak_mods != split_shmem->mods.weak_mods) {
+ mods_need_sync = true;
+ }
+
+# ifndef NO_ACTION_ONESHOT
+ new_mods.oneshot_mods = get_oneshot_mods();
+ if (!mods_need_sync && new_mods.oneshot_mods != split_shmem->mods.oneshot_mods) {
+ mods_need_sync = true;
+ }
+# endif // NO_ACTION_ONESHOT
+
+ bool okay = true;
+ if (mods_need_sync) {
+ okay &= transport_write(PUT_MODS, &new_mods, sizeof(new_mods));
+ if (okay) {
+ last_update = timer_read32();
+ }
+ }
+
+ return okay;
+}
+
+static void mods_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ set_mods(split_shmem->mods.real_mods);
+ set_weak_mods(split_shmem->mods.weak_mods);
+# ifndef NO_ACTION_ONESHOT
+ set_oneshot_mods(split_shmem->mods.oneshot_mods);
+# endif
+}
+
+# define TRANSACTIONS_MODS_MASTER() TRANSACTION_HANDLER_MASTER(mods_handlers)
+# define TRANSACTIONS_MODS_SLAVE() TRANSACTION_HANDLER_SLAVE(mods_handlers)
+# define TRANSACTIONS_MODS_REGISTRATIONS [PUT_MODS] = trans_initiator2target_initializer(mods),
+
+#else // SPLIT_MODS_ENABLE
+
+# define TRANSACTIONS_MODS_MASTER()
+# define TRANSACTIONS_MODS_SLAVE()
+# define TRANSACTIONS_MODS_REGISTRATIONS
+
+#endif // SPLIT_MODS_ENABLE
+
+////////////////////////////////////////////////////
+// Backlight
+
+#ifdef BACKLIGHT_ENABLE
+
+static bool backlight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
+ return send_if_condition(PUT_BACKLIGHT, &last_update, (level != split_shmem->backlight_level), &level, sizeof(level));
+}
+
+static void backlight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { backlight_set(split_shmem->backlight_level); }
+
+# define TRANSACTIONS_BACKLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(backlight_handlers)
+# define TRANSACTIONS_BACKLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(backlight_handlers)
+# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS [PUT_BACKLIGHT] = trans_initiator2target_initializer(backlight_level),
+
+#else // BACKLIGHT_ENABLE
+
+# define TRANSACTIONS_BACKLIGHT_MASTER()
+# define TRANSACTIONS_BACKLIGHT_SLAVE()
+# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS
+
+#endif // BACKLIGHT_ENABLE
+
+////////////////////////////////////////////////////
+// RGBLIGHT
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+static bool rgblight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ rgblight_syncinfo_t rgblight_sync;
+ rgblight_get_syncinfo(&rgblight_sync);
+ if (send_if_condition(PUT_RGBLIGHT, &last_update, (rgblight_sync.status.change_flags != 0), &rgblight_sync, sizeof(rgblight_sync))) {
+ rgblight_clear_change_flags();
+ } else {
+ return false;
+ }
+ return true;
+}
+
+static void rgblight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ // Update the RGB with the new data
+ if (split_shmem->rgblight_sync.status.change_flags != 0) {
+ rgblight_update_sync(&split_shmem->rgblight_sync, false);
+ split_shmem->rgblight_sync.status.change_flags = 0;
+ }
+}
+
+# define TRANSACTIONS_RGBLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(rgblight_handlers)
+# define TRANSACTIONS_RGBLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(rgblight_handlers)
+# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS [PUT_RGBLIGHT] = trans_initiator2target_initializer(rgblight_sync),
+
+#else // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+# define TRANSACTIONS_RGBLIGHT_MASTER()
+# define TRANSACTIONS_RGBLIGHT_SLAVE()
+# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS
+
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+////////////////////////////////////////////////////
+// LED Matrix
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+static bool led_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ led_matrix_sync_t led_matrix_sync;
+ memcpy(&led_matrix_sync.led_matrix, &led_matrix_eeconfig, sizeof(led_eeconfig_t));
+ led_matrix_sync.led_suspend_state = led_matrix_get_suspend_state();
+ return send_if_data_mismatch(PUT_LED_MATRIX, &last_update, &led_matrix_sync, &split_shmem->led_matrix_sync, sizeof(led_matrix_sync));
+}
+
+static void led_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(&led_matrix_eeconfig, &split_shmem->led_matrix_sync.led_matrix, sizeof(led_eeconfig_t));
+ led_matrix_set_suspend_state(split_shmem->led_matrix_sync.led_suspend_state);
+}
+
+# define TRANSACTIONS_LED_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(led_matrix_handlers)
+# define TRANSACTIONS_LED_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(led_matrix_handlers)
+# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS [PUT_LED_MATRIX] = trans_initiator2target_initializer(led_matrix_sync),
+
+#else // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+# define TRANSACTIONS_LED_MATRIX_MASTER()
+# define TRANSACTIONS_LED_MATRIX_SLAVE()
+# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS
+
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+////////////////////////////////////////////////////
+// RGB Matrix
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+static bool rgb_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ rgb_matrix_sync_t rgb_matrix_sync;
+ memcpy(&rgb_matrix_sync.rgb_matrix, &rgb_matrix_config, sizeof(rgb_config_t));
+ rgb_matrix_sync.rgb_suspend_state = rgb_matrix_get_suspend_state();
+ return send_if_data_mismatch(PUT_RGB_MATRIX, &last_update, &rgb_matrix_sync, &split_shmem->rgb_matrix_sync, sizeof(rgb_matrix_sync));
+}
+
+static void rgb_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ memcpy(&rgb_matrix_config, &split_shmem->rgb_matrix_sync.rgb_matrix, sizeof(rgb_config_t));
+ rgb_matrix_set_suspend_state(split_shmem->rgb_matrix_sync.rgb_suspend_state);
+}
+
+# define TRANSACTIONS_RGB_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(rgb_matrix_handlers)
+# define TRANSACTIONS_RGB_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(rgb_matrix_handlers)
+# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS [PUT_RGB_MATRIX] = trans_initiator2target_initializer(rgb_matrix_sync),
+
+#else // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+# define TRANSACTIONS_RGB_MATRIX_MASTER()
+# define TRANSACTIONS_RGB_MATRIX_SLAVE()
+# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS
+
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+////////////////////////////////////////////////////
+// WPM
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+static bool wpm_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ static uint32_t last_update = 0;
+ uint8_t current_wpm = get_current_wpm();
+ return send_if_condition(PUT_WPM, &last_update, (current_wpm != split_shmem->current_wpm), ¤t_wpm, sizeof(current_wpm));
+}
+
+static void wpm_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { set_current_wpm(split_shmem->current_wpm); }
+
+# define TRANSACTIONS_WPM_MASTER() TRANSACTION_HANDLER_MASTER(wpm_handlers)
+# define TRANSACTIONS_WPM_SLAVE() TRANSACTION_HANDLER_SLAVE(wpm_handlers)
+# define TRANSACTIONS_WPM_REGISTRATIONS [PUT_WPM] = trans_initiator2target_initializer(current_wpm),
+
+#else // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+# define TRANSACTIONS_WPM_MASTER()
+# define TRANSACTIONS_WPM_SLAVE()
+# define TRANSACTIONS_WPM_REGISTRATIONS
+
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+////////////////////////////////////////////////////
+
+uint8_t dummy;
+split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = {
+ // Set defaults
+ [0 ...(NUM_TOTAL_TRANSACTIONS - 1)] = {NULL, 0, 0, 0, 0, 0},
+
+#ifdef USE_I2C
+ [I2C_EXECUTE_CALLBACK] = trans_initiator2target_initializer(transaction_id),
+#endif // USE_I2C
+
+ // clang-format off
+ TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS
+ TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS
+ TRANSACTIONS_ENCODERS_REGISTRATIONS
+ TRANSACTIONS_SYNC_TIMER_REGISTRATIONS
+ TRANSACTIONS_LAYER_STATE_REGISTRATIONS
+ TRANSACTIONS_LED_STATE_REGISTRATIONS
+ TRANSACTIONS_MODS_REGISTRATIONS
+ TRANSACTIONS_BACKLIGHT_REGISTRATIONS
+ TRANSACTIONS_RGBLIGHT_REGISTRATIONS
+ TRANSACTIONS_LED_MATRIX_REGISTRATIONS
+ TRANSACTIONS_RGB_MATRIX_REGISTRATIONS
+ TRANSACTIONS_WPM_REGISTRATIONS
+// clang-format on
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ [PUT_RPC_INFO] = trans_initiator2target_initializer_cb(rpc_info, slave_rpc_info_callback),
+ [PUT_RPC_REQ_DATA] = trans_initiator2target_initializer(rpc_m2s_buffer),
+ [EXECUTE_RPC] = trans_initiator2target_initializer_cb(rpc_info.transaction_id, slave_rpc_exec_callback),
+ [GET_RPC_RESP_DATA] = trans_target2initiator_initializer(rpc_s2m_buffer),
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+};
+
+bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ bool okay = true;
+ TRANSACTIONS_SLAVE_MATRIX_MASTER();
+ TRANSACTIONS_MASTER_MATRIX_MASTER();
+ TRANSACTIONS_ENCODERS_MASTER();
+ TRANSACTIONS_SYNC_TIMER_MASTER();
+ TRANSACTIONS_LAYER_STATE_MASTER();
+ TRANSACTIONS_LED_STATE_MASTER();
+ TRANSACTIONS_MODS_MASTER();
+ TRANSACTIONS_BACKLIGHT_MASTER();
+ TRANSACTIONS_RGBLIGHT_MASTER();
+ TRANSACTIONS_LED_MATRIX_MASTER();
+ TRANSACTIONS_RGB_MATRIX_MASTER();
+ TRANSACTIONS_WPM_MASTER();
+ return okay;
+}
+
+void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
+ TRANSACTIONS_SLAVE_MATRIX_SLAVE();
+ TRANSACTIONS_MASTER_MATRIX_SLAVE();
+ TRANSACTIONS_ENCODERS_SLAVE();
+ TRANSACTIONS_SYNC_TIMER_SLAVE();
+ TRANSACTIONS_LAYER_STATE_SLAVE();
+ TRANSACTIONS_LED_STATE_SLAVE();
+ TRANSACTIONS_MODS_SLAVE();
+ TRANSACTIONS_BACKLIGHT_SLAVE();
+ TRANSACTIONS_RGBLIGHT_SLAVE();
+ TRANSACTIONS_LED_MATRIX_SLAVE();
+ TRANSACTIONS_RGB_MATRIX_SLAVE();
+ TRANSACTIONS_WPM_SLAVE();
+}
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback) {
+ // Prevent invoking RPC on QMK core sync data
+ if (transaction_id <= GET_RPC_RESP_DATA) return;
+
+ // Set the callback
+ split_transaction_table[transaction_id].slave_callback = callback;
+ split_transaction_table[transaction_id].initiator2target_offset = offsetof(split_shared_memory_t, rpc_m2s_buffer);
+ split_transaction_table[transaction_id].target2initiator_offset = offsetof(split_shared_memory_t, rpc_s2m_buffer);
+}
+
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // Prevent invoking RPC on QMK core sync data
+ if (transaction_id <= GET_RPC_RESP_DATA) return false;
+ // Prevent sizing issues
+ if (initiator2target_buffer_size > RPC_M2S_BUFFER_SIZE) return false;
+ if (target2initiator_buffer_size > RPC_S2M_BUFFER_SIZE) return false;
+
+ // Prepare the metadata block
+ rpc_sync_info_t info = {.transaction_id = transaction_id, .m2s_length = initiator2target_buffer_size, .s2m_length = target2initiator_buffer_size};
+
+ // Make sure the local side knows that we're not sending the full block of data
+ split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = initiator2target_buffer_size;
+ split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = target2initiator_buffer_size;
+
+ // Run through the sequence:
+ // * set the transaction ID and lengths
+ // * send the request data
+ // * execute RPC callback
+ // * retrieve the response data
+ if (!transport_write(PUT_RPC_INFO, &info, sizeof(info))) {
+ return false;
+ }
+ if (!transport_write(PUT_RPC_REQ_DATA, initiator2target_buffer, initiator2target_buffer_size)) {
+ return false;
+ }
+ if (!transport_write(EXECUTE_RPC, &transaction_id, sizeof(transaction_id))) {
+ return false;
+ }
+ if (!transport_read(GET_RPC_RESP_DATA, target2initiator_buffer, target2initiator_buffer_size)) {
+ return false;
+ }
+ return true;
+}
+
+void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // The RPC info block contains the intended transaction ID, as well as the sizes for both inbound and outbound data.
+ // Ignore the args -- the `split_shmem` already has the info, we just need to act upon it.
+ // We must keep the `split_transaction_table` non-const, so that it is able to be modified at runtime.
+
+ split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = split_shmem->rpc_info.m2s_length;
+ split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = split_shmem->rpc_info.s2m_length;
+}
+
+void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) {
+ // We can assume that the buffer lengths are correctly set, now, given that sequentially the rpc_info callback was already executed.
+ // Go through the rpc_info and execute _that_ transaction's callback, with the scratch buffers as inputs.
+ int8_t transaction_id = split_shmem->rpc_info.transaction_id;
+ if (transaction_id < NUM_TOTAL_TRANSACTIONS) {
+ split_transaction_desc_t *trans = &split_transaction_table[transaction_id];
+ if (trans->slave_callback) {
+ trans->slave_callback(split_shmem->rpc_info.m2s_length, split_shmem->rpc_m2s_buffer, split_shmem->rpc_info.s2m_length, split_shmem->rpc_s2m_buffer);
+ }
+ }
+}
+
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
diff --git a/quantum/split_common/transactions.h b/quantum/split_common/transactions.h
new file mode 100644
index 0000000000..4306ba1d87
--- /dev/null
+++ b/quantum/split_common/transactions.h
@@ -0,0 +1,54 @@
+/* Copyright 2021 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 .
+ */
+
+#pragma once
+
+#include "stdint.h"
+#include "stdbool.h"
+
+#include "matrix.h"
+#include "transaction_id_define.h"
+#include "transport.h"
+
+typedef void (*slave_callback_t)(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+
+// Split transaction Descriptor
+typedef struct _split_transaction_desc_t {
+ uint8_t * status;
+ uint8_t initiator2target_buffer_size;
+ uint16_t initiator2target_offset;
+ uint8_t target2initiator_buffer_size;
+ uint16_t target2initiator_offset;
+ slave_callback_t slave_callback;
+} split_transaction_desc_t;
+
+// Forward declaration for the split transactions
+extern split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS];
+
+#define split_shmem_offset_ptr(offset) ((void *)(((uint8_t *)split_shmem) + (offset)))
+#define split_trans_initiator2target_buffer(trans) (split_shmem_offset_ptr((trans)->initiator2target_offset))
+#define split_trans_target2initiator_buffer(trans) (split_shmem_offset_ptr((trans)->target2initiator_offset))
+
+// returns false if valid data not received from slave
+bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+
+void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback);
+
+bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer);
+
+#define transaction_rpc_send(transaction_id, initiator2target_buffer_size, initiator2target_buffer) transaction_rpc_exec(transaction_id, initiator2target_buffer_size, initiator2target_buffer, 0, NULL)
+#define transaction_rpc_recv(transaction_id, target2initiator_buffer_size, target2initiator_buffer) transaction_rpc_exec(transaction_id, 0, NULL, target2initiator_buffer_size, target2initiator_buffer)
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c
index 9ed0f7591b..a711ef85f0 100644
--- a/quantum/split_common/transport.c
+++ b/quantum/split_common/transport.c
@@ -1,452 +1,118 @@
-#include
-#include
-
-#include "config.h"
-#include "matrix.h"
-#include "quantum.h"
-
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-#define SYNC_TIMER_OFFSET 2
-
-#ifdef RGBLIGHT_ENABLE
-# include "rgblight.h"
-#endif
-
-#ifdef BACKLIGHT_ENABLE
-# include "backlight.h"
-#endif
-
-#ifdef ENCODER_ENABLE
-# include "encoder.h"
-static pin_t encoders_pad[] = ENCODERS_PAD_A;
-# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t))
-#endif
-
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
-# include "led_matrix.h"
-#endif
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
-# include "rgb_matrix.h"
-#endif
-
-#if defined(USE_I2C)
+/* Copyright 2021 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 .
+ */
-# include "i2c_master.h"
-# include "i2c_slave.h"
-
-typedef struct _I2C_slave_buffer_t {
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
- matrix_row_t smatrix[ROWS_PER_HAND];
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- rgblight_syncinfo_t rgblight_sync;
-# endif
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} I2C_slave_buffer_t;
+#include
+#include
-static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg;
+#include "transactions.h"
+#include "transport.h"
+#include "transaction_id_define.h"
+#include "atomic_util.h"
-# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer)
-# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix)
-# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix)
-# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods)
-# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods)
-# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods)
-# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level)
-# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync)
-# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state)
-# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm)
-# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix)
-# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state)
-# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix)
-# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state)
+#ifdef USE_I2C
-# define TIMEOUT 100
+# ifndef SLAVE_I2C_TIMEOUT
+# define SLAVE_I2C_TIMEOUT 100
+# endif // SLAVE_I2C_TIMEOUT
# ifndef SLAVE_I2C_ADDRESS
# define SLAVE_I2C_ADDRESS 0x32
# endif
-// Get rows from other half over i2c
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT);
-# ifdef SPLIT_TRANSPORT_MIRROR
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT);
-# endif
+# include "i2c_master.h"
+# include "i2c_slave.h"
- // write backlight info
-# ifdef BACKLIGHT_ENABLE
- uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0;
- if (level != i2c_buffer->backlight_level) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) {
- i2c_buffer->backlight_level = level;
- }
- }
-# endif
+// Ensure the I2C buffer has enough space
+_Static_assert(sizeof(split_shared_memory_t) <= I2C_SLAVE_REG_COUNT, "split_shared_memory_t too large for I2C_SLAVE_REG_COUNT");
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- if (rgblight_get_change_flags()) {
- rgblight_syncinfo_t rgblight_sync;
- rgblight_get_syncinfo(&rgblight_sync);
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) {
- rgblight_clear_change_flags();
- }
- }
-# endif
+split_shared_memory_t *const split_shmem = (split_shared_memory_t *)i2c_slave_reg;
-# ifdef ENCODER_ENABLE
- i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT);
- encoder_update_raw(i2c_buffer->encoder_state);
-# endif
+void transport_master_init(void) { i2c_init(); }
+void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-# ifdef WPM_ENABLE
- uint8_t current_wpm = get_current_wpm();
- if (current_wpm != i2c_buffer->current_wpm) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) {
- i2c_buffer->current_wpm = current_wpm;
- }
+i2c_status_t transport_trigger_callback(int8_t id) {
+ // If there's no callback, indicate that we were successful
+ if (!split_transaction_table[id].slave_callback) {
+ return I2C_STATUS_SUCCESS;
}
-# endif
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods = get_mods();
- if (real_mods != i2c_buffer->real_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) {
- i2c_buffer->real_mods = real_mods;
+ // Kick off the "callback executor", now that data has been written to the slave
+ split_shmem->transaction_id = id;
+ split_transaction_desc_t *trans = &split_transaction_table[I2C_EXECUTE_CALLBACK];
+ return i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, SLAVE_I2C_TIMEOUT);
+}
+
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) {
+ i2c_status_t status;
+ split_transaction_desc_t *trans = &split_transaction_table[id];
+ if (initiator2target_length > 0) {
+ size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length;
+ memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len);
+ if ((status = i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) {
+ return false;
}
}
- uint8_t weak_mods = get_weak_mods();
- if (weak_mods != i2c_buffer->weak_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) {
- i2c_buffer->weak_mods = weak_mods;
- }
+ // If we need to execute a callback on the slave, do so
+ if ((status = transport_trigger_callback(id)) < 0) {
+ return false;
}
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods = get_oneshot_mods();
- if (oneshot_mods != i2c_buffer->oneshot_mods) {
- if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) {
- i2c_buffer->oneshot_mods = oneshot_mods;
+ if (target2initiator_length > 0) {
+ size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length;
+ if ((status = i2c_readReg(SLAVE_I2C_ADDRESS, trans->target2initiator_offset, split_trans_target2initiator_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) {
+ return false;
}
+ memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len);
}
-# endif
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT);
- bool suspend_state = led_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT);
- bool suspend_state = rgb_matrix_get_suspend_state();
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT);
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
- i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT);
-# endif
return true;
}
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(i2c_buffer->sync_timer);
-# endif
- // Copy matrix to I2C buffer
- memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix));
-# ifdef SPLIT_TRANSPORT_MIRROR
- memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix));
-# endif
-
-// Read Backlight Info
-# ifdef BACKLIGHT_ENABLE
- backlight_set(i2c_buffer->backlight_level);
-# endif
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- // Update the RGB with the new data
- if (i2c_buffer->rgblight_sync.status.change_flags != 0) {
- rgblight_update_sync(&i2c_buffer->rgblight_sync, false);
- i2c_buffer->rgblight_sync.status.change_flags = 0;
- }
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw(i2c_buffer->encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- set_current_wpm(i2c_buffer->current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(i2c_buffer->real_mods);
- set_weak_mods(i2c_buffer->weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(i2c_buffer->oneshot_mods);
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix));
- led_matrix_set_suspend_state(i2c_buffer->led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix));
- rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state);
-# endif
-}
-
-void transport_master_init(void) { i2c_init(); }
-
-void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); }
-
-#else // USE_SERIAL
+#else // USE_I2C
# include "serial.h"
-typedef struct _Serial_s2m_buffer_t {
- // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
- matrix_row_t smatrix[ROWS_PER_HAND];
-
-# ifdef ENCODER_ENABLE
- uint8_t encoder_state[NUMBER_OF_ENCODERS];
-# endif
-
-} Serial_s2m_buffer_t;
-
-typedef struct _Serial_m2s_buffer_t {
-# ifdef SPLIT_MODS_ENABLE
- uint8_t real_mods;
- uint8_t weak_mods;
-# ifndef NO_ACTION_ONESHOT
- uint8_t oneshot_mods;
-# endif
-# endif
-# ifndef DISABLE_SYNC_TIMER
- uint32_t sync_timer;
-# endif
-# ifdef SPLIT_TRANSPORT_MIRROR
- matrix_row_t mmatrix[ROWS_PER_HAND];
-# endif
-# ifdef BACKLIGHT_ENABLE
- uint8_t backlight_level;
-# endif
-# ifdef WPM_ENABLE
- uint8_t current_wpm;
-# endif
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_eeconfig_t led_matrix;
- bool led_suspend_state;
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_config_t rgb_matrix;
- bool rgb_suspend_state;
-# endif
-} Serial_m2s_buffer_t;
-
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-// When MCUs on both sides drive their respective RGB LED chains,
-// it is necessary to synchronize, so it is necessary to communicate RGB
-// information. In that case, define RGBLIGHT_SPLIT with info on the number
-// of LEDs on each half.
-//
-// Otherwise, if the master side MCU drives both sides RGB LED chains,
-// there is no need to communicate.
-
-typedef struct _Serial_rgblight_t {
- rgblight_syncinfo_t rgblight_sync;
-} Serial_rgblight_t;
+static split_shared_memory_t shared_memory;
+split_shared_memory_t *const split_shmem = &shared_memory;
-volatile Serial_rgblight_t serial_rgblight = {};
-uint8_t volatile status_rgblight = 0;
-# endif
-
-volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
-volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
-uint8_t volatile status0 = 0;
-
-enum serial_transaction_id {
- GET_SLAVE_MATRIX = 0,
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- PUT_RGBLIGHT,
-# endif
-};
-
-SSTD_t transactions[] = {
- [GET_SLAVE_MATRIX] =
- {
- (uint8_t *)&status0,
- sizeof(serial_m2s_buffer),
- (uint8_t *)&serial_m2s_buffer,
- sizeof(serial_s2m_buffer),
- (uint8_t *)&serial_s2m_buffer,
- },
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
- [PUT_RGBLIGHT] =
- {
- (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer
- },
-# endif
-};
-
-void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
-
-void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); }
+void transport_master_init(void) { soft_serial_initiator_init(); }
+void transport_slave_init(void) { soft_serial_target_init(); }
-# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
-
-// rgblight synchronization information communication.
-
-void transport_rgblight_master(void) {
- if (rgblight_get_change_flags()) {
- rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync);
- if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) {
- rgblight_clear_change_flags();
- }
- }
-}
-
-void transport_rgblight_slave(void) {
- if (status_rgblight == TRANSACTION_ACCEPTED) {
- rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false);
- status_rgblight = TRANSACTION_END;
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) {
+ split_transaction_desc_t *trans = &split_transaction_table[id];
+ if (initiator2target_length > 0) {
+ size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length;
+ memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len);
}
-}
-# else
-# define transport_rgblight_master()
-# define transport_rgblight_slave()
-# endif
-
-bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
-# ifndef SERIAL_USE_MULTI_TRANSACTION
- if (soft_serial_transaction() != TRANSACTION_END) {
- return false;
- }
-# else
- transport_rgblight_master();
- if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) {
+ if (soft_serial_transaction(id) != TRANSACTION_END) {
return false;
}
-# endif
- // TODO: if MATRIX_COLS > 8 change to unpack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- slave_matrix[i] = serial_s2m_buffer.smatrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- serial_m2s_buffer.mmatrix[i] = master_matrix[i];
-# endif
+ if (target2initiator_length > 0) {
+ size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length;
+ memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len);
}
-# ifdef BACKLIGHT_ENABLE
- // Write backlight level for slave to read
- serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0;
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
-
-# ifdef WPM_ENABLE
- // Write wpm to slave
- serial_m2s_buffer.current_wpm = get_current_wpm();
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- serial_m2s_buffer.real_mods = get_mods();
- serial_m2s_buffer.weak_mods = get_weak_mods();
-# ifndef NO_ACTION_ONESHOT
- serial_m2s_buffer.oneshot_mods = get_oneshot_mods();
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- serial_m2s_buffer.led_matrix = led_matrix_eeconfig;
- serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state();
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- serial_m2s_buffer.rgb_matrix = rgb_matrix_config;
- serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state();
-# endif
-
-# ifndef DISABLE_SYNC_TIMER
- serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET;
-# endif
return true;
}
-void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
- transport_rgblight_slave();
-# ifndef DISABLE_SYNC_TIMER
- sync_timer_update(serial_m2s_buffer.sync_timer);
-# endif
-
- // TODO: if MATRIX_COLS > 8 change to pack()
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- serial_s2m_buffer.smatrix[i] = slave_matrix[i];
-# ifdef SPLIT_TRANSPORT_MIRROR
- master_matrix[i] = serial_m2s_buffer.mmatrix[i];
-# endif
- }
-# ifdef BACKLIGHT_ENABLE
- backlight_set(serial_m2s_buffer.backlight_level);
-# endif
-
-# ifdef ENCODER_ENABLE
- encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state);
-# endif
+#endif // USE_I2C
-# ifdef WPM_ENABLE
- set_current_wpm(serial_m2s_buffer.current_wpm);
-# endif
-
-# ifdef SPLIT_MODS_ENABLE
- set_mods(serial_m2s_buffer.real_mods);
- set_weak_mods(serial_m2s_buffer.weak_mods);
-# ifndef NO_ACTION_ONESHOT
- set_oneshot_mods(serial_m2s_buffer.oneshot_mods);
-# endif
-# endif
-
-# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- led_matrix_eeconfig = serial_m2s_buffer.led_matrix;
- led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state);
-# endif
-# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- rgb_matrix_config = serial_m2s_buffer.rgb_matrix;
- rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state);
-# endif
-}
+bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { return transactions_master(master_matrix, slave_matrix); }
-#endif
+void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { transactions_slave(master_matrix, slave_matrix); }
\ No newline at end of file
diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h
index a9f66301bf..2e07f6b25c 100644
--- a/quantum/split_common/transport.h
+++ b/quantum/split_common/transport.h
@@ -1,10 +1,175 @@
+/* Copyright 2021 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 .
+ */
+
#pragma once
+#include "stdint.h"
+#include "stdbool.h"
+
+#include "progmem.h"
+#include "action_layer.h"
#include "matrix.h"
+#ifndef RPC_M2S_BUFFER_SIZE
+# define RPC_M2S_BUFFER_SIZE 32
+#endif // RPC_M2S_BUFFER_SIZE
+
+#ifndef RPC_S2M_BUFFER_SIZE
+# define RPC_S2M_BUFFER_SIZE 32
+#endif // RPC_S2M_BUFFER_SIZE
+
void transport_master_init(void);
void transport_slave_init(void);
// returns false if valid data not received from slave
bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]);
+
+bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length);
+
+#ifdef ENCODER_ENABLE
+# include "encoder.h"
+# define NUMBER_OF_ENCODERS (sizeof((pin_t[])ENCODERS_PAD_A) / sizeof(pin_t))
+#endif // ENCODER_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+# include "backlight.h"
+#endif // BACKLIGHT_ENABLE
+
+#ifdef RGBLIGHT_ENABLE
+# include "rgblight.h"
+#endif // RGBLIGHT_ENABLE
+
+typedef struct _split_slave_matrix_sync_t {
+ uint8_t checksum;
+ matrix_row_t matrix[(MATRIX_ROWS) / 2];
+} split_slave_matrix_sync_t;
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+typedef struct _split_master_matrix_sync_t {
+ matrix_row_t matrix[(MATRIX_ROWS) / 2];
+} split_master_matrix_sync_t;
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+typedef struct _split_slave_encoder_sync_t {
+ uint8_t checksum;
+ uint8_t state[NUMBER_OF_ENCODERS];
+} split_slave_encoder_sync_t;
+#endif // ENCODER_ENABLE
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+typedef struct _split_layers_sync_t {
+ layer_state_t layer_state;
+ layer_state_t default_layer_state;
+} split_layers_sync_t;
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+# include "led_matrix.h"
+
+typedef struct _led_matrix_sync_t {
+ led_eeconfig_t led_matrix;
+ bool led_suspend_state;
+} led_matrix_sync_t;
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+# include "rgb_matrix.h"
+
+typedef struct _rgb_matrix_sync_t {
+ rgb_config_t rgb_matrix;
+ bool rgb_suspend_state;
+} rgb_matrix_sync_t;
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+#ifdef SPLIT_MODS_ENABLE
+typedef struct _split_mods_sync_t {
+ uint8_t real_mods;
+ uint8_t weak_mods;
+# ifndef NO_ACTION_ONESHOT
+ uint8_t oneshot_mods;
+# endif // NO_ACTION_ONESHOT
+} split_mods_sync_t;
+#endif // SPLIT_MODS_ENABLE
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+typedef struct _rpc_sync_info_t {
+ int8_t transaction_id;
+ uint8_t m2s_length;
+ uint8_t s2m_length;
+} rpc_sync_info_t;
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+
+typedef struct _split_shared_memory_t {
+#ifdef USE_I2C
+ int8_t transaction_id;
+#endif // USE_I2C
+
+ split_slave_matrix_sync_t smatrix;
+
+#ifdef SPLIT_TRANSPORT_MIRROR
+ split_master_matrix_sync_t mmatrix;
+#endif // SPLIT_TRANSPORT_MIRROR
+
+#ifdef ENCODER_ENABLE
+ split_slave_encoder_sync_t encoders;
+#endif // ENCODER_ENABLE
+
+#ifndef DISABLE_SYNC_TIMER
+ uint32_t sync_timer;
+#endif // DISABLE_SYNC_TIMER
+
+#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+ split_layers_sync_t layers;
+#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE)
+
+#ifdef SPLIT_LED_STATE_ENABLE
+ uint8_t led_state;
+#endif // SPLIT_LED_STATE_ENABLE
+
+#ifdef SPLIT_MODS_ENABLE
+ split_mods_sync_t mods;
+#endif // SPLIT_MODS_ENABLE
+
+#ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
+#endif // BACKLIGHT_ENABLE
+
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ rgblight_syncinfo_t rgblight_sync;
+#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ led_matrix_sync_t led_matrix_sync;
+#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ rgb_matrix_sync_t rgb_matrix_sync;
+#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+
+#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+ uint8_t current_wpm;
+#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE)
+
+#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+ rpc_sync_info_t rpc_info;
+ uint8_t rpc_m2s_buffer[RPC_M2S_BUFFER_SIZE];
+ uint8_t rpc_s2m_buffer[RPC_S2M_BUFFER_SIZE];
+#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER)
+} split_shared_memory_t;
+
+extern split_shared_memory_t *const split_shmem;
\ No newline at end of file
diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c
index e7d92cfac6..a8b391e893 100644
--- a/tmk_core/common/host.c
+++ b/tmk_core/common/host.c
@@ -17,6 +17,7 @@ along with this program. If not, see .
#include
//#include
+#include "keyboard.h"
#include "keycode.h"
#include "host.h"
#include "util.h"
@@ -35,15 +36,20 @@ void host_set_driver(host_driver_t *d) { driver = d; }
host_driver_t *host_get_driver(void) { return driver; }
+#ifdef SPLIT_KEYBOARD
+uint8_t split_led_state = 0;
+void set_split_host_keyboard_leds(uint8_t led_state) { split_led_state = led_state; }
+#endif
+
uint8_t host_keyboard_leds(void) {
+#ifdef SPLIT_KEYBOARD
+ if (!is_keyboard_master()) return split_led_state;
+#endif
if (!driver) return 0;
return (*driver->keyboard_leds)();
}
-led_t host_keyboard_led_state(void) {
- if (!driver) return (led_t){0};
- return (led_t)((*driver->keyboard_leds)());
-}
+led_t host_keyboard_led_state(void) { return (led_t)host_keyboard_leds(); }
/* send report */
void host_keyboard_send(report_keyboard_t *report) {
--
cgit v1.2.3
From 5b7cf9fdc86bf92b465565b2be5d501ea9529f37 Mon Sep 17 00:00:00 2001
From: XScorpion2
Date: Sat, 19 Jun 2021 21:03:06 -0500
Subject: RGB Matrix eeprom write limiting (#13238)
---
quantum/led_matrix.c | 30 ++++++++++++++++--------------
quantum/rgb_matrix.c | 30 ++++++++++++++++--------------
2 files changed, 32 insertions(+), 28 deletions(-)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index 942e6d7dc8..e7e933e1dd 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -33,6 +33,14 @@ const led_point_t k_led_matrix_center = {112, 32};
const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
#endif
+// clang-format off
+#ifndef LED_MATRIX_IMMEDIATE_EEPROM
+# define led_eeconfig_update(v) led_update_eeprom |= v
+#else
+# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix()
+#endif
+// clang-format on
+
// Generic effect runners
#include "led_matrix_runners/effect_runner_dx_dy_dist.h"
#include "led_matrix_runners/effect_runner_dx_dy.h"
@@ -104,6 +112,7 @@ last_hit_t g_last_hit_tracker;
// internals
static bool suspend_state = false;
+static bool led_update_eeprom = false;
static uint8_t led_last_enable = UINT8_MAX;
static uint8_t led_last_effect = UINT8_MAX;
static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
@@ -276,6 +285,7 @@ static void led_task_timers(void) {
static void led_task_sync(void) {
// next task
+ if (led_update_eeprom) eeconfig_update_led_matrix();
if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
}
@@ -465,9 +475,7 @@ bool led_matrix_get_suspend_state(void) { return suspend_state; }
void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
led_matrix_eeconfig.enable ^= 1;
led_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable);
}
void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); }
@@ -475,7 +483,7 @@ void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); }
void led_matrix_enable(void) {
led_matrix_enable_noeeprom();
- eeconfig_update_led_matrix();
+ led_eeconfig_update(true);
}
void led_matrix_enable_noeeprom(void) {
@@ -485,7 +493,7 @@ void led_matrix_enable_noeeprom(void) {
void led_matrix_disable(void) {
led_matrix_disable_noeeprom();
- eeconfig_update_led_matrix();
+ led_eeconfig_update(true);
}
void led_matrix_disable_noeeprom(void) {
@@ -507,9 +515,7 @@ void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
led_matrix_eeconfig.mode = mode;
}
led_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode);
}
void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); }
@@ -536,9 +542,7 @@ void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) {
return;
}
led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val);
}
void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); }
@@ -556,9 +560,7 @@ void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); }
void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
led_matrix_eeconfig.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_led_matrix();
- }
+ led_eeconfig_update(write_to_eeprom);
dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed);
}
void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); }
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 27f6417975..3c5ddba939 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -31,6 +31,14 @@ const led_point_t k_rgb_matrix_center = {112, 32};
const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
#endif
+// clang-format off
+#ifndef RGB_MATRIX_IMMEDIATE_EEPROM
+# define rgb_eeconfig_update(v) rgb_update_eeprom |= v
+#else
+# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix()
+#endif
+// clang-format on
+
__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
// Generic effect runners
@@ -125,6 +133,7 @@ last_hit_t g_last_hit_tracker;
// internals
static bool suspend_state = false;
+static bool rgb_update_eeprom = false;
static uint8_t rgb_last_enable = UINT8_MAX;
static uint8_t rgb_last_effect = UINT8_MAX;
static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
@@ -311,6 +320,7 @@ static void rgb_task_timers(void) {
static void rgb_task_sync(void) {
// next task
+ if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
}
@@ -507,9 +517,7 @@ bool rgb_matrix_get_suspend_state(void) { return suspend_state; }
void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
rgb_matrix_config.enable ^= 1;
rgb_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable);
}
void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); }
@@ -517,7 +525,7 @@ void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); }
void rgb_matrix_enable(void) {
rgb_matrix_enable_noeeprom();
- eeconfig_update_rgb_matrix();
+ rgb_eeconfig_update(true);
}
void rgb_matrix_enable_noeeprom(void) {
@@ -527,7 +535,7 @@ void rgb_matrix_enable_noeeprom(void) {
void rgb_matrix_disable(void) {
rgb_matrix_disable_noeeprom();
- eeconfig_update_rgb_matrix();
+ rgb_eeconfig_update(true);
}
void rgb_matrix_disable_noeeprom(void) {
@@ -549,9 +557,7 @@ void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
rgb_matrix_config.mode = mode;
}
rgb_task_state = STARTING;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode);
}
void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); }
@@ -580,9 +586,7 @@ void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, boo
rgb_matrix_config.hsv.h = hue;
rgb_matrix_config.hsv.s = sat;
rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
}
void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); }
@@ -619,9 +623,7 @@ void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); }
void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
rgb_matrix_config.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_rgb_matrix();
- }
+ rgb_eeconfig_update(write_to_eeprom);
dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed);
}
void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); }
--
cgit v1.2.3
From 8d9f527081d3a5fc8a0286e47022a70df8eb9111 Mon Sep 17 00:00:00 2001
From: Joakim Tufvegren
Date: Sun, 20 Jun 2021 04:18:00 +0200
Subject: Add sync_timer support over serial_link (i.e. Ergodox Infinity)
(#12845)
---
quantum/serial_link/system/serial_link.c | 22 ++++++++++++++++++++++
tmk_core/common/sync_timer.c | 2 +-
tmk_core/common/sync_timer.h | 2 +-
3 files changed, 24 insertions(+), 2 deletions(-)
(limited to 'quantum')
diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c
index f77483ad8c..6363f8ff3b 100644
--- a/quantum/serial_link/system/serial_link.c
+++ b/quantum/serial_link/system/serial_link.c
@@ -29,10 +29,13 @@ SOFTWARE.
#include "serial_link/protocol/transport.h"
#include "serial_link/protocol/frame_router.h"
#include "matrix.h"
+#include "sync_timer.h"
#include
#include "print.h"
#include "config.h"
+#define SYNC_TIMER_OFFSET 2
+
static event_source_t new_data_event;
static bool serial_link_connected;
static bool is_master = false;
@@ -159,10 +162,16 @@ static matrix_object_t last_matrix = {};
SLAVE_TO_MASTER_OBJECT(keyboard_matrix, matrix_object_t);
MASTER_TO_ALL_SLAVES_OBJECT(serial_link_connected, bool);
+#ifndef DISABLE_SYNC_TIMER
+MASTER_TO_ALL_SLAVES_OBJECT(sync_timer, uint32_t);
+#endif
static remote_object_t* remote_objects[] = {
REMOTE_OBJECT(serial_link_connected),
REMOTE_OBJECT(keyboard_matrix),
+#ifndef DISABLE_SYNC_TIMER
+ REMOTE_OBJECT(sync_timer),
+#endif
};
void init_serial_link(void) {
@@ -200,14 +209,27 @@ void serial_link_update(void) {
m->rows[i] = matrix.rows[i];
}
end_write_keyboard_matrix();
+
*begin_write_serial_link_connected() = true;
end_write_serial_link_connected();
+
+#ifndef DISABLE_SYNC_TIMER
+ *begin_write_sync_timer() = sync_timer_read32() + SYNC_TIMER_OFFSET;
+ end_write_sync_timer();
+#endif
}
matrix_object_t* m = read_keyboard_matrix(0);
if (m) {
matrix_set_remote(m->rows, 0);
}
+
+#ifndef DISABLE_SYNC_TIMER
+ uint32_t* t = read_sync_timer();
+ if (t) {
+ sync_timer_update(*t);
+ }
+#endif
}
void signal_data_written(void) { chEvtBroadcast(&new_data_event); }
diff --git a/tmk_core/common/sync_timer.c b/tmk_core/common/sync_timer.c
index de24b463b6..68b92d8b43 100644
--- a/tmk_core/common/sync_timer.c
+++ b/tmk_core/common/sync_timer.c
@@ -26,7 +26,7 @@ SOFTWARE.
#include "sync_timer.h"
#include "keyboard.h"
-#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER)
+#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER)
volatile int32_t sync_timer_ms;
void sync_timer_init(void) { sync_timer_ms = 0; }
diff --git a/tmk_core/common/sync_timer.h b/tmk_core/common/sync_timer.h
index 9ddef45bb2..744e2b50d5 100644
--- a/tmk_core/common/sync_timer.h
+++ b/tmk_core/common/sync_timer.h
@@ -32,7 +32,7 @@ SOFTWARE.
extern "C" {
#endif
-#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER)
+#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER)
void sync_timer_init(void);
void sync_timer_update(uint32_t time);
uint16_t sync_timer_read(void);
--
cgit v1.2.3
From e4a2cfd85304d7088039c8480347d5525e96e0c2 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Mon, 21 Jun 2021 19:56:55 +1000
Subject: Remove dfu-util arguments from mcu_selection (#13150)
---
quantum/mcu_selection.mk | 40 ----------------------------------------
1 file changed, 40 deletions(-)
(limited to 'quantum')
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 9268c4522e..f8def7f674 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -136,10 +136,6 @@ ifneq ($(findstring STM32F042, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F0
endif
@@ -172,10 +168,6 @@ ifneq ($(findstring STM32F072, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F0
endif
@@ -208,10 +200,6 @@ ifneq ($(findstring STM32F103, $(MCU)),)
USE_FPU ?= no
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F1
endif
@@ -244,10 +232,6 @@ ifneq ($(findstring STM32F303, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F3
endif
@@ -280,10 +264,6 @@ ifneq ($(findstring STM32F401, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F4
endif
@@ -321,10 +301,6 @@ ifneq ($(findstring STM32F411, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32F4
endif
@@ -357,10 +333,6 @@ ifneq ($(findstring STM32F446, $(MCU)),)
BOARD ?= GENERIC_STM32_F446XE
USE_FPU ?= yes
-
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
endif
ifneq ($(findstring STM32G431, $(MCU)),)
@@ -391,10 +363,6 @@ ifneq ($(findstring STM32G431, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32G4
endif
@@ -427,10 +395,6 @@ ifneq ($(findstring STM32G474, $(MCU)),)
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32G4
endif
@@ -465,10 +429,6 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443))
USE_FPU ?= yes
- # Options to pass to dfu-util when flashing
- DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave
- DFU_SUFFIX_ARGS ?= -v 0483 -p DF11
-
# UF2 settings
UF2_FAMILY ?= STM32L4
endif
--
cgit v1.2.3
From 0e3ae2cde033969507355abcb85f5f7aba2ae978 Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Tue, 22 Jun 2021 09:37:28 +1000
Subject: Skip EEPROM writes once done. (#13293)
---
quantum/led_matrix.c | 1 +
quantum/rgb_matrix.c | 1 +
2 files changed, 2 insertions(+)
(limited to 'quantum')
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
index e7e933e1dd..9b6151604f 100644
--- a/quantum/led_matrix.c
+++ b/quantum/led_matrix.c
@@ -286,6 +286,7 @@ static void led_task_timers(void) {
static void led_task_sync(void) {
// next task
if (led_update_eeprom) eeconfig_update_led_matrix();
+ led_update_eeprom = false;
if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
}
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 3c5ddba939..09803c72af 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -321,6 +321,7 @@ static void rgb_task_timers(void) {
static void rgb_task_sync(void) {
// next task
if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
+ rgb_update_eeprom = false;
if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
}
--
cgit v1.2.3
From d61e5c0027e289ccf48652afa4c442342e7ccf04 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Tue, 22 Jun 2021 18:26:23 +1000
Subject: Move LED/RGB Matrix code into their own directories (#13257)
---
common_features.mk | 18 +-
quantum/led_matrix.c | 582 -------------------
quantum/led_matrix.h | 160 -----
quantum/led_matrix/animations/alpha_mods_anim.h | 24 +
quantum/led_matrix/animations/band_anim.h | 13 +
quantum/led_matrix/animations/band_pinwheel_anim.h | 10 +
quantum/led_matrix/animations/band_spiral_anim.h | 10 +
quantum/led_matrix/animations/breathing_anim.h | 19 +
.../led_matrix/animations/cycle_left_right_anim.h | 10 +
quantum/led_matrix/animations/cycle_out_in_anim.h | 10 +
quantum/led_matrix/animations/cycle_up_down_anim.h | 10 +
quantum/led_matrix/animations/dual_beacon_anim.h | 10 +
.../led_matrix/animations/led_matrix_effects.inc | 18 +
.../animations/runners/effect_runner_dx_dy.h | 16 +
.../animations/runners/effect_runner_dx_dy_dist.h | 17 +
.../animations/runners/effect_runner_i.h | 14 +
.../animations/runners/effect_runner_reactive.h | 28 +
.../runners/effect_runner_reactive_splash.h | 26 +
.../animations/runners/effect_runner_sin_cos_i.h | 16 +
.../animations/runners/led_matrix_runners.inc | 6 +
quantum/led_matrix/animations/solid_anim.h | 15 +
.../led_matrix/animations/solid_reactive_cross.h | 35 ++
.../led_matrix/animations/solid_reactive_nexus.h | 32 +
.../animations/solid_reactive_simple_anim.h | 12 +
.../led_matrix/animations/solid_reactive_wide.h | 30 +
quantum/led_matrix/animations/solid_splash_anim.h | 30 +
.../led_matrix/animations/wave_left_right_anim.h | 10 +
quantum/led_matrix/animations/wave_up_down_anim.h | 10 +
quantum/led_matrix/led_matrix.c | 577 ++++++++++++++++++
quantum/led_matrix/led_matrix.h | 160 +++++
quantum/led_matrix/led_matrix_drivers.c | 153 +++++
quantum/led_matrix/led_matrix_types.h | 97 ++++
quantum/led_matrix_animations/alpha_mods_anim.h | 24 -
quantum/led_matrix_animations/band_anim.h | 13 -
quantum/led_matrix_animations/band_pinwheel_anim.h | 10 -
quantum/led_matrix_animations/band_spiral_anim.h | 10 -
quantum/led_matrix_animations/breathing_anim.h | 19 -
.../led_matrix_animations/cycle_left_right_anim.h | 10 -
quantum/led_matrix_animations/cycle_out_in_anim.h | 10 -
quantum/led_matrix_animations/cycle_up_down_anim.h | 10 -
quantum/led_matrix_animations/dual_beacon_anim.h | 10 -
.../led_matrix_animations/led_matrix_effects.inc | 18 -
quantum/led_matrix_animations/solid_anim.h | 15 -
.../led_matrix_animations/solid_reactive_cross.h | 35 --
.../led_matrix_animations/solid_reactive_nexus.h | 32 -
.../solid_reactive_simple_anim.h | 12 -
.../led_matrix_animations/solid_reactive_wide.h | 30 -
quantum/led_matrix_animations/solid_splash_anim.h | 30 -
.../led_matrix_animations/wave_left_right_anim.h | 10 -
quantum/led_matrix_animations/wave_up_down_anim.h | 10 -
quantum/led_matrix_drivers.c | 153 -----
quantum/led_matrix_runners/effect_runner_dx_dy.h | 16 -
.../led_matrix_runners/effect_runner_dx_dy_dist.h | 17 -
quantum/led_matrix_runners/effect_runner_i.h | 14 -
.../led_matrix_runners/effect_runner_reactive.h | 28 -
.../effect_runner_reactive_splash.h | 26 -
.../led_matrix_runners/effect_runner_sin_cos_i.h | 16 -
quantum/led_matrix_types.h | 97 ----
quantum/rgb_matrix.c | 645 ---------------------
quantum/rgb_matrix.h | 228 --------
quantum/rgb_matrix/animations/alpha_mods_anim.h | 26 +
quantum/rgb_matrix/animations/breathing_anim.h | 20 +
.../animations/colorband_pinwheel_sat_anim.h | 13 +
.../animations/colorband_pinwheel_val_anim.h | 13 +
quantum/rgb_matrix/animations/colorband_sat_anim.h | 14 +
.../animations/colorband_spiral_sat_anim.h | 13 +
.../animations/colorband_spiral_val_anim.h | 13 +
quantum/rgb_matrix/animations/colorband_val_anim.h | 14 +
quantum/rgb_matrix/animations/cycle_all_anim.h | 13 +
.../rgb_matrix/animations/cycle_left_right_anim.h | 13 +
quantum/rgb_matrix/animations/cycle_out_in_anim.h | 13 +
.../rgb_matrix/animations/cycle_out_in_dual_anim.h | 15 +
.../rgb_matrix/animations/cycle_pinwheel_anim.h | 13 +
quantum/rgb_matrix/animations/cycle_spiral_anim.h | 13 +
quantum/rgb_matrix/animations/cycle_up_down_anim.h | 13 +
quantum/rgb_matrix/animations/digital_rain_anim.h | 75 +++
quantum/rgb_matrix/animations/dual_beacon_anim.h | 13 +
.../animations/gradient_left_right_anim.h | 22 +
.../rgb_matrix/animations/gradient_up_down_anim.h | 22 +
quantum/rgb_matrix/animations/hue_breathing_anim.h | 22 +
quantum/rgb_matrix/animations/hue_pendulum_anim.h | 17 +
quantum/rgb_matrix/animations/hue_wave_anim.h | 17 +
.../animations/jellybean_raindrops_anim.h | 29 +
.../rgb_matrix/animations/rainbow_beacon_anim.h | 13 +
.../animations/rainbow_moving_chevron_anim.h | 13 +
.../rgb_matrix/animations/rainbow_pinwheels_anim.h | 13 +
quantum/rgb_matrix/animations/raindrops_anim.h | 39 ++
.../rgb_matrix/animations/rgb_matrix_effects.inc | 37 ++
.../animations/runners/effect_runner_dx_dy.h | 17 +
.../animations/runners/effect_runner_dx_dy_dist.h | 18 +
.../animations/runners/effect_runner_i.h | 15 +
.../animations/runners/effect_runner_reactive.h | 29 +
.../runners/effect_runner_reactive_splash.h | 29 +
.../animations/runners/effect_runner_sin_cos_i.h | 17 +
.../animations/runners/rgb_matrix_runners.inc | 6 +
quantum/rgb_matrix/animations/solid_color_anim.h | 15 +
.../rgb_matrix/animations/solid_reactive_anim.h | 15 +
.../rgb_matrix/animations/solid_reactive_cross.h | 36 ++
.../rgb_matrix/animations/solid_reactive_nexus.h | 34 ++
.../animations/solid_reactive_simple_anim.h | 15 +
.../rgb_matrix/animations/solid_reactive_wide.h | 31 +
quantum/rgb_matrix/animations/solid_splash_anim.h | 31 +
quantum/rgb_matrix/animations/splash_anim.h | 32 +
.../rgb_matrix/animations/typing_heatmap_anim.h | 86 +++
quantum/rgb_matrix/rgb_matrix.c | 640 ++++++++++++++++++++
quantum/rgb_matrix/rgb_matrix.h | 228 ++++++++
quantum/rgb_matrix/rgb_matrix_drivers.c | 228 ++++++++
quantum/rgb_matrix/rgb_matrix_types.h | 98 ++++
quantum/rgb_matrix_animations/alpha_mods_anim.h | 26 -
quantum/rgb_matrix_animations/breathing_anim.h | 20 -
.../colorband_pinwheel_sat_anim.h | 13 -
.../colorband_pinwheel_val_anim.h | 13 -
quantum/rgb_matrix_animations/colorband_sat_anim.h | 14 -
.../colorband_spiral_sat_anim.h | 13 -
.../colorband_spiral_val_anim.h | 13 -
quantum/rgb_matrix_animations/colorband_val_anim.h | 14 -
quantum/rgb_matrix_animations/cycle_all_anim.h | 13 -
.../rgb_matrix_animations/cycle_left_right_anim.h | 13 -
quantum/rgb_matrix_animations/cycle_out_in_anim.h | 13 -
.../rgb_matrix_animations/cycle_out_in_dual_anim.h | 15 -
.../rgb_matrix_animations/cycle_pinwheel_anim.h | 13 -
quantum/rgb_matrix_animations/cycle_spiral_anim.h | 13 -
quantum/rgb_matrix_animations/cycle_up_down_anim.h | 13 -
quantum/rgb_matrix_animations/digital_rain_anim.h | 75 ---
quantum/rgb_matrix_animations/dual_beacon_anim.h | 13 -
.../gradient_left_right_anim.h | 22 -
.../rgb_matrix_animations/gradient_up_down_anim.h | 22 -
quantum/rgb_matrix_animations/hue_breathing_anim.h | 22 -
quantum/rgb_matrix_animations/hue_pendulum_anim.h | 17 -
quantum/rgb_matrix_animations/hue_wave_anim.h | 17 -
.../jellybean_raindrops_anim.h | 29 -
.../rgb_matrix_animations/rainbow_beacon_anim.h | 13 -
.../rainbow_moving_chevron_anim.h | 13 -
.../rgb_matrix_animations/rainbow_pinwheels_anim.h | 13 -
quantum/rgb_matrix_animations/raindrops_anim.h | 39 --
.../rgb_matrix_animations/rgb_matrix_effects.inc | 37 --
quantum/rgb_matrix_animations/solid_color_anim.h | 15 -
.../rgb_matrix_animations/solid_reactive_anim.h | 15 -
.../rgb_matrix_animations/solid_reactive_cross.h | 36 --
.../rgb_matrix_animations/solid_reactive_nexus.h | 34 --
.../solid_reactive_simple_anim.h | 15 -
.../rgb_matrix_animations/solid_reactive_wide.h | 31 -
quantum/rgb_matrix_animations/solid_splash_anim.h | 31 -
quantum/rgb_matrix_animations/splash_anim.h | 32 -
.../rgb_matrix_animations/typing_heatmap_anim.h | 86 ---
quantum/rgb_matrix_drivers.c | 228 --------
quantum/rgb_matrix_runners/effect_runner_dx_dy.h | 17 -
.../rgb_matrix_runners/effect_runner_dx_dy_dist.h | 18 -
quantum/rgb_matrix_runners/effect_runner_i.h | 15 -
.../rgb_matrix_runners/effect_runner_reactive.h | 29 -
.../effect_runner_reactive_splash.h | 29 -
.../rgb_matrix_runners/effect_runner_sin_cos_i.h | 17 -
quantum/rgb_matrix_types.h | 98 ----
153 files changed, 3601 insertions(+), 3593 deletions(-)
delete mode 100644 quantum/led_matrix.c
delete mode 100644 quantum/led_matrix.h
create mode 100644 quantum/led_matrix/animations/alpha_mods_anim.h
create mode 100644 quantum/led_matrix/animations/band_anim.h
create mode 100644 quantum/led_matrix/animations/band_pinwheel_anim.h
create mode 100644 quantum/led_matrix/animations/band_spiral_anim.h
create mode 100644 quantum/led_matrix/animations/breathing_anim.h
create mode 100644 quantum/led_matrix/animations/cycle_left_right_anim.h
create mode 100644 quantum/led_matrix/animations/cycle_out_in_anim.h
create mode 100644 quantum/led_matrix/animations/cycle_up_down_anim.h
create mode 100644 quantum/led_matrix/animations/dual_beacon_anim.h
create mode 100644 quantum/led_matrix/animations/led_matrix_effects.inc
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_dx_dy.h
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_i.h
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_reactive.h
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h
create mode 100644 quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h
create mode 100644 quantum/led_matrix/animations/runners/led_matrix_runners.inc
create mode 100644 quantum/led_matrix/animations/solid_anim.h
create mode 100644 quantum/led_matrix/animations/solid_reactive_cross.h
create mode 100644 quantum/led_matrix/animations/solid_reactive_nexus.h
create mode 100644 quantum/led_matrix/animations/solid_reactive_simple_anim.h
create mode 100644 quantum/led_matrix/animations/solid_reactive_wide.h
create mode 100644 quantum/led_matrix/animations/solid_splash_anim.h
create mode 100644 quantum/led_matrix/animations/wave_left_right_anim.h
create mode 100644 quantum/led_matrix/animations/wave_up_down_anim.h
create mode 100644 quantum/led_matrix/led_matrix.c
create mode 100644 quantum/led_matrix/led_matrix.h
create mode 100644 quantum/led_matrix/led_matrix_drivers.c
create mode 100644 quantum/led_matrix/led_matrix_types.h
delete mode 100644 quantum/led_matrix_animations/alpha_mods_anim.h
delete mode 100644 quantum/led_matrix_animations/band_anim.h
delete mode 100644 quantum/led_matrix_animations/band_pinwheel_anim.h
delete mode 100644 quantum/led_matrix_animations/band_spiral_anim.h
delete mode 100644 quantum/led_matrix_animations/breathing_anim.h
delete mode 100644 quantum/led_matrix_animations/cycle_left_right_anim.h
delete mode 100644 quantum/led_matrix_animations/cycle_out_in_anim.h
delete mode 100644 quantum/led_matrix_animations/cycle_up_down_anim.h
delete mode 100644 quantum/led_matrix_animations/dual_beacon_anim.h
delete mode 100644 quantum/led_matrix_animations/led_matrix_effects.inc
delete mode 100644 quantum/led_matrix_animations/solid_anim.h
delete mode 100644 quantum/led_matrix_animations/solid_reactive_cross.h
delete mode 100644 quantum/led_matrix_animations/solid_reactive_nexus.h
delete mode 100644 quantum/led_matrix_animations/solid_reactive_simple_anim.h
delete mode 100644 quantum/led_matrix_animations/solid_reactive_wide.h
delete mode 100644 quantum/led_matrix_animations/solid_splash_anim.h
delete mode 100644 quantum/led_matrix_animations/wave_left_right_anim.h
delete mode 100644 quantum/led_matrix_animations/wave_up_down_anim.h
delete mode 100644 quantum/led_matrix_drivers.c
delete mode 100644 quantum/led_matrix_runners/effect_runner_dx_dy.h
delete mode 100644 quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
delete mode 100644 quantum/led_matrix_runners/effect_runner_i.h
delete mode 100644 quantum/led_matrix_runners/effect_runner_reactive.h
delete mode 100644 quantum/led_matrix_runners/effect_runner_reactive_splash.h
delete mode 100644 quantum/led_matrix_runners/effect_runner_sin_cos_i.h
delete mode 100644 quantum/led_matrix_types.h
delete mode 100644 quantum/rgb_matrix.c
delete mode 100644 quantum/rgb_matrix.h
create mode 100644 quantum/rgb_matrix/animations/alpha_mods_anim.h
create mode 100644 quantum/rgb_matrix/animations/breathing_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_sat_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
create mode 100644 quantum/rgb_matrix/animations/colorband_val_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_all_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_left_right_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_out_in_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_spiral_anim.h
create mode 100644 quantum/rgb_matrix/animations/cycle_up_down_anim.h
create mode 100644 quantum/rgb_matrix/animations/digital_rain_anim.h
create mode 100644 quantum/rgb_matrix/animations/dual_beacon_anim.h
create mode 100644 quantum/rgb_matrix/animations/gradient_left_right_anim.h
create mode 100644 quantum/rgb_matrix/animations/gradient_up_down_anim.h
create mode 100644 quantum/rgb_matrix/animations/hue_breathing_anim.h
create mode 100644 quantum/rgb_matrix/animations/hue_pendulum_anim.h
create mode 100644 quantum/rgb_matrix/animations/hue_wave_anim.h
create mode 100644 quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
create mode 100644 quantum/rgb_matrix/animations/rainbow_beacon_anim.h
create mode 100644 quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
create mode 100644 quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
create mode 100644 quantum/rgb_matrix/animations/raindrops_anim.h
create mode 100644 quantum/rgb_matrix/animations/rgb_matrix_effects.inc
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_i.h
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
create mode 100644 quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
create mode 100644 quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc
create mode 100644 quantum/rgb_matrix/animations/solid_color_anim.h
create mode 100644 quantum/rgb_matrix/animations/solid_reactive_anim.h
create mode 100644 quantum/rgb_matrix/animations/solid_reactive_cross.h
create mode 100644 quantum/rgb_matrix/animations/solid_reactive_nexus.h
create mode 100644 quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
create mode 100644 quantum/rgb_matrix/animations/solid_reactive_wide.h
create mode 100644 quantum/rgb_matrix/animations/solid_splash_anim.h
create mode 100644 quantum/rgb_matrix/animations/splash_anim.h
create mode 100644 quantum/rgb_matrix/animations/typing_heatmap_anim.h
create mode 100644 quantum/rgb_matrix/rgb_matrix.c
create mode 100644 quantum/rgb_matrix/rgb_matrix.h
create mode 100644 quantum/rgb_matrix/rgb_matrix_drivers.c
create mode 100644 quantum/rgb_matrix/rgb_matrix_types.h
delete mode 100644 quantum/rgb_matrix_animations/alpha_mods_anim.h
delete mode 100644 quantum/rgb_matrix_animations/breathing_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_sat_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
delete mode 100644 quantum/rgb_matrix_animations/colorband_val_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_all_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_left_right_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_out_in_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_pinwheel_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_spiral_anim.h
delete mode 100644 quantum/rgb_matrix_animations/cycle_up_down_anim.h
delete mode 100644 quantum/rgb_matrix_animations/digital_rain_anim.h
delete mode 100644 quantum/rgb_matrix_animations/dual_beacon_anim.h
delete mode 100644 quantum/rgb_matrix_animations/gradient_left_right_anim.h
delete mode 100644 quantum/rgb_matrix_animations/gradient_up_down_anim.h
delete mode 100644 quantum/rgb_matrix_animations/hue_breathing_anim.h
delete mode 100644 quantum/rgb_matrix_animations/hue_pendulum_anim.h
delete mode 100644 quantum/rgb_matrix_animations/hue_wave_anim.h
delete mode 100644 quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
delete mode 100644 quantum/rgb_matrix_animations/rainbow_beacon_anim.h
delete mode 100644 quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
delete mode 100644 quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
delete mode 100644 quantum/rgb_matrix_animations/raindrops_anim.h
delete mode 100644 quantum/rgb_matrix_animations/rgb_matrix_effects.inc
delete mode 100644 quantum/rgb_matrix_animations/solid_color_anim.h
delete mode 100644 quantum/rgb_matrix_animations/solid_reactive_anim.h
delete mode 100644 quantum/rgb_matrix_animations/solid_reactive_cross.h
delete mode 100644 quantum/rgb_matrix_animations/solid_reactive_nexus.h
delete mode 100644 quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
delete mode 100644 quantum/rgb_matrix_animations/solid_reactive_wide.h
delete mode 100644 quantum/rgb_matrix_animations/solid_splash_anim.h
delete mode 100644 quantum/rgb_matrix_animations/splash_anim.h
delete mode 100644 quantum/rgb_matrix_animations/typing_heatmap_anim.h
delete mode 100644 quantum/rgb_matrix_drivers.c
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy.h
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_i.h
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive.h
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive_splash.h
delete mode 100644 quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h
delete mode 100644 quantum/rgb_matrix_types.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 9c6fc9cdf8..33a8da23d7 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -230,9 +230,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
- SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
- SRC += $(QUANTUM_DIR)/led_matrix.c
- SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
+ COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
+ SRC += process_backlight.c
+ SRC += led_matrix.c
+ SRC += led_matrix_drivers.c
CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
@@ -255,9 +258,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
OPT_DEFS += -DLIB8_ATTINY
endif
- SRC += $(QUANTUM_DIR)/color.c
- SRC += $(QUANTUM_DIR)/rgb_matrix.c
- SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
+ COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
+ SRC += color.c
+ SRC += rgb_matrix.c
+ SRC += rgb_matrix_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c
deleted file mode 100644
index 9b6151604f..0000000000
--- a/quantum/led_matrix.c
+++ /dev/null
@@ -1,582 +0,0 @@
-/* Copyright 2017 Jason Williams
- * Copyright 2017 Jack Humbert
- * Copyright 2018 Yiancar
- * Copyright 2019 Clueboard
- *
- * 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 .
- */
-
-#include "led_matrix.h"
-#include "progmem.h"
-#include "config.h"
-#include "eeprom.h"
-#include
-#include
-#include "led_tables.h"
-
-#include
-
-#ifndef LED_MATRIX_CENTER
-const led_point_t k_led_matrix_center = {112, 32};
-#else
-const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
-#endif
-
-// clang-format off
-#ifndef LED_MATRIX_IMMEDIATE_EEPROM
-# define led_eeconfig_update(v) led_update_eeprom |= v
-#else
-# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix()
-#endif
-// clang-format on
-
-// Generic effect runners
-#include "led_matrix_runners/effect_runner_dx_dy_dist.h"
-#include "led_matrix_runners/effect_runner_dx_dy.h"
-#include "led_matrix_runners/effect_runner_i.h"
-#include "led_matrix_runners/effect_runner_sin_cos_i.h"
-#include "led_matrix_runners/effect_runner_reactive.h"
-#include "led_matrix_runners/effect_runner_reactive_splash.h"
-
-// ------------------------------------------
-// -----Begin led effect includes macros-----
-#define LED_MATRIX_EFFECT(name)
-#define LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-#include "led_matrix_animations/led_matrix_effects.inc"
-#ifdef LED_MATRIX_CUSTOM_KB
-# include "led_matrix_kb.inc"
-#endif
-#ifdef LED_MATRIX_CUSTOM_USER
-# include "led_matrix_user.inc"
-#endif
-
-#undef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#undef LED_MATRIX_EFFECT
-// -----End led effect includes macros-------
-// ------------------------------------------
-
-#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT)
-# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL)
-#endif
-
-#ifndef LED_DISABLE_TIMEOUT
-# define LED_DISABLE_TIMEOUT 0
-#endif
-
-#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
-# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-#endif
-
-#if !defined(LED_MATRIX_VAL_STEP)
-# define LED_MATRIX_VAL_STEP 8
-#endif
-
-#if !defined(LED_MATRIX_SPD_STEP)
-# define LED_MATRIX_SPD_STEP 16
-#endif
-
-#if !defined(LED_MATRIX_STARTUP_MODE)
-# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID
-#endif
-
-#if !defined(LED_MATRIX_STARTUP_VAL)
-# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
-#endif
-
-#if !defined(LED_MATRIX_STARTUP_SPD)
-# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
-#endif
-
-// globals
-led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
-uint32_t g_led_timer;
-#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
-uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
-#endif // LED_MATRIX_FRAMEBUFFER_EFFECTS
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-last_hit_t g_last_hit_tracker;
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
-// internals
-static bool suspend_state = false;
-static bool led_update_eeprom = false;
-static uint8_t led_last_enable = UINT8_MAX;
-static uint8_t led_last_effect = UINT8_MAX;
-static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
-static led_task_states led_task_state = SYNCING;
-#if LED_DISABLE_TIMEOUT > 0
-static uint32_t led_anykey_timer;
-#endif // LED_DISABLE_TIMEOUT > 0
-
-// double buffers
-static uint32_t led_timer_buffer;
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-static last_hit_t last_hit_buffer;
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
-// split led matrix
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
-const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
-#endif
-
-void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
-
-void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
-
-void eeconfig_update_led_matrix_default(void) {
- dprintf("eeconfig_update_led_matrix_default\n");
- led_matrix_eeconfig.enable = 1;
- led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE;
- led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL;
- led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD;
- led_matrix_eeconfig.flags = LED_FLAG_ALL;
- eeconfig_update_led_matrix();
-}
-
-void eeconfig_debug_led_matrix(void) {
- dprintf("led_matrix_eeconfig EEPROM\n");
- dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable);
- dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode);
- dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val);
- dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed);
- dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
-}
-
-__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
-
-uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
- uint8_t led_count = led_matrix_map_row_column_to_led_kb(row, column, led_i);
- uint8_t led_index = g_led_config.matrix_co[row][column];
- if (led_index != NO_LED) {
- led_i[led_count] = led_index;
- led_count++;
- }
- return led_count;
-}
-
-void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); }
-
-void led_matrix_set_value(int index, uint8_t value) {
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- if (!is_keyboard_left() && index >= k_led_matrix_split[0])
-# ifdef USE_CIE1931_CURVE
- led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value]));
-# else
- led_matrix_driver.set_value(index - k_led_matrix_split[0], value);
-# endif
- else if (is_keyboard_left() && index < k_led_matrix_split[0])
-#endif
-#ifdef USE_CIE1931_CURVE
- led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
-#else
- led_matrix_driver.set_value(index, value);
-#endif
-}
-
-void led_matrix_set_value_all(uint8_t value) {
-#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) led_matrix_set_value(i, value);
-#else
-# ifdef USE_CIE1931_CURVE
- led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value]));
-# else
- led_matrix_driver.set_value_all(value);
-# endif
-#endif
-}
-
-void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
-#ifndef LED_MATRIX_SPLIT
- if (!is_keyboard_master()) return;
-#endif
-#if LED_DISABLE_TIMEOUT > 0
- led_anykey_timer = 0;
-#endif // LED_DISABLE_TIMEOUT > 0
-
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
- uint8_t led[LED_HITS_TO_REMEMBER];
- uint8_t led_count = 0;
-
-# if defined(LED_MATRIX_KEYRELEASES)
- if (!pressed)
-# elif defined(LED_MATRIX_KEYPRESSES)
- if (pressed)
-# endif // defined(LED_MATRIX_KEYRELEASES)
- {
- led_count = led_matrix_map_row_column_to_led(row, col, led);
- }
-
- if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
- memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
- memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
- memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
- memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
- last_hit_buffer.count--;
- }
-
- for (uint8_t i = 0; i < led_count; i++) {
- uint8_t index = last_hit_buffer.count;
- last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
- last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
- last_hit_buffer.index[index] = led[i];
- last_hit_buffer.tick[index] = 0;
- last_hit_buffer.count++;
- }
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
-#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
- if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) {
- process_led_matrix_typing_heatmap(row, col);
- }
-#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
-}
-
-static bool led_matrix_none(effect_params_t *params) {
- if (!params->init) {
- return false;
- }
-
- led_matrix_set_value_all(0);
- return false;
-}
-
-static void led_task_timers(void) {
-#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
- uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer);
-#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
- led_timer_buffer = sync_timer_read32();
-
- // Update double buffer timers
-#if LED_DISABLE_TIMEOUT > 0
- if (led_anykey_timer < UINT32_MAX) {
- if (UINT32_MAX - deltaTime < led_anykey_timer) {
- led_anykey_timer = UINT32_MAX;
- } else {
- led_anykey_timer += deltaTime;
- }
- }
-#endif // LED_DISABLE_TIMEOUT > 0
-
- // Update double buffer last hit timers
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
- uint8_t count = last_hit_buffer.count;
- for (uint8_t i = 0; i < count; ++i) {
- if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
- last_hit_buffer.count--;
- continue;
- }
- last_hit_buffer.tick[i] += deltaTime;
- }
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-}
-
-static void led_task_sync(void) {
- // next task
- if (led_update_eeprom) eeconfig_update_led_matrix();
- led_update_eeprom = false;
- if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
-}
-
-static void led_task_start(void) {
- // reset iter
- led_effect_params.iter = 0;
-
- // update double buffers
- g_led_timer = led_timer_buffer;
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
- g_last_hit_tracker = last_hit_buffer;
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
- // next task
- led_task_state = RENDERING;
-}
-
-static void led_task_render(uint8_t effect) {
- bool rendering = false;
- led_effect_params.init = (effect != led_last_effect) || (led_matrix_eeconfig.enable != led_last_enable);
- if (led_effect_params.flags != led_matrix_eeconfig.flags) {
- led_effect_params.flags = led_matrix_eeconfig.flags;
- led_matrix_set_value_all(0);
- }
-
- // each effect can opt to do calculations
- // and/or request PWM buffer updates.
- switch (effect) {
- case LED_MATRIX_NONE:
- rendering = led_matrix_none(&led_effect_params);
- break;
-
-// ---------------------------------------------
-// -----Begin led effect switch case macros-----
-#define LED_MATRIX_EFFECT(name, ...) \
- case LED_MATRIX_##name: \
- rendering = name(&led_effect_params); \
- break;
-#include "led_matrix_animations/led_matrix_effects.inc"
-#undef LED_MATRIX_EFFECT
-
-#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
-# define LED_MATRIX_EFFECT(name, ...) \
- case LED_MATRIX_CUSTOM_##name: \
- rendering = name(&led_effect_params); \
- break;
-# ifdef LED_MATRIX_CUSTOM_KB
-# include "led_matrix_kb.inc"
-# endif
-# ifdef LED_MATRIX_CUSTOM_USER
-# include "led_matrix_user.inc"
-# endif
-# undef LED_MATRIX_EFFECT
-#endif
- // -----End led effect switch case macros-------
- // ---------------------------------------------
- }
-
- led_effect_params.iter++;
-
- // next task
- if (!rendering) {
- led_task_state = FLUSHING;
- if (!led_effect_params.init && effect == LED_MATRIX_NONE) {
- // We only need to flush once if we are LED_MATRIX_NONE
- led_task_state = SYNCING;
- }
- }
-}
-
-static void led_task_flush(uint8_t effect) {
- // update last trackers after the first full render so we can init over several frames
- led_last_effect = effect;
- led_last_enable = led_matrix_eeconfig.enable;
-
- // update pwm buffers
- led_matrix_update_pwm_buffers();
-
- // next task
- led_task_state = SYNCING;
-}
-
-void led_matrix_task(void) {
- led_task_timers();
-
- // Ideally we would also stop sending zeros to the LED driver PWM buffers
- // while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight = suspend_state ||
-#if LED_DISABLE_TIMEOUT > 0
- (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
-#endif // LED_DISABLE_TIMEOUT > 0
- false;
-
- uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;
-
- switch (led_task_state) {
- case STARTING:
- led_task_start();
- break;
- case RENDERING:
- led_task_render(effect);
- if (effect) {
- led_matrix_indicators();
- led_matrix_indicators_advanced(&led_effect_params);
- }
- break;
- case FLUSHING:
- led_task_flush(effect);
- break;
- case SYNCING:
- led_task_sync();
- break;
- }
-}
-
-void led_matrix_indicators(void) {
- led_matrix_indicators_kb();
- led_matrix_indicators_user();
-}
-
-__attribute__((weak)) void led_matrix_indicators_kb(void) {}
-
-__attribute__((weak)) void led_matrix_indicators_user(void) {}
-
-void led_matrix_indicators_advanced(effect_params_t *params) {
- /* special handling is needed for "params->iter", since it's already been incremented.
- * Could move the invocations to led_task_render, but then it's missing a few checks
- * and not sure which would be better. Otherwise, this should be called from
- * led_task_render, right before the iter++ line.
- */
-#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
- uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1);
- uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT;
- if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
-#else
- uint8_t min = 0;
- uint8_t max = DRIVER_LED_TOTAL;
-#endif
- led_matrix_indicators_advanced_kb(min, max);
- led_matrix_indicators_advanced_user(min, max);
-}
-
-__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {}
-
-__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {}
-
-void led_matrix_init(void) {
- led_matrix_driver.init();
-
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
- g_last_hit_tracker.count = 0;
- for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
- g_last_hit_tracker.tick[i] = UINT16_MAX;
- }
-
- last_hit_buffer.count = 0;
- for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
- last_hit_buffer.tick[i] = UINT16_MAX;
- }
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
- if (!eeconfig_is_enabled()) {
- dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_led_matrix_default();
- }
-
- eeconfig_read_led_matrix();
- if (!led_matrix_eeconfig.mode) {
- dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_led_matrix_default();
- }
- eeconfig_debug_led_matrix(); // display current eeprom values
-}
-
-void led_matrix_set_suspend_state(bool state) {
-#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
- if (state) {
- led_matrix_set_value_all(0); // turn off all LEDs when suspending
- }
- suspend_state = state;
-#endif
-}
-
-bool led_matrix_get_suspend_state(void) { return suspend_state; }
-
-void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
- led_matrix_eeconfig.enable ^= 1;
- led_task_state = STARTING;
- led_eeconfig_update(write_to_eeprom);
- dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable);
-}
-void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); }
-void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); }
-
-void led_matrix_enable(void) {
- led_matrix_enable_noeeprom();
- led_eeconfig_update(true);
-}
-
-void led_matrix_enable_noeeprom(void) {
- if (!led_matrix_eeconfig.enable) led_task_state = STARTING;
- led_matrix_eeconfig.enable = 1;
-}
-
-void led_matrix_disable(void) {
- led_matrix_disable_noeeprom();
- led_eeconfig_update(true);
-}
-
-void led_matrix_disable_noeeprom(void) {
- if (led_matrix_eeconfig.enable) led_task_state = STARTING;
- led_matrix_eeconfig.enable = 0;
-}
-
-uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; }
-
-void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
- if (!led_matrix_eeconfig.enable) {
- return;
- }
- if (mode < 1) {
- led_matrix_eeconfig.mode = 1;
- } else if (mode >= LED_MATRIX_EFFECT_MAX) {
- led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1;
- } else {
- led_matrix_eeconfig.mode = mode;
- }
- led_task_state = STARTING;
- led_eeconfig_update(write_to_eeprom);
- dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode);
-}
-void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); }
-void led_matrix_mode(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, true); }
-
-uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; }
-
-void led_matrix_step_helper(bool write_to_eeprom) {
- uint8_t mode = led_matrix_eeconfig.mode + 1;
- led_matrix_mode_eeprom_helper((mode < LED_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom);
-}
-void led_matrix_step_noeeprom(void) { led_matrix_step_helper(false); }
-void led_matrix_step(void) { led_matrix_step_helper(true); }
-
-void led_matrix_step_reverse_helper(bool write_to_eeprom) {
- uint8_t mode = led_matrix_eeconfig.mode - 1;
- led_matrix_mode_eeprom_helper((mode < 1) ? LED_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom);
-}
-void led_matrix_step_reverse_noeeprom(void) { led_matrix_step_reverse_helper(false); }
-void led_matrix_step_reverse(void) { led_matrix_step_reverse_helper(true); }
-
-void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) {
- if (!led_matrix_eeconfig.enable) {
- return;
- }
- led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val;
- led_eeconfig_update(write_to_eeprom);
- dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val);
-}
-void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); }
-void led_matrix_set_val(uint8_t val) { led_matrix_set_val_eeprom_helper(val, true); }
-
-uint8_t led_matrix_get_val(void) { return led_matrix_eeconfig.val; }
-
-void led_matrix_increase_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qadd8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
-void led_matrix_increase_val_noeeprom(void) { led_matrix_increase_val_helper(false); }
-void led_matrix_increase_val(void) { led_matrix_increase_val_helper(true); }
-
-void led_matrix_decrease_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
-void led_matrix_decrease_val_noeeprom(void) { led_matrix_decrease_val_helper(false); }
-void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); }
-
-void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
- led_matrix_eeconfig.speed = speed;
- led_eeconfig_update(write_to_eeprom);
- dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed);
-}
-void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); }
-void led_matrix_set_speed(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, true); }
-
-uint8_t led_matrix_get_speed(void) { return led_matrix_eeconfig.speed; }
-
-void led_matrix_increase_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qadd8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
-void led_matrix_increase_speed_noeeprom(void) { led_matrix_increase_speed_helper(false); }
-void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); }
-
-void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
-void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); }
-void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); }
-
-led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; }
-
-void led_matrix_set_flags(led_flags_t flags) { led_matrix_eeconfig.flags = flags; }
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h
deleted file mode 100644
index 0984de73b3..0000000000
--- a/quantum/led_matrix.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* Copyright 2017 Jason Williams
- * Copyright 2017 Jack Humbert
- * Copyright 2018 Yiancar
- * Copyright 2019 Clueboard
- *
- * 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 .
- */
-
-#pragma once
-
-#include
-#include
-#include "led_matrix_types.h"
-#include "quantum.h"
-
-#ifdef IS31FL3731
-# include "is31fl3731-simple.h"
-#endif
-
-#ifndef LED_MATRIX_LED_FLUSH_LIMIT
-# define LED_MATRIX_LED_FLUSH_LIMIT 16
-#endif
-
-#ifndef LED_MATRIX_LED_PROCESS_LIMIT
-# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
-#endif
-
-#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
-# define LED_MATRIX_USE_LIMITS(min, max) \
- uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \
- uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \
- if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
-#else
-# define LED_MATRIX_USE_LIMITS(min, max) \
- uint8_t min = 0; \
- uint8_t max = DRIVER_LED_TOTAL;
-#endif
-
-#define LED_MATRIX_TEST_LED_FLAGS() \
- if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
-
-enum led_matrix_effects {
- LED_MATRIX_NONE = 0,
-
-// --------------------------------------
-// -----Begin led effect enum macros-----
-#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name,
-#include "led_matrix_animations/led_matrix_effects.inc"
-#undef LED_MATRIX_EFFECT
-
-#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
-# define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_CUSTOM_##name,
-# ifdef LED_MATRIX_CUSTOM_KB
-# include "led_matrix_kb.inc"
-# endif
-# ifdef LED_MATRIX_CUSTOM_USER
-# include "led_matrix_user.inc"
-# endif
-# undef LED_MATRIX_EFFECT
-#endif
- // --------------------------------------
- // -----End led effect enum macros-------
-
- LED_MATRIX_EFFECT_MAX
-};
-
-void eeconfig_update_led_matrix_default(void);
-void eeconfig_update_led_matrix(void);
-void eeconfig_debug_led_matrix(void);
-
-uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i);
-uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i);
-
-void led_matrix_set_value(int index, uint8_t value);
-void led_matrix_set_value_all(uint8_t value);
-
-void process_led_matrix(uint8_t row, uint8_t col, bool pressed);
-
-void led_matrix_task(void);
-
-// This runs after another backlight effect and replaces
-// values already set
-void led_matrix_indicators(void);
-void led_matrix_indicators_kb(void);
-void led_matrix_indicators_user(void);
-
-void led_matrix_indicators_advanced(effect_params_t *params);
-void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max);
-void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
-
-void led_matrix_init(void);
-
-void led_matrix_set_suspend_state(bool state);
-bool led_matrix_get_suspend_state(void);
-void led_matrix_toggle(void);
-void led_matrix_toggle_noeeprom(void);
-void led_matrix_enable(void);
-void led_matrix_enable_noeeprom(void);
-void led_matrix_disable(void);
-void led_matrix_disable_noeeprom(void);
-uint8_t led_matrix_is_enabled(void);
-void led_matrix_mode(uint8_t mode);
-void led_matrix_mode_noeeprom(uint8_t mode);
-uint8_t led_matrix_get_mode(void);
-void led_matrix_step(void);
-void led_matrix_step_noeeprom(void);
-void led_matrix_step_reverse(void);
-void led_matrix_step_reverse_noeeprom(void);
-void led_matrix_set_val(uint8_t val);
-void led_matrix_set_val_noeeprom(uint8_t val);
-uint8_t led_matrix_get_val(void);
-void led_matrix_increase_val(void);
-void led_matrix_increase_val_noeeprom(void);
-void led_matrix_decrease_val(void);
-void led_matrix_decrease_val_noeeprom(void);
-void led_matrix_set_speed(uint8_t speed);
-void led_matrix_set_speed_noeeprom(uint8_t speed);
-uint8_t led_matrix_get_speed(void);
-void led_matrix_increase_speed(void);
-void led_matrix_increase_speed_noeeprom(void);
-void led_matrix_decrease_speed(void);
-void led_matrix_decrease_speed_noeeprom(void);
-led_flags_t led_matrix_get_flags(void);
-void led_matrix_set_flags(led_flags_t flags);
-
-typedef struct {
- /* Perform any initialisation required for the other driver functions to work. */
- void (*init)(void);
-
- /* Set the brightness of a single LED in the buffer. */
- void (*set_value)(int index, uint8_t value);
- /* Set the brightness of all LEDS on the keyboard in the buffer. */
- void (*set_value_all)(uint8_t value);
- /* Flush any buffered changes to the hardware. */
- void (*flush)(void);
-} led_matrix_driver_t;
-
-extern const led_matrix_driver_t led_matrix_driver;
-
-extern led_eeconfig_t led_matrix_eeconfig;
-
-extern uint32_t g_led_timer;
-extern led_config_t g_led_config;
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-extern last_hit_t g_last_hit_tracker;
-#endif
-#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
-extern uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
-#endif
diff --git a/quantum/led_matrix/animations/alpha_mods_anim.h b/quantum/led_matrix/animations/alpha_mods_anim.h
new file mode 100644
index 0000000000..a4638fde69
--- /dev/null
+++ b/quantum/led_matrix/animations/alpha_mods_anim.h
@@ -0,0 +1,24 @@
+#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS
+LED_MATRIX_EFFECT(ALPHAS_MODS)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// alphas = val1, mods = val2
+bool ALPHAS_MODS(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val1 = led_matrix_eeconfig.val;
+ uint8_t val2 = val1 + led_matrix_eeconfig.speed;
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
+ led_matrix_set_value(i, val2);
+ } else {
+ led_matrix_set_value(i, val1);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
diff --git a/quantum/led_matrix/animations/band_anim.h b/quantum/led_matrix/animations/band_anim.h
new file mode 100644
index 0000000000..f9cb85dc4f
--- /dev/null
+++ b/quantum/led_matrix/animations/band_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_LED_MATRIX_BAND
+LED_MATRIX_EFFECT(BAND)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) {
+ int16_t v = val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
+ return scale8(v < 0 ? 0 : v, val);
+}
+
+bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND
diff --git a/quantum/led_matrix/animations/band_pinwheel_anim.h b/quantum/led_matrix/animations/band_pinwheel_anim.h
new file mode 100644
index 0000000000..d3144bffbf
--- /dev/null
+++ b/quantum/led_matrix/animations/band_pinwheel_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL
+LED_MATRIX_EFFECT(BAND_PINWHEEL)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); }
+
+bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
diff --git a/quantum/led_matrix/animations/band_spiral_anim.h b/quantum/led_matrix/animations/band_spiral_anim.h
new file mode 100644
index 0000000000..defbe69676
--- /dev/null
+++ b/quantum/led_matrix/animations/band_spiral_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL
+LED_MATRIX_EFFECT(BAND_SPIRAL)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); }
+
+bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
diff --git a/quantum/led_matrix/animations/breathing_anim.h b/quantum/led_matrix/animations/breathing_anim.h
new file mode 100644
index 0000000000..4f49f50690
--- /dev/null
+++ b/quantum/led_matrix/animations/breathing_anim.h
@@ -0,0 +1,19 @@
+#ifndef DISABLE_LED_MATRIX_BREATHING
+LED_MATRIX_EFFECT(BREATHING)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool BREATHING(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val = led_matrix_eeconfig.val;
+ uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 8);
+ val = scale8(abs8(sin8(time) - 128) * 2, val);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, val);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_BREATHING
diff --git a/quantum/led_matrix/animations/cycle_left_right_anim.h b/quantum/led_matrix/animations/cycle_left_right_anim.h
new file mode 100644
index 0000000000..c426d02fd5
--- /dev/null
+++ b/quantum/led_matrix/animations/cycle_left_right_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
+LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); }
+
+bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/led_matrix/animations/cycle_out_in_anim.h b/quantum/led_matrix/animations/cycle_out_in_anim.h
new file mode 100644
index 0000000000..55527556fd
--- /dev/null
+++ b/quantum/led_matrix/animations/cycle_out_in_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN
+LED_MATRIX_EFFECT(CYCLE_OUT_IN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); }
+
+bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/led_matrix/animations/cycle_up_down_anim.h b/quantum/led_matrix/animations/cycle_up_down_anim.h
new file mode 100644
index 0000000000..d97de0d1ec
--- /dev/null
+++ b/quantum/led_matrix/animations/cycle_up_down_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN
+LED_MATRIX_EFFECT(CYCLE_UP_DOWN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); }
+
+bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/led_matrix/animations/dual_beacon_anim.h b/quantum/led_matrix/animations/dual_beacon_anim.h
new file mode 100644
index 0000000000..e1bc5ae464
--- /dev/null
+++ b/quantum/led_matrix/animations/dual_beacon_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_DUAL_BEACON
+LED_MATRIX_EFFECT(DUAL_BEACON)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); }
+
+bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_DUAL_BEACON
diff --git a/quantum/led_matrix/animations/led_matrix_effects.inc b/quantum/led_matrix/animations/led_matrix_effects.inc
new file mode 100644
index 0000000000..ad1f46b242
--- /dev/null
+++ b/quantum/led_matrix/animations/led_matrix_effects.inc
@@ -0,0 +1,18 @@
+// Add your new core led matrix effect here, order determines enum order
+#include "solid_anim.h"
+#include "alpha_mods_anim.h"
+#include "breathing_anim.h"
+#include "band_anim.h"
+#include "band_pinwheel_anim.h"
+#include "band_spiral_anim.h"
+#include "cycle_left_right_anim.h"
+#include "cycle_up_down_anim.h"
+#include "cycle_out_in_anim.h"
+#include "dual_beacon_anim.h"
+#include "solid_reactive_simple_anim.h"
+#include "solid_reactive_wide.h"
+#include "solid_reactive_cross.h"
+#include "solid_reactive_nexus.h"
+#include "solid_splash_anim.h"
+#include "wave_left_right_anim.h"
+#include "wave_up_down_anim.h"
diff --git a/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h
new file mode 100644
index 0000000000..ef97631b90
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h
@@ -0,0 +1,16 @@
+#pragma once
+
+typedef uint8_t (*dx_dy_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t time);
+
+bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h
new file mode 100644
index 0000000000..5ef5938be0
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef uint8_t (*dx_dy_dist_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
+
+bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, dist, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix/animations/runners/effect_runner_i.h b/quantum/led_matrix/animations/runners/effect_runner_i.h
new file mode 100644
index 0000000000..b3015759be
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_i.h
@@ -0,0 +1,14 @@
+#pragma once
+
+typedef uint8_t (*i_f)(uint8_t val, uint8_t i, uint8_t time);
+
+bool effect_runner_i(effect_params_t* params, i_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, i, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix/animations/runners/effect_runner_reactive.h b/quantum/led_matrix/animations/runners/effect_runner_reactive.h
new file mode 100644
index 0000000000..4369ea8c49
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_reactive.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef uint8_t (*reactive_f)(uint8_t val, uint16_t offset);
+
+bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t max_tick = 65535 / led_matrix_eeconfig.speed;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ uint16_t tick = max_tick;
+ // Reverse search to find most recent key hit
+ for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
+ if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
+ tick = g_last_hit_tracker.tick[j];
+ break;
+ }
+ }
+
+ uint16_t offset = scale16by8(tick, led_matrix_eeconfig.speed);
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, offset));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h
new file mode 100644
index 0000000000..d6eb9731ee
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef uint8_t (*reactive_splash_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
+
+bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t count = g_last_hit_tracker.count;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ uint8_t val = 0;
+ for (uint8_t j = start; j < count; j++) {
+ int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
+ int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], led_matrix_eeconfig.speed);
+ val = effect_func(val, dx, dy, dist, tick);
+ }
+ led_matrix_set_value(i, scale8(val, led_matrix_eeconfig.val));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h
new file mode 100644
index 0000000000..4a5219abd1
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h
@@ -0,0 +1,16 @@
+#pragma once
+
+typedef uint8_t (*sin_cos_i_f)(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
+
+bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
+ int8_t cos_value = cos8(time) - 128;
+ int8_t sin_value = sin8(time) - 128;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, cos_value, sin_value, i, time));
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/led_matrix/animations/runners/led_matrix_runners.inc b/quantum/led_matrix/animations/runners/led_matrix_runners.inc
new file mode 100644
index 0000000000..c09022bb0f
--- /dev/null
+++ b/quantum/led_matrix/animations/runners/led_matrix_runners.inc
@@ -0,0 +1,6 @@
+#include "effect_runner_dx_dy_dist.h"
+#include "effect_runner_dx_dy.h"
+#include "effect_runner_i.h"
+#include "effect_runner_sin_cos_i.h"
+#include "effect_runner_reactive.h"
+#include "effect_runner_reactive_splash.h"
diff --git a/quantum/led_matrix/animations/solid_anim.h b/quantum/led_matrix/animations/solid_anim.h
new file mode 100644
index 0000000000..4c9e43c581
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_anim.h
@@ -0,0 +1,15 @@
+LED_MATRIX_EFFECT(SOLID)
+#ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool SOLID(effect_params_t* params) {
+ LED_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t val = led_matrix_eeconfig.val;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ LED_MATRIX_TEST_LED_FLAGS();
+ led_matrix_set_value(i, val);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/quantum/led_matrix/animations/solid_reactive_cross.h b/quantum/led_matrix/animations/solid_reactive_cross.h
new file mode 100644
index 0000000000..94425c959f
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_reactive_cross.h
@@ -0,0 +1,35 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist;
+ dx = dx < 0 ? dx * -1 : dx;
+ dy = dy < 0 ? dy * -1 : dy;
+ dx = dx * 16 > 255 ? 255 : dx * 16;
+ dy = dy * 16 > 255 ? 255 : dy * 16;
+ effect += dx > dy ? dy : dx;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
+bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); }
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
+bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); }
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/solid_reactive_nexus.h b/quantum/led_matrix/animations/solid_reactive_nexus.h
new file mode 100644
index 0000000000..504b1104f1
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_reactive_nexus.h
@@ -0,0 +1,32 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ if (dist > 72) effect = 255;
+ if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
+bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); }
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
+bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); }
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/solid_reactive_simple_anim.h b/quantum/led_matrix/animations/solid_reactive_simple_anim.h
new file mode 100644
index 0000000000..4752a84162
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_reactive_simple_anim.h
@@ -0,0 +1,12 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); }
+
+bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/solid_reactive_wide.h b/quantum/led_matrix/animations/solid_reactive_wide.h
new file mode 100644
index 0000000000..922e32fe5f
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_reactive_wide.h
@@ -0,0 +1,30 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
+LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist * 5;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
+bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); }
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
+bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); }
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/solid_splash_anim.h b/quantum/led_matrix/animations/solid_splash_anim.h
new file mode 100644
index 0000000000..d95889b813
--- /dev/null
+++ b/quantum/led_matrix/animations/solid_splash_anim.h
@@ -0,0 +1,30 @@
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH)
+
+# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
+LED_MATRIX_EFFECT(SOLID_SPLASH)
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
+LED_MATRIX_EFFECT(SOLID_MULTISPLASH)
+# endif
+
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ return qadd8(val, 255 - effect);
+}
+
+# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
+bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
+# endif
+
+# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
+bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
+# endif
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix/animations/wave_left_right_anim.h b/quantum/led_matrix/animations/wave_left_right_anim.h
new file mode 100644
index 0000000000..8579f1b45f
--- /dev/null
+++ b/quantum/led_matrix/animations/wave_left_right_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
+LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); }
+
+bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
diff --git a/quantum/led_matrix/animations/wave_up_down_anim.h b/quantum/led_matrix/animations/wave_up_down_anim.h
new file mode 100644
index 0000000000..635c608414
--- /dev/null
+++ b/quantum/led_matrix/animations/wave_up_down_anim.h
@@ -0,0 +1,10 @@
+#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN
+LED_MATRIX_EFFECT(WAVE_UP_DOWN)
+# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); }
+
+bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); }
+
+# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
new file mode 100644
index 0000000000..32788866c5
--- /dev/null
+++ b/quantum/led_matrix/led_matrix.c
@@ -0,0 +1,577 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2017 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2019 Clueboard
+ *
+ * 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 .
+ */
+
+#include "led_matrix.h"
+#include "progmem.h"
+#include "config.h"
+#include "eeprom.h"
+#include
+#include
+#include "led_tables.h"
+
+#include
+
+#ifndef LED_MATRIX_CENTER
+const led_point_t k_led_matrix_center = {112, 32};
+#else
+const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
+#endif
+
+// clang-format off
+#ifndef LED_MATRIX_IMMEDIATE_EEPROM
+# define led_eeconfig_update(v) led_update_eeprom |= v
+#else
+# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix()
+#endif
+// clang-format on
+
+// Generic effect runners
+#include "led_matrix_runners.inc"
+
+// ------------------------------------------
+// -----Begin led effect includes macros-----
+#define LED_MATRIX_EFFECT(name)
+#define LED_MATRIX_CUSTOM_EFFECT_IMPLS
+
+#include "led_matrix_effects.inc"
+#ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+#endif
+#ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+#endif
+
+#undef LED_MATRIX_CUSTOM_EFFECT_IMPLS
+#undef LED_MATRIX_EFFECT
+// -----End led effect includes macros-------
+// ------------------------------------------
+
+#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT)
+# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL)
+#endif
+
+#ifndef LED_DISABLE_TIMEOUT
+# define LED_DISABLE_TIMEOUT 0
+#endif
+
+#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
+# undef LED_MATRIX_MAXIMUM_BRIGHTNESS
+# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
+#endif
+
+#if !defined(LED_MATRIX_VAL_STEP)
+# define LED_MATRIX_VAL_STEP 8
+#endif
+
+#if !defined(LED_MATRIX_SPD_STEP)
+# define LED_MATRIX_SPD_STEP 16
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_MODE)
+# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_VAL)
+# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#if !defined(LED_MATRIX_STARTUP_SPD)
+# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
+#endif
+
+// globals
+led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
+uint32_t g_led_timer;
+#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
+uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
+#endif // LED_MATRIX_FRAMEBUFFER_EFFECTS
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+last_hit_t g_last_hit_tracker;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+// internals
+static bool suspend_state = false;
+static bool led_update_eeprom = false;
+static uint8_t led_last_enable = UINT8_MAX;
+static uint8_t led_last_effect = UINT8_MAX;
+static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false};
+static led_task_states led_task_state = SYNCING;
+#if LED_DISABLE_TIMEOUT > 0
+static uint32_t led_anykey_timer;
+#endif // LED_DISABLE_TIMEOUT > 0
+
+// double buffers
+static uint32_t led_timer_buffer;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+static last_hit_t last_hit_buffer;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+// split led matrix
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
+#endif
+
+void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
+
+void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); }
+
+void eeconfig_update_led_matrix_default(void) {
+ dprintf("eeconfig_update_led_matrix_default\n");
+ led_matrix_eeconfig.enable = 1;
+ led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE;
+ led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL;
+ led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD;
+ led_matrix_eeconfig.flags = LED_FLAG_ALL;
+ eeconfig_update_led_matrix();
+}
+
+void eeconfig_debug_led_matrix(void) {
+ dprintf("led_matrix_eeconfig EEPROM\n");
+ dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable);
+ dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode);
+ dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val);
+ dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed);
+ dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
+}
+
+__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
+
+uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
+ uint8_t led_count = led_matrix_map_row_column_to_led_kb(row, column, led_i);
+ uint8_t led_index = g_led_config.matrix_co[row][column];
+ if (led_index != NO_LED) {
+ led_i[led_count] = led_index;
+ led_count++;
+ }
+ return led_count;
+}
+
+void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); }
+
+void led_matrix_set_value(int index, uint8_t value) {
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ if (!is_keyboard_left() && index >= k_led_matrix_split[0])
+# ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value]));
+# else
+ led_matrix_driver.set_value(index - k_led_matrix_split[0], value);
+# endif
+ else if (is_keyboard_left() && index < k_led_matrix_split[0])
+#endif
+#ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value]));
+#else
+ led_matrix_driver.set_value(index, value);
+#endif
+}
+
+void led_matrix_set_value_all(uint8_t value) {
+#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT)
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) led_matrix_set_value(i, value);
+#else
+# ifdef USE_CIE1931_CURVE
+ led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value]));
+# else
+ led_matrix_driver.set_value_all(value);
+# endif
+#endif
+}
+
+void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
+#ifndef LED_MATRIX_SPLIT
+ if (!is_keyboard_master()) return;
+#endif
+#if LED_DISABLE_TIMEOUT > 0
+ led_anykey_timer = 0;
+#endif // LED_DISABLE_TIMEOUT > 0
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = 0;
+
+# if defined(LED_MATRIX_KEYRELEASES)
+ if (!pressed)
+# elif defined(LED_MATRIX_KEYPRESSES)
+ if (pressed)
+# endif // defined(LED_MATRIX_KEYRELEASES)
+ {
+ led_count = led_matrix_map_row_column_to_led(row, col, led);
+ }
+
+ if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
+ memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
+ memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
+ last_hit_buffer.count--;
+ }
+
+ for (uint8_t i = 0; i < led_count; i++) {
+ uint8_t index = last_hit_buffer.count;
+ last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
+ last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
+ last_hit_buffer.index[index] = led[i];
+ last_hit_buffer.tick[index] = 0;
+ last_hit_buffer.count++;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
+ if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) {
+ process_led_matrix_typing_heatmap(row, col);
+ }
+#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP)
+}
+
+static bool led_matrix_none(effect_params_t *params) {
+ if (!params->init) {
+ return false;
+ }
+
+ led_matrix_set_value_all(0);
+ return false;
+}
+
+static void led_task_timers(void) {
+#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
+ uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer);
+#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0
+ led_timer_buffer = sync_timer_read32();
+
+ // Update double buffer timers
+#if LED_DISABLE_TIMEOUT > 0
+ if (led_anykey_timer < UINT32_MAX) {
+ if (UINT32_MAX - deltaTime < led_anykey_timer) {
+ led_anykey_timer = UINT32_MAX;
+ } else {
+ led_anykey_timer += deltaTime;
+ }
+ }
+#endif // LED_DISABLE_TIMEOUT > 0
+
+ // Update double buffer last hit timers
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t count = last_hit_buffer.count;
+ for (uint8_t i = 0; i < count; ++i) {
+ if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
+ last_hit_buffer.count--;
+ continue;
+ }
+ last_hit_buffer.tick[i] += deltaTime;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+}
+
+static void led_task_sync(void) {
+ // next task
+ if (led_update_eeprom) eeconfig_update_led_matrix();
+ led_update_eeprom = false;
+ if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
+}
+
+static void led_task_start(void) {
+ // reset iter
+ led_effect_params.iter = 0;
+
+ // update double buffers
+ g_led_timer = led_timer_buffer;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker = last_hit_buffer;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+ // next task
+ led_task_state = RENDERING;
+}
+
+static void led_task_render(uint8_t effect) {
+ bool rendering = false;
+ led_effect_params.init = (effect != led_last_effect) || (led_matrix_eeconfig.enable != led_last_enable);
+ if (led_effect_params.flags != led_matrix_eeconfig.flags) {
+ led_effect_params.flags = led_matrix_eeconfig.flags;
+ led_matrix_set_value_all(0);
+ }
+
+ // each effect can opt to do calculations
+ // and/or request PWM buffer updates.
+ switch (effect) {
+ case LED_MATRIX_NONE:
+ rendering = led_matrix_none(&led_effect_params);
+ break;
+
+// ---------------------------------------------
+// -----Begin led effect switch case macros-----
+#define LED_MATRIX_EFFECT(name, ...) \
+ case LED_MATRIX_##name: \
+ rendering = name(&led_effect_params); \
+ break;
+#include "led_matrix_effects.inc"
+#undef LED_MATRIX_EFFECT
+
+#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
+# define LED_MATRIX_EFFECT(name, ...) \
+ case LED_MATRIX_CUSTOM_##name: \
+ rendering = name(&led_effect_params); \
+ break;
+# ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+# endif
+# ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+# endif
+# undef LED_MATRIX_EFFECT
+#endif
+ // -----End led effect switch case macros-------
+ // ---------------------------------------------
+ }
+
+ led_effect_params.iter++;
+
+ // next task
+ if (!rendering) {
+ led_task_state = FLUSHING;
+ if (!led_effect_params.init && effect == LED_MATRIX_NONE) {
+ // We only need to flush once if we are LED_MATRIX_NONE
+ led_task_state = SYNCING;
+ }
+ }
+}
+
+static void led_task_flush(uint8_t effect) {
+ // update last trackers after the first full render so we can init over several frames
+ led_last_effect = effect;
+ led_last_enable = led_matrix_eeconfig.enable;
+
+ // update pwm buffers
+ led_matrix_update_pwm_buffers();
+
+ // next task
+ led_task_state = SYNCING;
+}
+
+void led_matrix_task(void) {
+ led_task_timers();
+
+ // Ideally we would also stop sending zeros to the LED driver PWM buffers
+ // while suspended and just do a software shutdown. This is a cheap hack for now.
+ bool suspend_backlight = suspend_state ||
+#if LED_DISABLE_TIMEOUT > 0
+ (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) ||
+#endif // LED_DISABLE_TIMEOUT > 0
+ false;
+
+ uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode;
+
+ switch (led_task_state) {
+ case STARTING:
+ led_task_start();
+ break;
+ case RENDERING:
+ led_task_render(effect);
+ if (effect) {
+ led_matrix_indicators();
+ led_matrix_indicators_advanced(&led_effect_params);
+ }
+ break;
+ case FLUSHING:
+ led_task_flush(effect);
+ break;
+ case SYNCING:
+ led_task_sync();
+ break;
+ }
+}
+
+void led_matrix_indicators(void) {
+ led_matrix_indicators_kb();
+ led_matrix_indicators_user();
+}
+
+__attribute__((weak)) void led_matrix_indicators_kb(void) {}
+
+__attribute__((weak)) void led_matrix_indicators_user(void) {}
+
+void led_matrix_indicators_advanced(effect_params_t *params) {
+ /* special handling is needed for "params->iter", since it's already been incremented.
+ * Could move the invocations to led_task_render, but then it's missing a few checks
+ * and not sure which would be better. Otherwise, this should be called from
+ * led_task_render, right before the iter++ line.
+ */
+#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+ uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1);
+ uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT;
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+ uint8_t min = 0;
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+ led_matrix_indicators_advanced_kb(min, max);
+ led_matrix_indicators_advanced_user(min, max);
+}
+
+__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {}
+
+__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {}
+
+void led_matrix_init(void) {
+ led_matrix_driver.init();
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ g_last_hit_tracker.tick[i] = UINT16_MAX;
+ }
+
+ last_hit_buffer.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ last_hit_buffer.tick[i] = UINT16_MAX;
+ }
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+ if (!eeconfig_is_enabled()) {
+ dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
+ eeconfig_init();
+ eeconfig_update_led_matrix_default();
+ }
+
+ eeconfig_read_led_matrix();
+ if (!led_matrix_eeconfig.mode) {
+ dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");
+ eeconfig_update_led_matrix_default();
+ }
+ eeconfig_debug_led_matrix(); // display current eeprom values
+}
+
+void led_matrix_set_suspend_state(bool state) {
+#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
+ if (state) {
+ led_matrix_set_value_all(0); // turn off all LEDs when suspending
+ }
+ suspend_state = state;
+#endif
+}
+
+bool led_matrix_get_suspend_state(void) { return suspend_state; }
+
+void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
+ led_matrix_eeconfig.enable ^= 1;
+ led_task_state = STARTING;
+ led_eeconfig_update(write_to_eeprom);
+ dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable);
+}
+void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); }
+void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); }
+
+void led_matrix_enable(void) {
+ led_matrix_enable_noeeprom();
+ led_eeconfig_update(true);
+}
+
+void led_matrix_enable_noeeprom(void) {
+ if (!led_matrix_eeconfig.enable) led_task_state = STARTING;
+ led_matrix_eeconfig.enable = 1;
+}
+
+void led_matrix_disable(void) {
+ led_matrix_disable_noeeprom();
+ led_eeconfig_update(true);
+}
+
+void led_matrix_disable_noeeprom(void) {
+ if (led_matrix_eeconfig.enable) led_task_state = STARTING;
+ led_matrix_eeconfig.enable = 0;
+}
+
+uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; }
+
+void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
+ if (!led_matrix_eeconfig.enable) {
+ return;
+ }
+ if (mode < 1) {
+ led_matrix_eeconfig.mode = 1;
+ } else if (mode >= LED_MATRIX_EFFECT_MAX) {
+ led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1;
+ } else {
+ led_matrix_eeconfig.mode = mode;
+ }
+ led_task_state = STARTING;
+ led_eeconfig_update(write_to_eeprom);
+ dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode);
+}
+void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); }
+void led_matrix_mode(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, true); }
+
+uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; }
+
+void led_matrix_step_helper(bool write_to_eeprom) {
+ uint8_t mode = led_matrix_eeconfig.mode + 1;
+ led_matrix_mode_eeprom_helper((mode < LED_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom);
+}
+void led_matrix_step_noeeprom(void) { led_matrix_step_helper(false); }
+void led_matrix_step(void) { led_matrix_step_helper(true); }
+
+void led_matrix_step_reverse_helper(bool write_to_eeprom) {
+ uint8_t mode = led_matrix_eeconfig.mode - 1;
+ led_matrix_mode_eeprom_helper((mode < 1) ? LED_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom);
+}
+void led_matrix_step_reverse_noeeprom(void) { led_matrix_step_reverse_helper(false); }
+void led_matrix_step_reverse(void) { led_matrix_step_reverse_helper(true); }
+
+void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) {
+ if (!led_matrix_eeconfig.enable) {
+ return;
+ }
+ led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val;
+ led_eeconfig_update(write_to_eeprom);
+ dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val);
+}
+void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); }
+void led_matrix_set_val(uint8_t val) { led_matrix_set_val_eeprom_helper(val, true); }
+
+uint8_t led_matrix_get_val(void) { return led_matrix_eeconfig.val; }
+
+void led_matrix_increase_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qadd8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
+void led_matrix_increase_val_noeeprom(void) { led_matrix_increase_val_helper(false); }
+void led_matrix_increase_val(void) { led_matrix_increase_val_helper(true); }
+
+void led_matrix_decrease_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); }
+void led_matrix_decrease_val_noeeprom(void) { led_matrix_decrease_val_helper(false); }
+void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); }
+
+void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
+ led_matrix_eeconfig.speed = speed;
+ led_eeconfig_update(write_to_eeprom);
+ dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed);
+}
+void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); }
+void led_matrix_set_speed(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, true); }
+
+uint8_t led_matrix_get_speed(void) { return led_matrix_eeconfig.speed; }
+
+void led_matrix_increase_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qadd8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
+void led_matrix_increase_speed_noeeprom(void) { led_matrix_increase_speed_helper(false); }
+void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); }
+
+void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); }
+void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); }
+void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); }
+
+led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; }
+
+void led_matrix_set_flags(led_flags_t flags) { led_matrix_eeconfig.flags = flags; }
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h
new file mode 100644
index 0000000000..6f85854fbe
--- /dev/null
+++ b/quantum/led_matrix/led_matrix.h
@@ -0,0 +1,160 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2017 Jack Humbert
+ * Copyright 2018 Yiancar
+ * Copyright 2019 Clueboard
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include
+#include
+#include "led_matrix_types.h"
+#include "quantum.h"
+
+#ifdef IS31FL3731
+# include "is31fl3731-simple.h"
+#endif
+
+#ifndef LED_MATRIX_LED_FLUSH_LIMIT
+# define LED_MATRIX_LED_FLUSH_LIMIT 16
+#endif
+
+#ifndef LED_MATRIX_LED_PROCESS_LIMIT
+# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
+#endif
+
+#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+# define LED_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \
+ uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+# define LED_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = 0; \
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+
+#define LED_MATRIX_TEST_LED_FLAGS() \
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
+
+enum led_matrix_effects {
+ LED_MATRIX_NONE = 0,
+
+// --------------------------------------
+// -----Begin led effect enum macros-----
+#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name,
+#include "led_matrix_effects.inc"
+#undef LED_MATRIX_EFFECT
+
+#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER)
+# define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_CUSTOM_##name,
+# ifdef LED_MATRIX_CUSTOM_KB
+# include "led_matrix_kb.inc"
+# endif
+# ifdef LED_MATRIX_CUSTOM_USER
+# include "led_matrix_user.inc"
+# endif
+# undef LED_MATRIX_EFFECT
+#endif
+ // --------------------------------------
+ // -----End led effect enum macros-------
+
+ LED_MATRIX_EFFECT_MAX
+};
+
+void eeconfig_update_led_matrix_default(void);
+void eeconfig_update_led_matrix(void);
+void eeconfig_debug_led_matrix(void);
+
+uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i);
+uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i);
+
+void led_matrix_set_value(int index, uint8_t value);
+void led_matrix_set_value_all(uint8_t value);
+
+void process_led_matrix(uint8_t row, uint8_t col, bool pressed);
+
+void led_matrix_task(void);
+
+// This runs after another backlight effect and replaces
+// values already set
+void led_matrix_indicators(void);
+void led_matrix_indicators_kb(void);
+void led_matrix_indicators_user(void);
+
+void led_matrix_indicators_advanced(effect_params_t *params);
+void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max);
+void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
+
+void led_matrix_init(void);
+
+void led_matrix_set_suspend_state(bool state);
+bool led_matrix_get_suspend_state(void);
+void led_matrix_toggle(void);
+void led_matrix_toggle_noeeprom(void);
+void led_matrix_enable(void);
+void led_matrix_enable_noeeprom(void);
+void led_matrix_disable(void);
+void led_matrix_disable_noeeprom(void);
+uint8_t led_matrix_is_enabled(void);
+void led_matrix_mode(uint8_t mode);
+void led_matrix_mode_noeeprom(uint8_t mode);
+uint8_t led_matrix_get_mode(void);
+void led_matrix_step(void);
+void led_matrix_step_noeeprom(void);
+void led_matrix_step_reverse(void);
+void led_matrix_step_reverse_noeeprom(void);
+void led_matrix_set_val(uint8_t val);
+void led_matrix_set_val_noeeprom(uint8_t val);
+uint8_t led_matrix_get_val(void);
+void led_matrix_increase_val(void);
+void led_matrix_increase_val_noeeprom(void);
+void led_matrix_decrease_val(void);
+void led_matrix_decrease_val_noeeprom(void);
+void led_matrix_set_speed(uint8_t speed);
+void led_matrix_set_speed_noeeprom(uint8_t speed);
+uint8_t led_matrix_get_speed(void);
+void led_matrix_increase_speed(void);
+void led_matrix_increase_speed_noeeprom(void);
+void led_matrix_decrease_speed(void);
+void led_matrix_decrease_speed_noeeprom(void);
+led_flags_t led_matrix_get_flags(void);
+void led_matrix_set_flags(led_flags_t flags);
+
+typedef struct {
+ /* Perform any initialisation required for the other driver functions to work. */
+ void (*init)(void);
+
+ /* Set the brightness of a single LED in the buffer. */
+ void (*set_value)(int index, uint8_t value);
+ /* Set the brightness of all LEDS on the keyboard in the buffer. */
+ void (*set_value_all)(uint8_t value);
+ /* Flush any buffered changes to the hardware. */
+ void (*flush)(void);
+} led_matrix_driver_t;
+
+extern const led_matrix_driver_t led_matrix_driver;
+
+extern led_eeconfig_t led_matrix_eeconfig;
+
+extern uint32_t g_led_timer;
+extern led_config_t g_led_config;
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+extern last_hit_t g_last_hit_tracker;
+#endif
+#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS
+extern uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
+#endif
diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c
new file mode 100644
index 0000000000..1d46b2c506
--- /dev/null
+++ b/quantum/led_matrix/led_matrix_drivers.c
@@ -0,0 +1,153 @@
+/* Copyright 2018 James Laird-Wah
+ * Copyright 2019 Clueboard
+ *
+ * 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 .
+ */
+
+#include "led_matrix.h"
+
+/* Each driver needs to define a struct:
+ *
+ * const led_matrix_driver_t led_matrix_driver;
+ *
+ * All members must be provided. Keyboard custom drivers must define this
+ * in their own files.
+ */
+
+#if defined(IS31FL3731) || defined(IS31FL3733)
+
+# include "i2c_master.h"
+
+static void init(void) {
+ i2c_init();
+# ifdef IS31FL3731
+# ifdef LED_DRIVER_ADDR_1
+ IS31FL3731_init(LED_DRIVER_ADDR_1);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+ IS31FL3731_init(LED_DRIVER_ADDR_2);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+ IS31FL3731_init(LED_DRIVER_ADDR_3);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+ IS31FL3731_init(LED_DRIVER_ADDR_4);
+# endif
+# else
+# ifdef LED_DRIVER_ADDR_1
+# ifndef LED_DRIVER_SYNC_1
+# define LED_DRIVER_SYNC_1 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+# ifndef LED_DRIVER_SYNC_2
+# define LED_DRIVER_SYNC_2 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+# ifndef LED_DRIVER_SYNC_3
+# define LED_DRIVER_SYNC_3 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+# ifndef LED_DRIVER_SYNC_4
+# define LED_DRIVER_SYNC_4 0
+# endif
+ IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4);
+# endif
+# endif
+
+ for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
+# ifdef IS31FL3731
+ IS31FL3731_set_led_control_register(index, true);
+# else
+ IS31FL3733_set_led_control_register(index, true);
+# endif
+ }
+// This actually updates the LED drivers
+# ifdef IS31FL3731
+# ifdef LED_DRIVER_ADDR_1
+ IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+ IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+ IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+ IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# else
+# ifdef LED_DRIVER_ADDR_1
+ IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+ IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+ IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+ IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+}
+
+static void flush(void) {
+# ifdef IS31FL3731
+# ifdef LED_DRIVER_ADDR_1
+ IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+ IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+ IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+ IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# else
+# ifdef LED_DRIVER_ADDR_1
+ IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
+# endif
+# ifdef LED_DRIVER_ADDR_2
+ IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
+# endif
+# ifdef LED_DRIVER_ADDR_3
+ IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
+# endif
+# ifdef LED_DRIVER_ADDR_4
+ IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
+# endif
+# endif
+}
+
+const led_matrix_driver_t led_matrix_driver = {
+ .init = init,
+ .flush = flush,
+# ifdef IS31FL3731
+ .set_value = IS31FL3731_set_value,
+ .set_value_all = IS31FL3731_set_value_all,
+# else
+ .set_value = IS31FL3733_set_value,
+ .set_value_all = IS31FL3733_set_value_all,
+# endif
+};
+
+#endif
diff --git a/quantum/led_matrix/led_matrix_types.h b/quantum/led_matrix/led_matrix_types.h
new file mode 100644
index 0000000000..61cdbd9b8e
--- /dev/null
+++ b/quantum/led_matrix/led_matrix_types.h
@@ -0,0 +1,97 @@
+/* Copyright 2021
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include
+#include
+
+#if defined(__GNUC__)
+# define PACKED __attribute__((__packed__))
+#else
+# define PACKED
+#endif
+
+#if defined(_MSC_VER)
+# pragma pack(push, 1)
+#endif
+
+#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
+# define LED_MATRIX_KEYREACTIVE_ENABLED
+#endif
+
+// Last led hit
+#ifndef LED_HITS_TO_REMEMBER
+# define LED_HITS_TO_REMEMBER 8
+#endif // LED_HITS_TO_REMEMBER
+
+#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
+typedef struct PACKED {
+ uint8_t count;
+ uint8_t x[LED_HITS_TO_REMEMBER];
+ uint8_t y[LED_HITS_TO_REMEMBER];
+ uint8_t index[LED_HITS_TO_REMEMBER];
+ uint16_t tick[LED_HITS_TO_REMEMBER];
+} last_hit_t;
+#endif // LED_MATRIX_KEYREACTIVE_ENABLED
+
+typedef enum led_task_states { STARTING, RENDERING, FLUSHING, SYNCING } led_task_states;
+
+typedef uint8_t led_flags_t;
+
+typedef struct PACKED {
+ uint8_t iter;
+ led_flags_t flags;
+ bool init;
+} effect_params_t;
+
+typedef struct PACKED {
+ uint8_t x;
+ uint8_t y;
+} led_point_t;
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
+
+#define LED_FLAG_ALL 0xFF
+#define LED_FLAG_NONE 0x00
+#define LED_FLAG_MODIFIER 0x01
+#define LED_FLAG_KEYLIGHT 0x04
+#define LED_FLAG_INDICATOR 0x08
+
+#define NO_LED 255
+
+typedef struct PACKED {
+ uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
+ led_point_t point[DRIVER_LED_TOTAL];
+ uint8_t flags[DRIVER_LED_TOTAL];
+} led_config_t;
+
+typedef union {
+ uint32_t raw;
+ struct PACKED {
+ uint8_t enable : 2;
+ uint8_t mode : 6;
+ uint16_t reserved;
+ uint8_t val;
+ uint8_t speed; // EECONFIG needs to be increased to support this
+ led_flags_t flags;
+ };
+} led_eeconfig_t;
+
+#if defined(_MSC_VER)
+# pragma pack(pop)
+#endif
diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix_animations/alpha_mods_anim.h
deleted file mode 100644
index 6f69f6892b..0000000000
--- a/quantum/led_matrix_animations/alpha_mods_anim.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS
-LED_MATRIX_EFFECT(ALPHAS_MODS)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// alphas = val1, mods = val2
-bool ALPHAS_MODS(effect_params_t* params) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t val1 = led_matrix_eeconfig.val;
- uint8_t val2 = val1 + led_matrix_eeconfig.speed;
-
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
- led_matrix_set_value(i, val2);
- } else {
- led_matrix_set_value(i, val1);
- }
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_ALPHAS_MODS
diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix_animations/band_anim.h
deleted file mode 100644
index 523dba1b78..0000000000
--- a/quantum/led_matrix_animations/band_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_BAND
-LED_MATRIX_EFFECT(BAND)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) {
- int16_t v = val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
- return scale8(v < 0 ? 0 : v, val);
-}
-
-bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND
diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix_animations/band_pinwheel_anim.h
deleted file mode 100644
index fb3b835cad..0000000000
--- a/quantum/led_matrix_animations/band_pinwheel_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL
-LED_MATRIX_EFFECT(BAND_PINWHEEL)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); }
-
-bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL
diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix_animations/band_spiral_anim.h
deleted file mode 100644
index fca22aad9c..0000000000
--- a/quantum/led_matrix_animations/band_spiral_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL
-LED_MATRIX_EFFECT(BAND_SPIRAL)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); }
-
-bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BAND_SPIRAL
diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix_animations/breathing_anim.h
deleted file mode 100644
index 00310e3f65..0000000000
--- a/quantum/led_matrix_animations/breathing_anim.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_BREATHING
-LED_MATRIX_EFFECT(BREATHING)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool BREATHING(effect_params_t* params) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t val = led_matrix_eeconfig.val;
- uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 8);
- val = scale8(abs8(sin8(time) - 128) * 2, val);
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- led_matrix_set_value(i, val);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_BREATHING
diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix_animations/cycle_left_right_anim.h
deleted file mode 100644
index 51e81d57ca..0000000000
--- a/quantum/led_matrix_animations/cycle_left_right_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
-LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); }
-
-bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h
deleted file mode 100644
index f62061552c..0000000000
--- a/quantum/led_matrix_animations/cycle_out_in_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN
-LED_MATRIX_EFFECT(CYCLE_OUT_IN)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); }
-
-bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix_animations/cycle_up_down_anim.h
deleted file mode 100644
index bd1d125672..0000000000
--- a/quantum/led_matrix_animations/cycle_up_down_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN
-LED_MATRIX_EFFECT(CYCLE_UP_DOWN)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); }
-
-bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix_animations/dual_beacon_anim.h
deleted file mode 100644
index 9b8a7877c9..0000000000
--- a/quantum/led_matrix_animations/dual_beacon_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_DUAL_BEACON
-LED_MATRIX_EFFECT(DUAL_BEACON)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); }
-
-bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_DUAL_BEACON
diff --git a/quantum/led_matrix_animations/led_matrix_effects.inc b/quantum/led_matrix_animations/led_matrix_effects.inc
deleted file mode 100644
index 67237c5683..0000000000
--- a/quantum/led_matrix_animations/led_matrix_effects.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-// Add your new core led matrix effect here, order determins enum order, requires "led_matrix_animations/ directory
-#include "led_matrix_animations/solid_anim.h"
-#include "led_matrix_animations/alpha_mods_anim.h"
-#include "led_matrix_animations/breathing_anim.h"
-#include "led_matrix_animations/band_anim.h"
-#include "led_matrix_animations/band_pinwheel_anim.h"
-#include "led_matrix_animations/band_spiral_anim.h"
-#include "led_matrix_animations/cycle_left_right_anim.h"
-#include "led_matrix_animations/cycle_up_down_anim.h"
-#include "led_matrix_animations/cycle_out_in_anim.h"
-#include "led_matrix_animations/dual_beacon_anim.h"
-#include "led_matrix_animations/solid_reactive_simple_anim.h"
-#include "led_matrix_animations/solid_reactive_wide.h"
-#include "led_matrix_animations/solid_reactive_cross.h"
-#include "led_matrix_animations/solid_reactive_nexus.h"
-#include "led_matrix_animations/solid_splash_anim.h"
-#include "led_matrix_animations/wave_left_right_anim.h"
-#include "led_matrix_animations/wave_up_down_anim.h"
diff --git a/quantum/led_matrix_animations/solid_anim.h b/quantum/led_matrix_animations/solid_anim.h
deleted file mode 100644
index 4c9e43c581..0000000000
--- a/quantum/led_matrix_animations/solid_anim.h
+++ /dev/null
@@ -1,15 +0,0 @@
-LED_MATRIX_EFFECT(SOLID)
-#ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool SOLID(effect_params_t* params) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t val = led_matrix_eeconfig.val;
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- led_matrix_set_value(i, val);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix_animations/solid_reactive_cross.h
deleted file mode 100644
index f402d99b37..0000000000
--- a/quantum/led_matrix_animations/solid_reactive_cross.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
-LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
-LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
-# endif
-
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick + dist;
- dx = dx < 0 ? dx * -1 : dx;
- dy = dy < 0 ? dy * -1 : dy;
- dx = dx * 16 > 255 ? 255 : dx * 16;
- dy = dy * 16 > 255 ? 255 : dy * 16;
- effect += dx > dy ? dy : dx;
- if (effect > 255) effect = 255;
- return qadd8(val, 255 - effect);
-}
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
-bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); }
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
-bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); }
-# endif
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix_animations/solid_reactive_nexus.h
deleted file mode 100644
index 4d0d252263..0000000000
--- a/quantum/led_matrix_animations/solid_reactive_nexus.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
-LED_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
-LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
-# endif
-
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick - dist;
- if (effect > 255) effect = 255;
- if (dist > 72) effect = 255;
- if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255;
- return qadd8(val, 255 - effect);
-}
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
-bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); }
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
-bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); }
-# endif
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix_animations/solid_reactive_simple_anim.h
deleted file mode 100644
index 30e2527f60..0000000000
--- a/quantum/led_matrix_animations/solid_reactive_simple_anim.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
-LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); }
-
-bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix_animations/solid_reactive_wide.h
deleted file mode 100644
index 34a230c259..0000000000
--- a/quantum/led_matrix_animations/solid_reactive_wide.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
-LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
-LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
-# endif
-
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick + dist * 5;
- if (effect > 255) effect = 255;
- return qadd8(val, 255 - effect);
-}
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
-bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); }
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
-bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); }
-# endif
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix_animations/solid_splash_anim.h
deleted file mode 100644
index 4f6ba3d343..0000000000
--- a/quantum/led_matrix_animations/solid_splash_anim.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH)
-
-# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
-LED_MATRIX_EFFECT(SOLID_SPLASH)
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
-LED_MATRIX_EFFECT(SOLID_MULTISPLASH)
-# endif
-
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick - dist;
- if (effect > 255) effect = 255;
- return qadd8(val, 255 - effect);
-}
-
-# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH
-bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
-# endif
-
-# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH
-bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
-# endif
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH)
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix_animations/wave_left_right_anim.h
deleted file mode 100644
index 736f22ddc5..0000000000
--- a/quantum/led_matrix_animations/wave_left_right_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
-LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); }
-
-bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT
diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix_animations/wave_up_down_anim.h
deleted file mode 100644
index 3cab0597d4..0000000000
--- a/quantum/led_matrix_animations/wave_up_down_anim.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN
-LED_MATRIX_EFFECT(WAVE_UP_DOWN)
-# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); }
-
-bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); }
-
-# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c
deleted file mode 100644
index 1d46b2c506..0000000000
--- a/quantum/led_matrix_drivers.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Copyright 2018 James Laird-Wah
- * Copyright 2019 Clueboard
- *
- * 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 .
- */
-
-#include "led_matrix.h"
-
-/* Each driver needs to define a struct:
- *
- * const led_matrix_driver_t led_matrix_driver;
- *
- * All members must be provided. Keyboard custom drivers must define this
- * in their own files.
- */
-
-#if defined(IS31FL3731) || defined(IS31FL3733)
-
-# include "i2c_master.h"
-
-static void init(void) {
- i2c_init();
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
- IS31FL3731_init(LED_DRIVER_ADDR_1);
-# endif
-# ifdef LED_DRIVER_ADDR_2
- IS31FL3731_init(LED_DRIVER_ADDR_2);
-# endif
-# ifdef LED_DRIVER_ADDR_3
- IS31FL3731_init(LED_DRIVER_ADDR_3);
-# endif
-# ifdef LED_DRIVER_ADDR_4
- IS31FL3731_init(LED_DRIVER_ADDR_4);
-# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
-# ifndef LED_DRIVER_SYNC_1
-# define LED_DRIVER_SYNC_1 0
-# endif
- IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1);
-# endif
-# ifdef LED_DRIVER_ADDR_2
-# ifndef LED_DRIVER_SYNC_2
-# define LED_DRIVER_SYNC_2 0
-# endif
- IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2);
-# endif
-# ifdef LED_DRIVER_ADDR_3
-# ifndef LED_DRIVER_SYNC_3
-# define LED_DRIVER_SYNC_3 0
-# endif
- IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3);
-# endif
-# ifdef LED_DRIVER_ADDR_4
-# ifndef LED_DRIVER_SYNC_4
-# define LED_DRIVER_SYNC_4 0
-# endif
- IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4);
-# endif
-# endif
-
- for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
-# ifdef IS31FL3731
- IS31FL3731_set_led_control_register(index, true);
-# else
- IS31FL3733_set_led_control_register(index, true);
-# endif
- }
-// This actually updates the LED drivers
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
- IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
- IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
- IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
- IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
-# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
- IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
- IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
- IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
- IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3);
-# endif
-# endif
-}
-
-static void flush(void) {
-# ifdef IS31FL3731
-# ifdef LED_DRIVER_ADDR_1
- IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
- IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
- IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
- IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
-# endif
-# else
-# ifdef LED_DRIVER_ADDR_1
- IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0);
-# endif
-# ifdef LED_DRIVER_ADDR_2
- IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1);
-# endif
-# ifdef LED_DRIVER_ADDR_3
- IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2);
-# endif
-# ifdef LED_DRIVER_ADDR_4
- IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3);
-# endif
-# endif
-}
-
-const led_matrix_driver_t led_matrix_driver = {
- .init = init,
- .flush = flush,
-# ifdef IS31FL3731
- .set_value = IS31FL3731_set_value,
- .set_value_all = IS31FL3731_set_value_all,
-# else
- .set_value = IS31FL3733_set_value,
- .set_value_all = IS31FL3733_set_value_all,
-# endif
-};
-
-#endif
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy.h b/quantum/led_matrix_runners/effect_runner_dx_dy.h
deleted file mode 100644
index ef97631b90..0000000000
--- a/quantum/led_matrix_runners/effect_runner_dx_dy.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-typedef uint8_t (*dx_dy_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t time);
-
-bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
- int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
- led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, time));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
deleted file mode 100644
index 5ef5938be0..0000000000
--- a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-typedef uint8_t (*dx_dy_dist_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
-
-bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 2);
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- int16_t dx = g_led_config.point[i].x - k_led_matrix_center.x;
- int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y;
- uint8_t dist = sqrt16(dx * dx + dy * dy);
- led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, dist, time));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/led_matrix_runners/effect_runner_i.h b/quantum/led_matrix_runners/effect_runner_i.h
deleted file mode 100644
index b3015759be..0000000000
--- a/quantum/led_matrix_runners/effect_runner_i.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-typedef uint8_t (*i_f)(uint8_t val, uint8_t i, uint8_t time);
-
-bool effect_runner_i(effect_params_t* params, i_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, i, time));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/led_matrix_runners/effect_runner_reactive.h b/quantum/led_matrix_runners/effect_runner_reactive.h
deleted file mode 100644
index 4369ea8c49..0000000000
--- a/quantum/led_matrix_runners/effect_runner_reactive.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#pragma once
-
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-
-typedef uint8_t (*reactive_f)(uint8_t val, uint16_t offset);
-
-bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint16_t max_tick = 65535 / led_matrix_eeconfig.speed;
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- uint16_t tick = max_tick;
- // Reverse search to find most recent key hit
- for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
- if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
- tick = g_last_hit_tracker.tick[j];
- break;
- }
- }
-
- uint16_t offset = scale16by8(tick, led_matrix_eeconfig.speed);
- led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, offset));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_runners/effect_runner_reactive_splash.h b/quantum/led_matrix_runners/effect_runner_reactive_splash.h
deleted file mode 100644
index d6eb9731ee..0000000000
--- a/quantum/led_matrix_runners/effect_runner_reactive_splash.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-
-typedef uint8_t (*reactive_splash_f)(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
-
-bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t count = g_last_hit_tracker.count;
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- uint8_t val = 0;
- for (uint8_t j = start; j < count; j++) {
- int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
- int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
- uint8_t dist = sqrt16(dx * dx + dy * dy);
- uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], led_matrix_eeconfig.speed);
- val = effect_func(val, dx, dy, dist, tick);
- }
- led_matrix_set_value(i, scale8(val, led_matrix_eeconfig.val));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h b/quantum/led_matrix_runners/effect_runner_sin_cos_i.h
deleted file mode 100644
index 4a5219abd1..0000000000
--- a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-typedef uint8_t (*sin_cos_i_f)(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
-
-bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
- LED_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 4);
- int8_t cos_value = cos8(time) - 128;
- int8_t sin_value = sin8(time) - 128;
- for (uint8_t i = led_min; i < led_max; i++) {
- LED_MATRIX_TEST_LED_FLAGS();
- led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, cos_value, sin_value, i, time));
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix_types.h
deleted file mode 100644
index 61cdbd9b8e..0000000000
--- a/quantum/led_matrix_types.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright 2021
- *
- * 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 .
- */
-
-#pragma once
-
-#include
-#include
-
-#if defined(__GNUC__)
-# define PACKED __attribute__((__packed__))
-#else
-# define PACKED
-#endif
-
-#if defined(_MSC_VER)
-# pragma pack(push, 1)
-#endif
-
-#if defined(LED_MATRIX_KEYPRESSES) || defined(LED_MATRIX_KEYRELEASES)
-# define LED_MATRIX_KEYREACTIVE_ENABLED
-#endif
-
-// Last led hit
-#ifndef LED_HITS_TO_REMEMBER
-# define LED_HITS_TO_REMEMBER 8
-#endif // LED_HITS_TO_REMEMBER
-
-#ifdef LED_MATRIX_KEYREACTIVE_ENABLED
-typedef struct PACKED {
- uint8_t count;
- uint8_t x[LED_HITS_TO_REMEMBER];
- uint8_t y[LED_HITS_TO_REMEMBER];
- uint8_t index[LED_HITS_TO_REMEMBER];
- uint16_t tick[LED_HITS_TO_REMEMBER];
-} last_hit_t;
-#endif // LED_MATRIX_KEYREACTIVE_ENABLED
-
-typedef enum led_task_states { STARTING, RENDERING, FLUSHING, SYNCING } led_task_states;
-
-typedef uint8_t led_flags_t;
-
-typedef struct PACKED {
- uint8_t iter;
- led_flags_t flags;
- bool init;
-} effect_params_t;
-
-typedef struct PACKED {
- uint8_t x;
- uint8_t y;
-} led_point_t;
-
-#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
-#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
-
-#define LED_FLAG_ALL 0xFF
-#define LED_FLAG_NONE 0x00
-#define LED_FLAG_MODIFIER 0x01
-#define LED_FLAG_KEYLIGHT 0x04
-#define LED_FLAG_INDICATOR 0x08
-
-#define NO_LED 255
-
-typedef struct PACKED {
- uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
- led_point_t point[DRIVER_LED_TOTAL];
- uint8_t flags[DRIVER_LED_TOTAL];
-} led_config_t;
-
-typedef union {
- uint32_t raw;
- struct PACKED {
- uint8_t enable : 2;
- uint8_t mode : 6;
- uint16_t reserved;
- uint8_t val;
- uint8_t speed; // EECONFIG needs to be increased to support this
- led_flags_t flags;
- };
-} led_eeconfig_t;
-
-#if defined(_MSC_VER)
-# pragma pack(pop)
-#endif
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
deleted file mode 100644
index 09803c72af..0000000000
--- a/quantum/rgb_matrix.c
+++ /dev/null
@@ -1,645 +0,0 @@
-/* Copyright 2017 Jason Williams
- * Copyright 2017 Jack Humbert
- * Copyright 2018 Yiancar
- *
- * 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 .
- */
-
-#include "rgb_matrix.h"
-#include "progmem.h"
-#include "config.h"
-#include "eeprom.h"
-#include
-#include
-
-#include
-
-#ifndef RGB_MATRIX_CENTER
-const led_point_t k_rgb_matrix_center = {112, 32};
-#else
-const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
-#endif
-
-// clang-format off
-#ifndef RGB_MATRIX_IMMEDIATE_EEPROM
-# define rgb_eeconfig_update(v) rgb_update_eeprom |= v
-#else
-# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix()
-#endif
-// clang-format on
-
-__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
-
-// Generic effect runners
-#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h"
-#include "rgb_matrix_runners/effect_runner_dx_dy.h"
-#include "rgb_matrix_runners/effect_runner_i.h"
-#include "rgb_matrix_runners/effect_runner_sin_cos_i.h"
-#include "rgb_matrix_runners/effect_runner_reactive.h"
-#include "rgb_matrix_runners/effect_runner_reactive_splash.h"
-
-// ------------------------------------------
-// -----Begin rgb effect includes macros-----
-#define RGB_MATRIX_EFFECT(name)
-#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
-#ifdef RGB_MATRIX_CUSTOM_KB
-# include "rgb_matrix_kb.inc"
-#endif
-#ifdef RGB_MATRIX_CUSTOM_USER
-# include "rgb_matrix_user.inc"
-#endif
-
-#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#undef RGB_MATRIX_EFFECT
-// -----End rgb effect includes macros-------
-// ------------------------------------------
-
-#if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT)
-# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200UL)
-#endif
-
-#ifndef RGB_DISABLE_TIMEOUT
-# define RGB_DISABLE_TIMEOUT 0
-#endif
-
-#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
-# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
-# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
-#endif
-
-#if !defined(RGB_MATRIX_HUE_STEP)
-# define RGB_MATRIX_HUE_STEP 8
-#endif
-
-#if !defined(RGB_MATRIX_SAT_STEP)
-# define RGB_MATRIX_SAT_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_VAL_STEP)
-# define RGB_MATRIX_VAL_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_SPD_STEP)
-# define RGB_MATRIX_SPD_STEP 16
-#endif
-
-#if !defined(RGB_MATRIX_STARTUP_MODE)
-# ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
-# else
-// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
-# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
-# endif
-#endif
-
-#if !defined(RGB_MATRIX_STARTUP_HUE)
-# define RGB_MATRIX_STARTUP_HUE 0
-#endif
-
-#if !defined(RGB_MATRIX_STARTUP_SAT)
-# define RGB_MATRIX_STARTUP_SAT UINT8_MAX
-#endif
-
-#if !defined(RGB_MATRIX_STARTUP_VAL)
-# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
-#endif
-
-#if !defined(RGB_MATRIX_STARTUP_SPD)
-# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2
-#endif
-
-// globals
-rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
-uint32_t g_rgb_timer;
-#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
-uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
-#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-last_hit_t g_last_hit_tracker;
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
-// internals
-static bool suspend_state = false;
-static bool rgb_update_eeprom = false;
-static uint8_t rgb_last_enable = UINT8_MAX;
-static uint8_t rgb_last_effect = UINT8_MAX;
-static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
-static rgb_task_states rgb_task_state = SYNCING;
-#if RGB_DISABLE_TIMEOUT > 0
-static uint32_t rgb_anykey_timer;
-#endif // RGB_DISABLE_TIMEOUT > 0
-
-// double buffers
-static uint32_t rgb_timer_buffer;
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-static last_hit_t last_hit_buffer;
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
-// split rgb matrix
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
-const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
-#endif
-
-void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
-
-void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
-
-void eeconfig_update_rgb_matrix_default(void) {
- dprintf("eeconfig_update_rgb_matrix_default\n");
- rgb_matrix_config.enable = 1;
- rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
- rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
- rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
- rgb_matrix_config.flags = LED_FLAG_ALL;
- eeconfig_update_rgb_matrix();
-}
-
-void eeconfig_debug_rgb_matrix(void) {
- dprintf("rgb_matrix_config EEPROM\n");
- dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable);
- dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode);
- dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h);
- dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s);
- dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v);
- dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
- dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags);
-}
-
-__attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
-
-uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
- uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
- uint8_t led_index = g_led_config.matrix_co[row][column];
- if (led_index != NO_LED) {
- led_i[led_count] = led_index;
- led_count++;
- }
- return led_count;
-}
-
-void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); }
-
-void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- if (!is_keyboard_left() && index >= k_rgb_matrix_split[0])
- rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue);
- else if (is_keyboard_left() && index < k_rgb_matrix_split[0])
-#endif
- rgb_matrix_driver.set_color(index, red, green, blue);
-}
-
-void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
-#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
- for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) rgb_matrix_set_color(i, red, green, blue);
-#else
- rgb_matrix_driver.set_color_all(red, green, blue);
-#endif
-}
-
-void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) {
-#ifndef RGB_MATRIX_SPLIT
- if (!is_keyboard_master()) return;
-#endif
-#if RGB_DISABLE_TIMEOUT > 0
- rgb_anykey_timer = 0;
-#endif // RGB_DISABLE_TIMEOUT > 0
-
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
- uint8_t led[LED_HITS_TO_REMEMBER];
- uint8_t led_count = 0;
-
-# if defined(RGB_MATRIX_KEYRELEASES)
- if (!pressed)
-# elif defined(RGB_MATRIX_KEYPRESSES)
- if (pressed)
-# endif // defined(RGB_MATRIX_KEYRELEASES)
- {
- led_count = rgb_matrix_map_row_column_to_led(row, col, led);
- }
-
- if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
- memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
- memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
- memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
- memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
- last_hit_buffer.count--;
- }
-
- for (uint8_t i = 0; i < led_count; i++) {
- uint8_t index = last_hit_buffer.count;
- last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
- last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
- last_hit_buffer.index[index] = led[i];
- last_hit_buffer.tick[index] = 0;
- last_hit_buffer.count++;
- }
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
-#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
- if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) {
- process_rgb_matrix_typing_heatmap(row, col);
- }
-#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
-}
-
-void rgb_matrix_test(void) {
- // Mask out bits 4 and 5
- // Increase the factor to make the test animation slower (and reduce to make it faster)
- uint8_t factor = 10;
- switch ((g_rgb_timer & (0b11 << factor)) >> factor) {
- case 0: {
- rgb_matrix_set_color_all(20, 0, 0);
- break;
- }
- case 1: {
- rgb_matrix_set_color_all(0, 20, 0);
- break;
- }
- case 2: {
- rgb_matrix_set_color_all(0, 0, 20);
- break;
- }
- case 3: {
- rgb_matrix_set_color_all(20, 20, 20);
- break;
- }
- }
-}
-
-static bool rgb_matrix_none(effect_params_t *params) {
- if (!params->init) {
- return false;
- }
-
- rgb_matrix_set_color_all(0, 0, 0);
- return false;
-}
-
-static void rgb_task_timers(void) {
-#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
- uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer);
-#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
- rgb_timer_buffer = sync_timer_read32();
-
- // Update double buffer timers
-#if RGB_DISABLE_TIMEOUT > 0
- if (rgb_anykey_timer < UINT32_MAX) {
- if (UINT32_MAX - deltaTime < rgb_anykey_timer) {
- rgb_anykey_timer = UINT32_MAX;
- } else {
- rgb_anykey_timer += deltaTime;
- }
- }
-#endif // RGB_DISABLE_TIMEOUT > 0
-
- // Update double buffer last hit timers
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
- uint8_t count = last_hit_buffer.count;
- for (uint8_t i = 0; i < count; ++i) {
- if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
- last_hit_buffer.count--;
- continue;
- }
- last_hit_buffer.tick[i] += deltaTime;
- }
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-}
-
-static void rgb_task_sync(void) {
- // next task
- if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
- rgb_update_eeprom = false;
- if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
-}
-
-static void rgb_task_start(void) {
- // reset iter
- rgb_effect_params.iter = 0;
-
- // update double buffers
- g_rgb_timer = rgb_timer_buffer;
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
- g_last_hit_tracker = last_hit_buffer;
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
- // next task
- rgb_task_state = RENDERING;
-}
-
-static void rgb_task_render(uint8_t effect) {
- bool rendering = false;
- rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable);
- if (rgb_effect_params.flags != rgb_matrix_config.flags) {
- rgb_effect_params.flags = rgb_matrix_config.flags;
- rgb_matrix_set_color_all(0, 0, 0);
- }
-
- // each effect can opt to do calculations
- // and/or request PWM buffer updates.
- switch (effect) {
- case RGB_MATRIX_NONE:
- rendering = rgb_matrix_none(&rgb_effect_params);
- break;
-
-// ---------------------------------------------
-// -----Begin rgb effect switch case macros-----
-#define RGB_MATRIX_EFFECT(name, ...) \
- case RGB_MATRIX_##name: \
- rendering = name(&rgb_effect_params); \
- break;
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
-#undef RGB_MATRIX_EFFECT
-
-#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
-# define RGB_MATRIX_EFFECT(name, ...) \
- case RGB_MATRIX_CUSTOM_##name: \
- rendering = name(&rgb_effect_params); \
- break;
-# ifdef RGB_MATRIX_CUSTOM_KB
-# include "rgb_matrix_kb.inc"
-# endif
-# ifdef RGB_MATRIX_CUSTOM_USER
-# include "rgb_matrix_user.inc"
-# endif
-# undef RGB_MATRIX_EFFECT
-#endif
- // -----End rgb effect switch case macros-------
- // ---------------------------------------------
-
- // Factory default magic value
- case UINT8_MAX: {
- rgb_matrix_test();
- rgb_task_state = FLUSHING;
- }
- return;
- }
-
- rgb_effect_params.iter++;
-
- // next task
- if (!rendering) {
- rgb_task_state = FLUSHING;
- if (!rgb_effect_params.init && effect == RGB_MATRIX_NONE) {
- // We only need to flush once if we are RGB_MATRIX_NONE
- rgb_task_state = SYNCING;
- }
- }
-}
-
-static void rgb_task_flush(uint8_t effect) {
- // update last trackers after the first full render so we can init over several frames
- rgb_last_effect = effect;
- rgb_last_enable = rgb_matrix_config.enable;
-
- // update pwm buffers
- rgb_matrix_update_pwm_buffers();
-
- // next task
- rgb_task_state = SYNCING;
-}
-
-void rgb_matrix_task(void) {
- rgb_task_timers();
-
- // Ideally we would also stop sending zeros to the LED driver PWM buffers
- // while suspended and just do a software shutdown. This is a cheap hack for now.
- bool suspend_backlight = suspend_state ||
-#if RGB_DISABLE_TIMEOUT > 0
- (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
-#endif // RGB_DISABLE_TIMEOUT > 0
- false;
-
- uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode;
-
- switch (rgb_task_state) {
- case STARTING:
- rgb_task_start();
- break;
- case RENDERING:
- rgb_task_render(effect);
- if (effect) {
- rgb_matrix_indicators();
- rgb_matrix_indicators_advanced(&rgb_effect_params);
- }
- break;
- case FLUSHING:
- rgb_task_flush(effect);
- break;
- case SYNCING:
- rgb_task_sync();
- break;
- }
-}
-
-void rgb_matrix_indicators(void) {
- rgb_matrix_indicators_kb();
- rgb_matrix_indicators_user();
-}
-
-__attribute__((weak)) void rgb_matrix_indicators_kb(void) {}
-
-__attribute__((weak)) void rgb_matrix_indicators_user(void) {}
-
-void rgb_matrix_indicators_advanced(effect_params_t *params) {
- /* special handling is needed for "params->iter", since it's already been incremented.
- * Could move the invocations to rgb_task_render, but then it's missing a few checks
- * and not sure which would be better. Otherwise, this should be called from
- * rgb_task_render, right before the iter++ line.
- */
-#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
- uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1);
- uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT;
- if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
-#else
- uint8_t min = 0;
- uint8_t max = DRIVER_LED_TOTAL;
-#endif
- rgb_matrix_indicators_advanced_kb(min, max);
- rgb_matrix_indicators_advanced_user(min, max);
-}
-
-__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {}
-
-__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {}
-
-void rgb_matrix_init(void) {
- rgb_matrix_driver.init();
-
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
- g_last_hit_tracker.count = 0;
- for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
- g_last_hit_tracker.tick[i] = UINT16_MAX;
- }
-
- last_hit_buffer.count = 0;
- for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
- last_hit_buffer.tick[i] = UINT16_MAX;
- }
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
- if (!eeconfig_is_enabled()) {
- dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_rgb_matrix_default();
- }
-
- eeconfig_read_rgb_matrix();
- if (!rgb_matrix_config.mode) {
- dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_rgb_matrix_default();
- }
- eeconfig_debug_rgb_matrix(); // display current eeprom values
-}
-
-void rgb_matrix_set_suspend_state(bool state) {
-#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
- if (state) {
- rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending
- }
- suspend_state = state;
-#endif
-}
-
-bool rgb_matrix_get_suspend_state(void) { return suspend_state; }
-
-void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
- rgb_matrix_config.enable ^= 1;
- rgb_task_state = STARTING;
- rgb_eeconfig_update(write_to_eeprom);
- dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable);
-}
-void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); }
-void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); }
-
-void rgb_matrix_enable(void) {
- rgb_matrix_enable_noeeprom();
- rgb_eeconfig_update(true);
-}
-
-void rgb_matrix_enable_noeeprom(void) {
- if (!rgb_matrix_config.enable) rgb_task_state = STARTING;
- rgb_matrix_config.enable = 1;
-}
-
-void rgb_matrix_disable(void) {
- rgb_matrix_disable_noeeprom();
- rgb_eeconfig_update(true);
-}
-
-void rgb_matrix_disable_noeeprom(void) {
- if (rgb_matrix_config.enable) rgb_task_state = STARTING;
- rgb_matrix_config.enable = 0;
-}
-
-uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; }
-
-void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
- if (!rgb_matrix_config.enable) {
- return;
- }
- if (mode < 1) {
- rgb_matrix_config.mode = 1;
- } else if (mode >= RGB_MATRIX_EFFECT_MAX) {
- rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1;
- } else {
- rgb_matrix_config.mode = mode;
- }
- rgb_task_state = STARTING;
- rgb_eeconfig_update(write_to_eeprom);
- dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode);
-}
-void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); }
-void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); }
-
-uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; }
-
-void rgb_matrix_step_helper(bool write_to_eeprom) {
- uint8_t mode = rgb_matrix_config.mode + 1;
- rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom);
-}
-void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); }
-void rgb_matrix_step(void) { rgb_matrix_step_helper(true); }
-
-void rgb_matrix_step_reverse_helper(bool write_to_eeprom) {
- uint8_t mode = rgb_matrix_config.mode - 1;
- rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom);
-}
-void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); }
-void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); }
-
-void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) {
- if (!rgb_matrix_config.enable) {
- return;
- }
- rgb_matrix_config.hsv.h = hue;
- rgb_matrix_config.hsv.s = sat;
- rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val;
- rgb_eeconfig_update(write_to_eeprom);
- dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
-}
-void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); }
-void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); }
-
-HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; }
-uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; }
-uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; }
-uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; }
-
-void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); }
-void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); }
-void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); }
-
-void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); }
-void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); }
-void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); }
-
-void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); }
-void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); }
-void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); }
-
-void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); }
-void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); }
-void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); }
-
-void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); }
-void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); }
-void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); }
-
-void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); }
-void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); }
-void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); }
-
-void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
- rgb_matrix_config.speed = speed;
- rgb_eeconfig_update(write_to_eeprom);
- dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed);
-}
-void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); }
-void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); }
-
-uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; }
-
-void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); }
-void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); }
-void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); }
-
-void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); }
-void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); }
-void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); }
-
-led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; }
-
-void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; }
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
deleted file mode 100644
index 741a2fe446..0000000000
--- a/quantum/rgb_matrix.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Copyright 2017 Jason Williams
- * Copyright 2017 Jack Humbert
- * Copyright 2018 Yiancar
- *
- * 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 .
- */
-
-#pragma once
-
-#include
-#include
-#include "rgb_matrix_types.h"
-#include "color.h"
-#include "quantum.h"
-#include "rgblight_list.h"
-
-#ifdef IS31FL3731
-# include "is31fl3731.h"
-#elif defined(IS31FL3733)
-# include "is31fl3733.h"
-#elif defined(IS31FL3737)
-# include "is31fl3737.h"
-#elif defined(IS31FL3741)
-# include "is31fl3741.h"
-#elif defined(AW20216)
-# include "aw20216.h"
-#elif defined(WS2812)
-# include "ws2812.h"
-#endif
-
-#ifndef RGB_MATRIX_LED_FLUSH_LIMIT
-# define RGB_MATRIX_LED_FLUSH_LIMIT 16
-#endif
-
-#ifndef RGB_MATRIX_LED_PROCESS_LIMIT
-# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
-#endif
-
-#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
-# define RGB_MATRIX_USE_LIMITS(min, max) \
- uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \
- uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \
- if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
-#else
-# define RGB_MATRIX_USE_LIMITS(min, max) \
- uint8_t min = 0; \
- uint8_t max = DRIVER_LED_TOTAL;
-#endif
-
-#define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) \
- if (i >= led_min && i <= led_max) { \
- rgb_matrix_set_color(i, r, g, b); \
- }
-
-#define RGB_MATRIX_TEST_LED_FLAGS() \
- if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
-
-enum rgb_matrix_effects {
- RGB_MATRIX_NONE = 0,
-
-// --------------------------------------
-// -----Begin rgb effect enum macros-----
-#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name,
-#include "rgb_matrix_animations/rgb_matrix_effects.inc"
-#undef RGB_MATRIX_EFFECT
-
-#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
-# define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name,
-# ifdef RGB_MATRIX_CUSTOM_KB
-# include "rgb_matrix_kb.inc"
-# endif
-# ifdef RGB_MATRIX_CUSTOM_USER
-# include "rgb_matrix_user.inc"
-# endif
-# undef RGB_MATRIX_EFFECT
-#endif
- // --------------------------------------
- // -----End rgb effect enum macros-------
-
- RGB_MATRIX_EFFECT_MAX
-};
-
-void eeconfig_update_rgb_matrix_default(void);
-void eeconfig_update_rgb_matrix(void);
-
-uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i);
-uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i);
-
-void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
-void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
-
-void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed);
-
-void rgb_matrix_task(void);
-
-// This runs after another backlight effect and replaces
-// colors already set
-void rgb_matrix_indicators(void);
-void rgb_matrix_indicators_kb(void);
-void rgb_matrix_indicators_user(void);
-
-void rgb_matrix_indicators_advanced(effect_params_t *params);
-void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max);
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
-
-void rgb_matrix_init(void);
-
-void rgb_matrix_set_suspend_state(bool state);
-bool rgb_matrix_get_suspend_state(void);
-void rgb_matrix_toggle(void);
-void rgb_matrix_toggle_noeeprom(void);
-void rgb_matrix_enable(void);
-void rgb_matrix_enable_noeeprom(void);
-void rgb_matrix_disable(void);
-void rgb_matrix_disable_noeeprom(void);
-uint8_t rgb_matrix_is_enabled(void);
-void rgb_matrix_mode(uint8_t mode);
-void rgb_matrix_mode_noeeprom(uint8_t mode);
-uint8_t rgb_matrix_get_mode(void);
-void rgb_matrix_step(void);
-void rgb_matrix_step_noeeprom(void);
-void rgb_matrix_step_reverse(void);
-void rgb_matrix_step_reverse_noeeprom(void);
-void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
-void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
-HSV rgb_matrix_get_hsv(void);
-uint8_t rgb_matrix_get_hue(void);
-uint8_t rgb_matrix_get_sat(void);
-uint8_t rgb_matrix_get_val(void);
-void rgb_matrix_increase_hue(void);
-void rgb_matrix_increase_hue_noeeprom(void);
-void rgb_matrix_decrease_hue(void);
-void rgb_matrix_decrease_hue_noeeprom(void);
-void rgb_matrix_increase_sat(void);
-void rgb_matrix_increase_sat_noeeprom(void);
-void rgb_matrix_decrease_sat(void);
-void rgb_matrix_decrease_sat_noeeprom(void);
-void rgb_matrix_increase_val(void);
-void rgb_matrix_increase_val_noeeprom(void);
-void rgb_matrix_decrease_val(void);
-void rgb_matrix_decrease_val_noeeprom(void);
-void rgb_matrix_set_speed(uint8_t speed);
-void rgb_matrix_set_speed_noeeprom(uint8_t speed);
-uint8_t rgb_matrix_get_speed(void);
-void rgb_matrix_increase_speed(void);
-void rgb_matrix_increase_speed_noeeprom(void);
-void rgb_matrix_decrease_speed(void);
-void rgb_matrix_decrease_speed_noeeprom(void);
-led_flags_t rgb_matrix_get_flags(void);
-void rgb_matrix_set_flags(led_flags_t flags);
-
-#ifndef RGBLIGHT_ENABLE
-# define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix
-# define rgblight_toggle rgb_matrix_toggle
-# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom
-# define rgblight_enable rgb_matrix_enable
-# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom
-# define rgblight_disable rgb_matrix_disable
-# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom
-# define rgblight_is_enabled rgb_matrix_is_enabled
-# define rgblight_mode rgb_matrix_mode
-# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom
-# define rgblight_get_mode rgb_matrix_get_mode
-# define rgblight_get_hue rgb_matrix_get_hue
-# define rgblight_get_sat rgb_matrix_get_sat
-# define rgblight_get_val rgb_matrix_get_val
-# define rgblight_get_hsv rgb_matrix_get_hsv
-# define rgblight_step rgb_matrix_step
-# define rgblight_step_noeeprom rgb_matrix_step_noeeprom
-# define rgblight_step_reverse rgb_matrix_step_reverse
-# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom
-# define rgblight_sethsv rgb_matrix_sethsv
-# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom
-# define rgblight_increase_hue rgb_matrix_increase_hue
-# define rgblight_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom
-# define rgblight_decrease_hue rgb_matrix_decrease_hue
-# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom
-# define rgblight_increase_sat rgb_matrix_increase_sat
-# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom
-# define rgblight_decrease_sat rgb_matrix_decrease_sat
-# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom
-# define rgblight_increase_val rgb_matrix_increase_val
-# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom
-# define rgblight_decrease_val rgb_matrix_decrease_val
-# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom
-# define rgblight_set_speed rgb_matrix_set_speed
-# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom
-# define rgblight_get_speed rgb_matrix_get_speed
-# define rgblight_increase_speed rgb_matrix_increase_speed
-# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom
-# define rgblight_decrease_speed rgb_matrix_decrease_speed
-# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom
-#endif
-
-typedef struct {
- /* Perform any initialisation required for the other driver functions to work. */
- void (*init)(void);
- /* Set the colour of a single LED in the buffer. */
- void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b);
- /* Set the colour of all LEDS on the keyboard in the buffer. */
- void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b);
- /* Flush any buffered changes to the hardware. */
- void (*flush)(void);
-} rgb_matrix_driver_t;
-
-extern const rgb_matrix_driver_t rgb_matrix_driver;
-
-extern rgb_config_t rgb_matrix_config;
-
-extern uint32_t g_rgb_timer;
-extern led_config_t g_led_config;
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-extern last_hit_t g_last_hit_tracker;
-#endif
-#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
-extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
-#endif
diff --git a/quantum/rgb_matrix/animations/alpha_mods_anim.h b/quantum/rgb_matrix/animations/alpha_mods_anim.h
new file mode 100644
index 0000000000..426d88ef35
--- /dev/null
+++ b/quantum/rgb_matrix/animations/alpha_mods_anim.h
@@ -0,0 +1,26 @@
+#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
+RGB_MATRIX_EFFECT(ALPHAS_MODS)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// alphas = color1, mods = color2
+bool ALPHAS_MODS(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = rgb_matrix_config.hsv;
+ RGB rgb1 = rgb_matrix_hsv_to_rgb(hsv);
+ hsv.h += rgb_matrix_config.speed;
+ RGB rgb2 = rgb_matrix_hsv_to_rgb(hsv);
+
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
+ rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
+ } else {
+ rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);
+ }
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
diff --git a/quantum/rgb_matrix/animations/breathing_anim.h b/quantum/rgb_matrix/animations/breathing_anim.h
new file mode 100644
index 0000000000..340bd93e5d
--- /dev/null
+++ b/quantum/rgb_matrix/animations/breathing_anim.h
@@ -0,0 +1,20 @@
+#ifndef DISABLE_RGB_MATRIX_BREATHING
+RGB_MATRIX_EFFECT(BREATHING)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool BREATHING(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = rgb_matrix_config.hsv;
+ uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
+ hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BREATHING
diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
new file mode 100644
index 0000000000..3df3cfda7d
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
+RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
+ hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s);
+ return hsv;
+}
+
+bool BAND_PINWHEEL_SAT(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
new file mode 100644
index 0000000000..7d80074fd5
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
+RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
+ hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v);
+ return hsv;
+}
+
+bool BAND_PINWHEEL_VAL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
diff --git a/quantum/rgb_matrix/animations/colorband_sat_anim.h b/quantum/rgb_matrix/animations/colorband_sat_anim.h
new file mode 100644
index 0000000000..35b830af6b
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_sat_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_SAT
+RGB_MATRIX_EFFECT(BAND_SAT)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) {
+ int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
+ hsv.s = scale8(s < 0 ? 0 : s, hsv.s);
+ return hsv;
+}
+
+bool BAND_SAT(effect_params_t* params) { return effect_runner_i(params, &BAND_SAT_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
new file mode 100644
index 0000000000..048157aa1b
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s);
+ return hsv;
+}
+
+bool BAND_SPIRAL_SAT(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
new file mode 100644
index 0000000000..bff2da1616
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v);
+ return hsv;
+}
+
+bool BAND_SPIRAL_VAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
diff --git a/quantum/rgb_matrix/animations/colorband_val_anim.h b/quantum/rgb_matrix/animations/colorband_val_anim.h
new file mode 100644
index 0000000000..f1aaf1d067
--- /dev/null
+++ b/quantum/rgb_matrix/animations/colorband_val_anim.h
@@ -0,0 +1,14 @@
+#ifndef DISABLE_RGB_MATRIX_BAND_VAL
+RGB_MATRIX_EFFECT(BAND_VAL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) {
+ int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
+ hsv.v = scale8(v < 0 ? 0 : v, hsv.v);
+ return hsv;
+}
+
+bool BAND_VAL(effect_params_t* params) { return effect_runner_i(params, &BAND_VAL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_BAND_VAL
diff --git a/quantum/rgb_matrix/animations/cycle_all_anim.h b/quantum/rgb_matrix/animations/cycle_all_anim.h
new file mode 100644
index 0000000000..faf8598a39
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_all_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
+RGB_MATRIX_EFFECT(CYCLE_ALL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) {
+ hsv.h = time;
+ return hsv;
+}
+
+bool CYCLE_ALL(effect_params_t* params) { return effect_runner_i(params, &CYCLE_ALL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
diff --git a/quantum/rgb_matrix/animations/cycle_left_right_anim.h b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
new file mode 100644
index 0000000000..cf911eb937
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_left_right_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) {
+ hsv.h = g_led_config.point[i].x - time;
+ return hsv;
+}
+
+bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/rgb_matrix/animations/cycle_out_in_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
new file mode 100644
index 0000000000..d66acd4b2b
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_out_in_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN
+RGB_MATRIX_EFFECT(CYCLE_OUT_IN)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ hsv.h = 3 * dist / 2 + time;
+ return hsv;
+}
+
+bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
new file mode 100644
index 0000000000..fe8396140f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h
@@ -0,0 +1,15 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
+ dx = (k_rgb_matrix_center.x / 2) - abs8(dx);
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ hsv.h = 3 * dist + time;
+ return hsv;
+}
+
+bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
diff --git a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
new file mode 100644
index 0000000000..7799887099
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+RGB_MATRIX_EFFECT(CYCLE_PINWHEEL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
+ hsv.h = atan2_8(dy, dx) + time;
+ return hsv;
+}
+
+bool CYCLE_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
diff --git a/quantum/rgb_matrix/animations/cycle_spiral_anim.h b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
new file mode 100644
index 0000000000..80cfb0dbc7
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_spiral_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+RGB_MATRIX_EFFECT(CYCLE_SPIRAL)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
+ hsv.h = dist - time - atan2_8(dy, dx);
+ return hsv;
+}
+
+bool CYCLE_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL
diff --git a/quantum/rgb_matrix/animations/cycle_up_down_anim.h b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
new file mode 100644
index 0000000000..5016f739d6
--- /dev/null
+++ b/quantum/rgb_matrix/animations/cycle_up_down_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
+RGB_MATRIX_EFFECT(CYCLE_UP_DOWN)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) {
+ hsv.h = g_led_config.point[i].y - time;
+ return hsv;
+}
+
+bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/rgb_matrix/animations/digital_rain_anim.h b/quantum/rgb_matrix/animations/digital_rain_anim.h
new file mode 100644
index 0000000000..1de45f8e8d
--- /dev/null
+++ b/quantum/rgb_matrix/animations/digital_rain_anim.h
@@ -0,0 +1,75 @@
+#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
+RGB_MATRIX_EFFECT(DIGITAL_RAIN)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+# ifndef RGB_DIGITAL_RAIN_DROPS
+// lower the number for denser effect/wider keyboard
+# define RGB_DIGITAL_RAIN_DROPS 24
+# endif
+
+bool DIGITAL_RAIN(effect_params_t* params) {
+ // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
+ const uint8_t drop_ticks = 28;
+ const uint8_t pure_green_intensity = 0xd0;
+ const uint8_t max_brightness_boost = 0xc0;
+ const uint8_t max_intensity = 0xff;
+
+ static uint8_t drop = 0;
+
+ if (params->init) {
+ rgb_matrix_set_color_all(0, 0, 0);
+ memset(g_rgb_frame_buffer, 0, sizeof(g_rgb_frame_buffer));
+ drop = 0;
+ }
+
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
+ // top row, pixels have just fallen and we're
+ // making a new rain drop in this column
+ g_rgb_frame_buffer[row][col] = max_intensity;
+ } else if (g_rgb_frame_buffer[row][col] > 0 && g_rgb_frame_buffer[row][col] < max_intensity) {
+ // neither fully bright nor dark, decay it
+ g_rgb_frame_buffer[row][col]--;
+ }
+ // set the pixel colour
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led);
+
+ // TODO: multiple leds are supported mapped to the same row/column
+ if (led_count > 0) {
+ if (g_rgb_frame_buffer[row][col] > pure_green_intensity) {
+ const uint8_t boost = (uint8_t)((uint16_t)max_brightness_boost * (g_rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity));
+ rgb_matrix_set_color(led[0], boost, max_intensity, boost);
+ } else {
+ const uint8_t green = (uint8_t)((uint16_t)max_intensity * g_rgb_frame_buffer[row][col] / pure_green_intensity);
+ rgb_matrix_set_color(led[0], 0, green, 0);
+ }
+ }
+ }
+ }
+
+ if (++drop > drop_ticks) {
+ // reset drop timer
+ drop = 0;
+ for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ // if ths is on the bottom row and bright allow decay
+ if (row == MATRIX_ROWS - 1 && g_rgb_frame_buffer[row][col] == max_intensity) {
+ g_rgb_frame_buffer[row][col]--;
+ }
+ // check if the pixel above is bright
+ if (g_rgb_frame_buffer[row - 1][col] == max_intensity) {
+ // allow old bright pixel to decay
+ g_rgb_frame_buffer[row - 1][col]--;
+ // make this pixel bright
+ g_rgb_frame_buffer[row][col] = max_intensity;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
diff --git a/quantum/rgb_matrix/animations/dual_beacon_anim.h b/quantum/rgb_matrix/animations/dual_beacon_anim.h
new file mode 100644
index 0000000000..ce94871681
--- /dev/null
+++ b/quantum/rgb_matrix/animations/dual_beacon_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
+RGB_MATRIX_EFFECT(DUAL_BEACON)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
+ hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128;
+ return hsv;
+}
+
+bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
diff --git a/quantum/rgb_matrix/animations/gradient_left_right_anim.h b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
new file mode 100644
index 0000000000..53dfd04e2c
--- /dev/null
+++ b/quantum/rgb_matrix/animations/gradient_left_right_anim.h
@@ -0,0 +1,22 @@
+#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool GRADIENT_LEFT_RIGHT(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = rgb_matrix_config.hsv;
+ uint8_t scale = scale8(64, rgb_matrix_config.speed);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ // The x range will be 0..224, map this to 0..7
+ // Relies on hue being 8-bit and wrapping
+ hsv.h = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5);
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
diff --git a/quantum/rgb_matrix/animations/gradient_up_down_anim.h b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
new file mode 100644
index 0000000000..7e0d2898cf
--- /dev/null
+++ b/quantum/rgb_matrix/animations/gradient_up_down_anim.h
@@ -0,0 +1,22 @@
+#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool GRADIENT_UP_DOWN(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ HSV hsv = rgb_matrix_config.hsv;
+ uint8_t scale = scale8(64, rgb_matrix_config.speed);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ // The y range will be 0..64, map this to 0..4
+ // Relies on hue being 8-bit and wrapping
+ hsv.h = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4);
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/quantum/rgb_matrix/animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h
new file mode 100644
index 0000000000..54dea958af
--- /dev/null
+++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h
@@ -0,0 +1,22 @@
+#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING
+RGB_MATRIX_EFFECT(HUE_BREATHING)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// Change huedelta to adjust range of hue change. 0-255.
+// Hue Breathing - All LED's light up
+bool HUE_BREATHING(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ uint8_t huedelta = 12;
+ HSV hsv = rgb_matrix_config.hsv;
+ uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
+ hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta);
+ RGB rgb = hsv_to_rgb(hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_HUE_BREATHING
diff --git a/quantum/rgb_matrix/animations/hue_pendulum_anim.h b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
new file mode 100644
index 0000000000..2d8d36174f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/hue_pendulum_anim.h
@@ -0,0 +1,17 @@
+#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM
+RGB_MATRIX_EFFECT(HUE_PENDULUM)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// Change huedelta to adjust range of hue change. 0-255.
+// Looks better with a low value and slow speed for subtle change.
+// Hue Pendulum - color changes in a wave to the right before reversing direction
+static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) {
+ uint8_t huedelta = 12;
+ hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta);
+ return hsv;
+}
+
+bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_HUE_PENDULUM
diff --git a/quantum/rgb_matrix/animations/hue_wave_anim.h b/quantum/rgb_matrix/animations/hue_wave_anim.h
new file mode 100644
index 0000000000..fd9026fc90
--- /dev/null
+++ b/quantum/rgb_matrix/animations/hue_wave_anim.h
@@ -0,0 +1,17 @@
+#ifndef DISABLE_RGB_MATRIX_HUE_WAVE
+RGB_MATRIX_EFFECT(HUE_WAVE)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// Change huedelta to adjust range of hue change. 0-255.
+// Looks better with a low value and slow speed for subtle change.
+// Hue Wave - color changes in a wave to the right
+static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) {
+ uint8_t huedelta = 24;
+ hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta);
+ return hsv;
+}
+
+bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_HUE_WAVE
diff --git a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
new file mode 100644
index 0000000000..a17e954b1b
--- /dev/null
+++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h
@@ -0,0 +1,29 @@
+#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
+ HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v};
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+}
+
+bool JELLYBEAN_RAINDROPS(effect_params_t* params) {
+ if (!params->init) {
+ // Change one LED every tick, make sure speed is not 0
+ if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
+ jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
+ }
+ return false;
+ }
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (int i = led_min; i < led_max; i++) {
+ jellybean_raindrops_set_color(i, params);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
diff --git a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
new file mode 100644
index 0000000000..977261182f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
+RGB_MATRIX_EFFECT(RAINBOW_BEACON)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
+ hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128;
+ return hsv;
+}
+
+bool RAINBOW_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
diff --git a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
new file mode 100644
index 0000000000..e51e7b2516
--- /dev/null
+++ b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) {
+ hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time);
+ return hsv;
+}
+
+bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
diff --git a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
new file mode 100644
index 0000000000..1cd4ed2acf
--- /dev/null
+++ b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h
@@ -0,0 +1,13 @@
+#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
+ hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128;
+ return hsv;
+}
+
+bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h
new file mode 100644
index 0000000000..38359cdca7
--- /dev/null
+++ b/quantum/rgb_matrix/animations/raindrops_anim.h
@@ -0,0 +1,39 @@
+#ifndef DISABLE_RGB_MATRIX_RAINDROPS
+RGB_MATRIX_EFFECT(RAINDROPS)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static void raindrops_set_color(int i, effect_params_t* params) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
+ HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
+
+ // Take the shortest path between hues
+ int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
+ if (deltaH > 127) {
+ deltaH -= 256;
+ } else if (deltaH < -127) {
+ deltaH += 256;
+ }
+
+ hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+}
+
+bool RAINDROPS(effect_params_t* params) {
+ if (!params->init) {
+ // Change one LED every tick, make sure speed is not 0
+ if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
+ raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
+ }
+ return false;
+ }
+
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (int i = led_min; i < led_max; i++) {
+ raindrops_set_color(i, params);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // DISABLE_RGB_MATRIX_RAINDROPS
diff --git a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
new file mode 100644
index 0000000000..302ad79c04
--- /dev/null
+++ b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc
@@ -0,0 +1,37 @@
+// Add your new core rgb matrix effect here, order determines enum order
+#include "solid_color_anim.h"
+#include "alpha_mods_anim.h"
+#include "gradient_up_down_anim.h"
+#include "gradient_left_right_anim.h"
+#include "breathing_anim.h"
+#include "colorband_sat_anim.h"
+#include "colorband_val_anim.h"
+#include "colorband_pinwheel_sat_anim.h"
+#include "colorband_pinwheel_val_anim.h"
+#include "colorband_spiral_sat_anim.h"
+#include "colorband_spiral_val_anim.h"
+#include "cycle_all_anim.h"
+#include "cycle_left_right_anim.h"
+#include "cycle_up_down_anim.h"
+#include "rainbow_moving_chevron_anim.h"
+#include "cycle_out_in_anim.h"
+#include "cycle_out_in_dual_anim.h"
+#include "cycle_pinwheel_anim.h"
+#include "cycle_spiral_anim.h"
+#include "dual_beacon_anim.h"
+#include "rainbow_beacon_anim.h"
+#include "rainbow_pinwheels_anim.h"
+#include "raindrops_anim.h"
+#include "jellybean_raindrops_anim.h"
+#include "hue_breathing_anim.h"
+#include "hue_pendulum_anim.h"
+#include "hue_wave_anim.h"
+#include "typing_heatmap_anim.h"
+#include "digital_rain_anim.h"
+#include "solid_reactive_simple_anim.h"
+#include "solid_reactive_anim.h"
+#include "solid_reactive_wide.h"
+#include "solid_reactive_cross.h"
+#include "solid_reactive_nexus.h"
+#include "splash_anim.h"
+#include "solid_splash_anim.h"
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
new file mode 100644
index 0000000000..4867609c81
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef HSV (*dx_dy_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t time);
+
+bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
new file mode 100644
index 0000000000..9545b418d9
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h
@@ -0,0 +1,18 @@
+#pragma once
+
+typedef HSV (*dx_dy_dist_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
+
+bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
+ int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
new file mode 100644
index 0000000000..95bfe8b390
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_i.h
@@ -0,0 +1,15 @@
+#pragma once
+
+typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time);
+
+bool effect_runner_i(effect_params_t* params, i_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
new file mode 100644
index 0000000000..8485b61f3d
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+
+typedef HSV (*reactive_f)(HSV hsv, uint16_t offset);
+
+bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t max_tick = 65535 / rgb_matrix_config.speed;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ uint16_t tick = max_tick;
+ // Reverse search to find most recent key hit
+ for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
+ if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
+ tick = g_last_hit_tracker.tick[j];
+ break;
+ }
+ }
+
+ uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
new file mode 100644
index 0000000000..5c69d0fbb9
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+
+typedef HSV (*reactive_splash_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
+
+bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint8_t count = g_last_hit_tracker.count;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ HSV hsv = rgb_matrix_config.hsv;
+ hsv.v = 0;
+ for (uint8_t j = start; j < count; j++) {
+ int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
+ int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
+ uint8_t dist = sqrt16(dx * dx + dy * dy);
+ uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed);
+ hsv = effect_func(hsv, dx, dy, dist, tick);
+ }
+ hsv.v = scale8(hsv.v, rgb_matrix_config.hsv.v);
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
new file mode 100644
index 0000000000..02351de51e
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h
@@ -0,0 +1,17 @@
+#pragma once
+
+typedef HSV (*sin_cos_i_f)(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
+
+bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4);
+ int8_t cos_value = cos8(time) - 128;
+ int8_t sin_value = sin8(time) - 128;
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
diff --git a/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc
new file mode 100644
index 0000000000..c09022bb0f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc
@@ -0,0 +1,6 @@
+#include "effect_runner_dx_dy_dist.h"
+#include "effect_runner_dx_dy.h"
+#include "effect_runner_i.h"
+#include "effect_runner_sin_cos_i.h"
+#include "effect_runner_reactive.h"
+#include "effect_runner_reactive_splash.h"
diff --git a/quantum/rgb_matrix/animations/solid_color_anim.h b/quantum/rgb_matrix/animations/solid_color_anim.h
new file mode 100644
index 0000000000..79d63cf133
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_color_anim.h
@@ -0,0 +1,15 @@
+RGB_MATRIX_EFFECT(SOLID_COLOR)
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+bool SOLID_COLOR(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+
+ RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ RGB_MATRIX_TEST_LED_FLAGS();
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/quantum/rgb_matrix/animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h
new file mode 100644
index 0000000000..d45bb961bc
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h
@@ -0,0 +1,15 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
+RGB_MATRIX_EFFECT(SOLID_REACTIVE)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) {
+ hsv.h += qsub8(130, offset);
+ return hsv;
+}
+
+bool SOLID_REACTIVE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h
new file mode 100644
index 0000000000..f76c68e8c7
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h
@@ -0,0 +1,36 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
+# endif
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist;
+ dx = dx < 0 ? dx * -1 : dx;
+ dy = dy < 0 ? dy * -1 : dy;
+ dx = dx * 16 > 255 ? 255 : dx * 16;
+ dy = dy * 16 > 255 ? 255 : dy * 16;
+ effect += dx > dy ? dy : dx;
+ if (effect > 255) effect = 255;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ return hsv;
+}
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); }
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
+bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); }
+# endif
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
new file mode 100644
index 0000000000..17f94e3c18
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_reactive_nexus.h
@@ -0,0 +1,34 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
+# endif
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ if (dist > 72) effect = 255;
+ if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ hsv.h = rgb_matrix_config.hsv.h + dy / 4;
+ return hsv;
+}
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); }
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
+bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); }
+# endif
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
new file mode 100644
index 0000000000..12eb248cc0
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h
@@ -0,0 +1,15 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) {
+ hsv.v = scale8(255 - offset, hsv.v);
+ return hsv;
+}
+
+bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h
new file mode 100644
index 0000000000..1cc4dca728
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_reactive_wide.h
@@ -0,0 +1,31 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
+# endif
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick + dist * 5;
+ if (effect > 255) effect = 255;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ return hsv;
+}
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); }
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
+bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); }
+# endif
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/solid_splash_anim.h b/quantum/rgb_matrix/animations/solid_splash_anim.h
new file mode 100644
index 0000000000..99efb4996a
--- /dev/null
+++ b/quantum/rgb_matrix/animations/solid_splash_anim.h
@@ -0,0 +1,31 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
+RGB_MATRIX_EFFECT(SOLID_SPLASH)
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+RGB_MATRIX_EFFECT(SOLID_MULTISPLASH)
+# endif
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ return hsv;
+}
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
+bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
+bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
+# endif
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/splash_anim.h b/quantum/rgb_matrix/animations/splash_anim.h
new file mode 100644
index 0000000000..1415bcc0fa
--- /dev/null
+++ b/quantum/rgb_matrix/animations/splash_anim.h
@@ -0,0 +1,32 @@
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+# if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+
+# ifndef DISABLE_RGB_MATRIX_SPLASH
+RGB_MATRIX_EFFECT(SPLASH)
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_MULTISPLASH
+RGB_MATRIX_EFFECT(MULTISPLASH)
+# endif
+
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+HSV SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
+ uint16_t effect = tick - dist;
+ if (effect > 255) effect = 255;
+ hsv.h += effect;
+ hsv.v = qadd8(hsv.v, 255 - effect);
+ return hsv;
+}
+
+# ifndef DISABLE_RGB_MATRIX_SPLASH
+bool SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SPLASH_math); }
+# endif
+
+# ifndef DISABLE_RGB_MATRIX_MULTISPLASH
+bool MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SPLASH_math); }
+# endif
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix/animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
new file mode 100644
index 0000000000..e7dda11a2f
--- /dev/null
+++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
@@ -0,0 +1,86 @@
+#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
+RGB_MATRIX_EFFECT(TYPING_HEATMAP)
+# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+# ifndef RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS
+# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25
+# endif
+
+void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
+ uint8_t m_row = row - 1;
+ uint8_t p_row = row + 1;
+ uint8_t m_col = col - 1;
+ uint8_t p_col = col + 1;
+
+ if (m_col < col) g_rgb_frame_buffer[row][m_col] = qadd8(g_rgb_frame_buffer[row][m_col], 16);
+ g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
+ if (p_col < MATRIX_COLS) g_rgb_frame_buffer[row][p_col] = qadd8(g_rgb_frame_buffer[row][p_col], 16);
+
+ if (p_row < MATRIX_ROWS) {
+ if (m_col < col) g_rgb_frame_buffer[p_row][m_col] = qadd8(g_rgb_frame_buffer[p_row][m_col], 13);
+ g_rgb_frame_buffer[p_row][col] = qadd8(g_rgb_frame_buffer[p_row][col], 16);
+ if (p_col < MATRIX_COLS) g_rgb_frame_buffer[p_row][p_col] = qadd8(g_rgb_frame_buffer[p_row][p_col], 13);
+ }
+
+ if (m_row < row) {
+ if (m_col < col) g_rgb_frame_buffer[m_row][m_col] = qadd8(g_rgb_frame_buffer[m_row][m_col], 13);
+ g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16);
+ if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13);
+ }
+}
+
+// A timer to track the last time we decremented all heatmap values.
+static uint16_t heatmap_decrease_timer;
+// Whether we should decrement the heatmap values during the next update.
+static bool decrease_heatmap_values;
+
+bool TYPING_HEATMAP(effect_params_t* params) {
+ // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size
+ uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter;
+ uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT;
+ if (led_max > sizeof(g_rgb_frame_buffer)) led_max = sizeof(g_rgb_frame_buffer);
+
+ if (params->init) {
+ rgb_matrix_set_color_all(0, 0, 0);
+ memset(g_rgb_frame_buffer, 0, sizeof g_rgb_frame_buffer);
+ }
+
+ // The heatmap animation might run in several iterations depending on
+ // `RGB_MATRIX_LED_PROCESS_LIMIT`, therefore we only want to update the
+ // timer when the animation starts.
+ if (params->iter == 0) {
+ decrease_heatmap_values = timer_elapsed(heatmap_decrease_timer) >= RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS;
+
+ // Restart the timer if we are going to decrease the heatmap this frame.
+ if (decrease_heatmap_values) {
+ heatmap_decrease_timer = timer_read();
+ }
+ }
+
+ // Render heatmap & decrease
+ for (int i = led_min; i < led_max; i++) {
+ uint8_t row = i % MATRIX_ROWS;
+ uint8_t col = i / MATRIX_ROWS;
+ uint8_t val = g_rgb_frame_buffer[row][col];
+
+ // set the pixel colour
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led);
+ for (uint8_t j = 0; j < led_count; ++j) {
+ if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) continue;
+
+ HSV hsv = {170 - qsub8(val, 85), rgb_matrix_config.hsv.s, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.hsv.v)};
+ RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
+ rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b);
+ }
+
+ if (decrease_heatmap_values) {
+ g_rgb_frame_buffer[row][col] = qsub8(val, 1);
+ }
+ }
+
+ return led_max < sizeof(g_rgb_frame_buffer);
+}
+
+# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c
new file mode 100644
index 0000000000..789cd28605
--- /dev/null
+++ b/quantum/rgb_matrix/rgb_matrix.c
@@ -0,0 +1,640 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2017 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * 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 .
+ */
+
+#include "rgb_matrix.h"
+#include "progmem.h"
+#include "config.h"
+#include "eeprom.h"
+#include
+#include
+
+#include
+
+#ifndef RGB_MATRIX_CENTER
+const led_point_t k_rgb_matrix_center = {112, 32};
+#else
+const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
+#endif
+
+// clang-format off
+#ifndef RGB_MATRIX_IMMEDIATE_EEPROM
+# define rgb_eeconfig_update(v) rgb_update_eeprom |= v
+#else
+# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix()
+#endif
+// clang-format on
+
+__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
+
+// Generic effect runners
+#include "rgb_matrix_runners.inc"
+
+// ------------------------------------------
+// -----Begin rgb effect includes macros-----
+#define RGB_MATRIX_EFFECT(name)
+#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+#include "rgb_matrix_effects.inc"
+#ifdef RGB_MATRIX_CUSTOM_KB
+# include "rgb_matrix_kb.inc"
+#endif
+#ifdef RGB_MATRIX_CUSTOM_USER
+# include "rgb_matrix_user.inc"
+#endif
+
+#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+#undef RGB_MATRIX_EFFECT
+// -----End rgb effect includes macros-------
+// ------------------------------------------
+
+#if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT)
+# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200UL)
+#endif
+
+#ifndef RGB_DISABLE_TIMEOUT
+# define RGB_DISABLE_TIMEOUT 0
+#endif
+
+#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX
+# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX
+#endif
+
+#if !defined(RGB_MATRIX_HUE_STEP)
+# define RGB_MATRIX_HUE_STEP 8
+#endif
+
+#if !defined(RGB_MATRIX_SAT_STEP)
+# define RGB_MATRIX_SAT_STEP 16
+#endif
+
+#if !defined(RGB_MATRIX_VAL_STEP)
+# define RGB_MATRIX_VAL_STEP 16
+#endif
+
+#if !defined(RGB_MATRIX_SPD_STEP)
+# define RGB_MATRIX_SPD_STEP 16
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_MODE)
+# ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
+# else
+// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
+# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
+# endif
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_HUE)
+# define RGB_MATRIX_STARTUP_HUE 0
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_SAT)
+# define RGB_MATRIX_STARTUP_SAT UINT8_MAX
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_VAL)
+# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_SPD)
+# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2
+#endif
+
+// globals
+rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr
+uint32_t g_rgb_timer;
+#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
+uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
+#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+last_hit_t g_last_hit_tracker;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+// internals
+static bool suspend_state = false;
+static bool rgb_update_eeprom = false;
+static uint8_t rgb_last_enable = UINT8_MAX;
+static uint8_t rgb_last_effect = UINT8_MAX;
+static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false};
+static rgb_task_states rgb_task_state = SYNCING;
+#if RGB_DISABLE_TIMEOUT > 0
+static uint32_t rgb_anykey_timer;
+#endif // RGB_DISABLE_TIMEOUT > 0
+
+// double buffers
+static uint32_t rgb_timer_buffer;
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+static last_hit_t last_hit_buffer;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+// split rgb matrix
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
+#endif
+
+void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
+
+void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); }
+
+void eeconfig_update_rgb_matrix_default(void) {
+ dprintf("eeconfig_update_rgb_matrix_default\n");
+ rgb_matrix_config.enable = 1;
+ rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
+ rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
+ rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
+ rgb_matrix_config.flags = LED_FLAG_ALL;
+ eeconfig_update_rgb_matrix();
+}
+
+void eeconfig_debug_rgb_matrix(void) {
+ dprintf("rgb_matrix_config EEPROM\n");
+ dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable);
+ dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode);
+ dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h);
+ dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s);
+ dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v);
+ dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed);
+ dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags);
+}
+
+__attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; }
+
+uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
+ uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
+ uint8_t led_index = g_led_config.matrix_co[row][column];
+ if (led_index != NO_LED) {
+ led_i[led_count] = led_index;
+ led_count++;
+ }
+ return led_count;
+}
+
+void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); }
+
+void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ if (!is_keyboard_left() && index >= k_rgb_matrix_split[0])
+ rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue);
+ else if (is_keyboard_left() && index < k_rgb_matrix_split[0])
+#endif
+ rgb_matrix_driver.set_color(index, red, green, blue);
+}
+
+void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
+#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT)
+ for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) rgb_matrix_set_color(i, red, green, blue);
+#else
+ rgb_matrix_driver.set_color_all(red, green, blue);
+#endif
+}
+
+void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) {
+#ifndef RGB_MATRIX_SPLIT
+ if (!is_keyboard_master()) return;
+#endif
+#if RGB_DISABLE_TIMEOUT > 0
+ rgb_anykey_timer = 0;
+#endif // RGB_DISABLE_TIMEOUT > 0
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t led[LED_HITS_TO_REMEMBER];
+ uint8_t led_count = 0;
+
+# if defined(RGB_MATRIX_KEYRELEASES)
+ if (!pressed)
+# elif defined(RGB_MATRIX_KEYPRESSES)
+ if (pressed)
+# endif // defined(RGB_MATRIX_KEYRELEASES)
+ {
+ led_count = rgb_matrix_map_row_column_to_led(row, col, led);
+ }
+
+ if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) {
+ memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
+ memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
+ memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
+ last_hit_buffer.count--;
+ }
+
+ for (uint8_t i = 0; i < led_count; i++) {
+ uint8_t index = last_hit_buffer.count;
+ last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
+ last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
+ last_hit_buffer.index[index] = led[i];
+ last_hit_buffer.tick[index] = 0;
+ last_hit_buffer.count++;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
+ if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) {
+ process_rgb_matrix_typing_heatmap(row, col);
+ }
+#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
+}
+
+void rgb_matrix_test(void) {
+ // Mask out bits 4 and 5
+ // Increase the factor to make the test animation slower (and reduce to make it faster)
+ uint8_t factor = 10;
+ switch ((g_rgb_timer & (0b11 << factor)) >> factor) {
+ case 0: {
+ rgb_matrix_set_color_all(20, 0, 0);
+ break;
+ }
+ case 1: {
+ rgb_matrix_set_color_all(0, 20, 0);
+ break;
+ }
+ case 2: {
+ rgb_matrix_set_color_all(0, 0, 20);
+ break;
+ }
+ case 3: {
+ rgb_matrix_set_color_all(20, 20, 20);
+ break;
+ }
+ }
+}
+
+static bool rgb_matrix_none(effect_params_t *params) {
+ if (!params->init) {
+ return false;
+ }
+
+ rgb_matrix_set_color_all(0, 0, 0);
+ return false;
+}
+
+static void rgb_task_timers(void) {
+#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
+ uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer);
+#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
+ rgb_timer_buffer = sync_timer_read32();
+
+ // Update double buffer timers
+#if RGB_DISABLE_TIMEOUT > 0
+ if (rgb_anykey_timer < UINT32_MAX) {
+ if (UINT32_MAX - deltaTime < rgb_anykey_timer) {
+ rgb_anykey_timer = UINT32_MAX;
+ } else {
+ rgb_anykey_timer += deltaTime;
+ }
+ }
+#endif // RGB_DISABLE_TIMEOUT > 0
+
+ // Update double buffer last hit timers
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ uint8_t count = last_hit_buffer.count;
+ for (uint8_t i = 0; i < count; ++i) {
+ if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) {
+ last_hit_buffer.count--;
+ continue;
+ }
+ last_hit_buffer.tick[i] += deltaTime;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+}
+
+static void rgb_task_sync(void) {
+ // next task
+ if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
+ rgb_update_eeprom = false;
+ if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
+}
+
+static void rgb_task_start(void) {
+ // reset iter
+ rgb_effect_params.iter = 0;
+
+ // update double buffers
+ g_rgb_timer = rgb_timer_buffer;
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker = last_hit_buffer;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+ // next task
+ rgb_task_state = RENDERING;
+}
+
+static void rgb_task_render(uint8_t effect) {
+ bool rendering = false;
+ rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable);
+ if (rgb_effect_params.flags != rgb_matrix_config.flags) {
+ rgb_effect_params.flags = rgb_matrix_config.flags;
+ rgb_matrix_set_color_all(0, 0, 0);
+ }
+
+ // each effect can opt to do calculations
+ // and/or request PWM buffer updates.
+ switch (effect) {
+ case RGB_MATRIX_NONE:
+ rendering = rgb_matrix_none(&rgb_effect_params);
+ break;
+
+// ---------------------------------------------
+// -----Begin rgb effect switch case macros-----
+#define RGB_MATRIX_EFFECT(name, ...) \
+ case RGB_MATRIX_##name: \
+ rendering = name(&rgb_effect_params); \
+ break;
+#include "rgb_matrix_effects.inc"
+#undef RGB_MATRIX_EFFECT
+
+#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
+# define RGB_MATRIX_EFFECT(name, ...) \
+ case RGB_MATRIX_CUSTOM_##name: \
+ rendering = name(&rgb_effect_params); \
+ break;
+# ifdef RGB_MATRIX_CUSTOM_KB
+# include "rgb_matrix_kb.inc"
+# endif
+# ifdef RGB_MATRIX_CUSTOM_USER
+# include "rgb_matrix_user.inc"
+# endif
+# undef RGB_MATRIX_EFFECT
+#endif
+ // -----End rgb effect switch case macros-------
+ // ---------------------------------------------
+
+ // Factory default magic value
+ case UINT8_MAX: {
+ rgb_matrix_test();
+ rgb_task_state = FLUSHING;
+ }
+ return;
+ }
+
+ rgb_effect_params.iter++;
+
+ // next task
+ if (!rendering) {
+ rgb_task_state = FLUSHING;
+ if (!rgb_effect_params.init && effect == RGB_MATRIX_NONE) {
+ // We only need to flush once if we are RGB_MATRIX_NONE
+ rgb_task_state = SYNCING;
+ }
+ }
+}
+
+static void rgb_task_flush(uint8_t effect) {
+ // update last trackers after the first full render so we can init over several frames
+ rgb_last_effect = effect;
+ rgb_last_enable = rgb_matrix_config.enable;
+
+ // update pwm buffers
+ rgb_matrix_update_pwm_buffers();
+
+ // next task
+ rgb_task_state = SYNCING;
+}
+
+void rgb_matrix_task(void) {
+ rgb_task_timers();
+
+ // Ideally we would also stop sending zeros to the LED driver PWM buffers
+ // while suspended and just do a software shutdown. This is a cheap hack for now.
+ bool suspend_backlight = suspend_state ||
+#if RGB_DISABLE_TIMEOUT > 0
+ (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) ||
+#endif // RGB_DISABLE_TIMEOUT > 0
+ false;
+
+ uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode;
+
+ switch (rgb_task_state) {
+ case STARTING:
+ rgb_task_start();
+ break;
+ case RENDERING:
+ rgb_task_render(effect);
+ if (effect) {
+ rgb_matrix_indicators();
+ rgb_matrix_indicators_advanced(&rgb_effect_params);
+ }
+ break;
+ case FLUSHING:
+ rgb_task_flush(effect);
+ break;
+ case SYNCING:
+ rgb_task_sync();
+ break;
+ }
+}
+
+void rgb_matrix_indicators(void) {
+ rgb_matrix_indicators_kb();
+ rgb_matrix_indicators_user();
+}
+
+__attribute__((weak)) void rgb_matrix_indicators_kb(void) {}
+
+__attribute__((weak)) void rgb_matrix_indicators_user(void) {}
+
+void rgb_matrix_indicators_advanced(effect_params_t *params) {
+ /* special handling is needed for "params->iter", since it's already been incremented.
+ * Could move the invocations to rgb_task_render, but then it's missing a few checks
+ * and not sure which would be better. Otherwise, this should be called from
+ * rgb_task_render, right before the iter++ line.
+ */
+#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+ uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1);
+ uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT;
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+ uint8_t min = 0;
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+ rgb_matrix_indicators_advanced_kb(min, max);
+ rgb_matrix_indicators_advanced_user(min, max);
+}
+
+__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {}
+
+__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {}
+
+void rgb_matrix_init(void) {
+ rgb_matrix_driver.init();
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+ g_last_hit_tracker.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ g_last_hit_tracker.tick[i] = UINT16_MAX;
+ }
+
+ last_hit_buffer.count = 0;
+ for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) {
+ last_hit_buffer.tick[i] = UINT16_MAX;
+ }
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+ if (!eeconfig_is_enabled()) {
+ dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
+ eeconfig_init();
+ eeconfig_update_rgb_matrix_default();
+ }
+
+ eeconfig_read_rgb_matrix();
+ if (!rgb_matrix_config.mode) {
+ dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");
+ eeconfig_update_rgb_matrix_default();
+ }
+ eeconfig_debug_rgb_matrix(); // display current eeprom values
+}
+
+void rgb_matrix_set_suspend_state(bool state) {
+#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
+ if (state) {
+ rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending
+ }
+ suspend_state = state;
+#endif
+}
+
+bool rgb_matrix_get_suspend_state(void) { return suspend_state; }
+
+void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) {
+ rgb_matrix_config.enable ^= 1;
+ rgb_task_state = STARTING;
+ rgb_eeconfig_update(write_to_eeprom);
+ dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable);
+}
+void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); }
+void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); }
+
+void rgb_matrix_enable(void) {
+ rgb_matrix_enable_noeeprom();
+ rgb_eeconfig_update(true);
+}
+
+void rgb_matrix_enable_noeeprom(void) {
+ if (!rgb_matrix_config.enable) rgb_task_state = STARTING;
+ rgb_matrix_config.enable = 1;
+}
+
+void rgb_matrix_disable(void) {
+ rgb_matrix_disable_noeeprom();
+ rgb_eeconfig_update(true);
+}
+
+void rgb_matrix_disable_noeeprom(void) {
+ if (rgb_matrix_config.enable) rgb_task_state = STARTING;
+ rgb_matrix_config.enable = 0;
+}
+
+uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; }
+
+void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
+ if (!rgb_matrix_config.enable) {
+ return;
+ }
+ if (mode < 1) {
+ rgb_matrix_config.mode = 1;
+ } else if (mode >= RGB_MATRIX_EFFECT_MAX) {
+ rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1;
+ } else {
+ rgb_matrix_config.mode = mode;
+ }
+ rgb_task_state = STARTING;
+ rgb_eeconfig_update(write_to_eeprom);
+ dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode);
+}
+void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); }
+void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); }
+
+uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; }
+
+void rgb_matrix_step_helper(bool write_to_eeprom) {
+ uint8_t mode = rgb_matrix_config.mode + 1;
+ rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom);
+}
+void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); }
+void rgb_matrix_step(void) { rgb_matrix_step_helper(true); }
+
+void rgb_matrix_step_reverse_helper(bool write_to_eeprom) {
+ uint8_t mode = rgb_matrix_config.mode - 1;
+ rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom);
+}
+void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); }
+void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); }
+
+void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) {
+ if (!rgb_matrix_config.enable) {
+ return;
+ }
+ rgb_matrix_config.hsv.h = hue;
+ rgb_matrix_config.hsv.s = sat;
+ rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val;
+ rgb_eeconfig_update(write_to_eeprom);
+ dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
+}
+void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); }
+void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); }
+
+HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; }
+uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; }
+uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; }
+uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; }
+
+void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); }
+void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); }
+void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); }
+
+void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); }
+void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); }
+void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); }
+
+void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); }
+void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); }
+void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); }
+
+void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); }
+void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); }
+void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); }
+
+void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); }
+void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); }
+void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); }
+
+void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); }
+void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); }
+void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); }
+
+void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
+ rgb_matrix_config.speed = speed;
+ rgb_eeconfig_update(write_to_eeprom);
+ dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed);
+}
+void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); }
+void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); }
+
+uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; }
+
+void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); }
+void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); }
+void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); }
+
+void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); }
+void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); }
+void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); }
+
+led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; }
+
+void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; }
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h
new file mode 100644
index 0000000000..28f07c84d6
--- /dev/null
+++ b/quantum/rgb_matrix/rgb_matrix.h
@@ -0,0 +1,228 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2017 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include
+#include
+#include "rgb_matrix_types.h"
+#include "color.h"
+#include "quantum.h"
+#include "rgblight_list.h"
+
+#ifdef IS31FL3731
+# include "is31fl3731.h"
+#elif defined(IS31FL3733)
+# include "is31fl3733.h"
+#elif defined(IS31FL3737)
+# include "is31fl3737.h"
+#elif defined(IS31FL3741)
+# include "is31fl3741.h"
+#elif defined(AW20216)
+# include "aw20216.h"
+#elif defined(WS2812)
+# include "ws2812.h"
+#endif
+
+#ifndef RGB_MATRIX_LED_FLUSH_LIMIT
+# define RGB_MATRIX_LED_FLUSH_LIMIT 16
+#endif
+
+#ifndef RGB_MATRIX_LED_PROCESS_LIMIT
+# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5
+#endif
+
+#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
+# define RGB_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \
+ uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \
+ if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
+#else
+# define RGB_MATRIX_USE_LIMITS(min, max) \
+ uint8_t min = 0; \
+ uint8_t max = DRIVER_LED_TOTAL;
+#endif
+
+#define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) \
+ if (i >= led_min && i <= led_max) { \
+ rgb_matrix_set_color(i, r, g, b); \
+ }
+
+#define RGB_MATRIX_TEST_LED_FLAGS() \
+ if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
+
+enum rgb_matrix_effects {
+ RGB_MATRIX_NONE = 0,
+
+// --------------------------------------
+// -----Begin rgb effect enum macros-----
+#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name,
+#include "rgb_matrix_effects.inc"
+#undef RGB_MATRIX_EFFECT
+
+#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
+# define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name,
+# ifdef RGB_MATRIX_CUSTOM_KB
+# include "rgb_matrix_kb.inc"
+# endif
+# ifdef RGB_MATRIX_CUSTOM_USER
+# include "rgb_matrix_user.inc"
+# endif
+# undef RGB_MATRIX_EFFECT
+#endif
+ // --------------------------------------
+ // -----End rgb effect enum macros-------
+
+ RGB_MATRIX_EFFECT_MAX
+};
+
+void eeconfig_update_rgb_matrix_default(void);
+void eeconfig_update_rgb_matrix(void);
+
+uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i);
+uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i);
+
+void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
+void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
+
+void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed);
+
+void rgb_matrix_task(void);
+
+// This runs after another backlight effect and replaces
+// colors already set
+void rgb_matrix_indicators(void);
+void rgb_matrix_indicators_kb(void);
+void rgb_matrix_indicators_user(void);
+
+void rgb_matrix_indicators_advanced(effect_params_t *params);
+void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max);
+void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
+
+void rgb_matrix_init(void);
+
+void rgb_matrix_set_suspend_state(bool state);
+bool rgb_matrix_get_suspend_state(void);
+void rgb_matrix_toggle(void);
+void rgb_matrix_toggle_noeeprom(void);
+void rgb_matrix_enable(void);
+void rgb_matrix_enable_noeeprom(void);
+void rgb_matrix_disable(void);
+void rgb_matrix_disable_noeeprom(void);
+uint8_t rgb_matrix_is_enabled(void);
+void rgb_matrix_mode(uint8_t mode);
+void rgb_matrix_mode_noeeprom(uint8_t mode);
+uint8_t rgb_matrix_get_mode(void);
+void rgb_matrix_step(void);
+void rgb_matrix_step_noeeprom(void);
+void rgb_matrix_step_reverse(void);
+void rgb_matrix_step_reverse_noeeprom(void);
+void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
+void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
+HSV rgb_matrix_get_hsv(void);
+uint8_t rgb_matrix_get_hue(void);
+uint8_t rgb_matrix_get_sat(void);
+uint8_t rgb_matrix_get_val(void);
+void rgb_matrix_increase_hue(void);
+void rgb_matrix_increase_hue_noeeprom(void);
+void rgb_matrix_decrease_hue(void);
+void rgb_matrix_decrease_hue_noeeprom(void);
+void rgb_matrix_increase_sat(void);
+void rgb_matrix_increase_sat_noeeprom(void);
+void rgb_matrix_decrease_sat(void);
+void rgb_matrix_decrease_sat_noeeprom(void);
+void rgb_matrix_increase_val(void);
+void rgb_matrix_increase_val_noeeprom(void);
+void rgb_matrix_decrease_val(void);
+void rgb_matrix_decrease_val_noeeprom(void);
+void rgb_matrix_set_speed(uint8_t speed);
+void rgb_matrix_set_speed_noeeprom(uint8_t speed);
+uint8_t rgb_matrix_get_speed(void);
+void rgb_matrix_increase_speed(void);
+void rgb_matrix_increase_speed_noeeprom(void);
+void rgb_matrix_decrease_speed(void);
+void rgb_matrix_decrease_speed_noeeprom(void);
+led_flags_t rgb_matrix_get_flags(void);
+void rgb_matrix_set_flags(led_flags_t flags);
+
+#ifndef RGBLIGHT_ENABLE
+# define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix
+# define rgblight_toggle rgb_matrix_toggle
+# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom
+# define rgblight_enable rgb_matrix_enable
+# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom
+# define rgblight_disable rgb_matrix_disable
+# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom
+# define rgblight_is_enabled rgb_matrix_is_enabled
+# define rgblight_mode rgb_matrix_mode
+# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom
+# define rgblight_get_mode rgb_matrix_get_mode
+# define rgblight_get_hue rgb_matrix_get_hue
+# define rgblight_get_sat rgb_matrix_get_sat
+# define rgblight_get_val rgb_matrix_get_val
+# define rgblight_get_hsv rgb_matrix_get_hsv
+# define rgblight_step rgb_matrix_step
+# define rgblight_step_noeeprom rgb_matrix_step_noeeprom
+# define rgblight_step_reverse rgb_matrix_step_reverse
+# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom
+# define rgblight_sethsv rgb_matrix_sethsv
+# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom
+# define rgblight_increase_hue rgb_matrix_increase_hue
+# define rgblight_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom
+# define rgblight_decrease_hue rgb_matrix_decrease_hue
+# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom
+# define rgblight_increase_sat rgb_matrix_increase_sat
+# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom
+# define rgblight_decrease_sat rgb_matrix_decrease_sat
+# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom
+# define rgblight_increase_val rgb_matrix_increase_val
+# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom
+# define rgblight_decrease_val rgb_matrix_decrease_val
+# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom
+# define rgblight_set_speed rgb_matrix_set_speed
+# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom
+# define rgblight_get_speed rgb_matrix_get_speed
+# define rgblight_increase_speed rgb_matrix_increase_speed
+# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom
+# define rgblight_decrease_speed rgb_matrix_decrease_speed
+# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom
+#endif
+
+typedef struct {
+ /* Perform any initialisation required for the other driver functions to work. */
+ void (*init)(void);
+ /* Set the colour of a single LED in the buffer. */
+ void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b);
+ /* Set the colour of all LEDS on the keyboard in the buffer. */
+ void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b);
+ /* Flush any buffered changes to the hardware. */
+ void (*flush)(void);
+} rgb_matrix_driver_t;
+
+extern const rgb_matrix_driver_t rgb_matrix_driver;
+
+extern rgb_config_t rgb_matrix_config;
+
+extern uint32_t g_rgb_timer;
+extern led_config_t g_led_config;
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+extern last_hit_t g_last_hit_tracker;
+#endif
+#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
+extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
+#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
new file mode 100644
index 0000000000..6a11d4791e
--- /dev/null
+++ b/quantum/rgb_matrix/rgb_matrix_drivers.c
@@ -0,0 +1,228 @@
+/* Copyright 2018 James Laird-Wah
+ *
+ * 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 .
+ */
+
+#include "rgb_matrix.h"
+
+/* Each driver needs to define the struct
+ * const rgb_matrix_driver_t rgb_matrix_driver;
+ * All members must be provided.
+ * Keyboard custom drivers can define this in their own files, it should only
+ * be here if shared between boards.
+ */
+
+#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741)
+
+# include "i2c_master.h"
+
+static void init(void) {
+ i2c_init();
+# ifdef IS31FL3731
+ IS31FL3731_init(DRIVER_ADDR_1);
+# ifdef DRIVER_ADDR_2
+ IS31FL3731_init(DRIVER_ADDR_2);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3731_init(DRIVER_ADDR_3);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3731_init(DRIVER_ADDR_4);
+# endif
+# elif defined(IS31FL3733)
+# ifndef DRIVER_SYNC_1
+# define DRIVER_SYNC_1 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
+# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2)
+# ifndef DRIVER_SYNC_2
+# define DRIVER_SYNC_2 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
+# endif
+# ifdef DRIVER_ADDR_3
+# ifndef DRIVER_SYNC_3
+# define DRIVER_SYNC_3 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
+# endif
+# ifdef DRIVER_ADDR_4
+# ifndef DRIVER_SYNC_4
+# define DRIVER_SYNC_4 0
+# endif
+ IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
+# endif
+# elif defined(IS31FL3737)
+ IS31FL3737_init(DRIVER_ADDR_1);
+# else
+ IS31FL3741_init(DRIVER_ADDR_1);
+# endif
+ for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
+ bool enabled = true;
+ // This only caches it for later
+# ifdef IS31FL3731
+ IS31FL3731_set_led_control_register(index, enabled, enabled, enabled);
+# elif defined(IS31FL3733)
+ IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
+# elif defined(IS31FL3737)
+ IS31FL3737_set_led_control_register(index, enabled, enabled, enabled);
+# else
+ IS31FL3741_set_led_control_register(index, enabled, enabled, enabled);
+# endif
+ }
+ // This actually updates the LED drivers
+# ifdef IS31FL3731
+ IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
+ IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
+# elif defined(IS31FL3733)
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
+# endif
+# elif defined(IS31FL3737)
+ IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2);
+# else
+ IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
+# endif
+}
+
+# ifdef IS31FL3731
+static void flush(void) {
+ IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
+ IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3731_set_color,
+ .set_color_all = IS31FL3731_set_color_all,
+};
+# elif defined(IS31FL3733)
+static void flush(void) {
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
+# ifdef DRIVER_ADDR_2
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
+# endif
+# ifdef DRIVER_ADDR_3
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
+# endif
+# ifdef DRIVER_ADDR_4
+ IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
+# endif
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3733_set_color,
+ .set_color_all = IS31FL3733_set_color_all,
+};
+# elif defined(IS31FL3737)
+static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); }
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3737_set_color,
+ .set_color_all = IS31FL3737_set_color_all,
+};
+# else
+static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); }
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = IS31FL3741_set_color,
+ .set_color_all = IS31FL3741_set_color_all,
+};
+# endif
+
+#elif defined(AW20216)
+# include "spi_master.h"
+static void init(void) {
+ spi_init();
+ AW20216_init();
+}
+
+static void flush(void) { AW20216_update_pwm_buffers(); }
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = AW20216_set_color,
+ .set_color_all = AW20216_set_color_all,
+};
+
+#elif defined(WS2812)
+# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
+# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
+# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration."
+# endif
+
+// LED color buffer
+LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL];
+
+static void init(void) {}
+
+static void flush(void) {
+ // Assumes use of RGB_DI_PIN
+ ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL);
+}
+
+// Set an led in the buffer to a color
+static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) {
+ rgb_matrix_ws2812_array[i].r = r;
+ rgb_matrix_ws2812_array[i].g = g;
+ rgb_matrix_ws2812_array[i].b = b;
+# ifdef RGBW
+ convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]);
+# endif
+}
+
+static void setled_all(uint8_t r, uint8_t g, uint8_t b) {
+ for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) {
+ setled(i, r, g, b);
+ }
+}
+
+const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = setled,
+ .set_color_all = setled_all,
+};
+#endif
diff --git a/quantum/rgb_matrix/rgb_matrix_types.h b/quantum/rgb_matrix/rgb_matrix_types.h
new file mode 100644
index 0000000000..df575d6577
--- /dev/null
+++ b/quantum/rgb_matrix/rgb_matrix_types.h
@@ -0,0 +1,98 @@
+/* Copyright 2021
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include
+#include
+#include "color.h"
+
+#if defined(__GNUC__)
+# define PACKED __attribute__((__packed__))
+#else
+# define PACKED
+#endif
+
+#if defined(_MSC_VER)
+# pragma pack(push, 1)
+#endif
+
+#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
+# define RGB_MATRIX_KEYREACTIVE_ENABLED
+#endif
+
+// Last led hit
+#ifndef LED_HITS_TO_REMEMBER
+# define LED_HITS_TO_REMEMBER 8
+#endif // LED_HITS_TO_REMEMBER
+
+#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
+typedef struct PACKED {
+ uint8_t count;
+ uint8_t x[LED_HITS_TO_REMEMBER];
+ uint8_t y[LED_HITS_TO_REMEMBER];
+ uint8_t index[LED_HITS_TO_REMEMBER];
+ uint16_t tick[LED_HITS_TO_REMEMBER];
+} last_hit_t;
+#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+
+typedef enum rgb_task_states { STARTING, RENDERING, FLUSHING, SYNCING } rgb_task_states;
+
+typedef uint8_t led_flags_t;
+
+typedef struct PACKED {
+ uint8_t iter;
+ led_flags_t flags;
+ bool init;
+} effect_params_t;
+
+typedef struct PACKED {
+ uint8_t x;
+ uint8_t y;
+} led_point_t;
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
+
+#define LED_FLAG_ALL 0xFF
+#define LED_FLAG_NONE 0x00
+#define LED_FLAG_MODIFIER 0x01
+#define LED_FLAG_UNDERGLOW 0x02
+#define LED_FLAG_KEYLIGHT 0x04
+#define LED_FLAG_INDICATOR 0x08
+
+#define NO_LED 255
+
+typedef struct PACKED {
+ uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
+ led_point_t point[DRIVER_LED_TOTAL];
+ uint8_t flags[DRIVER_LED_TOTAL];
+} led_config_t;
+
+typedef union {
+ uint32_t raw;
+ struct PACKED {
+ uint8_t enable : 2;
+ uint8_t mode : 6;
+ HSV hsv;
+ uint8_t speed; // EECONFIG needs to be increased to support this
+ led_flags_t flags;
+ };
+} rgb_config_t;
+
+#if defined(_MSC_VER)
+# pragma pack(pop)
+#endif
diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h
deleted file mode 100644
index 426d88ef35..0000000000
--- a/quantum/rgb_matrix_animations/alpha_mods_anim.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
-RGB_MATRIX_EFFECT(ALPHAS_MODS)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// alphas = color1, mods = color2
-bool ALPHAS_MODS(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- HSV hsv = rgb_matrix_config.hsv;
- RGB rgb1 = rgb_matrix_hsv_to_rgb(hsv);
- hsv.h += rgb_matrix_config.speed;
- RGB rgb2 = rgb_matrix_hsv_to_rgb(hsv);
-
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
- rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
- } else {
- rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);
- }
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h
deleted file mode 100644
index 340bd93e5d..0000000000
--- a/quantum/rgb_matrix_animations/breathing_anim.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BREATHING
-RGB_MATRIX_EFFECT(BREATHING)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool BREATHING(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- HSV hsv = rgb_matrix_config.hsv;
- uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
- hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BREATHING
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
deleted file mode 100644
index 3df3cfda7d..0000000000
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
- hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s);
- return hsv;
-}
-
-bool BAND_PINWHEEL_SAT(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
deleted file mode 100644
index 7d80074fd5..0000000000
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
- hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v);
- return hsv;
-}
-
-bool BAND_PINWHEEL_VAL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h
deleted file mode 100644
index 35b830af6b..0000000000
--- a/quantum/rgb_matrix_animations/colorband_sat_anim.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_SAT
-RGB_MATRIX_EFFECT(BAND_SAT)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) {
- int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
- hsv.s = scale8(s < 0 ? 0 : s, hsv.s);
- return hsv;
-}
-
-bool BAND_SAT(effect_params_t* params) { return effect_runner_i(params, &BAND_SAT_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_SAT
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
deleted file mode 100644
index 048157aa1b..0000000000
--- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s);
- return hsv;
-}
-
-bool BAND_SPIRAL_SAT(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
deleted file mode 100644
index bff2da1616..0000000000
--- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v);
- return hsv;
-}
-
-bool BAND_SPIRAL_VAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h
deleted file mode 100644
index f1aaf1d067..0000000000
--- a/quantum/rgb_matrix_animations/colorband_val_anim.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_BAND_VAL
-RGB_MATRIX_EFFECT(BAND_VAL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) {
- int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
- hsv.v = scale8(v < 0 ? 0 : v, hsv.v);
- return hsv;
-}
-
-bool BAND_VAL(effect_params_t* params) { return effect_runner_i(params, &BAND_VAL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_BAND_VAL
diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h
deleted file mode 100644
index faf8598a39..0000000000
--- a/quantum/rgb_matrix_animations/cycle_all_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
-RGB_MATRIX_EFFECT(CYCLE_ALL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) {
- hsv.h = time;
- return hsv;
-}
-
-bool CYCLE_ALL(effect_params_t* params) { return effect_runner_i(params, &CYCLE_ALL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h
deleted file mode 100644
index cf911eb937..0000000000
--- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) {
- hsv.h = g_led_config.point[i].x - time;
- return hsv;
-}
-
-bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h
deleted file mode 100644
index d66acd4b2b..0000000000
--- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN
-RGB_MATRIX_EFFECT(CYCLE_OUT_IN)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv.h = 3 * dist / 2 + time;
- return hsv;
-}
-
-bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN
diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h
deleted file mode 100644
index fe8396140f..0000000000
--- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
- dx = (k_rgb_matrix_center.x / 2) - abs8(dx);
- uint8_t dist = sqrt16(dx * dx + dy * dy);
- hsv.h = 3 * dist + time;
- return hsv;
-}
-
-bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h
deleted file mode 100644
index 7799887099..0000000000
--- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
-RGB_MATRIX_EFFECT(CYCLE_PINWHEEL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) {
- hsv.h = atan2_8(dy, dx) + time;
- return hsv;
-}
-
-bool CYCLE_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h
deleted file mode 100644
index 80cfb0dbc7..0000000000
--- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL
-RGB_MATRIX_EFFECT(CYCLE_SPIRAL)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv.h = dist - time - atan2_8(dy, dx);
- return hsv;
-}
-
-bool CYCLE_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL
diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h
deleted file mode 100644
index 5016f739d6..0000000000
--- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
-RGB_MATRIX_EFFECT(CYCLE_UP_DOWN)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) {
- hsv.h = g_led_config.point[i].y - time;
- return hsv;
-}
-
-bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h
deleted file mode 100644
index 1de45f8e8d..0000000000
--- a/quantum/rgb_matrix_animations/digital_rain_anim.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
-RGB_MATRIX_EFFECT(DIGITAL_RAIN)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-# ifndef RGB_DIGITAL_RAIN_DROPS
-// lower the number for denser effect/wider keyboard
-# define RGB_DIGITAL_RAIN_DROPS 24
-# endif
-
-bool DIGITAL_RAIN(effect_params_t* params) {
- // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
- const uint8_t drop_ticks = 28;
- const uint8_t pure_green_intensity = 0xd0;
- const uint8_t max_brightness_boost = 0xc0;
- const uint8_t max_intensity = 0xff;
-
- static uint8_t drop = 0;
-
- if (params->init) {
- rgb_matrix_set_color_all(0, 0, 0);
- memset(g_rgb_frame_buffer, 0, sizeof(g_rgb_frame_buffer));
- drop = 0;
- }
-
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
- // top row, pixels have just fallen and we're
- // making a new rain drop in this column
- g_rgb_frame_buffer[row][col] = max_intensity;
- } else if (g_rgb_frame_buffer[row][col] > 0 && g_rgb_frame_buffer[row][col] < max_intensity) {
- // neither fully bright nor dark, decay it
- g_rgb_frame_buffer[row][col]--;
- }
- // set the pixel colour
- uint8_t led[LED_HITS_TO_REMEMBER];
- uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led);
-
- // TODO: multiple leds are supported mapped to the same row/column
- if (led_count > 0) {
- if (g_rgb_frame_buffer[row][col] > pure_green_intensity) {
- const uint8_t boost = (uint8_t)((uint16_t)max_brightness_boost * (g_rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity));
- rgb_matrix_set_color(led[0], boost, max_intensity, boost);
- } else {
- const uint8_t green = (uint8_t)((uint16_t)max_intensity * g_rgb_frame_buffer[row][col] / pure_green_intensity);
- rgb_matrix_set_color(led[0], 0, green, 0);
- }
- }
- }
- }
-
- if (++drop > drop_ticks) {
- // reset drop timer
- drop = 0;
- for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- // if ths is on the bottom row and bright allow decay
- if (row == MATRIX_ROWS - 1 && g_rgb_frame_buffer[row][col] == max_intensity) {
- g_rgb_frame_buffer[row][col]--;
- }
- // check if the pixel above is bright
- if (g_rgb_frame_buffer[row - 1][col] == max_intensity) {
- // allow old bright pixel to decay
- g_rgb_frame_buffer[row - 1][col]--;
- // make this pixel bright
- g_rgb_frame_buffer[row][col] = max_intensity;
- }
- }
- }
- }
- return false;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h
deleted file mode 100644
index ce94871681..0000000000
--- a/quantum/rgb_matrix_animations/dual_beacon_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
-RGB_MATRIX_EFFECT(DUAL_BEACON)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
- hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128;
- return hsv;
-}
-
-bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
diff --git a/quantum/rgb_matrix_animations/gradient_left_right_anim.h b/quantum/rgb_matrix_animations/gradient_left_right_anim.h
deleted file mode 100644
index 53dfd04e2c..0000000000
--- a/quantum/rgb_matrix_animations/gradient_left_right_anim.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool GRADIENT_LEFT_RIGHT(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- HSV hsv = rgb_matrix_config.hsv;
- uint8_t scale = scale8(64, rgb_matrix_config.speed);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- // The x range will be 0..224, map this to 0..7
- // Relies on hue being 8-bit and wrapping
- hsv.h = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5);
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h
deleted file mode 100644
index 7e0d2898cf..0000000000
--- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool GRADIENT_UP_DOWN(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- HSV hsv = rgb_matrix_config.hsv;
- uint8_t scale = scale8(64, rgb_matrix_config.speed);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- // The y range will be 0..64, map this to 0..4
- // Relies on hue being 8-bit and wrapping
- hsv.h = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4);
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
diff --git a/quantum/rgb_matrix_animations/hue_breathing_anim.h b/quantum/rgb_matrix_animations/hue_breathing_anim.h
deleted file mode 100644
index 54dea958af..0000000000
--- a/quantum/rgb_matrix_animations/hue_breathing_anim.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING
-RGB_MATRIX_EFFECT(HUE_BREATHING)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// Change huedelta to adjust range of hue change. 0-255.
-// Hue Breathing - All LED's light up
-bool HUE_BREATHING(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- uint8_t huedelta = 12;
- HSV hsv = rgb_matrix_config.hsv;
- uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8);
- hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta);
- RGB rgb = hsv_to_rgb(hsv);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_HUE_BREATHING
diff --git a/quantum/rgb_matrix_animations/hue_pendulum_anim.h b/quantum/rgb_matrix_animations/hue_pendulum_anim.h
deleted file mode 100644
index 2d8d36174f..0000000000
--- a/quantum/rgb_matrix_animations/hue_pendulum_anim.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM
-RGB_MATRIX_EFFECT(HUE_PENDULUM)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// Change huedelta to adjust range of hue change. 0-255.
-// Looks better with a low value and slow speed for subtle change.
-// Hue Pendulum - color changes in a wave to the right before reversing direction
-static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) {
- uint8_t huedelta = 12;
- hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta);
- return hsv;
-}
-
-bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_HUE_PENDULUM
diff --git a/quantum/rgb_matrix_animations/hue_wave_anim.h b/quantum/rgb_matrix_animations/hue_wave_anim.h
deleted file mode 100644
index fd9026fc90..0000000000
--- a/quantum/rgb_matrix_animations/hue_wave_anim.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_HUE_WAVE
-RGB_MATRIX_EFFECT(HUE_WAVE)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-// Change huedelta to adjust range of hue change. 0-255.
-// Looks better with a low value and slow speed for subtle change.
-// Hue Wave - color changes in a wave to the right
-static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) {
- uint8_t huedelta = 24;
- hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta);
- return hsv;
-}
-
-bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_HUE_WAVE
diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
deleted file mode 100644
index a17e954b1b..0000000000
--- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
- if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
- HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v};
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
-}
-
-bool JELLYBEAN_RAINDROPS(effect_params_t* params) {
- if (!params->init) {
- // Change one LED every tick, make sure speed is not 0
- if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
- jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
- }
- return false;
- }
-
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (int i = led_min; i < led_max; i++) {
- jellybean_raindrops_set_color(i, params);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h
deleted file mode 100644
index 977261182f..0000000000
--- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
-RGB_MATRIX_EFFECT(RAINBOW_BEACON)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
- hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128;
- return hsv;
-}
-
-bool RAINBOW_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
deleted file mode 100644
index e51e7b2516..0000000000
--- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) {
- hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time);
- return hsv;
-}
-
-bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
deleted file mode 100644
index 1cd4ed2acf..0000000000
--- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) {
- hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128;
- return hsv;
-}
-
-bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h
deleted file mode 100644
index 38359cdca7..0000000000
--- a/quantum/rgb_matrix_animations/raindrops_anim.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef DISABLE_RGB_MATRIX_RAINDROPS
-RGB_MATRIX_EFFECT(RAINDROPS)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static void raindrops_set_color(int i, effect_params_t* params) {
- if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
- HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v};
-
- // Take the shortest path between hues
- int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4;
- if (deltaH > 127) {
- deltaH -= 256;
- } else if (deltaH < -127) {
- deltaH += 256;
- }
-
- hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03));
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
-}
-
-bool RAINDROPS(effect_params_t* params) {
- if (!params->init) {
- // Change one LED every tick, make sure speed is not 0
- if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
- raindrops_set_color(rand() % DRIVER_LED_TOTAL, params);
- }
- return false;
- }
-
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
- for (int i = led_min; i < led_max; i++) {
- raindrops_set_color(i, params);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // DISABLE_RGB_MATRIX_RAINDROPS
diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc
deleted file mode 100644
index 053d441506..0000000000
--- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory
-#include "rgb_matrix_animations/solid_color_anim.h"
-#include "rgb_matrix_animations/alpha_mods_anim.h"
-#include "rgb_matrix_animations/gradient_up_down_anim.h"
-#include "rgb_matrix_animations/gradient_left_right_anim.h"
-#include "rgb_matrix_animations/breathing_anim.h"
-#include "rgb_matrix_animations/colorband_sat_anim.h"
-#include "rgb_matrix_animations/colorband_val_anim.h"
-#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h"
-#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h"
-#include "rgb_matrix_animations/colorband_spiral_sat_anim.h"
-#include "rgb_matrix_animations/colorband_spiral_val_anim.h"
-#include "rgb_matrix_animations/cycle_all_anim.h"
-#include "rgb_matrix_animations/cycle_left_right_anim.h"
-#include "rgb_matrix_animations/cycle_up_down_anim.h"
-#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
-#include "rgb_matrix_animations/cycle_out_in_anim.h"
-#include "rgb_matrix_animations/cycle_out_in_dual_anim.h"
-#include "rgb_matrix_animations/cycle_pinwheel_anim.h"
-#include "rgb_matrix_animations/cycle_spiral_anim.h"
-#include "rgb_matrix_animations/dual_beacon_anim.h"
-#include "rgb_matrix_animations/rainbow_beacon_anim.h"
-#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
-#include "rgb_matrix_animations/raindrops_anim.h"
-#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
-#include "rgb_matrix_animations/hue_breathing_anim.h"
-#include "rgb_matrix_animations/hue_pendulum_anim.h"
-#include "rgb_matrix_animations/hue_wave_anim.h"
-#include "rgb_matrix_animations/typing_heatmap_anim.h"
-#include "rgb_matrix_animations/digital_rain_anim.h"
-#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
-#include "rgb_matrix_animations/solid_reactive_anim.h"
-#include "rgb_matrix_animations/solid_reactive_wide.h"
-#include "rgb_matrix_animations/solid_reactive_cross.h"
-#include "rgb_matrix_animations/solid_reactive_nexus.h"
-#include "rgb_matrix_animations/splash_anim.h"
-#include "rgb_matrix_animations/solid_splash_anim.h"
diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h
deleted file mode 100644
index 79d63cf133..0000000000
--- a/quantum/rgb_matrix_animations/solid_color_anim.h
+++ /dev/null
@@ -1,15 +0,0 @@
-RGB_MATRIX_EFFECT(SOLID_COLOR)
-#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-bool SOLID_COLOR(effect_params_t* params) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h
deleted file mode 100644
index d45bb961bc..0000000000
--- a/quantum/rgb_matrix_animations/solid_reactive_anim.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
-RGB_MATRIX_EFFECT(SOLID_REACTIVE)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) {
- hsv.h += qsub8(130, offset);
- return hsv;
-}
-
-bool SOLID_REACTIVE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h
deleted file mode 100644
index f76c68e8c7..0000000000
--- a/quantum/rgb_matrix_animations/solid_reactive_cross.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
-# endif
-
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick + dist;
- dx = dx < 0 ? dx * -1 : dx;
- dy = dy < 0 ? dy * -1 : dy;
- dx = dx * 16 > 255 ? 255 : dx * 16;
- dy = dy * 16 > 255 ? 255 : dy * 16;
- effect += dx > dy ? dy : dx;
- if (effect > 255) effect = 255;
- hsv.v = qadd8(hsv.v, 255 - effect);
- return hsv;
-}
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); }
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); }
-# endif
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h
deleted file mode 100644
index 17f94e3c18..0000000000
--- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
-# endif
-
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick - dist;
- if (effect > 255) effect = 255;
- if (dist > 72) effect = 255;
- if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255;
- hsv.v = qadd8(hsv.v, 255 - effect);
- hsv.h = rgb_matrix_config.hsv.h + dy / 4;
- return hsv;
-}
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); }
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); }
-# endif
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
deleted file mode 100644
index 12eb248cc0..0000000000
--- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) {
- hsv.v = scale8(255 - offset, hsv.v);
- return hsv;
-}
-
-bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); }
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h
deleted file mode 100644
index 1cc4dca728..0000000000
--- a/quantum/rgb_matrix_animations/solid_reactive_wide.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
-# endif
-
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick + dist * 5;
- if (effect > 255) effect = 255;
- hsv.v = qadd8(hsv.v, 255 - effect);
- return hsv;
-}
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); }
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); }
-# endif
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h
deleted file mode 100644
index 99efb4996a..0000000000
--- a/quantum/rgb_matrix_animations/solid_splash_anim.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
-RGB_MATRIX_EFFECT(SOLID_SPLASH)
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-RGB_MATRIX_EFFECT(SOLID_MULTISPLASH)
-# endif
-
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick - dist;
- if (effect > 255) effect = 255;
- hsv.v = qadd8(hsv.v, 255 - effect);
- return hsv;
-}
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
-bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); }
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
-bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); }
-# endif
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h
deleted file mode 100644
index 1415bcc0fa..0000000000
--- a/quantum/rgb_matrix_animations/splash_anim.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-# if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
-
-# ifndef DISABLE_RGB_MATRIX_SPLASH
-RGB_MATRIX_EFFECT(SPLASH)
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_MULTISPLASH
-RGB_MATRIX_EFFECT(MULTISPLASH)
-# endif
-
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-HSV SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) {
- uint16_t effect = tick - dist;
- if (effect > 255) effect = 255;
- hsv.h += effect;
- hsv.v = qadd8(hsv.v, 255 - effect);
- return hsv;
-}
-
-# ifndef DISABLE_RGB_MATRIX_SPLASH
-bool SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SPLASH_math); }
-# endif
-
-# ifndef DISABLE_RGB_MATRIX_MULTISPLASH
-bool MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SPLASH_math); }
-# endif
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h
deleted file mode 100644
index e7dda11a2f..0000000000
--- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
-RGB_MATRIX_EFFECT(TYPING_HEATMAP)
-# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-
-# ifndef RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS
-# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25
-# endif
-
-void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
- uint8_t m_row = row - 1;
- uint8_t p_row = row + 1;
- uint8_t m_col = col - 1;
- uint8_t p_col = col + 1;
-
- if (m_col < col) g_rgb_frame_buffer[row][m_col] = qadd8(g_rgb_frame_buffer[row][m_col], 16);
- g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
- if (p_col < MATRIX_COLS) g_rgb_frame_buffer[row][p_col] = qadd8(g_rgb_frame_buffer[row][p_col], 16);
-
- if (p_row < MATRIX_ROWS) {
- if (m_col < col) g_rgb_frame_buffer[p_row][m_col] = qadd8(g_rgb_frame_buffer[p_row][m_col], 13);
- g_rgb_frame_buffer[p_row][col] = qadd8(g_rgb_frame_buffer[p_row][col], 16);
- if (p_col < MATRIX_COLS) g_rgb_frame_buffer[p_row][p_col] = qadd8(g_rgb_frame_buffer[p_row][p_col], 13);
- }
-
- if (m_row < row) {
- if (m_col < col) g_rgb_frame_buffer[m_row][m_col] = qadd8(g_rgb_frame_buffer[m_row][m_col], 13);
- g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16);
- if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13);
- }
-}
-
-// A timer to track the last time we decremented all heatmap values.
-static uint16_t heatmap_decrease_timer;
-// Whether we should decrement the heatmap values during the next update.
-static bool decrease_heatmap_values;
-
-bool TYPING_HEATMAP(effect_params_t* params) {
- // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size
- uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter;
- uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT;
- if (led_max > sizeof(g_rgb_frame_buffer)) led_max = sizeof(g_rgb_frame_buffer);
-
- if (params->init) {
- rgb_matrix_set_color_all(0, 0, 0);
- memset(g_rgb_frame_buffer, 0, sizeof g_rgb_frame_buffer);
- }
-
- // The heatmap animation might run in several iterations depending on
- // `RGB_MATRIX_LED_PROCESS_LIMIT`, therefore we only want to update the
- // timer when the animation starts.
- if (params->iter == 0) {
- decrease_heatmap_values = timer_elapsed(heatmap_decrease_timer) >= RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS;
-
- // Restart the timer if we are going to decrease the heatmap this frame.
- if (decrease_heatmap_values) {
- heatmap_decrease_timer = timer_read();
- }
- }
-
- // Render heatmap & decrease
- for (int i = led_min; i < led_max; i++) {
- uint8_t row = i % MATRIX_ROWS;
- uint8_t col = i / MATRIX_ROWS;
- uint8_t val = g_rgb_frame_buffer[row][col];
-
- // set the pixel colour
- uint8_t led[LED_HITS_TO_REMEMBER];
- uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led);
- for (uint8_t j = 0; j < led_count; ++j) {
- if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) continue;
-
- HSV hsv = {170 - qsub8(val, 85), rgb_matrix_config.hsv.s, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.hsv.v)};
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b);
- }
-
- if (decrease_heatmap_values) {
- g_rgb_frame_buffer[row][col] = qsub8(val, 1);
- }
- }
-
- return led_max < sizeof(g_rgb_frame_buffer);
-}
-
-# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
-#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
deleted file mode 100644
index 6a11d4791e..0000000000
--- a/quantum/rgb_matrix_drivers.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Copyright 2018 James Laird-Wah
- *
- * 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 .
- */
-
-#include "rgb_matrix.h"
-
-/* Each driver needs to define the struct
- * const rgb_matrix_driver_t rgb_matrix_driver;
- * All members must be provided.
- * Keyboard custom drivers can define this in their own files, it should only
- * be here if shared between boards.
- */
-
-#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741)
-
-# include "i2c_master.h"
-
-static void init(void) {
- i2c_init();
-# ifdef IS31FL3731
- IS31FL3731_init(DRIVER_ADDR_1);
-# ifdef DRIVER_ADDR_2
- IS31FL3731_init(DRIVER_ADDR_2);
-# endif
-# ifdef DRIVER_ADDR_3
- IS31FL3731_init(DRIVER_ADDR_3);
-# endif
-# ifdef DRIVER_ADDR_4
- IS31FL3731_init(DRIVER_ADDR_4);
-# endif
-# elif defined(IS31FL3733)
-# ifndef DRIVER_SYNC_1
-# define DRIVER_SYNC_1 0
-# endif
- IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1);
-# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2)
-# ifndef DRIVER_SYNC_2
-# define DRIVER_SYNC_2 0
-# endif
- IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2);
-# endif
-# ifdef DRIVER_ADDR_3
-# ifndef DRIVER_SYNC_3
-# define DRIVER_SYNC_3 0
-# endif
- IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3);
-# endif
-# ifdef DRIVER_ADDR_4
-# ifndef DRIVER_SYNC_4
-# define DRIVER_SYNC_4 0
-# endif
- IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4);
-# endif
-# elif defined(IS31FL3737)
- IS31FL3737_init(DRIVER_ADDR_1);
-# else
- IS31FL3741_init(DRIVER_ADDR_1);
-# endif
- for (int index = 0; index < DRIVER_LED_TOTAL; index++) {
- bool enabled = true;
- // This only caches it for later
-# ifdef IS31FL3731
- IS31FL3731_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3733)
- IS31FL3733_set_led_control_register(index, enabled, enabled, enabled);
-# elif defined(IS31FL3737)
- IS31FL3737_set_led_control_register(index, enabled, enabled, enabled);
-# else
- IS31FL3741_set_led_control_register(index, enabled, enabled, enabled);
-# endif
- }
- // This actually updates the LED drivers
-# ifdef IS31FL3731
- IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
- IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
- IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
- IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3);
-# endif
-# elif defined(IS31FL3733)
- IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
- IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
- IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
- IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3);
-# endif
-# elif defined(IS31FL3737)
- IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2);
-# else
- IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0);
-# endif
-}
-
-# ifdef IS31FL3731
-static void flush(void) {
- IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
- IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
- IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
- IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3);
-# endif
-}
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3731_set_color,
- .set_color_all = IS31FL3731_set_color_all,
-};
-# elif defined(IS31FL3733)
-static void flush(void) {
- IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0);
-# ifdef DRIVER_ADDR_2
- IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1);
-# endif
-# ifdef DRIVER_ADDR_3
- IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2);
-# endif
-# ifdef DRIVER_ADDR_4
- IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3);
-# endif
-}
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3733_set_color,
- .set_color_all = IS31FL3733_set_color_all,
-};
-# elif defined(IS31FL3737)
-static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); }
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3737_set_color,
- .set_color_all = IS31FL3737_set_color_all,
-};
-# else
-static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); }
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = IS31FL3741_set_color,
- .set_color_all = IS31FL3741_set_color_all,
-};
-# endif
-
-#elif defined(AW20216)
-# include "spi_master.h"
-static void init(void) {
- spi_init();
- AW20216_init();
-}
-
-static void flush(void) { AW20216_update_pwm_buffers(); }
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = AW20216_set_color,
- .set_color_all = AW20216_set_color_all,
-};
-
-#elif defined(WS2812)
-# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
-# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
-# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration."
-# endif
-
-// LED color buffer
-LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL];
-
-static void init(void) {}
-
-static void flush(void) {
- // Assumes use of RGB_DI_PIN
- ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL);
-}
-
-// Set an led in the buffer to a color
-static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) {
- rgb_matrix_ws2812_array[i].r = r;
- rgb_matrix_ws2812_array[i].g = g;
- rgb_matrix_ws2812_array[i].b = b;
-# ifdef RGBW
- convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]);
-# endif
-}
-
-static void setled_all(uint8_t r, uint8_t g, uint8_t b) {
- for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) {
- setled(i, r, g, b);
- }
-}
-
-const rgb_matrix_driver_t rgb_matrix_driver = {
- .init = init,
- .flush = flush,
- .set_color = setled,
- .set_color_all = setled_all,
-};
-#endif
diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h
deleted file mode 100644
index 4867609c81..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-typedef HSV (*dx_dy_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t time);
-
-bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
- int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
- RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h
deleted file mode 100644
index 9545b418d9..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-
-typedef HSV (*dx_dy_dist_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time);
-
-bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x;
- int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y;
- uint8_t dist = sqrt16(dx * dx + dy * dy);
- RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix_runners/effect_runner_i.h
deleted file mode 100644
index 95bfe8b390..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_i.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma once
-
-typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time);
-
-bool effect_runner_i(effect_params_t* params, i_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4);
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix_runners/effect_runner_reactive.h
deleted file mode 100644
index 8485b61f3d..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_reactive.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#pragma once
-
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-
-typedef HSV (*reactive_f)(HSV hsv, uint16_t offset);
-
-bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint16_t max_tick = 65535 / rgb_matrix_config.speed;
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- uint16_t tick = max_tick;
- // Reverse search to find most recent key hit
- for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) {
- if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) {
- tick = g_last_hit_tracker.tick[j];
- break;
- }
- }
-
- uint16_t offset = scale16by8(tick, rgb_matrix_config.speed);
- RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h
deleted file mode 100644
index 5c69d0fbb9..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#pragma once
-
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-
-typedef HSV (*reactive_splash_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick);
-
-bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint8_t count = g_last_hit_tracker.count;
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- HSV hsv = rgb_matrix_config.hsv;
- hsv.v = 0;
- for (uint8_t j = start; j < count; j++) {
- int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
- int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
- uint8_t dist = sqrt16(dx * dx + dy * dy);
- uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed);
- hsv = effect_func(hsv, dx, dy, dist, tick);
- }
- hsv.v = scale8(hsv.v, rgb_matrix_config.hsv.v);
- RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
-
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h
deleted file mode 100644
index 02351de51e..0000000000
--- a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-typedef HSV (*sin_cos_i_f)(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time);
-
-bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) {
- RGB_MATRIX_USE_LIMITS(led_min, led_max);
-
- uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4);
- int8_t cos_value = cos8(time) - 128;
- int8_t sin_value = sin8(time) - 128;
- for (uint8_t i = led_min; i < led_max; i++) {
- RGB_MATRIX_TEST_LED_FLAGS();
- RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
- }
- return led_max < DRIVER_LED_TOTAL;
-}
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h
deleted file mode 100644
index df575d6577..0000000000
--- a/quantum/rgb_matrix_types.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Copyright 2021
- *
- * 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 .
- */
-
-#pragma once
-
-#include
-#include
-#include "color.h"
-
-#if defined(__GNUC__)
-# define PACKED __attribute__((__packed__))
-#else
-# define PACKED
-#endif
-
-#if defined(_MSC_VER)
-# pragma pack(push, 1)
-#endif
-
-#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
-# define RGB_MATRIX_KEYREACTIVE_ENABLED
-#endif
-
-// Last led hit
-#ifndef LED_HITS_TO_REMEMBER
-# define LED_HITS_TO_REMEMBER 8
-#endif // LED_HITS_TO_REMEMBER
-
-#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
-typedef struct PACKED {
- uint8_t count;
- uint8_t x[LED_HITS_TO_REMEMBER];
- uint8_t y[LED_HITS_TO_REMEMBER];
- uint8_t index[LED_HITS_TO_REMEMBER];
- uint16_t tick[LED_HITS_TO_REMEMBER];
-} last_hit_t;
-#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
-
-typedef enum rgb_task_states { STARTING, RENDERING, FLUSHING, SYNCING } rgb_task_states;
-
-typedef uint8_t led_flags_t;
-
-typedef struct PACKED {
- uint8_t iter;
- led_flags_t flags;
- bool init;
-} effect_params_t;
-
-typedef struct PACKED {
- uint8_t x;
- uint8_t y;
-} led_point_t;
-
-#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
-#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00)
-
-#define LED_FLAG_ALL 0xFF
-#define LED_FLAG_NONE 0x00
-#define LED_FLAG_MODIFIER 0x01
-#define LED_FLAG_UNDERGLOW 0x02
-#define LED_FLAG_KEYLIGHT 0x04
-#define LED_FLAG_INDICATOR 0x08
-
-#define NO_LED 255
-
-typedef struct PACKED {
- uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS];
- led_point_t point[DRIVER_LED_TOTAL];
- uint8_t flags[DRIVER_LED_TOTAL];
-} led_config_t;
-
-typedef union {
- uint32_t raw;
- struct PACKED {
- uint8_t enable : 2;
- uint8_t mode : 6;
- HSV hsv;
- uint8_t speed; // EECONFIG needs to be increased to support this
- led_flags_t flags;
- };
-} rgb_config_t;
-
-#if defined(_MSC_VER)
-# pragma pack(pop)
-#endif
--
cgit v1.2.3
From 791363a6806d575e767ccf1de5bedb6224e39f97 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Wed, 23 Jun 2021 10:16:41 +1000
Subject: Remove rgblight stubs (#13302)
---
quantum/process_keycode/process_rgb.c | 1 -
quantum/rgb.h | 39 -----------------------------------
2 files changed, 40 deletions(-)
delete mode 100644 quantum/rgb.h
(limited to 'quantum')
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
index 167c0c03c9..b9fee1ca59 100644
--- a/quantum/process_keycode/process_rgb.c
+++ b/quantum/process_keycode/process_rgb.c
@@ -14,7 +14,6 @@
* along with this program. If not, see .
*/
#include "process_rgb.h"
-#include "rgb.h"
typedef void (*rgb_func_pointer)(void);
diff --git a/quantum/rgb.h b/quantum/rgb.h
deleted file mode 100644
index 2602fc0b20..0000000000
--- a/quantum/rgb.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2017 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 .
- */
-
-#pragma once
-
-__attribute__((weak)) void rgblight_toggle(void){};
-
-__attribute__((weak)) void rgblight_step(void){};
-
-__attribute__((weak)) void rgblight_step_reverse(void){};
-
-__attribute__((weak)) void rgblight_increase_hue(void){};
-
-__attribute__((weak)) void rgblight_decrease_hue(void){};
-
-__attribute__((weak)) void rgblight_increase_sat(void){};
-
-__attribute__((weak)) void rgblight_decrease_sat(void){};
-
-__attribute__((weak)) void rgblight_increase_val(void){};
-
-__attribute__((weak)) void rgblight_decrease_val(void){};
-
-__attribute__((weak)) void rgblight_increase_speed(void){};
-
-__attribute__((weak)) void rgblight_decrease_speed(void){};
--
cgit v1.2.3
From cb23fe9fc1fa6e2219380228ae589f3d733ea4e6 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Mon, 28 Jun 2021 15:15:24 +1000
Subject: Move RGBLight code into its own folder (#13312)
---
common_features.mk | 5 +-
docs/cli_commands.md | 2 +-
docs/feature_rgblight.md | 4 +-
keyboards/mxss/rules.mk | 26 +-
quantum/rgblight.c | 1391 -----------------------------
quantum/rgblight.h | 442 ---------
quantum/rgblight/rgblight.c | 1391 +++++++++++++++++++++++++++++
quantum/rgblight/rgblight.h | 442 +++++++++
quantum/rgblight/rgblight_breathe_table.h | 117 +++
quantum/rgblight/rgblight_modes.h | 75 ++
quantum/rgblight/rgblight_post_config.h | 5 +
quantum/rgblight_breathe_table.h | 117 ---
quantum/rgblight_modes.h | 75 --
quantum/rgblight_post_config.h | 5 -
14 files changed, 2045 insertions(+), 2052 deletions(-)
delete mode 100644 quantum/rgblight.c
delete mode 100644 quantum/rgblight.h
create mode 100644 quantum/rgblight/rgblight.c
create mode 100644 quantum/rgblight/rgblight.h
create mode 100644 quantum/rgblight/rgblight_breathe_table.h
create mode 100644 quantum/rgblight/rgblight_modes.h
create mode 100644 quantum/rgblight/rgblight_post_config.h
delete mode 100644 quantum/rgblight_breathe_table.h
delete mode 100644 quantum/rgblight_modes.h
delete mode 100644 quantum/rgblight_post_config.h
(limited to 'quantum')
diff --git a/common_features.mk b/common_features.mk
index 9373d1de25..2d3f00d216 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -196,10 +196,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
$(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
else
- POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
+ COMMON_VPATH += $(QUANTUM_DIR)/rgblight
+ POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/color.c
- SRC += $(QUANTUM_DIR)/rgblight.c
+ SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index 581342093a..e30593daa9 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -368,7 +368,7 @@ qmk generate-docs
## `qmk generate-rgb-breathe-table`
-This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`.
+This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
**Usage**:
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 994a014a28..0e75411f09 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -119,7 +119,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
-Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
+Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight/rgblight.h` there is a contrast table between the old mode number and the current symbol.
### Effect and Animation Toggles
@@ -328,7 +328,7 @@ Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with
## Functions
-If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
+If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight/rgblight.h) for the full list, but the most commonly used functions include:
### Utility Functions
|Function |Description |
diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk
index 7dc98d4739..40de15828a 100644
--- a/keyboards/mxss/rules.mk
+++ b/keyboards/mxss/rules.mk
@@ -2,39 +2,31 @@
MCU = atmega32u4
# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# ATmega32A bootloadHID
-# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
+CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# 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 this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
-MIDI_ENABLE = no # MIDI support
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = no # Audio output
SRC += mxss_frontled.c
# Remove the common RGB light code and use my iteration instead
+COMMON_VPATH += $(QUANTUM_DIR)/rgblight
OPT_DEFS += -DRGBLIGHT_ENABLE
-SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
SRC += rgblight.c
-SRC += color.c
-SRC += ws2812.c
+SRC += $(QUANTUM_DIR)/color.c
+WS2812_DRIVER_REQUIRED = yes
CIE1931_CURVE = yes
+RGB_KEYCODES_ENABLE = yes
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
deleted file mode 100644
index baa10ec416..0000000000
--- a/quantum/rgblight.c
+++ /dev/null
@@ -1,1391 +0,0 @@
-/* Copyright 2016-2017 Yang Liu
- *
- * 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 .
- */
-#include
-#include
-#include
-#ifdef __AVR__
-# include
-# include
-#endif
-#ifdef EEPROM_ENABLE
-# include "eeprom.h"
-#endif
-#ifdef STM32_EEPROM_ENABLE
-# include
-# include "eeprom_stm32.h"
-#endif
-#include "wait.h"
-#include "progmem.h"
-#include "sync_timer.h"
-#include "rgblight.h"
-#include "color.h"
-#include "debug.h"
-#include "led_tables.h"
-#include
-#ifdef VELOCIKEY_ENABLE
-# include "velocikey.h"
-#endif
-
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-#ifndef MAX
-# define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#endif
-
-#ifdef RGBLIGHT_SPLIT
-/* for split keyboard */
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE
-# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS)
-# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_LAYERS
-# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER
-# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK
-#else
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODE
-# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS
-# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS
-# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE
-# define RGBLIGHT_SPLIT_ANIMATION_TICK
-#endif
-
-#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_SINGLE_DYNAMIC(sym)
-#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_DYNAMIC(sym)
-#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_DYNAMIC(sym, msym)
-static uint8_t static_effect_table[] = {
-#include "rgblight_modes.h"
-};
-
-#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym,
-#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym,
-static uint8_t mode_base_table[] = {
- 0, // RGBLIGHT_MODE_zero
-#include "rgblight_modes.h"
-};
-
-#if !defined(RGBLIGHT_DEFAULT_MODE)
-# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT
-#endif
-
-#if !defined(RGBLIGHT_DEFAULT_HUE)
-# define RGBLIGHT_DEFAULT_HUE 0
-#endif
-
-#if !defined(RGBLIGHT_DEFAULT_SAT)
-# define RGBLIGHT_DEFAULT_SAT UINT8_MAX
-#endif
-
-#if !defined(RGBLIGHT_DEFAULT_VAL)
-# define RGBLIGHT_DEFAULT_VAL RGBLIGHT_LIMIT_VAL
-#endif
-
-#if !defined(RGBLIGHT_DEFAULT_SPD)
-# define RGBLIGHT_DEFAULT_SPD 0
-#endif
-
-static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; }
-
-#ifdef RGBLIGHT_LED_MAP
-const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP;
-#endif
-
-#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
-__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
-#endif
-
-rgblight_config_t rgblight_config;
-rgblight_status_t rgblight_status = {.timer_enabled = false};
-bool is_rgblight_initialized = false;
-
-#ifdef RGBLIGHT_SLEEP
-static bool is_suspended;
-static bool pre_suspend_enabled;
-#endif
-
-#ifdef RGBLIGHT_USE_TIMER
-animation_status_t animation_status = {};
-#endif
-
-#ifndef LED_ARRAY
-LED_TYPE led[RGBLED_NUM];
-# define LED_ARRAY led
-#endif
-
-#ifdef RGBLIGHT_LAYERS
-rgblight_segment_t const *const *rgblight_layers = NULL;
-#endif
-
-rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM};
-
-void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
- rgblight_ranges.clipping_start_pos = start_pos;
- rgblight_ranges.clipping_num_leds = num_leds;
-}
-
-void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
- if (start_pos >= RGBLED_NUM) return;
- if (start_pos + num_leds > RGBLED_NUM) return;
- rgblight_ranges.effect_start_pos = start_pos;
- rgblight_ranges.effect_end_pos = start_pos + num_leds;
- rgblight_ranges.effect_num_leds = num_leds;
-}
-
-__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
-
-void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
- HSV hsv = {hue, sat, val};
- RGB rgb = rgblight_hsv_to_rgb(hsv);
- setrgb(rgb.r, rgb.g, rgb.b, led1);
-}
-
-void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); }
-
-void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
- led1->r = r;
- led1->g = g;
- led1->b = b;
-#ifdef RGBW
- led1->w = 0;
-#endif
-}
-
-void rgblight_check_config(void) {
- /* Add some out of bound checks for RGB light config */
-
- if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) {
- rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
- } else if (rgblight_config.mode > RGBLIGHT_MODES) {
- rgblight_config.mode = RGBLIGHT_MODES;
- }
-
- if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) {
- rgblight_config.val = RGBLIGHT_LIMIT_VAL;
- }
-}
-
-uint32_t eeconfig_read_rgblight(void) {
-#ifdef EEPROM_ENABLE
- return eeprom_read_dword(EECONFIG_RGBLIGHT);
-#else
- return 0;
-#endif
-}
-
-void eeconfig_update_rgblight(uint32_t val) {
-#ifdef EEPROM_ENABLE
- rgblight_check_config();
- eeprom_update_dword(EECONFIG_RGBLIGHT, val);
-#endif
-}
-
-void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); }
-
-void eeconfig_update_rgblight_default(void) {
- rgblight_config.enable = 1;
- rgblight_config.mode = RGBLIGHT_DEFAULT_MODE;
- rgblight_config.hue = RGBLIGHT_DEFAULT_HUE;
- rgblight_config.sat = RGBLIGHT_DEFAULT_SAT;
- rgblight_config.val = RGBLIGHT_DEFAULT_VAL;
- rgblight_config.speed = RGBLIGHT_DEFAULT_SPD;
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- eeconfig_update_rgblight(rgblight_config.raw);
-}
-
-void eeconfig_debug_rgblight(void) {
- dprintf("rgblight_config EEPROM:\n");
- dprintf("rgblight_config.enable = %d\n", rgblight_config.enable);
- dprintf("rghlight_config.mode = %d\n", rgblight_config.mode);
- dprintf("rgblight_config.hue = %d\n", rgblight_config.hue);
- dprintf("rgblight_config.sat = %d\n", rgblight_config.sat);
- dprintf("rgblight_config.val = %d\n", rgblight_config.val);
- dprintf("rgblight_config.speed = %d\n", rgblight_config.speed);
-}
-
-void rgblight_init(void) {
- /* if already initialized, don't do it again.
- If you must do it again, extern this and set to false, first.
- This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */
- if (is_rgblight_initialized) {
- return;
- }
-
- dprintf("rgblight_init called.\n");
- dprintf("rgblight_init start!\n");
- if (!eeconfig_is_enabled()) {
- dprintf("rgblight_init eeconfig is not enabled.\n");
- eeconfig_init();
- eeconfig_update_rgblight_default();
- }
- rgblight_config.raw = eeconfig_read_rgblight();
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- if (!rgblight_config.mode) {
- dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n");
- eeconfig_update_rgblight_default();
- rgblight_config.raw = eeconfig_read_rgblight();
- }
- rgblight_check_config();
-
- eeconfig_debug_rgblight(); // display current eeprom values
-
- rgblight_timer_init(); // setup the timer
-
- if (rgblight_config.enable) {
- rgblight_mode_noeeprom(rgblight_config.mode);
- }
-
- is_rgblight_initialized = true;
-}
-
-void rgblight_reload_from_eeprom(void) {
- /* Reset back to what we have in eeprom */
- rgblight_config.raw = eeconfig_read_rgblight();
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- rgblight_check_config();
- eeconfig_debug_rgblight(); // display current eeprom values
- if (rgblight_config.enable) {
- rgblight_mode_noeeprom(rgblight_config.mode);
- }
-}
-
-uint32_t rgblight_read_dword(void) { return rgblight_config.raw; }
-
-void rgblight_update_dword(uint32_t dword) {
- RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
- rgblight_config.raw = dword;
- if (rgblight_config.enable)
- rgblight_mode_noeeprom(rgblight_config.mode);
- else {
- rgblight_timer_disable();
- rgblight_set();
- }
-}
-
-void rgblight_increase(void) {
- uint8_t mode = 0;
- if (rgblight_config.mode < RGBLIGHT_MODES) {
- mode = rgblight_config.mode + 1;
- }
- rgblight_mode(mode);
-}
-void rgblight_decrease(void) {
- uint8_t mode = 0;
- // Mode will never be < 1. If it ever is, eeprom needs to be initialized.
- if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) {
- mode = rgblight_config.mode - 1;
- }
- rgblight_mode(mode);
-}
-void rgblight_step_helper(bool write_to_eeprom) {
- uint8_t mode = 0;
- mode = rgblight_config.mode + 1;
- if (mode > RGBLIGHT_MODES) {
- mode = 1;
- }
- rgblight_mode_eeprom_helper(mode, write_to_eeprom);
-}
-void rgblight_step_noeeprom(void) { rgblight_step_helper(false); }
-void rgblight_step(void) { rgblight_step_helper(true); }
-void rgblight_step_reverse_helper(bool write_to_eeprom) {
- uint8_t mode = 0;
- mode = rgblight_config.mode - 1;
- if (mode < 1) {
- mode = RGBLIGHT_MODES;
- }
- rgblight_mode_eeprom_helper(mode, write_to_eeprom);
-}
-void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); }
-void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); }
-
-uint8_t rgblight_get_mode(void) {
- if (!rgblight_config.enable) {
- return false;
- }
-
- return rgblight_config.mode;
-}
-
-void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
- if (!rgblight_config.enable) {
- return;
- }
- if (mode < RGBLIGHT_MODE_STATIC_LIGHT) {
- rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
- } else if (mode > RGBLIGHT_MODES) {
- rgblight_config.mode = RGBLIGHT_MODES;
- } else {
- rgblight_config.mode = mode;
- }
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode);
- } else {
- dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode);
- }
- if (is_static_effect(rgblight_config.mode)) {
- rgblight_timer_disable();
- } else {
- rgblight_timer_enable();
- }
-#ifdef RGBLIGHT_USE_TIMER
- animation_status.restart = true;
-#endif
- rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
-}
-
-void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); }
-
-void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); }
-
-void rgblight_toggle(void) {
- dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
- if (rgblight_config.enable) {
- rgblight_disable();
- } else {
- rgblight_enable();
- }
-}
-
-void rgblight_toggle_noeeprom(void) {
- dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
- if (rgblight_config.enable) {
- rgblight_disable_noeeprom();
- } else {
- rgblight_enable_noeeprom();
- }
-}
-
-void rgblight_enable(void) {
- rgblight_config.enable = 1;
- // No need to update EEPROM here. rgblight_mode() will do that, actually
- // eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_mode(rgblight_config.mode);
-}
-
-void rgblight_enable_noeeprom(void) {
- rgblight_config.enable = 1;
- dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_mode_noeeprom(rgblight_config.mode);
-}
-
-void rgblight_disable(void) {
- rgblight_config.enable = 0;
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_timer_disable();
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- wait_ms(50);
- rgblight_set();
-}
-
-void rgblight_disable_noeeprom(void) {
- rgblight_config.enable = 0;
- dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
- rgblight_timer_disable();
- RGBLIGHT_SPLIT_SET_CHANGE_MODE;
- wait_ms(50);
- rgblight_set();
-}
-
-bool rgblight_is_enabled(void) { return rgblight_config.enable; }
-
-void rgblight_increase_hue_helper(bool write_to_eeprom) {
- uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
- rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); }
-void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); }
-void rgblight_decrease_hue_helper(bool write_to_eeprom) {
- uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP;
- rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); }
-void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); }
-void rgblight_increase_sat_helper(bool write_to_eeprom) {
- uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); }
-void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); }
-void rgblight_decrease_sat_helper(bool write_to_eeprom) {
- uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
-}
-void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); }
-void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); }
-void rgblight_increase_val_helper(bool write_to_eeprom) {
- uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
-}
-void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); }
-void rgblight_increase_val(void) { rgblight_increase_val_helper(true); }
-void rgblight_decrease_val_helper(bool write_to_eeprom) {
- uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP);
- rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
-}
-void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); }
-void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); }
-
-void rgblight_increase_speed_helper(bool write_to_eeprom) {
- if (rgblight_config.speed < 3) rgblight_config.speed++;
- // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- }
-}
-void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); }
-void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); }
-
-void rgblight_decrease_speed_helper(bool write_to_eeprom) {
- if (rgblight_config.speed > 0) rgblight_config.speed--;
- // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED??
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- }
-}
-void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); }
-void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); }
-
-void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
- if (rgblight_config.enable) {
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
- }
-}
-
-void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) {
- if (rgblight_config.enable) {
- rgblight_status.base_mode = mode_base_table[rgblight_config.mode];
- if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) {
- // same static color
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
- } else {
- // all LEDs in same color
- if (1 == 0) { // dummy
- }
-#ifdef RGBLIGHT_EFFECT_BREATHING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
- // breathing mode, ignore the change of val, use in memory value instead
- val = rgblight_config.val;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
- // rainbow mood, ignore the change of hue
- hue = rgblight_config.hue;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
- // rainbow swirl, ignore the change of hue
- hue = rgblight_config.hue;
- }
-#endif
-#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) {
- // static gradient
- uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
- bool direction = (delta % 2) == 0;
-# ifdef __AVR__
- // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line
- uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]);
-# else
- uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
-# endif
- for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds;
- if (direction) {
- _hue = hue + _hue;
- } else {
- _hue = hue - _hue;
- }
- dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
- sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
- }
-#endif
- }
-#ifdef RGBLIGHT_SPLIT
- if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) {
- RGBLIGHT_SPLIT_SET_CHANGE_HSVS;
- }
-#endif
- rgblight_config.hue = hue;
- rgblight_config.sat = sat;
- rgblight_config.val = val;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw);
- dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
- } else {
- dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
- }
- }
-}
-
-void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); }
-
-void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); }
-
-uint8_t rgblight_get_speed(void) { return rgblight_config.speed; }
-
-void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
- rgblight_config.speed = speed;
- if (write_to_eeprom) {
- eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
- dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed);
- } else {
- dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed);
- }
-}
-
-void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); }
-
-void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); }
-
-uint8_t rgblight_get_hue(void) { return rgblight_config.hue; }
-
-uint8_t rgblight_get_sat(void) { return rgblight_config.sat; }
-
-uint8_t rgblight_get_val(void) { return rgblight_config.val; }
-
-HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; }
-
-void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
- if (!rgblight_config.enable) {
- return;
- }
-
- for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- led[i].r = r;
- led[i].g = g;
- led[i].b = b;
-#ifdef RGBW
- led[i].w = 0;
-#endif
- }
- rgblight_set();
-}
-
-void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
- if (!rgblight_config.enable || index >= RGBLED_NUM) {
- return;
- }
-
- led[index].r = r;
- led[index].g = g;
- led[index].b = b;
-#ifdef RGBW
- led[index].w = 0;
-#endif
- rgblight_set();
-}
-
-void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) {
- if (!rgblight_config.enable) {
- return;
- }
-
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
-}
-
-#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) || defined(RGBLIGHT_EFFECT_TWINKLE)
-
-static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) {
- return
-# ifdef VELOCIKEY_ENABLE
- velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) :
-# endif
- pgm_read_byte(default_interval_address);
-}
-
-#endif
-
-void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) {
- if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) {
- return;
- }
-
- for (uint8_t i = start; i < end; i++) {
- led[i].r = r;
- led[i].g = g;
- led[i].b = b;
-#ifdef RGBW
- led[i].w = 0;
-#endif
- }
- rgblight_set();
- wait_ms(1);
-}
-
-void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
- if (!rgblight_config.enable) {
- return;
- }
-
- LED_TYPE tmp_led;
- sethsv(hue, sat, val, &tmp_led);
- rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
-}
-
-#ifndef RGBLIGHT_SPLIT
-void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); }
-
-void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
-
-void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); }
-
-void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
-#endif // ifndef RGBLIGHT_SPLIT
-
-#ifdef RGBLIGHT_LAYERS
-void rgblight_set_layer_state(uint8_t layer, bool enabled) {
- rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer;
- if (enabled) {
- rgblight_status.enabled_layer_mask |= mask;
- } else {
- rgblight_status.enabled_layer_mask &= ~mask;
- }
- RGBLIGHT_SPLIT_SET_CHANGE_LAYERS;
- // Static modes don't have a ticker running to update the LEDs
- if (rgblight_status.timer_enabled == false) {
- rgblight_mode_noeeprom(rgblight_config.mode);
- }
-
-# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
- // If not enabled, then nothing else will actually set the LEDs...
- if (!rgblight_config.enable) {
- rgblight_set();
- }
-# endif
-}
-
-bool rgblight_get_layer_state(uint8_t layer) {
- rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer;
- return (rgblight_status.enabled_layer_mask & mask) != 0;
-}
-
-// Write any enabled LED layers into the buffer
-static void rgblight_layers_write(void) {
- uint8_t i = 0;
- // For each layer
- for (const rgblight_segment_t *const *layer_ptr = rgblight_layers; i < RGBLIGHT_MAX_LAYERS; layer_ptr++, i++) {
- if (!rgblight_get_layer_state(i)) {
- continue; // Layer is disabled
- }
- const rgblight_segment_t *segment_ptr = pgm_read_ptr(layer_ptr);
- if (segment_ptr == NULL) {
- break; // No more layers
- }
- // For each segment
- while (1) {
- rgblight_segment_t segment;
- memcpy_P(&segment, segment_ptr, sizeof(rgblight_segment_t));
- if (segment.index == RGBLIGHT_END_SEGMENT_INDEX) {
- break; // No more segments
- }
- // Write segment.count LEDs
- LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
- for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
- sethsv(segment.hue, segment.sat, segment.val, led_ptr);
- }
- segment_ptr++;
- }
- }
-}
-
-# ifdef RGBLIGHT_LAYER_BLINK
-rgblight_layer_mask_t _blinking_layer_mask = 0;
-static uint16_t _repeat_timer;
-static uint8_t _times_remaining;
-static uint16_t _dur;
-
-void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); }
-
-void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) {
- _times_remaining = times * 2;
- _dur = duration_ms;
-
- rgblight_set_layer_state(layer, true);
- _times_remaining--;
- _blinking_layer_mask |= (rgblight_layer_mask_t)1 << layer;
- _repeat_timer = sync_timer_read() + duration_ms;
-}
-
-void rgblight_blink_layer_repeat_helper(void) {
- if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) {
- for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) {
- if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) {
- if (_times_remaining % 2 == 1) {
- rgblight_set_layer_state(layer, false);
- } else {
- rgblight_set_layer_state(layer, true);
- }
- _times_remaining--;
- _repeat_timer = sync_timer_read() + _dur;
- }
- }
- if (_times_remaining <= 0) {
- _blinking_layer_mask = 0;
- }
- }
-}
-# endif
-
-#endif
-
-#ifdef RGBLIGHT_SLEEP
-
-void rgblight_suspend(void) {
- rgblight_timer_disable();
- if (!is_suspended) {
- is_suspended = true;
- pre_suspend_enabled = rgblight_config.enable;
-
-# ifdef RGBLIGHT_LAYER_BLINK
- // make sure any layer blinks don't come back after suspend
- rgblight_status.enabled_layer_mask &= ~_blinking_layer_mask;
- _blinking_layer_mask = 0;
-# endif
-
- rgblight_disable_noeeprom();
- }
-}
-
-void rgblight_wakeup(void) {
- is_suspended = false;
-
- if (pre_suspend_enabled) {
- rgblight_enable_noeeprom();
- }
-# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
- // Need this or else the LEDs won't be set
- else if (rgblight_status.enabled_layer_mask != 0) {
- rgblight_set();
- }
-# endif
-
- rgblight_timer_enable();
-}
-
-#endif
-
-__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); }
-
-#ifndef RGBLIGHT_CUSTOM_DRIVER
-
-void rgblight_set(void) {
- LED_TYPE *start_led;
- uint8_t num_leds = rgblight_ranges.clipping_num_leds;
-
- if (!rgblight_config.enable) {
- for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- led[i].r = 0;
- led[i].g = 0;
- led[i].b = 0;
-# ifdef RGBW
- led[i].w = 0;
-# endif
- }
- }
-
-# ifdef RGBLIGHT_LAYERS
- if (rgblight_layers != NULL
-# if !defined(RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF)
- && rgblight_config.enable
-# elif defined(RGBLIGHT_SLEEP)
- && !is_suspended
-# endif
- ) {
- rgblight_layers_write();
- }
-# endif
-
-# ifdef RGBLIGHT_LED_MAP
- LED_TYPE led0[RGBLED_NUM];
- for (uint8_t i = 0; i < RGBLED_NUM; i++) {
- led0[i] = led[pgm_read_byte(&led_map[i])];
- }
- start_led = led0 + rgblight_ranges.clipping_start_pos;
-# else
- start_led = led + rgblight_ranges.clipping_start_pos;
-# endif
-
-# ifdef RGBW
- for (uint8_t i = 0; i < num_leds; i++) {
- convert_rgb_to_rgbw(&start_led[i]);
- }
-# endif
- rgblight_call_driver(start_led, num_leds);
-}
-#endif
-
-#ifdef RGBLIGHT_SPLIT
-/* for split keyboard master side */
-uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; }
-
-void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; }
-
-void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) {
- syncinfo->config = rgblight_config;
- syncinfo->status = rgblight_status;
-}
-
-/* for split keyboard slave side */
-void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
-# ifdef RGBLIGHT_LAYERS
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_LAYERS) {
- rgblight_status.enabled_layer_mask = syncinfo->status.enabled_layer_mask;
- }
-# endif
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) {
- if (syncinfo->config.enable) {
- rgblight_config.enable = 1; // == rgblight_enable_noeeprom();
- rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom);
- } else {
- rgblight_disable_noeeprom();
- }
- }
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) {
- rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom);
- // rgblight_config.speed = config->speed; // NEED???
- }
-# ifdef RGBLIGHT_USE_TIMER
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) {
- if (syncinfo->status.timer_enabled) {
- rgblight_timer_enable();
- } else {
- rgblight_timer_disable();
- }
- }
-# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC
- if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) {
- animation_status.restart = true;
- }
-# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
-# endif /* RGBLIGHT_USE_TIMER */
-}
-#endif /* RGBLIGHT_SPLIT */
-
-#ifdef RGBLIGHT_USE_TIMER
-
-typedef void (*effect_func_t)(animation_status_t *anim);
-
-// Animation timer -- use system timer (AVR Timer0)
-void rgblight_timer_init(void) {
- rgblight_status.timer_enabled = false;
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
-}
-void rgblight_timer_enable(void) {
- if (!is_static_effect(rgblight_config.mode)) {
- rgblight_status.timer_enabled = true;
- }
- animation_status.last_timer = sync_timer_read();
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
- dprintf("rgblight timer enabled.\n");
-}
-void rgblight_timer_disable(void) {
- rgblight_status.timer_enabled = false;
- RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
- dprintf("rgblight timer disable.\n");
-}
-void rgblight_timer_toggle(void) {
- dprintf("rgblight timer toggle.\n");
- if (rgblight_status.timer_enabled) {
- rgblight_timer_disable();
- } else {
- rgblight_timer_enable();
- }
-}
-
-void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) {
- rgblight_enable();
- rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
- rgblight_setrgb(r, g, b);
-}
-
-static void rgblight_effect_dummy(animation_status_t *anim) {
- // do nothing
- /********
- dprintf("rgblight_task() what happened?\n");
- dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode));
- dprintf("mode = %d, base_mode = %d, timer_enabled %d, ",
- rgblight_config.mode, rgblight_status.base_mode,
- rgblight_status.timer_enabled);
- dprintf("last_timer = %d\n",anim->last_timer);
- **/
-}
-
-void rgblight_task(void) {
- if (rgblight_status.timer_enabled) {
- effect_func_t effect_func = rgblight_effect_dummy;
- uint16_t interval_time = 2000; // dummy interval
- uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
- animation_status.delta = delta;
-
- // static light mode, do nothing here
- if (1 == 0) { // dummy
- }
-# ifdef RGBLIGHT_EFFECT_BREATHING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
- // breathing mode
- interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100);
- effect_func = rgblight_effect_breathing;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
- // rainbow mood mode
- interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100);
- effect_func = rgblight_effect_rainbow_mood;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
- // rainbow swirl mode
- interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100);
- effect_func = rgblight_effect_rainbow_swirl;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_SNAKE
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) {
- // snake mode
- interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200);
- effect_func = rgblight_effect_snake;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_KNIGHT
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) {
- // knight mode
- interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100);
- effect_func = rgblight_effect_knight;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_CHRISTMAS
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) {
- // christmas mode
- interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL;
- effect_func = (effect_func_t)rgblight_effect_christmas;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_RGB_TEST
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) {
- // RGB test mode
- interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]);
- effect_func = (effect_func_t)rgblight_effect_rgbtest;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_ALTERNATING
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) {
- interval_time = 500;
- effect_func = (effect_func_t)rgblight_effect_alternating;
- }
-# endif
-# ifdef RGBLIGHT_EFFECT_TWINKLE
- else if (rgblight_status.base_mode == RGBLIGHT_MODE_TWINKLE) {
- interval_time = get_interval_time(&RGBLED_TWINKLE_INTERVALS[delta % 3], 5, 30);
- effect_func = (effect_func_t)rgblight_effect_twinkle;
- }
-# endif
- if (animation_status.restart) {
- animation_status.restart = false;
- animation_status.last_timer = sync_timer_read();
- animation_status.pos16 = 0; // restart signal to local each effect
- }
- uint16_t now = sync_timer_read();
- if (timer_expired(now, animation_status.last_timer)) {
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- static uint16_t report_last_timer = 0;
- static bool tick_flag = false;
- uint16_t oldpos16;
- if (tick_flag) {
- tick_flag = false;
- if (timer_expired(now, report_last_timer)) {
- report_last_timer += 30000;
- dprintf("rgblight animation tick report to slave\n");
- RGBLIGHT_SPLIT_ANIMATION_TICK;
- }
- }
- oldpos16 = animation_status.pos16;
-# endif
- animation_status.last_timer += interval_time;
- effect_func(&animation_status);
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (animation_status.pos16 == 0 && oldpos16 != 0) {
- tick_flag = true;
- }
-# endif
- }
- }
-
-# ifdef RGBLIGHT_LAYER_BLINK
- rgblight_blink_layer_repeat_helper();
-# endif
-}
-
-#endif /* RGBLIGHT_USE_TIMER */
-
-#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_TWINKLE)
-
-# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
-# ifndef RGBLIGHT_BREATHE_TABLE_SIZE
-# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64
-# endif
-# include
-# endif
-
-static uint8_t breathe_calc(uint8_t pos) {
- // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
-# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE
- return pgm_read_byte(&rgblight_effect_breathe_table[pos / table_scale]);
-# else
- return (exp(sin((pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E));
-# endif
-}
-
-#endif
-
-// Effects
-#ifdef RGBLIGHT_EFFECT_BREATHING
-
-__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
-
-void rgblight_effect_breathing(animation_status_t *anim) {
- uint8_t val = breathe_calc(anim->pos);
- rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val);
- anim->pos = (anim->pos + 1);
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
-__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
-
-void rgblight_effect_rainbow_mood(animation_status_t *anim) {
- rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val);
- anim->current_hue++;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
-# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE
-# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255
-# endif
-
-__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
-
-void rgblight_effect_rainbow_swirl(animation_status_t *anim) {
- uint8_t hue;
- uint8_t i;
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue);
- sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
-
- if (anim->delta % 2) {
- anim->current_hue++;
- } else {
- anim->current_hue--;
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_SNAKE
-__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
-
-void rgblight_effect_snake(animation_status_t *anim) {
- static uint8_t pos = 0;
- uint8_t i, j;
- int8_t k;
- int8_t increment = 1;
-
- if (anim->delta % 2) {
- increment = -1;
- }
-
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (anim->pos == 0) { // restart signal
- if (increment == 1) {
- pos = rgblight_ranges.effect_num_leds - 1;
- } else {
- pos = 0;
- }
- anim->pos = 1;
- }
-# endif
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- ledp->r = 0;
- ledp->g = 0;
- ledp->b = 0;
-# ifdef RGBW
- ledp->w = 0;
-# endif
- for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
- k = pos + j * increment;
- if (k > RGBLED_NUM) {
- k = k % RGBLED_NUM;
- }
- if (k < 0) {
- k = k + rgblight_ranges.effect_num_leds;
- }
- if (i == k) {
- sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp);
- }
- }
- }
- rgblight_set();
- if (increment == 1) {
- if (pos - 1 < 0) {
- pos = rgblight_ranges.effect_num_leds - 1;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = 0;
-# endif
- } else {
- pos -= 1;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = 1;
-# endif
- }
- } else {
- pos = (pos + 1) % rgblight_ranges.effect_num_leds;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- anim->pos = pos;
-# endif
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_KNIGHT
-__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
-
-void rgblight_effect_knight(animation_status_t *anim) {
- static int8_t low_bound = 0;
- static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
- static int8_t increment = 1;
- uint8_t i, cur;
-
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (anim->pos == 0) { // restart signal
- anim->pos = 1;
- low_bound = 0;
- high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
- increment = 1;
- }
-# endif
- // Set all the LEDs to 0
- for (i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
- led[i].r = 0;
- led[i].g = 0;
- led[i].b = 0;
-# ifdef RGBW
- led[i].w = 0;
-# endif
- }
- // Determine which LEDs should be lit up
- for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) {
- cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos;
-
- if (i >= low_bound && i <= high_bound) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
- } else {
- led[cur].r = 0;
- led[cur].g = 0;
- led[cur].b = 0;
-# ifdef RGBW
- led[cur].w = 0;
-# endif
- }
- }
- rgblight_set();
-
- // Move from low_bound to high_bound changing the direction we increment each
- // time a boundary is hit.
- low_bound += increment;
- high_bound += increment;
-
- if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) {
- increment = -increment;
-# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
- if (increment == 1) {
- anim->pos = 0;
- }
-# endif
- }
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_CHRISTMAS
-# define CUBED(x) ((x) * (x) * (x))
-
-/**
- * Christmas lights effect, with a smooth animation between red & green.
- */
-void rgblight_effect_christmas(animation_status_t *anim) {
- static int8_t increment = 1;
- const uint8_t max_pos = 32;
- const uint8_t hue_green = 85;
-
- uint32_t xa;
- uint8_t hue, val;
- uint8_t i;
-
- // The effect works by animating anim->pos from 0 to 32 and back to 0.
- // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible.
- xa = CUBED((uint32_t)anim->pos);
- hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos)));
- // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors.
- val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2);
-
- for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue;
- sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
- }
- rgblight_set();
-
- if (anim->pos == 0) {
- increment = 1;
- } else if (anim->pos == max_pos) {
- increment = -1;
- }
- anim->pos += increment;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_RGB_TEST
-__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024};
-
-void rgblight_effect_rgbtest(animation_status_t *anim) {
- static uint8_t maxval = 0;
- uint8_t g;
- uint8_t r;
- uint8_t b;
-
- if (maxval == 0) {
- LED_TYPE tmp_led;
- sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led);
- maxval = tmp_led.r;
- }
- g = r = b = 0;
- switch (anim->pos) {
- case 0:
- r = maxval;
- break;
- case 1:
- g = maxval;
- break;
- case 2:
- b = maxval;
- break;
- }
- rgblight_setrgb(r, g, b);
- anim->pos = (anim->pos + 1) % 3;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_ALTERNATING
-void rgblight_effect_alternating(animation_status_t *anim) {
- for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
- } else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) {
- sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
- } else {
- sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp);
- }
- }
- rgblight_set();
- anim->pos = (anim->pos + 1) % 2;
-}
-#endif
-
-#ifdef RGBLIGHT_EFFECT_TWINKLE
-__attribute__((weak)) const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {30, 15, 5};
-
-typedef struct PACKED {
- HSV hsv;
- uint8_t life;
- uint8_t max_life;
-} TwinkleState;
-
-static TwinkleState led_twinkle_state[RGBLED_NUM];
-
-void rgblight_effect_twinkle(animation_status_t *anim) {
- const bool random_color = anim->delta / 3;
- const bool restart = anim->pos == 0;
- anim->pos = 1;
-
- const uint8_t bottom = breathe_calc(0);
- const uint8_t top = breathe_calc(127);
-
- uint8_t frac(uint8_t n, uint8_t d) { return (uint16_t)255 * n / d; }
- uint8_t scale(uint16_t v, uint8_t scale) { return (v * scale) >> 8; }
-
- for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
- TwinkleState *t = &(led_twinkle_state[i]);
- HSV * c = &(t->hsv);
-
- if (!random_color) {
- c->h = rgblight_config.hue;
- c->s = rgblight_config.sat;
- }
-
- if (restart) {
- // Restart
- t->life = 0;
- c->v = 0;
- } else if (t->life) {
- // This LED is already on, either brightening or dimming
- t->life--;
- uint8_t unscaled = frac(breathe_calc(frac(t->life, t->max_life)) - bottom, top - bottom);
- c->v = scale(rgblight_config.val, unscaled);
- } else if (rand() < scale((uint16_t)RAND_MAX * RGBLIGHT_EFFECT_TWINKLE_PROBABILITY, 127 + rgblight_config.val / 2)) {
- // This LED is off, but was randomly selected to start brightening
- if (random_color) {
- c->h = rand() % 0xFF;
- c->s = (rand() % (rgblight_config.sat / 2)) + (rgblight_config.sat / 2);
- }
- c->v = 0;
- t->max_life = MAX(20, MIN(RGBLIGHT_EFFECT_TWINKLE_LIFE, rgblight_config.val));
- t->life = t->max_life;
- } else {
- // This LED is off, and was NOT selected to start brightening
- }
-
- LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
- sethsv(c->h, c->s, c->v, ledp);
- }
-
- rgblight_set();
-}
-#endif
diff --git a/quantum/rgblight.h b/quantum/rgblight.h
deleted file mode 100644
index bec2c66955..0000000000
--- a/quantum/rgblight.h
+++ /dev/null
@@ -1,442 +0,0 @@
-/* Copyright 2017 Yang Liu
- *
- * 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 .
- */
-
-#pragma once
-
-/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
-
- old mode number (before 0.6.117) to new mode name table
-
-|-----------------|-----------------------------------|
-| old mode number | new mode name |
-|-----------------|-----------------------------------|
-| 1 | RGBLIGHT_MODE_STATIC_LIGHT |
-| 2 | RGBLIGHT_MODE_BREATHING |
-| 3 | RGBLIGHT_MODE_BREATHING + 1 |
-| 4 | RGBLIGHT_MODE_BREATHING + 2 |
-| 5 | RGBLIGHT_MODE_BREATHING + 3 |
-| 6 | RGBLIGHT_MODE_RAINBOW_MOOD |
-| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 |
-| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 |
-| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL |
-| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 |
-| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 |
-| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 |
-| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 |
-| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 |
-| 15 | RGBLIGHT_MODE_SNAKE |
-| 16 | RGBLIGHT_MODE_SNAKE + 1 |
-| 17 | RGBLIGHT_MODE_SNAKE + 2 |
-| 18 | RGBLIGHT_MODE_SNAKE + 3 |
-| 19 | RGBLIGHT_MODE_SNAKE + 4 |
-| 20 | RGBLIGHT_MODE_SNAKE + 5 |
-| 21 | RGBLIGHT_MODE_KNIGHT |
-| 22 | RGBLIGHT_MODE_KNIGHT + 1 |
-| 23 | RGBLIGHT_MODE_KNIGHT + 2 |
-| 24 | RGBLIGHT_MODE_CHRISTMAS |
-| 25 | RGBLIGHT_MODE_STATIC_GRADIENT |
-| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 |
-| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 |
-| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 |
-| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 |
-| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 |
-| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 |
-| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 |
-| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 |
-| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 |
-| 35 | RGBLIGHT_MODE_RGB_TEST |
-| 36 | RGBLIGHT_MODE_ALTERNATING |
-| 37 | RGBLIGHT_MODE_TWINKLE |
-| 38 | RGBLIGHT_MODE_TWINKLE + 1 |
-| 39 | RGBLIGHT_MODE_TWINKLE + 2 |
-| 40 | RGBLIGHT_MODE_TWINKLE + 3 |
-| 41 | RGBLIGHT_MODE_TWINKLE + 4 |
-| 42 | RGBLIGHT_MODE_TWINKLE + 5 |
-|-----------------|-----------------------------------|
- *****/
-
-#ifdef RGBLIGHT_ANIMATIONS
-// for backward compatibility
-# 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
-#endif
-
-#ifdef RGBLIGHT_STATIC_PATTERNS
-# define RGBLIGHT_EFFECT_STATIC_GRADIENT
-#endif
-
-// clang-format off
-
-// check dynamic animation effects chose ?
-#if defined(RGBLIGHT_EFFECT_BREATHING) \
- || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \
- || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \
- || defined(RGBLIGHT_EFFECT_SNAKE) \
- || defined(RGBLIGHT_EFFECT_KNIGHT) \
- || defined(RGBLIGHT_EFFECT_CHRISTMAS) \
- || defined(RGBLIGHT_EFFECT_RGB_TEST) \
- || defined(RGBLIGHT_EFFECT_ALTERNATING) \
- || defined(RGBLIGHT_EFFECT_TWINKLE)
-# define RGBLIGHT_USE_TIMER
-#endif
-
-// clang-format on
-
-#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
-#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym,
-enum RGBLIGHT_EFFECT_MODE {
- RGBLIGHT_MODE_zero = 0,
-#include "rgblight_modes.h"
- RGBLIGHT_MODE_last
-};
-
-#ifndef RGBLIGHT_H_DUMMY_DEFINE
-
-# define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1)
-
-// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85
-
-# ifndef RGBLIGHT_EFFECT_BREATHE_MAX
-# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
-# endif
-
-# ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
-# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
-# endif
-
-# ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH
-# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
-# endif
-
-# ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
-# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
-# endif
-
-# ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
-# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (rgblight_ranges.effect_num_leds)
-# endif
-
-# ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
-# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40
-# endif
-
-# ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
-# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
-# endif
-
-# ifndef RGBLIGHT_EFFECT_TWINKLE_LIFE
-# define RGBLIGHT_EFFECT_TWINKLE_LIFE 200
-# endif
-
-# ifndef RGBLIGHT_EFFECT_TWINKLE_PROBABILITY
-# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 127
-# endif
-
-# ifndef RGBLIGHT_HUE_STEP
-# define RGBLIGHT_HUE_STEP 8
-# endif
-# ifndef RGBLIGHT_SAT_STEP
-# define RGBLIGHT_SAT_STEP 17
-# endif
-# ifndef RGBLIGHT_VAL_STEP
-# define RGBLIGHT_VAL_STEP 17
-# endif
-# ifndef RGBLIGHT_LIMIT_VAL
-# define RGBLIGHT_LIMIT_VAL 255
-# endif
-
-# include
-# include
-# include "eeconfig.h"
-# include "ws2812.h"
-# include "color.h"
-# include "rgblight_list.h"
-
-# if defined(__AVR__)
-# include
-# endif
-
-# ifdef RGBLIGHT_LAYERS
-typedef struct {
- uint8_t index; // The first LED to light
- uint8_t count; // The number of LEDs to light
- uint8_t hue;
- uint8_t sat;
- uint8_t val;
-} rgblight_segment_t;
-
-# define RGBLIGHT_END_SEGMENT_INDEX (255)
-# define RGBLIGHT_END_SEGMENTS \
- { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 }
-# ifndef RGBLIGHT_MAX_LAYERS
-# define RGBLIGHT_MAX_LAYERS 8
-# endif
-# if RGBLIGHT_MAX_LAYERS <= 0
-# error invalid RGBLIGHT_MAX_LAYERS value (must be >= 1)
-# elif RGBLIGHT_MAX_LAYERS <= 8
-typedef uint8_t rgblight_layer_mask_t;
-# elif RGBLIGHT_MAX_LAYERS <= 16
-typedef uint16_t rgblight_layer_mask_t;
-# elif RGBLIGHT_MAX_LAYERS <= 32
-typedef uint32_t rgblight_layer_mask_t;
-# else
-# error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32)
-# endif
-# define RGBLIGHT_LAYER_SEGMENTS(...) \
- { __VA_ARGS__, RGBLIGHT_END_SEGMENTS }
-# define RGBLIGHT_LAYERS_LIST(...) \
- { __VA_ARGS__, NULL }
-
-// Get/set enabled rgblight layers
-void rgblight_set_layer_state(uint8_t layer, bool enabled);
-bool rgblight_get_layer_state(uint8_t layer);
-
-// Point this to an array of rgblight_segment_t arrays in keyboard_post_init_user to use rgblight layers
-extern const rgblight_segment_t *const *rgblight_layers;
-
-# ifdef RGBLIGHT_LAYER_BLINK
-# define RGBLIGHT_USE_TIMER
-void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms);
-void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times);
-# endif
-
-# endif
-
-extern LED_TYPE led[RGBLED_NUM];
-
-extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
-extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
-extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
-extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
-extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
-extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM;
-extern const uint8_t RGBLED_TWINKLE_INTERVALS[3] PROGMEM;
-extern bool is_rgblight_initialized;
-
-// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now)
-typedef union {
- uint32_t raw;
- struct {
- bool enable : 1;
- uint8_t mode : 7;
- uint8_t hue : 8;
- uint8_t sat : 8;
- uint8_t val : 8;
- uint8_t speed : 8; // EECONFIG needs to be increased to support this
- };
-} rgblight_config_t;
-
-typedef struct _rgblight_status_t {
- uint8_t base_mode;
- bool timer_enabled;
-# ifdef RGBLIGHT_SPLIT
- uint8_t change_flags;
-# endif
-# ifdef RGBLIGHT_LAYERS
- rgblight_layer_mask_t enabled_layer_mask;
-# endif
-} rgblight_status_t;
-
-/*
- * Structure for RGB Light clipping ranges
- */
-typedef struct _rgblight_ranges_t {
- uint8_t clipping_start_pos;
- uint8_t clipping_num_leds;
- uint8_t effect_start_pos;
- uint8_t effect_end_pos;
- uint8_t effect_num_leds;
-} rgblight_ranges_t;
-
-extern rgblight_ranges_t rgblight_ranges;
-
-/* === Utility Functions ===*/
-void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
-void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check
-void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
-
-/* === Low level Functions === */
-void rgblight_set(void);
-void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
-
-/* === Effects and Animations Functions === */
-/* effect range setting */
-void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds);
-
-/* direct operation */
-void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
-void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index);
-void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
-void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
-void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
-
-# ifndef RGBLIGHT_SPLIT
-void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
-void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
-void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val);
-void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val);
-# endif
-
-/* effect mode change */
-void rgblight_mode(uint8_t mode);
-void rgblight_mode_noeeprom(uint8_t mode);
-void rgblight_increase(void);
-void rgblight_decrease(void);
-void rgblight_step(void);
-void rgblight_step_noeeprom(void);
-void rgblight_step_reverse(void);
-void rgblight_step_reverse_noeeprom(void);
-
-/* effects mode disable/enable */
-void rgblight_toggle(void);
-void rgblight_toggle_noeeprom(void);
-void rgblight_enable(void);
-void rgblight_enable_noeeprom(void);
-void rgblight_disable(void);
-void rgblight_disable_noeeprom(void);
-
-/* hue, sat, val change */
-void rgblight_increase_hue(void);
-void rgblight_increase_hue_noeeprom(void);
-void rgblight_decrease_hue(void);
-void rgblight_decrease_hue_noeeprom(void);
-void rgblight_increase_sat(void);
-void rgblight_increase_sat_noeeprom(void);
-void rgblight_decrease_sat(void);
-void rgblight_decrease_sat_noeeprom(void);
-void rgblight_increase_val(void);
-void rgblight_increase_val_noeeprom(void);
-void rgblight_decrease_val(void);
-void rgblight_decrease_val_noeeprom(void);
-void rgblight_increase_speed(void);
-void rgblight_increase_speed_noeeprom(void);
-void rgblight_decrease_speed(void);
-void rgblight_decrease_speed_noeeprom(void);
-void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val);
-void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val);
-
-/* effect speed */
-uint8_t rgblight_get_speed(void);
-void rgblight_set_speed(uint8_t speed);
-void rgblight_set_speed_noeeprom(uint8_t speed);
-
-/* reset */
-void rgblight_reload_from_eeprom(void);
-
-/* query */
-uint8_t rgblight_get_mode(void);
-uint8_t rgblight_get_hue(void);
-uint8_t rgblight_get_sat(void);
-uint8_t rgblight_get_val(void);
-bool rgblight_is_enabled(void);
-HSV rgblight_get_hsv(void);
-
-/* === qmk_firmware (core)internal Functions === */
-void rgblight_init(void);
-void rgblight_suspend(void);
-void rgblight_wakeup(void);
-uint32_t rgblight_read_dword(void);
-void rgblight_update_dword(uint32_t dword);
-uint32_t eeconfig_read_rgblight(void);
-void eeconfig_update_rgblight(uint32_t val);
-void eeconfig_update_rgblight_current(void);
-void eeconfig_update_rgblight_default(void);
-void eeconfig_debug_rgblight(void);
-
-void rgb_matrix_increase(void);
-void rgb_matrix_decrease(void);
-
-void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
-void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
-
-# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
-void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
-
-# ifdef RGBLIGHT_USE_TIMER
-void rgblight_task(void);
-void rgblight_timer_init(void);
-void rgblight_timer_enable(void);
-void rgblight_timer_disable(void);
-void rgblight_timer_toggle(void);
-# else
-# define rgblight_task()
-# define rgblight_timer_init()
-# define rgblight_timer_enable()
-# define rgblight_timer_disable()
-# define rgblight_timer_toggle()
-# endif
-
-# ifdef RGBLIGHT_SPLIT
-# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)
-# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1)
-# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2)
-# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3)
-# define RGBLIGHT_STATUS_CHANGE_LAYERS (1 << 4)
-
-typedef struct _rgblight_syncinfo_t {
- rgblight_config_t config;
- rgblight_status_t status;
-} rgblight_syncinfo_t;
-
-/* for split keyboard master side */
-uint8_t rgblight_get_change_flags(void);
-void rgblight_clear_change_flags(void);
-void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
-/* for split keyboard slave side */
-void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
-# endif
-
-# ifdef RGBLIGHT_USE_TIMER
-
-typedef struct _animation_status_t {
- uint16_t last_timer;
- uint8_t delta; /* mode - base_mode */
- bool restart;
- union {
- uint16_t pos16;
- uint8_t pos;
- int8_t current_hue;
- uint16_t current_offset;
- };
-} animation_status_t;
-
-extern animation_status_t animation_status;
-
-void rgblight_effect_breathing(animation_status_t *anim);
-void rgblight_effect_rainbow_mood(animation_status_t *anim);
-void rgblight_effect_rainbow_swirl(animation_status_t *anim);
-void rgblight_effect_snake(animation_status_t *anim);
-void rgblight_effect_knight(animation_status_t *anim);
-void rgblight_effect_christmas(animation_status_t *anim);
-void rgblight_effect_rgbtest(animation_status_t *anim);
-void rgblight_effect_alternating(animation_status_t *anim);
-void rgblight_effect_twinkle(animation_status_t *anim);
-
-# endif
-
-#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
new file mode 100644
index 0000000000..54face173c
--- /dev/null
+++ b/quantum/rgblight/rgblight.c
@@ -0,0 +1,1391 @@
+/* Copyright 2016-2017 Yang Liu
+ *
+ * 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 .
+ */
+#include
+#include
+#include
+#ifdef __AVR__
+# include
+# include
+#endif
+#ifdef EEPROM_ENABLE
+# include "eeprom.h"
+#endif
+#ifdef STM32_EEPROM_ENABLE
+# include
+# include "eeprom_stm32.h"
+#endif
+#include "wait.h"
+#include "progmem.h"
+#include "sync_timer.h"
+#include "rgblight.h"
+#include "color.h"
+#include "debug.h"
+#include "led_tables.h"
+#include
+#ifdef VELOCIKEY_ENABLE
+# include "velocikey.h"
+#endif
+
+#ifndef MIN
+# define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+#ifndef MAX
+# define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+
+#ifdef RGBLIGHT_SPLIT
+/* for split keyboard */
+# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE
+# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS
+# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS)
+# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_LAYERS
+# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER
+# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK
+#else
+# define RGBLIGHT_SPLIT_SET_CHANGE_MODE
+# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS
+# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS
+# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS
+# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE
+# define RGBLIGHT_SPLIT_ANIMATION_TICK
+#endif
+
+#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_SINGLE_DYNAMIC(sym)
+#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_MULTI_DYNAMIC(sym)
+#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
+#define _RGBM_TMP_DYNAMIC(sym, msym)
+static uint8_t static_effect_table[] = {
+#include "rgblight_modes.h"
+};
+
+#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym,
+#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym,
+static uint8_t mode_base_table[] = {
+ 0, // RGBLIGHT_MODE_zero
+#include "rgblight_modes.h"
+};
+
+#if !defined(RGBLIGHT_DEFAULT_MODE)
+# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT
+#endif
+
+#if !defined(RGBLIGHT_DEFAULT_HUE)
+# define RGBLIGHT_DEFAULT_HUE 0
+#endif
+
+#if !defined(RGBLIGHT_DEFAULT_SAT)
+# define RGBLIGHT_DEFAULT_SAT UINT8_MAX
+#endif
+
+#if !defined(RGBLIGHT_DEFAULT_VAL)
+# define RGBLIGHT_DEFAULT_VAL RGBLIGHT_LIMIT_VAL
+#endif
+
+#if !defined(RGBLIGHT_DEFAULT_SPD)
+# define RGBLIGHT_DEFAULT_SPD 0
+#endif
+
+static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; }
+
+#ifdef RGBLIGHT_LED_MAP
+const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP;
+#endif
+
+#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
+__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
+#endif
+
+rgblight_config_t rgblight_config;
+rgblight_status_t rgblight_status = {.timer_enabled = false};
+bool is_rgblight_initialized = false;
+
+#ifdef RGBLIGHT_SLEEP
+static bool is_suspended;
+static bool pre_suspend_enabled;
+#endif
+
+#ifdef RGBLIGHT_USE_TIMER
+animation_status_t animation_status = {};
+#endif
+
+#ifndef LED_ARRAY
+LED_TYPE led[RGBLED_NUM];
+# define LED_ARRAY led
+#endif
+
+#ifdef RGBLIGHT_LAYERS
+rgblight_segment_t const *const *rgblight_layers = NULL;
+#endif
+
+rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM};
+
+void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
+ rgblight_ranges.clipping_start_pos = start_pos;
+ rgblight_ranges.clipping_num_leds = num_leds;
+}
+
+void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
+ if (start_pos >= RGBLED_NUM) return;
+ if (start_pos + num_leds > RGBLED_NUM) return;
+ rgblight_ranges.effect_start_pos = start_pos;
+ rgblight_ranges.effect_end_pos = start_pos + num_leds;
+ rgblight_ranges.effect_num_leds = num_leds;
+}
+
+__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
+
+void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
+ HSV hsv = {hue, sat, val};
+ RGB rgb = rgblight_hsv_to_rgb(hsv);
+ setrgb(rgb.r, rgb.g, rgb.b, led1);
+}
+
+void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); }
+
+void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
+ led1->r = r;
+ led1->g = g;
+ led1->b = b;
+#ifdef RGBW
+ led1->w = 0;
+#endif
+}
+
+void rgblight_check_config(void) {
+ /* Add some out of bound checks for RGB light config */
+
+ if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) {
+ rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
+ } else if (rgblight_config.mode > RGBLIGHT_MODES) {
+ rgblight_config.mode = RGBLIGHT_MODES;
+ }
+
+ if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) {
+ rgblight_config.val = RGBLIGHT_LIMIT_VAL;
+ }
+}
+
+uint32_t eeconfig_read_rgblight(void) {
+#ifdef EEPROM_ENABLE
+ return eeprom_read_dword(EECONFIG_RGBLIGHT);
+#else
+ return 0;
+#endif
+}
+
+void eeconfig_update_rgblight(uint32_t val) {
+#ifdef EEPROM_ENABLE
+ rgblight_check_config();
+ eeprom_update_dword(EECONFIG_RGBLIGHT, val);
+#endif
+}
+
+void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); }
+
+void eeconfig_update_rgblight_default(void) {
+ rgblight_config.enable = 1;
+ rgblight_config.mode = RGBLIGHT_DEFAULT_MODE;
+ rgblight_config.hue = RGBLIGHT_DEFAULT_HUE;
+ rgblight_config.sat = RGBLIGHT_DEFAULT_SAT;
+ rgblight_config.val = RGBLIGHT_DEFAULT_VAL;
+ rgblight_config.speed = RGBLIGHT_DEFAULT_SPD;
+ RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
+ eeconfig_update_rgblight(rgblight_config.raw);
+}
+
+void eeconfig_debug_rgblight(void) {
+ dprintf("rgblight_config EEPROM:\n");
+ dprintf("rgblight_config.enable = %d\n", rgblight_config.enable);
+ dprintf("rghlight_config.mode = %d\n", rgblight_config.mode);
+ dprintf("rgblight_config.hue = %d\n", rgblight_config.hue);
+ dprintf("rgblight_config.sat = %d\n", rgblight_config.sat);
+ dprintf("rgblight_config.val = %d\n", rgblight_config.val);
+ dprintf("rgblight_config.speed = %d\n", rgblight_config.speed);
+}
+
+void rgblight_init(void) {
+ /* if already initialized, don't do it again.
+ If you must do it again, extern this and set to false, first.
+ This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */
+ if (is_rgblight_initialized) {
+ return;
+ }
+
+ dprintf("rgblight_init called.\n");
+ dprintf("rgblight_init start!\n");
+ if (!eeconfig_is_enabled()) {
+ dprintf("rgblight_init eeconfig is not enabled.\n");
+ eeconfig_init();
+ eeconfig_update_rgblight_default();
+ }
+ rgblight_config.raw = eeconfig_read_rgblight();
+ RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
+ if (!rgblight_config.mode) {
+ dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n");
+ eeconfig_update_rgblight_default();
+ rgblight_config.raw = eeconfig_read_rgblight();
+ }
+ rgblight_check_config();
+
+ eeconfig_debug_rgblight(); // display current eeprom values
+
+ rgblight_timer_init(); // setup the timer
+
+ if (rgblight_config.enable) {
+ rgblight_mode_noeeprom(rgblight_config.mode);
+ }
+
+ is_rgblight_initialized = true;
+}
+
+void rgblight_reload_from_eeprom(void) {
+ /* Reset back to what we have in eeprom */
+ rgblight_config.raw = eeconfig_read_rgblight();
+ RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
+ rgblight_check_config();
+ eeconfig_debug_rgblight(); // display current eeprom values
+ if (rgblight_config.enable) {
+ rgblight_mode_noeeprom(rgblight_config.mode);
+ }
+}
+
+uint32_t rgblight_read_dword(void) { return rgblight_config.raw; }
+
+void rgblight_update_dword(uint32_t dword) {
+ RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS;
+ rgblight_config.raw = dword;
+ if (rgblight_config.enable)
+ rgblight_mode_noeeprom(rgblight_config.mode);
+ else {
+ rgblight_timer_disable();
+ rgblight_set();
+ }
+}
+
+void rgblight_increase(void) {
+ uint8_t mode = 0;
+ if (rgblight_config.mode < RGBLIGHT_MODES) {
+ mode = rgblight_config.mode + 1;
+ }
+ rgblight_mode(mode);
+}
+void rgblight_decrease(void) {
+ uint8_t mode = 0;
+ // Mode will never be < 1. If it ever is, eeprom needs to be initialized.
+ if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) {
+ mode = rgblight_config.mode - 1;
+ }
+ rgblight_mode(mode);
+}
+void rgblight_step_helper(bool write_to_eeprom) {
+ uint8_t mode = 0;
+ mode = rgblight_config.mode + 1;
+ if (mode > RGBLIGHT_MODES) {
+ mode = 1;
+ }
+ rgblight_mode_eeprom_helper(mode, write_to_eeprom);
+}
+void rgblight_step_noeeprom(void) { rgblight_step_helper(false); }
+void rgblight_step(void) { rgblight_step_helper(true); }
+void rgblight_step_reverse_helper(bool write_to_eeprom) {
+ uint8_t mode = 0;
+ mode = rgblight_config.mode - 1;
+ if (mode < 1) {
+ mode = RGBLIGHT_MODES;
+ }
+ rgblight_mode_eeprom_helper(mode, write_to_eeprom);
+}
+void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); }
+void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); }
+
+uint8_t rgblight_get_mode(void) {
+ if (!rgblight_config.enable) {
+ return false;
+ }
+
+ return rgblight_config.mode;
+}
+
+void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) {
+ if (!rgblight_config.enable) {
+ return;
+ }
+ if (mode < RGBLIGHT_MODE_STATIC_LIGHT) {
+ rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
+ } else if (mode > RGBLIGHT_MODES) {
+ rgblight_config.mode = RGBLIGHT_MODES;
+ } else {
+ rgblight_config.mode = mode;
+ }
+ RGBLIGHT_SPLIT_SET_CHANGE_MODE;
+ if (write_to_eeprom) {
+ eeconfig_update_rgblight(rgblight_config.raw);
+ dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode);
+ } else {
+ dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode);
+ }
+ if (is_static_effect(rgblight_config.mode)) {
+ rgblight_timer_disable();
+ } else {
+ rgblight_timer_enable();
+ }
+#ifdef RGBLIGHT_USE_TIMER
+ animation_status.restart = true;
+#endif
+ rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
+}
+
+void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); }
+
+void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); }
+
+void rgblight_toggle(void) {
+ dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
+ if (rgblight_config.enable) {
+ rgblight_disable();
+ } else {
+ rgblight_enable();
+ }
+}
+
+void rgblight_toggle_noeeprom(void) {
+ dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable);
+ if (rgblight_config.enable) {
+ rgblight_disable_noeeprom();
+ } else {
+ rgblight_enable_noeeprom();
+ }
+}
+
+void rgblight_enable(void) {
+ rgblight_config.enable = 1;
+ // No need to update EEPROM here. rgblight_mode() will do that, actually
+ // eeconfig_update_rgblight(rgblight_config.raw);
+ dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
+ rgblight_mode(rgblight_config.mode);
+}
+
+void rgblight_enable_noeeprom(void) {
+ rgblight_config.enable = 1;
+ dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
+ rgblight_mode_noeeprom(rgblight_config.mode);
+}
+
+void rgblight_disable(void) {
+ rgblight_config.enable = 0;
+ eeconfig_update_rgblight(rgblight_config.raw);
+ dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
+ rgblight_timer_disable();
+ RGBLIGHT_SPLIT_SET_CHANGE_MODE;
+ wait_ms(50);
+ rgblight_set();
+}
+
+void rgblight_disable_noeeprom(void) {
+ rgblight_config.enable = 0;
+ dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable);
+ rgblight_timer_disable();
+ RGBLIGHT_SPLIT_SET_CHANGE_MODE;
+ wait_ms(50);
+ rgblight_set();
+}
+
+bool rgblight_is_enabled(void) { return rgblight_config.enable; }
+
+void rgblight_increase_hue_helper(bool write_to_eeprom) {
+ uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP;
+ rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
+}
+void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); }
+void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); }
+void rgblight_decrease_hue_helper(bool write_to_eeprom) {
+ uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP;
+ rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom);
+}
+void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); }
+void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); }
+void rgblight_increase_sat_helper(bool write_to_eeprom) {
+ uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
+ rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
+}
+void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); }
+void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); }
+void rgblight_decrease_sat_helper(bool write_to_eeprom) {
+ uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP);
+ rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom);
+}
+void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); }
+void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); }
+void rgblight_increase_val_helper(bool write_to_eeprom) {
+ uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP);
+ rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
+}
+void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); }
+void rgblight_increase_val(void) { rgblight_increase_val_helper(true); }
+void rgblight_decrease_val_helper(bool write_to_eeprom) {
+ uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP);
+ rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom);
+}
+void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); }
+void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); }
+
+void rgblight_increase_speed_helper(bool write_to_eeprom) {
+ if (rgblight_config.speed < 3) rgblight_config.speed++;
+ // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?
+ if (write_to_eeprom) {
+ eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
+ }
+}
+void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); }
+void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); }
+
+void rgblight_decrease_speed_helper(bool write_to_eeprom) {
+ if (rgblight_config.speed > 0) rgblight_config.speed--;
+ // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED??
+ if (write_to_eeprom) {
+ eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
+ }
+}
+void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); }
+void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); }
+
+void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) {
+ if (rgblight_config.enable) {
+ LED_TYPE tmp_led;
+ sethsv(hue, sat, val, &tmp_led);
+ rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
+ }
+}
+
+void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) {
+ if (rgblight_config.enable) {
+ rgblight_status.base_mode = mode_base_table[rgblight_config.mode];
+ if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) {
+ // same static color
+ LED_TYPE tmp_led;
+ sethsv(hue, sat, val, &tmp_led);
+ rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b);
+ } else {
+ // all LEDs in same color
+ if (1 == 0) { // dummy
+ }
+#ifdef RGBLIGHT_EFFECT_BREATHING
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
+ // breathing mode, ignore the change of val, use in memory value instead
+ val = rgblight_config.val;
+ }
+#endif
+#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
+ // rainbow mood, ignore the change of hue
+ hue = rgblight_config.hue;
+ }
+#endif
+#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
+ // rainbow swirl, ignore the change of hue
+ hue = rgblight_config.hue;
+ }
+#endif
+#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) {
+ // static gradient
+ uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
+ bool direction = (delta % 2) == 0;
+# ifdef __AVR__
+ // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line
+ uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]);
+# else
+ uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2];
+# endif
+ for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds;
+ if (direction) {
+ _hue = hue + _hue;
+ } else {
+ _hue = hue - _hue;
+ }
+ dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range);
+ sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ }
+ rgblight_set();
+ }
+#endif
+ }
+#ifdef RGBLIGHT_SPLIT
+ if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) {
+ RGBLIGHT_SPLIT_SET_CHANGE_HSVS;
+ }
+#endif
+ rgblight_config.hue = hue;
+ rgblight_config.sat = sat;
+ rgblight_config.val = val;
+ if (write_to_eeprom) {
+ eeconfig_update_rgblight(rgblight_config.raw);
+ dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
+ } else {
+ dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
+ }
+ }
+}
+
+void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); }
+
+void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); }
+
+uint8_t rgblight_get_speed(void) { return rgblight_config.speed; }
+
+void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) {
+ rgblight_config.speed = speed;
+ if (write_to_eeprom) {
+ eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this
+ dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed);
+ } else {
+ dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed);
+ }
+}
+
+void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); }
+
+void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); }
+
+uint8_t rgblight_get_hue(void) { return rgblight_config.hue; }
+
+uint8_t rgblight_get_sat(void) { return rgblight_config.sat; }
+
+uint8_t rgblight_get_val(void) { return rgblight_config.val; }
+
+HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; }
+
+void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
+ if (!rgblight_config.enable) {
+ return;
+ }
+
+ for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+#ifdef RGBW
+ led[i].w = 0;
+#endif
+ }
+ rgblight_set();
+}
+
+void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
+ if (!rgblight_config.enable || index >= RGBLED_NUM) {
+ return;
+ }
+
+ led[index].r = r;
+ led[index].g = g;
+ led[index].b = b;
+#ifdef RGBW
+ led[index].w = 0;
+#endif
+ rgblight_set();
+}
+
+void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) {
+ if (!rgblight_config.enable) {
+ return;
+ }
+
+ LED_TYPE tmp_led;
+ sethsv(hue, sat, val, &tmp_led);
+ rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
+}
+
+#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) || defined(RGBLIGHT_EFFECT_TWINKLE)
+
+static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) {
+ return
+# ifdef VELOCIKEY_ENABLE
+ velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) :
+# endif
+ pgm_read_byte(default_interval_address);
+}
+
+#endif
+
+void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) {
+ if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) {
+ return;
+ }
+
+ for (uint8_t i = start; i < end; i++) {
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+#ifdef RGBW
+ led[i].w = 0;
+#endif
+ }
+ rgblight_set();
+ wait_ms(1);
+}
+
+void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
+ if (!rgblight_config.enable) {
+ return;
+ }
+
+ LED_TYPE tmp_led;
+ sethsv(hue, sat, val, &tmp_led);
+ rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
+}
+
+#ifndef RGBLIGHT_SPLIT
+void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); }
+
+void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
+
+void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); }
+
+void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); }
+#endif // ifndef RGBLIGHT_SPLIT
+
+#ifdef RGBLIGHT_LAYERS
+void rgblight_set_layer_state(uint8_t layer, bool enabled) {
+ rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer;
+ if (enabled) {
+ rgblight_status.enabled_layer_mask |= mask;
+ } else {
+ rgblight_status.enabled_layer_mask &= ~mask;
+ }
+ RGBLIGHT_SPLIT_SET_CHANGE_LAYERS;
+ // Static modes don't have a ticker running to update the LEDs
+ if (rgblight_status.timer_enabled == false) {
+ rgblight_mode_noeeprom(rgblight_config.mode);
+ }
+
+# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
+ // If not enabled, then nothing else will actually set the LEDs...
+ if (!rgblight_config.enable) {
+ rgblight_set();
+ }
+# endif
+}
+
+bool rgblight_get_layer_state(uint8_t layer) {
+ rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer;
+ return (rgblight_status.enabled_layer_mask & mask) != 0;
+}
+
+// Write any enabled LED layers into the buffer
+static void rgblight_layers_write(void) {
+ uint8_t i = 0;
+ // For each layer
+ for (const rgblight_segment_t *const *layer_ptr = rgblight_layers; i < RGBLIGHT_MAX_LAYERS; layer_ptr++, i++) {
+ if (!rgblight_get_layer_state(i)) {
+ continue; // Layer is disabled
+ }
+ const rgblight_segment_t *segment_ptr = pgm_read_ptr(layer_ptr);
+ if (segment_ptr == NULL) {
+ break; // No more layers
+ }
+ // For each segment
+ while (1) {
+ rgblight_segment_t segment;
+ memcpy_P(&segment, segment_ptr, sizeof(rgblight_segment_t));
+ if (segment.index == RGBLIGHT_END_SEGMENT_INDEX) {
+ break; // No more segments
+ }
+ // Write segment.count LEDs
+ LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
+ for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
+ sethsv(segment.hue, segment.sat, segment.val, led_ptr);
+ }
+ segment_ptr++;
+ }
+ }
+}
+
+# ifdef RGBLIGHT_LAYER_BLINK
+rgblight_layer_mask_t _blinking_layer_mask = 0;
+static uint16_t _repeat_timer;
+static uint8_t _times_remaining;
+static uint16_t _dur;
+
+void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); }
+
+void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) {
+ _times_remaining = times * 2;
+ _dur = duration_ms;
+
+ rgblight_set_layer_state(layer, true);
+ _times_remaining--;
+ _blinking_layer_mask |= (rgblight_layer_mask_t)1 << layer;
+ _repeat_timer = sync_timer_read() + duration_ms;
+}
+
+void rgblight_blink_layer_repeat_helper(void) {
+ if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) {
+ for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) {
+ if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) {
+ if (_times_remaining % 2 == 1) {
+ rgblight_set_layer_state(layer, false);
+ } else {
+ rgblight_set_layer_state(layer, true);
+ }
+ _times_remaining--;
+ _repeat_timer = sync_timer_read() + _dur;
+ }
+ }
+ if (_times_remaining <= 0) {
+ _blinking_layer_mask = 0;
+ }
+ }
+}
+# endif
+
+#endif
+
+#ifdef RGBLIGHT_SLEEP
+
+void rgblight_suspend(void) {
+ rgblight_timer_disable();
+ if (!is_suspended) {
+ is_suspended = true;
+ pre_suspend_enabled = rgblight_config.enable;
+
+# ifdef RGBLIGHT_LAYER_BLINK
+ // make sure any layer blinks don't come back after suspend
+ rgblight_status.enabled_layer_mask &= ~_blinking_layer_mask;
+ _blinking_layer_mask = 0;
+# endif
+
+ rgblight_disable_noeeprom();
+ }
+}
+
+void rgblight_wakeup(void) {
+ is_suspended = false;
+
+ if (pre_suspend_enabled) {
+ rgblight_enable_noeeprom();
+ }
+# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
+ // Need this or else the LEDs won't be set
+ else if (rgblight_status.enabled_layer_mask != 0) {
+ rgblight_set();
+ }
+# endif
+
+ rgblight_timer_enable();
+}
+
+#endif
+
+__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); }
+
+#ifndef RGBLIGHT_CUSTOM_DRIVER
+
+void rgblight_set(void) {
+ LED_TYPE *start_led;
+ uint8_t num_leds = rgblight_ranges.clipping_num_leds;
+
+ if (!rgblight_config.enable) {
+ for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+# ifdef RGBW
+ led[i].w = 0;
+# endif
+ }
+ }
+
+# ifdef RGBLIGHT_LAYERS
+ if (rgblight_layers != NULL
+# if !defined(RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF)
+ && rgblight_config.enable
+# elif defined(RGBLIGHT_SLEEP)
+ && !is_suspended
+# endif
+ ) {
+ rgblight_layers_write();
+ }
+# endif
+
+# ifdef RGBLIGHT_LED_MAP
+ LED_TYPE led0[RGBLED_NUM];
+ for (uint8_t i = 0; i < RGBLED_NUM; i++) {
+ led0[i] = led[pgm_read_byte(&led_map[i])];
+ }
+ start_led = led0 + rgblight_ranges.clipping_start_pos;
+# else
+ start_led = led + rgblight_ranges.clipping_start_pos;
+# endif
+
+# ifdef RGBW
+ for (uint8_t i = 0; i < num_leds; i++) {
+ convert_rgb_to_rgbw(&start_led[i]);
+ }
+# endif
+ rgblight_call_driver(start_led, num_leds);
+}
+#endif
+
+#ifdef RGBLIGHT_SPLIT
+/* for split keyboard master side */
+uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; }
+
+void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; }
+
+void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) {
+ syncinfo->config = rgblight_config;
+ syncinfo->status = rgblight_status;
+}
+
+/* for split keyboard slave side */
+void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) {
+# ifdef RGBLIGHT_LAYERS
+ if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_LAYERS) {
+ rgblight_status.enabled_layer_mask = syncinfo->status.enabled_layer_mask;
+ }
+# endif
+ if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) {
+ if (syncinfo->config.enable) {
+ rgblight_config.enable = 1; // == rgblight_enable_noeeprom();
+ rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom);
+ } else {
+ rgblight_disable_noeeprom();
+ }
+ }
+ if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) {
+ rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom);
+ // rgblight_config.speed = config->speed; // NEED???
+ }
+# ifdef RGBLIGHT_USE_TIMER
+ if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) {
+ if (syncinfo->status.timer_enabled) {
+ rgblight_timer_enable();
+ } else {
+ rgblight_timer_disable();
+ }
+ }
+# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC
+ if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) {
+ animation_status.restart = true;
+ }
+# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */
+# endif /* RGBLIGHT_USE_TIMER */
+}
+#endif /* RGBLIGHT_SPLIT */
+
+#ifdef RGBLIGHT_USE_TIMER
+
+typedef void (*effect_func_t)(animation_status_t *anim);
+
+// Animation timer -- use system timer (AVR Timer0)
+void rgblight_timer_init(void) {
+ rgblight_status.timer_enabled = false;
+ RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
+}
+void rgblight_timer_enable(void) {
+ if (!is_static_effect(rgblight_config.mode)) {
+ rgblight_status.timer_enabled = true;
+ }
+ animation_status.last_timer = sync_timer_read();
+ RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
+ dprintf("rgblight timer enabled.\n");
+}
+void rgblight_timer_disable(void) {
+ rgblight_status.timer_enabled = false;
+ RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
+ dprintf("rgblight timer disable.\n");
+}
+void rgblight_timer_toggle(void) {
+ dprintf("rgblight timer toggle.\n");
+ if (rgblight_status.timer_enabled) {
+ rgblight_timer_disable();
+ } else {
+ rgblight_timer_enable();
+ }
+}
+
+void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) {
+ rgblight_enable();
+ rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
+ rgblight_setrgb(r, g, b);
+}
+
+static void rgblight_effect_dummy(animation_status_t *anim) {
+ // do nothing
+ /********
+ dprintf("rgblight_task() what happened?\n");
+ dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode));
+ dprintf("mode = %d, base_mode = %d, timer_enabled %d, ",
+ rgblight_config.mode, rgblight_status.base_mode,
+ rgblight_status.timer_enabled);
+ dprintf("last_timer = %d\n",anim->last_timer);
+ **/
+}
+
+void rgblight_task(void) {
+ if (rgblight_status.timer_enabled) {
+ effect_func_t effect_func = rgblight_effect_dummy;
+ uint16_t interval_time = 2000; // dummy interval
+ uint8_t delta = rgblight_config.mode - rgblight_status.base_mode;
+ animation_status.delta = delta;
+
+ // static light mode, do nothing here
+ if (1 == 0) { // dummy
+ }
+# ifdef RGBLIGHT_EFFECT_BREATHING
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) {
+ // breathing mode
+ interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100);
+ effect_func = rgblight_effect_breathing;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) {
+ // rainbow mood mode
+ interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100);
+ effect_func = rgblight_effect_rainbow_mood;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) {
+ // rainbow swirl mode
+ interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100);
+ effect_func = rgblight_effect_rainbow_swirl;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_SNAKE
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) {
+ // snake mode
+ interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200);
+ effect_func = rgblight_effect_snake;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_KNIGHT
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) {
+ // knight mode
+ interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100);
+ effect_func = rgblight_effect_knight;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_CHRISTMAS
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) {
+ // christmas mode
+ interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL;
+ effect_func = (effect_func_t)rgblight_effect_christmas;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_RGB_TEST
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) {
+ // RGB test mode
+ interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]);
+ effect_func = (effect_func_t)rgblight_effect_rgbtest;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_ALTERNATING
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) {
+ interval_time = 500;
+ effect_func = (effect_func_t)rgblight_effect_alternating;
+ }
+# endif
+# ifdef RGBLIGHT_EFFECT_TWINKLE
+ else if (rgblight_status.base_mode == RGBLIGHT_MODE_TWINKLE) {
+ interval_time = get_interval_time(&RGBLED_TWINKLE_INTERVALS[delta % 3], 5, 30);
+ effect_func = (effect_func_t)rgblight_effect_twinkle;
+ }
+# endif
+ if (animation_status.restart) {
+ animation_status.restart = false;
+ animation_status.last_timer = sync_timer_read();
+ animation_status.pos16 = 0; // restart signal to local each effect
+ }
+ uint16_t now = sync_timer_read();
+ if (timer_expired(now, animation_status.last_timer)) {
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ static uint16_t report_last_timer = 0;
+ static bool tick_flag = false;
+ uint16_t oldpos16;
+ if (tick_flag) {
+ tick_flag = false;
+ if (timer_expired(now, report_last_timer)) {
+ report_last_timer += 30000;
+ dprintf("rgblight animation tick report to slave\n");
+ RGBLIGHT_SPLIT_ANIMATION_TICK;
+ }
+ }
+ oldpos16 = animation_status.pos16;
+# endif
+ animation_status.last_timer += interval_time;
+ effect_func(&animation_status);
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ if (animation_status.pos16 == 0 && oldpos16 != 0) {
+ tick_flag = true;
+ }
+# endif
+ }
+ }
+
+# ifdef RGBLIGHT_LAYER_BLINK
+ rgblight_blink_layer_repeat_helper();
+# endif
+}
+
+#endif /* RGBLIGHT_USE_TIMER */
+
+#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_TWINKLE)
+
+# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER
+# ifndef RGBLIGHT_BREATHE_TABLE_SIZE
+# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64
+# endif
+# include
+# endif
+
+static uint8_t breathe_calc(uint8_t pos) {
+ // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/
+# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE
+ return pgm_read_byte(&rgblight_effect_breathe_table[pos / table_scale]);
+# else
+ return (exp(sin((pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E));
+# endif
+}
+
+#endif
+
+// Effects
+#ifdef RGBLIGHT_EFFECT_BREATHING
+
+__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
+
+void rgblight_effect_breathing(animation_status_t *anim) {
+ uint8_t val = breathe_calc(anim->pos);
+ rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val);
+ anim->pos = (anim->pos + 1);
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
+__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30};
+
+void rgblight_effect_rainbow_mood(animation_status_t *anim) {
+ rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val);
+ anim->current_hue++;
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE
+# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255
+# endif
+
+__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20};
+
+void rgblight_effect_rainbow_swirl(animation_status_t *anim) {
+ uint8_t hue;
+ uint8_t i;
+
+ for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue);
+ sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ }
+ rgblight_set();
+
+ if (anim->delta % 2) {
+ anim->current_hue++;
+ } else {
+ anim->current_hue--;
+ }
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_SNAKE
+__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
+
+void rgblight_effect_snake(animation_status_t *anim) {
+ static uint8_t pos = 0;
+ uint8_t i, j;
+ int8_t k;
+ int8_t increment = 1;
+
+ if (anim->delta % 2) {
+ increment = -1;
+ }
+
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ if (anim->pos == 0) { // restart signal
+ if (increment == 1) {
+ pos = rgblight_ranges.effect_num_leds - 1;
+ } else {
+ pos = 0;
+ }
+ anim->pos = 1;
+ }
+# endif
+
+ for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
+ ledp->r = 0;
+ ledp->g = 0;
+ ledp->b = 0;
+# ifdef RGBW
+ ledp->w = 0;
+# endif
+ for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
+ k = pos + j * increment;
+ if (k > RGBLED_NUM) {
+ k = k % RGBLED_NUM;
+ }
+ if (k < 0) {
+ k = k + rgblight_ranges.effect_num_leds;
+ }
+ if (i == k) {
+ sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp);
+ }
+ }
+ }
+ rgblight_set();
+ if (increment == 1) {
+ if (pos - 1 < 0) {
+ pos = rgblight_ranges.effect_num_leds - 1;
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ anim->pos = 0;
+# endif
+ } else {
+ pos -= 1;
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ anim->pos = 1;
+# endif
+ }
+ } else {
+ pos = (pos + 1) % rgblight_ranges.effect_num_leds;
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ anim->pos = pos;
+# endif
+ }
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_KNIGHT
+__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
+
+void rgblight_effect_knight(animation_status_t *anim) {
+ static int8_t low_bound = 0;
+ static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
+ static int8_t increment = 1;
+ uint8_t i, cur;
+
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ if (anim->pos == 0) { // restart signal
+ anim->pos = 1;
+ low_bound = 0;
+ high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1;
+ increment = 1;
+ }
+# endif
+ // Set all the LEDs to 0
+ for (i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) {
+ led[i].r = 0;
+ led[i].g = 0;
+ led[i].b = 0;
+# ifdef RGBW
+ led[i].w = 0;
+# endif
+ }
+ // Determine which LEDs should be lit up
+ for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) {
+ cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos;
+
+ if (i >= low_bound && i <= high_bound) {
+ sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]);
+ } else {
+ led[cur].r = 0;
+ led[cur].g = 0;
+ led[cur].b = 0;
+# ifdef RGBW
+ led[cur].w = 0;
+# endif
+ }
+ }
+ rgblight_set();
+
+ // Move from low_bound to high_bound changing the direction we increment each
+ // time a boundary is hit.
+ low_bound += increment;
+ high_bound += increment;
+
+ if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) {
+ increment = -increment;
+# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
+ if (increment == 1) {
+ anim->pos = 0;
+ }
+# endif
+ }
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_CHRISTMAS
+# define CUBED(x) ((x) * (x) * (x))
+
+/**
+ * Christmas lights effect, with a smooth animation between red & green.
+ */
+void rgblight_effect_christmas(animation_status_t *anim) {
+ static int8_t increment = 1;
+ const uint8_t max_pos = 32;
+ const uint8_t hue_green = 85;
+
+ uint32_t xa;
+ uint8_t hue, val;
+ uint8_t i;
+
+ // The effect works by animating anim->pos from 0 to 32 and back to 0.
+ // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible.
+ xa = CUBED((uint32_t)anim->pos);
+ hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos)));
+ // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors.
+ val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2);
+
+ for (i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue;
+ sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]);
+ }
+ rgblight_set();
+
+ if (anim->pos == 0) {
+ increment = 1;
+ } else if (anim->pos == max_pos) {
+ increment = -1;
+ }
+ anim->pos += increment;
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_RGB_TEST
+__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024};
+
+void rgblight_effect_rgbtest(animation_status_t *anim) {
+ static uint8_t maxval = 0;
+ uint8_t g;
+ uint8_t r;
+ uint8_t b;
+
+ if (maxval == 0) {
+ LED_TYPE tmp_led;
+ sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led);
+ maxval = tmp_led.r;
+ }
+ g = r = b = 0;
+ switch (anim->pos) {
+ case 0:
+ r = maxval;
+ break;
+ case 1:
+ g = maxval;
+ break;
+ case 2:
+ b = maxval;
+ break;
+ }
+ rgblight_setrgb(r, g, b);
+ anim->pos = (anim->pos + 1) % 3;
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_ALTERNATING
+void rgblight_effect_alternating(animation_status_t *anim) {
+ for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
+ if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) {
+ sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
+ } else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) {
+ sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp);
+ } else {
+ sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp);
+ }
+ }
+ rgblight_set();
+ anim->pos = (anim->pos + 1) % 2;
+}
+#endif
+
+#ifdef RGBLIGHT_EFFECT_TWINKLE
+__attribute__((weak)) const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {30, 15, 5};
+
+typedef struct PACKED {
+ HSV hsv;
+ uint8_t life;
+ uint8_t max_life;
+} TwinkleState;
+
+static TwinkleState led_twinkle_state[RGBLED_NUM];
+
+void rgblight_effect_twinkle(animation_status_t *anim) {
+ const bool random_color = anim->delta / 3;
+ const bool restart = anim->pos == 0;
+ anim->pos = 1;
+
+ const uint8_t bottom = breathe_calc(0);
+ const uint8_t top = breathe_calc(127);
+
+ uint8_t frac(uint8_t n, uint8_t d) { return (uint16_t)255 * n / d; }
+ uint8_t scale(uint16_t v, uint8_t scale) { return (v * scale) >> 8; }
+
+ for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) {
+ TwinkleState *t = &(led_twinkle_state[i]);
+ HSV * c = &(t->hsv);
+
+ if (!random_color) {
+ c->h = rgblight_config.hue;
+ c->s = rgblight_config.sat;
+ }
+
+ if (restart) {
+ // Restart
+ t->life = 0;
+ c->v = 0;
+ } else if (t->life) {
+ // This LED is already on, either brightening or dimming
+ t->life--;
+ uint8_t unscaled = frac(breathe_calc(frac(t->life, t->max_life)) - bottom, top - bottom);
+ c->v = scale(rgblight_config.val, unscaled);
+ } else if (rand() < scale((uint16_t)RAND_MAX * RGBLIGHT_EFFECT_TWINKLE_PROBABILITY, 127 + rgblight_config.val / 2)) {
+ // This LED is off, but was randomly selected to start brightening
+ if (random_color) {
+ c->h = rand() % 0xFF;
+ c->s = (rand() % (rgblight_config.sat / 2)) + (rgblight_config.sat / 2);
+ }
+ c->v = 0;
+ t->max_life = MAX(20, MIN(RGBLIGHT_EFFECT_TWINKLE_LIFE, rgblight_config.val));
+ t->life = t->max_life;
+ } else {
+ // This LED is off, and was NOT selected to start brightening
+ }
+
+ LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos;
+ sethsv(c->h, c->s, c->v, ledp);
+ }
+
+ rgblight_set();
+}
+#endif
diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h
new file mode 100644
index 0000000000..bec2c66955
--- /dev/null
+++ b/quantum/rgblight/rgblight.h
@@ -0,0 +1,442 @@
+/* Copyright 2017 Yang Liu
+ *
+ * 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 .
+ */
+
+#pragma once
+
+/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
+
+ old mode number (before 0.6.117) to new mode name table
+
+|-----------------|-----------------------------------|
+| old mode number | new mode name |
+|-----------------|-----------------------------------|
+| 1 | RGBLIGHT_MODE_STATIC_LIGHT |
+| 2 | RGBLIGHT_MODE_BREATHING |
+| 3 | RGBLIGHT_MODE_BREATHING + 1 |
+| 4 | RGBLIGHT_MODE_BREATHING + 2 |
+| 5 | RGBLIGHT_MODE_BREATHING + 3 |
+| 6 | RGBLIGHT_MODE_RAINBOW_MOOD |
+| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 |
+| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 |
+| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL |
+| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 |
+| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 |
+| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 |
+| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 |
+| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 |
+| 15 | RGBLIGHT_MODE_SNAKE |
+| 16 | RGBLIGHT_MODE_SNAKE + 1 |
+| 17 | RGBLIGHT_MODE_SNAKE + 2 |
+| 18 | RGBLIGHT_MODE_SNAKE + 3 |
+| 19 | RGBLIGHT_MODE_SNAKE + 4 |
+| 20 | RGBLIGHT_MODE_SNAKE + 5 |
+| 21 | RGBLIGHT_MODE_KNIGHT |
+| 22 | RGBLIGHT_MODE_KNIGHT + 1 |
+| 23 | RGBLIGHT_MODE_KNIGHT + 2 |
+| 24 | RGBLIGHT_MODE_CHRISTMAS |
+| 25 | RGBLIGHT_MODE_STATIC_GRADIENT |
+| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 |
+| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 |
+| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 |
+| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 |
+| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 |
+| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 |
+| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 |
+| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 |
+| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 |
+| 35 | RGBLIGHT_MODE_RGB_TEST |
+| 36 | RGBLIGHT_MODE_ALTERNATING |
+| 37 | RGBLIGHT_MODE_TWINKLE |
+| 38 | RGBLIGHT_MODE_TWINKLE + 1 |
+| 39 | RGBLIGHT_MODE_TWINKLE + 2 |
+| 40 | RGBLIGHT_MODE_TWINKLE + 3 |
+| 41 | RGBLIGHT_MODE_TWINKLE + 4 |
+| 42 | RGBLIGHT_MODE_TWINKLE + 5 |
+|-----------------|-----------------------------------|
+ *****/
+
+#ifdef RGBLIGHT_ANIMATIONS
+// for backward compatibility
+# 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
+#endif
+
+#ifdef RGBLIGHT_STATIC_PATTERNS
+# define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#endif
+
+// clang-format off
+
+// check dynamic animation effects chose ?
+#if defined(RGBLIGHT_EFFECT_BREATHING) \
+ || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \
+ || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \
+ || defined(RGBLIGHT_EFFECT_SNAKE) \
+ || defined(RGBLIGHT_EFFECT_KNIGHT) \
+ || defined(RGBLIGHT_EFFECT_CHRISTMAS) \
+ || defined(RGBLIGHT_EFFECT_RGB_TEST) \
+ || defined(RGBLIGHT_EFFECT_ALTERNATING) \
+ || defined(RGBLIGHT_EFFECT_TWINKLE)
+# define RGBLIGHT_USE_TIMER
+#endif
+
+// clang-format on
+
+#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
+#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym,
+#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym,
+enum RGBLIGHT_EFFECT_MODE {
+ RGBLIGHT_MODE_zero = 0,
+#include "rgblight_modes.h"
+ RGBLIGHT_MODE_last
+};
+
+#ifndef RGBLIGHT_H_DUMMY_DEFINE
+
+# define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1)
+
+// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85
+
+# ifndef RGBLIGHT_EFFECT_BREATHE_MAX
+# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255
+# endif
+
+# ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH
+# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4
+# endif
+
+# ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH
+# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
+# endif
+
+# ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET
+# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0
+# endif
+
+# ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM
+# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (rgblight_ranges.effect_num_leds)
+# endif
+
+# ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL
+# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40
+# endif
+
+# ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP
+# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2
+# endif
+
+# ifndef RGBLIGHT_EFFECT_TWINKLE_LIFE
+# define RGBLIGHT_EFFECT_TWINKLE_LIFE 200
+# endif
+
+# ifndef RGBLIGHT_EFFECT_TWINKLE_PROBABILITY
+# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 127
+# endif
+
+# ifndef RGBLIGHT_HUE_STEP
+# define RGBLIGHT_HUE_STEP 8
+# endif
+# ifndef RGBLIGHT_SAT_STEP
+# define RGBLIGHT_SAT_STEP 17
+# endif
+# ifndef RGBLIGHT_VAL_STEP
+# define RGBLIGHT_VAL_STEP 17
+# endif
+# ifndef RGBLIGHT_LIMIT_VAL
+# define RGBLIGHT_LIMIT_VAL 255
+# endif
+
+# include
+# include
+# include "eeconfig.h"
+# include "ws2812.h"
+# include "color.h"
+# include "rgblight_list.h"
+
+# if defined(__AVR__)
+# include
+# endif
+
+# ifdef RGBLIGHT_LAYERS
+typedef struct {
+ uint8_t index; // The first LED to light
+ uint8_t count; // The number of LEDs to light
+ uint8_t hue;
+ uint8_t sat;
+ uint8_t val;
+} rgblight_segment_t;
+
+# define RGBLIGHT_END_SEGMENT_INDEX (255)
+# define RGBLIGHT_END_SEGMENTS \
+ { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 }
+# ifndef RGBLIGHT_MAX_LAYERS
+# define RGBLIGHT_MAX_LAYERS 8
+# endif
+# if RGBLIGHT_MAX_LAYERS <= 0
+# error invalid RGBLIGHT_MAX_LAYERS value (must be >= 1)
+# elif RGBLIGHT_MAX_LAYERS <= 8
+typedef uint8_t rgblight_layer_mask_t;
+# elif RGBLIGHT_MAX_LAYERS <= 16
+typedef uint16_t rgblight_layer_mask_t;
+# elif RGBLIGHT_MAX_LAYERS <= 32
+typedef uint32_t rgblight_layer_mask_t;
+# else
+# error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32)
+# endif
+# define RGBLIGHT_LAYER_SEGMENTS(...) \
+ { __VA_ARGS__, RGBLIGHT_END_SEGMENTS }
+# define RGBLIGHT_LAYERS_LIST(...) \
+ { __VA_ARGS__, NULL }
+
+// Get/set enabled rgblight layers
+void rgblight_set_layer_state(uint8_t layer, bool enabled);
+bool rgblight_get_layer_state(uint8_t layer);
+
+// Point this to an array of rgblight_segment_t arrays in keyboard_post_init_user to use rgblight layers
+extern const rgblight_segment_t *const *rgblight_layers;
+
+# ifdef RGBLIGHT_LAYER_BLINK
+# define RGBLIGHT_USE_TIMER
+void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms);
+void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times);
+# endif
+
+# endif
+
+extern LED_TYPE led[RGBLED_NUM];
+
+extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM;
+extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM;
+extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM;
+extern const uint8_t RGBLED_TWINKLE_INTERVALS[3] PROGMEM;
+extern bool is_rgblight_initialized;
+
+// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now)
+typedef union {
+ uint32_t raw;
+ struct {
+ bool enable : 1;
+ uint8_t mode : 7;
+ uint8_t hue : 8;
+ uint8_t sat : 8;
+ uint8_t val : 8;
+ uint8_t speed : 8; // EECONFIG needs to be increased to support this
+ };
+} rgblight_config_t;
+
+typedef struct _rgblight_status_t {
+ uint8_t base_mode;
+ bool timer_enabled;
+# ifdef RGBLIGHT_SPLIT
+ uint8_t change_flags;
+# endif
+# ifdef RGBLIGHT_LAYERS
+ rgblight_layer_mask_t enabled_layer_mask;
+# endif
+} rgblight_status_t;
+
+/*
+ * Structure for RGB Light clipping ranges
+ */
+typedef struct _rgblight_ranges_t {
+ uint8_t clipping_start_pos;
+ uint8_t clipping_num_leds;
+ uint8_t effect_start_pos;
+ uint8_t effect_end_pos;
+ uint8_t effect_num_leds;
+} rgblight_ranges_t;
+
+extern rgblight_ranges_t rgblight_ranges;
+
+/* === Utility Functions ===*/
+void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1);
+void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check
+void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1);
+
+/* === Low level Functions === */
+void rgblight_set(void);
+void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds);
+
+/* === Effects and Animations Functions === */
+/* effect range setting */
+void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds);
+
+/* direct operation */
+void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
+void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index);
+void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
+void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
+void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
+
+# ifndef RGBLIGHT_SPLIT
+void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
+void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
+void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val);
+void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val);
+# endif
+
+/* effect mode change */
+void rgblight_mode(uint8_t mode);
+void rgblight_mode_noeeprom(uint8_t mode);
+void rgblight_increase(void);
+void rgblight_decrease(void);
+void rgblight_step(void);
+void rgblight_step_noeeprom(void);
+void rgblight_step_reverse(void);
+void rgblight_step_reverse_noeeprom(void);
+
+/* effects mode disable/enable */
+void rgblight_toggle(void);
+void rgblight_toggle_noeeprom(void);
+void rgblight_enable(void);
+void rgblight_enable_noeeprom(void);
+void rgblight_disable(void);
+void rgblight_disable_noeeprom(void);
+
+/* hue, sat, val change */
+void rgblight_increase_hue(void);
+void rgblight_increase_hue_noeeprom(void);
+void rgblight_decrease_hue(void);
+void rgblight_decrease_hue_noeeprom(void);
+void rgblight_increase_sat(void);
+void rgblight_increase_sat_noeeprom(void);
+void rgblight_decrease_sat(void);
+void rgblight_decrease_sat_noeeprom(void);
+void rgblight_increase_val(void);
+void rgblight_increase_val_noeeprom(void);
+void rgblight_decrease_val(void);
+void rgblight_decrease_val_noeeprom(void);
+void rgblight_increase_speed(void);
+void rgblight_increase_speed_noeeprom(void);
+void rgblight_decrease_speed(void);
+void rgblight_decrease_speed_noeeprom(void);
+void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val);
+void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val);
+
+/* effect speed */
+uint8_t rgblight_get_speed(void);
+void rgblight_set_speed(uint8_t speed);
+void rgblight_set_speed_noeeprom(uint8_t speed);
+
+/* reset */
+void rgblight_reload_from_eeprom(void);
+
+/* query */
+uint8_t rgblight_get_mode(void);
+uint8_t rgblight_get_hue(void);
+uint8_t rgblight_get_sat(void);
+uint8_t rgblight_get_val(void);
+bool rgblight_is_enabled(void);
+HSV rgblight_get_hsv(void);
+
+/* === qmk_firmware (core)internal Functions === */
+void rgblight_init(void);
+void rgblight_suspend(void);
+void rgblight_wakeup(void);
+uint32_t rgblight_read_dword(void);
+void rgblight_update_dword(uint32_t dword);
+uint32_t eeconfig_read_rgblight(void);
+void eeconfig_update_rgblight(uint32_t val);
+void eeconfig_update_rgblight_current(void);
+void eeconfig_update_rgblight_default(void);
+void eeconfig_debug_rgblight(void);
+
+void rgb_matrix_increase(void);
+void rgb_matrix_decrease(void);
+
+void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom);
+void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
+
+# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
+void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
+
+# ifdef RGBLIGHT_USE_TIMER
+void rgblight_task(void);
+void rgblight_timer_init(void);
+void rgblight_timer_enable(void);
+void rgblight_timer_disable(void);
+void rgblight_timer_toggle(void);
+# else
+# define rgblight_task()
+# define rgblight_timer_init()
+# define rgblight_timer_enable()
+# define rgblight_timer_disable()
+# define rgblight_timer_toggle()
+# endif
+
+# ifdef RGBLIGHT_SPLIT
+# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)
+# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1)
+# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2)
+# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3)
+# define RGBLIGHT_STATUS_CHANGE_LAYERS (1 << 4)
+
+typedef struct _rgblight_syncinfo_t {
+ rgblight_config_t config;
+ rgblight_status_t status;
+} rgblight_syncinfo_t;
+
+/* for split keyboard master side */
+uint8_t rgblight_get_change_flags(void);
+void rgblight_clear_change_flags(void);
+void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
+/* for split keyboard slave side */
+void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
+# endif
+
+# ifdef RGBLIGHT_USE_TIMER
+
+typedef struct _animation_status_t {
+ uint16_t last_timer;
+ uint8_t delta; /* mode - base_mode */
+ bool restart;
+ union {
+ uint16_t pos16;
+ uint8_t pos;
+ int8_t current_hue;
+ uint16_t current_offset;
+ };
+} animation_status_t;
+
+extern animation_status_t animation_status;
+
+void rgblight_effect_breathing(animation_status_t *anim);
+void rgblight_effect_rainbow_mood(animation_status_t *anim);
+void rgblight_effect_rainbow_swirl(animation_status_t *anim);
+void rgblight_effect_snake(animation_status_t *anim);
+void rgblight_effect_knight(animation_status_t *anim);
+void rgblight_effect_christmas(animation_status_t *anim);
+void rgblight_effect_rgbtest(animation_status_t *anim);
+void rgblight_effect_alternating(animation_status_t *anim);
+void rgblight_effect_twinkle(animation_status_t *anim);
+
+# endif
+
+#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE
diff --git a/quantum/rgblight/rgblight_breathe_table.h b/quantum/rgblight/rgblight_breathe_table.h
new file mode 100644
index 0000000000..30245318b6
--- /dev/null
+++ b/quantum/rgblight/rgblight_breathe_table.h
@@ -0,0 +1,117 @@
+#pragma once
+
+#define RGBLIGHT_EFFECT_BREATHE_TABLE
+
+// clang-format off
+
+// Breathing center: 1.85
+// Breathing max: 255
+
+const uint8_t PROGMEM rgblight_effect_breathe_table[] = {
+#if RGBLIGHT_BREATHE_TABLE_SIZE == 256
+ 0x22, 0x23, 0x25, 0x26, 0x28, 0x29, 0x2A, 0x2C,
+ 0x2D, 0x2F, 0x30, 0x32, 0x33, 0x35, 0x36, 0x38,
+ 0x3A, 0x3B, 0x3D, 0x3E, 0x40, 0x42, 0x43, 0x45,
+ 0x47, 0x49, 0x4A, 0x4C, 0x4E, 0x50, 0x51, 0x53,
+ 0x55, 0x57, 0x59, 0x5A, 0x5C, 0x5E, 0x60, 0x62,
+ 0x64, 0x66, 0x68, 0x69, 0x6B, 0x6D, 0x6F, 0x71,
+ 0x73, 0x75, 0x77, 0x79, 0x7B, 0x7D, 0x7F, 0x81,
+ 0x83, 0x85, 0x87, 0x89, 0x8A, 0x8C, 0x8E, 0x90,
+ 0x92, 0x94, 0x96, 0x98, 0x9A, 0x9C, 0x9E, 0x9F,
+ 0xA1, 0xA3, 0xA5, 0xA7, 0xA8, 0xAA, 0xAC, 0xAE,
+ 0xAF, 0xB1, 0xB3, 0xB4, 0xB6, 0xB8, 0xB9, 0xBB,
+ 0xBC, 0xBE, 0xBF, 0xC1, 0xC2, 0xC3, 0xC5, 0xC6,
+ 0xC7, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xD0,
+ 0xD1, 0xD2, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDA, 0xDB, 0xDB,
+ 0xDB, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDD, 0xDD,
+ 0xDD, 0xDD, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDB,
+ 0xDB, 0xDB, 0xDA, 0xDA, 0xD9, 0xD9, 0xD8, 0xD7,
+ 0xD7, 0xD6, 0xD5, 0xD4, 0xD3, 0xD2, 0xD2, 0xD1,
+ 0xD0, 0xCE, 0xCD, 0xCC, 0xCB, 0xCA, 0xC9, 0xC7,
+ 0xC6, 0xC5, 0xC3, 0xC2, 0xC1, 0xBF, 0xBE, 0xBC,
+ 0xBB, 0xB9, 0xB8, 0xB6, 0xB4, 0xB3, 0xB1, 0xAF,
+ 0xAE, 0xAC, 0xAA, 0xA8, 0xA7, 0xA5, 0xA3, 0xA1,
+ 0x9F, 0x9E, 0x9C, 0x9A, 0x98, 0x96, 0x94, 0x92,
+ 0x90, 0x8E, 0x8C, 0x8A, 0x89, 0x87, 0x85, 0x83,
+ 0x81, 0x7F, 0x7D, 0x7B, 0x79, 0x77, 0x75, 0x73,
+ 0x71, 0x6F, 0x6D, 0x6B, 0x69, 0x68, 0x66, 0x64,
+ 0x62, 0x60, 0x5E, 0x5C, 0x5A, 0x59, 0x57, 0x55,
+ 0x53, 0x51, 0x50, 0x4E, 0x4C, 0x4A, 0x49, 0x47,
+ 0x45, 0x43, 0x42, 0x40, 0x3E, 0x3D, 0x3B, 0x3A,
+ 0x38, 0x36, 0x35, 0x33, 0x32, 0x30, 0x2F, 0x2D,
+ 0x2C, 0x2A, 0x29, 0x28, 0x26, 0x25, 0x23, 0x22
+#endif
+
+#if RGBLIGHT_BREATHE_TABLE_SIZE == 128
+ 0x22, 0x25, 0x28, 0x2A,
+ 0x2D, 0x30, 0x33, 0x36,
+ 0x3A, 0x3D, 0x40, 0x43,
+ 0x47, 0x4A, 0x4E, 0x51,
+ 0x55, 0x59, 0x5C, 0x60,
+ 0x64, 0x68, 0x6B, 0x6F,
+ 0x73, 0x77, 0x7B, 0x7F,
+ 0x83, 0x87, 0x8A, 0x8E,
+ 0x92, 0x96, 0x9A, 0x9E,
+ 0xA1, 0xA5, 0xA8, 0xAC,
+ 0xAF, 0xB3, 0xB6, 0xB9,
+ 0xBC, 0xBF, 0xC2, 0xC5,
+ 0xC7, 0xCA, 0xCC, 0xCE,
+ 0xD1, 0xD2, 0xD4, 0xD6,
+ 0xD7, 0xD9, 0xDA, 0xDB,
+ 0xDB, 0xDC, 0xDC, 0xDD,
+ 0xDD, 0xDC, 0xDC, 0xDC,
+ 0xDB, 0xDA, 0xD9, 0xD8,
+ 0xD7, 0xD5, 0xD3, 0xD2,
+ 0xD0, 0xCD, 0xCB, 0xC9,
+ 0xC6, 0xC3, 0xC1, 0xBE,
+ 0xBB, 0xB8, 0xB4, 0xB1,
+ 0xAE, 0xAA, 0xA7, 0xA3,
+ 0x9F, 0x9C, 0x98, 0x94,
+ 0x90, 0x8C, 0x89, 0x85,
+ 0x81, 0x7D, 0x79, 0x75,
+ 0x71, 0x6D, 0x69, 0x66,
+ 0x62, 0x5E, 0x5A, 0x57,
+ 0x53, 0x50, 0x4C, 0x49,
+ 0x45, 0x42, 0x3E, 0x3B,
+ 0x38, 0x35, 0x32, 0x2F,
+ 0x2C, 0x29, 0x26, 0x23
+#endif
+
+#if RGBLIGHT_BREATHE_TABLE_SIZE == 64
+ 0x22, 0x28,
+ 0x2D, 0x33,
+ 0x3A, 0x40,
+ 0x47, 0x4E,
+ 0x55, 0x5C,
+ 0x64, 0x6B,
+ 0x73, 0x7B,
+ 0x83, 0x8A,
+ 0x92, 0x9A,
+ 0xA1, 0xA8,
+ 0xAF, 0xB6,
+ 0xBC, 0xC2,
+ 0xC7, 0xCC,
+ 0xD1, 0xD4,
+ 0xD7, 0xDA,
+ 0xDB, 0xDC,
+ 0xDD, 0xDC,
+ 0xDB, 0xD9,
+ 0xD7, 0xD3,
+ 0xD0, 0xCB,
+ 0xC6, 0xC1,
+ 0xBB, 0xB4,
+ 0xAE, 0xA7,
+ 0x9F, 0x98,
+ 0x90, 0x89,
+ 0x81, 0x79,
+ 0x71, 0x69,
+ 0x62, 0x5A,
+ 0x53, 0x4C,
+ 0x45, 0x3E,
+ 0x38, 0x32,
+ 0x2C, 0x26
+#endif
+};
+
+static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table);
diff --git a/quantum/rgblight/rgblight_modes.h b/quantum/rgblight/rgblight_modes.h
new file mode 100644
index 0000000000..7abdb87bc6
--- /dev/null
+++ b/quantum/rgblight/rgblight_modes.h
@@ -0,0 +1,75 @@
+#ifdef _RGBM_SINGLE_STATIC
+_RGBM_SINGLE_STATIC(STATIC_LIGHT)
+# ifdef RGBLIGHT_EFFECT_BREATHING
+_RGBM_MULTI_DYNAMIC(BREATHING)
+_RGBM_TMP_DYNAMIC(breathing_3, BREATHING)
+_RGBM_TMP_DYNAMIC(breathing_4, BREATHING)
+_RGBM_TMP_DYNAMIC(BREATHING_end, BREATHING)
+# endif
+# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
+_RGBM_MULTI_DYNAMIC(RAINBOW_MOOD)
+_RGBM_TMP_DYNAMIC(rainbow_mood_7, RAINBOW_MOOD)
+_RGBM_TMP_DYNAMIC(RAINBOW_MOOD_end, RAINBOW_MOOD)
+# endif
+# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
+_RGBM_MULTI_DYNAMIC(RAINBOW_SWIRL)
+_RGBM_TMP_DYNAMIC(rainbow_swirl_10, RAINBOW_SWIRL)
+_RGBM_TMP_DYNAMIC(rainbow_swirl_11, RAINBOW_SWIRL)
+_RGBM_TMP_DYNAMIC(rainbow_swirl_12, RAINBOW_SWIRL)
+_RGBM_TMP_DYNAMIC(rainbow_swirl_13, RAINBOW_SWIRL)
+_RGBM_TMP_DYNAMIC(RAINBOW_SWIRL_end, RAINBOW_SWIRL)
+# endif
+# ifdef RGBLIGHT_EFFECT_SNAKE
+_RGBM_MULTI_DYNAMIC(SNAKE)
+_RGBM_TMP_DYNAMIC(snake_16, SNAKE)
+_RGBM_TMP_DYNAMIC(snake_17, SNAKE)
+_RGBM_TMP_DYNAMIC(snake_18, SNAKE)
+_RGBM_TMP_DYNAMIC(snake_19, SNAKE)
+_RGBM_TMP_DYNAMIC(SNAKE_end, SNAKE)
+# endif
+# ifdef RGBLIGHT_EFFECT_KNIGHT
+_RGBM_MULTI_DYNAMIC(KNIGHT)
+_RGBM_TMP_DYNAMIC(knight_22, KNIGHT)
+_RGBM_TMP_DYNAMIC(KNIGHT_end, KNIGHT)
+# endif
+# ifdef RGBLIGHT_EFFECT_CHRISTMAS
+_RGBM_SINGLE_DYNAMIC(CHRISTMAS)
+# endif
+# ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
+_RGBM_MULTI_STATIC(STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_26, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_27, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_28, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_29, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_30, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_31, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_32, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(static_gradient_33, STATIC_GRADIENT)
+_RGBM_TMP_STATIC(STATIC_GRADIENT_end, STATIC_GRADIENT)
+# endif
+# ifdef RGBLIGHT_EFFECT_RGB_TEST
+_RGBM_SINGLE_DYNAMIC(RGB_TEST)
+# endif
+# ifdef RGBLIGHT_EFFECT_ALTERNATING
+_RGBM_SINGLE_DYNAMIC(ALTERNATING)
+# endif
+# ifdef RGBLIGHT_EFFECT_TWINKLE
+_RGBM_MULTI_DYNAMIC(TWINKLE)
+_RGBM_TMP_DYNAMIC(twinkle_38, TWINKLE)
+_RGBM_TMP_DYNAMIC(twinkle_39, TWINKLE)
+_RGBM_TMP_DYNAMIC(twinkle_40, TWINKLE)
+_RGBM_TMP_DYNAMIC(twinkle_41, TWINKLE)
+_RGBM_TMP_DYNAMIC(TWINKLE_end, TWINKLE)
+# endif
+//// Add a new mode here.
+// #ifdef RGBLIGHT_EFFECT_
+// _RGBM__( )
+// #endif
+#endif
+
+#undef _RGBM_SINGLE_STATIC
+#undef _RGBM_SINGLE_DYNAMIC
+#undef _RGBM_MULTI_STATIC
+#undef _RGBM_MULTI_DYNAMIC
+#undef _RGBM_TMP_STATIC
+#undef _RGBM_TMP_DYNAMIC
diff --git a/quantum/rgblight/rgblight_post_config.h b/quantum/rgblight/rgblight_post_config.h
new file mode 100644
index 0000000000..3c14cb6109
--- /dev/null
+++ b/quantum/rgblight/rgblight_post_config.h
@@ -0,0 +1,5 @@
+#if defined(RGBLED_SPLIT) && !defined(RGBLIGHT_SPLIT)
+// When RGBLED_SPLIT is defined,
+// it is considered that RGBLIGHT_SPLIT is defined implicitly.
+# define RGBLIGHT_SPLIT
+#endif
diff --git a/quantum/rgblight_breathe_table.h b/quantum/rgblight_breathe_table.h
deleted file mode 100644
index 30245318b6..0000000000
--- a/quantum/rgblight_breathe_table.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#pragma once
-
-#define RGBLIGHT_EFFECT_BREATHE_TABLE
-
-// clang-format off
-
-// Breathing center: 1.85
-// Breathing max: 255
-
-const uint8_t PROGMEM rgblight_effect_breathe_table[] = {
-#if RGBLIGHT_BREATHE_TABLE_SIZE == 256
- 0x22, 0x23, 0x25, 0x26, 0x28, 0x29, 0x2A, 0x2C,
- 0x2D, 0x2F, 0x30, 0x32, 0x33, 0x35, 0x36, 0x38,
- 0x3A, 0x3B, 0x3D, 0x3E, 0x40, 0x42, 0x43, 0x45,
- 0x47, 0x49, 0x4A, 0x4C, 0x4E, 0x50, 0x51, 0x53,
- 0x55, 0x57, 0x59, 0x5A, 0x5C, 0x5E, 0x60, 0x62,
- 0x64, 0x66, 0x68, 0x69, 0x6B, 0x6D, 0x6F, 0x71,
- 0x73, 0x75, 0x77, 0x79, 0x7B, 0x7D, 0x7F, 0x81,
- 0x83, 0x85, 0x87, 0x89, 0x8A, 0x8C, 0x8E, 0x90,
- 0x92, 0x94, 0x96, 0x98, 0x9A, 0x9C, 0x9E, 0x9F,
- 0xA1, 0xA3, 0xA5, 0xA7, 0xA8, 0xAA, 0xAC, 0xAE,
- 0xAF, 0xB1, 0xB3, 0xB4, 0xB6, 0xB8, 0xB9, 0xBB,
- 0xBC, 0xBE, 0xBF, 0xC1, 0xC2, 0xC3, 0xC5, 0xC6,
- 0xC7, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xD0,
- 0xD1, 0xD2, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
- 0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDA, 0xDB, 0xDB,
- 0xDB, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDD, 0xDD,
- 0xDD, 0xDD, 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0xDB,
- 0xDB, 0xDB, 0xDA, 0xDA, 0xD9, 0xD9, 0xD8, 0xD7,
- 0xD7, 0xD6, 0xD5, 0xD4, 0xD3, 0xD2, 0xD2, 0xD1,
- 0xD0, 0xCE, 0xCD, 0xCC, 0xCB, 0xCA, 0xC9, 0xC7,
- 0xC6, 0xC5, 0xC3, 0xC2, 0xC1, 0xBF, 0xBE, 0xBC,
- 0xBB, 0xB9, 0xB8, 0xB6, 0xB4, 0xB3, 0xB1, 0xAF,
- 0xAE, 0xAC, 0xAA, 0xA8, 0xA7, 0xA5, 0xA3, 0xA1,
- 0x9F, 0x9E, 0x9C, 0x9A, 0x98, 0x96, 0x94, 0x92,
- 0x90, 0x8E, 0x8C, 0x8A, 0x89, 0x87, 0x85, 0x83,
- 0x81, 0x7F, 0x7D, 0x7B, 0x79, 0x77, 0x75, 0x73,
- 0x71, 0x6F, 0x6D, 0x6B, 0x69, 0x68, 0x66, 0x64,
- 0x62, 0x60, 0x5E, 0x5C, 0x5A, 0x59, 0x57, 0x55,
- 0x53, 0x51, 0x50, 0x4E, 0x4C, 0x4A, 0x49, 0x47,
- 0x45, 0x43, 0x42, 0x40, 0x3E, 0x3D, 0x3B, 0x3A,
- 0x38, 0x36, 0x35, 0x33, 0x32, 0x30, 0x2F, 0x2D,
- 0x2C, 0x2A, 0x29, 0x28, 0x26, 0x25, 0x23, 0x22
-#endif
-
-#if RGBLIGHT_BREATHE_TABLE_SIZE == 128
- 0x22, 0x25, 0x28, 0x2A,
- 0x2D, 0x30, 0x33, 0x36,
- 0x3A, 0x3D, 0x40, 0x43,
- 0x47, 0x4A, 0x4E, 0x51,
- 0x55, 0x59, 0x5C, 0x60,
- 0x64, 0x68, 0x6B, 0x6F,
- 0x73, 0x77, 0x7B, 0x7F,
- 0x83, 0x87, 0x8A, 0x8E,
- 0x92, 0x96, 0x9A, 0x9E,
- 0xA1, 0xA5, 0xA8, 0xAC,
- 0xAF, 0xB3, 0xB6, 0xB9,
- 0xBC, 0xBF, 0xC2, 0xC5,
- 0xC7, 0xCA, 0xCC, 0xCE,
- 0xD1, 0xD2, 0xD4, 0xD6,
- 0xD7, 0xD9, 0xDA, 0xDB,
- 0xDB, 0xDC, 0xDC, 0xDD,
- 0xDD, 0xDC, 0xDC, 0xDC,
- 0xDB, 0xDA, 0xD9, 0xD8,
- 0xD7, 0xD5, 0xD3, 0xD2,
- 0xD0, 0xCD, 0xCB, 0xC9,
- 0xC6, 0xC3, 0xC1, 0xBE,
- 0xBB, 0xB8, 0xB4, 0xB1,
- 0xAE, 0xAA, 0xA7, 0xA3,
- 0x9F, 0x9C, 0x98, 0x94,
- 0x90, 0x8C, 0x89, 0x85,
- 0x81, 0x7D, 0x79, 0x75,
- 0x71, 0x6D, 0x69, 0x66,
- 0x62, 0x5E, 0x5A, 0x57,
- 0x53, 0x50, 0x4C, 0x49,
- 0x45, 0x42, 0x3E, 0x3B,
- 0x38, 0x35, 0x32, 0x2F,
- 0x2C, 0x29, 0x26, 0x23
-#endif
-
-#if RGBLIGHT_BREATHE_TABLE_SIZE == 64
- 0x22, 0x28,
- 0x2D, 0x33,
- 0x3A, 0x40,
- 0x47, 0x4E,
- 0x55, 0x5C,
- 0x64, 0x6B,
- 0x73, 0x7B,
- 0x83, 0x8A,
- 0x92, 0x9A,
- 0xA1, 0xA8,
- 0xAF, 0xB6,
- 0xBC, 0xC2,
- 0xC7, 0xCC,
- 0xD1, 0xD4,
- 0xD7, 0xDA,
- 0xDB, 0xDC,
- 0xDD, 0xDC,
- 0xDB, 0xD9,
- 0xD7, 0xD3,
- 0xD0, 0xCB,
- 0xC6, 0xC1,
- 0xBB, 0xB4,
- 0xAE, 0xA7,
- 0x9F, 0x98,
- 0x90, 0x89,
- 0x81, 0x79,
- 0x71, 0x69,
- 0x62, 0x5A,
- 0x53, 0x4C,
- 0x45, 0x3E,
- 0x38, 0x32,
- 0x2C, 0x26
-#endif
-};
-
-static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table);
diff --git a/quantum/rgblight_modes.h b/quantum/rgblight_modes.h
deleted file mode 100644
index 7abdb87bc6..0000000000
--- a/quantum/rgblight_modes.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifdef _RGBM_SINGLE_STATIC
-_RGBM_SINGLE_STATIC(STATIC_LIGHT)
-# ifdef RGBLIGHT_EFFECT_BREATHING
-_RGBM_MULTI_DYNAMIC(BREATHING)
-_RGBM_TMP_DYNAMIC(breathing_3, BREATHING)
-_RGBM_TMP_DYNAMIC(breathing_4, BREATHING)
-_RGBM_TMP_DYNAMIC(BREATHING_end, BREATHING)
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
-_RGBM_MULTI_DYNAMIC(RAINBOW_MOOD)
-_RGBM_TMP_DYNAMIC(rainbow_mood_7, RAINBOW_MOOD)
-_RGBM_TMP_DYNAMIC(RAINBOW_MOOD_end, RAINBOW_MOOD)
-# endif
-# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
-_RGBM_MULTI_DYNAMIC(RAINBOW_SWIRL)
-_RGBM_TMP_DYNAMIC(rainbow_swirl_10, RAINBOW_SWIRL)
-_RGBM_TMP_DYNAMIC(rainbow_swirl_11, RAINBOW_SWIRL)
-_RGBM_TMP_DYNAMIC(rainbow_swirl_12, RAINBOW_SWIRL)
-_RGBM_TMP_DYNAMIC(rainbow_swirl_13, RAINBOW_SWIRL)
-_RGBM_TMP_DYNAMIC(RAINBOW_SWIRL_end, RAINBOW_SWIRL)
-# endif
-# ifdef RGBLIGHT_EFFECT_SNAKE
-_RGBM_MULTI_DYNAMIC(SNAKE)
-_RGBM_TMP_DYNAMIC(snake_16, SNAKE)
-_RGBM_TMP_DYNAMIC(snake_17, SNAKE)
-_RGBM_TMP_DYNAMIC(snake_18, SNAKE)
-_RGBM_TMP_DYNAMIC(snake_19, SNAKE)
-_RGBM_TMP_DYNAMIC(SNAKE_end, SNAKE)
-# endif
-# ifdef RGBLIGHT_EFFECT_KNIGHT
-_RGBM_MULTI_DYNAMIC(KNIGHT)
-_RGBM_TMP_DYNAMIC(knight_22, KNIGHT)
-_RGBM_TMP_DYNAMIC(KNIGHT_end, KNIGHT)
-# endif
-# ifdef RGBLIGHT_EFFECT_CHRISTMAS
-_RGBM_SINGLE_DYNAMIC(CHRISTMAS)
-# endif
-# ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
-_RGBM_MULTI_STATIC(STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_26, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_27, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_28, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_29, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_30, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_31, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_32, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(static_gradient_33, STATIC_GRADIENT)
-_RGBM_TMP_STATIC(STATIC_GRADIENT_end, STATIC_GRADIENT)
-# endif
-# ifdef RGBLIGHT_EFFECT_RGB_TEST
-_RGBM_SINGLE_DYNAMIC(RGB_TEST)
-# endif
-# ifdef RGBLIGHT_EFFECT_ALTERNATING
-_RGBM_SINGLE_DYNAMIC(ALTERNATING)
-# endif
-# ifdef RGBLIGHT_EFFECT_TWINKLE
-_RGBM_MULTI_DYNAMIC(TWINKLE)
-_RGBM_TMP_DYNAMIC(twinkle_38, TWINKLE)
-_RGBM_TMP_DYNAMIC(twinkle_39, TWINKLE)
-_RGBM_TMP_DYNAMIC(twinkle_40, TWINKLE)
-_RGBM_TMP_DYNAMIC(twinkle_41, TWINKLE)
-_RGBM_TMP_DYNAMIC(TWINKLE_end, TWINKLE)
-# endif
-//// Add a new mode here.
-// #ifdef RGBLIGHT_EFFECT_
-// _RGBM__( )
-// #endif
-#endif
-
-#undef _RGBM_SINGLE_STATIC
-#undef _RGBM_SINGLE_DYNAMIC
-#undef _RGBM_MULTI_STATIC
-#undef _RGBM_MULTI_DYNAMIC
-#undef _RGBM_TMP_STATIC
-#undef _RGBM_TMP_DYNAMIC
diff --git a/quantum/rgblight_post_config.h b/quantum/rgblight_post_config.h
deleted file mode 100644
index 3c14cb6109..0000000000
--- a/quantum/rgblight_post_config.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if defined(RGBLED_SPLIT) && !defined(RGBLIGHT_SPLIT)
-// When RGBLED_SPLIT is defined,
-// it is considered that RGBLIGHT_SPLIT is defined implicitly.
-# define RGBLIGHT_SPLIT
-#endif
--
cgit v1.2.3
From 653082235aaca8552078e62714eab30d1a517f57 Mon Sep 17 00:00:00 2001
From: Ryan
Date: Wed, 30 Jun 2021 04:15:58 +1000
Subject: Relocate RGB/HSV color defs to a more fitting place (#13377)
---
docs/feature_rgb_matrix.md | 45 +++++-----
docs/feature_rgblight.md | 43 +++++-----
quantum/color.h | 54 ++++++++++++
quantum/rgblight/rgblight_list.h | 136 ++++++++++++++++++++++++++++++
quantum/rgblight_list.h | 178 ---------------------------------------
5 files changed, 235 insertions(+), 221 deletions(-)
create mode 100644 quantum/rgblight/rgblight_list.h
delete mode 100644 quantum/rgblight_list.h
(limited to 'quantum')
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 925c9de6e4..4bd8e1eb98 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -554,28 +554,29 @@ For inspiration and examples, check out the built-in effects under `quantum/rgb_
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
-|RGB |HSV |
-|-------------------|-------------------|
-|`RGB_WHITE` |`HSV_WHITE` |
-|`RGB_RED` |`HSV_RED` |
-|`RGB_CORAL` |`HSV_CORAL` |
-|`RGB_ORANGE` |`HSV_ORANGE` |
-|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
-|`RGB_GOLD` |`HSV_GOLD` |
-|`RGB_YELLOW` |`HSV_YELLOW` |
-|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
-|`RGB_GREEN` |`HSV_GREEN` |
-|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
-|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
-|`RGB_TEAL` |`HSV_TEAL` |
-|`RGB_CYAN` |`HSV_CYAN` |
-|`RGB_AZURE` |`HSV_AZURE` |
-|`RGB_BLUE` |`HSV_BLUE` |
-|`RGB_PURPLE` |`HSV_PURPLE` |
-|`RGB_MAGENTA` |`HSV_MAGENTA` |
-|`RGB_PINK` |`HSV_PINK` |
-
-These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+|RGB |HSV |
+|---------------------|---------------------|
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_PINK` |`HSV_PINK` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+
+These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Additional `config.h` Options :id=additional-configh-options
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 0e75411f09..d323dee4f7 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -449,26 +449,27 @@ rgblight_sethsv_at(HSV_GREEN, 2); // led 2
These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
-|RGB |HSV |
-|-------------------|-------------------|
-|`RGB_WHITE` |`HSV_WHITE` |
-|`RGB_RED` |`HSV_RED` |
-|`RGB_CORAL` |`HSV_CORAL` |
-|`RGB_ORANGE` |`HSV_ORANGE` |
-|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
-|`RGB_GOLD` |`HSV_GOLD` |
-|`RGB_YELLOW` |`HSV_YELLOW` |
-|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
-|`RGB_GREEN` |`HSV_GREEN` |
-|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
-|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
-|`RGB_TEAL` |`HSV_TEAL` |
-|`RGB_CYAN` |`HSV_CYAN` |
-|`RGB_AZURE` |`HSV_AZURE` |
-|`RGB_BLUE` |`HSV_BLUE` |
-|`RGB_PURPLE` |`HSV_PURPLE` |
-|`RGB_MAGENTA` |`HSV_MAGENTA` |
-|`RGB_PINK` |`HSV_PINK` |
+|RGB |HSV |
+|---------------------|---------------------|
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`|
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_PINK` |`HSV_PINK` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
```c
rgblight_setrgb(RGB_ORANGE);
@@ -477,7 +478,7 @@ rgblight_setrgb_at(RGB_GOLD, 3);
rgblight_sethsv_range(HSV_WHITE, 0, 6);
```
-These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list!
## Changing the order of the LEDs
diff --git a/quantum/color.h b/quantum/color.h
index 4783f6839c..e2cfc46927 100644
--- a/quantum/color.h
+++ b/quantum/color.h
@@ -19,6 +19,60 @@
#include
#include
+// clang-format off
+
+/*
+ * RGB Colors
+ */
+#define RGB_AZURE 0x99, 0xF5, 0xFF
+#define RGB_BLACK 0x00, 0x00, 0x00
+#define RGB_BLUE 0x00, 0x00, 0xFF
+#define RGB_CHARTREUSE 0x80, 0xFF, 0x00
+#define RGB_CORAL 0xFF, 0x7C, 0x4D
+#define RGB_CYAN 0x00, 0xFF, 0xFF
+#define RGB_GOLD 0xFF, 0xD9, 0x00
+#define RGB_GOLDENROD 0xD9, 0xA5, 0x21
+#define RGB_GREEN 0x00, 0xFF, 0x00
+#define RGB_MAGENTA 0xFF, 0x00, 0xFF
+#define RGB_ORANGE 0xFF, 0x80, 0x00
+#define RGB_PINK 0xFF, 0x80, 0xBF
+#define RGB_PURPLE 0x7A, 0x00, 0xFF
+#define RGB_RED 0xFF, 0x00, 0x00
+#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80
+#define RGB_TEAL 0x00, 0x80, 0x80
+#define RGB_TURQUOISE 0x47, 0x6E, 0x6A
+#define RGB_WHITE 0xFF, 0xFF, 0xFF
+#define RGB_YELLOW 0xFF, 0xFF, 0x00
+#define RGB_OFF RGB_BLACK
+
+/*
+ * HSV Colors
+ *
+ * All values (including hue) are scaled to 0-255
+ */
+#define HSV_AZURE 132, 102, 255
+#define HSV_BLACK 0, 0, 0
+#define HSV_BLUE 170, 255, 255
+#define HSV_CHARTREUSE 64, 255, 255
+#define HSV_CORAL 11, 176, 255
+#define HSV_CYAN 128, 255, 255
+#define HSV_GOLD 36, 255, 255
+#define HSV_GOLDENROD 30, 218, 218
+#define HSV_GREEN 85, 255, 255
+#define HSV_MAGENTA 213, 255, 255
+#define HSV_ORANGE 28, 255, 255
+#define HSV_PINK 234, 128, 255
+#define HSV_PURPLE 191, 255, 255
+#define HSV_RED 0, 255, 255
+#define HSV_SPRINGGREEN 106, 255, 255
+#define HSV_TEAL 128, 255, 128
+#define HSV_TURQUOISE 123, 90, 112
+#define HSV_WHITE 0, 0, 255
+#define HSV_YELLOW 43, 255, 255
+#define HSV_OFF HSV_BLACK
+
+// clang-format on
+
#if defined(__GNUC__)
# define PACKED __attribute__((__packed__))
#else
diff --git a/quantum/rgblight/rgblight_list.h b/quantum/rgblight/rgblight_list.h
new file mode 100644
index 0000000000..0fd68b75f3
--- /dev/null
+++ b/quantum/rgblight/rgblight_list.h
@@ -0,0 +1,136 @@
+/* Copyright 2018 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 .
+ */
+#pragma once
+
+#include "color.h"
+
+/*
+########################################################################################
+## ##
+## ##
+## ##
+## The functions below have been deprecated and may be removed in a future release. ##
+## ##
+## Please use the values in color.h with the RGB functions. ##
+## ##
+## ##
+## ##
+########################################################################################
+*/
+
+/* SET RGB List */
+#define rgblight_setrgb_white() rgblight_setrgb(RGB_WHITE)
+#define rgblight_setrgb_red() rgblight_setrgb(RGB_RED)
+#define rgblight_setrgb_coral() rgblight_setrgb(RGB_CORAL)
+#define rgblight_setrgb_orange() rgblight_setrgb(RGB_ORANGE)
+#define rgblight_setrgb_goldenrod() rgblight_setrgb(RGB_GOLDENROD)
+#define rgblight_setrgb_gold() rgblight_setrgb(RGB_GOLD)
+#define rgblight_setrgb_yellow() rgblight_setrgb(RGB_YELLOW)
+#define rgblight_setrgb_chartreuse() rgblight_setrgb(RGB_CHARTREUSE)
+#define rgblight_setrgb_green() rgblight_setrgb(RGB_GREEN)
+#define rgblight_setrgb_springgreen() rgblight_setrgb(RGB_SPRINGGREEN)
+#define rgblight_setrgb_turquoise() rgblight_setrgb(RGB_TURQUOISE)
+#define rgblight_setrgb_teal() rgblight_setrgb(RGB_TEAL)
+#define rgblight_setrgb_cyan() rgblight_setrgb(RGB_CYAN)
+#define rgblight_setrgb_azure() rgblight_setrgb(RGB_AZURE)
+#define rgblight_setrgb_blue() rgblight_setrgb(RGB_BLUE)
+#define rgblight_setrgb_purple() rgblight_setrgb(RGB_PURPLE)
+#define rgblight_setrgb_magenta() rgblight_setrgb(RGB_MAGENTA)
+#define rgblight_setrgb_pink() rgblight_setrgb(RGB_PINK)
+
+/* SET RGB List */
+#define rgblight_setrgb_white_at(at) rgblight_setrgb_at(RGB_WHITE, at)
+#define rgblight_setrgb_red_at(at) rgblight_setrgb_at(RGB_RED, at)
+#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at(RGB_CORAL, at)
+#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at(RGB_ORANGE at)
+#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at(RGB_GOLDENROD, at)
+#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at(RGB_GOLD, at)
+#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at(RGB_YELLOW, at)
+#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at(RGB_CHARTREUSE, at)
+#define rgblight_setrgb_green_at(at) rgblight_setrgb_at(RGB_GREEN, at)
+#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at(RGB_SPRINGGREEN, at)
+#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at(RGB_TURQUOISE, at)
+#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at(RGB_TEAL, at)
+#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at(RGB_CYAN, at)
+#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at(RGB_AZURE, at)
+#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at(RGB_BLUE, at)
+#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at(RGB_PURPLE, at)
+#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at(RGB_MAGENTA, at)
+#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at(RGB_PINK, at)
+
+/* SET HSV List */
+#define rgblight_sethsv_white() rgblight_sethsv(HSV_WHITE)
+#define rgblight_sethsv_red() rgblight_sethsv(HSV_RED)
+#define rgblight_sethsv_coral() rgblight_sethsv(HSV_CORAL)
+#define rgblight_sethsv_orange() rgblight_sethsv(HSV_ORANGE)
+#define rgblight_sethsv_goldenrod() rgblight_sethsv(HSV_GOLDENROD)
+#define rgblight_sethsv_gold() rgblight_sethsv(HSV_GOLD)
+#define rgblight_sethsv_yellow() rgblight_sethsv(HSV_YELLOW)
+#define rgblight_sethsv_chartreuse() rgblight_sethsv(HSV_CHARTREUSE)
+#define rgblight_sethsv_green() rgblight_sethsv(HSV_GREEN)
+#define rgblight_sethsv_springgreen() rgblight_sethsv(HSV_SPRINGGREEN)
+#define rgblight_sethsv_turquoise() rgblight_sethsv(HSV_TURQUOISE)
+#define rgblight_sethsv_teal() rgblight_sethsv(HSV_TEAL)
+#define rgblight_sethsv_cyan() rgblight_sethsv(HSV_CYAN)
+#define rgblight_sethsv_azure() rgblight_sethsv(HSV_AZURE)
+#define rgblight_sethsv_blue() rgblight_sethsv(HSV_BLUE)
+#define rgblight_sethsv_purple() rgblight_sethsv(HSV_PURPLE)
+#define rgblight_sethsv_magenta() rgblight_sethsv(HSV_MAGENTA)
+#define rgblight_sethsv_pink() rgblight_sethsv(HSV_PINK)
+
+/* SET HSV List */
+/* If you're doing layer indication, this is best, as it won't */
+/* write to the eeprom, since it's limited (very high value). */
+/* If you want to use modes with this (since you can), then you */
+/* want to use rgblight_mode_noeeprom(x) instead. */
+#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom(HSV_WHITE)
+#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom(HSV_RED)
+#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom(HSV_CORAL)
+#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom(HSV_ORANGE)
+#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom(HSV_GOLDENROD)
+#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom(HSV_GOLD)
+#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom(HSV_YELLOW)
+#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom(HSV_CHARTREUSE)
+#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom(HSV_GREEN)
+#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom(HSV_SPRINGGREEN)
+#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom(HSV_TURQUOISE)
+#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom(HSV_TEAL)
+#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom(HSV_CYAN)
+#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom(HSV_AZURE)
+#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom(HSV_BLUE)
+#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom(HSV_PURPLE)
+#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom(HSV_MAGENTA)
+#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom(HSV_PINK)
+
+/* SET HSV List */
+#define rgblight_sethsv_white_at(at) rgblight_sethsv_at(HSV_WHITE, at)
+#define rgblight_sethsv_red_at(at) rgblight_sethsv_at(HSV_RED, at)
+#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at(HSV_CORAL, at)
+#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at(HSV_ORANGE, at)
+#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at(HSV_GOLDENROD, at)
+#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at(HSV_GOLD, at)
+#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at(HSV_YELLOW, at)
+#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at(HSV_CHARTREUSE, at)
+#define rgblight_sethsv_green_at(at) rgblight_sethsv_at(HSV_GREEN, at)
+#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at(HSV_SPRINGGREEN, at)
+#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at(HSV_TURQUOISE, at)
+#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at(HSV_TEAL, at)
+#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at(HSV_CYAN, at)
+#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at(HSV_AZURE, at)
+#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at(HSV_BLUE, at)
+#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at(HSV_PURPLE, at)
+#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at(HSV_MAGENTA, at)
+#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at(HSV_PINK, at)
diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h
deleted file mode 100644
index f29a646b66..0000000000
--- a/quantum/rgblight_list.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Copyright 2018 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 .
- */
-#pragma once
-
-/* RGB COLORS */
-#define RGB_WHITE 0xFF, 0xFF, 0xFF
-#define RGB_RED 0xFF, 0x00, 0x00
-#define RGB_CORAL 0xFF, 0x7C, 0x4D
-#define RGB_ORANGE 0xFF, 0x80, 0x00
-#define RGB_GOLDENROD 0xD9, 0xA5, 0x21
-#define RGB_GOLD 0xFF, 0xD9, 0x00
-#define RGB_YELLOW 0xFF, 0xFF, 0x00
-#define RGB_CHARTREUSE 0x80, 0xFF, 0x00
-#define RGB_GREEN 0x00, 0xFF, 0x00
-#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80
-#define RGB_TURQUOISE 0x47, 0x6E, 0x6A
-#define RGB_TEAL 0x00, 0x80, 0x80
-#define RGB_CYAN 0x00, 0xFF, 0xFF
-#define RGB_AZURE 0x99, 0xf5, 0xFF
-#define RGB_BLUE 0x00, 0x00, 0xFF
-#define RGB_PURPLE 0x7A, 0x00, 0xFF
-#define RGB_MAGENTA 0xFF, 0x00, 0xFF
-#define RGB_PINK 0xFF, 0x80, 0xBF
-#define RGB_BLACK 0x00, 0x00, 0x00
-#define RGB_OFF RGB_BLACK
-
-/* HSV COLORS */
-#define HSV_WHITE 0, 0, 255
-#define HSV_RED 0, 255, 255
-#define HSV_CORAL 11, 176, 255
-#define HSV_ORANGE 28, 255, 255
-#define HSV_GOLDENROD 30, 218, 218
-#define HSV_GOLD 36, 255, 255
-#define HSV_YELLOW 43, 255, 255
-#define HSV_CHARTREUSE 64, 255, 255
-#define HSV_GREEN 85, 255, 255
-#define HSV_SPRINGGREEN 106, 255, 255
-#define HSV_TURQUOISE 123, 90, 112
-#define HSV_TEAL 128, 255, 128
-#define HSV_CYAN 128, 255, 255
-#define HSV_AZURE 132, 102, 255
-#define HSV_BLUE 170, 255, 255
-#define HSV_PURPLE 191, 255, 255
-#define HSV_MAGENTA 213, 255, 255
-#define HSV_PINK 234, 128, 255
-#define HSV_BLACK 0, 0, 0
-#define HSV_OFF HSV_BLACK
-
-/*
-########################################################################################
-## ##
-## ##
-## ##
-## The functions below have been deprecated and may be removed in a future release. ##
-## ##
-## Please use the values above with the RGB functions. ##
-## ##
-## ##
-## ##
-########################################################################################
-*/
-
-/* SET RGB List */
-#define rgblight_setrgb_white() rgblight_setrgb(RGB_WHITE)
-#define rgblight_setrgb_red() rgblight_setrgb(RGB_RED)
-#define rgblight_setrgb_coral() rgblight_setrgb(RGB_CORAL)
-#define rgblight_setrgb_orange() rgblight_setrgb(RGB_ORANGE)
-#define rgblight_setrgb_goldenrod() rgblight_setrgb(RGB_GOLDENROD)
-#define rgblight_setrgb_gold() rgblight_setrgb(RGB_GOLD)
-#define rgblight_setrgb_yellow() rgblight_setrgb(RGB_YELLOW)
-#define rgblight_setrgb_chartreuse() rgblight_setrgb(RGB_CHARTREUSE)
-#define rgblight_setrgb_green() rgblight_setrgb(RGB_GREEN)
-#define rgblight_setrgb_springgreen() rgblight_setrgb(RGB_SPRINGGREEN)
-#define rgblight_setrgb_turquoise() rgblight_setrgb(RGB_TURQUOISE)
-#define rgblight_setrgb_teal() rgblight_setrgb(RGB_TEAL)
-#define rgblight_setrgb_cyan() rgblight_setrgb(RGB_CYAN)
-#define rgblight_setrgb_azure() rgblight_setrgb(RGB_AZURE)
-#define rgblight_setrgb_blue() rgblight_setrgb(RGB_BLUE)
-#define rgblight_setrgb_purple() rgblight_setrgb(RGB_PURPLE)
-#define rgblight_setrgb_magenta() rgblight_setrgb(RGB_MAGENTA)
-#define rgblight_setrgb_pink() rgblight_setrgb(RGB_PINK)
-
-/* SET RGB List */
-#define rgblight_setrgb_white_at(at) rgblight_setrgb_at(RGB_WHITE, at)
-#define rgblight_setrgb_red_at(at) rgblight_setrgb_at(RGB_RED, at)
-#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at(RGB_CORAL, at)
-#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at(RGB_ORANGE at)
-#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at(RGB_GOLDENROD, at)
-#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at(RGB_GOLD, at)
-#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at(RGB_YELLOW, at)
-#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at(RGB_CHARTREUSE, at)
-#define rgblight_setrgb_green_at(at) rgblight_setrgb_at(RGB_GREEN, at)
-#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at(RGB_SPRINGGREEN, at)
-#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at(RGB_TURQUOISE, at)
-#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at(RGB_TEAL, at)
-#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at(RGB_CYAN, at)
-#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at(RGB_AZURE, at)
-#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at(RGB_BLUE, at)
-#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at(RGB_PURPLE, at)
-#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at(RGB_MAGENTA, at)
-#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at(RGB_PINK, at)
-
-/* SET HSV List */
-#define rgblight_sethsv_white() rgblight_sethsv(HSV_WHITE)
-#define rgblight_sethsv_red() rgblight_sethsv(HSV_RED)
-#define rgblight_sethsv_coral() rgblight_sethsv(HSV_CORAL)
-#define rgblight_sethsv_orange() rgblight_sethsv(HSV_ORANGE)
-#define rgblight_sethsv_goldenrod() rgblight_sethsv(HSV_GOLDENROD)
-#define rgblight_sethsv_gold() rgblight_sethsv(HSV_GOLD)
-#define rgblight_sethsv_yellow() rgblight_sethsv(HSV_YELLOW)
-#define rgblight_sethsv_chartreuse() rgblight_sethsv(HSV_CHARTREUSE)
-#define rgblight_sethsv_green() rgblight_sethsv(HSV_GREEN)
-#define rgblight_sethsv_springgreen() rgblight_sethsv(HSV_SPRINGGREEN)
-#define rgblight_sethsv_turquoise() rgblight_sethsv(HSV_TURQUOISE)
-#define rgblight_sethsv_teal() rgblight_sethsv(HSV_TEAL)
-#define rgblight_sethsv_cyan() rgblight_sethsv(HSV_CYAN)
-#define rgblight_sethsv_azure() rgblight_sethsv(HSV_AZURE)
-#define rgblight_sethsv_blue() rgblight_sethsv(HSV_BLUE)
-#define rgblight_sethsv_purple() rgblight_sethsv(HSV_PURPLE)
-#define rgblight_sethsv_magenta() rgblight_sethsv(HSV_MAGENTA)
-#define rgblight_sethsv_pink() rgblight_sethsv(HSV_PINK)
-
-/* SET HSV List */
-/* If you're doing layer indication, this is best, as it won't */
-/* write to the eeprom, since it's limited (very high value). */
-/* If you want to use modes with this (since you can), then you */
-/* want to use rgblight_mode_noeeprom(x) instead. */
-#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom(HSV_WHITE)
-#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom(HSV_RED)
-#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom(HSV_CORAL)
-#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom(HSV_ORANGE)
-#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom(HSV_GOLDENROD)
-#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom(HSV_GOLD)
-#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom(HSV_YELLOW)
-#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom(HSV_CHARTREUSE)
-#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom(HSV_GREEN)
-#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom(HSV_SPRINGGREEN)
-#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom(HSV_TURQUOISE)
-#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom(HSV_TEAL)
-#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom(HSV_CYAN)
-#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom(HSV_AZURE)
-#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom(HSV_BLUE)
-#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom(HSV_PURPLE)
-#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom(HSV_MAGENTA)
-#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom(HSV_PINK)
-
-/* SET HSV List */
-#define rgblight_sethsv_white_at(at) rgblight_sethsv_at(HSV_WHITE, at)
-#define rgblight_sethsv_red_at(at) rgblight_sethsv_at(HSV_RED, at)
-#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at(HSV_CORAL, at)
-#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at(HSV_ORANGE, at)
-#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at(HSV_GOLDENROD, at)
-#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at(HSV_GOLD, at)
-#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at(HSV_YELLOW, at)
-#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at(HSV_CHARTREUSE, at)
-#define rgblight_sethsv_green_at(at) rgblight_sethsv_at(HSV_GREEN, at)
-#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at(HSV_SPRINGGREEN, at)
-#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at(HSV_TURQUOISE, at)
-#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at(HSV_TEAL, at)
-#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at(HSV_CYAN, at)
-#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at(HSV_AZURE, at)
-#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at(HSV_BLUE, at)
-#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at(HSV_PURPLE, at)
-#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at(HSV_MAGENTA, at)
-#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at(HSV_PINK, at)
--
cgit v1.2.3
From 8bb231aa1c40a7c6b6fdd229e88ef79c3fa930e2 Mon Sep 17 00:00:00 2001
From: Nick Brassel
Date: Wed, 30 Jun 2021 10:07:40 +1000
Subject: Adds support for STM32L412xB, STM32L422xB. (#13383)
* Adds support for STM32L412xB, STM32L422xB.
* Add to list of supported MCUs.
* Disable SPI1 by default.---
data/schemas/keyboard.jsonschema | 2 +-
docs/compatible_microcontrollers.md | 2 +
docs/ja/compatible_microcontrollers.md | 2 +
lib/python/qmk/constants.py | 2 +-
.../chibios/GENERIC_STM32_L412XB/board/board.mk | 9 +
.../chibios/GENERIC_STM32_L412XB/configs/board.h | 24 ++
.../chibios/GENERIC_STM32_L412XB/configs/config.h | 26 ++
.../chibios/GENERIC_STM32_L412XB/configs/mcuconf.h | 282 +++++++++++++++++++++
.../chibios/GENERIC_STM32_L433XC/configs/board.h | 2 +-
platforms/chibios/common/ld/STM32L412xB.ld | 85 +++++++
quantum/mcu_selection.mk | 34 +++
11 files changed, 467 insertions(+), 3 deletions(-)
create mode 100644 platforms/chibios/GENERIC_STM32_L412XB/board/board.mk
create mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/board.h
create mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/config.h
create mode 100644 platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h
create mode 100644 platforms/chibios/common/ld/STM32L412xB.ld
(limited to 'quantum')
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index d6d33ce4ec..3a77b20678 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -13,7 +13,7 @@
},
"processor": {
"type": "string",
- "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
+ "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
},
"board": {
"type": "string",
diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md
index 0f5b140de0..865b29feec 100644
--- a/docs/compatible_microcontrollers.md
+++ b/docs/compatible_microcontrollers.md
@@ -31,6 +31,8 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+ * [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
+ * [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md
index b675b038d2..761a4cda46 100644
--- a/docs/ja/compatible_microcontrollers.md
+++ b/docs/ja/compatible_microcontrollers.md
@@ -36,6 +36,8 @@ QMK ã¯å分ãªå®¹é‡ã®ãƒ•ラッシュメモリを備ãˆãŸ USB 対応 AVR ã¾
* [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html)
* [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html)
* [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html)
+* [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
+* [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html)
* [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
* [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html)
diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py
index 49e5e0eb42..be5ce5d4ed 100644
--- a/lib/python/qmk/constants.py
+++ b/lib/python/qmk/constants.py
@@ -10,7 +10,7 @@ QMK_FIRMWARE = Path.cwd()
MAX_KEYBOARD_SUBFOLDERS = 5
# Supported processor types
-CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L433', 'STM32L443'
+CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443'
LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None
VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85'
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk b/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk
new file mode 100644
index 0000000000..1250385eb8
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/board/board.mk
@@ -0,0 +1,9 @@
+# List of all the board related files.
+BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC/board.c
+
+# Required include directories
+BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC
+
+# Shared variables
+ALLCSRC += $(BOARDSRC)
+ALLINC += $(BOARDINC)
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h
new file mode 100644
index 0000000000..2e37d95fe3
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/board.h
@@ -0,0 +1,24 @@
+/* Copyright 2018-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 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 .
+ */
+#pragma once
+
+#include_next "board.h"
+
+#undef STM32L432xx
+
+// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2.
+// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443.
+#define STM32L443xx
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h
new file mode 100644
index 0000000000..c27c61b19a
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2018-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 .
+ */
+
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606.
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
+
+#define PAL_STM32_OSPEED_HIGHEST PAL_STM32_OSPEED_HIGH
+
+#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP
+# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
+#endif
diff --git a/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h
new file mode 100644
index 0000000000..8ad5a8da21
--- /dev/null
+++ b/platforms/chibios/GENERIC_STM32_L412XB/configs/mcuconf.h
@@ -0,0 +1,282 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 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.
+*/
+
+/*
+ * STM32L4xx drivers configuration.
+ * The following settings override the default settings present in
+ * the various device driver implementation headers.
+ * Note that the settings for each driver only have effect if the whole
+ * driver is enabled in halconf.h.
+ *
+ * IRQ priorities:
+ * 15...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
+#define STM32L4xx_MCUCONF
+#define STM32L412_MCUCONF
+#define STM32L422_MCUCONF
+#define STM32L432_MCUCONF
+#define STM32L433_MCUCONF
+#define STM32L442_MCUCONF
+#define STM32L443_MCUCONF
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_VOS STM32_VOS_RANGE1
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI16_ENABLED TRUE
+#define STM32_HSI48_ENABLED TRUE
+#define STM32_LSI_ENABLED FALSE
+#define STM32_HSE_ENABLED FALSE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_MSIPLL_ENABLED FALSE
+#define STM32_ADC_CLOCK_ENABLED TRUE
+#define STM32_USB_CLOCK_ENABLED TRUE
+#define STM32_SAI1_CLOCK_ENABLED TRUE
+#define STM32_SAI2_CLOCK_ENABLED TRUE
+#define STM32_MSIRANGE STM32_MSIRANGE_4M
+#define STM32_MSISRANGE STM32_MSISRANGE_4M
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSI16
+#define STM32_PLLM_VALUE 4
+#define STM32_PLLN_VALUE 80
+#define STM32_PLLP_VALUE 7
+#define STM32_PLLQ_VALUE 4
+#define STM32_PLLR_VALUE 4
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE1 STM32_PPRE1_DIV1
+#define STM32_PPRE2 STM32_PPRE2_DIV1
+#define STM32_STOPWUCK STM32_STOPWUCK_MSI
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_MCOPRE STM32_MCOPRE_DIV1
+#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK
+#define STM32_PLLSAI1N_VALUE 72
+#define STM32_PLLSAI1P_VALUE 7
+#define STM32_PLLSAI1Q_VALUE 6
+#define STM32_PLLSAI1R_VALUE 6
+#define STM32_PLLSAI2N_VALUE 72
+#define STM32_PLLSAI2P_VALUE 7
+#define STM32_PLLSAI2R_VALUE 6
+
+/*
+ * Peripherals clock sources.
+ */
+#define STM32_USART1SEL STM32_USART1SEL_SYSCLK
+#define STM32_USART2SEL STM32_USART2SEL_SYSCLK
+#define STM32_USART3SEL STM32_USART3SEL_SYSCLK
+#define STM32_UART4SEL STM32_UART4SEL_SYSCLK
+#define STM32_UART5SEL STM32_UART5SEL_SYSCLK
+#define STM32_LPUART1SEL STM32_LPUART1SEL_SYSCLK
+#define STM32_I2C1SEL STM32_I2C1SEL_SYSCLK
+#define STM32_I2C2SEL STM32_I2C2SEL_SYSCLK
+#define STM32_I2C3SEL STM32_I2C3SEL_SYSCLK
+#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1
+#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK1
+#define STM32_SAI1SEL STM32_SAI1SEL_OFF
+#define STM32_SAI2SEL STM32_SAI2SEL_OFF
+#define STM32_CLK48SEL STM32_CLK48SEL_HSI48
+#define STM32_ADCSEL STM32_ADCSEL_SYSCLK
+#define STM32_SWPMI1SEL STM32_SWPMI1SEL_PCLK1
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+
+/*
+ * IRQ system settings.
+ */
+#define STM32_IRQ_EXTI0_PRIORITY 6
+#define STM32_IRQ_EXTI1_PRIORITY 6
+#define STM32_IRQ_EXTI2_PRIORITY 6
+#define STM32_IRQ_EXTI3_PRIORITY 6
+#define STM32_IRQ_EXTI4_PRIORITY 6
+#define STM32_IRQ_EXTI5_9_PRIORITY 6
+#define STM32_IRQ_EXTI10_15_PRIORITY 6
+#define STM32_IRQ_EXTI1635_38_PRIORITY 6
+#define STM32_IRQ_EXTI18_PRIORITY 6
+#define STM32_IRQ_EXTI19_PRIORITY 6
+#define STM32_IRQ_EXTI20_PRIORITY 6
+#define STM32_IRQ_EXTI21_22_PRIORITY 15
+
+#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
+#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
+#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
+#define STM32_IRQ_TIM1_CC_PRIORITY 7
+#define STM32_IRQ_TIM2_PRIORITY 7
+#define STM32_IRQ_TIM6_PRIORITY 7
+#define STM32_IRQ_TIM7_PRIORITY 7
+
+#define STM32_IRQ_USART1_PRIORITY 12
+#define STM32_IRQ_USART2_PRIORITY 12
+#define STM32_IRQ_USART3_PRIORITY 12
+#define STM32_IRQ_LPUART1_PRIORITY 12
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_COMPACT_SAMPLES FALSE
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_ADC12_IRQ_PRIORITY 5
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
+#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
+#define STM32_ADC_ADC123_PRESC ADC_CCR_PRESC_DIV2
+
+/*
+ * CAN driver system settings.
+ */
+#define STM32_CAN_USE_CAN1 FALSE
+#define STM32_CAN_CAN1_IRQ_PRIORITY 11
+
+/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 FALSE
+#define STM32_DAC_USE_DAC1_CH2 FALSE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+
+/*
+ * GPT driver system settings.
+ */
+#define STM32_GPT_USE_TIM1 FALSE
+#define STM32_GPT_USE_TIM2 FALSE
+#define STM32_GPT_USE_TIM6 FALSE
+#define STM32_GPT_USE_TIM7 FALSE
+#define STM32_GPT_USE_TIM15 FALSE
+#define STM32_GPT_USE_TIM16 FALSE
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 FALSE
+#define STM32_I2C_USE_I2C3 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
+#define STM32_I2C_I2C1_IRQ_PRIORITY 5
+#define STM32_I2C_I2C3_IRQ_PRIORITY 5
+#define STM32_I2C_I2C1_DMA_PRIORITY 3
+#define STM32_I2C_I2C3_DMA_PRIORITY 3
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
+
+/*
+ * ICU driver system settings.
+ */
+#define STM32_ICU_USE_TIM1 FALSE
+#define STM32_ICU_USE_TIM2 FALSE
+#define STM32_ICU_USE_TIM15 FALSE
+#define STM32_ICU_USE_TIM16 FALSE
+
+/*
+ * PWM driver system settings.
+ */
+#define STM32_PWM_USE_ADVANCED FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM15 FALSE
+#define STM32_PWM_USE_TIM16 FALSE
+
+/*
+ * RTC driver system settings.
+ */
+#define STM32_RTC_PRESA_VALUE 32
+#define STM32_RTC_PRESS_VALUE 1024
+#define STM32_RTC_CR_INIT 0
+#define STM32_RTC_TAMPCR_INIT 0
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USE_LPUART1 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 12
+#define STM32_SERIAL_USART2_PRIORITY 12
+#define STM32_SERIAL_LPUART1_PRIORITY 12
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI3 FALSE
+#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
+#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
+#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
+#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI3_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 10
+#define STM32_SPI_SPI3_IRQ_PRIORITY 10
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 8
+#define STM32_ST_USE_TIMER 2
+
+/*
+ * TRNG driver system settings.
+ */
+#define STM32_TRNG_USE_RNG1 FALSE
+
+/*
+ * UART driver system settings.
+ */
+#define STM32_UART_USE_USART1 FALSE
+#define STM32_UART_USE_USART2 FALSE
+#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
+#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
+
+/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+/*
+ * WSPI driver system settings.
+ */
+#define STM32_WSPI_USE_QUADSPI1 FALSE
+#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
+#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1
+
+#endif /* MCUCONF_H */
diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
index 51f9724f94..2e37d95fe3 100644
--- a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
+++ b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h
@@ -19,6 +19,6 @@
#undef STM32L432xx
-// Pretend that we're an L443xx as the ChibiOS definitions for L432/L433 mistakenly don't enable GPIOH, I2C2, or SPI2.
+// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2.
// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443.
#define STM32L443xx
diff --git a/platforms/chibios/common/ld/STM32L412xB.ld b/platforms/chibios/common/ld/STM32L412xB.ld
new file mode 100644
index 0000000000..5718d6bc71
--- /dev/null
+++ b/platforms/chibios/common/ld/STM32L412xB.ld
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 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.
+*/
+
+/*
+ * STM32L412xB memory setup.
+ */
+MEMORY
+{
+ flash0 : org = 0x08000000, len = 128k
+ flash1 : org = 0x00000000, len = 0
+ flash2 : org = 0x00000000, len = 0
+ flash3 : org = 0x00000000, len = 0
+ flash4 : org = 0x00000000, len = 0
+ flash5 : org = 0x00000000, len = 0
+ flash6 : org = 0x00000000, len = 0
+ flash7 : org = 0x00000000, len = 0
+ ram0 : org = 0x20000000, len = 32k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index f8def7f674..ca0accd719 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -433,6 +433,40 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443))
UF2_FAMILY ?= STM32L4
endif
+ifneq (,$(filter $(MCU),STM32L412 STM32L422))
+ # Cortex version
+ MCU = cortex-m4
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 7
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = STM32
+ MCU_SERIES = STM32L4xx
+
+ # Linker script to use
+ # - it should exist either in