revert between 56095 -> 55830 in arch
[AROS.git] / rom / usb / docs / lowlevel.doc.patch
blob9105d6c89dbdded942a19554f9c327611c1f306a
1 --- lowlevel_old.doc 1993-10-15 12:04:14.000000000 +0200
2 +++ lowlevel_new.doc 2009-07-14 18:56:28.000000000 +0200
3 @@ -369,8 +369,40 @@
4 value other than JP_TYPE_NOTAVAIL) this function may be used in
5 interrupts.
7 + *** NEW ***
8 + As an extension to the former available data, analogue joystick data
9 + may be returned. This is currently only supported by the Poseidon USB
10 + HID class, however, in future other devices may also add support for
11 + it.
13 + The user may specify the analogue data override option in the HID
14 + class and the data returned by ReadJoyPort() will be of type
15 + JP_TYPE_ANALOGUE, which contains two eight bit counters holding the
16 + absolute position of two joystick axis. An application can also
17 + take control and can explicitly demand JP_TYPE_ANALOGUE data by
18 + either adding JP_ANALOGUE_PORT_MAGIC to the portNumber or setting
19 + SJA_TYPE to SJA_TYPE_ANALOGUE in SetJoyPortAttrs().
21 + The analogue axis information is an unsigned integer from 0 to 255
22 + and has not necessarily been calibrated to be centered at 128.
24 + Compatibility issues:
25 + - If the HID class is not loaded, use of SJA_TYPE_ANALOGUE will have
26 + no effect and JP_TYPE_NOTAVAIL will be returned on ReadJoyPort().
27 + - If the HID class is not loaded, and JP_ANALOGUE_PORT_MAGIC is used,
28 + JP_TYPE_NOTAVAIL will be returned on ReadJoyPort().
29 + - If SetJoyPortAttrs() has been set to SJA_TYPE_JOYSTK or
30 + SJA_TYPE_GAMECTRL, using portNumbers from 0 to 3 still will return
31 + digitally interpreted data, whereas using portNumbers from
32 + JP_ANALOGUE_PORT_MAGIC to JP_ANALOGUE_PORT_MAGIC+3 will return
33 + the analogue data from the ports.
35 INPUTS
36 portNumber - port to read, in the range 0 to 3.
37 + If the JP_ANALOGUE_PORT_MAGIC bit is set additionally,
38 + the returned bitmask will be of JP_TYPE_ANALOGUE, even
39 + if the port was set to JP_TYPE_GAMECTRL or JP_TYPE_JOYSTK
40 + before.
42 RESULT
43 portState - bit map that identifies the device and the current
44 @@ -389,6 +421,7 @@
45 JP_TYPE_GAMECTLR game controller
46 JP_TYPE_MOUSE mouse
47 JP_TYPE_JOYSTK joystick
48 + JP_TYPE_ANALOGUE analogue stick (EXT)
49 JP_TYPE_UNKNOWN unknown device
51 If type = JP_TYPE_GAMECTLR the bit map of portState is:
52 @@ -419,6 +452,18 @@
53 JP_MVERT_MASK Mask for vertical counter
54 JP_MHORZ_MASK Mask for horizontal counter
56 + If type = JP_TYPE_ANALOGUE the bit map of portState is:
57 + JPF_BUTTON_RED Button 1 (standard fire)
58 + JPF_BUTTON_BLUE Button 2
59 + JPF_BUTTON_GREEN Button 3
60 + JPF_BUTTON_YELLOW Button 4
61 + JPF_BUTTON_FORWARD Button 5
62 + JPF_BUTTON_REVERSE Button 6
63 + JPF_BUTTON_PLAY Button 7
64 + JP_XAXIS_MASK Mask for horizontal position
65 + JP_YAXIS_MASK Mask for vertical position
68 SEE ALSO
69 SetJoyPortAttrs()
71 @@ -524,6 +569,11 @@
72 time attempting to sense which type of controller is in use -- and,
73 optionally, to force ReadJoyPort() into utilizing a certain
74 controller type.
76 + *** NEW ***
77 + SetJoyPortAttrs() adds three options for force feedback and rumble
78 + pack support. These are currently very basic controls of two
79 + motors found in the joypad.
81 INPUTS
82 portNumber - the joyport in question (0-3).
83 @@ -535,7 +585,8 @@
84 SJA_Type (ULONG) - Sets the current controller type to the mouse,
85 joystick, or game controller. Supply one of
86 SJA_TYPE_GAMECTLR, SJA_TYPE_MOUSE, SJA_TYPE_JOYSTK,
87 - or SJA_TYPE_AUTOSENSE. If SJA_TYPE_AUTOSENSE is used,
88 + SJA_TYPE_ANALOGUE, or SJA_TYPE_AUTOSENSE.
89 + If SJA_TYPE_AUTOSENSE is used,
90 ReadJoyPort() will attempt to determine the type of
91 controller plugged into the given port automatically.
92 If one of the other types is used, ReadJoyPort() will
93 @@ -551,6 +602,17 @@
94 forcing a port to deallocate any allocated resources;
95 return the implied type to SJA_TYPE_AUTOSENSE.
97 + SJA_RumbleSetSlowMotor (UBYTE) - If a rumble pack is available,
98 + using this tag will set the speed of the slow motor
99 + to the given value (0 - 255).
101 + SJA_RumbleSetFastMotor (UBYTE) - If a rumble pack is available,
102 + using this tag will set the speed of the fast motor
103 + to the given value (0 - 255).
105 + SJA_RumbleOff (BOOL) - If set, this will turn the rumble pack
106 + motors off.
108 RESULT
109 success - TRUE if everything went according to plan, or FALSE upon
110 failure
111 @@ -766,4 +828,4 @@
112 SEE ALSO
113 <libraries/lowlevel.h>
116 \ No newline at end of file