diff options
| author | Colin T.A. Gray <colinta@gmail.com> | 2017-12-05 11:56:15 -0700 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-12-08 16:10:42 -0500 |
| commit | 16546ee06fa71bd9b9e9d3fda7c8816675e12185 (patch) | |
| tree | 0fb62a810727a5c0745f94573715b6c027f577a3 /docs | |
| parent | 1620d78e73f8e01ed1d48255c655d9eb6cc1b135 (diff) | |
Add 'rgblight_disable' and 'rgblight_setrgb_at/rgblight_sethsv_at'
Refactors rgblight_toggle to use rgblight_enable or rgblight_disable
Use 'rgblight_setrgb_at/rgblight_sethsv_at' to control an individual LED
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/feature_rgblight.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 9d8f537dfb..bd9cb352c1 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md | |||
| @@ -80,6 +80,20 @@ const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; | |||
| 80 | const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; | 80 | const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; |
| 81 | ``` | 81 | ``` |
| 82 | 82 | ||
| 83 | ### LED control | ||
| 84 | |||
| 85 | Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are: | ||
| 86 | |||
| 87 | ```c | ||
| 88 | rgblight_disable(); // turn all lights off | ||
| 89 | rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM) | ||
| 90 | |||
| 91 | rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color | ||
| 92 | rgblight_sethsv(h, s, v); // HSV color control | ||
| 93 | rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM | ||
| 94 | rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM | ||
| 95 | ``` | ||
| 96 | |||
| 83 | ## RGB Lighting Keycodes | 97 | ## RGB Lighting Keycodes |
| 84 | 98 | ||
| 85 | These control the RGB Lighting functionality. | 99 | These control the RGB Lighting functionality. |
