Seeking Help for xbox controller operation of a servomotor.
Hi everyone. I am new to this forum and registered to seek help as I am learning about linux usage at an introductory level.
I am to create a kernal module in RTOS Linux (redhat 4.1.2) such that the joystick of an xbox controller operates a servomotor.
I have located this driver for the xbox controller, which operates in user space: "xboxdrv" Xbox/Xbox360 USB Gamepad Driver for Linux. I can't link to it though as I am a new user here.
The challenge here for me is essentially taking the input from the driver and applying it to a module in kernal space. I am OK with the kernal module and control of the motor, but getting the input from the driver is what I do not know how to do.
From my research, it seems that using something like evtest-capture, to read joystick input (joystick input is to make motor move). This is where my inexperience arises. What what I understand, evtest-capture can write to an xml file in which conversion may be applied to result in a c file for input.
I am wondering if my approach to this is correct. And if this c file can be read from the kernal space, in real time, to use as input for the motor. I have read some info advising against reading files in the kernal space. However I do not understand how else I would accomplish my goal.
If my approach is incorrect, feel free to outline an ideal approach. Any help is greatly appreciated; please keep in mind my inexperience if you are to reply.
Thanks in advance,