diff options
author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-07-14 12:26:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 21:26:00 -0700 |
commit | b29179de1afc1daaeacfc8685a1d69be13dc5d0e (patch) | |
tree | 168e65d8d38668ea08808746b43bf9cce1da4830 /keyboards/bastardkb | |
parent | ef8267d6a75c281e6981ea07520d369e2ef092fc (diff) |
RGB Matrix support for Scylla (#13415)
Co-authored-by: filterpaper <filterpaper@localhost>
Diffstat (limited to 'keyboards/bastardkb')
-rw-r--r-- | keyboards/bastardkb/scylla/config.h | 22 | ||||
-rw-r--r-- | keyboards/bastardkb/scylla/rules.mk | 4 | ||||
-rw-r--r-- | keyboards/bastardkb/scylla/scylla.c | 45 |
3 files changed, 68 insertions, 3 deletions
diff --git a/keyboards/bastardkb/scylla/config.h b/keyboards/bastardkb/scylla/config.h index b00e781df2..2a4972ea1e 100644 --- a/keyboards/bastardkb/scylla/config.h +++ b/keyboards/bastardkb/scylla/config.h @@ -1,4 +1,4 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> * * This program is free software: you can redistribute it and/or modify @@ -37,3 +37,23 @@ #define DEBOUNCE 5 #define SOFT_SERIAL_PIN D0 #define MASTER_RIGHT + +#ifdef RGBLIGHT_ENABLE +# define RGBLED_NUM 58 +# define RGBLED_SPLIT { 29, 29 } +# define RGBLIGHT_LIMIT_VAL 50 +# define RGBLIGHT_ANIMATIONS +#endif + +// RGB matrix support +#ifdef RGB_MATRIX_ENABLE +# define SPLIT_TRANSPORT_MIRROR +# define DRIVER_LED_TOTAL 58 // Number of LEDs +# define RGB_MATRIX_SPLIT { 29, 29 } +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_DISABLE_WHEN_USB_SUSPENDED true +# endif +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/bastardkb/scylla/rules.mk b/keyboards/bastardkb/scylla/rules.mk index cc88208e33..70e6f13e0b 100644 --- a/keyboards/bastardkb/scylla/rules.mk +++ b/keyboards/bastardkb/scylla/rules.mk @@ -17,7 +17,9 @@ 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 -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes diff --git a/keyboards/bastardkb/scylla/scylla.c b/keyboards/bastardkb/scylla/scylla.c index f9e7917085..b110d7ff5a 100644 --- a/keyboards/bastardkb/scylla/scylla.c +++ b/keyboards/bastardkb/scylla/scylla.c @@ -1,4 +1,4 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com> * * This program is free software: you can redistribute it and/or modify @@ -16,3 +16,46 @@ */ #include "scylla.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // left + { 0, 7, 8, 15, 16, 20 }, + { 1, 6, 9, 14, 17, 21 }, + { 2, 5, 10, 13, 18, 22 }, + { 3, 4, 11, 12, 19, 23 }, + { NO_LED, 28, 24, 26, 27, 25 }, + // right + { 29, 36, 37, 44, 45, 49 }, + { 30, 35, 38, 43, 46, 50 }, + { 31, 34, 39, 42, 47, 51 }, + { 32, 33, 40, 41, 48, 52 }, + { NO_LED, 57, 53, 55, 56, 54 } +}, { + // left + { 0, 0 }, { 0, 16 }, { 0, 32 }, { 0, 48 }, // col 1 + { 20, 48 }, { 20, 32 }, { 20, 16 }, { 20, 0 }, // col 2 + { 41, 0 }, { 41, 16 }, { 41, 32 }, { 41, 48 }, + { 61, 48 }, { 61, 32 }, { 61, 16 }, { 61, 0 }, + { 81, 0 }, { 81, 16 }, { 81, 32 }, { 81, 48 }, + { 102, 0 }, { 102, 16 }, { 102, 32 }, { 102, 48 }, + { 102, 64 }, { 81, 64 }, { 61, 56 }, { 81, 56 }, { 102, 56 }, // left thumb cluster + // right + { 224, 0 }, { 224, 16 }, { 224, 32 }, { 224, 48 }, // col 12 + { 204, 48 }, { 204, 32 }, { 204, 16 }, { 204, 0 }, // col 11 + { 183, 0 }, { 183, 16 }, { 183, 32 }, { 183, 48 }, + { 163, 48 }, { 163, 32 }, { 163, 16 }, { 163, 0 }, + { 142, 0 }, { 142, 16 }, { 142, 32 }, { 142, 48 }, + { 122, 0 }, { 122, 16 }, { 122, 32 }, { 122, 48 }, + { 122, 64 }, { 142, 64 }, { 163, 56 }, { 142, 56 }, { 122, 56 } // right thumb cluster +}, { + // left + 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2, + // right + 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 2, 2, 2, 2, 2 +} }; +#endif |