wacom_wac.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. #define WACOM_PKGLEN_MTTPC 40
  27. /* wacom data size per MT contact */
  28. #define WACOM_BYTES_PER_MT_PACKET 11
  29. #define WACOM_BYTES_PER_24HDT_PACKET 14
  30. /* device IDs */
  31. #define STYLUS_DEVICE_ID 0x02
  32. #define TOUCH_DEVICE_ID 0x03
  33. #define CURSOR_DEVICE_ID 0x06
  34. #define ERASER_DEVICE_ID 0x0A
  35. #define PAD_DEVICE_ID 0x0F
  36. /* wacom data packet report IDs */
  37. #define WACOM_REPORT_PENABLED 2
  38. #define WACOM_REPORT_INTUOSREAD 5
  39. #define WACOM_REPORT_INTUOSWRITE 6
  40. #define WACOM_REPORT_INTUOSPAD 12
  41. #define WACOM_REPORT_INTUOS5PAD 3
  42. #define WACOM_REPORT_TPC1FG 6
  43. #define WACOM_REPORT_TPC2FG 13
  44. #define WACOM_REPORT_TPCMT 13
  45. #define WACOM_REPORT_TPCHID 15
  46. #define WACOM_REPORT_TPCST 16
  47. #define WACOM_REPORT_TPC1FGE 18
  48. #define WACOM_REPORT_24HDT 1
  49. /* device quirks */
  50. #define WACOM_QUIRK_MULTI_INPUT 0x0001
  51. #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
  52. #define WACOM_QUIRK_NO_INPUT 0x0004
  53. #define WACOM_QUIRK_MONITOR 0x0008
  54. enum {
  55. PENPARTNER = 0,
  56. GRAPHIRE,
  57. WACOM_G4,
  58. PTU,
  59. PL,
  60. DTU,
  61. INTUOS,
  62. INTUOS3S,
  63. INTUOS3,
  64. INTUOS3L,
  65. INTUOS4S,
  66. INTUOS4,
  67. INTUOS4L,
  68. INTUOS5S,
  69. INTUOS5,
  70. INTUOS5L,
  71. WACOM_21UX2,
  72. WACOM_22HD,
  73. DTK,
  74. WACOM_24HD,
  75. CINTIQ,
  76. WACOM_BEE,
  77. WACOM_MO,
  78. WIRELESS,
  79. BAMBOO_PT,
  80. WACOM_24HDT,
  81. TABLETPC, /* add new TPC below */
  82. TABLETPCE,
  83. TABLETPC2FG,
  84. MTSCREEN,
  85. MTTPC,
  86. MAX_TYPE
  87. };
  88. struct wacom_features {
  89. const char *name;
  90. int pktlen;
  91. int x_max;
  92. int y_max;
  93. int pressure_max;
  94. int distance_max;
  95. int type;
  96. int x_resolution;
  97. int y_resolution;
  98. int device_type;
  99. int x_phy;
  100. int y_phy;
  101. unsigned char unit;
  102. unsigned char unitExpo;
  103. int x_fuzz;
  104. int y_fuzz;
  105. int pressure_fuzz;
  106. int distance_fuzz;
  107. unsigned quirks;
  108. unsigned touch_max;
  109. int oVid;
  110. int oPid;
  111. };
  112. struct wacom_shared {
  113. bool stylus_in_proximity;
  114. bool touch_down;
  115. };
  116. struct wacom_wac {
  117. char name[64];
  118. unsigned char *data;
  119. int tool[2];
  120. int id[2];
  121. __u32 serial[2];
  122. struct wacom_features features;
  123. struct wacom_shared *shared;
  124. struct input_dev *input;
  125. int pid;
  126. int battery_capacity;
  127. int num_contacts_left;
  128. };
  129. #endif