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

New Feature: Allow external power on USB only #1184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

infused-kim
Copy link
Contributor

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.

@infused-kim infused-kim force-pushed the my-changes/ext-pwr-usb-only branch from 11255fb to 94847ea Compare April 3, 2022 08:51
@infused-kim infused-kim force-pushed the my-changes/ext-pwr-usb-only branch from 94847ea to 81b350c Compare April 29, 2022 08:15
@autoferrit
Copy link

Has this been updated at all? I am running the sofle choc and would love to see this working in mainline zmk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants