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

Remove i2c write command when reading columns on Ergodox EZ #8092

Merged
merged 2 commits into from
Feb 8, 2020

Conversation

esinlayo
Copy link
Contributor

@esinlayo esinlayo commented Feb 5, 2020

Description

Since the IO expander is sequential mode (IOCON.SEQOP = 0), the address pointer is set to GPIOB (columns to be read) register after the row selection write operation on GPIOA so this write-restart to set address to GPIOB is unnecessary.

I also looked into special byte mode (IOCON.SEQOP = 1, IOCON.BANK = 0) that should cause the address pointer to toggle between GPIOA and GPIOB, but it doesn't look like you should write without sending the register address from the MCP23018 datasheet Figure 1-1 so there were no other savings.

This improves scan rate from 590 to 790.

@seebs

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

@zvecr zvecr requested review from drashna and a team February 5, 2020 13:02
@zvecr zvecr added the keyboard label Feb 5, 2020
Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

Looks good to me.

And tested, works fine.

@seebs
Copy link
Contributor

seebs commented Feb 5, 2020

I agree that we'd want the comment, but also I think this is sort of brilliant and I'm impressed.

@drashna drashna merged commit 7182e9a into qmk:master Feb 8, 2020
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Feb 8, 2020
* 'master' of https://github.com/qmk/qmk_firmware: (24 commits)
  CI: Add workflow for CLI testing (qmk#7357)
  Add Prime_L V2 and Prime_EXL Plus (qmk#8111)
  [Keyboard] adding keyboard: neuron (qmk#7980)
  [Keyboard] adding keyboard: pain27 (qmk#7977)
  [Keyboard] adding keyboard: sl40 (qmk#7978)
  [Keyboard] adding keyboard: houndstooth (qmk#7981)
  [Keyboard] adding keyboard: kodachi50 (qmk#7976)
  [Keyboard] adding keyboard: gothic70 (qmk#7982)
  [Keyboard] adding keyboard: gothic50 (qmk#7983)
  [Keyboard] YMDK NP21: matrix and keymap refactor (qmk#8112)
  [Keymap] Added keymap for keebio/nyquist (qmk#8108)
  [Keyboard] Port SPLIT_USB_DETECT to lily58 (qmk#8107)
  [Keymap] Phoebe/Maxr1998 keymap: enable space cadet with curly braces (qmk#8096)
  [Keymap] add lily58 yshrsmz keymap (qmk#8095)
  [Keyboard] Remove i2c write command when reading columns on Ergodox EZ (qmk#8092)
  [Keyboard] Misc tidyups for Chidori (qmk#8091)
  [Keymap] Add users/alfrdmalr and switch to layouts (qmk#8030)
  XD84: Configurator bugfix for ISO layout (qmk#8117)
  ZJ68: complete Configurator layout support (qmk#8116)
  Add QMK Compile Context Sensitivity (qmk#6884)
  ...
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 15, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 15, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Feb 21, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
drashna added a commit to zsa/qmk_firmware that referenced this pull request Feb 25, 2020
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 25, 2020
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 26, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
fdidron pushed a commit to zsa/qmk_firmware that referenced this pull request Feb 26, 2020
c0psrul3 pushed a commit to c0psrul3/qmk_firmware that referenced this pull request Mar 23, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
qmk#8092)

* Remove i2c write command when reading cols on Ergodox EZ

* Comment on mcp23018 address state during read_cols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants