-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Feature: Full-Duplex Wired Split #2766
base: main
Are you sure you want to change the base?
Feature: Full-Duplex Wired Split #2766
Conversation
ffd742c
to
47b7001
Compare
45d95af
to
be7ded8
Compare
3fea122
to
6baa960
Compare
Related: #1110. |
64ce23f
to
acd57d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of notes on the first commit. Haven't dealt with the split ble code bits enough to be a trustworthy reviewer there, but those bits look fine at a glance.
Not looked at the second commit at all.
} | ||
} | ||
|
||
int zmk_split_central_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int zmk_split_central_invoke_behavior(uint8_t source, struct zmk_behavior_binding *binding, | |
int zmk_split_central_invoke_behavior(uint8_t target, struct zmk_behavior_binding *binding, |
Minor suggestion, but I just remembered thinking the other day that this name for this variable (and similar variables in functions around the transport) would be nicer. Feel free to ignore and hit resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the fence on this one... It requires just a tad bit more mental load to understand source/target are the same thing, just from different perspectives, but I can see where you are coming from. Leaving unresolved for now to sleep on it. Thanks.
b365a19
to
c10e8fe
Compare
Ok, taking this out of draft at this point, since it's gotten a fair amount of use and testing by myself and a few others. I just pushed some of the initial docs work as well, which needs review still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments on the docs.
fb46879
to
6b09605
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments. Still working my way through codey-bits slowly, but can't seem to write two reviews at the same time.
484ce4e
to
3e71bc8
Compare
Note for docs: https://zmk.dev/docs/faq#does-zmk-support-wired-split needs to be updated (in this PR or a future one) |
Tweaked that note, would appreciate feedback. Thanks! |
|
||
:::warning[Hot Plugging Cables] | ||
|
||
Many popular cables, in particular, TRRS/TRS cables, can cause irreparable damage to controllers if they are inserted or removed when power is already present on them. Whether or not you are using the wired split functionality or not, _never_ insert or remove such a cable when a controller is powered by USB _or_ battery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many popular cables, in particular, TRRS/TRS cables, can cause irreparable damage to controllers if they are inserted or removed when power is already present on them. Whether or not you are using the wired split functionality or not, _never_ insert or remove such a cable when a controller is powered by USB _or_ battery. | |
Many popular wired interconnects used between split keyboards, in particular, TRRS/TRS cables, can cause irreparable damage to controllers if they are inserted or removed when power is already present on them. Whether or not you are using the wired split functionality or not, _never_ insert or remove such a cable when a controller is powered by USB _or_ battery. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the fence using "interconnect" here since we use that term elsewhere to describe board/shield abstractions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, maybe something like "physical connectors" instead of "wired interconnects"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think this particular warning should be made more specific, not less, as this problem specifically affects TRS-style cables. Things like USB, RJ45, MIDI, etc are all exempt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think this particular warning should be made more specific, not less, as this problem specifically affects TRS-style cables. Things like USB, RJ45, MIDI, etc are all exempt.
Beyond my original wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally yes, but I was thinking about it a bunch yesterday and I couldn't find a phrasing I liked. Essentially making the warning sound more explicit towards the "bad" cable types, rather than warning against all. I think it's fine as-is though.
What I was also considering is a "unless explicitly stated otherwise by the designer" because I think you can create a circuit which doesn't have this sort of flaw. I worry that might overcomplicate the warning and invite lots of questions from inexperienced folks though, opening up a can of worms we dont want to tackle (yet)
339ad0d
to
76f97ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last note, otherwise docs LGTM.
f165bbd
to
c72ec43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last pair of minor queries from me. I think it's unlikely I'll notice any further things from looking at it more.
I will say I don't think this should be merged until we've had another release, which I consider #2729 to be a prerequisite for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving comments here as opposed to discord as it's easier to point to the issues. Tested and debugged the latest changes in polling mode with a rpi pico. Events and commands working with the changes I commented on here.
Extract central/peripheral code to allow for plugging in alternate transports, instead of tying all split logic to BT.
* Depends on full-duplex hardware UART for communication. * Supports all existing central commands/peripheral events, including sensors/inputs from peripherals. * Only one wired split peripheral supported (for now) * Relies on chosen `zmk,split-uart` referencing the UART device.
Migrate split to its own dedicated config file, and add details on wired split config. Co-authored-by: Nicolas Munnich <[email protected]>
Move the system work queue stack size override on RP2040 ouf of a `ZMK_BLE` conditional so it is properly applied generally for that SoC.
c00c7c6
to
4843ce1
Compare
Opening this as a draft for now, pending more extensive testing, documentation, etc.I've tested this with a very basic ZMK Uno setup, but nothing extensive dailying on a keyboard, etc.Preview docs: https://deploy-preview-2766--zmk.netlify.app/docs/config/split#wired-splits
Has gotten a fair amount of testing at this point, so moving this out of Draft.
PR check-list
Other To-Dos