aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-02-12 15:37:14 +0100
committerHarald Welte <laforge@gnumonks.org>2012-02-12 15:37:14 +0100
commitb14d0ad2792d3f76ec21e141229840c736a2f23c (patch)
treefb382aa9a9284cec4a0edf5a3543dfef064a9027 /host
parente1bed6d14b9b43d0751dbce13abae787b75d6768 (diff)
simtrace: Add print-out of PPS (Fi/Di change).
simtrace firmware 4f7ca20bf40b911c035264d86ef0359d20e7ac88 and later includes an indication of PPS-induced Fi/Di changes. We now print the such indications to the user.
Diffstat (limited to 'host')
-rw-r--r--host/main.c4
-rw-r--r--host/simtrace_usb.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/host/main.c b/host/main.c
index 21d82ba..8ab7d2d 100644
--- a/host/main.c
+++ b/host/main.c
@@ -97,6 +97,10 @@ static int process_usb_msg(uint8_t *buf, int len)
apdu_out_cb(payload, payload_len, NULL);
break;
}
+ if (sh->flags & SIMTRACE_FLAG_PPS_FIDI) {
+ printf("PPS(Fi=%u/Di=%u) ",
+ sh->res[0], sh->res[1]);
+ }
/* everything else goes into APDU splitter */
apdu_split_in(as, payload, payload_len);
#if 0
diff --git a/host/simtrace_usb.h b/host/simtrace_usb.h
index c020093..b8b62d3 100644
--- a/host/simtrace_usb.h
+++ b/host/simtrace_usb.h
@@ -20,5 +20,6 @@ enum simtrace_usb_msgt {
/* flags for MSGT_DATA */
#define SIMTRACE_FLAG_ATR 0x01 /* ATR immediately after reset */
#define SIMTRACE_FLAG_WTIME_EXP 0x04 /* work waiting time expired */
+#define SIMTRACE_FLAG_PPS_FIDI 0x08 /* Fi/Di values in res[2] */
#endif /* SIMTRACE_USB_H */