diff options
| author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2021-01-25 14:05:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 22:05:16 -0800 |
| commit | ffb85b1f5d5a7d72d13fcd8570fe7da82d0213cf (patch) | |
| tree | a1d1561579ef168b4eefe3b33f51398836a91109 /keyboards/boardsource | |
| parent | c65aecc53adfc1c2cae11acdc4fb973792061767 (diff) | |
| download | qmk_firmware-ffb85b1f5d5a7d72d13fcd8570fe7da82d0213cf.tar.gz qmk_firmware-ffb85b1f5d5a7d72d13fcd8570fe7da82d0213cf.zip | |
[Keyboard] Add RGB Matrix support for The Mark:65 (#11676)
* Add RGB Matrix support for Mark 65 keyboard
* Update drive LED count
* Removed unnecessary define line
* Corrected typo
Co-authored-by: filterpaper <filterpaper@localhost>
Diffstat (limited to 'keyboards/boardsource')
| -rw-r--r-- | keyboards/boardsource/the_mark/config.h | 5 | ||||
| -rw-r--r-- | keyboards/boardsource/the_mark/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/boardsource/the_mark/the_mark.c | 21 |
3 files changed, 28 insertions, 0 deletions
diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h index 507bac966..dd18ec814 100644 --- a/keyboards/boardsource/the_mark/config.h +++ b/keyboards/boardsource/the_mark/config.h | |||
| @@ -53,6 +53,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 53 | #define RGBLED_NUM 24 // Number of LEDs | 53 | #define RGBLED_NUM 24 // Number of LEDs |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | /* RGB matrix support */ | ||
| 57 | #ifdef RGB_MATRIX_ENABLE | ||
| 58 | #define DRIVER_LED_TOTAL 24 // Number of LEDs | ||
| 59 | #endif | ||
| 60 | |||
| 56 | /* | 61 | /* |
| 57 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | 62 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. |
| 58 | */ | 63 | */ |
diff --git a/keyboards/boardsource/the_mark/rules.mk b/keyboards/boardsource/the_mark/rules.mk index 38ce53e30..8fb8f42bc 100644 --- a/keyboards/boardsource/the_mark/rules.mk +++ b/keyboards/boardsource/the_mark/rules.mk | |||
| @@ -20,3 +20,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth |
| 22 | AUDIO_ENABLE = no # Audio output | 22 | AUDIO_ENABLE = no # Audio output |
| 23 | RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) | ||
| 24 | RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support | ||
diff --git a/keyboards/boardsource/the_mark/the_mark.c b/keyboards/boardsource/the_mark/the_mark.c index 9d3dedc08..bb37974f6 100644 --- a/keyboards/boardsource/the_mark/the_mark.c +++ b/keyboards/boardsource/the_mark/the_mark.c | |||
| @@ -15,3 +15,24 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "the_mark.h" | 17 | #include "the_mark.h" |
| 18 | |||
| 19 | /* Map physical under glow LEDs for RGB matrix support */ | ||
| 20 | #ifdef RGB_MATRIX_ENABLE | ||
| 21 | led_config_t g_led_config = { { | ||
| 22 | // Key Matrix to LED Index | ||
| 23 | { NO_LED, 10 , 9 , NO_LED, 8 , 7 , NO_LED, 6 , 5 , NO_LED, 4 , 3 , NO_LED, 2 , 1 , NO_LED }, | ||
| 24 | { NO_LED, 11 , NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 , NO_LED }, | ||
| 25 | { NO_LED, 12 , NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 23 , NO_LED }, | ||
| 26 | { NO_LED, 13 , 14 , NO_LED, 15 , 16 , NO_LED, 17 , 18 , NO_LED, 19 , 20 , NO_LED, 21 , 22 , NO_LED }, | ||
| 27 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 28 | }, { | ||
| 29 | // LED Index to Physical Position | ||
| 30 | {224, 42}, {224, 21}, {209, 21}, {179, 21}, {164, 21}, {134, 21}, {119, 21}, {89, 21}, {74, 21}, {45, 21}, {30, 21}, {30, 42}, | ||
| 31 | {30, 64}, {30, 85}, {45, 85}, {74, 85}, {89, 85}, {119, 85}, {134, 85}, {164, 85}, {179, 85}, {209, 85}, {224, 85}, {224, 64} | ||
| 32 | }, { | ||
| 33 | // LED Index to Flag | ||
| 34 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, | ||
| 35 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, | ||
| 36 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL | ||
| 37 | } }; | ||
| 38 | #endif | ||
