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.
This commit is contained in:
Harald Welte 2012-02-12 15:37:14 +01:00
parent e1bed6d14b
commit b14d0ad279
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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 */