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

Bootloader restart via USB command #92

Closed
wants to merge 2 commits into from

Conversation

stdvar
Copy link
Collaborator

@stdvar stdvar commented Aug 28, 2021

Description

This change will piggyback on existing HID descriptor used by shared EP for extra key and shared keyboard/mouse.
New feature report section in the HID descriptor is added to allow PC to send HID feature report to KB and thus instruct it to restart in bootloader.
Added code to distinguish between input/output/feature reports.
set_report buffer that used to handle led status is increased from (1+1 size) to (1+8 size).
This should work for any keyboard since handler uses generic bootloader_jump() function.

There is new USB_FEATURE_ENABLE option that enables shared ep just like EXTRAKEY_ENABLE. So only one option is needed but new option added for consistency in case user opted out of using EXTRAKEY or other shared ep options.

Report to send to KB is struct.pack("<II", 0x5AA555AA, 0xCC3300FF).

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

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 changed the title SN32 bootloader restart via USB command Bootloader restart via USB command Aug 28, 2021
@stdvar stdvar force-pushed the sn32_bootloader_restart_via_hid_report branch from 5434272 to 8a7ca71 Compare August 29, 2021 02:36
@CalcProgrammer1 CalcProgrammer1 force-pushed the sn32 branch 2 times, most recently from f4d5809 to 7148084 Compare September 4, 2021 06:00
@CalcProgrammer1 CalcProgrammer1 force-pushed the sn32 branch 15 times, most recently from e386379 to 95168fa Compare October 3, 2021 23:30
@dexter93 dexter93 added this to the Sonix November 2021 Merge milestone Nov 18, 2021
@tzarc
Copy link

tzarc commented Nov 19, 2021

Just a heads-up, this functionality will prevent merge to QMK upstream.

@tzarc
Copy link

tzarc commented Nov 19, 2021

See qmk#11892 -- it allows for it to be reinstated due to downstream users relying on its functionality, but for new code this sort of addition is not going to be allowed.

@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale label Jun 21, 2023
@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]

@github-actions github-actions bot closed this Jul 22, 2023
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