linux/drivers/hid/hid-roccat-konepure.h
<<
>>
Prefs
   1#ifndef __HID_ROCCAT_KONEPURE_H
   2#define __HID_ROCCAT_KONEPURE_H
   3
   4/*
   5 * Copyright (c) 2012 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/types.h>
  16
  17enum {
  18        KONEPURE_SIZE_ACTUAL_PROFILE = 0x03,
  19        KONEPURE_SIZE_CONTROL = 0x03,
  20        KONEPURE_SIZE_FIRMWARE_WRITE = 0x0402,
  21        KONEPURE_SIZE_INFO = 0x06,
  22        KONEPURE_SIZE_MACRO = 0x0822,
  23        KONEPURE_SIZE_PROFILE_SETTINGS = 0x1f,
  24        KONEPURE_SIZE_PROFILE_BUTTONS = 0x3b,
  25        KONEPURE_SIZE_SENSOR = 0x06,
  26        KONEPURE_SIZE_TALK = 0x10,
  27        KONEPURE_SIZE_TCU = 0x04,
  28        KONEPURE_SIZE_TCU_IMAGE = 0x0404,
  29};
  30
  31enum konepure_control_requests {
  32        KONEPURE_CONTROL_REQUEST_GENERAL = 0x80,
  33        KONEPURE_CONTROL_REQUEST_BUTTONS = 0x90,
  34};
  35
  36enum konepure_commands {
  37        KONEPURE_COMMAND_CONTROL = 0x04,
  38        KONEPURE_COMMAND_ACTUAL_PROFILE = 0x05,
  39        KONEPURE_COMMAND_PROFILE_SETTINGS = 0x06,
  40        KONEPURE_COMMAND_PROFILE_BUTTONS = 0x07,
  41        KONEPURE_COMMAND_MACRO = 0x08,
  42        KONEPURE_COMMAND_INFO = 0x09,
  43        KONEPURE_COMMAND_TCU = 0x0c,
  44        KONEPURE_COMMAND_TCU_IMAGE = 0x0c,
  45        KONEPURE_COMMAND_E = 0x0e,
  46        KONEPURE_COMMAND_SENSOR = 0x0f,
  47        KONEPURE_COMMAND_TALK = 0x10,
  48        KONEPURE_COMMAND_FIRMWARE_WRITE = 0x1b,
  49        KONEPURE_COMMAND_FIRMWARE_WRITE_CONTROL = 0x1c,
  50};
  51
  52enum {
  53        KONEPURE_MOUSE_REPORT_NUMBER_BUTTON = 3,
  54};
  55
  56struct konepure_mouse_report_button {
  57        uint8_t report_number; /* always KONEPURE_MOUSE_REPORT_NUMBER_BUTTON */
  58        uint8_t zero;
  59        uint8_t type;
  60        uint8_t data1;
  61        uint8_t data2;
  62        uint8_t zero2;
  63        uint8_t unknown[2];
  64} __packed;
  65
  66struct konepure_device {
  67        int roccat_claimed;
  68        int chrdev_minor;
  69        struct mutex konepure_lock;
  70};
  71
  72#endif
  73
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.