aboutsummaryrefslogtreecommitdiff
path: root/hid-tmff2.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-03-20 19:41:25 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-03-20 19:41:25 +0200
commit725e8ea20b616b8cd29865a8819112ae2c61c54f (patch)
treead3873b3755e235fe95d3385271b4f883b6248b4 /hid-tmff2.h
parent28d0a3f76748a2555fc1417216ed51112dba945c (diff)
downloadhid-tmff2-725e8ea20b616b8cd29865a8819112ae2c61c54f.tar.gz
hid-tmff2-725e8ea20b616b8cd29865a8819112ae2c61c54f.zip
add initial t248 support
Diffstat (limited to 'hid-tmff2.h')
-rw-r--r--hid-tmff2.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/hid-tmff2.h b/hid-tmff2.h
index d59104a..f474ca7 100644
--- a/hid-tmff2.h
+++ b/hid-tmff2.h
@@ -91,9 +91,41 @@ struct tmff2_device_entry {
/* external */
int t300rs_populate_api(struct tmff2_device_entry *tmff2);
+int t248_populate_api(struct tmff2_device_entry *tmff2);
-#define TMT300RS_PS3_NORM_ID 0xb66e
-#define TMT300RS_PS3_ADV_ID 0xb66f
-#define TMT300RS_PS4_NORM_ID 0xb66d
+#define TMT300RS_PS3_NORM_ID 0xb66e
+#define TMT300RS_PS3_ADV_ID 0xb66f
+#define TMT300RS_PS4_NORM_ID 0xb66d
+
+#define TMT248_PC_ID 0xb696
+
+/* apis to different wheel families */
+/* T248 at least uses the T300RS api, not sure if there are other wheels but that's
+ * why these functions are given global linkage */
+
+struct t300rs_device_entry {
+ struct hid_device *hdev;
+ struct input_dev *input_dev;
+ struct hid_report *report;
+ struct hid_field *ff_field;
+ struct usb_device *usbdev;
+
+ int (*open)(struct input_dev *dev);
+ void (*close)(struct input_dev *dev);
+
+ u8 buffer_length;
+ u8 *send_buffer;
+};
+
+int t300rs_play_effect(void *, struct tmff2_effect_state *);
+int t300rs_upload_effect(void *, struct tmff2_effect_state *);
+int t300rs_update_effect(void *, struct tmff2_effect_state *);
+int t300rs_stop_effect(void *, struct tmff2_effect_state *);
+
+int t300rs_open(void *);
+int t300rs_close(void *);
+int t300rs_set_gain(void *, uint16_t);
+int t300rs_set_range(void *, uint16_t);
+int t300rs_set_autocenter(void *, uint16_t);
#endif /* __HID_TMFF2_H */