X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Finclude%2Fapi_drv_joystick.h;h=3ec8597bd55120479d0b3348819f599f4bb1f570;hb=dd2491a82880ed9b01b5d66b1814d271921797a4;hp=9225c5e4d31cffb856dc4935c384bbf9142f7f41;hpb=e6795eb552a6be88b7870dae14a958ab391bfae8;p=tpg%2Facess2.git diff --git a/Kernel/include/api_drv_joystick.h b/Kernel/include/api_drv_joystick.h index 9225c5e4..3ec8597b 100644 --- a/Kernel/include/api_drv_joystick.h +++ b/Kernel/include/api_drv_joystick.h @@ -1,5 +1,5 @@ /** - * \file api_drv_joystick + * \file api_drv_joystick.h * \brief Joystick Driver Interface Definitions * \author John Hodge (thePowersGang) * @@ -51,14 +51,14 @@ enum eTplJoystick_IOCtl { /** * ioctl(..., tJoystickNumValue *) - * \brief Set maximum value for sJoystick_Axis.CurState + * \brief Set maximum value for sJoystick_Axis.CursorPos * \note If \a Value is equal to -1 (all bits set), the value is not changed */ JOY_IOCTL_GETSETAXISLIMIT, /** * ioctl(..., tJoystickNumValue *) - * \brief Set the value of sJoystick_Axis.CurState + * \brief Set the value of sJoystick_Axis.CursorPos * \note If \a Value is equal to -1 (all bits set), the value is not changed */ JOY_IOCTL_GETSETAXISPOSITION, @@ -80,6 +80,9 @@ enum eTplJoystick_IOCtl { JOY_IOCTL_GETSETBUTTONFLAGS, }; +/** + * \brief Symbolic names for Joystick IOCtls + */ #define DRV_JOY_IOCTLNAMES "set_callback", "set_callback_arg", "getset_axis_limit", "getset_axis_position", \ "getset_axis_flags", "getset_button_flags" @@ -106,6 +109,7 @@ typedef void (*tJoystick_Callback)(int Ident, int bIsAxis, int Num, int Delta); /** * \struct sJoystick_FileHeader + * \brief Format of the joystick VFS node's first bytes */ struct sJoystick_FileHeader { @@ -130,6 +134,13 @@ struct sJoystick_Axis Uint16 CursorPos; //!< Current state (cursor position) }; +/** + * \brief Macro to define a structure for a joystick's node + * \param _naxies Number of axies + * \param _nbuttons Number of buttons + * \note This just defines the structure, it's up to the driver to set the + * sJoystick_FileHeader.NAxies and sJoystick_FileHeader.NButtons fields. + */ #define JOY_INFOSTRUCT(_naxies, _nbuttons) struct { \ Uint16 NAxies, NButtons;\ tJoystick_Axis Axies[_naxies];\