wacom_wac.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 32
  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. /* device IDs */
  22. #define STYLUS_DEVICE_ID 0x02
  23. #define TOUCH_DEVICE_ID 0x03
  24. #define CURSOR_DEVICE_ID 0x06
  25. #define ERASER_DEVICE_ID 0x0A
  26. #define PAD_DEVICE_ID 0x0F
  27. /* wacom data packet report IDs */
  28. #define WACOM_REPORT_PENABLED 2
  29. #define WACOM_REPORT_INTUOSREAD 5
  30. #define WACOM_REPORT_INTUOSWRITE 6
  31. #define WACOM_REPORT_INTUOSPAD 12
  32. #define WACOM_REPORT_TPC1FG 6
  33. #define WACOM_REPORT_TPC2FG 13
  34. enum {
  35. PENPARTNER = 0,
  36. GRAPHIRE,
  37. WACOM_G4,
  38. PTU,
  39. PL,
  40. DTU,
  41. INTUOS,
  42. INTUOS3S,
  43. INTUOS3,
  44. INTUOS3L,
  45. INTUOS4S,
  46. INTUOS4,
  47. INTUOS4L,
  48. WACOM_21UX2,
  49. CINTIQ,
  50. WACOM_BEE,
  51. WACOM_MO,
  52. TABLETPC,
  53. TABLETPC2FG,
  54. MAX_TYPE
  55. };
  56. struct wacom_features {
  57. const char *name;
  58. int pktlen;
  59. int x_max;
  60. int y_max;
  61. int pressure_max;
  62. int distance_max;
  63. int type;
  64. int device_type;
  65. int x_phy;
  66. int y_phy;
  67. unsigned char unit;
  68. unsigned char unitExpo;
  69. };
  70. struct wacom_shared {
  71. bool stylus_in_proximity;
  72. };
  73. struct wacom_wac {
  74. char name[64];
  75. unsigned char *data;
  76. int tool[3];
  77. int id[3];
  78. __u32 serial[2];
  79. int last_finger;
  80. struct wacom_features features;
  81. struct wacom_shared *shared;
  82. struct input_dev *input;
  83. };
  84. #endif