Skip to content

Conversation

@razbhe10
Copy link
Contributor

@razbhe10 razbhe10 commented Jan 4, 2026

What

Update hid-service I2C 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

  • Files changed: 1; Insertions: 10; Deletions: 3
  • Key areas:
    • Services: Updated hid-service/src/i2c/device.rs to:
      • Read input reports via write_read() using w_input_register
      • Use w_command_register/w_data_register from the HID descriptor when encoding commands, with fallback to configured defaults on descriptor read failure

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 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's w_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.

Copilot AI review requested due to automatic review settings January 4, 2026 09:14
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

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.

@RobertZ2011 RobertZ2011 assigned razbhe10 and unassigned RobertZ2011 Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants