hid-roccat-konepure.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __HID_ROCCAT_KONEPURE_H
  2. #define __HID_ROCCAT_KONEPURE_H
  3. /*
  4. * Copyright (c) 2012 Stefan Achatz <erazor_de@users.sourceforge.net>
  5. */
  6. /*
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the Free
  9. * Software Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. */
  12. #include <linux/types.h>
  13. enum {
  14. KONEPURE_SIZE_ACTUAL_PROFILE = 0x03,
  15. KONEPURE_SIZE_CONTROL = 0x03,
  16. KONEPURE_SIZE_FIRMWARE_WRITE = 0x0402,
  17. KONEPURE_SIZE_INFO = 0x06,
  18. KONEPURE_SIZE_MACRO = 0x0822,
  19. KONEPURE_SIZE_PROFILE_SETTINGS = 0x1f,
  20. KONEPURE_SIZE_PROFILE_BUTTONS = 0x3b,
  21. KONEPURE_SIZE_SENSOR = 0x06,
  22. KONEPURE_SIZE_TALK = 0x10,
  23. KONEPURE_SIZE_TCU = 0x04,
  24. KONEPURE_SIZE_TCU_IMAGE = 0x0404,
  25. };
  26. enum konepure_control_requests {
  27. KONEPURE_CONTROL_REQUEST_GENERAL = 0x80,
  28. KONEPURE_CONTROL_REQUEST_BUTTONS = 0x90,
  29. };
  30. enum konepure_commands {
  31. KONEPURE_COMMAND_CONTROL = 0x04,
  32. KONEPURE_COMMAND_ACTUAL_PROFILE = 0x05,
  33. KONEPURE_COMMAND_PROFILE_SETTINGS = 0x06,
  34. KONEPURE_COMMAND_PROFILE_BUTTONS = 0x07,
  35. KONEPURE_COMMAND_MACRO = 0x08,
  36. KONEPURE_COMMAND_INFO = 0x09,
  37. KONEPURE_COMMAND_TCU = 0x0c,
  38. KONEPURE_COMMAND_TCU_IMAGE = 0x0c,
  39. KONEPURE_COMMAND_E = 0x0e,
  40. KONEPURE_COMMAND_SENSOR = 0x0f,
  41. KONEPURE_COMMAND_TALK = 0x10,
  42. KONEPURE_COMMAND_FIRMWARE_WRITE = 0x1b,
  43. KONEPURE_COMMAND_FIRMWARE_WRITE_CONTROL = 0x1c,
  44. };
  45. enum {
  46. KONEPURE_MOUSE_REPORT_NUMBER_BUTTON = 3,
  47. };
  48. struct konepure_mouse_report_button {
  49. uint8_t report_number; /* always KONEPURE_MOUSE_REPORT_NUMBER_BUTTON */
  50. uint8_t zero;
  51. uint8_t type;
  52. uint8_t data1;
  53. uint8_t data2;
  54. uint8_t zero2;
  55. uint8_t unknown[2];
  56. } __packed;
  57. struct konepure_device {
  58. int roccat_claimed;
  59. int chrdev_minor;
  60. struct mutex konepure_lock;
  61. };
  62. #endif