From e77ebe6889d5c42f36b9a9a050a4dcfbb470c37b Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 3 May 2023 07:41:59 +1000 Subject: [PATCH] Remove use of layout macros for LFKeyboards LED config (#20666) --- keyboards/lfkeyboards/lfk78/lfk78.c | 13 ------------- keyboards/lfkeyboards/lfk78/lfk78.h | 1 - keyboards/lfkeyboards/lfk78/revb/revb.c | 19 +++++++++++++++++++ keyboards/lfkeyboards/lfk78/revc/revc.c | 14 ++++++++++++++ keyboards/lfkeyboards/lfk78/revj/revj.c | 14 ++++++++++++++ keyboards/lfkeyboards/lfk87/lfk87.c | 15 --------------- keyboards/lfkeyboards/lfk87/lfk87.h | 1 - keyboards/lfkeyboards/lfk87/reva/reva.c | 16 ++++++++++++++++ keyboards/lfkeyboards/lfk87/revc/revc.c | 17 +++++++++++++++++ keyboards/lfkeyboards/mini1800/mini1800.c | 15 +++++++-------- keyboards/lfkeyboards/mini1800/mini1800.h | 1 - keyboards/woodkeys/meira/lighting.c | 13 ------------- 12 files changed, 87 insertions(+), 52 deletions(-) create mode 100644 keyboards/lfkeyboards/lfk78/revb/revb.c create mode 100644 keyboards/lfkeyboards/lfk78/revc/revc.c create mode 100644 keyboards/lfkeyboards/lfk78/revj/revj.c create mode 100644 keyboards/lfkeyboards/lfk87/reva/reva.c create mode 100644 keyboards/lfkeyboards/lfk87/revc/revc.c diff --git a/keyboards/lfkeyboards/lfk78/lfk78.c b/keyboards/lfkeyboards/lfk78/lfk78.c index 6f4c062ad8d..3a10f51cb6e 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.c +++ b/keyboards/lfkeyboards/lfk78/lfk78.c @@ -175,16 +175,3 @@ const uint8_t rgb_sequence[] = { 12, 11, 10, 9, 16, 32, 31, 30, 28, 25, 24, 22, 21, 20, 19, 18, 17, 1, 2, 3, 4, 5, 6, 7, 8, 14, 13 }; - -// Maps switch LEDs from Row/Col to ISSI matrix. -// Value breakdown: -// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -// / \ ISSI Col | ISSI Row | -// matrix idx -const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( - 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91, - 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1, - 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, - 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, - 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1 -); diff --git a/keyboards/lfkeyboards/lfk78/lfk78.h b/keyboards/lfkeyboards/lfk78/lfk78.h index ac7eaa36745..1be53181cde 100644 --- a/keyboards/lfkeyboards/lfk78/lfk78.h +++ b/keyboards/lfkeyboards/lfk78/lfk78.h @@ -1,6 +1,5 @@ #pragma once -#include QMK_KEYBOARD_H #include "quantum.h" typedef struct RGB_Color { diff --git a/keyboards/lfkeyboards/lfk78/revb/revb.c b/keyboards/lfkeyboards/lfk78/revb/revb.c new file mode 100644 index 00000000000..d5b6b47b03d --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/revb/revb.c @@ -0,0 +1,19 @@ +#include "quantum.h" + +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// / \ ISSI Col | ISSI Row | +// matrix idx +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12}, + {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22}, + {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32}, + {0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41}, + {0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5}, + {0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93}, + {0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3}, + {0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00}, + {0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, 0x00}, + {0xE4, 0xE3, 0xE2, 0xE1, 0x92, 0x91, 0xA2, 0xA1} +}; diff --git a/keyboards/lfkeyboards/lfk78/revc/revc.c b/keyboards/lfkeyboards/lfk78/revc/revc.c new file mode 100644 index 00000000000..a31aea365b2 --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/revc/revc.c @@ -0,0 +1,14 @@ +#include "quantum.h" + +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// / \ ISSI Col | ISSI Row | +// matrix idx +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91}, + {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1}, + {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00, 0x00, 0x00}, + {0x49, 0x48, 0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x00}, + {0x59, 0x58, 0x57, 0x56, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1} +}; diff --git a/keyboards/lfkeyboards/lfk78/revj/revj.c b/keyboards/lfkeyboards/lfk78/revj/revj.c new file mode 100644 index 00000000000..a31aea365b2 --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/revj/revj.c @@ -0,0 +1,14 @@ +#include "quantum.h" + +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// / \ ISSI Col | ISSI Row | +// matrix idx +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91}, + {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1}, + {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, 0x00, 0x00, 0x00}, + {0x49, 0x48, 0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x00}, + {0x59, 0x58, 0x57, 0x56, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1} +}; diff --git a/keyboards/lfkeyboards/lfk87/lfk87.c b/keyboards/lfkeyboards/lfk87/lfk87.c index 58dcfde46da..3e95361a334 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.c +++ b/keyboards/lfkeyboards/lfk87/lfk87.c @@ -153,18 +153,3 @@ const uint8_t rgb_matrices[] = {6, 7}; const uint8_t rgb_sequence[] = { 27, 29, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 15, 14, 20, 21, 22, 23, 24, 25, 26 }; - -// Maps switch LEDs from Row/Col to ISSI matrix. -// Value breakdown: -// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -// | | ISSI Col | ISSI Row | -// / | -// Device -const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = -LAYOUT_tkl_ansi( - 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91, - 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1, - 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, - 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, - 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); diff --git a/keyboards/lfkeyboards/lfk87/lfk87.h b/keyboards/lfkeyboards/lfk87/lfk87.h index d34bbfd6881..d17c1da26fa 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.h +++ b/keyboards/lfkeyboards/lfk87/lfk87.h @@ -1,6 +1,5 @@ #pragma once -#include QMK_KEYBOARD_H #include "quantum.h" #include "matrix.h" #include diff --git a/keyboards/lfkeyboards/lfk87/reva/reva.c b/keyboards/lfkeyboards/lfk87/reva/reva.c new file mode 100644 index 00000000000..86289c7a01d --- /dev/null +++ b/keyboards/lfkeyboards/lfk87/reva/reva.c @@ -0,0 +1,16 @@ +#include "quantum.h" + +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// | | ISSI Col | ISSI Row | +// / | +// Device +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x19, 0x00, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93}, + {0x92, 0x91, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4}, + {0xA3, 0xA2, 0xA1, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5}, + {0xB3, 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0x00, 0x00, 0x00, 0x00}, + {0xC5, 0x00, 0xC4, 0xC2, 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0x00, 0x00, 0xE3, 0x00}, + {0xE2, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; diff --git a/keyboards/lfkeyboards/lfk87/revc/revc.c b/keyboards/lfkeyboards/lfk87/revc/revc.c new file mode 100644 index 00000000000..f14a1f38e53 --- /dev/null +++ b/keyboards/lfkeyboards/lfk87/revc/revc.c @@ -0,0 +1,17 @@ +#include "quantum.h" + +// Maps switch LEDs from Row/Col to ISSI matrix. +// Value breakdown: +// Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +// | | ISSI Col | ISSI Row | +// / | +// Device +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x00, 0x95, 0x94, 0x93}, + {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0x00, 0xA6, 0xA5, 0xA4}, + {0xA2, 0xA1, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5}, + {0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0xC4, 0xC2, 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0x00, 0x00, 0xE3, 0x00}, + {0xB3, 0xC5, 0xE2, 0xE1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x19, 0x92, 0x91, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; diff --git a/keyboards/lfkeyboards/mini1800/mini1800.c b/keyboards/lfkeyboards/mini1800/mini1800.c index adccd8c2787..e1fa3a988d2 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.c +++ b/keyboards/lfkeyboards/mini1800/mini1800.c @@ -165,11 +165,10 @@ const uint8_t rgb_sequence[] = { // | | ISSI Col | ISSI Row | // / | // Device -const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = -LAYOUT( - 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x95, 0x94, 0x93, 0x92, 0x91, - 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xA4, 0xA3, 0xA2, 0xA1, - 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, 0xB3, - 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC2, - 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2, 0xE1, - 0x00, 0x00, 0x00, 0x00); +const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = { + {0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x99, 0x98, 0x97, 0x96, 0x00, 0x95, 0x94, 0x93, 0x92, 0x91}, + {0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, 0xB6, 0xA4, 0xA3, 0xA2, 0xA1}, + {0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0x00, 0x00, 0x00, 0xB5, 0xB3, 0x49, 0x48}, + {0x47, 0x00, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0x00, 0xC2, 0x59, 0x58, 0x57, 0x56}, + {0x55, 0x51, 0xD6, 0x00, 0x00, 0xE5, 0x00, 0x00, 0x00, 0x00, 0xE4, 0xE3, 0xE2, 0x00, 0xE1, 0x00, 0x00, 0x00, 0x00} +}; diff --git a/keyboards/lfkeyboards/mini1800/mini1800.h b/keyboards/lfkeyboards/mini1800/mini1800.h index d26f3301846..c412058096c 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.h +++ b/keyboards/lfkeyboards/mini1800/mini1800.h @@ -1,6 +1,5 @@ #pragma once -#include QMK_KEYBOARD_H #include "matrix.h" #include diff --git a/keyboards/woodkeys/meira/lighting.c b/keyboards/woodkeys/meira/lighting.c index 6cbe101dbc4..6a17250a296 100755 --- a/keyboards/woodkeys/meira/lighting.c +++ b/keyboards/woodkeys/meira/lighting.c @@ -16,19 +16,6 @@ const uint8_t backlight_pwm_map[BACKLIGHT_LEVELS] = BACKLIGHT_PWM_MAP; const uint8_t switch_matrices[] = {0, 1}; - // Maps switch LEDs from Row/Col to ISSI matrix. - // Value breakdown: - // Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | - // | | ISSI Col | ISSI Row | - // / | - // Device -// const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = -// LAYOUT( -// 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, -// 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, -// 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, -// 0x59, 0x58, 0x57, 0x56, 0x55, 0x51, 0xD6, 0xE5, 0xE4, 0xE3, 0xE2); - void backlight_set(uint8_t level){ #ifdef BACKLIGHT_ENABLE uint8_t pwm_value = 0;