aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/jtag.h
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-01-09 07:42:45 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-01-09 07:42:45 +0000
commit9324e6280edfda501d1cf52e5d46b1c4aa083935 (patch)
treec3a361a162932dc68ac4c2ae9f9e04f5b867e09c /src/jtag/jtag.h
parentebd5afbb0e879aeb124f62fdf0bdb6ff5889834b (diff)
Dick Hollenbeck <dick@softplc.com> adds jtag_add_clocks() and implements those in the bitbang and ft2232.c. nearly a full rewrite of the xsvf.c. improved some messaging only affected by _DEBUG_JTAG_IO_
git-svn-id: svn://svn.berlios.de/openocd/trunk@1308 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r--src/jtag/jtag.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 82fa061b..cc3c9f0a 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -29,6 +29,7 @@
#include "command.h"
+
#if 0
#define _DEBUG_JTAG_IO_
#endif
@@ -112,6 +113,13 @@ typedef struct runtest_command_s
enum tap_state end_state; /* TAP state in which JTAG commands should finish */
} runtest_command_t;
+
+typedef struct stableclocks_command_s
+{
+ int num_cycles; /* number of clock cycles that should be sent */
+} stableclocks_command_t;
+
+
typedef struct reset_command_s
{
int trst; /* trst/srst 0: deassert, 1: assert, -1: don't change */
@@ -134,6 +142,7 @@ typedef union jtag_command_container_u
statemove_command_t *statemove;
pathmove_command_t *pathmove;
runtest_command_t *runtest;
+ stableclocks_command_t *stableclocks;
reset_command_t *reset;
end_state_command_t *end_state;
sleep_command_t *sleep;
@@ -144,7 +153,8 @@ enum jtag_command_type
JTAG_SCAN = 1,
JTAG_STATEMOVE = 2, JTAG_RUNTEST = 3,
JTAG_RESET = 4, JTAG_END_STATE = 5,
- JTAG_PATHMOVE = 6, JTAG_SLEEP = 7
+ JTAG_PATHMOVE = 6, JTAG_SLEEP = 7,
+ JTAG_STABLECLOCKS = 8
};
typedef struct jtag_command_s
@@ -434,6 +444,16 @@ extern int interface_jtag_add_end_state(enum tap_state endstate);
extern void jtag_add_sleep(u32 us);
extern int interface_jtag_add_sleep(u32 us);
+
+/**
+ * Function jtag_add_stable_clocks
+ * first checks that the state in which the clocks are to be issued is
+ * stable, then queues up clock_count clocks for transmission.
+ */
+void jtag_add_clocks( int num_cycles );
+int interface_jtag_add_clocks( int num_cycles );
+
+
/*
* For software FIFO implementations, the queued commands can be executed
* during this call or earlier. A sw queue might decide to push out