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

Fix SPLIT_KEYBOARD compilation for ATMega*U2, which doesn't have VBUS/OTG control #10460

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

s-ol
Copy link
Contributor

@s-ol s-ol commented Sep 27, 2020

in split_util.c a code block #ifdef'd for AVR deals with specific USB features that only ATMega*U4 support, compilation on U2 fails like this:

quantum/split_common/split_util.c:77:5: error: implicit declaration of function 'USB_OTGPAD_On'; did you mean 'USB_REG_On'? [-Werror=implicit-function-declaration]
   77 |     USB_OTGPAD_On();  // enables VBUS pad
      |     ^~~~~~~~~~~~~
      |     USB_REG_On
quantum/split_common/split_util.c:80:12: error: implicit declaration of function 'USB_VBUS_GetStatus' [-Werror=implicit-function-declaration]
   80 |     return USB_VBUS_GetStatus();  // checks state of VBUS
      |            ^~~~~~~~~~~~~~~~~~

Description

This PR adjusts the ifdef to not attempt to use these facilities on ATmega16U2 and ATMega32U2 targets.

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

quantum/split_common/split_util.c Outdated Show resolved Hide resolved
@fauxpark fauxpark requested a review from a team September 27, 2020 09:02
@fauxpark
Copy link
Member

Since this is a bug, it can probably go into master.

@s-ol s-ol changed the base branch from develop to master September 27, 2020 19:16
@fauxpark fauxpark requested a review from a team September 28, 2020 01:40
@mtei mtei requested a review from a team September 28, 2020 09:21
@fauxpark
Copy link
Member

fauxpark commented Oct 1, 2020

Thanks!

@fauxpark fauxpark merged commit 01d2a03 into qmk:master Oct 1, 2020
rgoulter pushed a commit to rgoulter/qmk_firmware that referenced this pull request Oct 4, 2020
…/OTG control (qmk#10460)

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
kjganz pushed a commit to kjganz/qmk_firmware that referenced this pull request Oct 28, 2020
…/OTG control (qmk#10460)

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Nov 24, 2020
…/OTG control (qmk#10460)

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Jan 13, 2021
…/OTG control (qmk#10460)

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
…/OTG control (qmk#10460)

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
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.

3 participants