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

Workaround SN32 USB code deficiencies for remote wakeup to work #28

Closed
wants to merge 1 commit into from

Conversation

stdvar
Copy link
Collaborator

@stdvar stdvar commented Apr 11, 2021

Description

prevent usb driver restart after remote wakeup has been triggered.

Chibios-contrib got remote wakeup updates in SN32 USB driver.
Current handling of wakeup event in qmk restarts USB driver (see pr: qmk#10088)
USB driver restart and enumeration is unnecessary in general however SN32 USB code doesn't handle driver restart properly.
Following need to be done to handle usb driver restart:

  • bus disconnect/connect handling
  • proper stop sequence
  • address reset and reenumeration
    While USB driver is restarted in qmk all EP configuration is destroyed (which will be initialized again after enumeration).
    To shortcut deficiencies of SN32 USB code and avoid unnecessary reenumeration at each wakeup this PR disables usb driver restart at remote wakeup.

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

added remote wakeup handling

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

@stdvar stdvar force-pushed the sn32_remote_wakeup branch from ca45f05 to bbcfa47 Compare April 19, 2021 04:36
@stdvar stdvar closed this May 1, 2021
@stdvar
Copy link
Collaborator Author

stdvar commented May 1, 2021

updated directly on sn32 branch

@stdvar stdvar deleted the sn32_remote_wakeup branch May 1, 2021 04:29
stdvar pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Oct 11, 2021
dexter93 pushed a commit that referenced this pull request Oct 12, 2021
HorrorTroll pushed a commit to HorrorTroll/qmk_firmware that referenced this pull request Nov 4, 2021
dexter93 pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Nov 21, 2021
dexter93 pushed a commit to dexter93/ChibiOS-Contrib that referenced this pull request Jan 4, 2022
dexter93 pushed a commit to SonixQMK/ChibiOS-Contrib that referenced this pull request Feb 12, 2022
HorrorTroll pushed a commit to HorrorTroll/qmk_firmware that referenced this pull request Nov 22, 2022
add `process_record_user` call into `process_record_kb`
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.

1 participant