Commit Graph
53 Commits
Author SHA1 Message Date
Mauricio Alexander Flórez Patiño f7ff4ac9a3 Fix out-of-range LED writes on split keyboards in rgblight (#26481)
rgblight_led_index() subtracts the clipping start position and returns a
uint8_t, so on the half whose clipping range does not start at 0 the LEDs
of the other half wrap around to indices like 252..255. Those reached
rgblight_driver.set_color() unchecked and, with the RP2040 vendor WS2812
driver, overwrote RAM past the LED buffer (the emulated EEPROM cache).

Skip indices outside the clipping range in setrgb() and route the direct
set_color() calls through it.

Fixes #26480
2026-11-10 14:50:33 +11:00
Joel Challis efe3a8a43a Remove RGBLED_NUM and remaining references (#26474) 2026-09-20 20:43:38 +01:00
QMK Bot 99b5b9ab7f [CI] Regenerate Files (#25920)
Regenerate Files
2026-01-01 12:19:14 +00:00
QMK Bot 6ed61c65dd [CI] Format code according to conventions (#25827)
Format code according to conventions
2025-11-30 19:25:13 +00:00
Pablo Martínez 955809bd5a Add compiler_support.h (#25274) 2025-05-22 23:31:15 +10:00
Stefan Kerkmann 4f0a0f32f2 [Chore] use {rgblight,rgb_matrix}_hsv_to_rgb overrides (#25271) 2025-05-20 19:23:20 +01:00
Nick Brassel 2b00b846dc Non-volatile memory data repository pattern (#24356)
* First batch of eeconfig conversions.

* Offset and length for datablocks.

* `via`, `dynamic_keymap`.

* Fix filename.

* Commentary.

* wilba leds

* satisfaction75

* satisfaction75

* more keyboard whack-a-mole

* satisfaction75

* omnikeyish

* more whack-a-mole

* `generic_features.mk` to automatically pick up nvm repositories

* thievery

* deferred variable resolve

* whitespace

* convert api to structs/unions

* convert api to structs/unions

* convert api to structs/unions

* fixups

* code-side docs

* code size fix

* rollback

* nvm_xxxxx_erase

* Updated location of eeconfig magic numbers so non-EEPROM nvm drivers can use them too.

* Fixup build.

* Fixup compilation error with encoders.

* Build fixes.

* Add `via_ci` keymap to onekey to exercise VIA bindings (and thus dynamic keymap et.al.), fixup compilation errors based on preprocessor+sizeof.

* Build failure rectification.
2025-03-21 23:38:34 +11:00
QMK Bot 57f89e5388 [CI] Regenerate Files (#24770)
Regenerate Files
2025-01-01 13:02:16 +11:00
Ryan bb9625ba55 RGBLight: Improve RGB Test animation (#24477) 2024-10-24 15:27:24 +11:00
Ryan 6129af93f4 Rename RGB and HSV structs (#24471) 2024-10-12 00:10:02 +01:00
RyanandDasky 208ebf54a9 WS2812 API rework (#24364)
* Begin WS2812 API rework

* Move RGBW conversion, clean up color.h, fix RGBW for AVR bitbang

* Formatting & update PS2AVRGB I2C driver (untested)

* Tested ARM bitbang RGB+RGBW

* Tested ARM SPI RGB - RGBW not working

* Tested ARM PWM RGB+RGBW

* Tested RP2040 PIO driver RGB+RGBW

* Update RGBLight

* Formatting

* Fix BM60HSRGB rev2

* Fix oddforge/vea

* Fix 1k and XD002 RGBLite

* Fix model_m/mschwingen

* Fix handwired/promethium

* Rename `WS2812_LED_TOTAL` for BM60HSRGB

* Fix work_louder boards

* Fix dawn60

* Fix rgbkb/pan

* Fix neson_design/700e and n6

* Fix ergodox_ez/shine

* ergodox_ez/shine: invert indices for left half

* Fix matrix/abelx

* Fix matrix/m20add

* Remove custom rgblight driver for matrix/noah - should be done with lighting layers

* Fix LED indexes for RGBLight split

* Rename `convert_rgb_to_rgbw()` to `ws2812_rgb_to_rgbw()`

* Update WS2812 API docs

* `ergodox_ez/shine`: simplify LED index calculation

* LED/RGB Matrix: Add weak function for LED index resolution

* Bandaid fix for RGB Matrix splits not using WS2812

* `steelseries/prime_plus`: redo custom RGBLight driver

* Update keyboards/steelseries/prime_plus/rgblight_custom.c

Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>

---------

Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
2024-10-06 21:01:07 +13:00
Ryan 55538b2e1e APA102: API rework (#23355) 2024-06-13 22:19:45 +10:00
Ryan 0ff53b2498 Rename RGBW define to WS2812_RGBW (#23585) 2024-04-28 00:36:54 +10:00
Dasky d0ee4a1cb2 Fix rgblight init (#23335) 2024-03-24 11:20:05 +11:00
Ryan 583cde398a Un-extern RGBLight led[] array (#23322) 2024-03-22 06:04:13 +00:00
Ryan f7cf40fa77 Add init function to RGBLight driver struct (#23076) 2024-03-18 22:03:27 +11:00
QMK Bot b12b5485bc Update copyright year on generated files (#22795) 2024-01-01 02:25:20 +00:00
Joel Challis f165eb5cc9 Remove redundant rgblight eeconfig init (#22674) 2023-12-16 15:43:53 +00:00
Ryan e648155113 Rename RGBLED_NUM -> RGBLIGHT_LED_COUNT (#22570) 2023-12-12 15:30:08 +11:00
Ryan 17f36a21bf Rework RGBLight driver system (#22529) 2023-12-05 22:49:14 +11:00
2eed1f5bad Add RGBLIGHT_DEFAULT_ON macro configuration option (#20857)
* ADD RGB_DEFAULT_DISABLED option and updated documentation

* Formatting

* Add  as by fauxpark's suggestion

Co-authored by: fauxpark

* Formatting

* Use boolean values instead of numerical

Co-authored-by: Ryan <fauxpark@gmail.com>

* Edit documentation formatting

Co-authored-by: Ryan <fauxpark@gmail.com>

* Remove comment

Co-authored-by: Ryan <fauxpark@gmail.com>

* Set RGB mode to DEFAULT macro at init

Co-authored-by: Ryan <fauxpark@gmail.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: zvecr <git@zvecr.com>
2023-09-29 14:53:12 +01:00
Joel Challis 339bff6339 Move velocikey to within rgblight (#22123) 2023-09-25 17:48:10 +01:00
Ryan f8cea06be3 RGBLight/Backlight: add prefixed driver defines (#22089) 2023-09-21 15:50:01 +10:00
Ryan 41bd4e35a0 Clean up RGB LED type (#21859) 2023-09-04 01:19:59 +01:00
Nick Brassel 884be6c1ba Fix up operator precedence in RGBLIGHT (#21280) 2023-06-18 14:33:18 +10:00
Drashna JaelreandNick Brassel 5c4b53a143 [Bug] Realign and size check EECONFIG structures (#20541)
Co-authored-by: Nick Brassel <nick@tzarc.org>
2023-05-08 10:56:03 -07:00
Eli Lipsitz 7e54defa20 Fix rgblight layers when animations aren't enabled (#20097) 2023-03-26 00:12:30 +00:00
Joel Challis b01dc36fbf Tidy up duplication of MIN/MAX fallback implementations (#20236) 2023-03-23 05:30:30 +00:00
Joel Challis 6540b31d71 Add some helpers to tidy up XAP (#20235) 2023-03-23 00:37:13 +00:00
QMK Bot fc2c9ccbc5 Regenerate Files (#19463) 2023-01-01 02:20:11 +00:00
QMK Bot 8f506b5bc2 Merge remote-tracking branch 'origin/master' into develop 2022-12-23 11:12:33 +00:00
Joel Challis ab1898e660 Minor alignment of rgb_breathe_table generator (#19403) 2022-12-23 11:11:56 +00:00
QMK Bot 62b89f8184 Merge remote-tracking branch 'origin/master' into develop 2022-12-15 08:19:43 +00:00
Joshua Diamond 571a9794af Fix non-functional RGBLIGHT_EFFECT_TWINKLE on ARM (#19335) 2022-12-15 00:18:54 -08:00
Drashna Jaelre 50661ab65c Remove RGBLIGHT_ANIMATIONS from core (+cleanup) (#19216) 2022-12-01 13:06:45 -08:00
Joshua DiamondandSergey Vlasov f6baf916a9 Avoid repeated calls to rgblight_set() in tight succession when setting lighting layers (#18338)
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2022-11-10 20:27:40 +11:00
Ryan 7407347be1 Remove rgblight_list.h (#18878)
* Remove rgblight_list defines with no usage

* Remove rgblight_setrgb_*[_at] defines

* Remove rgblight_sethsv_* defines

* Remove rgblight_sethsv_noeeprom_* defines

* Delete rgblight_list.h and remove all references
2022-10-27 23:50:14 +01:00
izmishi 703d8cd417 Fix retain brightness when val is changed while a layer is active (#18426)
* Fix retain brightness when val is changed while a layer is active

* Fix retain brightness for RGBLIGHT_MODE_STATIC_GRADIENT

* Fix formatting
2022-09-28 13:16:24 -04:00
Stefan Kerkmann 2aa3a8e059 [Core] remove busy waiting from rgblight functions (#18418) 2022-09-19 18:05:31 +02:00
Joel Challis ef8db9f104 Remove ARM pgm_read_word workaround in rgblight (#16961) 2022-04-28 23:58:55 -07:00
QMK Bot bcb7e471d5 Merge remote-tracking branch 'origin/master' into develop 2022-04-21 16:34:10 +00:00
Simon Arlott 1e389c7904 rgblight: Fix rgblight_blink_layer when multiple layers are active (#16824) 2022-04-21 09:33:29 -07:00
Michał Szczepaniak 5b6faa173b Add customizable snake and knight animation increments (#16337) 2022-04-18 02:07:36 -07:00
Nick Brassel df95495d5b Fix #16859. (#16865) 2022-04-17 00:09:37 +01:00
Simon Arlott 5841c755ae rgblight: Add functions to stop blinking one or all but one layer (#16859) 2022-04-17 00:02:32 +02:00
Simon Arlott 1cfe49714f rgblight: Limit max repeat times in rgblight_blink_layer_repeat (#16860) 2022-04-16 10:40:48 -07:00
QMK Bot 63646e8906 Format code according to conventions (#16322) 2022-02-12 18:29:31 +00:00
Nick Brassel 4ec8764c70 Merge remote-tracking branch 'upstream/master' into develop 2021-07-25 12:17:15 +10:00
Nick Brassel 489c0f969d Disables rgblight twinkle by default. (#13677)
This takes up about 700 bytes of space, and needs to be swapped to
opt-in, rather than opt-out. Build failures in general on AVR due to the
scarcity of available flash. People can re-enable it by adding to their
keymap's config.h files:

```
  #define RGBLIGHT_EFFECT_TWINKLE
```
2021-07-24 13:40:00 +10:00
Patrick Stadler fb9a254a43 Retain brightness with lighting layers (#13025)
Add guard `RGBLIGHT_LAYERS_RETAIN_VAL` to retain the currently used val
when applying lighting layers.
2021-07-21 23:46:12 -07:00