microsoft / hidtools

Human Interface Device (HID) Tools for Windows and Devices
MIT License
146 stars 20 forks source link

Integration with hid-rdf #5

Closed benedekkupper closed 2 years ago

benedekkupper commented 2 years ago

Hi there! I have discovered this library through https://usb.org/sites/default/files/hutrr109-soc_1.pdf , I wonder where else I could have found this earlier 😅 I have a complementary library to this one: hid-rdf Its end goal is similar to that of Waratah, but it tries to achieve all of it using modern C++ (plus a hint of Python to generate usage pages code). Some nice things I have achieved with the hid-rdf library:

  1. it allows creating HID report descriptor building blocks (by using template parameters) that are reusable in different compositions
  2. it is a standalone C++ library that can serve for both host and device side HID report descriptor operations
  3. it supports compile-time verification and attribute detection (max report lengths, max report ID, number of TLCs) of HID report descriptors

I wonder if it could be used by Waratah in some way. Let me know what you think.

matwilli commented 2 years ago

Yes, the roll-out for this tooling has been relatively slow; particularly since Report-Descriptors are one of those things that is only done once in a project.

Thanks mate, hid-rdf looks really neat! As you say, it looks like hid-rdf tries to solve the same problem, but in a different way; so it's not obvious to me how/if these projects could leverage each other.

As an aside, it looks like you're generating the HUT by hand. Since HUT1.3, the PDF now includes the tables as a JSON attachment. Parsing/referencing this I reckon will be much more convenient. (An upcoming Waratah feature will parse this attachment directly from the PDF)