wacom_wac.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. /* device IDs */
  26. #define STYLUS_DEVICE_ID 0x02
  27. #define TOUCH_DEVICE_ID 0x03
  28. #define CURSOR_DEVICE_ID 0x06
  29. #define ERASER_DEVICE_ID 0x0A
  30. #define PAD_DEVICE_ID 0x0F
  31. /* wacom data packet report IDs */
  32. #define WACOM_REPORT_PENABLED 2
  33. #define WACOM_REPORT_INTUOSREAD 5
  34. #define WACOM_REPORT_INTUOSWRITE 6
  35. #define WACOM_REPORT_INTUOSPAD 12
  36. #define WACOM_REPORT_TPC1FG 6
  37. #define WACOM_REPORT_TPC2FG 13
  38. #define WACOM_REPORT_TPCHID 15
  39. #define WACOM_REPORT_TPCST 16
  40. /* device quirks */
  41. #define WACOM_QUIRK_MULTI_INPUT 0x0001
  42. #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
  43. #define WACOM_QUIRK_NO_INPUT 0x0004
  44. #define WACOM_QUIRK_MONITOR 0x0008
  45. enum {
  46. PENPARTNER = 0,
  47. GRAPHIRE,
  48. WACOM_G4,
  49. PTU,
  50. PL,
  51. DTU,
  52. BAMBOO_PT,
  53. WIRELESS,
  54. INTUOS,
  55. INTUOS3S,
  56. INTUOS3,
  57. INTUOS3L,
  58. INTUOS4S,
  59. INTUOS4,
  60. INTUOS4L,
  61. WACOM_24HD,
  62. WACOM_21UX2,
  63. CINTIQ,
  64. WACOM_BEE,
  65. WACOM_MO,
  66. TABLETPC,
  67. TABLETPC2FG,
  68. MAX_TYPE
  69. };
  70. struct wacom_features {
  71. const char *name;
  72. int pktlen;
  73. int x_max;
  74. int y_max;
  75. int pressure_max;
  76. int distance_max;
  77. int type;
  78. int x_resolution;
  79. int y_resolution;
  80. int device_type;
  81. int x_phy;
  82. int y_phy;
  83. unsigned char unit;
  84. unsigned char unitExpo;
  85. int x_fuzz;
  86. int y_fuzz;
  87. int pressure_fuzz;
  88. int distance_fuzz;
  89. unsigned quirks;
  90. };
  91. struct wacom_shared {
  92. bool stylus_in_proximity;
  93. bool touch_down;
  94. };
  95. struct wacom_wac {
  96. char name[64];
  97. unsigned char *data;
  98. int tool[2];
  99. int id[2];
  100. __u32 serial[2];
  101. struct wacom_features features;
  102. struct wacom_shared *shared;
  103. struct input_dev *input;
  104. int pid;
  105. int battery_capacity;
  106. };
  107. #endif