Commit Graph

45 Commits

Author SHA1 Message Date
Ihor Dutchak 8f72236099 add hid_version/hid_version_str API (#192)
- API functions to get runtime version of the library;
- macros to get static/compile-time version of the library;
- VERSION file;
2020-10-14 18:41:08 +03:00
Tod E. Kurt ca1a2d6efa macOS support for multiple usage/usage-pages (#125)
* macOS support for multiple usage/usage-pages
Update of @fengji2006 PR#65, second try

* apply requested changes and test

* handle possible nullptr
2019-12-05 10:53:44 -08:00
Ludovic Rousseau c1b3078251 macOS: fix build of hidtest using autotools
Fix github issue #114
2019-11-05 14:00:44 +01:00
luz.paz f01c4ede50 Misc. typo fixes
Found via `codespell -q 3`
2019-07-14 13:54:55 +02:00
Thomas Petazzoni d98c408ed3 hidtest: don't use a C++ source file, since it's pure C
This allows to build the test program with toolchains that don't have
C++ support.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2019-06-25 15:09:11 +03:00
Benedikt Wildenhain 56e8c3939f hidtest: Remove "All Rights Reserved" from hidtest.cpp
The language may be confusing for this file, since the hidtest.cpp file
may be used by anyone for any reason.
2014-07-22 15:51:53 -04:00
Ludovic Rousseau f74e0c64e8 hidtest: Use hid_init()
Use hid_init() in hidtest/hidtest.cpp
2012-11-26 13:34:54 -05:00
Alan Ott 6d50f8fa0f Add Autotools build system (automake, autconf)
This adds the familiar autotools build system and associated documentation
for Linux, FreeBSD, Mac, MinGW, and Cygwin.  The old Makefiles have been
kept, and where appropriate have been renamed Makefile-manual.

Thanks to Peter Stuge, Ludovic Rousseau, Xiaofan Chen, Alex Dupre, and
Segher Boessenkool for providing testing, review, and suggestions, and to
Ludovic Rousseau for providing patches which contributed to this commit.
2012-07-16 00:43:04 -04:00
Alan Ott 6a8ed4797d Add hid_exit() to example program. 2011-09-13 02:39:08 +08:00
Alan Ott be33ec11a3 Call hid_close() at the end of testgui.cpp. 2011-09-13 02:19:46 +08:00
Alan Ott eebf197414 Change interface to interface_number in hid_device_info struct.
Forgot to add to previous commit.
2011-01-18 23:05:58 -05:00
Alan Ott a93cdfbeac Add the interface number to hid_device_info on Linux/libusb implementation.
The interface number is added to the hid_device_info struct. Since the
Linux/libusb implementation can't put the Usage and Usage Page in the
hid_device_info struct because it requires detaching the kernel driver, the
interface number is added instead so that users with composite HID devices
can differentiate between the interfaces on the device.
2011-01-18 22:52:06 -05:00
Alan Ott 0dd77c86be Add release_number to hidtest.
Added a printf() with the release number to the hidtest test program.
2011-01-18 21:33:53 -05:00
Alan Ott 09cb41aada Additional licenses. HIDAPI is now GPLv3, BSD, or the original license,
at the discretion of the user. This should provide maximum flexibility and
freedom.
2010-09-13 11:15:24 -04:00
Alan Ott f53f5fb0f8 Changed hid_get_feature_report() to return the number of bytes actually read on Windows. This involved changing the implementation to use DeviceIoControl() rather than HidD_GetFeature().
Changed it on Mac as well to return the same. The Linux implementation already did this.
2010-08-14 14:12:43 -04:00
Alan Ott 65331407a7 Made the hid_error() return wchar_t* so we can get translated error messages. 2010-08-10 14:58:59 -04:00
Alan Ott d2c01f9000 Updated .gitignore to include generated files on Unix. 2010-07-28 20:57:46 -04:00
Alan Ott 4b6cde335a Deleted generated files which are no longer needed. 2010-07-28 19:40:13 -04:00
Alan Ott 80ad44b7cf Moved Windows build files to windows/ 2010-07-28 19:38:45 -04:00
Alan Ott 3301d7a91e .gitignore to ignore generated files 2010-07-27 22:57:10 -04:00
Alan Ott a06a7dc3f3 Brought the hidapi project into this solution. 2010-07-27 22:51:53 -04:00
Alan Ott 2097e314fc Modified the windows build to not require the DDK to build the DLL.
Also moved the windows hid.cpp file to windows/ from hidapi/. hidapi/ now
only contains the library header file.
2010-07-27 22:28:42 -04:00
Alan Ott 30b7a910c5 New Windows Binaries. 2010-07-25 23:20:49 -04:00
Alan Ott f3380552ee Checking in latest built files for Windows. 2010-07-25 23:16:23 -04:00
Alan Ott 49e5aedc06 Converted the Windows implementation over to use the new interface. 2010-07-25 22:11:50 -04:00
Alan Ott 0e67d54581 Merge branch 'master' of github.com:signal11/hidapi 2010-07-25 20:56:27 -04:00
Alan Ott f4aec028de Moved the \n so that NULL wide strings wouldn't mess up the stream. 2010-07-25 20:56:14 -04:00
Alan Ott a0e06333c6 Updated for the new hidapi interface. 2010-07-25 20:52:05 -04:00
Alan Ott d9b62de1cb Updated test program to match sources. 2010-07-10 22:03:26 -04:00
Alan Ott 23c43b0e84 Added some checking. 2010-07-10 22:01:43 -04:00
Alan Ott 7222c93ef9 Cleaned up main test program.
Removed wprintf() in favor of printf("%ls").
	Added a sleep in the main read loop for demonstration.
	memset-zero the buffer.
2010-07-10 21:52:33 -04:00
Alan Ott 32f9cb6c3c Added support for Set/Get Feature reports for Windows. 2010-07-05 16:35:42 -04:00
Alan Ott 96aca32ec8 Implemented the Manufacturer and Product strings in the hid_device struct on Windows. 2010-07-01 17:56:46 -04:00
Alan Ott ebc18502b7 Added the hidapi_enumerate() interface on Linux.
Added manufacturer and product strings to the hid_device struct.
2010-07-01 17:39:24 -04:00
Alan Ott 0cc06e1f02 Added the hidapi_enumerate() interface to the Windows implementation. 2010-07-01 16:56:15 -04:00
Alan Ott a1769df365 Ported to Linux and added the hidapi_enumerate() interface. 2010-06-30 22:46:55 -04:00
Alan Ott 353308641d Whitespace update 2010-05-30 15:52:40 -04:00
Alan Ott 0a76c844ac Updated test program EXEs. 2010-05-30 15:46:46 -04:00
Alan Ott 35ec5feb49 Updates to the Visual Studio Project and Test program. 2010-05-30 15:45:56 -04:00
Alan Ott 03179fe661 Updated README files. 2010-05-30 15:23:01 -04:00
Alan Ott 14a9c3aa3e Added a README.txt to the Debug/ and Release/ folders, so that people will know what they need to do to run the program (without building it). 2010-05-30 15:18:39 -04:00
Alan Ott 21920c34fa Added support for Nonblocking I/O.
Documented the hidapi.h header.
Fixed hid_get_error() wchar_t bug.
Fixed invalid handle error in hid_open()
Updated example to show non-blocking operation.
2010-05-30 15:09:47 -04:00
Alan Ott 2fb125f4bf Cleanup of hidtest.cpp
Fixes for Release mode in hidtest-vc8.vcproj
2010-04-11 19:41:23 -04:00
Alan Ott 8c85933124 Added copying of the hidapi.dll to the post build script.
Added a system(pause) to the end of the test program.
2010-04-11 17:58:39 -04:00
Alan Ott 5773da50d9 Initial import of source files. 2010-04-11 16:29:01 -04:00