Skip to content

Commit 1750cc8

Browse files
committed
README: Add warning about writing data to HID products
In response to libusb#105
1 parent faaf22c commit 1750cc8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ which HIDAPI supports. Since it relies on a 3rd party library, building it
6868
is optional but recommended because it is so useful when debugging hardware.
6969

7070
## What Does the API Look Like?
71-
The API provides the the most commonly used HID functions including sending
72-
and receiving of input, output, and feature reports. The sample program,
71+
The API provides the most commonly used HID functions including sending
72+
and receiving of input, output, and feature reports. The sample program,
7373
which communicates with a heavily hacked up version of the Microchip USB
7474
Generic HID sample looks like this (with error checking removed for
7575
simplicity):
7676

77+
**Warning: Only run the code you understand, and only when it conforms to the
78+
device spec. Writing data at random to your HID devices can break them.**
79+
7780
```c
7881
#ifdef WIN32
7982
#include <windows.h>
@@ -139,6 +142,10 @@ int main(int argc, char* argv[])
139142
}
140143
```
141144
145+
You can also use [hidtest/hidtest.c](https://github.com/libusb/hidapi/blob/master/hidtest/hidtest.c)
146+
as a starting point for your applications.
147+
148+
142149
## License
143150
HIDAPI may be used by one of three licenses as outlined in [LICENSE.txt](LICENSE.txt).
144151

0 commit comments

Comments
 (0)