Debian Codegraph @

3rdparty/hidapi/windows/hidapi_hidclass.h

raw symbols SCIP
1 /*******************************************************
2 HIDAPI - Multi-Platform library for
3 communication with HID devices.
4
5 libusb/hidapi Team
6
7 Copyright 2022, 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 #ifndef HIDAPI_HIDCLASS_H
21 #define HIDAPI_HIDCLASS_H
22
23 #ifdef HIDAPI_USE_DDK
24
25 #include <hidclass.h>
26
27 #else
28
29 /* This part of the header mimics hidclass.h,
30 but only what is used by HIDAPI */
31
32 #ifndef FILE_DEVICE_KEYBOARD
33 #define FILE_DEVICE_KEYBOARD 0x0000000b
34 #endif
35
36 #ifndef METHOD_OUT_DIRECT
37 #define METHOD_OUT_DIRECT 2
38 #endif
39
40 #ifndef FILE_ANY_ACCESS
41 #define FILE_ANY_ACCESS 0
42 #endif
43
44 #ifndef CTL_CODE
45 #define CTL_CODE( DeviceType, Function, Method, Access ) ( \
46 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
47 )
48 #endif
49
50 #define HID_OUT_CTL_CODE(id) CTL_CODE(FILE_DEVICE_KEYBOARD, (id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
51 #define IOCTL_HID_GET_FEATURE HID_OUT_CTL_CODE(100)
52 #define IOCTL_HID_GET_INPUT_REPORT HID_OUT_CTL_CODE(104)
53
54 #endif
55
56 #endif /* HIDAPI_HIDCLASS_H */