diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-26 13:29:48 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-03-26 13:29:48 +0000 |
commit | 4411c2643e41d023a1909b1040361912422be6c0 (patch) | |
tree | 0d3b91dafae9dfdca2bf16473232b8073e5fbdeb /src/jtag/jtag.h | |
parent | 2df3ca97a70aa600a1dd0f8be59d0ad2d359c16e (diff) |
TAP_SD/SI are now forbidden end states.
jtag_add_reset() now returns void streamlining the API
git-svn-id: svn://svn.berlios.de/openocd/trunk@525 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r-- | src/jtag/jtag.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index fca7c350..4d482f06 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -245,7 +245,11 @@ extern enum reset_types jtag_reset_config; extern int jtag_init(struct command_context_s *cmd_ctx); extern int jtag_register_commands(struct command_context_s *cmd_ctx); -/* JTAG interface, can be implemented with a software or hardware fifo */ +/* JTAG interface, can be implemented with a software or hardware fifo + * + * TAP_SD and TAP_SI are illegal end states. TAP_SD/SI as end states + * can be emulated by using a larger scan. + */ extern void jtag_add_ir_scan(int num_fields, scan_field_t *fields, enum tap_state endstate); extern int interface_jtag_add_ir_scan(int num_fields, scan_field_t *fields, enum tap_state endstate); extern void jtag_add_dr_scan(int num_fields, scan_field_t *fields, enum tap_state endstate); @@ -294,16 +298,13 @@ extern int interface_jtag_add_pathmove(int num_states, enum tap_state *path); */ extern void jtag_add_runtest(int num_cycles, enum tap_state endstate); extern int interface_jtag_add_runtest(int num_cycles, enum tap_state endstate); -/* If it fails and one of the error messages below are returned, nothing is - * added to the queue and jtag_execute() won't return an error code. - * - * ERROR_JTAG_RESET_WOULD_ASSERT_TRST - * ERROR_JTAG_RESET_CANT_SRST +/* Invoking jtag_add_reset() with unsupported combinations is + * not allowed and constitutes a bug in the calling code. * - * All other error codes will result in jtag_execute_queue() returning - * an error. + * trst & srst must be 0 or 1. There is no way to + * read the current reset state. */ -extern int jtag_add_reset(int trst, int srst); +extern void jtag_add_reset(int trst, int srst); extern int interface_jtag_add_reset(int trst, int srst); extern void jtag_add_end_state(enum tap_state endstate); extern int interface_jtag_add_end_state(enum tap_state endstate); @@ -357,8 +358,6 @@ extern int jtag_verify_capture_ir; #define ERROR_JTAG_NOT_IMPLEMENTED (-102) #define ERROR_JTAG_TRST_ASSERTED (-103) #define ERROR_JTAG_QUEUE_FAILED (-104) -#define ERROR_JTAG_RESET_WOULD_ASSERT_TRST (-105) -#define ERROR_JTAG_RESET_CANT_SRST (-106) #define ERROR_JTAG_DEVICE_ERROR (-107) |