-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
add support for Orthodox keyboard #1436
Conversation
Based on initial OrthoDox (serial) config by @reddragond and others, this attempts to add TWI (I2C) support. Relevant: <qmk#1191> - per @ahtn recommendation, using memcpy for moving slave matrix into slave sending buffer - slave buffer has been enlarged using sizeof(matrix_row_t) - note: i2c.h now includes matrix.h - note: matrix.c includes <string.h>
- orthodox serial protocol now sends 9 bits per row, instead of 16. Technically it's using MATRIX_COLS, so it might work generically. - ROW_MASK is #defined in serial.c to truncate the checksums to prevent overflows causing false errors. This macro should be renamed if it's kept.
This reverts commit f62a5b9. Changes had been made to the lets_split serial driver for testing which mirrored the multi-byte-row changes made to support the orthodox. As the lets_split does not require these changes, and new improvements had been added to the orthodox port only, this commit reverts them. Because the new code could potentially reduce latency over the serial transport, it may be desirable to re-add in the future, by backporting the current working orthodox code.
- formatting has been improved - a few keys have been shifted, mainly in Raise and Lower layers, to be more like the default Planck layout - Now available: F12, Home, End, PgUp, PgDn, Media-Next, Media-Play Still To Do: - duplicate for TWI - Alt modifier - GUI modifier
- duplicated updated serial keymap for "i2c" - removed string.h/memcpy, instead - hardcoded copying of six bytes per update - still doesn't work; master reports interconnect errors on txled
- this is applied to both 'serial' and 'i2c' keymaps - Alt and GUI have been added, as they were missing - comma and period persist across more layers; Home/PgUp and End/PgDn have been moved slightly to accommodate
- disabled ssd1306 and hardware locking in build configuration - increased TWI buffer from 0x10 to 0x20 bytes - decreased TWI clock from 400000 to 100000 - removed hardcoded TWI multi-byte sending/receiving An 'i2c' build of this was found to work on a rev1 Orthodox, although slave-side col9 was understandably not working. When testing-time permits, features will be gradually re-enabled towards getting the full matrix supported over TWI.
The TWI interconnect ("i2c" in directories and build config) is now working for the Orthodox, including the slave half's column qmk#9. This is intended as an interim solution, as it's a kludge, not a fix. Rather than a working multi-byte implementation, the two col9 keys' bits are packed-into and unpacked-from the two unused bits in row1. Furthermore, the TWI clock constant has been reduced to 100000 from 400000, as testing revealed the higher value just didn't work. Testing also found that (with this kludge) increasing the TWI buffer was not necessary. This commit leaves many commented-out lines in matrix.c from previous testing, which will be removed in a future commit once the interconnects' multi-byte problems have been debugged more thoroughly.
The readme for the Orthodox now includes a description of the keyboard, allusions to its author and availability, a linked photo, and links to the evolving build guide and the current keymap on KLE. This update has been prepared with /u/Deductivemonkee's assistance.
Cool! Is it only using I2C, and not serial? (the guide suggests this, but I'm not sure) We're gonna be doing a bit of reorganisation with the readme files soon - you might consider making a page at qmk.fm for this, where things can be a bit more verbose, and have images/hardware files :) |
It can use either; both work. Both could use a bit of cleanup, code-wise, due to unexpected difficulties encountered in adding the ninth column, but i2c was worse (hence the workaround-like current solution for it). I'm hoping to clean it up once I have a better test setup. The readme image is hotlinked from imgur, and I'd noted the existence/purpose of qmk/qmk.fm. I'll be glad when something's there for this. As for verbosity, much of that is carried over from lets_split; once there's a better idea of what the sparse readme format is (and a little more time), it can certainly be pared down. I believe there's a rewrite in the works of the Flashing section, new content, but that wasn't ready tonight. |
Ah, gotcha. Yeah, we'll be moving the I2C and serial to the core here pretty soon, and we'll help get things organised with that :) Yeah, that's looking good! This is what we're hoping the readmes will look like in future, but we'll be happy to help change things over/clean things up down the road! Thanks! |
Thank you. I'd definitely like to follow that interconnects-to-core process, and see how that gets resolved. |
This branch adds support for the upcoming Orthodox keyboard from /u/Deductivemonkee, and has been successfully tested on the prototype boards.
Due to the nine-column layout, the interconnect protocols from the lets_split had to be adjusted. This will be an ongoing process; the current implementation is functional, but inelegant and inflexible.
Please excuse the ragged commit history on this branch – there were ill-advised merges from master into the feature branch, which were undone by cherry-picking into a clean branch.