2011-01-30 20:38:23 +08:00
|
|
|
#ifndef __HID_ROCCAT_COMMON_H
|
|
|
|
#define __HID_ROCCAT_COMMON_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2011 Stefan Achatz <erazor_de@users.sourceforge.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/usb.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
2012-05-21 04:45:04 +08:00
|
|
|
enum roccat_common2_commands {
|
2012-05-21 04:44:59 +08:00
|
|
|
ROCCAT_COMMON_COMMAND_CONTROL = 0x4,
|
|
|
|
};
|
|
|
|
|
2012-05-21 04:45:04 +08:00
|
|
|
struct roccat_common2_control {
|
2012-05-21 04:44:59 +08:00
|
|
|
uint8_t command;
|
|
|
|
uint8_t value;
|
|
|
|
uint8_t request; /* always 0 on requesting write check */
|
|
|
|
} __packed;
|
|
|
|
|
2012-05-21 04:45:04 +08:00
|
|
|
int roccat_common2_receive(struct usb_device *usb_dev, uint report_id,
|
2011-01-30 20:38:23 +08:00
|
|
|
void *data, uint size);
|
2012-05-21 04:45:04 +08:00
|
|
|
int roccat_common2_send(struct usb_device *usb_dev, uint report_id,
|
2011-01-30 20:38:23 +08:00
|
|
|
void const *data, uint size);
|
2012-05-21 04:45:04 +08:00
|
|
|
int roccat_common2_send_with_status(struct usb_device *usb_dev,
|
2012-05-21 04:44:59 +08:00
|
|
|
uint command, void const *buf, uint size);
|
2011-01-30 20:38:23 +08:00
|
|
|
|
|
|
|
#endif
|