Skip to content

Commit 1f615ef

Browse files
diegoherranzsignal11
authored andcommitted
Documentation: path fixes
hid-libusb.c was renamed hid.c long ago but documentation wasn't updated.
1 parent 901512e commit 1f615ef

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ hidraw nodes associated with them. Keyboards, mice, and some other devices
2929
which are blacklisted from having hidraw nodes will not work. Fortunately,
3030
for nearly all the uses of hidraw, this is not a problem.
3131

32-
Linux/FreeBSD/libusb (libusb/hid-libusb.c):
32+
Linux/FreeBSD/libusb (libusb/hid.c):
3333
This back-end uses libusb-1.0 to communicate directly to a USB device. This
3434
back-end will of course not work with Bluetooth devices.
3535

linux/README.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
There are two implementations of HIDAPI for Linux. One (hid.c) uses the
3-
Linux hidraw driver, and the other (hid-libusb.c) uses libusb. Which one you
2+
There are two implementations of HIDAPI for Linux. One (linux/hid.c) uses the
3+
Linux hidraw driver, and the other (libusb/hid.c) uses libusb. Which one you
44
use depends on your application. Complete functionality of the hidraw
55
version depends on patches to the Linux kernel which are not currently in
66
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
99
version is that it will only work with USB devices, while the hidraw
1010
implementation will work with Bluetooth devices as well.
1111

12-
To use HIDAPI, simply drop either hid.c or hid-libusb.c into your
12+
To use HIDAPI, simply drop either linux/hid.c or libusb/hid.c into your
1313
application and build using the build parameters in the Makefile.
1414

15-
By default, on Linux, the Makefile in this directory is configured to use
16-
the libusb implementation. To switch to the hidraw implementation, simply
17-
change hid-libusb.c to hid.c in the Makefile.
18-
1915

2016
Libusb Implementation notes
2117
----------------------------

udev/99-hid.rules

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# to 0666 (world readable/writable) for a specified device on Linux systems.
33

44

5-
# If you are using the libusb implementation of hidapi (hid-libusb.c), then
5+
# If you are using the libusb implementation of hidapi (libusb/hid.c), then
66
# use something like the following line, substituting the VID and PID with
77
# those of your device. Note that for kernels before 2.6.24, you will need
88
# to substitute "usb" with "usb_device". It shouldn't hurt to use two lines
@@ -12,8 +12,9 @@
1212
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"
1313

1414

15-
# If you are using the hidraw implementation, then do something like the
16-
# following, substituting the VID and PID with your device. Busnum 1 is USB.
15+
# If you are using the hidraw implementation (linux/hid.c), then do something
16+
# like the following, substituting the VID and PID with your device. Busnum 1
17+
# is USB.
1718

1819
# HIDAPI/hidraw
1920
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"

0 commit comments

Comments
 (0)