forked from libusb/hidapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Usage Page and Usage on Linux with hidraw
Adapted from ApeironTuska's PR to PastaJ36/hidapi (PastaJ36/hidapi#1) Which was adapted from djpnewton's PR to signal11/hidapi (signal11/hidapi#6) Also addresses some of the issues mentioned in (signal11/hidapi#6) * hid_open_path and hid_enumerate both need to retrieve the usage page as the user may call hid_open_path directly without using hid_enumerate * Added get_hid_item_size() for hid parsing, used in both uses_numbered_reports() and get_hid_usage() NOTE: This commit does not handle composite HID descriptors I am interested in adding support for composite descriptors though I still need to find a device with a composite descriptor to test it correctly - hidtest-hidraw test - Device Found type: 308f 0015 path: /dev/hidraw10 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 0 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw11 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 1 Usage (page): 0x6 (0x1) Device Found type: 308f 0015 path: /dev/hidraw12 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 2 Usage (page): 0x1 (0xc) Device Found type: 308f 0015 path: /dev/hidraw13 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 3 Usage (page): 0x2 (0x1) Device Found type: 308f 0015 path: /dev/hidraw14 serial_number: 53373100323943353230353139363032 - sam4s2 Manufacturer: Kiibohd Product: Keyboard - None PartialMap USBxUART Release: 4ac Interface: 4 Usage (page): 0x1100 (0xff1c)
- Loading branch information
Showing
2 changed files
with
191 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters