-
- Downloads
"README.md" did not exist on "1a8326de8cfd76a0f825696f97b7925813e026b7"
Add a vendor report helper
A macro to generate a vendor-specific padding-only
report with Report ID 0xac of the given size in bytes.
HID-BPF requires that at least one report has
the same size as the original report from the device.
Without that events are silently discarded by the kernel.
The easy way to ensure that is to add this
macro so we have a report that's the expected size:
static __u8 fixed_rdesc = [
UsagePage_Generic_Desktop
Usage_GD_Keyboard
CollectionApplication(
... intended rdesc items go here ...
FixedSizeVendorReport(12)
)
];
Side-effect: if placed outside an Application Collection this will show
up as another device that doesn't send events so let's document this.
The Report Id 0xac was picked with the guess that very
few actual devices use this Report Id so it shouldn't clash. And even
where it does the Report Id can be changed during the event fixup.
Signed-off-by:
Peter Hutterer <peter.hutterer@who-t.net>
Loading