Skip to content

Commit

Permalink
feat(hidapi): update to v0.11.0
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Dec 9, 2021
1 parent 786366f commit 672b6a7
Show file tree
Hide file tree
Showing 6 changed files with 852 additions and 520 deletions.
5 changes: 2 additions & 3 deletions hidapi/hidapi/hidapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
@ingroup API
*/
#define HID_API_VERSION_MINOR 10
#define HID_API_VERSION_MINOR 11
/** @brief Static/compile-time patch version of the library.
@ingroup API
*/
#define HID_API_VERSION_PATCH 1
#define HID_API_VERSION_PATCH 0

/* Helper macros */
#define HID_API_AS_STR_IMPL(x) #x
Expand Down Expand Up @@ -495,4 +495,3 @@ extern "C" {
#endif

#endif

54 changes: 54 additions & 0 deletions hidapi/hidapi/hidapi_libusb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*******************************************************
HIDAPI - Multi-Platform library for
communication with HID devices.
libusb/hidapi Team
Copyright 2021, All Rights Reserved.
At the discretion of the user of this library,
this software may be licensed under the terms of the
GNU General Public License v3, a BSD-Style license, or the
original HIDAPI license as outlined in the LICENSE.txt,
LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt
files located at the root of the source distribution.
These files may also be found in the public source
code repository located at:
https://github.com/libusb/hidapi .
********************************************************/

/** @file
* @defgroup API hidapi API
*/

#ifndef HIDAPI_LIBUSB_H__
#define HIDAPI_LIBUSB_H__

#include <stdint.h>

#include "hidapi.h"

#ifdef __cplusplus
extern "C" {
#endif

/** @brief Open a HID device using libusb_wrap_sys_device.
See https://libusb.sourceforge.io/api-1.0/group__libusb__dev.html#ga98f783e115ceff4eaf88a60e6439563c,
for details on libusb_wrap_sys_device.
@ingroup API
@param sys_dev Platform-specific file descriptor that can be recognised by libusb.
@param interface_num USB interface number of the device to be used as HID interface.
Pass -1 to select first HID interface of the device.
@returns
This function returns a pointer to a #hid_device object on
success or NULL on failure.
*/
HID_API_EXPORT hid_device * HID_API_CALL hid_libusb_wrap_sys_device(intptr_t sys_dev, int interface_num);

#ifdef __cplusplus
}
#endif

#endif
Loading

1 comment on commit 672b6a7

@dolmen
Copy link

@dolmen dolmen commented on 672b6a7 Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trolan See karalabe#33 and karalabe#34 in which I propose upgrade scripts.

Please sign in to comment.