-
-
Notifications
You must be signed in to change notification settings - Fork 39.2k
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
Support inverted backlight and xd60 with PWM fix #2661
Conversation
Refactored to make pwm_fix a version of the existing xd60. |
This has some conflicts that need resolving. If you wanted to do that? |
I know you modded your hardware, but you might want to check my software only patch available in PR #3615 to remove the flickering when typing on keyboards with software PWM. |
Just wanted to touch base here. It looks like you have some merge conflicts that need to be resolved. And I think that @masterzen's solution may be the better option in the long run. |
Looks like merge conflicts have popped up. Also, there have been some changes to the backlight code, is this still needed? |
@drashna this isn't needed anymore with a standard xd60 thanks to #3615. What the OP proposed is a modified xd60 keyboard where they reroute the backlight to a hardware PWM pin on the MCU to have full hardware backlighting. I'm not sure there are a lot of xd60 users that have done this modification. The patch also contains a core modification that we already have (called |
Thanks! The backlight is one of the features I'm not as familiar with, so I wasn't sure. That said, I think I'll close this, for now. If needed, reopen this, or open a new PR with just the specific changes needed. |
Hi there! This PR fixes a couple issues with the xd60 v2.
The PCB has the backlight MOSFET connected to a pin that does not support hardware PWM. This means the backlight will frequently flicker when pressing keys. Documented here: https://www.reddit.com/r/MechanicalKeyboards/comments/6xsd5c/modification_discovered_the_org60_pcb_has_a/. The "xd60_fix_pwm" keyboard I've added has the column and and backlight pins swapped to fix this. This assumes you have cut the traces and made the correct connections, documented in the readme for this keyboard.
The MOSFET on the PCB is connected as a source rather than a sink. This means the PWM needs to be inverted to work as expected. This is addressed with a bool BACKLIGHT_INVERT set in config.h and with corresponding code in quantum.c to handle this. This change should work for any board with an "inverted" backlight though I don't have any other boards to test with. I believe this does not break "non-inverted" boards but I (again) don't have one to test with so would be very grateful if someone confirmed.
And I've added a couple keymaps for this "new" board - the default taken from the regular xd60 board, and one with my preferences.
Let me know if there is a better way to refactor this!