View topic - Is there any Joystick driver or sample code available?

Page 1 of 1

Is there any Joystick driver or sample code available?

PostPosted: Wed Jan 25, 2017 9:33 pm
by LeoMa
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

Re: Is there any Joystick driver or sample code available?

PostPosted: Thu Jan 26, 2017 8:33 am
by nico04
There's a thread on a similar topic here : http://www.openqnx.com/phpbbforum/viewtopic.php?t=4195
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.
LIBS+=hiddi

Explore header files to know about structures and functions.

Nicolas