-
Notifications
You must be signed in to change notification settings - Fork 43
hid-service: use HID descriptor registers #666
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
base: main
Are you sure you want to change the base?
hid-service: use HID descriptor registers #666
Conversation
…ded-services into personal/razbenhemo/hid_device_handle_cmds
There was a problem hiding this 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 updates the HID-over-I2C device handling to use register addresses provided by the HID descriptor instead of relying on static/default values, improving device compatibility and correctness.
Key changes:
- Input reports are now read using
write_read()with the descriptor'sw_input_register - Command and data register addresses are sourced from the HID descriptor with fallback to configured defaults
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
Update
hid-serviceI2C device handling to use register addresses provided by the HID descriptor, including input report reads and command/data register selection.Why
Ensure HID-over-I2C transactions use the correct device-specific register map (from the HID descriptor) instead of relying on static/default register values, improving compatibility and correctness across devices.
How
hid-service/src/i2c/device.rsto:write_read()usingw_input_registerw_command_register/w_data_registerfrom the HID descriptor when encoding commands, with fallback to configured defaults on descriptor read failure