Skip to content
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

Add Support for In/Out Report SerDes #13

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Gentoli
Copy link
Contributor

@Gentoli Gentoli commented Dec 1, 2020

Changes:

  • Support Report IDs
  • BREAKING: remove custom serialization in favour of serde/derive
  • split user provided struct to In and Out:

For example with struct

#[gen_hid_descriptor(..)]
struct SomeReport {
  a: u8,
  b: u8,
  c: u8,
}

If there are only input items or only output items, the struct remain unchanged.
If there are both input and output items in the descriptor, the output is moved to a new struct named SomeReportOut and it shares the same access as the original struct.

  • add managed push_input and pull_output. These methods will be available if the respective input/output structs are available.

using the above descriptor as an example, push_input can only accept SomeReport as a parameter if the descriptor have input items.

  • ...?

TODO:

  • Add doc on struct generation behaviour.
  • Add test (examples?) for the procedural macros
  • ...?
  • ...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant