New Feature: Allow external power on USB only #1184
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey guys,
this PR adds a feature that automatically disables external power when you disconnect the USB cable and automatically enables it again when you re-connect it.
There's already PR #1113 for the same feature, but it was not working properly for me.
The biggest issue is that it was implemented in
ext_power_generic.c
and when turning the board on without a USB cable plugged in, it was cutting the power very early on in the initialization chain and caused OLEDs to not work later on.In my PR it turns off the power much later and avoids these issues.
I have tested this PR on a sofle choc split keyboard with underglow and OLEDs and everything is working well.