pc-hosted/jtagtap.c: Handle DO as bytes (PR #552)

Fixes #540/#542
This commit is contained in:
Uwe Bonnes 2019-11-10 12:24:44 +01:00 committed by UweBonnes
parent 28f0ced97e
commit 5a05cedd7d
1 changed files with 8 additions and 3 deletions

View File

@ -94,7 +94,6 @@ void jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI
int s;
uint64_t DIl=*(uint64_t *)DI;
uint64_t *DOl=(uint64_t *)DO;
if(!ticks) return;
if (!DI && !DO) return;
@ -112,8 +111,14 @@ void jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI
exit(-1);
}
if (DO)
*DOl=remotehston(-1,(char *)&construct[1]);
if (DO) {
int i = 1;
while (ticks) {
*DO = (uint8_t)remotehston(2,(char *)&construct[i]);
DO++;
i += 2;
}
}
}
void jtagtap_tdi_seq(const uint8_t final_tms, const uint8_t *DI, int ticks)