summaryrefslogtreecommitdiff
path: root/firmware/src/simtrace
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-05-18 08:41:08 +0200
committerHarald Welte <laforge@gnumonks.org>2012-05-18 08:41:08 +0200
commit5aae62cb7b099663d80f83591bd4f6f824fc88fb (patch)
tree980a07b25824b34fee7f6776d7f6c916c53cb4c1 /firmware/src/simtrace
parentf0fb308984a66ca2c6f8fd2a3a2e9edcae1b5ccb (diff)
7816_uart: add comment about f/d calculation
Diffstat (limited to 'firmware/src/simtrace')
-rw-r--r--firmware/src/simtrace/iso7816_uart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c
index 4169ab9..5f1bad0 100644
--- a/firmware/src/simtrace/iso7816_uart.c
+++ b/firmware/src/simtrace/iso7816_uart.c
@@ -157,6 +157,8 @@ static int compute_fidi_ratio(u_int8_t fi, u_int8_t di)
if (d == 0)
return -EINVAL;
+ /* See table 7 of ISO 7816-3: From 1000 on we divide by 1/d,
+ * which equals a multiplication by d */
if (di < 8)
ret = f / d;
else
personal git repositories of Harald Welte. Your mileage may vary