From 4a59a56a80f59a85df9bc026684307eb65e3691d Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Sun, 12 May 2019 15:47:23 +0900 Subject: [PATCH] add example code about direct operation functions --- docs/feature_rgblight.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 3f3dad0e663..be4ddfa7295 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -216,6 +216,15 @@ rgblight_set(); // Utility functions do not call rgblight_set() automatically, s |`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | |`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | +Example: +```c +rgblight_sethsv(HSV_WHITE, 0); // led 0 +rgblight_sethsv(HSV_RED, 1); // led 1 +rgblight_sethsv(HSV_GREEN, 2); // led 2 +// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly. +// Note that it is inefficient to call repeatedly. +``` + #### effect mode change |Function |Description | |--------------------------------------------|-------------|