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

[Core] Bump mouse endpoint packet size to 16 bytes #21711

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

KarlK90
Copy link
Member

@KarlK90 KarlK90 commented Aug 8, 2023

Description

...to accommodate mouse reports with a size of 9 bytes, which happens
when the extended 16 bit movement range is activated by defining
MOUSE_EXTENDED_REPORT and MOUSE_SHARED_EP is NOT set.

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

  • Miss match in mouse endpoint packetsize when mouse_report_t has MOUSE_EXTENDED_REPORT set

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

@github-actions github-actions bot added the core label Aug 8, 2023
@KarlK90 KarlK90 requested review from a team and drashna August 8, 2023 09:16
@fauxpark fauxpark self-assigned this Aug 8, 2023
@KarlK90 KarlK90 force-pushed the feature/static-assertions-usb-reports branch from 7f0c1ca to 509f643 Compare August 8, 2023 18:01
@sigprof
Copy link
Contributor

sigprof commented Aug 8, 2023

Technically this report size check should not be needed, because HID reports are allowed to be larger than the endpoint packet size, and apparently the USB LLD should be able to split large transfers into multiple packets (one complication is when the report size happens to be an integer multiple of the packet size, but smaller than the maximum report size declared in the report descriptor — in that case the device would need to send a zero length packet after the report, and this would need to be done separately from sending the body of report).

...to accommodate mouse reports with a size of 9 bytes, which happens
when the extended 16 bit movement range is activated by defining
`MOUSE_EXTENDED_REPORT` and `MOUSE_SHARED_EP` is NOT set.
@KarlK90 KarlK90 force-pushed the feature/static-assertions-usb-reports branch from 509f643 to 08da6ac Compare August 9, 2023 08:11
@KarlK90 KarlK90 changed the title [Core] Add static asserts that HID reports fit endpoint sizes [Core] Cleanup of report_keyboard_t Aug 9, 2023
@KarlK90 KarlK90 marked this pull request as draft August 9, 2023 08:13
@KarlK90
Copy link
Member Author

KarlK90 commented Aug 9, 2023

@sigprof Thanks for the explanation, I wasn't aware of that.

I've reverted all of the changes except the mouse endpoint packet size bump, as there is IMHO some value in not having to send out two packets for the extended mouse reports.

@KarlK90 KarlK90 marked this pull request as ready for review August 9, 2023 08:20
@KarlK90 KarlK90 force-pushed the feature/static-assertions-usb-reports branch from 08da6ac to cc8926a Compare August 9, 2023 08:20
@github-actions github-actions bot removed the keyboard label Aug 9, 2023
@KarlK90 KarlK90 changed the title [Core] Cleanup of report_keyboard_t [Core] Bump mouse endpoint packet size to 16 bytes Aug 9, 2023
@tzarc tzarc merged commit fb18ac2 into qmk:develop Sep 25, 2023
4 checks passed
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Oct 25, 2023
christrotter pushed a commit to christrotter/qmk_firmware that referenced this pull request Nov 28, 2023
zgagnon pushed a commit to zgagnon/qmk_firmware_waterfowl that referenced this pull request Dec 15, 2023
future-figs pushed a commit to future-figs/qmk_firmware that referenced this pull request Dec 27, 2023
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.

5 participants