aboutsummaryrefslogtreecommitdiff
path: root/keyboards/splitkb
diff options
context:
space:
mode:
authorAlbert Y <76888457+filterpaper@users.noreply.github.com>2021-07-27 10:42:34 +0800
committerGitHub <noreply@github.com>2021-07-26 19:42:34 -0700
commitbe34fdea4b2903ae12de57b36a68b7c7b0648b74 (patch)
tree1cc608dfbab46e11a56448e4c6496b1856bb8cf5 /keyboards/splitkb
parent3affdcb45b51641b2a5d918c69f3afe2b2f5c757 (diff)
downloadqmk_firmware-be34fdea4b2903ae12de57b36a68b7c7b0648b74.tar.gz
qmk_firmware-be34fdea4b2903ae12de57b36a68b7c7b0648b74.zip
[Keyboard] Add RGB matrix support for Kyria (#12789)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: filterpaper <filterpaper@localhost>
Diffstat (limited to 'keyboards/splitkb')
-rw-r--r--keyboards/splitkb/kyria/rev1/config.h9
-rw-r--r--keyboards/splitkb/kyria/rev1/rev1.c25
-rw-r--r--keyboards/splitkb/kyria/rev1/rules.mk4
3 files changed, 38 insertions, 0 deletions
diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h
index 1b7dc9849..2c96e74a7 100644
--- a/keyboards/splitkb/kyria/rev1/config.h
+++ b/keyboards/splitkb/kyria/rev1/config.h
@@ -72,3 +72,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
72#ifdef OLED_DRIVER_ENABLE 72#ifdef OLED_DRIVER_ENABLE
73# define OLED_DISPLAY_128X64 73# define OLED_DISPLAY_128X64
74#endif 74#endif
75
76/* RGB matrix support */
77#ifdef RGB_MATRIX_ENABLE
78# define SPLIT_TRANSPORT_MIRROR
79# define DRIVER_LED_TOTAL RGBLED_NUM // Number of LEDs
80# define RGB_MATRIX_SPLIT { 10, 10 }
81# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170
82# define RGB_DISABLE_WHEN_USB_SUSPENDED
83#endif
diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c
index fef272e38..8da217810 100644
--- a/keyboards/splitkb/kyria/rev1/rev1.c
+++ b/keyboards/splitkb/kyria/rev1/rev1.c
@@ -30,6 +30,31 @@ __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATR
30// clang-format on 30// clang-format on
31#endif 31#endif
32 32
33#ifdef RGB_MATRIX_ENABLE
34/* Map physical under glow LEDs for RGB matrix support */
35led_config_t g_led_config = { {
36 // Key Matrix to LED Index
37 { NO_LED, NO_LED, NO_LED, 4, NO_LED, NO_LED, 5, 9 },
38 { NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
39 { NO_LED, 0, NO_LED, NO_LED, NO_LED, 7, 6, 8 },
40 { NO_LED, NO_LED, 1, 2, NO_LED, NO_LED, NO_LED, NO_LED },
41 { NO_LED, NO_LED, NO_LED, 14, NO_LED, NO_LED, 15, 19 },
42 { NO_LED, NO_LED, 13, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
43 { NO_LED, 10, NO_LED, NO_LED, NO_LED, 17, 16, 18 },
44 { NO_LED, NO_LED, 11, 12, NO_LED, NO_LED, NO_LED, NO_LED },
45}, {
46 // LED Index to Physical Position
47 {91,40}, {77,56}, {63,56}, {77,24}, {63,8}, {21,8}, {21,40}, {35,40}, {7,40}, {7,8},
48 {133,40}, {147,56}, {161,56}, {147,24}, {161,8}, {203,8}, {203,40}, {189,40}, {217,40}, {217,8}
49}, {
50 // LED Index to Flag
51 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
52 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
53 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
54 LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
55} };
56#endif
57
33#ifdef OLED_DRIVER_ENABLE 58#ifdef OLED_DRIVER_ENABLE
34__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } 59__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
35 60
diff --git a/keyboards/splitkb/kyria/rev1/rules.mk b/keyboards/splitkb/kyria/rev1/rules.mk
index 8b1c9616c..6b9217782 100644
--- a/keyboards/splitkb/kyria/rev1/rules.mk
+++ b/keyboards/splitkb/kyria/rev1/rules.mk
@@ -1,3 +1,7 @@
1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays 1OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
2ENCODER_ENABLE = yes # ENables the use of one or more encoders 2ENCODER_ENABLE = yes # ENables the use of one or more encoders
3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow 3RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
4RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE)
5RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support
6
7RGB_MATRIX_SUPPORTED = yes