summaryrefslogtreecommitdiff
path: root/firmware/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-02-12 15:34:41 +0100
committerHarald Welte <laforge@gnumonks.org>2012-02-12 15:34:41 +0100
commit4f7ca20bf40b911c035264d86ef0359d20e7ac88 (patch)
tree9019f7c4f137d964a7076b123c66cdcf21dcd7a9 /firmware/src
parentf233812722cede1fee0aa521ed81572686d64fad (diff)
simtrace: Inform host of Fi/Di values (and flag change due to PPS)
Diffstat (limited to 'firmware/src')
-rw-r--r--firmware/src/simtrace/iso7816_uart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c
index 706b5db..09a7aa0 100644
--- a/firmware/src/simtrace/iso7816_uart.c
+++ b/firmware/src/simtrace/iso7816_uart.c
@@ -175,6 +175,10 @@ static void send_rctx(struct iso7816_3_handle *ih)
if (!rctx)
return;
+ /* Put Fi and Di into res[2] array */
+ ih->sh.res[0] = ih->fi;
+ ih->sh.res[1] = ih->di;
+
/* copy the simtrace header */
memcpy(rctx->data, &ih->sh, sizeof(ih->sh));
@@ -443,6 +447,7 @@ process_byte_pts(struct iso7816_3_handle *ih, u_int8_t byte)
ih->fi = byte >> 4;
ih->di = byte & 0xf;
DEBUGPCR("found Fi=%u Di=%u", ih->fi, ih->di);
+ ih->sh.flags |= SIMTRACE_FLAG_PPS_FIDI;
ih->pts_resp[_PTS1] = byte;
break;
case PTS_S_WAIT_RESP_PTS2:
personal git repositories of Harald Welte. Your mileage may vary