From a3e6f11b0f6d099bb39df229ecb72171ad479b78 Mon Sep 17 00:00:00 2001 From: ole00 Date: Wed, 24 Apr 2024 23:12:20 +0100 Subject: [PATCH] jtag: added debugging pp symbol to ignore failed matches This can help printing data register when a mismatch occurs. --- jtag_xsvf_player.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jtag_xsvf_player.h b/jtag_xsvf_player.h index 29b3cae..66509a9 100644 --- a/jtag_xsvf_player.h +++ b/jtag_xsvf_player.h @@ -45,6 +45,7 @@ Arduino usage: #define XSVF_DEBUG 0 #define XSVF_CALC_CSUM 1 +#define XSVF_IGNORE_NOMATCH 0 #define XCOMPLETE 0 #define XTDOMASK 1 @@ -583,17 +584,19 @@ static uint8_t xsvf_jtag_is_tdo_as_expected(uint8_t use_mask) expected &= mask; actual &= mask; } +#if XSVF_IGNORE_NOMATCH != 1 if (expected != actual) { #if XSVF_DEBUG Serial.println(F("D...NO MATCH!")); -#endif +#endif return 0; } +#endif } #if XSVF_DEBUG Serial.println(F("D...match!")); -#endif +#endif return 1; }