This patch adds usages from the PID page to pid.h. It is not a complete
list, but rather all the usages I require for my Saitek Cyborg 3D Rumble
driver. If a more complete list is required, please let me know.
I have added these define's to pid.h because it seems to me the most
appropriate file name for the usages to be in. I realize the pid.h is
used by pid.c, which is meant to be the driver for the MS SideWinder Force
Feedback 2 Joystick. Perhaps, a less generic name could be more suitable.
Signed-off-by: Nadav Frum <[EMAIL PROTECTED]>
--
--- linux-2.6.13/drivers/usb/input/pid.h.uppid 2005-08-29 02:41:01.000000000
+0300
+++ linux-2.6.13/drivers/usb/input/pid.h 2005-09-26 16:14:53.000000000
+0300
@@ -56,7 +56,78 @@
* Constants from the PID usage table (still far from complete)
*/
-#define FF_PID_USAGE_BLOCK_LOAD 0x89UL
-#define FF_PID_USAGE_BLOCK_FREE 0x90UL
-#define FF_PID_USAGE_NEW_EFFECT 0xABUL
-#define FF_PID_USAGE_POOL_REPORT 0x7FUL
+/* Reports */
+#define FF_PID_USAGE_SET_EFFECT_REPORT 0x21UL
+#define FF_PID_USAGE_SET_ENVELOPE_REPORT 0x5AUL
+#define FF_PID_USAGE_SET_PERIODIC_REPORT 0x6EUL
+#define FF_PID_USAGE_SET_CONSTANT_REPORT 0x73UL
+#define FF_PID_USAGE_EFFECT_OPERATION_REPORT 0x77UL
+#define FF_PID_USAGE_DEVICE_GAIN_REPORT 0x7DUL
+#define FF_PID_USAGE_POOL_REPORT 0x7FUL
+#define FF_PID_USAGE_BLOCK_LOAD_REPORT 0x89UL
+#define FF_PID_USAGE_BLOCK_FREE_REPORT 0x90UL
+#define FF_PID_USAGE_STATE_REPORT 0x92UL
+#define FF_PID_USAGE_DEVICE_CONTROL_REPORT 0x95UL
+#define FF_PID_USAGE_CREATE_NEW_EFFECT_REPORT 0xABUL
+
+#define FF_PID_USAGE_BLOCK_INDEX 0x22UL
+
+/* Set Effect */
+#define FF_PID_USAGE_DURATION 0x50UL
+#define FF_PID_USAGE_TRIGGER_BUTTON 0x53UL
+#define FF_PID_USAGE_TRIGGER_REPEAT_INTERVAL 0x54UL
+#define FF_PID_USAGE_START_DELAY 0xA7UL
+
+/* Set Envelope */
+#define FF_PID_USAGE_ATTACK_LEVEL 0x5BUL
+#define FF_PID_USAGE_ATTACK_TIME 0x5CUL
+#define FF_PID_USAGE_FADE_LEVEL 0x5DUL
+#define FF_PID_USAGE_FADE_TIME 0x5EUL
+
+/* Set Constant Force & Set Periodic */
+#define FF_PID_USAGE_MAGNITUDE 0x70UL
+
+/* Set Periodic */
+#define FF_PID_USAGE_OFFSET 0x6FUL
+#define FF_PID_USAGE_PHASE 0x71UL
+#define FF_PID_USAGE_PERIOD 0x72UL
+
+/* Effect Operation */
+#define FF_PID_USAGE_EFFECT_OP 0x78UL
+#define FF_PID_USAGE_EFFECT_START 0x79UL
+#define FF_PID_USAGE_EFFECT_START_SOLO 0x7AUL
+#define FF_PID_USAGE_EFFECT_STOP 0x7BUL
+#define FF_PID_USAGE_LOOP_COUNT 0x7CUL
+
+/* Device Gain */
+#define FF_PID_USAGE_DEVICE_GAIN 0x7EUL
+
+/* PID Pool Report */
+#define FF_PID_USAGE_SIMULTANEOUS_EFFECTS_MAX 0x83UL
+#define FF_PID_USAGE_DEVICE_MANAGED_POOL 0xA9UL
+
+/* PID Block Load Report */
+#define FF_PID_USAGE_BLOCK_LOAD_STATUS 0x8BUL
+#define FF_PID_USAGE_BLOCK_LOAD_SUCCESS 0x8CUL
+#define FF_PID_USAGE_BLOCK_LOAD_FULL 0x8DUL
+#define FF_PID_USAGE_BLOCK_LOAD_ERROR 0x8EUL
+
+/* PID Device Control Report */
+#define FF_PID_USAGE_DC 0x96UL
+#define FF_PID_USAGE_DC_ENABLE_ACTUATORS 0x97UL
+#define FF_PID_USAGE_DC_DISABLE_ACTUATORS 0x98UL
+#define FF_PID_USAGE_DC_STOP_ALL_EFFECTS 0x99UL
+#define FF_PID_USAGE_DC_DEVICE_RESET 0x9AUL
+#define FF_PID_USAGE_DC_DEVICE_PAUSE 0x9BUL
+#define FF_PID_USAGE_DC_DEVICE_CONTINUE 0x9CUL
+
+/* Create New Effect Report */
+#define FF_PID_USAGE_EFFECT_TYPE 0x25UL
+#define FF_PID_USAGE_ET_CONSTANT 0x26UL
+#define FF_PID_USAGE_ET_SQUARE 0x30UL
+#define FF_PID_USAGE_ET_SINE 0x31UL
+#define FF_PID_USAGE_ET_TRIANGLE 0x32UL
+#define FF_PID_USAGE_ET_SAW_UP 0x33UL
+#define FF_PID_USAGE_ET_SAW_DOWN 0x34UL
+
+
--- linux-2.6.13/drivers/usb/input/pid.c.uppid 2005-08-29 02:41:01.000000000
+0300
+++ linux-2.6.13/drivers/usb/input/pid.c 2005-09-07 17:45:06.000000000
+0300
@@ -117,7 +117,7 @@
return -EACCES;
/* Find report */
- field = hid_find_field_by_usage(hid, HID_UP_PID |
FF_PID_USAGE_BLOCK_FREE,
+ field = hid_find_field_by_usage(hid, HID_UP_PID |
FF_PID_USAGE_BLOCK_FREE_REPORT,
HID_OUTPUT_REPORT);
if (!field) {
dev_err(&hid->dev->dev, "couldn't find report\n");
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel