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

Include I2C constants to fix Unicorne build #15180

Closed
wants to merge 1 commit into from
Closed

Include I2C constants to fix Unicorne build #15180

wants to merge 1 commit into from

Conversation

bcat
Copy link
Contributor

@bcat bcat commented Nov 16, 2021

Description

The Unicorne keyboard that was recently merged (#12993) no longer builds at latest master due to some undefined I2C constants:

Compiling: keyboards/yanghu/unicorne/unicorne.c                                                    In file included from ./lib/chibios/os/hal/include/hal_pal.h:174,
                 from ./lib/chibios/os/hal/include/hal.h:139,
                 from tmk_core/common/chibios/platform_deps.h:18,
                 from quantum/quantum.h:18,
                 from keyboards/yanghu/unicorne/unicorne.h:19,
                 from keyboards/yanghu/unicorne/unicorne.c:16:
keyboards/yanghu/unicorne/unicorne.c: In function 'i2c_init':
keyboards/yanghu/unicorne/unicorne.c:26:23: error: 'I2C1_SCL_BANK' undeclared (first use in this function); did you mean 'I2C_CR1_ACK'?
         palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
                       ^~~~~~~~~~~~~

(And similar errors follow.) Looks like including i2c_master.h pulls in the relevant definitions. I've verified that qmk compile -kb yanghu/unicorne/f411 -km all builds successfully with this fix.

@yanghu, does this look good to you?

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

  • Unicorne keyboard fails to build at latest master.

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • 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).

@drashna
Copy link
Member

drashna commented Nov 16, 2021

Just a heads up, this is fixed in develop, already, which is due to merge in about 2 weeks.

@drashna drashna requested a review from a team November 16, 2021 19:14
@bcat
Copy link
Contributor Author

bcat commented Nov 16, 2021

Just a heads up, this is fixed in develop, already, which is due to merge in about 2 weeks.

Ah, I didn't realize that. Should I drop this PR then?

@drashna
Copy link
Member

drashna commented Nov 16, 2021

Nah, it may still be helpful to get it in sooner rather than later.

@bcat
Copy link
Contributor Author

bcat commented Nov 28, 2021

Looks like 2021Q4 breaking changes are merged now, so I'll go ahead and close this. :)

@bcat bcat closed this Nov 28, 2021
@bcat bcat deleted the unicorne branch November 28, 2021 20:22
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.

2 participants