How to read data sent from a Joystick?

closed account (LAMoizwU)
Hi,

I am able to detect the joystick device and store the dev in a "usb_device":

struct usb_device *dev

I was told by the guy who did the device that my program will need to read the following usage data sent by the device:

USAGE(x) - 0x30
USAGE(y) - 0x31
USAGE(Throttle) - 0xbb

Can anyone suggest how to do this?

Thanks a lot!
Do you have a user's manual or data sheets for this device or ? If not you should contact w/that person and ask for more info.

Berk
Software Developer - Microsoft Corp.
If you are directly interacting with the USB device, you'll need to know this stuff:
http://www.lvr.com/usb.htm
A joystick is a "Human Interface Device" (or HIB) class in the USB nomenclature.

I've never played with USB ports directly myself (and would like to avoid it if at all possible in the future), so that is about all I know about it.

If all you want to do is read your joystick, I suggest you avoid all that headache and stick to the Windows Multimedia API:
http://msdn.microsoft.com/en-us/library/ms709368(VS.85).aspx

Good luck!
I'd look at DirectX - Input (aka Direct Input). Last time I checked it was still around, and easy to use.
Agreed. (I also meant to mention that last time.)
Topic archived. No new replies allowed.