Stefano Babic wrote: > Mike Frysinger wrote: >> On Wednesday, July 28, 2010 13:56:42 Stefano Babic wrote: >>> The patch adds a cable driver that uses GPIOs >>> to control the JTAG interface. >>> It requires that the GPIOs sysfs is enabled >>> on the system. The GPIOs required are passed to the >>> driver at the connect time.
>> i would imagine using stdio with fopen here would make the code nicer > > Mike, I have only a concern using fopen/fwrite when I set the gpios. See > a later comment. >> use fopen() and such > > Well, the point to use directly open/write is to not have buffered > functions and to be sure the gpio is set as soon as possible. Using > fopen/fwrite I have at least to call always fflush() after setting the > gpios. Should not be better to use open/write to drive the hardware ? Wouldn't setvbuf(file, _IONBF) do what you want? Rutger ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
