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

Enforce definition of DIODE_DIRECTION for non-custom matrix boards #7915

Merged
merged 4 commits into from
Jan 19, 2020

Conversation

fauxpark
Copy link
Member

Description

When DIODE_DIRECTION is not defined, the default is COL2ROW (0). This is because the preprocessor directives in matrix.c check that DIODE_DIRECTION == COL2ROW without first verifying that it's even defined at all, and [undefined] == 0, apparently.

I anticipate some build failures here, from any boards that are "exploiting" this to avoid defining DIODE_DIRECTION. (eg. keebio/bfo9000). I'll try to fix them up in this PR.

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.
  • 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).

quantum/matrix.c Outdated Show resolved Hide resolved
@noroadsleft noroadsleft requested a review from a team January 16, 2020 18:08
@drashna drashna requested a review from a team January 18, 2020 04:04
@zvecr
Copy link
Member

zvecr commented Jan 18, 2020

@fauxpark can we set the onekey ones in <keyboards/handwired/onekey/config.h> instead of in each board.

@fauxpark fauxpark merged commit eb5d267 into qmk:master Jan 19, 2020
@fauxpark fauxpark deleted the diode-direction-enforce branch January 19, 2020 03:12
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 12, 2020
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 14, 2020
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Feb 21, 2020
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 26, 2020
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
…mk#7915)

* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards

* Define diode direction for failing boards

* Matching parentheses

* Put onekey diode directions in top level config
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