Is there any Joystick driver or sample code available?

Hello all,

I am using QNX 6.3.2 for robotic application programming. I need to read the input from joystick. I can read the joystick (Logitech Attack 3) data through the command:
hidview -a -d2 (Joystick’s id is 2)

the data will be shown on the screen. I wonder if there is some code sample available, so that I can read the input for joystick in my code
? Thanks

Leo Ma

There’s a thread on a similar topic here :
There’s no real answer but it’s interesting to read it.

Hid API is accessible through sys/hiddi.h and sys/hidut.h.
#include <sys/hiddi.h>
#include <sys/hidut.h>

You have to link your binary with hiddi.

Explore header files to know about structures and functions.