From 16546ee06fa71bd9b9e9d3fda7c8816675e12185 Mon Sep 17 00:00:00 2001 From: "Colin T.A. Gray" Date: Tue, 5 Dec 2017 11:56:15 -0700 Subject: 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 --- docs/feature_rgblight.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs/feature_rgblight.md') diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 9d8f537df..bd9cb352c 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}; const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; ``` +### LED control + +Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are: + +```c +rgblight_disable(); // turn all lights off +rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM) + +rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color +rgblight_sethsv(h, s, v); // HSV color control +rgblight_setrgb_at(r,g,b, LED); // control a single LED. 0 <= LED < RGBLED_NUM +rgblight_sethsv_at(h,s,v, LED); // control a single LED. 0 <= LED < RGBLED_NUM +``` + ## RGB Lighting Keycodes These control the RGB Lighting functionality. -- cgit v1.2.3-24-g4f1b