hidp.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. #ifndef __HIDP_H
  11. #define __HIDP_H
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /* HIDP defaults */
  16. #define HIDP_MINIMUM_MTU 48
  17. #define HIDP_DEFAULT_MTU 48
  18. /* HIDP ioctl defines */
  19. #define HIDPCONNADD _IOW('H', 200, int)
  20. #define HIDPCONNDEL _IOW('H', 201, int)
  21. #define HIDPGETCONNLIST _IOR('H', 210, int)
  22. #define HIDPGETCONNINFO _IOR('H', 211, int)
  23. #define HIDP_VIRTUAL_CABLE_UNPLUG 0
  24. #define HIDP_BOOT_PROTOCOL_MODE 1
  25. #define HIDP_BLUETOOTH_VENDOR_ID 9
  26. struct hidp_connadd_req {
  27. int ctrl_sock; /* Connected control socket */
  28. int intr_sock; /* Connected interrupt socket */
  29. uint16_t parser; /* Parser version */
  30. uint16_t rd_size; /* Report descriptor size */
  31. uint8_t *rd_data; /* Report descriptor data */
  32. uint8_t country;
  33. uint8_t subclass;
  34. uint16_t vendor;
  35. uint16_t product;
  36. uint16_t version;
  37. uint32_t flags;
  38. uint32_t idle_to;
  39. char name[128]; /* Device name */
  40. };
  41. struct hidp_conndel_req {
  42. bdaddr_t bdaddr;
  43. uint32_t flags;
  44. };
  45. struct hidp_conninfo {
  46. bdaddr_t bdaddr;
  47. uint32_t flags;
  48. uint16_t state;
  49. uint16_t vendor;
  50. uint16_t product;
  51. uint16_t version;
  52. char name[128];
  53. };
  54. struct hidp_connlist_req {
  55. uint32_t cnum;
  56. struct hidp_conninfo *ci;
  57. };
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __HIDP_H */