Skip to content

Conversation

@finger563
Copy link
Contributor

@finger563 finger563 commented Feb 21, 2025

Description

  • Break out xbox reports into their own file
  • Add new switch pro reports / descriptor which exactly match those coming from a switch pro controller

Motivation and Context

Allows better communications with / emulation of existing controllers such as xbox wireless controllers (1708) or switch pro controllers.

How has this been tested?

  • Build and run hid-rp/example on QtPy ESP32s3
  • Build and run hid_service/example on QtPy ESP32s3
  • Diff-ed the bytes generated by the switch pro descriptor with those from an actual switch pro controller and found no differences.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2025-02-20 at 21 35 52@2x

Switch Pro Report Descriptor Bytes:

0x05, 0x01, 0x15, 0x00, 0x09, 0x04, 0xA1, 0x01, 0x85, 0x30, 0x05, 0x01, 0x05, 0x09, 0x19, 0x01, 0x29, 0x0A, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x0A, 0x55, 0x00, 0x65, 0x00, 0x81, 0x02, 0x05, 0x09, 0x19, 0x0B, 0x29, 0x0E, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x04, 0x81, 0x02, 0x75, 0x01, 0x95, 0x02, 0x81, 0x03, 0x0B, 0x01, 0x00, 0x01, 0x00, 0xA1, 0x00, 0x0B, 0x30, 0x00, 0x01, 0x00, 0x0B, 0x31, 0x00, 0x01, 0x00, 0x0B, 0x32, 0x00, 0x01, 0x00, 0x0B, 0x35, 0x00, 0x01, 0x00, 0x15, 0x00, 0x27, 0xFF, 0xFF, 0x00, 0x00, 0x75, 0x10, 0x95, 0x04, 0x81, 0x02, 0xC0, 0x0B, 0x39, 0x00, 0x01, 0x00, 0x15, 0x00, 0x25, 0x07, 0x35, 0x00, 0x46, 0x3B, 0x01, 0x65, 0x14, 0x75, 0x04, 0x95, 0x01, 0x81, 0x02, 0x05, 0x09, 0x19, 0x0F, 0x29, 0x12, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x04, 0x81, 0x02, 0x75, 0x08, 0x95, 0x34, 0x81, 0x03, 0x06, 0x00, 0xFF, 0x85, 0x21, 0x09, 0x01, 0x75, 0x08, 0x95, 0x3F, 0x81, 0x03, 0x85, 0x81, 0x09, 0x02, 0x75, 0x08, 0x95, 0x3F, 0x81, 0x03, 0x85, 0x01, 0x09, 0x03, 0x75, 0x08, 0x95, 0x3F, 0x91, 0x83, 0x85, 0x10, 0x09, 0x04, 0x75, 0x08, 0x95, 0x3F, 0x91, 0x83, 0x85, 0x80, 0x09, 0x05, 0x75, 0x08, 0x95, 0x3F, 0x91, 0x83, 0x85, 0x82, 0x09, 0x06, 0x75, 0x08, 0x95, 0x3F, 0x91, 0x83, 0xC0

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Break out xbox reports into their own file
* Add new switch pro reports / descriptor which exactly match those coming from a switch pro controller

Allows better communications with / emulation of existing controllers such as xbox wireless controllers (1708) or switch pro controllers.

* Build and run `hid-rp/example` on QtPy ESP32s3
* Build and run `hid_service/example` on QtPy ESP32s3
@github-actions
Copy link

github-actions bot commented Feb 21, 2025

✅Static analysis result - no issues found! ✅

@finger563 finger563 self-assigned this Feb 21, 2025
@finger563 finger563 added enhancement New feature or request hid hid-rp labels Feb 21, 2025
@finger563 finger563 merged commit 0af7980 into main Feb 21, 2025
72 of 73 checks passed
@finger563 finger563 deleted the feat/hid-switch branch February 21, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hid hid-rp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants