Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS2812 API rework #24364

Merged
merged 35 commits into from
Oct 6, 2024
Merged

WS2812 API rework #24364

merged 35 commits into from
Oct 6, 2024

Conversation

fauxpark
Copy link
Member

@fauxpark fauxpark commented Sep 5, 2024

Description

Some pretty huge changes to the WS2812 API in order to clean a few things up, in particular extrication of the WS2812-specific byte ordering from rgb_led_t.

The ws2812_setleds() API has been replaced with the more RGB Matrix-style init/set_color/set_color_all/flush system, with a new type ws2812_led_t and array of such in each driver to hold the pixel data. The init function has already been implemented, so not much to do there. set_color() and set_color_all() simply assign the RGB components to the given index(es) in the array. flush() mostly contains the existing setleds() functionality, but no longer takes the LED array and LED count as arguments.

Since this is a WIP, a bunch of things will now be broken:

  • The LED index adjustment for split boards in rgb_matrix_drivers.c has been removed for the moment, so split WS2812 likely no longer works
  • RGBLight (Underglow) has not been touched yet, this code won't compile as it relies on the old API

Testing progress (RGB Matrix):

Driver Channels Arch Board Status
Bitbang RGB AVR Pro Micro ✔️
Bitbang RGBW AVR Pro Micro ✔️
I2C RGB AVR JJ4x4 ✔️
Bitbang RGB ARM Proton-C ✔️
Bitbang RGBW ARM Proton-C ✔️
PIO RGB ARM RP2040 Pico ✔️
PIO RGBW ARM RP2040 Pico ✔️
PWM RGB ARM Proton-C ✔️
PWM RGBW ARM Proton-C ✔️
SPI RGB ARM Proton-C ✔️
SPI RGBW ARM Proton-C ✔️

Testing progress (RGBLight):

  • Animations ✔️
  • Index Remapping ✔️
  • Lighting Layers ✔️
  • Clipping Ranges ✔️
  • Split ✔️
  • Velocikey ✔️

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@fauxpark fauxpark requested a review from a team September 5, 2024 06:45
@fauxpark fauxpark marked this pull request as draft September 5, 2024 06:45
@fauxpark fauxpark mentioned this pull request Sep 5, 2024
14 tasks
@fauxpark
Copy link
Member Author

@daskygit Could you please test the Steelseries driver changes? And in future, avoid including quantum.h where it is not directly required.

@fauxpark fauxpark marked this pull request as ready for review September 21, 2024 22:02
@fauxpark fauxpark changed the title [WIP] WS2812 API rework WS2812 API rework Sep 21, 2024
@tzarc tzarc merged commit 208ebf5 into qmk:develop Oct 6, 2024
5 of 6 checks passed
@fauxpark fauxpark deleted the ws2812-api-rework branch October 9, 2024 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants