mirror of
https://github.com/CTCaer/hidapi.git
synced 2024-11-26 19:50:32 +00:00
Documentation: path fixes
hid-libusb.c was renamed hid.c long ago but documentation wasn't updated.
This commit is contained in:
parent
901512e88b
commit
1f615efdbe
@ -29,7 +29,7 @@ hidraw nodes associated with them. Keyboards, mice, and some other devices
|
||||
which are blacklisted from having hidraw nodes will not work. Fortunately,
|
||||
for nearly all the uses of hidraw, this is not a problem.
|
||||
|
||||
Linux/FreeBSD/libusb (libusb/hid-libusb.c):
|
||||
Linux/FreeBSD/libusb (libusb/hid.c):
|
||||
This back-end uses libusb-1.0 to communicate directly to a USB device. This
|
||||
back-end will of course not work with Bluetooth devices.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
There are two implementations of HIDAPI for Linux. One (hid.c) uses the
|
||||
Linux hidraw driver, and the other (hid-libusb.c) uses libusb. Which one you
|
||||
There are two implementations of HIDAPI for Linux. One (linux/hid.c) uses the
|
||||
Linux hidraw driver, and the other (libusb/hid.c) uses libusb. Which one you
|
||||
use depends on your application. Complete functionality of the hidraw
|
||||
version depends on patches to the Linux kernel which are not currently in
|
||||
the mainline. These patches have to do with sending and receiving feature
|
||||
@ -9,13 +9,9 @@ device, bypassing any Linux HID driver. The disadvantage of the libusb
|
||||
version is that it will only work with USB devices, while the hidraw
|
||||
implementation will work with Bluetooth devices as well.
|
||||
|
||||
To use HIDAPI, simply drop either hid.c or hid-libusb.c into your
|
||||
To use HIDAPI, simply drop either linux/hid.c or libusb/hid.c into your
|
||||
application and build using the build parameters in the Makefile.
|
||||
|
||||
By default, on Linux, the Makefile in this directory is configured to use
|
||||
the libusb implementation. To switch to the hidraw implementation, simply
|
||||
change hid-libusb.c to hid.c in the Makefile.
|
||||
|
||||
|
||||
Libusb Implementation notes
|
||||
----------------------------
|
||||
|
@ -2,7 +2,7 @@
|
||||
# to 0666 (world readable/writable) for a specified device on Linux systems.
|
||||
|
||||
|
||||
# If you are using the libusb implementation of hidapi (hid-libusb.c), then
|
||||
# If you are using the libusb implementation of hidapi (libusb/hid.c), then
|
||||
# use something like the following line, substituting the VID and PID with
|
||||
# those of your device. Note that for kernels before 2.6.24, you will need
|
||||
# to substitute "usb" with "usb_device". It shouldn't hurt to use two lines
|
||||
@ -12,8 +12,9 @@
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"
|
||||
|
||||
|
||||
# If you are using the hidraw implementation, then do something like the
|
||||
# following, substituting the VID and PID with your device. Busnum 1 is USB.
|
||||
# If you are using the hidraw implementation (linux/hid.c), then do something
|
||||
# like the following, substituting the VID and PID with your device. Busnum 1
|
||||
# is USB.
|
||||
|
||||
# HIDAPI/hidraw
|
||||
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"
|
||||
|
Loading…
Reference in New Issue
Block a user