From 5841c755ae0b5629deb4c139eb535a82437112a2 Mon Sep 17 00:00:00 2001 From: Simon Arlott <70171+nomis@users.noreply.github.com> Date: Sat, 16 Apr 2022 23:02:32 +0100 Subject: rgblight: Add functions to stop blinking one or all but one layer (#16859) --- docs/feature_rgblight.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 08e820c0a6..11d4f89950 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -326,6 +326,19 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) { ``` would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed. +Blinking accumulates layers so if multiple layers are set blinking at the same time they will all blink for the duration and repeat times of the last layer to be blinked. +To stop these other layers from blinking use `rgblight_unblink_layer` or `rgblight_unblink_all_but_layer`: + +```c +rgblight_blink_layer(1, 500); +rgblight_unblink_all_but_layer(1); +``` + +```c +rgblight_unblink_layer(3); +rgblight_blink_layer(2, 500); +``` + !> Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard.md#data-sync-options) for more details. ### Overriding RGB Lighting on/off status -- cgit v1.2.3