天嵌二次封装库使用手册  V1.0
hidp.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *
4  * BlueZ - Bluetooth protocol stack for Linux
5  *
6  * Copyright (C) 2003-2010 Marcel Holtmann <marcel@holtmann.org>
7  *
8  *
9  */
10 
11 #ifndef __HIDP_H
12 #define __HIDP_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* HIDP defaults */
19 #define HIDP_MINIMUM_MTU 48
20 #define HIDP_DEFAULT_MTU 48
21 
22 /* HIDP ioctl defines */
23 #define HIDPCONNADD _IOW('H', 200, int)
24 #define HIDPCONNDEL _IOW('H', 201, int)
25 #define HIDPGETCONNLIST _IOR('H', 210, int)
26 #define HIDPGETCONNINFO _IOR('H', 211, int)
27 
28 #define HIDP_VIRTUAL_CABLE_UNPLUG 0
29 #define HIDP_BOOT_PROTOCOL_MODE 1
30 #define HIDP_BLUETOOTH_VENDOR_ID 9
31 
33  int ctrl_sock; /* Connected control socket */
34  int intr_sock; /* Connected interrupt socket */
35  uint16_t parser; /* Parser version */
36  uint16_t rd_size; /* Report descriptor size */
37  uint8_t *rd_data; /* Report descriptor data */
38  uint8_t country;
39  uint8_t subclass;
40  uint16_t vendor;
41  uint16_t product;
42  uint16_t version;
43  uint32_t flags;
44  uint32_t idle_to;
45  char name[128]; /* Device name */
46 };
47 
49  bdaddr_t bdaddr;
50  uint32_t flags;
51 };
52 
53 struct hidp_conninfo {
54  bdaddr_t bdaddr;
55  uint32_t flags;
56  uint16_t state;
57  uint16_t vendor;
58  uint16_t product;
59  uint16_t version;
60  char name[128];
61 };
62 
64  uint32_t cnum;
65  struct hidp_conninfo *ci;
66 };
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* __HIDP_H */
Definition: hidp.h:63
Definition: hidp.h:53
Definition: hidp.h:48
Definition: hidp.h:32