hid-roccat-common.h 973 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __HID_ROCCAT_COMMON_H
  2. #define __HID_ROCCAT_COMMON_H
  3. /*
  4. * Copyright (c) 2011 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/usb.h>
  13. #include <linux/types.h>
  14. enum roccat_common2_commands {
  15. ROCCAT_COMMON_COMMAND_CONTROL = 0x4,
  16. };
  17. struct roccat_common2_control {
  18. uint8_t command;
  19. uint8_t value;
  20. uint8_t request; /* always 0 on requesting write check */
  21. } __packed;
  22. int roccat_common2_receive(struct usb_device *usb_dev, uint report_id,
  23. void *data, uint size);
  24. int roccat_common2_send(struct usb_device *usb_dev, uint report_id,
  25. void const *data, uint size);
  26. int roccat_common2_send_with_status(struct usb_device *usb_dev,
  27. uint command, void const *buf, uint size);
  28. #endif