[NTLUG:Discuss] device driver info

Steve Baker sjbaker1 at airmail.net
Tue Feb 22 23:00:05 CST 2000


dsnedigar at chamberlaingroup.com wrote:
> 
> Does anyone have any good, basic info on how to write a device driver under
> Linux ?  I've got the O'Reily book but its a bit over my head right now since
> I'm just starting out.   If it helps, I'm wanting to write a device driver for a
> steering wheel type 'joystick' for lack of a better term.  I want to eventually
> write a NASCAR type game under Linux, and I thought that being able to read the
> steering wheel would be a good place to start.   Any ideas ?

If the steering wheel is an analog device that plugs into the regular
joystick port then you won't need to resort to a device driver.  It'll
just look like a regular analog joystick.

If it's a digital device, then you are probably in trouble because the
digital game port interface protocol is 'owned' by Microsoft - and they
aren't revealing the necessary low-level protocols you'd need to write
a driver (which is why there isn't a digital stick driver right
now - AFAIK).

If you are thinking about using one of the Nintendo or Playstation
steering wheels with a hacked connector - there is information on
how to do that and again, the standard Linux joystick driver can cope.

My 'PLIB' library (http://plib.sourceforge.net) has a convenient C++
header file that hides all the ugliness of interfacing - there is also
a handy test program that lets you see what joystick ports wiggle as
you play with the stick - and also which buttons do what things.

Several Linux distro's already package PLIB - so it's perfectly
possible that you already have it installed on your machine.
Check either /usr/include/plib/js.h or /usr/local/plib/include/js.h

Anyway, email me offline if you need help with that.

-- 
Steve Baker                  http://web2.airmail.net/sjbaker1
sjbaker1 at airmail.net (home)  http://www.woodsoup.org/~sbaker
sjbaker at hti.com      (work)




More information about the Discuss mailing list