Luca Weiss
9b1a3e8947
builds/freebsd: Install pkgconf
2019-08-30 10:23:23 +02:00
Ihor Dutchak
4c33f69712
AUTHORS: add libusb/hidapi Team mention
2019-08-30 10:21:06 +02:00
Filip Kubicz
651150d8b5
README: add CI build badges
...
Show status of test builds on the project GitHub page.
Fixes #35 .
Signed-off-by: Filip Kubicz <filip@kubicz.engineer>
2019-07-25 08:13:11 +02:00
Andrew Eikum
5d9b4cd93c
Zero-initialize new hid_device_info structs
...
This fixes an uninitialized usage_page value leaking from the Linux
backend. It may fix other uninitialized values, too.
2019-07-25 08:08:12 +02:00
Andrew Eikum
93dca80762
Update more repository URLs
2019-07-25 07:57:59 +02:00
Ihor Dutchak
e4ad5ec64f
Update README: hidraw: minimum supported kernel
2019-07-23 23:50:56 +03:00
Luca Weiss
ecade8c6fd
testgui: fix incompatible pointer warning
...
mac_support_cocoa.m:67:49: warning: incompatible pointer types sending 'MyAppDelegate *' to parameter of type
'id<NSApplicationDelegate> _Nullable' [-Wincompatible-pointer-types]
[[NSApplication sharedApplication] setDelegate:d];
^
2019-07-23 22:31:03 +02:00
Luca Weiss
04a1789710
testgui: fix deprecation warning
...
mac_support_cocoa.m:80:49: warning: 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12 [-Wdeprecated-declarations]
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
^~~~~~~~~~~~~~
NSEventMaskAny
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:158:26: note:
'NSAnyEventMask' has been explicitly marked deprecated here
static const NSEventMask NSAnyEventMask NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSEventMaskAny", 10_0, 10_12) = NSUIntegerMax;
^
2019-07-23 22:31:03 +02:00
Luca Weiss
a1d49824ea
testgui: remove obsolete files
...
mac_support.cpp is unused since commit bab22b7 and start.sh is the
original authors custom start script that we don't want.
2019-07-23 22:14:10 +03:00
Luca Weiss
065d46ab27
Add Windows (msbuild & cygwin) CI ( #37 )
...
* Upgrade Windows projects to VS2015
* add MSVC x64 configuration
2019-07-17 20:14:38 +03:00
Niklas Hambüchen
7df3973404
hidapi.h: Update documentation hid_error()
2019-07-15 13:15:46 +03:00
Niklas Hambüchen
3bfe1001b6
hidraw: Implement hid_error()
2019-07-15 13:15:46 +03:00
Luca Weiss
b0ec6f0918
libusb: Return string in hid_error()
2019-07-15 13:15:46 +03:00
Luca Weiss
42dede9db5
mac: Return string in hid_error()
2019-07-15 13:15:46 +03:00
Niklas Hambüchen
1515eb2c16
windows: Allow hid_error(NULL)
2019-07-15 13:15:46 +03:00
Luca Weiss
6f79625abb
linux: Drop workaround for kernel < 2.6.34
...
Also drop HIDIOC* definitions as they are present since kernel 2.6.39.
2019-07-15 13:14:08 +03:00
luz.paz
f01c4ede50
Misc. typo fixes
...
Found via `codespell -q 3`
2019-07-14 13:54:55 +02:00
Luca Weiss
95adae423d
Fix compile warning on FreeBSD
...
hid.c:458:18: warning: passing 'const char **' to parameter of type 'char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]
res = iconv(ic, &inptr, &inbytes, &outptr, &outbytes);
^~~~~~
/usr/local/include/iconv.h:85:43: note: passing argument to parameter 'inbuf' here
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
^
1 warning generated.
2019-07-13 22:32:10 +03:00
Luca Weiss
5447bdebf3
Add ar-lib & compile to .gitignore
2019-07-09 16:39:23 +03:00
Tod E. Kurt
0ebecbd1f6
fix small casting issue
2019-07-02 23:10:41 -07:00
Luca Weiss
d1d330c1bf
Add Arch Linux CI
2019-06-26 16:03:19 +02:00
Luca Weiss
aaa8788e12
Add Alpine CI
2019-06-26 16:03:19 +02:00
Luca Weiss
c10925d48a
Add MinGW (using Fedora) CI
2019-06-26 16:03:19 +02:00
Luca Weiss
fb5349ae1d
Add macOS CI
2019-06-26 16:03:19 +02:00
Luca Weiss
2d664e3f53
Add FreeBSD CI
2019-06-26 16:03:19 +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
iakov
c022f55080
Remove excess incorrect space
...
Co-Authored-By: Filip Kubicz <Qbicz@users.noreply.github.com>
2019-06-24 22:55:27 +02:00
Iakov 'Jake' Kirilenko
e32d3f1266
Initialize local variable with smth meaningful
...
I prefer explicit INVALID rather than possible compiler warning about uninitialized var sometimes later
2019-06-24 22:55:27 +02:00
iakov
9d569ba8a9
Add missed NULL initialisation to local variable
...
Co-Authored-By: Ihor Dutchak <ihor.youw@gmail.com>
2019-06-24 22:55:27 +02:00
Iakov Kirilenko
0324a0b0e5
Codestyle conformance: add spaces after type-case
2019-06-24 22:55:27 +02:00
Iakov Kirilenko
7d08fd907d
More rigorous & even C++ compatible code for macOS
2019-06-24 22:55:27 +02:00
Iakov Kirilenko
73b9ccb996
Explicit cast from void* to corresponding type
...
Fix compilation without -fpermissive
2019-06-24 22:55:27 +02:00
Filip Kubicz
7da5cc91fc
configure.ac: release 0.9.0
...
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
hidapi-0.9.0
2019-06-19 12:34:38 +02:00
Filip Kubicz
d621d5fcaa
configure.ac: Release 0.9.0-rc1
...
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2019-06-19 09:12:36 +02:00
Kubicz, Filip
c4f86a7d85
windows: Fix undeclared variable name in register_error()
...
Signed-off-by: Kubicz, Filip <Filip.Kubicz@nordicsemi.no>
hidapi-0.9.0-rc1
2019-06-18 13:14:47 +02:00
miketsmith
35c5b2e404
Fix doc string for hid_enumerate
...
Wrong struct called out
2019-06-18 07:28:12 +02:00
Filip Kubicz
e5ce14aee2
README: added table of contents
...
The README is long. Added table of contents in order to save reader from
being overwhelmed.
Updated README where appropriate.
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2019-06-17 12:09:31 +02:00
Filip Kubicz
177daa52c8
README: Fix markdown description
...
No changes to meaning, just markdown fixes.
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
2019-06-17 12:09:31 +02:00
Luca Weiss
2f7a7c9948
Rename hid_device* parameters to dev
...
Previously, the header file used hid_device *device and the
implementations used hid_device *dev. Make this consistent.
2019-06-17 11:32:48 +02:00
Luca Weiss
921ad33351
doxygen: disable markdown support
...
The intendation used in hidapi makes most of the comments get
interpreted as codeblocks which breaks most functions of Doxygen.
2019-06-17 11:32:48 +02:00
Luca Weiss
c04d88bc96
doxygen: upgrade Doxyfile
2019-06-17 11:32:48 +02:00
Rijan de Nysschen
c13a2f238a
Update Makefile.am after README.md
...
The 'make' build on Linux/MacOS generates an error since README.txt was renamed to README.md. See #17 .
2019-06-14 08:51:15 +02:00
Filip Kubicz
d1ecb1442e
README: inform about moving to libusb/hidapi
...
Updated link to GitHub. Added info about original author and a new repository.
2019-06-13 10:27:32 +02:00
Luca Weiss
fdae95dcd7
README: convert to markdown
2019-06-12 16:34:30 -07:00
Tod E. Kurt
121567d64a
Merge pull request #2 from z3ntu/pr_380
...
mac: Set a valid interface number on hid_device_info for USB HID dev…
2019-06-09 11:54:01 -07:00
Ed Maste
c1585e982d
README.txt: update number of backends
...
FreeBSD support was added in commit 74440e2d as the fifth back-end, but
the list was still introduced as "HIDAPI has four back-ends."
2019-06-09 20:50:59 +02:00
Kubicz, Filip
76d4ffd853
Windows: enumerate simple devices
...
Right now, in hid_open it is checked if the connected devices have
"HIDClass" driver name. This is true for composite devices, but some
simple HID devices only have "Mouse" or "Keyboard" driver name.
One of devices that cannot be opened is Dell MS116t, but any mouse which
is not part of composite device can be affected.
With this change, one can enumerate and open these devices.
Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
2019-06-07 08:33:25 +02:00
Luca Weiss
baaec212a0
configure.ac: don't use +=
...
The += operator is bashism and won't work with non-bash shells, such as
ash on Alpine Linux.
2019-06-07 08:32:53 +02:00
Dylan McKay
00e6e4568f
mac: Set a valid interface number on hid_device_info for USB HID devices
...
Previously the interface would never be set on Mac.
This presents a big pain because retrieving interface numbers can be the
only way to distinguish between the interfaces returned by HIDAPI.
This change makes it possible to retrieve interface number from an
hid_device_info on Mac for USB HID devices only.
It is unclear if the macOS IOKit library returns valid interface numbers
for non-HID USB devices. Because of this, I have opted to simply skip
that case - leave it initialised to `-1`.
In the future, we can easily relax this restriction if it turns out
IOKit correctly returns interface number with non-HID USB devices. For
now, this commit brings 90% of the value at 5% of the risk.
2019-06-06 17:31:48 +02:00
Raphaël P. Barazzutti
d8336833fc
mac: fix behaviour of hid_get_feature_report (was writing on the report id byte) and return value was not right)
2019-06-06 00:23:45 +02:00