diff options
Diffstat (limited to 'contrib/SDL-3.2.8/src/hidapi/libusb/hidapi_libusb.h')
| -rw-r--r-- | contrib/SDL-3.2.8/src/hidapi/libusb/hidapi_libusb.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/hidapi/libusb/hidapi_libusb.h b/contrib/SDL-3.2.8/src/hidapi/libusb/hidapi_libusb.h new file mode 100644 index 0000000..758f16f --- /dev/null +++ b/contrib/SDL-3.2.8/src/hidapi/libusb/hidapi_libusb.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /******************************************************* | ||
| 2 | HIDAPI - Multi-Platform library for | ||
| 3 | communication with HID devices. | ||
| 4 | |||
| 5 | libusb/hidapi Team | ||
| 6 | |||
| 7 | Copyright 2021, All Rights Reserved. | ||
| 8 | |||
| 9 | At the discretion of the user of this library, | ||
| 10 | this software may be licensed under the terms of the | ||
| 11 | GNU General Public License v3, a BSD-Style license, or the | ||
| 12 | original HIDAPI license as outlined in the LICENSE.txt, | ||
| 13 | LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt | ||
| 14 | files located at the root of the source distribution. | ||
| 15 | These files may also be found in the public source | ||
| 16 | code repository located at: | ||
| 17 | https://github.com/libusb/hidapi . | ||
| 18 | ********************************************************/ | ||
| 19 | |||
| 20 | /** @file | ||
| 21 | * @defgroup API hidapi API | ||
| 22 | |||
| 23 | * Since version 0.11.0, @ref HID_API_VERSION >= HID_API_MAKE_VERSION(0, 11, 0). | ||
| 24 | */ | ||
| 25 | |||
| 26 | #ifndef HIDAPI_LIBUSB_H__ | ||
| 27 | #define HIDAPI_LIBUSB_H__ | ||
| 28 | |||
| 29 | #include <stdint.h> | ||
| 30 | |||
| 31 | #include "../hidapi/hidapi.h" | ||
| 32 | |||
| 33 | #ifdef __cplusplus | ||
| 34 | extern "C" { | ||
| 35 | #endif | ||
| 36 | |||
| 37 | /** @brief Open a HID device using libusb_wrap_sys_device. | ||
| 38 | See https://libusb.sourceforge.io/api-1.0/group__libusb__dev.html#ga98f783e115ceff4eaf88a60e6439563c, | ||
| 39 | for details on libusb_wrap_sys_device. | ||
| 40 | |||
| 41 | @ingroup API | ||
| 42 | @param sys_dev Platform-specific file descriptor that can be recognised by libusb. | ||
| 43 | @param interface_num USB interface number of the device to be used as HID interface. | ||
| 44 | Pass -1 to select first HID interface of the device. | ||
| 45 | |||
| 46 | @returns | ||
| 47 | This function returns a pointer to a #hid_device object on | ||
| 48 | success or NULL on failure. | ||
| 49 | */ | ||
| 50 | HID_API_EXPORT hid_device * HID_API_CALL hid_libusb_wrap_sys_device(intptr_t sys_dev, int interface_num); | ||
| 51 | |||
| 52 | #ifdef __cplusplus | ||
| 53 | } | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #endif | ||
