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.

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;

Frans.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to