Added code (#ifdef 0) for discovery debugging

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1407 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 16 years ago
parent b8b7ad646f
commit 10178bb3c5

@ -1,3 +1,7 @@
2008-12-17 Kolja Waschk <kawk>
* src/tap/discovery.c: Optional (#ifdef) printf for discovery debugging
2008-12-16 Kolja Waschk <kawk>
* data/Makefile.am: Added bcm6358 files, thanks Anselmo Luginbuehl

@ -38,6 +38,8 @@
#define TEST_COUNT 1
#define TEST_THRESHOLD 100 /* in % */
#undef VERY_LOW_LEVEL_DEBUG
int
detect_register_size( chain_t *chain )
{
@ -70,14 +72,20 @@ detect_register_size( chain_t *chain )
tap_shift_register( chain, rz, NULL, 0 );
tap_shift_register( chain, rpat, rout, 0 );
#ifdef VERY_LOW_LEVEL_DEBUG
printf(">>> %s\n", register_get_string(rz));
printf(" + %s\n", register_get_string(rpat));
#endif
tdo = register_all_bits_same_value(rout);
if(tdo_stuck == -2) tdo_stuck = tdo;
if(tdo_stuck != tdo) tdo_stuck = -1;
register_shift_right( rout, len );
if (register_compare( rpat, rout ) == 0)
ok++;
#ifdef VERY_LOW_LEVEL_DEBUG
printf(" = %s => %d\n", register_get_string(rout), ok);
#endif
}
if (100 * ok / TEST_COUNT < TEST_THRESHOLD) {
ok = 0;

Loading…
Cancel
Save