diff options
| author | kb-elmo <lorwel@mailbox.org> | 2022-01-11 18:57:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-11 09:57:03 -0800 |
| commit | 3124dfc5cd739bba632814e0f04281715bf1b05e (patch) | |
| tree | a64c35d59d74b7a23aa1010aafbd634f7b8fde94 /keyboards | |
| parent | 0963140149d43d40beef909bc4e181f8bd39acfd (diff) | |
| download | qmk_firmware-3124dfc5cd739bba632814e0f04281715bf1b05e.tar.gz qmk_firmware-3124dfc5cd739bba632814e0f04281715bf1b05e.zip | |
[Keyboard] Add RGB matrix to CK60 (#15817)
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/senselessclay/ck60/ck60.c | 30 | ||||
| -rw-r--r-- | keyboards/senselessclay/ck60/config.h | 111 | ||||
| -rw-r--r-- | keyboards/senselessclay/ck60/rules.mk | 9 |
3 files changed, 70 insertions, 80 deletions
diff --git a/keyboards/senselessclay/ck60/ck60.c b/keyboards/senselessclay/ck60/ck60.c index a2fe38aac..1c30b7718 100644 --- a/keyboards/senselessclay/ck60/ck60.c +++ b/keyboards/senselessclay/ck60/ck60.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright 2020 Hadi Iskandarani | 1 | /* Copyright 2022 kb-elmo<mail@elmo.space> |
| 2 | * | 2 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 3 | * This program is free software: you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by | 4 | * it under the terms of the GNU General Public License as published by |
| @@ -14,4 +14,30 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "ck60.h" \ No newline at end of file | 17 | #include "ck60.h" |
| 18 | |||
| 19 | #define __ NO_LED | ||
| 20 | |||
| 21 | #ifdef RGB_MATRIX_ENABLE | ||
| 22 | led_config_t g_led_config = { { | ||
| 23 | //Key Matrix to LED Index | ||
| 24 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, | ||
| 25 | { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, | ||
| 26 | { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, __ }, | ||
| 27 | { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, __ }, | ||
| 28 | { 54, 55, 56, __, __, __, 57, __, __, __, 58, 59, 60, 61 } | ||
| 29 | }, { | ||
| 30 | //LED Index to Physical Positon | ||
| 31 | { 0, 0 }, { 17, 0 }, { 34, 0 }, { 52, 0 }, { 69, 0 }, { 86, 0 }, { 103, 0 }, { 121, 0 }, { 138, 0 }, { 155, 0 }, { 172, 0 }, { 190, 0 }, { 207, 0 }, { 215, 0 }, | ||
| 32 | { 224, 24 }, { 215, 16 }, { 198, 16 }, { 180, 16 }, { 164, 16 }, { 146, 16 }, { 129, 16 }, { 112, 16 }, { 95, 16 }, { 78, 16 }, { 60, 16 }, { 43, 16 }, { 26 , 16 }, { 0, 16 }, | ||
| 33 | { 0, 32 }, { 30, 32 }, { 47, 32 }, { 65, 32 }, { 81, 32 }, { 99, 32 }, { 116, 32 }, { 133, 32 }, { 150, 32 }, { 168, 32 }, { 185, 32 }, { 202, 32 }, { 220, 32 }, | ||
| 34 | { 207, 48 }, { 190, 48 }, { 172, 48 }, { 155, 48 }, { 138, 48 }, { 121, 48 }, { 103, 48 }, { 86, 48 }, { 69, 48 }, { 52, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, | ||
| 35 | { 0, 64 }, { 17, 64 }, { 34, 64 }, { 103, 64 }, { 172, 64 }, { 190, 64 }, { 207, 64 }, { 224, 64 } | ||
| 36 | }, { | ||
| 37 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 38 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 39 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 40 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 41 | 1, 1, 1, 4, 1, 1, 1, 1 | ||
| 42 | } }; | ||
| 43 | #endif | ||
diff --git a/keyboards/senselessclay/ck60/config.h b/keyboards/senselessclay/ck60/config.h index 7e4a49370..f826ad9ad 100644 --- a/keyboards/senselessclay/ck60/config.h +++ b/keyboards/senselessclay/ck60/config.h | |||
| @@ -30,90 +30,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 30 | #define MATRIX_ROWS 5 | 30 | #define MATRIX_ROWS 5 |
| 31 | #define MATRIX_COLS 14 | 31 | #define MATRIX_COLS 14 |
| 32 | 32 | ||
| 33 | /* | 33 | /* Keyboard Matrix Assignments */ |
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | /* rev0 */ | ||
| 44 | #define MATRIX_ROW_PINS { B3, B2, F1, F4, F5 } | 34 | #define MATRIX_ROW_PINS { B3, B2, F1, F4, F5 } |
| 45 | #define MATRIX_COL_PINS { F0, D5, D3, D2, D1, D0, C7, C6, B6, B5, B4, D7, D6, D4 } | 35 | #define MATRIX_COL_PINS { F0, D5, D3, D2, D1, D0, C7, C6, B6, B5, B4, D7, D6, D4 } |
| 46 | 36 | ||
| 47 | //#define UNUSED_PINS { B0, B7, E6 } | ||
| 48 | |||
| 49 | /* COL2ROW, ROW2COL */ | 37 | /* COL2ROW, ROW2COL */ |
| 50 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
| 51 | 39 | ||
| 52 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 40 | /* Debounce reduces chatter */ |
| 53 | #define DEBOUNCE 5 | 41 | #define DEBOUNCE 5 |
| 54 | 42 | ||
| 55 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | 43 | /* RGB matrix lighting */ |
| 56 | //#define MATRIX_HAS_GHOST | 44 | #define RGB_DI_PIN B1 |
| 57 | 45 | #define DRIVER_LED_TOTAL 62 | |
| 58 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 46 | #define RGB_MATRIX_KEYPRESSES |
| 59 | #define LOCKING_SUPPORT_ENABLE | 47 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS |
| 60 | /* Locking resynchronize hack */ | 48 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 // limit brightness to not overamp the USB |
| 61 | #define LOCKING_RESYNC_ENABLE | 49 | #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // 16 is equivalent to limiting to 60fps |
| 62 | 50 | #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | |
| 63 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | 51 | #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended |
| 64 | * This is useful for the Windows task manager shortcut (ctrl+shift+esc). | 52 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL |
| 65 | */ | 53 | |
| 66 | //#define GRAVE_ESC_CTRL_OVERRIDE | 54 | // RGB Matrix Animation modes. Explicitly enabled |
| 67 | 55 | // For full list of effects, see: | |
| 68 | /* | 56 | // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects |
| 69 | * Force NKRO | 57 | # define ENABLE_RGB_MATRIX_ALPHAS_MODS |
| 70 | * | 58 | # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN |
| 71 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | 59 | # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT |
| 72 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | 60 | # define ENABLE_RGB_MATRIX_BREATHING |
| 73 | * makefile for this to work.) | 61 | # define ENABLE_RGB_MATRIX_BAND_VAL |
| 74 | * | 62 | # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL |
| 75 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | 63 | # define ENABLE_RGB_MATRIX_CYCLE_ALL |
| 76 | * until the next keyboard reset. | 64 | # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT |
| 77 | * | 65 | # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN |
| 78 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | 66 | # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN |
| 79 | * fully operational during normal computer usage. | 67 | # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL |
| 80 | * | 68 | # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS |
| 81 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | 69 | # define ENABLE_RGB_MATRIX_RAINDROPS |
| 82 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | 70 | // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined |
| 83 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | 71 | # define ENABLE_RGB_MATRIX_TYPING_HEATMAP |
| 84 | * power-up. | 72 | // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined |
| 85 | * | 73 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE |
| 86 | */ | 74 | # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE |
| 87 | //#define FORCE_NKRO | 75 | # define ENABLE_RGB_MATRIX_MULTISPLASH |
| 88 | 76 | # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH | |
| 89 | /* | ||
| 90 | * Feature disable options | ||
| 91 | * These options are also useful to firmware size reduction. | ||
| 92 | */ | ||
| 93 | |||
| 94 | /* disable debug print */ | ||
| 95 | //#define NO_DEBUG | ||
| 96 | |||
| 97 | /* disable print */ | ||
| 98 | //#define NO_PRINT | ||
| 99 | |||
| 100 | /* disable action features */ | ||
| 101 | //#define NO_ACTION_LAYER | ||
| 102 | //#define NO_ACTION_TAPPING | ||
| 103 | //#define NO_ACTION_ONESHOT | ||
| 104 | 77 | ||
| 105 | /* disable these deprecated features by default */ | 78 | /* disable these deprecated features by default */ |
| 106 | #define NO_ACTION_MACRO | 79 | #define NO_ACTION_MACRO |
| 107 | #define NO_ACTION_FUNCTION | 80 | #define NO_ACTION_FUNCTION |
| 108 | |||
| 109 | /* Bootmagic Lite key configuration */ | ||
| 110 | //#define BOOTMAGIC_LITE_ROW 0 | ||
| 111 | //#define BOOTMAGIC_LITE_COLUMN 0 | ||
| 112 | |||
| 113 | /* RGB Backlighting */ | ||
| 114 | #define RGB_DI_PIN B1 | ||
| 115 | #define RGBLED_NUM 62 | ||
| 116 | #define RGBLIGHT_ANIMATIONS | ||
| 117 | #define RGBLIGHT_LIMIT_VAL 128 | ||
| 118 | #define RGBLIGHT_SLEEP | ||
| 119 | #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL+5 \ No newline at end of file | ||
diff --git a/keyboards/senselessclay/ck60/rules.mk b/keyboards/senselessclay/ck60/rules.mk index 6b490bdd0..56aec9442 100644 --- a/keyboards/senselessclay/ck60/rules.mk +++ b/keyboards/senselessclay/ck60/rules.mk | |||
| @@ -8,11 +8,14 @@ BOOTLOADER = atmel-dfu | |||
| 8 | # change yes to no to disable | 8 | # change yes to no to disable |
| 9 | # | 9 | # |
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite |
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | 11 | MOUSEKEY_ENABLE = no # Mouse keys |
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | 12 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 13 | CONSOLE_ENABLE = no # Console for debug | 13 | CONSOLE_ENABLE = no # Console for debug |
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | 14 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 15 | NKRO_ENABLE = yes # Enable N-Key Rollover | 15 | NKRO_ENABLE = yes # Enable N-Key Rollover |
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | 17 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow |
| 18 | AUDIO_ENABLE = no # Audio output \ No newline at end of file | 18 | AUDIO_ENABLE = no # Audio output |
| 19 | |||
| 20 | RGB_MATRIX_ENABLE = yes # RGB matrix lighting | ||
| 21 | RGB_MATRIX_DRIVER = WS2812 \ No newline at end of file | ||
