diff options
| -rw-r--r-- | keyboards/cluecard/keymaps/default/readme.md | 4 | ||||
| -rw-r--r-- | keyboards/cluecard/keymaps/rgb_effects/Makefile | 21 | ||||
| -rw-r--r-- | keyboards/cluecard/keymaps/rgb_effects/config.h | 12 | ||||
| -rw-r--r-- | keyboards/cluecard/keymaps/rgb_effects/keymap.c | 28 | ||||
| -rw-r--r-- | keyboards/cluecard/keymaps/rgb_effects/readme.md | 7 | ||||
| -rw-r--r-- | quantum/rgblight.c | 6 | ||||
| -rw-r--r-- | quantum/rgblight.h | 6 |
7 files changed, 84 insertions, 0 deletions
diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md index 9e3b97bea..fa4e8ccad 100644 --- a/keyboards/cluecard/keymaps/default/readme.md +++ b/keyboards/cluecard/keymaps/default/readme.md | |||
| @@ -1 +1,5 @@ | |||
| 1 | # The default keymap for cluecard | 1 | # The default keymap for cluecard |
| 2 | |||
| 3 | Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. | ||
| 4 | So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness | ||
| 5 | buttons. You can of course also turn them on and off with the on/off button. | ||
diff --git a/keyboards/cluecard/keymaps/rgb_effects/Makefile b/keyboards/cluecard/keymaps/rgb_effects/Makefile new file mode 100644 index 000000000..00670c0cf --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/Makefile | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Build Options | ||
| 2 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 3 | # the appropriate keymap folder that will get included automatically | ||
| 4 | # | ||
| 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 7 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 8 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 9 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 11 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 12 | MIDI_ENABLE = no # MIDI controls | ||
| 13 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 14 | UNICODE_ENABLE = no # Unicode | ||
| 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 16 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | ||
| 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 18 | |||
| 19 | ifndef QUANTUM_DIR | ||
| 20 | include ../../../../Makefile | ||
| 21 | endif | ||
diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h new file mode 100644 index 000000000..e88847df4 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/config.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | // place overrides here | ||
| 7 | #define RGBLIGHT_TIMER | ||
| 8 | #define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 | ||
| 9 | #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 | ||
| 10 | #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 | ||
| 11 | |||
| 12 | #endif | ||
diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c new file mode 100644 index 000000000..74c95ce8a --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/keymap.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #include "cluecard.h" | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | [0] = KEYMAP( | ||
| 5 | RGB_TOG, RGB_SAI, RGB_VAI, \ | ||
| 6 | RGB_HUD, RGB_HUI, \ | ||
| 7 | RGB_MOD, RGB_SAD, RGB_VAD, \ | ||
| 8 | BL_STEP, \ | ||
| 9 | KC_NO, KC_NO, KC_NO \ | ||
| 10 | ) | ||
| 11 | }; | ||
| 12 | |||
| 13 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85}; | ||
| 14 | const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85}; | ||
| 15 | |||
| 16 | void matrix_init_user(void) { | ||
| 17 | } | ||
| 18 | |||
| 19 | void matrix_scan_user(void) { | ||
| 20 | |||
| 21 | } | ||
| 22 | |||
| 23 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 24 | return true; | ||
| 25 | } | ||
| 26 | |||
| 27 | void led_set_user(uint8_t usb_led) { | ||
| 28 | } | ||
diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md new file mode 100644 index 000000000..949cac394 --- /dev/null +++ b/keyboards/cluecard/keymaps/rgb_effects/readme.md | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # RGB effect test keymap for cluecard | ||
| 2 | |||
| 3 | This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each | ||
| 4 | effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check | ||
| 5 | the `rgblight.c` file. | ||
| 6 | |||
| 7 | The hue, saturation and brightness buttons will work depending on which effect is active. | ||
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f82e3ec55..9eac87a20 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -42,10 +42,16 @@ const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = { | |||
| 42 | 37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11, | 42 | 37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11, |
| 43 | 10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0 | 43 | 10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0 |
| 44 | }; | 44 | }; |
| 45 | |||
| 46 | __attribute__ ((weak)) | ||
| 45 | const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; | 47 | const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; |
| 48 | __attribute__ ((weak)) | ||
| 46 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; | 49 | const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; |
| 50 | __attribute__ ((weak)) | ||
| 47 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; | 51 | const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; |
| 52 | __attribute__ ((weak)) | ||
| 48 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; | 53 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; |
| 54 | __attribute__ ((weak)) | ||
| 49 | const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; | 55 | const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; |
| 50 | 56 | ||
| 51 | rgblight_config_t rgblight_config; | 57 | rgblight_config_t rgblight_config; |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index def26c428..17f04ffcf 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -40,6 +40,12 @@ | |||
| 40 | #include "eeconfig.h" | 40 | #include "eeconfig.h" |
| 41 | #include "light_ws2812.h" | 41 | #include "light_ws2812.h" |
| 42 | 42 | ||
| 43 | extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; | ||
| 44 | extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; | ||
| 45 | extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; | ||
| 46 | extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; | ||
| 47 | extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; | ||
| 48 | |||
| 43 | typedef union { | 49 | typedef union { |
| 44 | uint32_t raw; | 50 | uint32_t raw; |
| 45 | struct { | 51 | struct { |
