-
-
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
Bring dactyl/matrix.c in line with quantum/matrix.c #2613
Merged
jackhumbert
merged 13 commits into
qmk:master
from
ErinCall:custom-matrix-like-quantum-matrix
Apr 27, 2018
Merged
Bring dactyl/matrix.c in line with quantum/matrix.c #2613
jackhumbert
merged 13 commits into
qmk:master
from
ErinCall:custom-matrix-like-quantum-matrix
Apr 27, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With a column-driven keyboard, reading from the mcp23081 returns a column-state, which takes some extra work to translate into the row-state used in the actual matrix. The ergodox_ez code sidestepped that problem by calling rows "columns" and columns "rows." With this change, the dactyl now calls rows "rows" and columns "columns."
Bonus: saves one i2c transaction per matrix_scan!
This entirely doesn't matter. The PORT values are set during init_keyboard and never change. They're repeatedly set to the same thing. These PORT lines shouldn't even exist, but since they do, they should at least look right.
I honestly don't know whether/how well this code works with other I/O expanders, but at least in theory, it should be generic enough to work with others. Given that, the variable names shouldn't refer to a specific model of expander.
It's commented out in quantum/matrix.c, and the dactyl has no power up/down behavior beyond being unplugged (which goes to matrix_init), so there's no sense keeping it around.
...and rename input_mask to expander_input_mask, since now that it isn't scoped to init_expander it isn't clear that it's only for the expander.
Nice! Also, if the matrix is the same as the Ergodox, you should check out the recently added "pretty" layouts for the Ergodox. |
Was this ready to be merged? |
Yeah, I think it's good to go. |
Awesome - thanks! |
carlpehrson
pushed a commit
to carlpehrson/qmk_firmware
that referenced
this pull request
May 7, 2018
* Use the new debounce algorithm in dactyl/matrix.c [qmk#2065] This incorporates the fixed/optimized debounce code added to quantum/matrix.c in: * 508eddf * 4c69608 * 32f88c0 * f403028 * a06115d * Fix the row/column swap in dactyl [qmk#2065] With a column-driven keyboard, reading from the mcp23081 returns a column-state, which takes some extra work to translate into the row-state used in the actual matrix. The ergodox_ez code sidestepped that problem by calling rows "columns" and columns "rows." With this change, the dactyl now calls rows "rows" and columns "columns." * Cleanup: variable names, documentation [qmk#2065] * Support MATRIX_MASKED in dactyl/matrix.c [qmk#2065] * Only unselect one col in unselect_col [qmk#2065] Bonus: saves one i2c transaction per matrix_scan! * Implement COL2ROW in dactyl/matrix.c [qmk#2065] * Fix a typo in dactyl/matrix.c This entirely doesn't matter. The PORT values are set during init_keyboard and never change. They're repeatedly set to the same thing. These PORT lines shouldn't even exist, but since they do, they should at least look right. * Implement COL_PINS/ROW_PINS for dactyl [qmk#2065] * Rename "mcp23018" to "expander" [qmk#2065] I honestly don't know whether/how well this code works with other I/O expanders, but at least in theory, it should be generic enough to work with others. Given that, the variable names shouldn't refer to a specific model of expander. * Remove matrix_power_up from dactyl/matrix.c [qmk#2065] It's commented out in quantum/matrix.c, and the dactyl has no power up/down behavior beyond being unplugged (which goes to matrix_init), so there's no sense keeping it around. * Only initialize expander_input_mask once [qmk#2065] ...and rename input_mask to expander_input_mask, since now that it isn't scoped to init_expander it isn't clear that it's only for the expander.
akatrevorjay
added a commit
to akatrevorjay/qmk_firmware
that referenced
this pull request
Oct 8, 2018
* 'master' of git://github.com/qmk/qmk_firmware: (105 commits) Add dz60 iso layout with vim-style arrows (qmk#2837) Fix Clicky Down code Addkeymap/tada fakb (qmk#2830) Add knops mini info json and implemented latest QMK standards (qmk#2832) Add RGB keymap to UT47 (qmk#2826) QMK Configurator updates to Tada68 (qmk#2825) Add keymap diagram (qmk#2819) QMK Configurator updates for Mechmini v2 (qmk#2820) QMK Configurator Support (qmk#2821) QMK Configurator Support for HHKB and Staryu (qmk#2823) Fix UT47 matrix (qmk#2824) Updated tri-layer block in keymap file. (qmk#2827) Add missing 7U and 4U layouts to 2x1800 (qmk#2829) New Numpad Support: naKey from ckeys.org (qmk#2828) Bring dactyl/matrix.c in line with quantum/matrix.c (qmk#2613) FC660C Configurator Support (qmk#2817) avocado toast change (qmk#2816) QMK Configurator Support MF68 (qmk#2815) More QMK Configurator Support for Pearl (qmk#2814) Keymap Fixes for 7U layout, RGB and Audio support (qmk#2779) ...
hauleth
pushed a commit
to hauleth/qmk_firmware
that referenced
this pull request
Jan 24, 2019
* Use the new debounce algorithm in dactyl/matrix.c [qmk#2065] This incorporates the fixed/optimized debounce code added to quantum/matrix.c in: * 508eddf * 4c69608 * 32f88c0 * f403028 * a06115d * Fix the row/column swap in dactyl [qmk#2065] With a column-driven keyboard, reading from the mcp23081 returns a column-state, which takes some extra work to translate into the row-state used in the actual matrix. The ergodox_ez code sidestepped that problem by calling rows "columns" and columns "rows." With this change, the dactyl now calls rows "rows" and columns "columns." * Cleanup: variable names, documentation [qmk#2065] * Support MATRIX_MASKED in dactyl/matrix.c [qmk#2065] * Only unselect one col in unselect_col [qmk#2065] Bonus: saves one i2c transaction per matrix_scan! * Implement COL2ROW in dactyl/matrix.c [qmk#2065] * Fix a typo in dactyl/matrix.c This entirely doesn't matter. The PORT values are set during init_keyboard and never change. They're repeatedly set to the same thing. These PORT lines shouldn't even exist, but since they do, they should at least look right. * Implement COL_PINS/ROW_PINS for dactyl [qmk#2065] * Rename "mcp23018" to "expander" [qmk#2065] I honestly don't know whether/how well this code works with other I/O expanders, but at least in theory, it should be generic enough to work with others. Given that, the variable names shouldn't refer to a specific model of expander. * Remove matrix_power_up from dactyl/matrix.c [qmk#2065] It's commented out in quantum/matrix.c, and the dactyl has no power up/down behavior beyond being unplugged (which goes to matrix_init), so there's no sense keeping it around. * Only initialize expander_input_mask once [qmk#2065] ...and rename input_mask to expander_input_mask, since now that it isn't scoped to init_expander it isn't clear that it's only for the expander.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is the first big step toward #2065. It updates
keyboards/handwired/dactyl/matrix.c
to look likequantum/matrix.c
:MATRIX_MASKED
DIODE_DIRECTION
COL_PINS
/ROW_PINS
arrays. It's currently broken intoONBOARD_ROW_PINS
/ONBOARD_COL_PINS
andEXPANDER_ROW_PINS
/EXPANDER_COL_PINS
. I don't love that design, but it works and I haven't figured out a better one.The next step will be to port these changes back into
quantum/matrix.c
.cc @drashna