|
From: kc8apf at B. <kc...@ma...> - 2009-05-21 19:20:19
|
Author: kc8apf
Date: 2009-05-21 19:20:05 +0200 (Thu, 21 May 2009)
New Revision: 1876
Modified:
trunk/src/jtag/jtag.c
Log:
Author: Michael Bruck <mb...@di...>
-jtag.c, interface_jtag_add_ir_scan() [2/2] (version without goto):
- change 'found' to bool
- add comments on loops
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-05-21 16:15:41 UTC (rev 1875)
+++ trunk/src/jtag/jtag.c 2009-05-21 17:20:05 UTC (rev 1876)
@@ -641,15 +641,19 @@
for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
{
- int found = 0;
+ /* search the input field list for fields for the current TAP */
+ bool found = false;
+
for (int j = 0; j < in_num_fields; j++)
{
if (tap != in_fields[j].tap)
continue;
- found = 1;
+ /* if TAP is listed in input fields, copy the value */
+ found = true;
+
tap->bypass = 0;
assert(in_fields[j].num_bits == tap->ir_length); /* input fields must have the same length as the TAP's IR */
@@ -662,6 +666,7 @@
if (!found)
{
/* if a TAP isn't listed in input fields, set it to BYPASS */
+
tap->bypass = 1;
field->tap = tap;
|