mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
add example code about Utility Functions
This commit is contained in:
parent
bf4b793cef
commit
ea348897f1
@ -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()` |Flash out led buffers to LEDs |
|
||||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) |
|
|`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
|
### Effects and Animations Functions
|
||||||
#### effect range setting
|
#### effect range setting
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|
Loading…
Reference in New Issue
Block a user