From 4f7ca20bf40b911c035264d86ef0359d20e7ac88 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 12 Feb 2012 15:34:41 +0100 Subject: simtrace: Inform host of Fi/Di values (and flag change due to PPS) --- firmware/src/simtrace/iso7816_uart.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/src') 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: -- cgit v1.2.3