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

add DIP_SWITCH_MATRIX_GRID support #8772

Merged
merged 5 commits into from
Jul 4, 2020
Merged

Conversation

mtei
Copy link
Contributor

@mtei mtei commented Apr 12, 2020

Description

Some keyboards have unused intersections in the key matrix. If a DIP switch and a diode are connected at this intersection, the DIP switch can be read at the same time as the key matrix is read. The advantage of this method is that it does not use any additional GPIO pins on the MCU.

Especially with Pro Micro, the GPIO pin is a limited resource, so it is very helpful not to have to allocate a GPIO pin for the DIP switch.

It is used as follows.

// keyboards/KEYBOARD_NAME/config.h
//     "this is keyboards/helix/rev2/config.h sample"
#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} }

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

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

@mtei mtei requested review from drashna, zvecr and a team April 12, 2020 20:36
@drashna drashna requested a review from a team April 19, 2020 00:43
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

__attribute__ ((weak)) ✔️

@drashna drashna requested review from Duckle29, fauxpark, tzarc and a team May 18, 2020 11:14
Copy link
Member

@Erovia Erovia left a comment

Choose a reason for hiding this comment

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

__attribute__ ((weak))

@Erovia Erovia requested a review from a team June 22, 2020 21:27
@mtei mtei merged commit c2ca57c into qmk:master Jul 4, 2020
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Jul 6, 2020
* 'master' of https://github.com/qmk/qmk_firmware: (154 commits)
  Fix typo in freebsd_install.sh (qmk#9655)
  [Keymap] Add Alice rev2 to my userspace (qmk#9600)
  [Keyboard] RART67 : add support via (qmk#9589)
  [Keyboard] XD87 Caps Lock LED refactor (qmk#9585)
  [Keyboard] Updated VIA Support for DP60 (qmk#9508)
  fixed link to Eclipse instructions (qmk#9647)
  format code according to conventions [skip ci]
  add DIP_SWITCH_MATRIX_GRID support (qmk#8772)
  add SPLIT_HAND_MATRIX_GRID support (qmk#8685)
  [Keyboard] Gowla Macro Board (qmk#9643)
  Fix “G” in Neo2 keymap (qmk#9645)
  Rotr - Updated README and default keymap (qmk#9598)
  Add missing dependency for Void Linux to util/linux-install.sh (qmk#9637)
  Backlight docs wordsmithing (qmk#9631)
  Fix incorrect layout for GHS.rar (qmk#9597)
  Add movement hook to ps2_mouse (qmk#8805)
  Make sendstring respect `TAP_CODE_DELAY` (qmk#9623)
  [Keymap] Adding a Custom Keymap for Matrix Noah (qmk#9581)
  Fix sharing of mouse button state from mousekeys to ps2_mouse (qmk#9124)
  Add xjtian keymap for Planck (qmk#9502)
  ...
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
* dipsw test on helix/rev2/sc/back:five_rows

* add peek_matrix() to matrix_common.c

* add DIP_SWITCH_MATRIX_GRID support to quantum/dip_switch.c

* update docs/feature_dip_switch.md about DIP_SWITCH_MATRIX_GRID

* Test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"

This reverts commit 6d4304c74557597c9fb4d324f79c3ae4793ae874.
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Aug 9, 2020
* dipsw test on helix/rev2/sc/back:five_rows

* add peek_matrix() to matrix_common.c

* add DIP_SWITCH_MATRIX_GRID support to quantum/dip_switch.c

* update docs/feature_dip_switch.md about DIP_SWITCH_MATRIX_GRID

* Test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"

This reverts commit 6d4304c74557597c9fb4d324f79c3ae4793ae874.

format code according to conventions [skip ci]
@mtei mtei deleted the dip_switch_on_matrix branch September 7, 2020 05:31
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* dipsw test on helix/rev2/sc/back:five_rows

* add peek_matrix() to matrix_common.c

* add DIP_SWITCH_MATRIX_GRID support to quantum/dip_switch.c

* update docs/feature_dip_switch.md about DIP_SWITCH_MATRIX_GRID

* Test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows"

This reverts commit 6d4304c74557597c9fb4d324f79c3ae4793ae874.
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