2010/8/23 Frans Meulenbroeks <[email protected]>: > while browsing through the code I stumbled upon clock > > src/tap/cable/generic.c says: > > int > urj_tap_cable_generic_transfer (urj_cable_t *cable, int len, const char *in, > char *out) > { > int i; > > if (out) > for (i = 0; i < len; i++) > { > out[i] = cable->driver->get_tdo (cable); > cable->driver->clock (cable, 0, in[i], 1); > } > else > for (i = 0; i < len; i++) > { > cable->driver->clock (cable, 0, in[i], 1); > } > > return i; > } > > In the else case wouldn't it be better to say instead of the for loop: > cable->driver->clock (cable, 0, in[i], len); > This somehow reduces the overhead.
Nevermind, peeked into this again. Misunderstood the code. sorry. > > Also is it guaranteed/defined that the tdi and tms argumetns to clock > are 0 or 1? Or can there also be other values. > If they are guaranteed 0 or 1 we can eliminate the followigng lines > from the gpio.c gpio_clock function > tms = tms ? 1 : 0; > tdi = tdi ? 1 : 0; This question still remains open. Frans ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ UrJTAG-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/urjtag-development
