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

LED drivers: update PWM register defines for g_<driver>_leds #23052

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

fauxpark
Copy link
Member

Description

These drivers have a mixture of naming conventions for the PWM register defines used for mapping LED channels. Some use an alphanumeric "matrix location" (A_1 etc), where others use CSx_SWy. The latter is almost correct but should be flipped (SWx_CSy) to better reflect the ordering.

This is an effort to clarify and "standardise" them, by using the pin names from the datasheet instead which should be less prone to naming collisions.

AW20216S: CS1_SW1-CS18_SW12 -> SW1_CS1-SW12_CS18
IS31FL3733: A_1-L_16 -> SW1_CS1-SW12_CS16
IS31FL3736: A_1-L_8 -> SW1_CS1-SW12_CS8
IS31FL3737: A_1-L_12 -> SW1_CS1-SW12_CS12
IS31FL3742A: CS1_SW1-CS30_SW6 -> SW1_CS1-SW6_CS30
IS31FL3743A: CS1_SW1-CS18_SW11 -> SW1_CS1-SW11_CS18
IS31FL3745: CS1_SW1-CS18_SW8 -> SW1_CS1-SW8_CS18
IS31FL3746A: CS1_SW1-CS18_SW4 -> SW1_CS1-SW4_CS18
SNLED27351: A_1-L_16 -> CB1_CA1-CB12_CA16

IS31FL3731 uses a charlieplex configuration; for now I have left it alone but may revisit it.
IS31FL3741 is waiting on #23049 which also touches these defines.

Defines for backwards compatibility have been added for the drivers currently used in the repo.

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).

@drashna drashna requested a review from a team February 12, 2024 00:33
@zvecr zvecr merged commit 3ba88f7 into qmk:develop Feb 12, 2024
3 checks passed
@fauxpark fauxpark deleted the led-drivers-sw-cs-defines branch February 12, 2024 02:37
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
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.

3 participants