There is another App Note for linux device drivers and direct hardware access (AN582)
http://support.logicpd.co...4&portalid=0&mid=648 In there, we have an example on how to both output a pin and read (via single or multi-threaded interrupts) from a pin.
The source code is available as part of the download. Let me know if that helps.
-adam