diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2016-10-09 19:26:16 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2016-10-09 19:26:16 +0300 |
| commit | 9b0e21f87f446935f29254bb623c2cfe29472b6e (patch) | |
| tree | cc723098b72f88171baa808021ebf799a8d83a5a /quantum | |
| parent | 0ae07ae64d3549d34c021f70b4a9877e5cd9ced9 (diff) | |
| download | qmk_firmware-9b0e21f87f446935f29254bb623c2cfe29472b6e.tar.gz qmk_firmware-9b0e21f87f446935f29254bb623c2cfe29472b6e.zip | |
Tunable RGB light intervals
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/rgblight.c | 6 | ||||
| -rw-r--r-- | quantum/rgblight.h | 6 |
2 files changed, 12 insertions, 0 deletions
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 { |
