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

i2c_init update to work with atmega32a boards #5562

Merged
merged 2 commits into from
Apr 7, 2019

Conversation

mechmerlin
Copy link
Contributor

@mechmerlin mechmerlin commented Apr 6, 2019

Description

Bootmapper Client (BMC) boards have to use custom i2c instead of the QMK i2c_master driver. I would like to get rid of that dependency and modify i2c_master to support atmega32a boards. The difference actually lies in the i2c_init routine.

In i2c_init, enable

  1. Pull up resistors
  2. Two Wire Interface
  3. TWI Interrupts
  4. Slave Address Ack

Tested working on

  1. Gray Studio HB85
  2. Panc60
  3. Donut Cables Budget96

I don't have any other non BMC boards that make use of i2c currently in my possession that I can think of, so I could use some help testing this =).

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

address ACK along with pull up resistors.
…ork for all boards. Putting the new code into an ifdef block
@drashna
Copy link
Member

drashna commented Apr 6, 2019

Tested the changes, this seems to fix the issues that I had.

Mostly, waiting on @jackhumbert to okay this.

@zvecr
Copy link
Member

zvecr commented Apr 6, 2019

Can confirm this works on a jj4x4 (also atmega32a with i2c for underglow rgb) that has been converted to use i2c_master. WIP branch available here.

@mtei mtei mentioned this pull request Apr 6, 2019
13 tasks
@zvecr zvecr mentioned this pull request Apr 6, 2019
13 tasks
@drashna drashna merged commit 4109844 into qmk:master Apr 7, 2019
@mechmerlin mechmerlin deleted the feature/i2c_bmc branch April 17, 2019 03:47
danielo515 pushed a commit to danielo515/qmk_firmware that referenced this pull request May 15, 2019
* On i2c_init, enable two wire interface, twi interrupt, and slave
address ACK along with pull up resistors.

* thanks to some testing by drashna, we know that setting TWI doesn't work for all boards. Putting the new code into an ifdef block
shimesaba-type0 pushed a commit to shimesaba-type0/qmk_firmware that referenced this pull request Jun 22, 2019
* On i2c_init, enable two wire interface, twi interrupt, and slave
address ACK along with pull up resistors.

* thanks to some testing by drashna, we know that setting TWI doesn't work for all boards. Putting the new code into an ifdef block
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
* On i2c_init, enable two wire interface, twi interrupt, and slave
address ACK along with pull up resistors.

* thanks to some testing by drashna, we know that setting TWI doesn't work for all boards. Putting the new code into an ifdef block
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.

None yet

4 participants