From: <zw...@ma...> - 2009-06-07 07:22:31
|
Author: zwelch Date: 2009-06-07 07:22:25 +0200 (Sun, 07 Jun 2009) New Revision: 2079 Modified: trunk/src/jtag/jtag.c Log: Factoring of jtag_examine_chain for maintainability: - Move definition of maximum JTAG chain size closer to its only uses. Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-06-07 05:22:09 UTC (rev 2078) +++ trunk/src/jtag/jtag.c 2009-06-07 05:22:25 UTC (rev 2079) @@ -84,10 +84,6 @@ static int jtag_nsrst_delay = 0; /* default to no nSRST delay */ static int jtag_ntrst_delay = 0; /* default to no nTRST delay */ -/* maximum number of JTAG devices expected in the chain - */ -#define JTAG_MAX_CHAIN_SIZE 20 - /* callbacks to inform high-level handlers about JTAG state changes */ jtag_event_callback_t *jtag_event_callbacks; @@ -943,6 +939,9 @@ alive_sleep(us/1000); } +/// maximum number of JTAG devices expected in the chain +#define JTAG_MAX_CHAIN_SIZE 20 + #define EXTRACT_MFG(X) (((X) & 0xffe) >> 1) #define EXTRACT_PART(X) (((X) & 0xffff000) >> 12) #define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28) |