On Dec 13, 2008, at 9:57 PM, Dick Hollenbeck wrote:
Index: src/jtag/jtag.h =================================================================== --- src/jtag/jtag.h (revision 1239) +++ src/jtag/jtag.h (working copy) @@ -50,7 +50,6 @@ enum tap_state low; } tap_transition_t; -extern char* tap_state_strings[16];extern int tap_move_map[16]; /* map 16 TAP states to 6 stable states */ extern u8 tap_move[6][6]; /* value scanned to TMS to move from one of six stable states to another */ extern tap_transition_t tap_transitions[16]; /* describe the TAP state diagram */@@ -529,4 +528,17 @@interface_jtag_add_dr_out(tap, num_fields, num_bits, value, cmd_queue_end_state);} +#if defined(DEBUG) +#define D(x) x +#else +#define D(x) /* nothing */ +#endif +
This new define isn't used anywhere in your patch. If it isn't necessary, it shouldn't be included.
+/** + * Function show_state + * converts the binary \a state to a meaningful character string. + */ +const char* show_state(enum tap_state state); + +
I'm a firm believer in explicit names for functions. show_state() is a bit generic as it doesn't specify what type of state it works on (I realize the type is part of the function prototype, but consider reading code that calls this function.) nor does it indicate how it will "show" it. A better name choice might be jtag_tap_state_string() or jtag_tap_state_name().
-- Rick Altherr [email protected]"He said he hadn't had a byte in three days. I had a short, so I split it with him."
-- Unsigned
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
