Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/clujtag-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/svf.c
diff options
context:
space:
mode:
authorCluster <clusterrr@clusterrr.com>2015-05-28 08:01:26 +0300
committerCluster <clusterrr@clusterrr.com>2015-05-28 08:01:26 +0300
commit2ef1b02c4485e35d460a2243d573372a741bd1f4 (patch)
treeecb69ee1c4c1b053cc9b6108215b06d21cb165ba /svf.c
parenta8385ae0dfc706c7bfc5fffdf46cfe4bb9cc0eb1 (diff)
New protocol, much faster
Diffstat (limited to 'svf.c')
-rw-r--r--svf.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/svf.c b/svf.c
index 8c56bd9..b1e675a 100644
--- a/svf.c
+++ b/svf.c
@@ -297,10 +297,6 @@ static int bitdata_play(struct libxsvf_host *h, struct bitdata_s *bd, enum libxs
int tms = 0;
int i;
- //printf("bitpdata_play from %d to %d\r\n", bd->len+left_padding-1, left_padding);
- unsigned char data[250];
- unsigned char count = 0;
-
for (i=bd->len+left_padding-1; i >= left_padding; i--) {
if (i == left_padding && h->tap_state != estate) {
h->tap_state++;
@@ -314,35 +310,11 @@ static int bitdata_play(struct libxsvf_host *h, struct bitdata_s *bd, enum libxs
int tdo = -1;
if (bd->tdo_data && bd->has_tdo_data && (!bd->tdo_mask || getbit(bd->tdo_mask, i)))
tdo = getbit(bd->tdo_data, i);
- //int rmask = bd->ret_mask && getbit(bd->ret_mask, i);
- //if (LIBXSVF_HOST_PULSE_TCK(tms, tdi, tdo, rmask, 0) < 0)
- data[count] = (tms&1);
- if (tdi >= 0)
- {
- data[count] |= (1<<1);
- data[count] |= tdi<<2;
- }
- if (tdo >= 0)
- {
- data[count] |= (1<<3);
- data[count] |= tdo<<4;
- }
- count++;
- if (count == sizeof(data))
- {
- if (LIBXSVF_HOST_PULSE_TCK_MULTI(data,count) < 0)
- tdo_error = 1;
- count = 0;
- }
- }
-
- if (count > 0)
- {
- if (LIBXSVF_HOST_PULSE_TCK_MULTI(data,count) < 0)
+ int rmask = bd->ret_mask && getbit(bd->ret_mask, i);
+ if (LIBXSVF_HOST_PULSE_TCK(tms, tdi, tdo, rmask, 0) < 0)
tdo_error = 1;
- count = 0;
}
-
+
if (tms)
LIBXSVF_HOST_REPORT_TAPSTATE();
@@ -404,7 +376,7 @@ int libxsvf_svf(struct libxsvf_host *h)
while (*p > 0 && *p >= ' ') {
p++;
}
- /*
+/*
unsigned long number = 0;
int exp = 0;
p += strtokenskip(p);
@@ -431,7 +403,7 @@ int libxsvf_svf(struct libxsvf_host *h)
LIBXSVF_HOST_REPORT_ERROR("FREQUENCY command failed!");
goto error;
}
- */
+*/
goto eol_check;
}