Rename RGBLED_NUM -> RGBLIGHT_LED_COUNT (#22570)
This commit is contained in:
parent
3c7e9a6827
commit
e648155113
90 changed files with 254 additions and 263 deletions
|
|
@ -142,12 +142,12 @@
|
|||
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
|
||||
|
||||
// RGBLight
|
||||
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
"RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"},
|
||||
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
|
||||
"RGBLIGHT_LED_COUNT": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLIGHT_LED_MAP": {"info_key": "rgblight.led_map", "value_type": "array.int"},
|
||||
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
|
||||
"RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"},
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ If you define these options you will enable the associated feature, which may in
|
|||
* Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
|
||||
* If defined, then [lighting layers](feature_rgblight?id=overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* `#define RGBLED_NUM 12`
|
||||
* `#define RGBLIGHT_LED_COUNT 12`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
* Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ RGBLIGHT_DRIVER = apa102
|
|||
|
||||
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
|
||||
|
||||
|Define |Description |
|
||||
|---------------|-------------------------------------------------------------------------|
|
||||
|`WS2812_DI_PIN`|The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN`|The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN`|The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLED_NUM` |The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half|
|
||||
|Define |Description |
|
||||
|--------------------|-------------------------------------------------------------------------|
|
||||
|`WS2812_DI_PIN` |The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN` |The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLIGHT_LED_COUNT`|The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half|
|
||||
|
||||
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
|
||||
|
||||
|
|
@ -152,28 +152,28 @@ Use these defines to add or remove animations from the firmware. When you are ru
|
|||
|
||||
The following options are used to tweak the various animations:
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-----------------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|--------------------|-----------------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined* |If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLIGHT_LED_COUNT`|The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||
|
||||
### Example Usage to Reduce Memory Footprint
|
||||
1. Use `#undef` to selectively disable animations. The following would disable two animations and save about 4KiB:
|
||||
|
||||
```diff
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
+#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
+#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
```
|
||||
|
|
@ -386,10 +386,10 @@ rgblight_set(); // Utility functions do not call rgblight_set() automatically, s
|
|||
#### direct operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM)|
|
||||
|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|
|
@ -519,7 +519,7 @@ By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED
|
|||
```c
|
||||
// config.h
|
||||
|
||||
#define RGBLED_NUM 4
|
||||
#define RGBLIGHT_LED_COUNT 4
|
||||
#define RGBLIGHT_LED_MAP { 3, 2, 1, 0 }
|
||||
|
||||
```
|
||||
|
|
@ -541,7 +541,7 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
|
|||
|
||||
```c
|
||||
// config.h
|
||||
#define RGBLED_NUM 8
|
||||
#define RGBLIGHT_LED_COUNT 8
|
||||
#define RGBLIGHT_LED_MAP { 7, 6, 5, 4, 3, 2, 1, 0 }
|
||||
|
||||
// some source
|
||||
|
|
|
|||
|
|
@ -169,11 +169,11 @@ The `post_rules.mk` file can interpret `features` of a keyboard-level before `co
|
|||
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=30
|
||||
OPT_DEFS += -DRGBLIGHT_LED_COUNT=30
|
||||
endif
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=6
|
||||
OPT_DEFS += -DRGBLIGHT_LED_COUNT=6
|
||||
endif
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
#include "color.h"
|
||||
|
||||
#if defined(RGBLED_NUM)
|
||||
# define APA102_LED_COUNT RGBLED_NUM
|
||||
#elif defined(RGB_MATRIX_LED_COUNT)
|
||||
#if defined(RGBLIGHT_APA102)
|
||||
# define APA102_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#elif defined(RGB_MATRIX_APA102)
|
||||
# define APA102_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@
|
|||
# define WS2812_TRST_US 280
|
||||
#endif
|
||||
|
||||
#if defined(RGBLED_NUM)
|
||||
# define WS2812_LED_COUNT RGBLED_NUM
|
||||
#elif defined(RGB_MATRIX_LED_COUNT)
|
||||
#if defined(RGBLIGHT_WS2812)
|
||||
# define WS2812_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#elif defined(RGB_MATRIX_WS2812)
|
||||
# define WS2812_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
#include "color.h"
|
||||
|
||||
static inline void rgblite_setrgb(RGB rgb) {
|
||||
rgb_led_t leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
|
||||
ws2812_setleds(leds, RGBLED_NUM);
|
||||
rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
|
||||
ws2812_setleds(leds, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
|
||||
static void rgblite_increase_hue(void) {
|
||||
|
|
|
|||
|
|
@ -24,35 +24,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define RGBLIGHT_SPLIT
|
||||
#ifdef RGBLED_BACK
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 48
|
||||
#define RGBLIGHT_LED_COUNT 48
|
||||
#define RGBLED_SPLIT { 24, 24 }
|
||||
#else
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_LED_COUNT 24
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_BOTH
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 60
|
||||
#define RGBLIGHT_LED_COUNT 60
|
||||
#define RGBLED_SPLIT { 30, 30 }
|
||||
#else
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_LED_COUNT 30
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
|
|
@ -60,10 +60,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
|
|
|
|||
|
|
@ -24,35 +24,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define RGBLIGHT_SPLIT
|
||||
#ifdef RGBLED_BACK
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 48
|
||||
#define RGBLIGHT_LED_COUNT 48
|
||||
#define RGBLED_SPLIT { 24, 24 }
|
||||
#else
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_LED_COUNT 24
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_BOTH
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 60
|
||||
#define RGBLIGHT_LED_COUNT 60
|
||||
#define RGBLED_SPLIT { 30, 30 }
|
||||
#else
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_LED_COUNT 30
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
|
|
@ -60,10 +60,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 170
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
|
@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 50
|
||||
#define RGBLIGHT_LED_COUNT 50
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// #define EE_HANDS
|
||||
|
||||
// Underglow
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 14 // Number of LEDs
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// #define EE_HANDS
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 7
|
||||
#if RGBLIGHT_LED_COUNT <= 7
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ void backlight_init_ports(void);
|
|||
void backlight_set_state(bool cfg[7]);
|
||||
void backlight_update_state(void);
|
||||
void backlight_toggle_rgb(bool enabled);
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLED_NUM][3]);
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLIGHT_LED_COUNT][3]);
|
||||
void backlight_set(uint8_t level);
|
||||
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ uint8_t backlight_state_led = 1<<STATE_LED_LAYER_0;
|
|||
|
||||
void backlight_toggle_rgb(bool enabled)
|
||||
{
|
||||
uint8_t rgb[RGBLED_NUM][3] = { 0 };
|
||||
uint8_t rgb[RGBLIGHT_LED_COUNT][3] = { 0 };
|
||||
|
||||
if(enabled) {
|
||||
for(uint8_t i = 0; i < RGBLED_NUM; ++i) {
|
||||
for(uint8_t i = 0; i < RGBLIGHT_LED_COUNT; ++i) {
|
||||
rgb[i][0] = backlight_rgb_r;
|
||||
rgb[i][1] = backlight_rgb_g;
|
||||
rgb[i][2] = backlight_rgb_b;
|
||||
|
|
@ -56,10 +56,10 @@ void backlight_toggle_rgb(bool enabled)
|
|||
backlight_set_rgb(rgb);
|
||||
}
|
||||
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLED_NUM][3])
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLIGHT_LED_COUNT][3])
|
||||
{
|
||||
cli();
|
||||
for(uint8_t i = 0; i < RGBLED_NUM; ++i) {
|
||||
for(uint8_t i = 0; i < RGBLIGHT_LED_COUNT; ++i) {
|
||||
send_color(cfg[i][0], cfg[i][1], cfg[i][2], Device_PCBRGB);
|
||||
}
|
||||
sei();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue