aboutsummaryrefslogtreecommitdiff
path: root/hid-tmff2.h
diff options
context:
space:
mode:
Diffstat (limited to 'hid-tmff2.h')
-rw-r--r--hid-tmff2.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/hid-tmff2.h b/hid-tmff2.h
index b2a46c9..1585649 100644
--- a/hid-tmff2.h
+++ b/hid-tmff2.h
@@ -1,11 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _HID_TMFF2
-#define _HID_TMFF2
+#ifndef __HID_TMFF2_H
+#define __HID_TMFF2_H
#include <linux/fixp-arith.h>
#include <linux/ktime.h>
#include <linux/input.h>
+#ifndef TMFF2_MAIN
+extern int timer_msecs;
+extern int spring_level;
+extern int damper_level;
+extern int friction_level;
+extern int range;
+extern int alt_mode;
+#endif
+
#define USB_VENDOR_ID_THRUSTMASTER 0x044f
/* the wheel seems to only be capable of processing a certain number of
@@ -16,11 +25,17 @@
*/
#define DEFAULT_TIMER_PERIOD 8
-#define FF_EFFECT_QUEUE_UPLOAD 0
-#define FF_EFFECT_QUEUE_START 1
-#define FF_EFFECT_QUEUE_STOP 2
-#define FF_EFFECT_QUEUE_UPDATE 3
-#define FF_EFFECT_PLAYING 4
+#define FF_EFFECT_QUEUE_UPLOAD 0
+#define FF_EFFECT_QUEUE_START 1
+#define FF_EFFECT_QUEUE_STOP 2
+#define FF_EFFECT_QUEUE_UPDATE 3
+#define FF_EFFECT_PLAYING 4
+
+#define HAS_SPRING_LEVEL (1 << 0)
+#define HAS_DAMPER_LEVEL (1 << 1)
+#define HAS_FRICTION_LEVEL (1 << 2)
+#define HAS_RANGE (1 << 3)
+#define HAS_ALT_MODE (1 << 4)
#undef fixp_sin16
#define fixp_sin16(v) (((v % 360) > 180) ?\
@@ -51,6 +66,7 @@ struct tmff2_device_entry {
/* fields relevant to each actual device (T300, T150...) */
void *data;
+ unsigned long params;
unsigned long max_effects;
signed short supported_effects[FF_CNT];
@@ -75,4 +91,4 @@ struct tmff2_device_entry {
/* void pointers are dangerous, I know, but in this case likely the best option... */
};
-#endif /* _HID_TMFF2 */
+#endif /* __HID_TMFF2_H */