Several ioctl() calls are also available.
They take an argument of
type int *
JOY_SETTIMEOUT Fa int *limit
Set the time limit (in microseconds) for reading the joystick
status.
Setting a value
too small may prevent to get correct values for the positions (which
are then set to -2147483648), however this can be useful if one is
only interested by the buttons status.
JOY_GETTIMEOUT Fa int *limit
Get the time limit (in microseconds) used for reading the joystick
status.
JOY_SET_X_OFFSET Fa int *offset
Set the value to be added to the X position when reading the joystick
status.
JOY_SET_Y_OFFSET Fa int *offset
Set the value to be added to the Y position when reading the joystick
status.
JOY_GET_X_OFFSET Fa int *offset
Get the value which is added to the X position when reading the joystick
status.
JOY_GET_Y_OFFSET Fa int *offset
Get the value which is added to the Y position when reading the joystick
status.
Pots are normally 0-150k variable resistors (0-100k sometimes), and
according to the IBM technical reference, the time is given by
Time = 24.2e-6s + 0.011e-6s * R/Ohms