blob: a97746a63b7020a7cdb999ee8bf9ae5f3af47a66 [file] [log] [blame]
Stefan Achatz5772f632011-01-30 13:38:23 +01001#ifndef __HID_ROCCAT_COMMON_H
2#define __HID_ROCCAT_COMMON_H
3
4/*
5 * Copyright (c) 2011 Stefan Achatz <erazor_de@users.sourceforge.net>
6 */
7
8/*
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option)
12 * any later version.
13 */
14
15#include <linux/usb.h>
16#include <linux/types.h>
17
Stefan Achatz7392d732012-05-20 22:45:04 +020018enum roccat_common2_commands {
Stefan Achatz4728f2d2012-05-20 22:44:59 +020019 ROCCAT_COMMON_COMMAND_CONTROL = 0x4,
20};
21
Stefan Achatz7392d732012-05-20 22:45:04 +020022struct roccat_common2_control {
Stefan Achatz4728f2d2012-05-20 22:44:59 +020023 uint8_t command;
24 uint8_t value;
25 uint8_t request; /* always 0 on requesting write check */
26} __packed;
27
Stefan Achatz7392d732012-05-20 22:45:04 +020028int roccat_common2_receive(struct usb_device *usb_dev, uint report_id,
Stefan Achatz5772f632011-01-30 13:38:23 +010029 void *data, uint size);
Stefan Achatz7392d732012-05-20 22:45:04 +020030int roccat_common2_send(struct usb_device *usb_dev, uint report_id,
Stefan Achatz5772f632011-01-30 13:38:23 +010031 void const *data, uint size);
Stefan Achatz7392d732012-05-20 22:45:04 +020032int roccat_common2_send_with_status(struct usb_device *usb_dev,
Stefan Achatz4728f2d2012-05-20 22:44:59 +020033 uint command, void const *buf, uint size);
Stefan Achatz5772f632011-01-30 13:38:23 +010034
35#endif