summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-12-12 15:30:08 +1100
committerGitHub <noreply@github.com>2023-12-12 15:30:08 +1100
commite64815511303584787b623c12ac8bab7dccb0034 (patch)
treed1096902ce4b467efb6e6e2886c8830ff27f3664 /docs
parent3c7e9a6827660885a5c0b7ba1135d3f23a3b4cea (diff)
Rename `RGBLED_NUM` -> `RGBLIGHT_LED_COUNT` (#22570)
Diffstat (limited to 'docs')
-rw-r--r--docs/config_options.md2
-rw-r--r--docs/feature_rgblight.md56
-rw-r--r--docs/hardware_keyboard_guidelines.md4
3 files changed, 31 insertions, 31 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index 8119b9e356..bc28f603fa 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -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
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 8a64454b0d..b7ba075731 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -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
diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md
index fb434e1576..684ccc73f6 100644
--- a/docs/hardware_keyboard_guidelines.md
+++ b/docs/hardware_keyboard_guidelines.md
@@ -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
```