In response to myself... 1) There isn't a HOWTO write a XFree86 Driver that I could find.
2) There is samples in the source code, as well as similar drivers for touchscreen needs. What I did was: get the source code for xserver-xfree86 on debian: cd /usr/local/src apt-get source xserver-xfree86 then build the source in it's entirety (so all the libraries and dependencies are build) cd /usr/local/src/xfree86-4.3.0.dfsg.1/build-tree/xc-xserver-xfree86-dbg make World (wait...) then go find the example driver you want to start hacking up cd /usr/local/src/xfree86-4.3.0.dfsg.1/build-tree/xc-xserver-xfree86-dbg/programs/Xserver/hw/xfree86/input/elographics make a change to the source file to see your code changes work... (I would suggest changing something that logs to screen, or the logfile)... vi xf86Elo.c make cp elographics_drv.o /usr/X11R6/lib/modules/input/ make sure you're specifying that driver in XF86Config-4 Section "InputDevice" ... Driver "elographics" Option "Device" "/dev/ttyS0" ... EndSection Start your X server... startx See your change (or see the logging occur). If that works. You can now make changes to the source code, and see the changes. ### NEXT UP: writing your driver for your hardware. 1) Request the Hardware Program manual from the manufacturer. (in my case it was ELO that bought out CarrollTouch) 2) Write a simple C script that communicates to the device, following the instructions from the Program manual. (this was used to quickly debug serial device communication) 3) Incorporate your working C script in the appropriate places into your x driver modified above. 4) Possibly change the name of the driver to something that resembles your hardware. 5) Submit the code for review, or addition. ### Which brings me to a question, HOW DO I submit my code for review or addition? Thanks! On Mon, Mar 07, 2005 at 03:31:24PM -0800, todd wrote: > I have: > Correll Touch 5003-0768-01 (Correll Touch was bought out by Elo) > -- an infra-red touchscreen wrapper. > XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-10 20041215174925) > > The linux docs for Elo: > http://www.elotouch.com/support/linux.asp > "Linux drivers for Elo touchscreens are available in the public > domain, typically on Linux installation CDs and various FTP > sites such as www.xfree86.org. These Linux drivers are compatible > with Elo AT4 2215, AccuTouch E271-2210, IntelliTouch E281-2310, > IntelliTouch 2500S, and CarrollTouch 4000S controllers." > > The problem: > the eloprahics_drv.o spews "Dropping one byte in an attempt to > synchronize" > when used. > > Troubleshooting done: > I have done a "od -h -w10 </dev/ttyS0" from the console, > I have not received any characters when screen is touched, > but I do see the cursor blinking rapidly, if I unplug the serial cable > the blinking slows to regular console blinking pace. > > I have also plugged in an old serial mouse to /dev/ttyS0 and > validated that cat /dev/ttyS0 works fine, so I know the port is > /dev/ttyS0. > > TODO (Solution): > Write/modify a driver to get this touchscreen working. > > HOW: > I haven't seen any documentation on the best practices for writing > a XFree86 Driver (or modifying one). > > Is there a step-by-step "HOWTO write a XFree86 Driver"? > > Thanks! _______________________________________________ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel