diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-02-09 11:46:32 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-02-09 11:46:32 +0200 |
| commit | 3953b2e7a24e2cf3926a0038a91acf8d9f9ee887 (patch) | |
| tree | 3c60298711629fd1e3a6857537b705574baa9576 /hid-tmff2.h | |
| parent | ae9c87774836124e6303b5a7321d9ea0ddf5ab85 (diff) | |
| download | hid-tmff2-3953b2e7a24e2cf3926a0038a91acf8d9f9ee887.tar.gz hid-tmff2-3953b2e7a24e2cf3926a0038a91acf8d9f9ee887.zip | |
add open_mode module parameter
+ open_mode = 1 (default) sends out mode switch commands on open/close,
open_mode = 0 sets the wheel into 'open' mode once at init
Diffstat (limited to 'hid-tmff2.h')
| -rw-r--r-- | hid-tmff2.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hid-tmff2.h b/hid-tmff2.h index d5de938..8b7842e 100644 --- a/hid-tmff2.h +++ b/hid-tmff2.h @@ -78,12 +78,12 @@ struct tmff2_device_entry { int (*update_effect)(void *data, struct tmff2_effect_state *state); int (*stop_effect)(void *data, struct tmff2_effect_state *state); - int (*wheel_init)(struct tmff2_device_entry *tmff2); + int (*wheel_init)(struct tmff2_device_entry *tmff2, int open_mode); int (*wheel_destroy)(void *data); /* optional callbacks */ - int (*open)(void *data); - int (*close)(void *data); + int (*open)(void *data, int); + int (*close)(void *data, int); int (*set_gain)(void *data, uint16_t gain); int (*set_range)(void *data, uint16_t range); /* switch_mode has to not do anything if we're alredy in the specified @@ -132,8 +132,8 @@ 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_open(void *, int); +int t300rs_close(void *, int); int t300rs_set_gain(void *, uint16_t); int t300rs_set_range(void *, uint16_t); int t300rs_set_autocenter(void *, uint16_t); |
