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

Port DIRECT_PINS from split_common/matrix.c to matrix.c #5091

Merged
merged 8 commits into from
Apr 11, 2019

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Feb 10, 2019

Description

Discussion within #5026

split_common already contains a method of mapping pins when diodes are not used, DIRECT_PINS. This is currently missing from the non split matrix.c.

This PR aligns some of the functionality of matrix.c and split_common/matrix.c as well as reorders some of the functions to aid diff-ability. Finally i have added docs for the DIRECT_PINS option.

As a review hint, it might help to go via the commit history, as the moving of functions was done after the main functionality was added.

Types of changes

  • Core
  • Bugfix
  • New Feature
  • Enhancement/Optimization
  • Keyboard (addition or update)
  • Keymap/Layout/Userspace (addition or update)
  • Documentation

Issues Fixed or Closed by this PR

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document. (https://docs.qmk.fm/#/contributing)
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

…matrix.c - fix logic from inherited from split_common
@pelrun
Copy link
Contributor

pelrun commented Feb 10, 2019

To define a matrix where each pin is tied to ground, instead of using diodes, use DIRECT_PINS.

Diodes aren't the defining feature of the wiring system, so it's not really correct to mention them here. Something more like the following would be better:

"To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use DIRECT_PINS."

@pelrun
Copy link
Contributor

pelrun commented Feb 10, 2019

Other than getting the documentation right, this looks good (although I'm obviously going to say that, having written the original code.)

Thanks for doing this!

@drashna
Copy link
Member

drashna commented Feb 15, 2019

There are some merge conflicts here.

@zvecr
Copy link
Member Author

zvecr commented Feb 17, 2019

@drashna thanks for the heads up, I have fixed the merge issue.

@pelrun pelrun mentioned this pull request Feb 18, 2019
13 tasks
@zvecr zvecr mentioned this pull request Feb 27, 2019
13 tasks
@zvecr
Copy link
Member Author

zvecr commented Feb 28, 2019

Looks like another use case with #5266.

@zvecr
Copy link
Member Author

zvecr commented Mar 25, 2019

Staryu also requires this change as it defines the matrix as #define MATRIX_ROW_PINS { }

Copy link
Contributor

@mechmerlin mechmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving you some love.

@mechmerlin mechmerlin merged commit 0137b02 into qmk:master Apr 11, 2019
@kaylanm kaylanm mentioned this pull request Apr 11, 2019
13 tasks
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Apr 12, 2019
* Port DIRECT_PINS from split_common/matrix.c to matrix.c

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Refactor nano to use DIRECT_PINS

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Add DIRECT_PINS documentation

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c - fix logic from inherited from split_common

* Add DIRECT_PINS documentation - review comments
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Apr 14, 2019
* 'master' of https://github.com/qmk/qmk_firmware: (101 commits)
  Change table names
  Cleanup code
  Make send_char multilined for readaability
  Clean up some of the code
  Add AltGr/RALT support to Send String
  Add vendor and product arguments to atmega32a_program.py - fix hex print
  Add vendor and product arguments to atmega32a_program.py
  Max out range for max compatibility
  Fix ATSAM's USB HID descriptor to support higher heycodes
  Fix build detection of keymap and board changes
  Apply MAKEFLAGS to speed up CI
  Flesh out keymaps and some tweaks to indicators (qmk#5608)
  add in the missing #defines
  Update ps2avrgb readme template (qmk#5584)
  Use DIRECT_PINS for BDN9 (qmk#5603)
  Port DIRECT_PINS from split_common/matrix.c to matrix.c (qmk#5091)
  Keyboard: Add yosino58 Keyboard (qmk#5465)
  fix offset in matrix (qmk#5600)
  Remove caveat about combos with shared keys (qmk#5601)
  Revert "Update build instructions and docker file to download submodules" (qmk#5533)
  ...
fdidron added a commit to zsa/qmk_firmware that referenced this pull request Apr 16, 2019
Port DIRECT_PINS from split_common/matrix.c to matrix.c (qmk#5091)
shimesaba-type0 pushed a commit to shimesaba-type0/qmk_firmware that referenced this pull request Jun 22, 2019
* Port DIRECT_PINS from split_common/matrix.c to matrix.c

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Refactor nano to use DIRECT_PINS

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Add DIRECT_PINS documentation

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c - fix logic from inherited from split_common

* Add DIRECT_PINS documentation - review comments
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
* Port DIRECT_PINS from split_common/matrix.c to matrix.c

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Refactor nano to use DIRECT_PINS

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c

* Add DIRECT_PINS documentation

* Reorder matrix.c to remove foward declaration and match split_common/matrix.c - fix logic from inherited from split_common

* Add DIRECT_PINS documentation - review comments
@zvecr zvecr deleted the feature/matrix_DIRECT_PINS branch April 28, 2020 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants