Skip to content

Conversation

@finger563
Copy link
Contributor

Description

  • Update hid-rp component to have descriptors for PlayStation DualShock 4 controller
  • Update hid_service example to include DualShock 4 in the list of supported devices and allow configuring the example to report as a DualShock 4 controller over BLE.

Motivation and Context

This allows devices to emulate a PlayStation DualShock 4 controller over BLE, enabling compatibility with systems that support this controller type. It may also enable emulation over USB, but this has not been tested.

How has this been tested?

  • Build and run hid-rp/example on QtPy ESP32-S3.
  • Build and run hid_service/example on QtPy ESP32-S3 configured as a DualShock 4 and test to ensure inputs work when paired to iOS.

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

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.

Copilot AI review requested due to automatic review settings December 16, 2025 19:44
@github-actions
Copy link

✅Static analysis result - no issues found! ✅

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the PlayStation DualShock 4 controller to the hid-rp component, enabling devices to emulate a DualShock 4 controller over BLE. The implementation follows the same pattern as existing PlayStation DualSense and Xbox controller support.

Key Changes

  • Added comprehensive PS4 DualShock 4 HID report descriptors and input/output/feature report classes
  • Updated hid_service example to support DualShock 4 configuration via Kconfig
  • Enhanced documentation with PS4 controller details and configuration instructions

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
doc/en/hid/hid-rp.rst Added DualShock 4 to list of supported controllers and included PS4 API documentation reference
doc/Doxyfile Added hid-rp-ps4.hpp to Doxygen input files for API documentation generation
components/hid_service/example/main/hid_service_example.cpp Implemented PS4 controller emulation with proper VID/PID, feature reports, and input handling
components/hid_service/example/main/Kconfig.projbuild Added PS4 DualShock 4 configuration option to example menu
components/hid_service/example/README.md Documented all supported controllers and configuration instructions
components/hid-rp/include/hid-rp-ps4.hpp New header implementing PS4 DualShock 4 HID report structures and descriptors
components/hid-rp/include/hid-rp-ps4-formatters.hpp New header providing fmt::formatter implementations for PS4 reports
components/hid-rp/example/main/hid_rp_example.cpp Added PS4 report testing to the hid-rp example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@finger563 finger563 self-assigned this Dec 16, 2025
@finger563 finger563 merged commit 2ab1550 into main Dec 16, 2025
107 of 108 checks passed
@finger563 finger563 deleted the feat/ps4-hid-report branch December 16, 2025 21:15
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.

2 participants