xvsf player fixes by Dick Hollenbeck <dick@softplc.com>

git-svn-id: svn://svn.berlios.de/openocd/trunk@1360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
kc8apf
2009-01-23 07:10:11 +00:00
parent 6f612fb959
commit d5209daeb1
5 changed files with 122 additions and 47 deletions

View File

@@ -38,6 +38,14 @@
#include <unistd.h>
/**
* Function bitbang_stableclocks
* issues a number of clock cycles while staying in a stable state.
* Because the TMS value required to stay in the RESET state is a 1, whereas
* the TMS value required to stay in any of the other stable states is a 0,
* this function checks the current stable state to decide on the value of TMS
* to use.
*/
static void bitbang_stableclocks(int num_cycles);
@@ -162,13 +170,14 @@ void bitbang_runtest(int num_cycles)
static void bitbang_stableclocks(int num_cycles)
{
int tms = (cur_state == TAP_RESET ? 1 : 0);
int i;
/* send num_cycles clocks onto the cable */
for (i = 0; i < num_cycles; i++)
{
bitbang_interface->write(1, 0, 0);
bitbang_interface->write(0, 0, 0);
bitbang_interface->write(1, tms, 0);
bitbang_interface->write(0, tms, 0);
}
}
@@ -293,6 +302,9 @@ int bitbang_execute_queue(void)
break;
case JTAG_STABLECLOCKS:
/* this is only allowed while in a stable state. A check for a stable
* state was done in jtag_add_clocks()
*/
bitbang_stableclocks(cmd->cmd.stableclocks->num_cycles);
break;