Add External control for LEDs via HID Reports#257
Open
drstranges wants to merge 7 commits intoFreeJoy-Team:devfrom
Open
Add External control for LEDs via HID Reports#257drstranges wants to merge 7 commits intoFreeJoy-Team:devfrom
drstranges wants to merge 7 commits intoFreeJoy-Team:devfrom
Conversation
…rt external sources
This was referenced Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new "External" LED source to FreeJoy, enabling host software to control up to 24 LEDs directly via HID Output Reports. This feature is useful for applications where LED states need to be synchronized with game events or external logic rather than being tied to physical buttons or axes.
This feature is supported by FreeJoy Configurator (PR #45) and is fully documented in the Wiki (FreeJoyWiki PR #89).
Changes
SOURCE_EXTERNAL(-4) as a valid input source for LEDs.LEDs_LogicalProcessinleds.cto support the External source. When an LED is set to External, its state is determined by a bitmask received from the host.README.mdwith a new "Host-controlled LEDs" section, providing technical details on the HID report format and a Python usage example.Technical Details
The LED states are updated by sending a HID Output Report to the second HID device (Usage Page:
0xFF00, Interface:1).Report ID: 6
Payload: 4 bytes (little-endian bitmask)
Usage Example (Python)
Verification Results
Externalsource is correctly handled inleds.c.usb_desc.c.Related PRs: