include/tpl_drv_joystick.h File Reference


Detailed Description

Joystick Driver Interface Definitions.

Author:
John Hodge (thePowersGang)

VFS Layout

Joystick drivers define a single VFS node, that acts as a fixed size file. Reads from this file return the current state, writes are ignored.

Structure

The device file must begin with a valid sJoystick_FileHeader structure. The file header is followed by NAxies instances of sJoystick_Axis, one for each axis. This is followed by NButtons boolean values (represented using Uint8), each representing the state of a single button (where 0 is unpressed, 0xFF is fully depressed - intermediate values are valid in the case of variable-pressure buttons)

Go to the source code of this file.

Data Structures

struct  sJoystick_FileHeader
struct  sJoystick_Axis
 Axis Definition. More...

Typedefs

typedef void(* tJoystickCallback )(int Ident, int bIsAxis, int Num, int Delta)
 Callback type for JOY_IOCTL_SETCALLBACK.

Enumerations

enum  eTplJoystick_IOCtl { JOY_IOCTL_SETCALLBACK = 4, JOY_IOCTL_GETSETAXISLIMIT, JOY_IOCTL_GETSETAXISFLAGS, JOY_IOCTL_GETSETBUTTONFLAGS }
 

Common Joystick IOCtl Calls.

More...

Typedef Documentation

typedef void(* tJoystickCallback)(int Ident, int bIsAxis, int Num, int Delta)

Callback type for JOY_IOCTL_SETCALLBACK.

Parameters:
Ident Ident value passed to JOY_IOCTL_SETCALLBACK

Enumeration Type Documentation

Common Joystick IOCtl Calls.

Enumerator:
JOY_IOCTL_SETCALLBACK 

Sets the callback.

ioctl(..., struct{int Ident;tKeybardCallback *Callback})

Note:
Can be called from kernel mode only

Sets the callback that is called when a event occurs (button or axis change). This function pointer must be in kernel mode (although, kernel->user or kernel->ring3driver abstraction functions can be used)

JOY_IOCTL_GETSETAXISLIMIT 

Set maximum value for sJoystick_Axis.CurState.

ioctl(..., struct{int AxisNum;int Value})

Note:
If Value is equal to -1 (all bits set), the value is not changed
JOY_IOCTL_GETSETAXISFLAGS 

Set axis flags.

ioctl(..., struct{int AxisNum;int Value})

Note:
If Value is equal to -1 (all bits set), the value is not changed
JOY_IOCTL_GETSETBUTTONFLAGS 

Set Button Flags.

ioctl(..., struct{int ButtonNum;int Value})

Note:
If Value is equal to -1 (all bits set), the value is not changed
Generated on Mon Feb 14 15:21:30 2011 for Acess2 by  doxygen 1.6.3