From ea348897f16845f9e36bb4743e364b872e50efb6 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Sun, 12 May 2019 15:39:20 +0900 Subject: [PATCH] add example code about Utility Functions --- docs/feature_rgblight.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 1cc127818b2..3f3dad0e663 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -189,6 +189,14 @@ If you need to change your RGB lighting in code, for example in a macro to chang |`rgblight_set()` |Flash out led buffers to LEDs | |`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) | +Example: +```c +sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0 +sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1 +sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2 +rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly. +``` + ### Effects and Animations Functions #### effect range setting |Function |Description |