wacom_wac.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. /* device quirks */
  46. #define WACOM_QUIRK_MULTI_INPUT 0x0001
  47. #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
  48. #define WACOM_QUIRK_NO_INPUT 0x0004
  49. #define WACOM_QUIRK_MONITOR 0x0008
  50. enum {
  51. PENPARTNER = 0,
  52. GRAPHIRE,
  53. WACOM_G4,
  54. PTU,
  55. PL,
  56. DTU,
  57. BAMBOO_PT,
  58. WIRELESS,
  59. INTUOS,
  60. INTUOS3S,
  61. INTUOS3,
  62. INTUOS3L,
  63. INTUOS4S,
  64. INTUOS4,
  65. INTUOS4L,
  66. INTUOS5S,
  67. INTUOS5,
  68. INTUOS5L,
  69. WACOM_24HD,
  70. WACOM_21UX2,
  71. CINTIQ,
  72. WACOM_BEE,
  73. WACOM_MO,
  74. TABLETPC,
  75. TABLETPC2FG,
  76. MTSCREEN,
  77. MAX_TYPE
  78. };
  79. struct wacom_features {
  80. const char *name;
  81. int pktlen;
  82. int x_max;
  83. int y_max;
  84. int pressure_max;
  85. int distance_max;
  86. int type;
  87. int x_resolution;
  88. int y_resolution;
  89. int device_type;
  90. int x_phy;
  91. int y_phy;
  92. unsigned char unit;
  93. unsigned char unitExpo;
  94. int x_fuzz;
  95. int y_fuzz;
  96. int pressure_fuzz;
  97. int distance_fuzz;
  98. unsigned quirks;
  99. unsigned touch_max;
  100. };
  101. struct wacom_shared {
  102. bool stylus_in_proximity;
  103. bool touch_down;
  104. };
  105. struct wacom_wac {
  106. char name[64];
  107. unsigned char *data;
  108. int tool[2];
  109. int id[2];
  110. __u32 serial[2];
  111. struct wacom_features features;
  112. struct wacom_shared *shared;
  113. struct input_dev *input;
  114. int pid;
  115. int battery_capacity;
  116. int num_contacts_left;
  117. int *slots;
  118. };
  119. #endif