wacom_wac.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * drivers/input/tablet/wacom_wac.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. */
  9. #ifndef WACOM_WAC_H
  10. #define WACOM_WAC_H
  11. #include <linux/types.h>
  12. /* maximum packet length for USB devices */
  13. #define WACOM_PKGLEN_MAX 64
  14. /* packet length for individual models */
  15. #define WACOM_PKGLEN_PENPRTN 7
  16. #define WACOM_PKGLEN_GRAPHIRE 8
  17. #define WACOM_PKGLEN_BBFUN 9
  18. #define WACOM_PKGLEN_INTUOS 10
  19. #define WACOM_PKGLEN_TPC1FG 5
  20. #define WACOM_PKGLEN_TPC2FG 14
  21. #define WACOM_PKGLEN_BBTOUCH 20
  22. #define WACOM_PKGLEN_BBTOUCH3 64
  23. #define WACOM_PKGLEN_BBPEN 10
  24. #define WACOM_PKGLEN_WIRELESS 32
  25. #define WACOM_PKGLEN_MTOUCH 62
  26. /* wacom data size per MT contact */
  27. #define WACOM_BYTES_PER_MT_PACKET 11
  28. /* device IDs */
  29. #define STYLUS_DEVICE_ID 0x02
  30. #define TOUCH_DEVICE_ID 0x03
  31. #define CURSOR_DEVICE_ID 0x06
  32. #define ERASER_DEVICE_ID 0x0A
  33. #define PAD_DEVICE_ID 0x0F
  34. /* wacom data packet report IDs */
  35. #define WACOM_REPORT_PENABLED 2
  36. #define WACOM_REPORT_INTUOSREAD 5
  37. #define WACOM_REPORT_INTUOSWRITE 6
  38. #define WACOM_REPORT_INTUOSPAD 12
  39. #define WACOM_REPORT_INTUOS5PAD 3
  40. #define WACOM_REPORT_TPC1FG 6
  41. #define WACOM_REPORT_TPC2FG 13
  42. #define WACOM_REPORT_TPCMT 13
  43. #define WACOM_REPORT_TPCHID 15
  44. #define WACOM_REPORT_TPCST 16
  45. #define WACOM_REPORT_TPC1FGE 18
  46. /* device quirks */
  47. #define WACOM_QUIRK_MULTI_INPUT 0x0001
  48. #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
  49. #define WACOM_QUIRK_NO_INPUT 0x0004
  50. #define WACOM_QUIRK_MONITOR 0x0008
  51. enum {
  52. PENPARTNER = 0,
  53. GRAPHIRE,
  54. WACOM_G4,
  55. PTU,
  56. PL,
  57. DTU,
  58. INTUOS,
  59. INTUOS3S,
  60. INTUOS3,
  61. INTUOS3L,
  62. INTUOS4S,
  63. INTUOS4,
  64. INTUOS4L,
  65. INTUOS5S,
  66. INTUOS5,
  67. INTUOS5L,
  68. WACOM_21UX2,
  69. WACOM_22HD,
  70. WACOM_24HD,
  71. CINTIQ,
  72. WACOM_BEE,
  73. WACOM_MO,
  74. WIRELESS,
  75. BAMBOO_PT,
  76. TABLETPC, /* add new TPC below */
  77. TABLETPCE,
  78. TABLETPC2FG,
  79. MTSCREEN,
  80. MAX_TYPE
  81. };
  82. struct wacom_features {
  83. const char *name;
  84. int pktlen;
  85. int x_max;
  86. int y_max;
  87. int pressure_max;
  88. int distance_max;
  89. int type;
  90. int x_resolution;
  91. int y_resolution;
  92. int device_type;
  93. int x_phy;
  94. int y_phy;
  95. unsigned char unit;
  96. unsigned char unitExpo;
  97. int x_fuzz;
  98. int y_fuzz;
  99. int pressure_fuzz;
  100. int distance_fuzz;
  101. unsigned quirks;
  102. unsigned touch_max;
  103. };
  104. struct wacom_shared {
  105. bool stylus_in_proximity;
  106. bool touch_down;
  107. };
  108. struct wacom_wac {
  109. char name[64];
  110. unsigned char *data;
  111. int tool[2];
  112. int id[2];
  113. __u32 serial[2];
  114. struct wacom_features features;
  115. struct wacom_shared *shared;
  116. struct input_dev *input;
  117. int pid;
  118. int battery_capacity;
  119. int num_contacts_left;
  120. int *slots;
  121. };
  122. #endif