summaryrefslogtreecommitdiffstats
path: root/keyboards/massdrop/alt
diff options
context:
space:
mode:
authorDaniel Prilik <danielprilik@gmail.com>2019-04-04 03:30:47 +0200
committerDrashna Jaelre <drashna@live.com>2019-04-04 03:30:47 +0200
commit763b26cdb98c2702f7b2f8de239d4edba0fa4065 (patch)
treea99e15e1cb9be30eb5786e5ea1d3de809339b87b /keyboards/massdrop/alt
parent63177760deaf23bb1f676974cecf211676285604 (diff)
downloadqmk_firmware-763b26cdb98c2702f7b2f8de239d4edba0fa4065.tar.gz
qmk_firmware-763b26cdb98c2702f7b2f8de239d4edba0fa4065.tar.xz
RGB Matrix support for Massdrop CTRL/ALT (#5328)
* port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger <helluvamatt@gmail.com> * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR
Diffstat (limited to 'keyboards/massdrop/alt')
-rw-r--r--keyboards/massdrop/alt/config.h7
-rw-r--r--keyboards/massdrop/alt/config_led.c148
-rw-r--r--keyboards/massdrop/alt/config_led.h25
-rw-r--r--keyboards/massdrop/alt/keymaps/abishalom/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/default/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/default_md/keymap.c223
-rw-r--r--keyboards/massdrop/alt/keymaps/default_md/rules.mk2
-rw-r--r--keyboards/massdrop/alt/keymaps/mac/keymap.c122
-rw-r--r--keyboards/massdrop/alt/keymaps/mac_md/keymap.c193
-rw-r--r--keyboards/massdrop/alt/keymaps/mac_md/rules.mk2
-rw-r--r--keyboards/massdrop/alt/keymaps/reywood/README.md5
-rw-r--r--keyboards/massdrop/alt/keymaps/reywood/rules.mk5
-rw-r--r--keyboards/massdrop/alt/led_programs.c120
-rw-r--r--keyboards/massdrop/alt/rules.mk7
14 files changed, 652 insertions, 451 deletions
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h
index d2f73a6a8..f63c38bf6 100644
--- a/keyboards/massdrop/alt/config.h
+++ b/keyboards/massdrop/alt/config.h
@@ -119,3 +119,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_LED_PROCESS_LIMIT 15
+#define RGB_MATRIX_LED_FLUSH_LIMIT 10
+#define RGB_MATRIX_EXTRA_TOG
+
+#include "config_led.h"
diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c
new file mode 100644
index 000000000..7d98e47c9
--- /dev/null
+++ b/keyboards/massdrop/alt/config_led.c
@@ -0,0 +1,148 @@
+#ifdef RGB_MATRIX_ENABLE
+#include "alt.h"
+
+#include "led_matrix.h"
+#include "rgb_matrix.h"
+#include "config_led.h"
+
+// This table can be almost-automatically derived from ISSI3733_LED_MAP that is
+// defined in config_led.h
+
+// You can calculate the (0-244, 0-64) x/y values from the x/y values defined in
+// ISSI3733_LED_MAP with the following formula:
+// uint8_t rgb_x = ((ISSI3733_LED_MAP[i].x - MIN_X) / (MAX_X - MIN_X)) * 224;
+// uint8_t rgb_y = ((ISSI3733_LED_MAP[i].y - MIN_Y) / (MAX_Y - MIN_Y)) * 64;
+// Where the min/max vars are the minimum and maximum "bounds" of x/y values
+// present in ISSI3733_LED_MAP
+//
+// The row/col values need to be manually tweaked though, compensating for the
+// "empty" cells that are a product of larger keys
+//
+// There is a quick-and-dirty implementation of this under ledvis.html
+
+const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+ /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC
+ /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1
+ /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2
+ /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3
+ /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4
+ /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5
+ /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6
+ /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7
+ /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8
+ /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9
+ /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0
+ /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS
+ /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL
+ /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC
+ /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL
+ /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB
+ /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q
+ /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W
+ /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E
+ /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R
+ /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T
+ /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y
+ /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U
+ /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I
+ /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O
+ /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P
+ /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC
+ /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC
+ /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS
+ /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME
+ /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
+ /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A
+ /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S
+ /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D
+ /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F
+ /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G
+ /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H
+ /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J
+ /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K
+ /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L
+ /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN
+ /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT
+ /* _________________________________________ */ // ____
+ /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT
+ /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP
+ /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT
+ /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z
+ /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X
+ /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C
+ /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V
+ /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B
+ /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N
+ /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M
+ /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM
+ /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT
+ /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH
+ /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT
+ /* _________________________________________ */ // ____
+ /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP
+ /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN
+ /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL
+ /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI
+ /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* _________________________________________ */ // ____
+ /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT
+ /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1)
+ /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT
+ /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN
+ /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT
+
+ // Underglow LEDs
+ { { 255 }, { 1, 1 }, 0 },
+ { { 255 }, { 15, 0 }, 0 },
+ { { 255 }, { 31, 0 }, 0 },
+ { { 255 }, { 47, 0 }, 0 },
+ { { 255 }, { 63, 0 }, 0 },
+ { { 255 }, { 79, 0 }, 0 },
+ { { 255 }, { 95, 0 }, 0 },
+ { { 255 }, { 112, 0 }, 0 },
+ { { 255 }, { 128, 0 }, 0 },
+ { { 255 }, { 144, 0 }, 0 },
+ { { 255 }, { 160, 0 }, 0 },
+ { { 255 }, { 176, 0 }, 0 },
+ { { 255 }, { 192, 0 }, 0 },
+ { { 255 }, { 208, 0 }, 0 },
+ { { 255 }, { 222, 1 }, 0 },
+ { { 255 }, { 224, 13 }, 0 },
+ { { 255 }, { 224, 25 }, 0 },
+ { { 255 }, { 224, 38 }, 0 },
+ { { 255 }, { 224, 50 }, 0 },
+ { { 255 }, { 222, 62 }, 0 },
+ { { 255 }, { 191, 64 }, 0 },
+ { { 255 }, { 179, 64 }, 0 },
+ { { 255 }, { 167, 64 }, 0 },
+ { { 255 }, { 153, 64 }, 0 },
+ { { 255 }, { 139, 64 }, 0 },
+ { { 255 }, { 125, 64 }, 0 },
+ { { 255 }, { 112, 64 }, 0 },
+ { { 255 }, { 98, 64 }, 0 },
+ { { 255 }, { 84, 64 }, 0 },
+ { { 255 }, { 70, 64 }, 0 },
+ { { 255 }, { 56, 64 }, 0 },
+ { { 255 }, { 42, 64 }, 0 },
+ { { 255 }, { 28, 64 }, 0 },
+ { { 255 }, { 1, 62 }, 0 },
+ { { 255 }, { 0, 50 }, 0 },
+ { { 255 }, { 0, 38 }, 0 },
+ { { 255 }, { 0, 25 }, 0 },
+ { { 255 }, { 0, 13 }, 0 },
+};
+
+#ifdef USB_LED_INDICATOR_ENABLE
+void rgb_matrix_indicators_kb(void)
+{
+ led_matrix_indicators();
+}
+#endif // USB_LED_INDICATOR_ENABLE
+
+#endif
diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h
index a049e3817..82117b332 100644
--- a/keyboards/massdrop/alt/config_led.h
+++ b/keyboards/massdrop/alt/config_led.h
@@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _config_led_h_
-#define _config_led_h_
+#pragma once
//Define number of ISSI3733 drivers being used (1...16)
#define ISSI3733_DRIVER_COUNT 2
+#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT
//Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic)
#define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE }
@@ -30,21 +30,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//Count of LED bodies
#define ISSI3733_LED_COUNT 105
-//Default Global Current Register value (Default brightness 0 - 255)
-#define ISSI3733_GCR_DEFAULT 128
-
#define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus
#define LED_GCR_STEP 10 //GCR increment/decrement value
-//Automatic power rollback and recovery
-#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
-#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
-#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
-
+#ifdef USE_MASSDROP_CONFIGURATOR
#define ANIMATION_SPEED_STEP 1
+#define BREATHE_STEP 1
#define BREATHE_MIN_STEP 0
#define BREATHE_MAX_STEP 255
+#endif
+
+//Default Global Current Register value (Default brightness 0 - 255)
+#define ISSI3733_GCR_DEFAULT LED_GCR_MAX
+
+//Automatic power rollback and recovery
+#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power )
+#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit)
+#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down)
//LED Mapping - More practically generated from a spreadsheet program
//id: ID of the LED (Sync with PCB callouts)
@@ -174,5 +177,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USB_LED_COMPOSE_SCANCODE 255
#define USB_LED_KANA_SCANCODE 255
#endif //USB_LED_INDICATOR_ENABLE
-
-#endif //_config_led_h_
diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
index 10bc62c1f..a4519d404 100644
--- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = 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 \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c
index 10bc62c1f..a4519d404 100644
--- a/keyboards/massdrop/alt/keymaps/default/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/default/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = 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 \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
new file mode 100644
index 000000000..7969583df
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c
@@ -0,0 +1,223 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+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_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
+ 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_PGUP, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //LEDs are normally inactive, no processing is performed on them
+ //Flags are used in matching criteria for an LED to be active and indicate how to color it
+ //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_)
+ //LED IDs can be found in config_led.h in the keyboard's directory
+ //Examples are below
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //Specific LEDs use the user's selected pattern while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 },
+
+ //Specific LEDs use specified RGB values while all others are off
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 },
+
+ //All LEDs use the user's selected pattern
+ //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green
+ //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1)
+ //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //When layer 1 is active, key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //When layer 1 is active, edge LEDs use green (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //When layer 1 is active, edge LEDs use green (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF8000, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255, .layer = 1 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFFFFFFF8, .id3 = 0x000003FF, .g = 127, .layer = 1 },
+
+ //All key LEDs use red while edge LEDs use the active pattern
+ //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF)
+ //All key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007)
+ //Edge uses active pattern (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8)
+ //Edge uses active pattern (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF)
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255 },
+ // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFFFFFFF8, .id3 = 0x000003FF },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/default_md/rules.mk b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/default_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c
index 639eb2da7..26a1c6d01 100644
--- a/keyboards/massdrop/alt/keymaps/mac/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c
@@ -1,25 +1,13 @@
#include QMK_KEYBOARD_H
enum alt_keycodes {
- L_BRI = SAFE_RANGE, //LED Brightness Increase
- L_BRD, //LED Brightness Decrease
- L_PTN, //LED Pattern Select Next
- L_PTP, //LED Pattern Select Previous
- L_PSI, //LED Pattern Speed Increase
- L_PSD, //LED Pattern Speed Decrease
- L_T_MD, //LED Toggle Mode
- L_T_ONF, //LED Toggle On / Off
- L_ON, //LED On
- L_OFF, //LED Off
- L_T_BR, //LED Toggle Breath Effect
- L_T_PTD, //LED Toggle Scrolling Pattern Direction
- U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
- U_T_AGCR, //USB Toggle Automatic GCR control
- DBG_TOG, //DEBUG Toggle On / Off
- DBG_MTRX, //DEBUG Toggle Matrix Prints
- DBG_KBD, //DEBUG Toggle Keyboard Prints
- DBG_MOU, //DEBUG Toggle Mouse Prints
- MD_BOOT, //Restart into bootloader after hold timeout
+ U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
+ U_T_AGCR, //USB Toggle Automatic GCR control
+ DBG_TOG, //DEBUG Toggle On / Off
+ DBG_MTRX, //DEBUG Toggle Matrix Prints
+ DBG_KBD, //DEBUG Toggle Keyboard Prints
+ DBG_MOU, //DEBUG Toggle Mouse Prints
+ MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
@@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), 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_TRNS, KC_MUTE, \
- L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \
- L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \
- KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \
+ 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_MUTE, \
+ _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
),
/*
[X] = 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 \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
*/
};
@@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
switch (keycode) {
- case L_BRI:
- if (record->event.pressed) {
- if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
- else gcr_desired += LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_BRD:
- if (record->event.pressed) {
- if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
- else gcr_desired -= LED_GCR_STEP;
- if (led_animation_breathing) gcr_breathe = gcr_desired;
- }
- return false;
- case L_PTN:
- if (record->event.pressed) {
- if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
- else led_animation_id++;
- }
- return false;
- case L_PTP:
- if (record->event.pressed) {
- if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
- else led_animation_id--;
- }
- return false;
- case L_PSI:
- if (record->event.pressed) {
- led_animation_speed += ANIMATION_SPEED_STEP;
- }
- return false;
- case L_PSD:
- if (record->event.pressed) {
- led_animation_speed -= ANIMATION_SPEED_STEP;
- if (led_animation_speed < 0) led_animation_speed = 0;
- }
- return false;
- case L_T_MD:
- if (record->event.pressed) {
- led_lighting_mode++;
- if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
- }
- return false;
- case L_T_ONF:
- if (record->event.pressed) {
- led_enabled = !led_enabled;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_ON:
- if (record->event.pressed) {
- led_enabled = 1;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_OFF:
- if (record->event.pressed) {
- led_enabled = 0;
- I2C3733_Control_Set(led_enabled);
- }
- return false;
- case L_T_BR:
- if (record->event.pressed) {
- led_animation_breathing = !led_animation_breathing;
- if (led_animation_breathing) {
- gcr_breathe = gcr_desired;
- led_animation_breathe_cur = BREATHE_MIN_STEP;
- breathe_dir = 1;
- }
- }
- return false;
- case L_T_PTD:
- if (record->event.pressed) {
- led_animation_direction = !led_animation_direction;
- }
- return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
new file mode 100644
index 000000000..8a052cc25
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c
@@ -0,0 +1,193 @@
+#include QMK_KEYBOARD_H
+
+enum alt_keycodes {
+ L_BRI = SAFE_RANGE, //LED Brightness Increase //Working
+ L_BRD, //LED Brightness Decrease //Working
+ L_PTN, //LED Pattern Select Next //Working
+ L_PTP, //LED Pattern Select Previous //Working
+ L_PSI, //LED Pattern Speed Increase //Working
+ L_PSD, //LED Pattern Speed Decrease //Working
+ L_T_MD, //LED Toggle Mode //Working
+ L_T_ONF, //LED Toggle On / Off //Broken
+ L_ON, //LED On //Broken
+ L_OFF, //LED Off //Broken
+ L_T_BR, //LED Toggle Breath Effect //Working
+ L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working
+ U_T_AGCR, //USB Toggle Automatic GCR control //Working
+ DBG_TOG, //DEBUG Toggle On / Off //
+ DBG_MTRX, //DEBUG Toggle Matrix Prints //
+ DBG_KBD, //DEBUG Toggle Keyboard Prints //
+ DBG_MOU, //DEBUG Toggle Mouse Prints //
+ MD_BOOT //Restart into bootloader after hold timeout //Working
+};
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
+
+keymap_config_t keymap_config;
+
+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_MINS, KC_EQL, KC_BSPC, KC_DEL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \
+ 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_PGUP, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), 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_MUTE, \
+ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
+ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \
+ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \
+ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
+ ),
+ /*
+ [X] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ */
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+};
+
+#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
+#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
+#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ static uint32_t key_timer;
+
+ switch (keycode) {
+ case L_BRI:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
+ else gcr_desired += LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_BRD:
+ if (record->event.pressed) {
+ if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
+ else gcr_desired -= LED_GCR_STEP;
+ if (led_animation_breathing) gcr_breathe = gcr_desired;
+ }
+ return false;
+ case L_PTN:
+ if (record->event.pressed) {
+ if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
+ else led_animation_id++;
+ }
+ return false;
+ case L_PTP:
+ if (record->event.pressed) {
+ if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
+ else led_animation_id--;
+ }
+ return false;
+ case L_PSI:
+ if (record->event.pressed) {
+ led_animation_speed += ANIMATION_SPEED_STEP;
+ }
+ return false;
+ case L_PSD:
+ if (record->event.pressed) {
+ led_animation_speed -= ANIMATION_SPEED_STEP;
+ if (led_animation_speed < 0) led_animation_speed = 0;
+ }
+ return false;
+ case L_T_MD:
+ if (record->event.pressed) {
+ led_lighting_mode++;
+ if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
+ }
+ return false;
+ case L_T_ONF:
+ if (record->event.pressed) {
+ led_enabled = !led_enabled;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_ON:
+ if (record->event.pressed) {
+ led_enabled = 1;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_OFF:
+ if (record->event.pressed) {
+ led_enabled = 0;
+ I2C3733_Control_Set(led_enabled);
+ }
+ return false;
+ case L_T_BR:
+ if (record->event.pressed) {
+ led_animation_breathing = !led_animation_breathing;
+ if (led_animation_breathing) {
+ gcr_breathe = gcr_desired;
+ led_animation_breathe_cur = BREATHE_MIN_STEP;
+ breathe_dir = 1;
+ }
+ }
+ return false;
+ case L_T_PTD:
+ if (record->event.pressed) {
+ led_animation_direction = !led_animation_direction;
+ }
+ return false;
+ case U_T_AGCR:
+ if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
+ TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
+ }
+ return false;
+ case DBG_TOG:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
+ }
+ return false;
+ case DBG_MTRX:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
+ }
+ return false;
+ case DBG_KBD:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
+ }
+ return false;
+ case DBG_MOU:
+ if (record->event.pressed) {
+ TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
+ }
+ return false;
+ case MD_BOOT:
+ if (record->event.pressed) {
+ key_timer = timer_read32();
+ } else {
+ if (timer_elapsed32(key_timer) >= 500) {
+ reset_keyboard();
+ }
+ }
+ return false;
+ default:
+ return true; //Process all other keycodes normally
+ }
+}
+
+led_instruction_t led_instructions[] = {
+ //Please see ../default_md/keymap.c for examples
+
+ //All LEDs use the user's selected pattern (this is the factory default)
+ { .flags = LED_FLAG_USE_ROTATE_PATTERN },
+
+ //end must be set to 1 to indicate end of instruction set
+ { .end = 1 }
+};
diff --git a/keyboards/massdrop/alt/keymaps/mac_md/rules.mk b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
new file mode 100644
index 000000000..064a6f54c
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk
@@ -0,0 +1,2 @@
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/keymaps/reywood/README.md b/keyboards/massdrop/alt/keymaps/reywood/README.md
new file mode 100644
index 000000000..5ee630dfb
--- /dev/null
+++ b/keyboards/massdrop/alt/keymaps/reywood/README.md
@@ -0,0 +1,5 @@
+# THIS KEYMAP IS BROKEN
+
+The CTRL and ALT have both been switched to using the QMK RGB Matrix system,
+rendering any custom effects that used the old, custom Massdrop lighting system,
+BROKEN.
diff --git a/keyboards/massdrop/alt/keymaps/reywood/rules.mk b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
index b5b961a0f..956d1c700 100644
--- a/keyboards/massdrop/alt/keymaps/reywood/rules.mk
+++ b/keyboards/massdrop/alt/keymaps/reywood/rules.mk
@@ -1,6 +1,4 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
SRC += rgb_matrix_user.c
#For platform and packs
@@ -32,3 +30,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# This keymap requires Massdrop Configurator support
+OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR
diff --git a/keyboards/massdrop/alt/led_programs.c b/keyboards/massdrop/alt/led_programs.c
deleted file mode 100644
index b3b7a7e90..000000000
--- a/keyboards/massdrop/alt/led_programs.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2018 Massdrop Inc.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "alt.h"
-#include "led_matrix.h"
-
-//Teal <-> Salmon
-led_setup_t leds_teal_salmon[] = {
- { .hs = 0, .he = 33, .rs = 24, .re = 24, .gs = 215, .ge = 215, .bs = 204, .be = 204, .ef = EF_NONE },
- { .hs = 33, .he = 66, .rs = 24, .re = 255, .gs = 215, .ge = 114, .bs = 204, .be = 118, .ef = EF_NONE },
- { .hs = 66, .he = 100, .rs = 255, .re = 255, .gs = 114, .ge = 114, .bs = 118, .be = 118, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Yellow
-led_setup_t leds_yellow[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Off
-led_setup_t leds_off[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Red
-led_setup_t leds_red[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Green
-led_setup_t leds_green[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//Blue
-led_setup_t leds_blue[] = {
- { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White
-led_setup_t leds_white[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .end = 1 },
-};
-
-//White with moving red stripe
-led_setup_t leds_white_with_red_stripe[] = {
- { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE },
- { .hs = 0, .he = 15, .rs = 0, .re = 0, .gs = 0, .ge = 255, .bs = 0, .be = 255, .ef = EF_SCR_R | EF_SUBTRACT },
- { .hs = 15, .he = 30, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 0, .ef = EF_SCR_R | EF_SUBTRACT },
- { .end = 1 },
-};
-
-//Black with moving red stripe
-led_setup_t leds_black_with_red_stripe[] = {
- { .hs = 0, .he = 15, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .hs = 15, .he = 30, .rs = 255, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R },
- { .end = 1 },
-};
-
-//Rainbow no scrolling
-led_setup_t leds_rainbow_ns[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER },
- { .end = 1 },
-};
-
-//Rainbow scrolling
-led_setup_t leds_rainbow_s[] = {
- { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R },
- { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER | EF_SCR_R },
- { .end = 1 },
-};
-
-//Add new LED animations here using one from above as example
-//The last entry must be { .end = 1 }
-//Add the new animation name to the list below following its format
-
-void *led_setups[] = {
- leds_rainbow_s,
- leds_rainbow_ns,
- leds_teal_salmon,
- leds_yellow,
- leds_red,
- leds_green,
- leds_blue,
- leds_white,
- leds_white_with_red_stripe,
- leds_black_with_red_stripe,
- leds_off
-};
-
-const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]);
diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk
index c5539158f..aa45c6805 100644
--- a/keyboards/massdrop/alt/rules.mk
+++ b/keyboards/massdrop/alt/rules.mk
@@ -1,6 +1,6 @@
# project specific files
-SRC = led_programs.c
-SRC += matrix.c
+SRC = matrix.c
+SRC += config_led.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
@@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift
+
+# Custom RGB matrix handling
+RGB_MATRIX_ENABLE = custom